/* Hallmark · shape: app screen · genre: playful · theme: custom (Leon's channel: wood sign, gold letters, cyan ribbon)
 * paper: oklch(96.5% 0.028 88) · accent: oklch(72% 0.13 212) · display: Fredoka · body: Rubik
 * nav: top bar with scan counter, language and mode · signature: the stone card with the scratch ladder (fingernail, coin, glass, knife, diamond) · states: loading, empty, error, full, paywall, not-a-stone
 * axes: parchment/rounded/cyan · posture: full-palette, kid · modes: light+dark · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: E (a kid needs fewer words), cut every label to 1-3 words and moved the long text behind read-aloud */
/* waive 12: the chest-lid reveal and gem burst are the product moment for a 7-year-old; both are transform/opacity, both off under reduced motion */
/* waive F4: .scan__btn is the camera control, the one big thing a 7-year-old taps; .btn is the action bar recipe, .btn--quiet is its outline variant */
/* waive F7: .tool and .scan__alt are controls; chip-shaped status (.chip) is the scan counter, a control too */
/* waive dark-shadows: one soft stone-coloured bloom behind the result photo in dark mode, the cave light, nowhere else */
@import url("./tokens.css");
@import url("./base.css");

body { min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
.ic { width: 22px; height: 22px; flex: none; }
.ic--lg { width: 34px; height: 34px; }
[dir="ltr"] .flip { transform: scaleX(-1); }
[dir="rtl"] .flip { transform: none; }

/* bar */
.bar { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: color-mix(in oklab, var(--color-paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: var(--rule-hair) solid var(--color-rule); }
.bar__in { max-width: var(--container); margin-inline: auto; padding: var(--space-xs) var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding-top: max(var(--space-xs), env(safe-area-inset-top)); }
.bar__tools { display: flex; gap: var(--space-xs); }
.tool { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-width: 44px; min-height: 44px; padding: 0 var(--space-sm); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-card); color: var(--color-ink); font: 700 var(--text-sm)/1 var(--font-body); text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.tool:hover { background: var(--color-paper-2); }
.tool:active { transform: scale(0.95); }
.tool:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tool:disabled { opacity: 0.55; cursor: not-allowed; }
.tool[aria-busy="true"] { cursor: progress; }
.chip { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 40px; padding: 0 var(--space-sm) 0 var(--space-sm); border: 0; border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-ink); font: 700 var(--text-sm)/1 var(--font-body); cursor: pointer; transition: transform var(--dur-micro) var(--ease-out); }
.chip:hover { transform: translateY(-1px); }
.chip:active { transform: scale(0.96); }
.chip:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.chip .ic { width: 18px; height: 18px; }
.chip.is-low { background: var(--color-gold); color: var(--color-gold-deep); }

main { max-width: var(--container); margin-inline: auto; padding: var(--space-lg) var(--gutter) var(--space-2xl); }
.view { display: grid; gap: var(--section-gap); }
.h1 { font: 700 var(--text-2xl)/1.15 var(--font-display); }
.h2 { font: 700 var(--text-section)/1.2 var(--font-display); }
.link { color: var(--color-ink-2); font-weight: 500; font-size: var(--text-sm); min-height: 44px; display: inline-flex; align-items: center; }
.link:hover { color: var(--color-ink); }
.link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 6px; }
.empty { color: var(--color-muted); font-size: var(--text-sm); }

/* sign: the channel's wooden treasure board */
.sign { position: relative; display: grid; justify-items: center; padding-top: var(--space-xs); }
.sign__leon { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 5px solid var(--color-gold); box-shadow: 0 0 0 4px var(--color-wood-2); position: relative; z-index: 2; margin-bottom: calc(var(--space-lg) * -1); }
.sign__board { position: relative; width: 100%; padding: var(--space-xl) var(--space-md) var(--space-lg); border-radius: 22px; text-align: center;
  background:
    repeating-linear-gradient(176deg, transparent 0 14px, color-mix(in oklab, var(--color-wood-2) 45%, transparent) 14px 16px, transparent 16px 31px),
    linear-gradient(180deg, var(--color-wood-grain), var(--color-wood) 55%, var(--color-wood-2));
  box-shadow: inset 0 0 0 3px color-mix(in oklab, var(--color-gold-edge) 70%, transparent), 0 6px 0 var(--color-wood-2); }
.sign__title { font: 700 var(--text-display)/1.02 var(--font-display); color: var(--color-gold);
  text-shadow: 0 2px 0 var(--color-gold-edge), 0 4px 0 var(--color-gold-edge), 0 6px 0 var(--color-gold-deep), 0 9px 10px color-mix(in oklab, var(--color-gold-deep) 60%, transparent);
  -webkit-text-stroke: 1.5px var(--color-gold-deep); paint-order: stroke fill; }
.sign__ribbon { display: inline-block; margin-top: var(--space-sm); padding: var(--space-2xs) var(--space-lg); border-radius: 10px; background: var(--color-accent); color: var(--color-accent-ink); font: 700 var(--text-xl)/1.2 var(--font-display); box-shadow: 0 3px 0 var(--color-wood-2); }

/* scan */
.scan { display: grid; justify-items: center; gap: var(--space-md); text-align: center; }
.scan__btn { position: relative; display: grid; place-items: center; align-content: center; gap: var(--space-xs); width: 188px; height: 188px; border-radius: 50%; background: var(--color-gold); color: var(--color-gold-deep); font: 700 var(--text-xl)/1.1 var(--font-display); cursor: pointer; box-shadow: 0 7px 0 var(--color-gold-edge), 0 0 0 7px var(--color-paper), 0 0 0 11px var(--color-accent); transition: transform var(--dur-micro) var(--ease-out); -webkit-tap-highlight-color: transparent; }
.scan__btn:hover { transform: translateY(-2px); }
.scan__btn:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--color-gold-edge), 0 0 0 7px var(--color-paper), 0 0 0 11px var(--color-accent); }
.scan__btn::after { content: ""; position: absolute; inset: -11px; border-radius: 50%; border: 3px solid var(--color-accent); opacity: 0; animation: ping 2.6s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.22); opacity: 0; } }
input:focus-visible + .scan__btn, .scan__btn:focus-within { outline: 3px solid var(--color-focus); outline-offset: 14px; }
#camIn:focus-visible ~ .scan__btn { outline: 3px solid var(--color-focus); }
.scan__alt { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-md); border-radius: var(--radius-pill); border: var(--rule-hair) solid var(--color-rule); background: var(--color-card); font-weight: 500; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.scan__alt:hover { background: var(--color-paper-2); }
#galIn:focus-visible + * , .scan__alt:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.scan__tip { color: var(--color-ink-2); font-size: var(--text-sm); max-width: 30ch; }

