:root {
  --inq-bg: #f4f4f4;
  --inq-surface: #ffffff;
  --inq-paper: #fffdf8;
  --inq-text: #333333;
  --inq-muted: #666666;
  --inq-line: #d7d7d7;
  --inq-primary: #1f5fa8;
  --inq-primary-dark: #153f73;
  --inq-accent: #2878c8;
  --inq-accent-dark: #155fa4;
  --inq-danger: #b00020;
  --inq-warn-bg: #eef6ff;
  --inq-focus: #2f74d0;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--inq-bg);
}

body {
  margin: 0;
  background: var(--inq-bg);
  color: var(--inq-text);
  font-family: Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

a {
  color: #0066bb;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.inquiry-app {
  min-height: 100vh;
}

.inquiry-loading {
  padding: 48px 16px;
  text-align: center;
}

.inq-page {
  min-height: 100vh;
}

.inq-site-header {
  display: grid;
  place-items: center;
  min-height: 82px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e2e2;
  background: #ffffff;
}

.inq-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inq-logo-link img {
  display: block;
  max-width: min(320px, 80vw);
  max-height: 58px;
  object-fit: contain;
}

.inq-logo-text {
  margin: 0;
  color: var(--inq-primary);
  font-size: 1.5rem;
  font-weight: 700;
}

.inq-shell {
  width: min(920px, calc(100% - 24px));
  margin: 0 auto;
  padding: 22px 0 46px;
}

.inq-panel {
  margin: 0 0 24px;
  background: var(--inq-surface);
}

.inq-title-wrap {
  margin: 0 0 14px;
  border-top: 4px solid var(--inq-primary);
  border-bottom: 1px solid var(--inq-line);
  background: #ffffff;
}

.inq-title-wrap h1 {
  margin: 0;
  padding: 11px 12px 10px;
  color: var(--inq-primary);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
}

.inq-panel h2 {
  margin: 0;
  font-size: 1.08rem;
}

.inq-panel > h2 {
  margin: 0 0 14px;
  padding: 11px 12px 10px;
  border-top: 4px solid var(--inq-primary);
  border-bottom: 1px solid var(--inq-line);
  color: var(--inq-primary);
  font-size: 1.35rem;
  line-height: 1.35;
}

.inq-panel > .inq-help,
.inq-panel > .inq-form-grid,
.inq-panel > .inq-status-table,
.inq-panel > .inq-summary,
.inq-panel > .inq-actions,
.inq-panel > div:not(.inq-title-wrap):not(.inq-container):not(.inq-purpose-group):not(.inq-alert):not(.inq-notice) {
  margin-left: 12px;
  margin-right: 12px;
}

.inq-panel h3 {
  margin: 20px 0 10px;
  padding-left: 10px;
  border-left: 4px solid var(--inq-primary);
  font-size: 1.02rem;
}

.inq-container,
.inq-frame-attention,
.inq-alert,
.inq-notice,
.inq-summary,
.inq-status-table,
.inq-item,
.inq-tel-box {
  border: 1px solid var(--inq-line);
  background: var(--inq-surface);
}

.inq-container {
  margin: 0 0 14px;
  padding: 14px 16px;
}

.inq-container p,
.inq-frame-attention p,
.inq-tel-box p {
  margin: 0;
}

.inq-container p + p,
.inq-frame-attention p + p,
.inq-tel-box p + p {
  margin-top: 8px;
}

.inq-wait {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  background: var(--inq-warn-bg);
  color: var(--inq-primary-dark);
  font-weight: 700;
}

.inq-attention {
  color: var(--inq-primary);
  font-weight: 700;
}

.inq-tel-box {
  margin-top: 12px;
  padding: 12px;
  background: #f7f7f7;
  text-align: center;
}

.inq-phone-box {
  margin: 16px 0;
  padding: 14px 12px;
  border: 1px solid #b8d4f0;
  background: #f2f8ff;
  text-align: center;
}

.inq-phone-warning {
  color: var(--inq-primary-dark);
  font-weight: 700;
}

.inq-phone-number {
  display: inline-block;
  margin: 8px 0 2px;
  color: var(--inq-primary);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.inq-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.inq-links a {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--inq-accent-dark);
  border-radius: 3px;
  background: var(--inq-accent);
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.inq-links a:hover,
.inq-button:hover {
  filter: brightness(0.96);
}

.inq-section-heading {
  margin: 22px 0 0;
  border: 1px solid #b8d4f0;
  background: #eef6ff;
}

.inq-section-heading h2 {
  margin: 0;
  padding: 8px 12px;
  color: var(--inq-primary-dark);
  font-size: 1.02rem;
}

.inq-frame-attention {
  margin: 12px 0;
  padding: 12px 14px;
  background: var(--inq-warn-bg);
  color: #173f69;
}

.inq-purpose-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--inq-line);
  background: var(--inq-line);
  list-style: none;
}

