/* DoTarot Intention V2 — Creative Studio.
   Scoped to / pages only (own files, own class names); shares nothing with V1's intention.css.
   Brand anchors from the main site: cream #F3EFE5, ink #1A2023, teal #2B655C, gold #765609, card-back green #122C29. */

:root {
  --paper: #F3EFE5; --paper-2: #EAE3D5; --surface: #FBF9F4; --ink: #1A2023; --ink-2: #3A4245; --muted: #5F6866;
  --line: #D8D0BF; --line-2: #C6BCA7; --gold: #765609; --gold-line: #B9A86F; --teal: #2B655C;
  --deep: #122C29; --deep-2: #1E4540; --on-deep: #EDE8DC; --on-deep-2: #B9C4BE; --danger: #9B3D38; --focus: #2B655C;
  --shadow: 0 30px 60px -28px rgba(40, 32, 20, .35), 0 10px 20px -12px rgba(40, 32, 20, .18);

  --f-display: 'V2 Serif Thai', 'Noto Serif Thai', serif;
  --f-body: 'V2 Anuphan', 'Anuphan', system-ui, -apple-system, sans-serif;
  --f-latin: 'V2 Cormorant', 'Cormorant Garamond', serif;
  --f-editorial: 'V2 Playfair', 'Playfair Display', serif;

  --t-hero: clamp(2.15rem, 1.35rem + 3.4vw, 4.1rem);
  --t-h2: clamp(1.7rem, 1.25rem + 1.8vw, 2.7rem);
  --t-h3: clamp(1.15rem, 1.05rem + .4vw, 1.4rem);
  --t-lead: clamp(1.05rem, .98rem + .3vw, 1.22rem);
  --t-body: 1rem; --t-small: .875rem; --t-eyebrow: .75rem;

  --gutter: 16px; --max: 1200px; --tap: 48px;
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1100px) { :root { --gutter: 48px; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1415; --paper-2: #151C1E; --surface: #1A2224; --ink: #E9E5DC; --ink-2: #C6CBC5; --muted: #9DA5A2;
    --line: #2A3436; --line-2: #3A4648; --gold: #D8B660; --gold-line: #8E7C45; --teal: #78B9AC;
    --deep: #0A1817; --deep-2: #16302D; --on-deep: #EDE8DC; --on-deep-2: #AFBBB5; --danger: #E08C82; --focus: #78B9AC;
    --shadow: 0 30px 60px -28px rgba(0, 0, 0, .7), 0 10px 20px -12px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1415; --paper-2: #151C1E; --surface: #1A2224; --ink: #E9E5DC; --ink-2: #C6CBC5; --muted: #9DA5A2;
  --line: #2A3436; --line-2: #3A4648; --gold: #D8B660; --gold-line: #8E7C45; --teal: #78B9AC;
  --deep: #0A1817; --deep-2: #16302D; --on-deep: #EDE8DC; --on-deep-2: #AFBBB5; --danger: #E08C82; --focus: #78B9AC;
  --shadow: 0 30px 60px -28px rgba(0, 0, 0, .7), 0 10px 20px -12px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ---- Base ------------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--t-body)/1.7 var(--f-body); overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); padding: 10px 14px; border-radius: var(--r-sm); }
.skip:focus { left: 12px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; margin: 0; line-height: 1.32; text-wrap: balance; letter-spacing: -.005em; }
p { margin: 0; text-wrap: pretty; }
/* Thai has no spaces: headings mark their phrases so a line never ends mid-phrase (breaks only at <wbr>). */
.nb { white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow { font: 600 var(--t-eyebrow)/1.4 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.eyebrow b { color: var(--gold); font-weight: 600; }
.latin { font-family: var(--f-latin); font-style: italic; font-weight: 500; letter-spacing: .01em; }
.lead { font-size: var(--t-lead); line-height: 1.75; color: var(--ink-2); max-width: 34em; }
.muted { color: var(--muted); }
.fine { font-size: var(--t-small); color: var(--muted); line-height: 1.6; }

/* ---- Buttons --------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap); padding: 0 26px;
  border-radius: var(--r-pill); border: 1px solid transparent; font: 500 1rem/1.2 var(--f-body); cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: transform .18s var(--ease), background .2s, border-color .2s, color .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-2); }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] { opacity: .32; cursor: not-allowed; }
.btn-ghost { border-color: var(--line-2); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-gold { background: var(--gold); color: var(--paper); }
.btn-on-deep { background: var(--on-deep); color: var(--deep); }
.btn-text { background: none; border: 0; min-height: var(--tap); padding: 0 6px; cursor: pointer; color: var(--ink-2); text-decoration: underline; text-underline-offset: .3em; text-decoration-color: var(--line-2); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- Header ---------------------------------------------------------------------------------- */
.site-top { position: relative; z-index: 5; }
.site-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; min-height: var(--tap); align-items: center; }
.brand-mark { font: 500 1.35rem/1 var(--f-latin); letter-spacing: .02em; }
.brand-sub { font: 600 .68rem/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line-2); }
.top-cta { min-height: 42px; padding: 0 18px; font-size: .92rem; }

