:root {
  color-scheme: light;
  --bg: #fbfcfb;
  --surface: #ffffff;
  --text: #243238;
  --muted: #65757d;
  --line: #d8e2e7;
  --line-strong: #b7c7cf;
  --mint: #eaf8f4;
  --mint-strong: #9edfcc;
  --blue: #d8ecff;
  --blue-strong: #9bc9f4;
  --yellow: #fff7d8;
  --yellow-strong: #ead578;
  --pink: #ffe5ec;
  --pink-strong: #f2a8bf;
  --lavender: #eee8ff;
  --lavender-strong: #c1b2f5;
  --accent: #376b78;
  --accent-dark: #244b55;
  --danger: #b34155;
  --shadow: 0 18px 45px rgba(52, 76, 88, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0, #fbfcfb 270px),
    var(--bg);
  color: var(--text);
  font-family:
    "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  line-height: 1.6;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 184px;
  gap: 24px;
  align-items: center;
  padding: 8px 0 28px;
}

.eyebrow,
.step-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 2rem;
  line-height: 1.25;
}

h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
  line-height: 1.35;
}

h3 {
  margin-bottom: 16px;
  font-size: 1.08rem;
}

.lead {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.mini-visual {
  display: grid;
  place-items: center;
}

.mini-visual svg {
  width: 160px;
  max-width: 100%;
}

.progress {
  margin-bottom: 22px;
}

.progress ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress li {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

.progress li.is-active {
  border-color: var(--accent);
  background: var(--mint);
  color: var(--accent-dark);
  font-weight: 700;
}

.progress li.is-done {
  border-color: var(--mint-strong);
  background: #f5fffc;
  color: var(--accent);
}

.chooser {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.result-page {
  display: grid;
  gap: 16px;
}

.result-page h1,
.result-page .lead {
  margin-bottom: 0;
}

.result-actions {
  justify-content: flex-start;
}

.is-success {
  color: var(--accent);
}

.is-error {
  color: var(--danger);
}

.step-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-dark);
  text-decoration: none;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: var(--accent);
}

.ghost-button[disabled] {
  cursor: default;
  opacity: 0.45;
}

.selection-path {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  min-height: 30px;
}

.selection-path[hidden] {
  display: none;
}

.selection-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
  color: var(--muted);
  font-size: 0.86rem;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.options-grid.has-step-notice {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-card {
  display: grid;
  grid-template-rows: auto auto;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.option-card:hover,
.option-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(55, 107, 120, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.option-card--text-only {
  grid-template-rows: 1fr;
  min-height: 96px;
  padding: 24px;
  place-items: center;
  text-align: center;
}

.option-card--text-only .option-title {
  margin-bottom: 0;
  font-size: 1.22rem;
}

.option-card--image-only {
  grid-template-rows: auto;
}

.option-card--image-only .option-visual {
  height: auto;
}

.option-card--natural-image .option-visual {
  aspect-ratio: auto;
}

.option-card.option-card--natural-image .option-visual img {
  height: auto;
}

.option-visual {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.95), transparent 34%),
    linear-gradient(135deg, #f7fbfa 0%, var(--mint) 100%);
  overflow: hidden;
}

.option-card .option-visual {
  min-height: 0;
}

.option-card[data-tone="blue"] .option-visual {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.95), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, var(--blue) 100%);
}

.option-card[data-tone="yellow"] .option-visual {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.95), transparent 34%),
    linear-gradient(135deg, #fffdf2 0%, var(--yellow) 100%);
}

.option-card[data-tone="pink"] .option-visual {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.95), transparent 34%),
    linear-gradient(135deg, #fff8fa 0%, var(--pink) 100%);
}

.option-card[data-tone="lavender"] .option-visual {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.95), transparent 34%),
    linear-gradient(135deg, #fbf9ff 0%, var(--lavender) 100%);
}

.option-visual svg {
  width: 100%;
  max-width: none;
  height: 100%;
}

.option-visual img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.option-card .option-visual img {
  width: 100%;
  max-width: none;
  height: 100%;
}

.option-title {
  display: block;
  margin-bottom: 4px;
  font-size: 1.06rem;
  font-weight: 700;
}

.option-detail {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.option-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 3px 12px;
  border: 1px solid #f0c56a;
  border-radius: 999px;
  background: #fff8e5;
  color: #7a4c00;
  font-size: 0.85rem;
  font-weight: 700;
}

.order-form {
  margin-top: 8px;
}

.product-result {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--mint-strong);
  border-radius: 8px;
  background: #f5fffc;
}