.inq-purpose-list li {
  background: #ffffff;
}

.inq-purpose-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 52px;
  padding: 11px 12px;
  align-items: start;
  border: 0;
  background: #ffffff;
  color: var(--inq-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.inq-purpose-list button:hover,
.inq-purpose-list button.is-selected {
  background: #eef6ff;
}

.inq-purpose-list strong,
.inq-purpose-list small {
  display: block;
}

.inq-purpose-list strong {
  font-weight: 700;
}

.inq-purpose-list small {
  margin-top: 2px;
  color: var(--inq-muted);
  font-size: 0.87rem;
}

.inq-help {
  margin: 0 0 16px;
  color: var(--inq-muted);
}

.inq-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 1px solid var(--inq-line);
  background: #ffffff;
  list-style: none;
}

.inq-step {
  min-height: 56px;
  padding: 8px 6px;
  border-right: 1px solid var(--inq-line);
  background: #f5f5f5;
  color: var(--inq-muted);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.inq-step:last-child {
  border-right: 0;
}

.inq-step p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.25;
}

.inq-step.is-active {
  background: var(--inq-primary);
  color: #ffffff;
}

.inq-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #fff0f0;
  color: var(--inq-danger);
  font-weight: 700;
}

.inq-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #eff9f0;
  color: #216b2d;
  font-weight: 700;
}

.inq-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.inq-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inq-field label,
.inq-label {
  font-weight: 700;
}

.inq-field input,
.inq-field select,
.inq-field textarea {
  width: 100%;
  border: 1px solid #b8b8b8;
  border-radius: 2px;
  background: #ffffff;
  color: var(--inq-text);
}

.inq-field input:focus,
.inq-field select:focus,
.inq-field textarea:focus,
.inq-purpose-list button:focus-visible,
.inq-button:focus-visible,
.inq-links a:focus-visible {
  outline: 2px solid var(--inq-focus);
  outline-offset: 2px;
}

.inq-field input,
.inq-field select {
  min-height: 42px;
  padding: 7px 9px;
}

.inq-field textarea {
  min-height: 132px;
  padding: 10px;
  resize: vertical;
}

.inq-order-number {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.inq-order-number span {
  display: grid;
  place-items: center;
  color: var(--inq-muted);
}

.inq-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.inq-actions.is-between {
  justify-content: space-between;
}

.inq-button {
  display: inline-grid;
  min-width: 128px;
  min-height: 44px;
  place-items: center;
  padding: 8px 18px;
  border: 1px solid var(--inq-accent-dark);
  border-radius: 3px;
  background: var(--inq-accent);
  color: #ffffff;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.inq-button.secondary {
  border-color: #b8b8b8;
  background: #ffffff;
  color: var(--inq-text);
}

.inq-button.warn {
  border-color: var(--inq-accent-dark);
  background: var(--inq-warn-bg);
  color: #8a5100;
}

.inq-items {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.inq-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
}

.inq-item img,
.inq-thumb-placeholder {
  width: 88px;
  aspect-ratio: 1;
  border: 1px solid var(--inq-line);
  object-fit: cover;
  background: #f1f1f1;
}

.inq-thumb-placeholder {
  display: grid;
  place-items: center;
  color: var(--inq-muted);
  font-size: 0.78rem;
}

.inq-item-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.inq-item-meta {
  margin: 0 0 8px;
  color: var(--inq-muted);
  font-size: 0.9rem;
}

.inq-item-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.inq-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.inq-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--inq-primary);
}