/* shelf */
.shelf { display: grid; gap: var(--space-sm); }
.shelf__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); }
.rank { font-size: var(--text-sm); color: var(--color-ink-2); }
.rank b { color: var(--color-ink); }
.rail { list-style: none; margin: 0 calc(var(--gutter) * -1); padding: var(--space-2xs) var(--gutter) var(--space-sm); display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: var(--gap-columns); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.rail > li { scroll-snap-align: start; }
.rail:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.tile { display: grid; gap: var(--space-2xs); text-decoration: none; color: var(--color-ink); border-radius: 16px; transition: transform var(--dur-micro) var(--ease-out); }
.tile:hover { transform: translateY(-2px); }
.tile:active { transform: scale(0.97); }
.tile:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.tile__img { aspect-ratio: 1; width: 100%; border-radius: 16px; overflow: hidden; background: var(--color-paper-2); box-shadow: 0 0 0 3px var(--stone-1, var(--color-accent)); }
.tile__img img { width: 100%; height: 100%; object-fit: cover; }
.tile__name { font: 700 var(--text-sm)/1.2 var(--font-display); overflow-wrap: break-word; min-width: 0; }
.tile__date { font-size: var(--text-xs); color: var(--color-muted); }

/* analyzing */
#v-scan { justify-items: center; text-align: center; padding-top: var(--space-xl); }
.lens { position: relative; width: min(78vw, 300px); aspect-ratio: 1; padding: var(--space-sm); border-radius: 50%; }
.lens::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: var(--space-sm) solid var(--color-accent); border-block-start-color: var(--color-gold); border-inline-end-color: var(--color-gold); animation: spin 1.6s linear infinite; }
.lens__frame { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--color-paper-2); }
.lens__frame img { width: 100%; height: 100%; object-fit: cover; }
.lens__beam { position: absolute; inset-inline: 0; top: 0; height: var(--space-xs); background: var(--color-accent); box-shadow: 0 0 0 var(--space-2xs) color-mix(in oklab, var(--color-accent) 35%, transparent); animation: beam 1.6s var(--ease-in-out) infinite alternate; }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes beam { from { transform: translateY(0); } to { transform: translateY(3400%); } }
.steps { font: 700 var(--text-xl)/1.25 var(--font-display); min-height: 2.5em; }
.dots { display: flex; gap: var(--space-xs); }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--color-accent); animation: dot 1s var(--ease-in-out) infinite; }
.dots span:nth-child(2) { animation-delay: 0.15s; } .dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 50% { transform: translateY(-8px); opacity: 0.5; } }

