/* Colors and fonts come from /theme.css (src/theme.ts). */
:root { --wrap: 1080px; --gutter: clamp(20px, 5vw, 48px); --ease: cubic-bezier(.2, .7, .2, 1); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 var(--font-sans); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; margin: 0 0 12px; }
h2 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.1; margin: 0 0 10px; }
h3 { font-size: 21px; line-height: 1.2; margin: 0 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--link); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 560px; }
main { padding-top: clamp(16px, 4vw, 40px); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 22px; padding-bottom: 8px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-logo); font-size: 21px; text-decoration: none; color: var(--ink); }
.wordmark-bear { width: 34px; height: 34px; flex: none; }
.wordmark-accent { color: var(--accent); }
.top nav { display: flex; gap: 20px; align-items: center; }
.top nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; }
.top nav a:hover { text-decoration: underline; }

.card { background: var(--surface); border-radius: 18px; padding: clamp(18px, 3vw, 28px); box-shadow: 0 24px 60px -30px rgba(35,32,28,.45), 0 1px 0 rgba(35,32,28,.06); }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.field { display: grid; gap: 6px; }
.field > span, .field legend { font-weight: 600; font-size: 14px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="number"], .field select, .field textarea { font: inherit; font-size: 17px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--link); outline: none; box-shadow: 0 0 0 3px rgba(47,111,176,.18); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.hint { font-size: 13px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; }
.chips span { display: block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 500; font-size: 15px; }
.chips input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.chips input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 3px; }