/* ---- Phone mockup ---------------------------------------------------------------------------- */
.phone { --pw: 280px; position: relative; width: var(--pw); aspect-ratio: 1290 / 2796; border-radius: calc(var(--pw) * .15); padding: calc(var(--pw) * .028);
  background: linear-gradient(145deg, #2b2a28, #0e0e0d 55%, #232220); box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.08); flex: none; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--pw) * .125); overflow: hidden; background: #000; container-type: inline-size; }
.phone-screen canvas { width: 100%; height: 100%; object-fit: cover; }
.phone-island { position: absolute; top: calc(var(--pw) * .055); left: 50%; width: 31%; height: calc(var(--pw) * .085); transform: translateX(-50%); background: #000; border-radius: 999px; }
.lock { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; align-items: center; padding-top: 15.5cqw; font-family: -apple-system, 'SF Pro Display', system-ui, var(--f-body); transition: opacity .25s; }
.lock.on-light { color: rgba(20, 18, 16, .88); }
.lock.on-dark { color: rgba(255, 255, 255, .94); }
.lock-date { font-size: 5.4cqw; font-weight: 500; letter-spacing: .01em; }
.lock-time { font-size: 23cqw; font-weight: 600; line-height: 1; letter-spacing: -.02em; margin-top: 1cqw; }
.lock-foot { position: absolute; bottom: 5cqw; left: 9cqw; right: 9cqw; display: flex; justify-content: space-between; }
.lock-foot span { width: 12cqw; height: 12cqw; border-radius: 50%; background: rgba(0,0,0,.28); backdrop-filter: blur(6px); }
.lock.on-dark .lock-foot span { background: rgba(255,255,255,.18); }
.artwork { border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); background: var(--paper-2); }
.artwork canvas { width: 100%; height: auto; }
canvas.loading, .phone-screen canvas.loading { background: linear-gradient(110deg, var(--paper-2) 30%, var(--surface) 50%, var(--paper-2) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---- Landing: hero --------------------------------------------------------------------------- */
.hero { position: relative; padding: 12px 0 56px; overflow: hidden; }
.hero .wrap { display: grid; gap: 40px; }
.hero-copy { display: grid; gap: 22px; align-content: center; max-width: 560px; container-type: inline-size; }
/* Each phrase is one unbreakable line; the size follows the column so the longest phrase always fits. */
.hero h1 { font-size: min(3.7rem, 9.4cqi); line-height: 1.28; font-weight: 400; }
.hero h1 span { display: block; white-space: nowrap; }
.hero h1 em { font-style: normal; color: var(--gold); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.micro { display: flex; align-items: center; gap: 10px; font-size: var(--t-small); color: var(--muted); }
.micro::before { content: ''; width: 18px; height: 1px; background: var(--gold-line); }

.stage { position: relative; display: grid; justify-items: center; }
.stage-main { --pw: min(68vw, 300px); position: relative; z-index: 2; }
.stage-side { display: none; }
.stage-strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 28px var(--gutter) 8px; margin: 0 calc(var(--gutter) * -1); width: calc(100% + var(--gutter) * 2); scrollbar-width: none; }
.stage-strip::-webkit-scrollbar { display: none; }
.stage-strip > * { scroll-snap-align: center; flex: 0 0 auto; }
.stage-strip .artwork { width: 42vw; max-width: 200px; }
.stage-card { display: none; position: absolute; z-index: 3; width: 104px; height: auto; transform: rotate(9deg); border-radius: 6px; box-shadow: var(--shadow); }

@media (min-width: 960px) {
  .hero { padding: 24px 0 96px; }
  .hero .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 24px; }
  .stage { min-height: 680px; }
  .stage-main { --pw: 310px; }
  .stage-side { display: block; position: absolute; z-index: 1; --pw: 230px; }
  .stage-side.left { left: 2%; top: 64px; transform: rotate(-7deg); }
  .stage-side.right { right: 0; top: 120px; transform: rotate(6deg); }
  .stage-strip { display: none; }
  .stage-card { display: block; right: 3%; top: 26px; }
}

/* ---- Sections -------------------------------------------------------------------------------- */
.section { padding: clamp(64px, 10vh, 120px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vh, 56px); max-width: 640px; }
.section-head h2 { font-size: var(--t-h2); }
.section-head.split { max-width: none; }
@media (min-width: 960px) { .section-head.split { grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; } }

/* Collections */
.collections { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding: 6px var(--gutter) 24px; scrollbar-width: none; }
.collections::-webkit-scrollbar { display: none; }
.col-tile { flex: 0 0 min(74vw, 300px); scroll-snap-align: start; display: grid; gap: 14px; text-decoration: none; }
.col-tile .artwork { transition: transform .35s var(--ease); }
.col-tile:hover .artwork { transform: translateY(-6px); }
.col-meta { display: grid; gap: 4px; }
.col-no { font: 500 .95rem/1 var(--f-latin); color: var(--gold); letter-spacing: .08em; }
.col-name { font: 500 1.35rem/1.25 var(--f-latin); }
.col-feel { font-size: var(--t-small); color: var(--muted); }
.col-swatches { display: flex; gap: 6px; margin-top: 6px; }
.col-swatches i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.col-try { font-size: var(--t-small); color: var(--teal); font-weight: 500; margin-top: 4px; }
@media (min-width: 1100px) { .collections { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; } .col-tile { flex: none; } }
.col-tile:nth-child(even) { margin-top: 0; }
@media (min-width: 1100px) { .col-tile:nth-child(even) { margin-top: 56px; } }

/* How it works */
.steps { display: grid; gap: 40px; counter-reset: s; }
@media (min-width: 880px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.step { display: grid; gap: 18px; align-content: start; }
.step-visual { aspect-ratio: 4 / 3.4; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; position: relative; }
.step-no { font: 500 2.4rem/1 var(--f-latin); color: var(--gold); }
.step h3 { font-size: var(--t-h3); }
.chips-demo { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 22px; max-width: 320px; }
.chips-demo span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-size: .82rem; background: var(--paper); }
.chips-demo span svg { width: 15px; height: 15px; }
.chips-demo span.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fan { position: relative; width: 70%; height: 78%; }
.fan img { position: absolute; width: 36%; height: auto; bottom: 6%; left: 32%; border-radius: 5px; box-shadow: var(--shadow); transform-origin: 50% 120%; }
.fan img:nth-child(1) { transform: rotate(-14deg) translateX(-26%); }
.fan img:nth-child(3) { transform: rotate(14deg) translateX(26%); }
.fan img:nth-child(2) { transform: translateY(-10%); z-index: 2; }
.step-visual .phone { --pw: 132px; transform: translateY(18%); }

/* Meaning */
.meaning { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .meaning { grid-template-columns: 1fr 1fr; gap: 72px; } }
.pillars { display: grid; gap: 4px; margin: 28px 0 24px; }
.pillar { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar i { font: italic 500 1.2rem/1.4 var(--f-latin); color: var(--gold); }
.pillar b { font-weight: 600; display: block; }
.pillar p { color: var(--muted); font-size: .95rem; }
.annotated { position: relative; width: min(100%, 360px); margin: 0 auto; }
.annotated .artwork { border-radius: 26px; }
.callout { position: absolute; display: flex; align-items: center; gap: 8px; font-size: .78rem; line-height: 1.35; color: var(--ink); max-width: 150px; }
.callout::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 25%, transparent); }
.callout span { background: var(--surface); border: 1px solid var(--line); padding: 6px 10px; border-radius: var(--r-sm); box-shadow: 0 6px 16px -10px rgba(0,0,0,.3); }
.callout.flip { flex-direction: row-reverse; text-align: right; }
@media (max-width: 520px) { .callout { max-width: 118px; font-size: .72rem; } }

details.sources { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.sources summary { cursor: pointer; list-style: none; min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 500; padding: 8px 0; }
details.sources summary::-webkit-details-marker { display: none; }
details.sources summary::after { content: '+'; font: 400 1.4rem/1 var(--f-latin); color: var(--gold); transition: transform .2s; }
details.sources[open] summary::after { transform: rotate(45deg); }
.source-list { display: grid; gap: 14px; padding: 4px 0 20px; }
.source-list div { display: grid; gap: 2px; }
.source-list b { font-weight: 600; font-size: .95rem; }
.source-list p { font-size: .88rem; color: var(--muted); }

/* Final CTA */
.finale { background: var(--deep); color: var(--on-deep); border-top: 0; overflow: hidden; }
.finale .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .finale .wrap { grid-template-columns: 1fr 1fr; } }
.finale-copy { display: grid; gap: 26px; container-type: inline-size; }
.finale blockquote { margin: 0; font: 400 min(2.6rem, 7.2cqi)/1.5 var(--f-display); }
.finale blockquote span { display: block; white-space: nowrap; }
.finale .eyebrow { color: var(--on-deep-2); }
.finale-art { display: flex; justify-content: center; }
.finale-art .phone { --pw: min(64vw, 290px); transform: rotate(-3deg); }
.finale .fine { color: var(--on-deep-2); }

.site-foot { padding: 40px 0 56px; border-top: 1px solid var(--line); }
.site-foot .wrap { display: grid; gap: 10px; }

/* ---- Create flow ----------------------------------------------------------------------------- */
.flow-top .wrap { min-height: 64px; }
.progress { display: flex; gap: 4px; align-items: center; }
.progress button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; background: none; border: 0; border-radius: var(--r-pill); cursor: pointer; color: var(--muted); font-size: .85rem; }
.progress button b { font: 500 .95rem/1 var(--f-latin); }
.progress button[aria-current="step"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.progress button:disabled { cursor: default; opacity: .55; }
.progress .label { display: none; }
@media (min-width: 640px) { .progress .label { display: inline; } }

.flow { padding: 8px 0 120px; }
.panel { display: none; }
.panel.active { display: block; animation: rise .45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.panel-head { display: grid; gap: 12px; margin: 16px 0 28px; max-width: 680px; }
.panel-head h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem); }

.topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .topics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.topic { position: relative; display: grid; gap: 14px; align-content: space-between; min-height: 132px; padding: 16px; text-align: left; cursor: pointer;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, transform .2s var(--ease), background .2s; overflow: hidden; }
.topic:hover { border-color: var(--line-2); transform: translateY(-2px); }
.topic svg { width: 34px; height: 34px; color: var(--t-color, var(--gold)); }
.topic b { font: 400 1.18rem/1.3 var(--f-display); display: block; }
.topic small { font: italic 500 .92rem/1 var(--f-latin); color: var(--muted); }
.topic::after { content: ''; position: absolute; right: -28px; top: -28px; width: 92px; height: 92px; border-radius: 50%; background: var(--t-tint, var(--paper-2)); opacity: .7; transition: transform .35s var(--ease); }
.topic[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.topic[aria-checked="true"]::after { transform: scale(1.6); }
.topic > * { position: relative; z-index: 1; }

.say { margin-top: 36px; display: grid; gap: 16px; max-width: 680px; }
.say[hidden] { display: none; }
.say h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; }
.textarea { width: 100%; min-height: 96px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface);
  font: 400 1.2rem/1.6 var(--f-display); resize: vertical; }
.textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 25%, transparent); }
.textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-row { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-small); color: var(--muted); }
.error { color: var(--danger); font-size: var(--t-small); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; }
.examples button { min-height: 40px; padding: 6px 14px; border-radius: var(--r-pill); border: 1px dashed var(--line-2); background: transparent; cursor: pointer; font: 400 .95rem/1.4 var(--f-display); text-align: left; }
.examples button:hover { border-style: solid; border-color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.actions .btn-primary { margin-left: auto; }

/* Cards (step 2) */
.picks { display: grid; gap: 14px; }
@media (min-width: 880px) { .picks { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.pick { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; transition: border-color .2s, transform .25s var(--ease); }
@media (min-width: 880px) { .pick { grid-template-columns: 1fr; padding: 22px; gap: 18px; } }
.pick:hover { border-color: var(--line-2); }
.pick[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pick img { width: 100%; border-radius: 6px; box-shadow: 0 12px 24px -14px rgba(0,0,0,.5); background: var(--paper-2); }
@media (min-width: 880px) { .pick img { width: 58%; margin: 6px auto 0; transition: transform .35s var(--ease); } .pick[aria-checked="true"] img { transform: translateY(-6px) rotate(-1.5deg); } }
.pick-body { display: grid; gap: 6px; align-content: start; }
.pick-name { font: italic 500 1.25rem/1.2 var(--f-latin); }
.pick-th { font-size: .85rem; color: var(--muted); }
.pick-theme { font: 400 1.12rem/1.45 var(--f-display); margin-top: 4px; }
.pick-why { font-size: .92rem; color: var(--ink-2); line-height: 1.65; }
.pick-check { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; background: var(--paper); }
.pick[aria-checked="true"] .pick-check { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pick-check svg { width: 14px; height: 14px; opacity: 0; }
.pick[aria-checked="true"] .pick-check svg { opacity: 1; }
.pick-more { font-size: .85rem; color: var(--teal); background: none; border: 0; padding: 0; min-height: 32px; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: .25em; justify-self: start; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--paper-2); font-size: .9rem; color: var(--ink-2); margin-top: 20px; }
.notice::before { content: '✦'; color: var(--gold); }
.browse-link { margin-top: 18px; }
.chosen-other { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--ink); background: var(--surface); margin-top: 14px; }
.chosen-other img { width: 54px; border-radius: 4px; }

/* Dialogs */
dialog { border: 0; padding: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); width: min(92vw, 560px); max-height: 88vh; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(14, 16, 16, .5); backdrop-filter: blur(3px); }
dialog[open] { animation: rise .35s var(--ease); }
.dlg { display: grid; gap: 16px; padding: 24px; }
.dlg h2 { font-size: 1.5rem; }
.dlg-close { position: absolute; top: 10px; right: 10px; width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: transparent; cursor: pointer; font-size: 1.4rem; }
.dlg-wide { width: min(96vw, 980px); height: min(88vh, 900px); }
.dlg-wide .dlg { grid-template-rows: auto auto 1fr; height: 100%; padding-bottom: 0; }
.browse-tools { display: grid; gap: 10px; }
.browse-tools input { min-height: var(--tap); padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--paper); }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; min-height: 38px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: .88rem; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.deck { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 14px; padding: 4px 2px 24px; align-content: start; }
.deck button { display: grid; gap: 6px; background: none; border: 0; padding: 4px; cursor: pointer; border-radius: var(--r-sm); text-align: center; font-size: .75rem; line-height: 1.3; color: var(--ink-2); }
.deck button img { width: 100%; aspect-ratio: 300 / 527; border-radius: 4px; background: var(--paper-2); transition: transform .2s var(--ease); }
.deck button:hover img { transform: translateY(-3px); }
.deck button[aria-pressed="true"] img { outline: 2px solid var(--ink); outline-offset: 2px; }
.card-detail { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: start; }
.card-detail img { border-radius: 6px; }
.src { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; letter-spacing: .02em; padding: 3px 9px; border-radius: var(--r-pill); background: var(--paper-2); color: var(--ink-2); }
.src::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--src, var(--gold)); }
.src.rws_waite_1910 { --src: #8A6410; } .src.rws_visual { --src: #2F6190; } .src.golden_dawn { --src: #7A4FA0; } .src.dotarot_contemporary { --src: #2B655C; }
.quote { font: italic 500 1.08rem/1.5 var(--f-latin); color: var(--ink); border-left: 2px solid var(--gold-line); padding-left: 12px; }

/* Studio (step 3) */
.studio { display: grid; gap: 28px; }
@media (min-width: 960px) { .studio { grid-template-columns: minmax(0, 1fr) 420px; gap: 48px; align-items: start; } }
.preview-col { display: grid; justify-items: center; gap: 16px; }
@media (min-width: 960px) { .preview-col { position: sticky; top: 16px; padding: 28px 0; border-radius: var(--r-lg); background: var(--paper-2); } }
.preview-stage { position: relative; display: grid; place-items: center; min-height: 200px; }
.preview-stage .phone { --pw: min(62vw, 300px, calc((100svh - 300px) * .4614)); transition: opacity .2s; }
.preview-stage .bare { width: min(70vw, 330px, calc((100svh - 300px) * .4614)); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.preview-stage .bare canvas { width: 100%; height: auto; }
.preview-stage.updating canvas { opacity: .92; }
.premium-chip { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 4; background: var(--ink); color: var(--paper); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: 5px 12px; border-radius: var(--r-pill); }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); }
.seg button { min-height: 38px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: transparent; cursor: pointer; font-size: .85rem; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.controls { display: grid; gap: 4px; }
.ctl { padding: 18px 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.ctl:first-child { border-top: 0; padding-top: 0; }
.ctl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ctl-head h2 { font: 600 .9rem/1.4 var(--f-body); color: var(--muted); }
.ctl-head span { font-size: .85rem; color: var(--ink-2); }
.col-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.col-pick button { display: grid; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font-size: .72rem; line-height: 1.3; color: var(--ink-2); }
.col-pick canvas { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s, transform .2s var(--ease); }
.col-pick button[aria-checked="true"] canvas { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.col-pick button:hover canvas { transform: translateY(-2px); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 14px 4px 4px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: .85rem; }
.swatch[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatch i { width: 34px; height: 34px; border-radius: 50%; display: grid; overflow: hidden; transform: rotate(45deg); grid-template-columns: 1fr 1fr; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.swatch i b:first-child { grid-row: span 2; }
.swatch .tag { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: var(--gold); color: var(--paper); }
.card-row { display: flex; gap: 14px; align-items: center; }
.card-row img { width: 52px; border-radius: 4px; box-shadow: 0 6px 14px -8px rgba(0,0,0,.5); }
.card-row div { flex: 1; display: grid; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; }
.switch input { appearance: none; width: 48px; height: 28px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked { background: var(--teal); }
.switch input:checked::after { transform: translateX(20px); }
.personal-row { display: flex; gap: 12px; align-items: center; }
.personal-row[hidden], .say[hidden] { display: none; }
.num-input { width: 96px; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); font: 500 1.1rem/1 var(--f-latin); }
select.select { min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); width: 100%; }
.save-box { position: sticky; bottom: 0; z-index: 6; display: grid; gap: 8px; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--paper) 78%, transparent); }
@media (min-width: 960px) { .save-box { position: static; background: none; padding: 20px 0 0; border-top: 1px solid var(--line); } }
.save-box .btn { width: 100%; min-height: 54px; font-size: 1.05rem; }
.meaning-box { display: grid; gap: 12px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin-top: 18px; }
.meaning-box h2 { font: 600 .9rem/1.4 var(--f-body); color: var(--muted); }
.meaning-box .name { font: italic 500 1.4rem/1.2 var(--f-latin); }
.meaning-box dl { margin: 0; display: grid; gap: 12px; }
dt { font-size: .8rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
dd { margin: 0; font-size: .95rem; line-height: 1.65; }
.ks { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }

.howto { display: grid; gap: 10px; font-size: .92rem; }
.howto b { font-weight: 600; }
.premium-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.premium-list li { display: flex; gap: 10px; }
.premium-list li::before { content: '✦'; color: var(--gold); }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: var(--r-pill); font-size: .9rem; box-shadow: var(--shadow); animation: rise .3s var(--ease); max-width: 90vw; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Optional keyword consent (step 1) */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-small); color: var(--muted); line-height: 1.6; cursor: pointer; margin-top: 4px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--teal); }
.site-foot .btn-text { min-height: 32px; padding: 0; font-size: inherit; }