/* result: the reveal */
.reveal { position: relative; }
.lid { position: absolute; inset: 0 0 auto; height: 220px; z-index: var(--z-raised); display: grid; place-items: center; border-radius: var(--radius-card);
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, color-mix(in oklab, var(--color-wood-2) 50%, transparent) 22px 24px),
    linear-gradient(180deg, var(--color-wood-grain), var(--color-wood));
  box-shadow: inset 0 -8px 0 var(--color-gold-edge); transform-origin: 50% 0; pointer-events: none; opacity: 0; }
.lid__lock { width: 54px; height: 54px; color: var(--color-gold); }
.is-revealing .lid { animation: lid 1s var(--ease-in) forwards; }
@keyframes lid { 0% { opacity: 1; transform: none; } 35% { opacity: 1; transform: rotate(-2deg); } 50% { opacity: 1; transform: rotate(2deg); } 100% { opacity: 0; transform: translateY(-60%) scaleY(0.2); } }
.burst { position: absolute; inset-inline: 0; top: 110px; height: 0; z-index: var(--z-raised); pointer-events: none; }
.burst i { position: absolute; inset-inline-start: 50%; top: 0; width: 14px; height: 14px; color: var(--stone-1, var(--color-gold)); opacity: 0; }
.burst i svg { width: 100%; height: 100%; }
.is-revealing .burst i { animation: shard 0.9s var(--ease-out) 0.55s forwards; }
@keyframes shard { 0% { opacity: 1; transform: translate(0, 0) scale(0.4) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--rot)); } }
.is-revealing .stone { animation: rise 0.6s var(--ease-spring) 0.55s both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }

.stone { display: grid; gap: var(--space-md); }
.stone__head { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: var(--space-md); align-items: center; }
.stone__photo { position: relative; aspect-ratio: 1; border-radius: 24px; padding: var(--space-2xs); background: var(--stone-1, var(--color-accent)); box-shadow: 0 0 0 var(--space-2xs) var(--stone-2, var(--color-gold)); }
.stone__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; background: var(--color-paper-2); }
[data-mode="dark"] .stone__photo { box-shadow: 0 0 0 var(--space-2xs) var(--stone-2, var(--color-gold)), 0 0 42px -6px var(--stone-1, var(--color-accent)); }
@media (prefers-color-scheme: dark) { :root:not([data-mode]) .stone__photo { box-shadow: 0 0 0 var(--space-2xs) var(--stone-2, var(--color-gold)), 0 0 42px -6px var(--stone-1, var(--color-accent)); } }
.stone__id { display: grid; gap: var(--space-2xs); min-width: 0; }
.stone__name { font: 700 var(--text-3xl)/1.02 var(--font-display); overflow-wrap: break-word; min-width: 0; }
.stone__other { font-size: var(--text-sm); color: var(--color-muted); }
.stone__family { font-size: var(--text-sm); color: var(--color-ink-2); }
.sure { justify-self: start; padding: var(--space-2xs) var(--space-sm); border-radius: 8px; font: 700 var(--text-xs)/1.3 var(--font-body); background: var(--color-accent); color: var(--color-accent-ink); }
.sure[data-c="medium"] { background: var(--color-gold); color: var(--color-gold-deep); }
.sure[data-c="low"] { background: var(--color-paper-3); color: var(--color-ink); }
.swatches { display: flex; gap: var(--space-xs); margin-top: var(--space-2xs); }
.swatches span { width: 28px; height: 16px; border-radius: 6px; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-ink) 18%, transparent); }

.says { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--space-sm); align-items: start; }
.says > img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--color-gold); }
.says__bubble { position: relative; padding: var(--space-sm) var(--space-md); border-radius: 18px; border-start-start-radius: 4px; background: var(--color-accent); color: var(--color-accent-ink); font: 700 var(--text-lg)/1.3 var(--font-display); }
.tool--read { grid-column: 2; justify-self: start; }
.tool--read[aria-pressed="true"] { background: var(--color-accent); color: var(--color-accent-ink); border-color: transparent; }

