:root {
  color-scheme: light;
  --plum-950: #251020;
  --plum-800: #4d1943;
  --plum-700: #652456;
  --plum-100: #f3e5ef;
  --rose-50: #fff9fc;
  --ivory: #fffdf9;
  --ink: #261c24;
  --muted: #675d65;
  --border: #dfd2da;
  --success: #22613f;
  --danger: #a22a43;
  --focus: #1769aa;
  --shadow: 0 22px 70px rgba(66, 24, 56, 0.13);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: #f7f0f5; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 10% 18%, #f7dfec 0 8%, transparent 30%), radial-gradient(circle at 90% 40%, #ead8ef 0 7%, transparent 28%), linear-gradient(145deg, #fffafc, #f5edf3 50%, #fffaf7); min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
a { color: var(--plum-700); }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 12px 16px; background: white; color: var(--plum-950); border-radius: 10px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.product-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px clamp(18px, 4vw, 56px); border-bottom: 1px solid rgba(77, 25, 67, 0.13); background: rgba(255, 253, 250, 0.9); backdrop-filter: blur(22px) saturate(130%); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--plum-950); text-decoration: none; min-height: 48px; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; color: white; font: 600 25px Georgia, serif; border-radius: 13px; background: linear-gradient(145deg, #7b346c, #35112f); box-shadow: 0 8px 20px rgba(53, 17, 47, 0.26); }
.brand span:last-child { display: grid; }
.brand strong { font-size: 1rem; }
.brand small { color: var(--muted); font-size: 0.76rem; }
.product-header nav { display: flex; align-items: center; gap: 4px; }
.product-header nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; color: #4e414b; text-decoration: none; font-weight: 650; border-radius: 999px; white-space: nowrap; }
.product-header nav a:hover, .product-header nav a[aria-current="page"] { color: var(--plum-950); background: var(--plum-100); }

main { width: min(1440px, 100%); margin: 0 auto; padding: clamp(26px, 5vw, 64px) clamp(16px, 4vw, 58px) 72px; }
#order-main:focus, .step-heading h2[tabindex="-1"]:focus { outline: none; }
.flow-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; max-width: 1180px; margin: 0 auto 28px; }
.flow-heading h1 { margin: 4px 0 8px; max-width: 760px; font: 700 clamp(2rem, 4.2vw, 4.2rem)/1.02 Georgia, "Times New Roman", serif; letter-spacing: -0.035em; color: var(--plum-950); }
.flow-heading p { margin: 0; color: var(--muted); line-height: 1.55; }
.eyebrow, .preview-label { color: #8b5611 !important; font-size: 0.76rem; font-weight: 850; letter-spacing: 0.14em; }
.privacy-chip { flex: 0 0 auto; padding: 12px 16px; border: 1px solid #bfd9c8; border-radius: 999px; background: #f2fbf5; color: var(--success) !important; font-weight: 700; font-size: 0.87rem; }
.membership-access { display: flex; max-width: 1180px; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; margin: 0 auto 18px; border: 1px solid rgba(124,82,18,.24); border-radius: 18px; color: #64430f; background: rgba(255,244,214,.76); box-shadow: 0 10px 28px rgba(58,25,51,.08); }
.membership-access strong { display: block; }
.membership-access p { margin: 4px 0 0; color: inherit; font-size: .84rem; line-height: 1.45; }
.membership-access a { flex: 0 0 auto; min-height: 44px; padding: 12px 14px; border: 1px solid currentColor; border-radius: 14px; color: inherit; font-size: .8rem; font-weight: 800; text-align: center; text-decoration: none; }
.membership-access[data-state="active"] { color: #185f43; border-color: rgba(31,110,81,.22); background: rgba(230,245,237,.84); }
.membership-access[data-state="error"] { color: #81263a; border-color: rgba(151,44,66,.22); background: rgba(255,232,239,.82); }

.stepper { max-width: 1180px; margin: 0 auto 24px; padding: 7px; display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; border: 1px solid rgba(77,25,67,.12); border-radius: 20px; background: rgba(255,255,255,.64); box-shadow: 0 12px 35px rgba(73,31,62,.07); }
.stepper button { width: 100%; min-height: 50px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-weight: 750; cursor: pointer; }
.stepper button span { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 7px; border: 1px solid #cbb9c5; border-radius: 50%; }
.stepper li[aria-current="step"] button { color: white; background: linear-gradient(135deg, var(--plum-800), var(--plum-700)); box-shadow: 0 8px 20px rgba(77,25,67,.18); }
.stepper li[aria-current="step"] button span { border-color: rgba(255,255,255,.75); }

.error-summary { max-width: 1180px; margin: 0 auto 20px; padding: 16px 18px; border: 2px solid #d05b70; border-radius: 16px; background: #fff2f4; color: #75172b; }
.error-summary ul { margin: 8px 0 0; padding-left: 22px; }

.order-workspace { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(340px, 0.82fr) minmax(520px, 1.35fr); gap: clamp(24px, 4vw, 50px); align-items: start; }
.preview-sticky { position: sticky; top: 104px; }
.preview-label { margin: 0 0 10px; }
.large-card { aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: center; min-height: 500px; padding: clamp(30px, 5vw, 58px); border-radius: 32px; overflow: hidden; position: relative; box-shadow: var(--shadow); isolation: isolate; background-color: #fff9f4; background-position: center; background-repeat: no-repeat; background-size: cover; }
#fallback-preview-copy { display: contents; }
.large-card.signature-template-preview { aspect-ratio: 5 / 7; min-height: 0; padding: 0; background: #f7edf4; }
.large-card.signature-template-preview::before,
.large-card.signature-template-preview::after { display: none; }
#signature-preview-image { width: 100%; height: auto; object-fit: contain; display: block; }
#signature-preview-image[hidden] { display: none; }
.large-card::before, .large-card::after { content: ""; position: absolute; pointer-events: none; }
.large-card::before { z-index: -1; inset: 13% 9%; border: 1px solid rgba(255,255,255,.52); border-radius: 26px; background: rgba(255,252,248,.58); box-shadow: 0 22px 60px rgba(45,20,38,.08); backdrop-filter: blur(2px); }
.large-card::after { z-index: 2; inset: 18px; border: 1px solid rgba(255,255,255,.62); border-radius: 23px; }
.design-aurora-bloom { color: #351329; background-color: #f8e9f2; background-image: linear-gradient(90deg, rgba(255,250,246,.16), rgba(255,250,246,.9) 23%, rgba(255,250,246,.94) 77%, rgba(255,250,246,.12)), url("../card-art/aurora-bloom.jpg"); }
.design-midnight-gold { color: #fff8e6; background-color: #1d1728; background-image: linear-gradient(90deg, rgba(22,11,28,.18), rgba(22,11,28,.88) 23%, rgba(22,11,28,.9) 77%, rgba(22,11,28,.16)), url("../card-art/midnight-gold.jpg"); }
.design-midnight-gold.large-card::before { border-color: rgba(224,185,93,.26); background: rgba(22,11,28,.58); }
.design-paper-garden { color: #17392d; background-color: #edf6ef; background-image: linear-gradient(90deg, rgba(255,253,244,.1), rgba(255,253,244,.9) 23%, rgba(255,253,244,.94) 77%, rgba(255,253,244,.1)), url("../card-art/paper-garden.jpg"); }
.card-motif { position: absolute; top: 28px; left: 32px; font-size: 2rem; }
.card-occasion { margin: 0 0 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .77rem; }
.large-card h2 { margin: 0 0 22px; font: 700 clamp(2rem, 3.2vw, 3.4rem)/1.03 Georgia, serif; letter-spacing: -.03em; }
.large-card > p:not(.card-occasion):not(.card-signature) { font: 400 clamp(1rem, 1.35vw, 1.18rem)/1.65 Georgia, serif; }
.card-signature { margin-top: 24px; font-weight: 750; }
.preview-facts { display: grid; gap: 8px; padding: 18px 6px 0; color: var(--muted); font-size: .88rem; }
.preview-facts span { display: flex; justify-content: space-between; gap: 15px; }
.preview-facts strong { color: var(--plum-800); }

.flow-card { min-width: 0; border: 1px solid rgba(77,25,67,.12); border-radius: 30px; background: rgba(255,253,250,.88); box-shadow: var(--shadow); overflow: clip; backdrop-filter: blur(16px); }
.step-panel { padding: clamp(26px, 4vw, 48px); }
.step-heading { margin-bottom: 28px; }
.step-heading p { margin: 0 0 6px; color: #8b5611; font-weight: 850; font-size: .77rem; letter-spacing: .1em; text-transform: uppercase; }
.step-heading h2 { margin: 0 0 8px; font: 700 clamp(1.75rem, 3vw, 2.7rem)/1.08 Georgia, serif; color: var(--plum-950); }
.step-heading span { color: var(--muted); line-height: 1.55; }

label, legend { color: #3d303a; font-weight: 750; }
label { display: grid; gap: 8px; }
.optional { color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; min-height: 50px; border: 1.5px solid #cbbdc6; border-radius: 13px; background: white; color: var(--ink); padding: 12px 14px; }
textarea { resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: #9d7d92; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #62a7df; outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 2px; border-color: var(--focus); }
[aria-invalid="true"] { border-color: var(--danger); background: #fff7f8; }
.field-help { color: var(--muted); font-size: .79rem; font-weight: 500; line-height: 1.45; }
.field-grid { display: grid; gap: 20px; margin-bottom: 22px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid .wide { grid-column: 1 / -1; }
fieldset { margin: 0 0 24px; padding: 0; border: 0; }
legend { margin-bottom: 12px; }
.choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.channel-row { grid-template-columns: repeat(3, minmax(0,1fr)); }
.choice-row label, .choice-stack label { display: flex; align-items: flex-start; min-height: 74px; padding: 14px; border: 1.5px solid #d9ccd5; border-radius: 15px; background: white; cursor: pointer; }
.choice-row input, .choice-stack input, .check-row input, .design-choice input { width: 21px; min-height: 21px; height: 21px; flex: 0 0 auto; margin: 2px 11px 0 0; accent-color: var(--plum-700); }
.choice-row span, .choice-stack span { display: grid; gap: 4px; }
.choice-row small, .choice-stack small { color: var(--muted); font-weight: 500; line-height: 1.35; }
.choice-row label:has(input:checked), .choice-stack label:has(input:checked) { border-color: var(--plum-700); box-shadow: 0 0 0 2px rgba(101,36,86,.1); background: #fffafd; }
.choice-stack { display: grid; gap: 10px; }
.unavailable { opacity: .78; background: #f7f3f5 !important; cursor: not-allowed !important; }
.phone-field { display: grid; grid-template-columns: minmax(130px,.42fr) minmax(220px,1fr); gap: 14px; margin-bottom: 12px; }
.notice { margin: 0 0 22px; padding: 13px 15px; color: #51434d; background: #f4edf2; border-radius: 13px; line-height: 1.5; font-size: .88rem; }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; font-weight: 600; line-height: 1.45; }

.design-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.collection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.collection-toolbar p { margin: 0; color: var(--muted); line-height: 1.45; }
.button.compact { min-height: 44px; padding-inline: 15px; white-space: nowrap; }
.card-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 12px; margin: 0 0 16px; padding: 14px; border-radius: 16px; background: #f7eff5; }
.card-filters .button { margin: 0; }
.design-choice { position: relative; display: block; cursor: pointer; }
.design-choice input { position: absolute; top: 12px; left: 12px; z-index: 2; }
.mini-card { aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: end; min-height: 185px; padding: 18px; border: 2px solid transparent; border-radius: 18px; box-shadow: 0 8px 22px rgba(55,25,48,.1); background-position: center; background-repeat: no-repeat; background-size: cover; }
.mini-card.design-aurora-bloom { background-image: linear-gradient(to top, rgba(255,248,244,.97) 0 34%, rgba(255,248,244,.52) 51%, transparent 72%), url("../card-art/aurora-bloom-thumb.jpg"); }
.mini-card.design-midnight-gold { background-image: linear-gradient(to top, rgba(23,12,29,.97) 0 34%, rgba(23,12,29,.58) 51%, transparent 72%), url("../card-art/midnight-gold-thumb.jpg"); }
.mini-card.design-paper-garden { background-image: linear-gradient(to top, rgba(255,253,244,.97) 0 34%, rgba(255,253,244,.52) 51%, transparent 72%), url("../card-art/paper-garden-thumb.jpg"); }
.design-choice input:checked + .mini-card { border-color: var(--plum-700); box-shadow: 0 0 0 3px rgba(101,36,86,.13), 0 12px 24px rgba(55,25,48,.13); }
.mini-card b { margin-bottom: auto; font-size: 1.4rem; }
.mini-card small { margin-top: 5px; opacity: .82; font-weight: 550; }
.signature-choice { min-width: 0; }
.signature-choice input { top: 10px; left: 10px; width: 24px; height: 24px; margin: 0; accent-color: var(--plum-700); }
.signature-mini-card { aspect-ratio: auto; min-height: 0; padding: 0; overflow: hidden; justify-content: flex-start; background: white; }
.signature-mini-card img { display: block; width: 100%; aspect-ratio: 5 / 7; object-fit: cover; background: #f5edf3; }
.card-choice-copy { display: grid; gap: 3px; padding: 12px 13px 14px; }
.card-choice-copy strong { color: var(--ink); line-height: 1.2; }
.card-choice-copy small { color: var(--muted); line-height: 1.3; }
.recommendation-slot { position: absolute; z-index: 1; top: 10px; right: 8px; max-width: calc(100% - 54px); padding: 5px 8px; border-radius: 999px; color: #4a213f; background: rgba(255,253,249,.91); box-shadow: 0 4px 12px rgba(46,20,39,.12); font-size: .64rem; font-weight: 800; text-align: right; }
.card-skeleton { aspect-ratio: 5 / 7; border-radius: 18px; background: linear-gradient(100deg,#f1e5ed 25%,#fbf6f9 42%,#f1e5ed 60%); background-size: 220% 100%; animation: card-shimmer 1.25s ease-in-out infinite; }
@keyframes card-shimmer { to { background-position-x: -220%; } }
.message-tools { display: grid; gap: 12px; margin-top: 24px; }
.message-options { display: grid; gap: 10px; margin-top: 14px; }
.message-options button { text-align: left; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: white; color: var(--ink); cursor: pointer; line-height: 1.45; }
.message-options button:hover { border-color: var(--plum-700); }

.review-sections { display: grid; gap: 14px; }
.review-sections > section { padding: 19px; border: 1px solid var(--border); border-radius: 16px; background: white; }
.review-sections header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-sections h3 { margin: 0; font-size: 1rem; }
.review-sections header button { min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; color: var(--plum-700); background: transparent; font-weight: 750; cursor: pointer; }
.review-sections dl { margin: 14px 0 0; }
.review-sections dl > div { display: flex; justify-content: space-between; gap: 22px; padding: 7px 0; }
.review-sections dt { color: var(--muted); }
.review-sections dd { margin: 0; text-align: right; font-weight: 700; overflow-wrap: anywhere; }
.review-sections dd.message { max-width: 68%; font-weight: 500; line-height: 1.45; }
.review-design-proof { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; margin-top: 14px; padding: 12px; border: 1px solid #d8c7d2; border-radius: 15px; background: linear-gradient(135deg,#fffafc,#f5ebf2); }
.review-design-proof img { display: block; width: 88px; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 11px; box-shadow: 0 8px 20px rgba(55,25,48,.14); }
.review-design-proof div { display: grid; gap: 4px; }
.review-design-proof span { color: #7c4b0c; font-size: .66rem; font-weight: 850; letter-spacing: .1em; }
.review-design-proof strong { color: var(--plum-950); font: 700 1.12rem/1.2 Georgia,serif; }
.review-design-proof small { color: var(--muted); line-height: 1.4; }
.price-summary .total { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 1.1rem; }
.confirm { margin-top: 22px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: #fffafd; }
.launch-gate { margin-top: 16px; padding: 16px; border-radius: 14px; background: #f4edf2; }
.launch-gate p { margin: 5px 0 0; color: var(--muted); line-height: 1.45; }

.step-actions { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; justify-content: flex-end; padding: 18px clamp(26px,4vw,48px) max(18px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(77,25,67,.12); background: rgba(255,253,250,.94); backdrop-filter: blur(18px); }
.button { min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: 13px; font-weight: 800; cursor: pointer; }
.button.primary { color: white; background: linear-gradient(135deg, var(--plum-800), var(--plum-700)); box-shadow: 0 10px 22px rgba(77,25,67,.22); }
.button.secondary { color: var(--plum-800); border-color: #cdb9c7; background: white; }
.button.ghost { color: #51434d; background: transparent; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; transform: none; box-shadow: none; }
.form-status { min-height: 24px; margin: 0; padding: 0 48px 18px; color: var(--success); font-weight: 700; text-align: right; }

@media (max-width: 980px) {
  .product-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .product-header nav { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .order-workspace { grid-template-columns: 1fr; }
  .preview-column { order: 2; }
  .flow-card { order: 1; }
  .order-workspace[data-step="3"] .preview-column { order: 1; }
  .order-workspace[data-step="3"] .flow-card { order: 2; }
  .preview-sticky { position: static; display: grid; grid-template-columns: minmax(260px, .75fr) 1fr; gap: 20px; align-items: center; }
  .preview-label { grid-column: 1 / -1; }
  .large-card { min-height: 390px; }
}

@media (max-width: 680px) {
  main { padding: 24px 12px 48px; }
  .product-header { padding: 10px 14px; }
  .brand small { display: none; }
  .product-header nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .product-header nav a { justify-content: center; padding: 0 6px; font-size: .76rem; text-align: center; }
  .flow-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .membership-access { align-items: stretch; flex-direction: column; }
  .privacy-chip { width: 100%; border-radius: 14px; }
  .stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
  .stepper li { min-width: 0; }
  .stepper button { width: 100%; padding: 5px 2px; display: grid; place-items: center; align-content: center; font-size: .65rem; }
  .stepper button span { margin: 0 0 2px; }
  .order-workspace { gap: 18px; }
  .preview-sticky { display: block; }
  .order-workspace[data-step="3"] .preview-sticky { display: block; }
  .order-workspace[data-step="3"] .preview-label { text-align: center; }
  .order-workspace[data-step="3"] .large-card { width: min(300px, 100%); margin-inline: auto; min-height: 0; scroll-margin-top: 185px; }
  .large-card { min-height: 440px; border-radius: 24px; }
  .preview-facts { display: none; }
  .order-workspace[data-step="3"] .preview-facts { display: flex; justify-content: center; gap: 24px; padding: 14px 0 0; font-size: .78rem; }
  .order-workspace[data-step="3"] .preview-facts span { display: grid; gap: 2px; }
  .flow-card { border-radius: 22px; }
  .step-panel { padding: 24px 18px 28px; }
  .field-grid.two, .choice-row, .channel-row, .design-grid, .phone-field { grid-template-columns: 1fr; }
  .signature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-filters { grid-template-columns: 1fr 1fr; }
  .card-filters .button { grid-column: 1 / -1; }
  .mini-card { aspect-ratio: auto; min-height: 120px; }
  .step-actions { justify-content: stretch; padding: 12px 14px max(12px, env(safe-area-inset-bottom)); }
  .step-actions .button { flex: 1; padding-inline: 12px; }
  .step-actions .button.ghost { flex: .65; }
  .form-status { padding-inline: 18px; text-align: left; }
  .review-sections dd.message { max-width: 58%; }
  .review-design-proof { grid-template-columns: 72px 1fr; }
  .review-design-proof img { width: 72px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (prefers-contrast: more) { input, select, textarea, .flow-card, .review-sections > section { border-color: currentColor; } }
@media (forced-colors: active) { .button, .stepper li[aria-current="step"] button, .large-card { border: 2px solid ButtonText; } }