.button { display: inline-block; font: inherit; font-weight: 600; padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; text-align: center; text-decoration: none; transition: transform .12s var(--ease), background .12s; }
.button.primary { background: var(--accent); color: var(--surface); font-size: 17px; padding: 14px 24px; }
.button.primary:hover { background: #c9432f; transform: translateY(-1px); }
.button.primary:disabled { opacity: .6; cursor: wait; transform: none; }
.button.secondary { background: #fff; border-color: var(--ink); color: var(--ink); }
.button.secondary:hover { background: var(--ink); color: var(--surface); }
.button.quiet { background: transparent; color: var(--ink); text-decoration: underline; padding: 6px 4px; }
.fine { color: var(--muted); font-size: 13px; line-height: 1.5; }
.error { color: var(--accent); font-size: 14px; font-weight: 600; }
.notice { background: var(--wash); border-radius: 12px; padding: 12px 16px; }

.spinner { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(35,32,28,.18); border-top-color: var(--accent); animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.bottom { display: flex; flex-direction: column; gap: 8px; margin-top: clamp(40px, 7vw, 80px); padding-top: 24px; padding-bottom: 40px; border-top: 1.5px solid var(--line); color: var(--muted); font-size: 13px; }
.bottom p { margin: 0; }
.bottom nav a + a::before { content: "·"; display: inline-block; margin: 0 9px; }
.bottom a { color: inherit; }

.step { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0; }
.lead { font-size: 18px; color: var(--muted); max-width: 60ch; }

.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.style-card { position: relative; cursor: pointer; }
.style-card input { position: absolute; opacity: 0; inset: 0; }
.style-face { display: grid; gap: 4px; background: var(--surface); border: 2px solid transparent; border-radius: 16px; padding: 8px 8px 12px; box-shadow: 0 10px 30px -22px rgba(35,32,28,.5); transition: transform .12s var(--ease); }
.style-face img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; }
.style-name { font-family: var(--font-display); font-size: 19px; padding: 4px 4px 0; }
.style-blurb { font-size: 13px; color: var(--muted); padding: 0 4px; }
.style-card input:checked + .style-face { border-color: var(--accent); transform: translateY(-2px); }
.style-card input:focus-visible + .style-face { outline: 3px solid var(--link); outline-offset: 3px; }

.members { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.member { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; }
.member-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; background: #EDEBE6; }
.member-head { justify-content: space-between; }
.member-head h3 { margin: 0; }
.member-type { font-size: 13px; background: var(--wash); border-radius: 999px; padding: 3px 10px; }
.member-age input { max-width: 110px; }
.member-status { font-size: 14px; color: var(--muted); margin: 0; }
.member-remove { justify-self: start; font-size: 14px; color: var(--muted); }
@media (max-width: 520px) { .member { grid-template-columns: 1fr; } .member-photo { width: 100%; height: auto; aspect-ratio: 1; } }

.add-member h2 { margin: 0; }
.photo-pick input[type="file"] { font: inherit; }
.photo-preview img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; }
.reveal-bar { position: sticky; bottom: 0; padding: 14px 0 18px; background: linear-gradient(transparent, var(--bg) 35%); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.hero-card { display: grid; gap: 8px; }
.hero-frame { position: relative; background: #EDEBE6; border-radius: 18px; overflow: hidden; aspect-ratio: 1; box-shadow: 0 18px 40px -26px rgba(35,32,28,.55); }
.hero-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-frame img.is-waiting { filter: blur(6px) saturate(.6); opacity: .55; transform: scale(1.06); }
.hero-busy { position: absolute; inset: auto 0 0 0; padding: 10px 12px; background: rgba(255,253,247,.9); font-size: 14px; font-weight: 600; }
.hero-name { text-align: center; margin: 4px 0 0; }
.hero-fix summary { cursor: pointer; font-size: 14px; color: var(--muted); text-align: center; }
.hero-fix form { margin-top: 10px; }
.style-switch select { max-width: 260px; }
.button.is-disabled { opacity: .5; cursor: wait; }

.cast-top { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
.cast-picture img, .picture-wait { width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: 18px; box-shadow: 0 30px 60px -34px rgba(35,32,28,.6); }
.picture-wait { display: grid; place-content: center; gap: 8px; background: var(--highlight); font-weight: 600; text-align: center; }
.cast-members { margin-top: clamp(32px, 6vw, 64px); }
@media (max-width: 720px) { .cast-top { grid-template-columns: 1fr; } }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.theme-card { position: relative; }
.theme-card input { position: absolute; opacity: 0; inset: 0; }
.theme-card span { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 14px 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; font-weight: 600; font-size: 15px; cursor: pointer; }
.theme-card b { font-size: 30px; line-height: 1; font-weight: 400; }
.theme-card input:checked + span { border-color: var(--accent); background: var(--wash); }
.theme-card input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 3px; }

.adventure-head { margin-bottom: 24px; }
.writing { text-align: left; }
.buy { max-width: 620px; }
.buy-head { justify-content: space-between; }
.buy-head h2 { margin: 0; }
.price { font-family: var(--font-display); font-size: 28px; }
.redraw { position: absolute; right: 10px; bottom: 10px; font: inherit; font-size: 13px; font-weight: 600; border: 0; border-radius: 999px; padding: 7px 12px; background: rgba(255,253,247,.92); cursor: pointer; opacity: 0; transition: opacity .15s; }
.pic:hover .redraw, .redraw:focus-visible, .redraw[data-sure] { opacity: 1; }
@media (hover: none) { .redraw { opacity: 1; } }

.adv-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.adv { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; background: var(--surface); border-radius: 14px; padding: 10px; text-decoration: none; color: var(--ink); box-shadow: 0 10px 30px -24px rgba(35,32,28,.5); }
.adv img, .adv-emoji { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; display: grid; place-content: center; font-size: 34px; background: var(--wash); }
.adv b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 18px; line-height: 1.15; }
.adv small { color: var(--muted); }
.cast-adventures { margin-top: clamp(32px, 6vw, 64px); }

.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.poster-pick { position: relative; }
.poster-pick input { position: absolute; opacity: 0; inset: 0; }
.poster-pick span { display: grid; gap: 6px; background: #fff; border: 2px solid transparent; border-radius: 12px; padding: 6px; cursor: pointer; }
.poster-pick img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; }
.poster-pick small { font-size: 13px; color: var(--muted); }
.poster-pick input:checked + span { border-color: var(--accent); }
.poster-pick input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 3px; }

.account-orders, .account-settings { margin-top: clamp(32px, 6vw, 56px); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border-radius: 12px; overflow: hidden; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(36px, 5.4vw, 58px); }
.hero-picture { margin: 0; }
.hero-picture img { width: 100%; height: auto; border-radius: 18px; transform: rotate(2deg); box-shadow: 0 34px 70px -36px rgba(35,32,28,.7); }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero-picture { max-width: 420px; } }
.block { margin-top: clamp(48px, 8vw, 96px); }
.sub { color: var(--muted); max-width: 60ch; margin: 0; }

.before-after { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.before-after figure { margin: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; background: var(--surface); border-radius: 16px; padding: 10px; }
.before-after img { width: 100%; height: auto; border-radius: 10px; }
.before-after span { font-size: 22px; color: var(--accent); font-weight: 700; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--highlight); font-family: var(--font-display); font-size: 20px; }
.steps p { margin: 4px 0 0; color: var(--muted); }

.style-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.style-strip figure { margin: 0; display: grid; gap: 6px; }
.style-strip img { width: 100%; height: auto; border-radius: 12px; }
.style-strip figcaption { font-family: var(--font-display); text-align: center; }

.theme-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.theme-chips li { background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 500; }

.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.price-cards h3 { margin: 0; }
.price-cards p { margin: 0; }

.faq details { border-top: 1.5px solid var(--line); padding: 14px 16px; background: var(--surface); max-width: 70ch; }
.faq details:last-of-type { border-bottom: 1.5px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; }

.legal { max-width: 70ch; }
.legal h2 { font-size: 22px; margin: 18px 0 4px; }
.photo-pick input[type="file"]::file-selector-button { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); margin-right: 12px; cursor: pointer; }