.block { display: grid; gap: var(--space-sm); padding: var(--space-md); border-radius: var(--radius-card); background: var(--color-card); color: var(--color-ink); box-shadow: var(--shadow-card); }
.block__h { display: flex; align-items: center; gap: var(--space-xs); font: 700 var(--text-title)/1.2 var(--font-display); color: var(--color-ink); }
.block__h .ic { color: var(--color-wood); width: 20px; height: 20px; }
[data-mode="dark"] .block__h .ic { color: var(--color-gold); }
@media (prefers-color-scheme: dark) { :root:not([data-mode]) .block__h .ic { color: var(--color-gold); } }
.block__big { font: 500 var(--text-lg)/1.4 var(--font-body); }
.block__note { font-size: var(--text-sm); color: var(--color-ink-2); }
.block--power { background: var(--color-paper-2); color: var(--color-ink); box-shadow: inset 0 0 0 2px var(--stone-1, var(--color-accent)); }
.block--test { background: var(--color-paper-2); color: var(--color-ink); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-md); }
.pair .block { align-content: start; }

/* signature: the scratch ladder */
.ladder { position: relative; padding: var(--space-xl) 0 var(--space-2xl); margin-inline: var(--space-lg); }
.ladder__track { position: relative; height: 14px; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--color-paper-3), var(--color-wood)); }
[dir="rtl"] .ladder__track { background: linear-gradient(270deg, var(--color-paper-3), var(--color-wood)); }
.ladder__fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--radius-pill); background: var(--stone-1, var(--color-accent)); box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--color-ink) 15%, transparent); transform-origin: 0 50%; }
[dir="rtl"] .ladder__fill { transform-origin: 100% 50%; }
.ladder__ref { position: absolute; top: 52px; transform: translateX(-50%); display: grid; justify-items: center; gap: var(--space-3xs); font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
[dir="rtl"] .ladder__ref { transform: translateX(50%); }
.ladder__ref--low { top: 72px; }
.ladder__ref--low::before { height: var(--space-lg); }
.ladder__ref::before { content: ""; width: 2px; height: 10px; background: var(--color-muted); }
.ladder__me { position: absolute; top: var(--space-xs); transform: translateX(-50%); display: grid; justify-items: center; font: 700 var(--text-sm)/1 var(--font-display); color: var(--color-ink); }
[dir="rtl"] .ladder__me { transform: translateX(50%); }
.ladder__me b { display: grid; place-items: center; min-width: 32px; height: 24px; padding: 0 var(--space-xs); border-radius: 8px; background: var(--color-ink); color: var(--color-paper); }

.rarity { display: flex; gap: var(--space-2xs); color: var(--color-paper-3); }
.rarity .ic { width: 26px; height: 26px; }
.rarity .on { color: var(--stone-1, var(--color-accent)); }
.where { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); font-weight: 500; }
.where li { display: flex; align-items: center; gap: var(--space-xs); }
.facts { margin: 0; padding-inline-start: 1.3em; display: grid; gap: var(--space-xs); }
.facts li::marker { font: 700 1em var(--font-display); color: var(--color-wood); }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; position: sticky; bottom: 0; padding: var(--space-sm) 0 max(var(--space-sm), env(safe-area-inset-bottom)); background: linear-gradient(0deg, var(--color-paper) 70%, transparent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 52px; padding: 0 var(--space-lg); border: 0; border-radius: var(--radius-pill); background: var(--color-wood); color: var(--color-on-wood); font: 700 var(--text-lg)/1 var(--font-display); white-space: nowrap; text-decoration: none; cursor: pointer; box-shadow: var(--shadow-press); transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-wood-grain); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--color-wood-2); }
.btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.8; }
.btn--quiet { background: var(--color-card); color: var(--color-ink); box-shadow: inset 0 0 0 2px var(--color-rule); }
.btn--quiet:hover { background: var(--color-paper-2); }
.btn--quiet:active { box-shadow: inset 0 0 0 2px var(--color-rule); }