.product-result svg {
  width: 100%;
  height: 100%;
}

.result-label {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.result-name {
  margin: 0 0 8px;
  font-size: 1.35rem;
  line-height: 1.35;
}

.result-meta {
  margin: 0;
  color: var(--muted);
}

.result-price {
  display: inline-flex;
  margin: 4px 0 8px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--yellow);
  color: #6f5721;
  font-size: 0.9rem;
  font-weight: 700;
}

.shipping-notice {
  margin: -8px 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--mint-strong);
  border-radius: 8px;
  background: #f5fffc;
  color: var(--accent-dark);
  font-weight: 700;
}

.notice-box {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--yellow-strong);
  border-radius: 8px;
  background: #fffaf0;
  color: #6f5721;
}

.notice-box.is-danger {
  border-color: #e7a9b3;
  background: #fff5f7;
  color: var(--danger);
}

.step-notice {
  grid-column: 1 / -1;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 2px;
  padding: 16px 18px;
  border: 1px solid var(--yellow-strong);
  border-left: 6px solid var(--accent);
  border-radius: 8px;
  background: #fffaf0;
  color: #59481c;
  box-shadow: 0 10px 24px rgba(111, 87, 33, 0.08);
}

.step-notice-label {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.step-notice strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}

.step-notice p {
  margin-bottom: 0;
  color: #59481c;
}

.order-form .step-notice {
  margin-bottom: 18px;
}

.form-section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.field-note,
.mail-guide p {
  margin: -6px 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 6px;
}

label span {
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.field-label {
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.key-number-fieldset {
  display: grid;
  gap: 8px;
}

.key-number-inputs {
  display: grid;
  gap: 12px;
}

.key-number-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 150px);
  gap: 12px;
  align-items: end;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

input {
  min-height: 46px;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
  min-height: 118px;
  padding: 12px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(158, 223, 204, 0.45);
}

input.is-invalid,
textarea.is-invalid {
  border-color: var(--danger);
  outline: 3px solid rgba(179, 65, 85, 0.18);
}

.postal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.postal-search-button {
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f7faf9;
  color: var(--accent-dark);
  font-weight: 700;
}

.postal-search-button:hover,
.postal-search-button:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.postal-search-status {
  color: var(--muted);
  font-size: 0.86rem;
}

.postal-search-status.is-error {
  color: var(--danger);
}

.checkbox-field {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

.checkbox-field span {
  color: var(--text);
}

.terminal-panel {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: 18px 20px;
  border: 1px solid #e7a9b3;
  border-radius: 8px;
  background: #fff5f7;
}

.terminal-panel h3 {
  margin-bottom: 0;
  color: var(--danger);
}

.terminal-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.wide {
  grid-column: 1 / -1;
}

.submit-area {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.form-status {
  flex: 1;
  margin: 0;
  color: var(--muted);
}

.form-status.is-error {
  color: var(--danger);
}

.order-total-summary {
  display: grid;
  gap: 3px;
  min-width: 260px;
  padding: 12px 14px;
  border: 1px solid var(--yellow-strong);
  border-radius: 8px;
  background: #fffaf0;
  color: #59481c;
  box-shadow: 0 8px 18px rgba(111, 87, 33, 0.08);
}

.order-total-summary span {
  color: #6f5721;
  font-size: 0.86rem;
}

.order-total-summary strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.2;
}

.order-total-summary .order-total-title {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.submit-button {
  min-height: 50px;
  min-width: 170px;
  padding: 12px 22px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: var(--accent-dark);
  outline: none;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 24px;
  }

  .intro {
    grid-template-columns: 1fr;
    padding-bottom: 18px;
  }

  .mini-visual {
    justify-items: start;
  }

  h1 {
    font-size: 1.65rem;
  }

  h2 {
    font-size: 1.28rem;
  }

  .progress ol {
    grid-template-columns: 1fr 1fr;
  }

  .chooser {
    padding: 20px;
  }

  .step-head,
  .submit-area {
    display: grid;
  }

  .order-total-summary {
    width: 100%;
    min-width: 0;
  }

  .postal-row {
    grid-template-columns: 1fr;
  }

  .key-number-inputs {
    grid-template-columns: 1fr;
  }

  .key-number-row {
    grid-template-columns: 1fr;
  }

  .step-actions {
    justify-content: start;
  }

  .options-grid,
  .form-grid.two,
  .product-result {
    grid-template-columns: 1fr;
  }

  .options-grid.has-step-notice {
    grid-template-columns: 1fr;
  }

  .submit-button {
    width: 100%;
  }
}