.inq-summary {
  margin: 0;
  padding: 14px;
  background: var(--inq-paper);
  white-space: pre-wrap;
  word-break: break-word;
}

.inq-status-table {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--inq-line);
}

.inq-status-table div {
  padding: 9px 11px;
  background: #ffffff;
}

.inq-status-table div:nth-child(odd) {
  background: #f7f7f7;
  color: var(--inq-muted);
  font-weight: 700;
}

.inq-footer {
  padding: 22px 10px 34px;
  color: #666666;
  text-align: center;
  font-size: 0.78rem;
}

.inq-footer p {
  margin: 0;
}

.inq-footer p + p {
  margin-top: 5px;
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .inq-site-header {
    min-height: 68px;
  }

  .inq-shell {
    width: min(100% - 14px, 720px);
    padding-top: 12px;
    padding-bottom: 34px;
  }

  .inq-title-wrap h1 {
    font-size: 1.22rem;
  }

  .inq-container,
  .inq-frame-attention {
    padding: 12px;
  }

  .inq-links,
  .inq-form-grid,
  .inq-item-controls {
    grid-template-columns: 1fr;
  }

  .inq-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .inq-shell > .inq-alert,
  .inq-shell > .inq-notice {
    position: sticky;
    top: 8px;
    top: max(8px, env(safe-area-inset-top));
    z-index: 20;
    max-height: min(38vh, 220px);
    overflow: auto;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  }

  .inq-step {
    min-height: 50px;
    padding: 7px 2px;
    border-right: 1px solid var(--inq-line);
    border-bottom: 0;
    font-size: 0.68rem;
  }

  .inq-step:last-child {
    border-right: 0;
  }

  .inq-step p {
    font-size: 0.66rem;
  }

  .inq-order-number {
    grid-template-columns: 1fr;
  }

  .inq-actions,
  .inq-actions.is-between {
    justify-content: stretch;
  }

  .inq-button {
    width: 100%;
  }

  .inq-phone-number {
    font-size: clamp(1.45rem, 8vw, 1.9rem);
  }

  .inq-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .inq-item img,
  .inq-thumb-placeholder {
    width: 72px;
  }

  .inq-status-table {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .inq-site-header {
    min-height: 92px;
  }

  .inq-purpose-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inq-panel > .inq-help,
  .inq-panel > .inq-form-grid,
  .inq-panel > .inq-status-table,
  .inq-panel > .inq-summary,
  .inq-panel > .inq-actions,
  .inq-panel > div:not(.inq-title-wrap):not(.inq-container):not(.inq-purpose-group):not(.inq-alert):not(.inq-notice) {
    margin-left: 20px;
    margin-right: 20px;
  }

  .inq-container {
    padding: 16px 18px;
  }
}

@media (max-width: 420px) {
  .inq-shell {
    width: min(100% - 10px, 420px);
  }

  .inq-container,
  .inq-frame-attention,
  .inq-item,
  .inq-summary {
    padding: 11px;
  }

  .inq-title-wrap h1,
  .inq-panel > h2 {
    padding-left: 10px;
    padding-right: 10px;
  }

  .inq-item {
    grid-template-columns: 1fr;
  }

  .inq-item img,
  .inq-thumb-placeholder {
    width: 86px;
  }
}
