:root {
  --ink: #16181d;
  --muted: #6d7887;
  --paper: #f4f6f9;
  --panel: #ffffff;
  --line: #e6eaef;
  --line-soft: #f0f3f7;
  --nav-1: #1b1f27;
  --nav-2: #0d1015;
  --gold: #c8952e;
  --gold-soft: #f1c761;
  --gold-deep: #a7761d;
  --danger: #c9463c;
  --shadow: 0 8px 28px rgba(23, 31, 46, 0.07);
  --radius: 14px;
  --font-jp: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-en: "Oswald", "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-jp);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
label {
  -webkit-tap-highlight-color: transparent;
}

.order-page {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 0 16px 104px;
}

.order-page.narrow {
  width: min(600px, 100%);
}

/* ---------- Hero ---------- */
.customer-hero {
  display: grid;
  gap: 14px;
  margin: 0 -16px 24px;
  padding: 36px 22px 28px;
  color: #fff;
  background:
    radial-gradient(600px 240px at 85% -40%, rgba(200, 149, 46, 0.35), transparent 70%),
    linear-gradient(160deg, var(--nav-1), var(--nav-2));
  border-bottom: 1px solid rgba(241, 199, 97, 0.35);
}

.customer-hero.compact {
  padding-top: 30px;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #1a1408;
  background: linear-gradient(150deg, var(--gold-soft), var(--gold));
  box-shadow: 0 6px 16px rgba(200, 149, 46, 0.4);
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

h1 {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.customer-hero h1::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 14px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
}

h2 {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.facility-chip {
  width: fit-content;
  border: 1px solid rgba(241, 199, 97, 0.4);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--gold-soft);
  background: rgba(241, 199, 97, 0.08);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---------- Sections ---------- */
.form-section,
.empty-state,
.complete-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.form-section {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
  padding: 22px 20px 24px;
}

.section-heading {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.section-heading > span {
  color: var(--gold);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-heading h2 {
  font-weight: 900;
}

/* ---------- Design cards ---------- */
.design-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.design-card {
  position: relative;
  display: grid;
  gap: 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 10px 12px;
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.design-card input,
.choice-button input,
.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.design-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 9px;
  background: var(--line-soft);
}

.design-card strong {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
}

.design-card::after {
  content: "✓";
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #1a1408;
  background: linear-gradient(150deg, var(--gold-soft), var(--gold));
  box-shadow: 0 4px 10px rgba(20, 14, 2, 0.35);
  font-size: 15px;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.design-card:has(input:checked) {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 149, 46, 0.16), var(--shadow);
  transform: translateY(-2px);
}

.design-card:has(input:checked)::after {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Choice buttons ---------- */
.button-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.choice-button,
.segmented label {
  position: relative;
  cursor: pointer;
}

.choice-button span,
.segmented span {
  display: grid;
  place-items: center;
  min-height: 50px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: border-color 0.13s ease, background 0.13s ease, color 0.13s ease;
}

.segmented span {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.choice-button input:checked + span,
.segmented input:checked + span {
  border-color: var(--gold-deep);
  color: #1a1408;
  background: linear-gradient(150deg, var(--gold-soft), var(--gold));
  box-shadow: 0 6px 14px rgba(200, 149, 46, 0.3);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sleeve-note {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

/* ---------- Fields ---------- */
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--panel);
  padding: 0 14px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: border-color 0.13s ease, box-shadow 0.13s ease;
}

textarea {
  min-height: 96px;
  padding-top: 13px;
  line-height: 1.65;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 149, 46, 0.15);
}

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

/* ---------- BASE guide ---------- */
.base-guide {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  padding: 22px 20px;
  border: 1px solid rgba(241, 199, 97, 0.4);
  border-radius: var(--radius);
  color: #fff;
  background:
    radial-gradient(400px 180px at 90% -30%, rgba(200, 149, 46, 0.3), transparent 70%),
    linear-gradient(160deg, var(--nav-1), var(--nav-2));
}

.base-guide-label {
  color: var(--gold-soft);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.base-guide h3 {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.base-guide > p:not(.base-guide-label) {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.75;
}

.base-links {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.base-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border: 1px solid rgba(241, 199, 97, 0.35);
  border-radius: 11px;
  padding: 0 16px;
  color: var(--gold-soft);
  background: rgba(241, 199, 97, 0.07);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.base-links a::after {
  content: "→";
  font-family: var(--font-en);
}

.base-links a:hover {
  border-color: var(--gold-soft);
  background: rgba(241, 199, 97, 0.14);
}

/* ---------- Submit bar ---------- */
.submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 24px -16px -104px;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(241, 199, 97, 0.35);
  background: rgba(13, 16, 21, 0.97);
  backdrop-filter: blur(8px);
  color: #fff;
}

.submit-bar span {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.submit-bar strong {
  display: block;
  margin-top: 2px;
  color: var(--gold-soft);
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

/* ---------- Buttons ---------- */
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: 12px;
  padding: 0 22px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.primary-button {
  border: 1px solid var(--gold-deep);
  color: #1a1408;
  background: linear-gradient(150deg, var(--gold-soft), var(--gold));
  box-shadow: 0 8px 20px rgba(200, 149, 46, 0.32);
}

.primary-button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(200, 149, 46, 0.28);
}

.ghost-button {
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: var(--panel);
}

/* ---------- Feedback ---------- */
.error-box {
  border: 1px solid rgba(201, 70, 60, 0.3);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #fff5f4;
  color: #9b2d26;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.7;
}

.error-box p + p {
  margin-top: 6px;
}

.empty-state,
.complete-card {
  display: grid;
  gap: 12px;
  padding: 28px 24px;
}

.complete-card {
  margin-bottom: 20px;
  text-align: center;
  border-top: 3px solid var(--gold);
}

.complete-card span {
  color: var(--muted);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.complete-card strong {
  color: var(--gold-deep);
  font-family: var(--font-en);
  font-size: clamp(30px, 9vw, 46px);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.complete-card p {
  font-size: 14px;
  font-weight: 500;
}

.line-list {
  display: grid;
  gap: 10px;
}

.line-list div {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 11px;
  padding: 13px 15px;
  background: #fffdf8;
}

.line-list strong,
.line-list span {
  display: block;
}

.line-list strong {
  font-size: 14px;
  font-weight: 700;
}

.line-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.payment-guide p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

.payment-links,
.page-actions {
  display: grid;
  gap: 10px;
}

.status-form {
  margin-bottom: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
  .order-page {
    padding-inline: 13px;
  }

  .customer-hero,
  .submit-bar {
    margin-inline: -13px;
  }

  h1 {
    font-size: 23px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .submit-bar .primary-button {
    min-width: 158px;
    padding-inline: 16px;
  }
}

/* ==========================================================
   デモ用テーマ切替（?theme=b / ?theme=c）
   採用決定後は選ばれたテーマを標準化し、この切替は削除する
   ========================================================== */

/* ---------- B案: 白×ゴールド（明るく親しみ） ---------- */
.theme-b .customer-hero {
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #fbf3dd);
  border-bottom: 2px solid var(--gold);
}

.theme-b .brand-line {
  color: var(--gold-deep);
}

.theme-b .customer-hero h1,
.theme-b .customer-hero p {
  color: var(--ink);
}

.theme-b .facility-chip {
  color: var(--gold-deep);
  border-color: rgba(200, 149, 46, 0.45);
  background: rgba(200, 149, 46, 0.1);
}

/* ---------- C案: 黒×ネオン（スポーティ・勢い） ---------- */
.theme-c {
  --paper: #0b0f14;
  --panel: #151b23;
  --ink: #e9eff6;
  --muted: #93a1b3;
  --line: #27303c;
  --line-soft: #1b232d;
  --nav-1: #10151c;
  --nav-2: #05080c;
  --gold: #22dd88;
  --gold-soft: #63f2ae;
  --gold-deep: #14b56b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.theme-c .choice-button input:checked + span,
.theme-c .segmented input:checked + span,
.theme-c .primary-button,
.theme-c .design-card::after {
  color: #04130b;
}

.theme-c .line-list div {
  background: rgba(34, 221, 136, 0.06);
}

.theme-c .error-box {
  background: rgba(201, 70, 60, 0.16);
  color: #ff9d94;
}

.theme-c .submit-bar {
  border-top-color: rgba(99, 242, 174, 0.35);
  background: rgba(5, 8, 12, 0.97);
}

.theme-c .customer-hero {
  border-bottom-color: rgba(99, 242, 174, 0.35);
}

.theme-c .facility-chip {
  color: var(--gold-soft);
  border-color: rgba(99, 242, 174, 0.4);
  background: rgba(34, 221, 136, 0.1);
}