/* collection */
.vhead { display: flex; align-items: center; gap: var(--space-sm); }
.ranks { display: grid; gap: var(--space-xs); padding: var(--space-md); border-radius: var(--radius-card); background: var(--color-card); box-shadow: var(--shadow-card); }
.ranks__now { font: 700 var(--text-lg)/1.2 var(--font-display); }
.ranks__bar { height: 12px; border-radius: var(--radius-pill); background: var(--color-paper-3); overflow: hidden; }
.ranks__bar i { display: block; height: 100%; background: var(--color-accent); transform-origin: 0 50%; }
[dir="rtl"] .ranks__bar i { transform-origin: 100% 50%; }
.ranks__next { font-size: var(--text-sm); color: var(--color-ink-2); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md) var(--gap-columns); }

/* note (error) */
.note { display: grid; gap: var(--space-md); justify-items: center; text-align: center; padding: var(--space-2xl) 0; }

/* paywall */
.pay { width: min(92vw, 420px); border: 0; border-radius: 26px; padding: var(--space-2xl) var(--space-lg) var(--space-lg); background: var(--color-card); color: var(--color-ink); box-shadow: 0 0 0 4px var(--color-gold), 0 24px 60px -20px var(--color-scrim); }
.pay::backdrop { background: var(--color-scrim); }
.pay[open] { animation: pop var(--dur-long) var(--ease-spring); }
@keyframes pop { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.pay__kid, .pay__gate, .pay__parent, .code { display: grid; gap: var(--space-md); justify-items: center; text-align: center; }
.pay__chest { width: 132px; height: auto; }
.pay__close { position: absolute; inset-block-start: var(--space-sm); inset-inline-end: var(--space-sm); font-size: var(--text-xl); }
.price { font: 700 var(--text-3xl)/1 var(--font-display); }
.price__per { display: block; margin-top: var(--space-2xs); font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--color-ink-2); }
.code { width: 100%; padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); }
.field { display: grid; gap: var(--space-xs); width: 100%; font-weight: 500; }
.field input { min-height: 52px; padding: 0 var(--space-md); border: 2px solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-paper); color: var(--color-ink); font: 700 var(--text-lg)/1 var(--font-body); text-align: center; transition: border-color var(--dur-short) var(--ease-out); }
.field input:hover { border-color: var(--color-muted); }
.field input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-color: var(--color-focus); }
.field input[aria-invalid="true"] { border-color: var(--color-error); }
.field__err { color: var(--color-error); font-size: var(--text-sm); font-weight: 500; }

.toast { position: fixed; inset-inline: var(--gutter); bottom: calc(var(--space-xl) + env(safe-area-inset-bottom)); z-index: var(--z-toast); max-width: 420px; margin-inline: auto; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); text-align: center; font-weight: 500; animation: pop var(--dur-short) var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  .scan__btn::after, .lens, .lens__frame, .lens__beam, .dots span { animation: none; }
  .is-revealing .lid, .is-revealing .burst i, .is-revealing .stone { animation: none; }
  .lid { display: none; }
}
@media (max-width: 22rem) {
  .stone__head { grid-template-columns: 96px minmax(0, 1fr); }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* sign-in + account */
.check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-sm); align-items: start; width: 100%; text-align: start; font-size: var(--text-sm); color: var(--color-ink-2); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: var(--space-3xs) 0 0; accent-color: var(--color-wood); cursor: pointer; }
.check input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.check a { color: var(--color-ink); font-weight: 500; }
.check a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
button.link { border: 0; background: none; padding: 0 var(--space-xs); font: inherit; font-size: var(--text-sm); cursor: pointer; text-decoration: underline; text-underline-offset: 0.16em; }
.acct { display: grid; gap: var(--space-xs); justify-items: start; padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); color: var(--color-ink-2); }
.legal { display: grid; gap: var(--space-md); padding-block: var(--space-xl) var(--space-2xl); }
.legal ul { margin: 0; padding-inline-start: 1.2em; display: grid; gap: var(--space-xs); }

/* episode link (result card + parents area) */
.episode { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--space-sm); align-items: center; color: var(--color-ink); text-decoration: none; border-radius: 14px; transition: transform var(--dur-micro) var(--ease-out); }
.episode:hover { transform: translateY(-1px); }
.episode:active { transform: scale(0.98); }
.episode:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.episode img { width: 112px; height: 63px; object-fit: cover; border-radius: 10px; }
.episode__t { font: 700 var(--text-sm)/1.35 var(--font-display); }
.episode--card { padding: var(--space-sm); }
#v-parents .block { justify-items: start; }
#v-parents .code { justify-items: stretch; text-align: start; }
