/* Signed-out surfaces: landing (direction A, Cuento) and sign-in sheet (direction C, Escucha).
   Built on tokens.css only. Lifted from the approved prototype. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.so {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font: 400 var(--text-base)/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
:where(.so) img { display: block; max-width: 100%; }
:where(.so) a { color: var(--accent-soft); text-underline-offset: 3px; }
:where(.so) :is(button, input) { font: inherit; }
:where(.so) input { color: inherit; }
.so :focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: 10px; }
:where(.so) :is(h1, h2, h3, p, figure, blockquote) { margin: 0; }
:where(.so :is(ul, ol)[role="list"]) { list-style: none; margin: 0; padding: 0; }
:where(.so) svg { width: 1.25rem; height: 1.25rem; flex: none; }
.so-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
.so-display { font: 700 2.5rem/1.05 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.so-h2 { font: 700 1.75rem/1.15 var(--font-display); letter-spacing: -0.015em; text-wrap: balance; }
.so-h3 { font: 650 var(--text-lg)/1.25 var(--font-display); letter-spacing: -0.01em; }
.so-lede { font-size: var(--text-lg); line-height: 1.5; color: var(--text-secondary); max-width: 36rem; text-wrap: pretty; }
.so-muted { color: var(--text-muted); }
.so-small { font-size: var(--text-sm); }
.so-kicker { font-weight: 600; color: var(--accent-soft); margin-bottom: var(--s3); }
.so-eyebrow-text { font-size: 0.9375rem; font-weight: 600; color: var(--text-muted); text-transform: none; margin-bottom: var(--s3); }
.so-eyebrow { display: flex; align-items: center; gap: var(--s2); font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); }
.so-eyebrow svg { width: 1rem; height: 1rem; }

@media (width >= 820px) {
  .so-display { font-size: 3.5rem; }
  .so-h2 { font-size: 2.25rem; }
}

/* ---------- buttons ---------- */
.so-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 3.5rem; padding: 0 var(--s6); border: 0; border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--text-base); text-decoration: none; cursor: pointer;
  transition: transform .12s var(--ease), background .15s;
}
.so a.so-btn { color: inherit; }
.so-btn:active { transform: scale(.97); }
.so-btn--primary, .so a.so-btn--primary { background: var(--accent); color: var(--on-accent); }
.so-btn--primary:active { background: var(--accent-pressed); }
.so-btn--secondary, .so a.so-btn--secondary { background: var(--surface-raised); color: var(--text-primary); border: 1px solid var(--surface-pressed-strong); }
.so-btn--secondary:active { background: var(--surface-pressed); }
.so-btn--google, .so a.so-btn--google { background: var(--suit-50); color: var(--ink-900); }
.so-btn--google:active { background: var(--suit-200); }
.so-g { width: 1.25rem; height: 1.25rem; }
.so-btn--sm { min-height: var(--tap); padding: 0 var(--s4); font-size: 0.9375rem; }
.so-btn--lg { min-height: 3.75rem; padding: 0 var(--s8); font-size: var(--text-lg); }
.so-btn--block { width: 100%; }

@media (width <= 819px) { .so-btn--lg { font-size: var(--text-base); padding: 0 var(--s5); } }

@media (width <= 819px) { .so-btn--block-sm { width: 100%; } }

/* ---------- forms ---------- */
.so-form { display: grid; gap: var(--s4); margin-top: var(--s6); }
.so-field { display: grid; gap: var(--s2); }
.so-field label { font-weight: 600; font-size: 0.9375rem; color: var(--text-secondary); }

.so-input {
  width: 100%; min-height: 3.5rem; padding: 0 var(--s4); border-radius: var(--r-md);
  background: var(--surface-raised); border: 1px solid var(--surface-pressed-strong);
  color: var(--text-primary); font-size: var(--text-base);
}
.so-input::placeholder { color: var(--text-muted); }
.so-input:focus { outline: none; border-color: var(--accent); }
.so-input--code { font: 700 1.75rem/1 var(--font-display); letter-spacing: .4em; text-align: center; padding-left: .4em; font-variant-numeric: tabular-nums; }
.so-input[aria-invalid="true"] { border-color: var(--danger); }
.so-field-error { display: flex; gap: var(--s2); align-items: flex-start; color: var(--danger); font-size: 0.9375rem; }
.so-inline-form { display: grid; gap: var(--s3); margin-top: var(--s6); max-width: 32rem; }

@media (width >= 560px) {
  .so-inline-form { grid-template-columns: 1fr auto; }
}
.so-or { display: flex; align-items: center; gap: var(--s3); margin: var(--s5) 0; color: var(--text-muted); font-size: var(--text-sm); }
.so-or::before, .so-or::after { content: ""; flex: 1; height: 1px; background: var(--border-subtle); }
.so-legal { margin-top: var(--s5); font-size: var(--text-sm); color: var(--text-muted); text-align: center; text-wrap: pretty; }

/* ---------- header / footer ---------- */
.so-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: calc(var(--safe-t) + var(--s3)) var(--s5) var(--s3);
  background: color-mix(in srgb, var(--surface-page) 92%, transparent);
  border-bottom: 1px solid var(--border-subtle);
}
.so-header-nav { display: flex; align-items: center; gap: var(--s2); }
.so-navlink, .so a.so-navlink { display: none; color: var(--text-secondary); text-decoration: none; font-weight: 600; padding: var(--s2) var(--s3); border-radius: var(--r-pill); }

@media (width >= 820px) {
  .so-header { padding-inline: var(--s10); }
  .so-navlink, .so a.so-navlink { display: inline-flex; }
}
.so-mark, .so a.so-mark { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text-primary); text-decoration: none; font: 700 var(--text-lg)/1 var(--font-display); letter-spacing: -0.01em; }
.so-mark-logo { display: block; width: 2rem; height: 2rem; }

.so-footer { border-top: 1px solid var(--border-subtle); background: var(--surface-rail); padding: var(--s10) var(--s5) calc(var(--safe-b) + var(--s10)); }
.so-footer-inner { max-width: 72rem; margin: 0 auto; display: grid; gap: var(--s8); }
.so-footer-brand { display: grid; gap: var(--s2); }
.so-footer-legal { display: grid; gap: var(--s1); }
.so-footer-legal a, .so-footer-legal a:visited { color: var(--text-secondary); text-decoration: none; min-height: var(--tap); display: flex; align-items: center; }
.so-footer-end { display: grid; gap: var(--s3); }
.so-lang, .so a.so-lang { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s4); border: 1px solid var(--surface-pressed-strong); border-radius: var(--r-pill); color: var(--text-secondary); text-decoration: none; font-weight: 600; font-size: 0.9375rem; width: max-content; }

@media (width >= 820px) {
  .so-footer { padding-inline: var(--s10); }
  .so-footer-inner { grid-template-columns: 1.2fr 1fr 1fr; align-items: start; }
}

/* ---------- sections ---------- */
.so-section { padding: var(--s12) var(--s5); max-width: 72rem; margin: 0 auto; }
.so-section > .so-h2 + .so-muted, .so-section > .so-h2 + .so-lede { margin-top: var(--s3); }

@media (width >= 820px) { .so-section { padding: var(--s16) var(--s10); } }

.so-privacy { display: flex; gap: var(--s3); align-items: flex-start; margin-top: var(--s6); color: var(--success); font-size: 0.9375rem; max-width: 36rem; }
.so-privacy svg { margin-top: 2px; }
.so-privacy--tight { margin-top: var(--s4); font-size: var(--text-sm); }

/* ---------- player ---------- */
.so-player {
  display: grid; grid-template-columns: 4.5rem 1fr auto; align-items: center; gap: var(--s3) var(--s4);
  padding: var(--s4); border-radius: var(--r-lg); background: var(--surface-raised); border: 1px solid var(--border-subtle);
}
.so-player-cover { width: 4.5rem; height: 4.5rem; border-radius: var(--r-md); object-fit: cover; }
.so-player-meta { min-width: 0; }
.so-player-title { font-weight: 650; line-height: 1.3; }
.so-player-sub { font-size: 0.9375rem; color: var(--text-muted); margin-top: 2px; }

.so-play {
  width: 3.5rem; height: 3.5rem; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--suit-50); color: var(--ink-900); display: grid; place-items: center;
  transition: transform .15s var(--ease);
}
.so-play:active { transform: scale(.94); }
.so-play svg { width: 1.5rem; height: 1.5rem; }
.so-play-icon { display: grid; }
.so-play-icon--pause, .is-playing .so-play-icon--play { display: none; }
.is-playing .so-play-icon--pause { display: grid; }
.so-scrub { grid-column: 1 / -1; }
.so-scrub input { width: 100%; accent-color: var(--accent); height: var(--tap); margin: 0; }
.so-times { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--text-muted); font-variant-numeric: tabular-nums; margin-top: -6px; }

/* book: the player as a page in direction A */
.so-player--book { margin-top: var(--s6); background: var(--surface-sheet); }


/* ---------- today note ---------- */
.so-today { display: grid; gap: var(--s3); margin-top: var(--s6); }

.so-note {
  padding: var(--s5); border-radius: var(--r-lg);
  background: var(--accent-soft-surface); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.so-note blockquote p { margin-top: var(--s2); font-size: var(--text-base); line-height: 1.55; color: var(--suit-50); }
.so-note .so-eyebrow { color: var(--accent-soft); }
.so-today-arrow { display: grid; place-items: center; color: var(--text-muted); }
.so-page { padding: var(--s5); border-radius: var(--r-lg); background: var(--surface-raised); border: 1px solid var(--border-subtle); }
.so-page-title { font: 700 var(--text-xl)/1.2 var(--font-display); margin-top: var(--s2); }
.so-page-body { margin-top: var(--s2); color: var(--text-secondary); line-height: 1.6; }
.so-today--book .so-page { background: var(--surface-sheet); }

/* ---------- pricing ---------- */
.so-pricing .so-lede { margin-top: var(--s3); }
.so-plans { display: grid; gap: var(--s4); margin-top: var(--s8); }

.so-plan {
  display: flex; flex-direction: column; gap: var(--s3);
  padding: var(--s6) var(--s5); border-radius: var(--r-lg);
  background: var(--surface-raised); border: 1px solid var(--border-subtle);
}
.so-plan--featured { border: 2px solid var(--accent); background: var(--surface-sheet); }
.so-plan-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.so-plan-name { font: 700 var(--text-xl)/1.2 var(--font-display); }
.so-badge { font-size: 0.8125rem; font-weight: 700; padding: var(--s1) var(--s3); border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); }
.so-plan-price { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.so-plan-price strong { font: 700 2.5rem/1 var(--font-display); letter-spacing: -0.02em; }
.so-plan-price span { color: var(--text-muted); }
.so-plan-yearly { font-size: var(--text-sm); color: var(--success); font-weight: 600; }
.so-plan-credits { display: grid; gap: 2px; font-weight: 650; padding: var(--s3) 0; border-block: 1px solid var(--border-subtle); }
.so-plan-credits span { font-weight: 400; font-size: 0.9375rem; color: var(--text-muted); }
.so-plan-features { display: grid; gap: var(--s2); flex: 1; align-content: start; }
.so-plan-features li { display: flex; gap: var(--s2); align-items: flex-start; color: var(--text-secondary); font-size: 0.9375rem; }
.so-plan-features svg { color: var(--success); margin-top: 1px; }
.so-plan .so-btn { margin-top: var(--s3); }
.so-plan-cancel { margin-top: var(--s4); font-size: var(--text-sm); }

@media (width >= 820px) {
  .so-plans { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
}

.so-packs { margin-top: var(--s10); padding: var(--s6) var(--s5); border-radius: var(--r-lg); border: 1px dashed var(--surface-pressed-strong); }
.so-packs .so-muted { margin-top: var(--s2); }
.so-pack-list { display: grid; gap: var(--s2); margin-top: var(--s5); }
.so-pack { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--surface-raised); min-height: 3.5rem; }
.so-pack--best { box-shadow: inset 0 0 0 1px var(--accent); }
.so-pack-text { display: grid; }
.so-pack-text .so-muted { margin: 0; font-size: var(--text-sm); }
.so-pack-price { font: 700 var(--text-lg)/1 var(--font-display); white-space: nowrap; }
.so-pack-price small { font: 600 0.8125rem/1 var(--font-body); color: var(--text-muted); }

@media (width >= 820px) {
  .so-packs { display: grid; grid-template-columns: 1fr 1.4fr; grid-template-rows: auto 1fr; gap: 0 var(--s8); align-items: start; }
  .so-packs .so-pack-list { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
}

/* ---------- FAQ ---------- */
.so-faq-list { margin-top: var(--s6); border-top: 1px solid var(--border-subtle); max-width: 48rem; }
.so-faq-item { border-bottom: 1px solid var(--border-subtle); }

.so-faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  min-height: 3.75rem; padding: var(--s3) 0; cursor: pointer; list-style: none;
  font-weight: 650; font-size: var(--text-base);
}
.so-faq-item summary::-webkit-details-marker { display: none; }
.so-faq-item summary svg { color: var(--text-muted); transition: transform .2s var(--ease); }
.so-faq-item[open] summary svg { transform: rotate(180deg); }
.so-faq-item p { padding-bottom: var(--s5); color: var(--text-secondary); max-width: 40rem; }

/* ---------- shelf ---------- */
.so-shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: 9rem; gap: var(--s4);
  overflow-x: auto; scrollbar-width: none; margin: var(--s6) calc(var(--s5) * -1) 0; padding: 0 var(--s5);
}
.so-shelf::-webkit-scrollbar { display: none; }
.so-shelf-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); background: var(--surface-raised); }
.so-shelf-item span { display: block; margin-top: var(--s2); font-weight: 600; font-size: 0.9375rem; }

/* ---------- auth (shared) ---------- */
.so-auth-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: calc(var(--safe-t) + var(--s3)) var(--s4) var(--s3); }
.so-back, .so a.so-back { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 50%; color: var(--text-primary); }
.so-back:active { background: var(--surface-pressed); }
.so-back svg { width: 1.5rem; height: 1.5rem; }
.so-back-spacer { width: var(--tap); }
.so-auth-title { font: 700 2rem/1.1 var(--font-display); letter-spacing: -0.015em; text-wrap: balance; }
.so-auth-sub { margin-top: var(--s3); color: var(--text-secondary); text-wrap: pretty; }
.so-auth-sub.so-muted { color: var(--text-muted); margin-top: var(--s2); font-size: 0.9375rem; }
.so-auth-icon { width: 4rem; height: 4rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft-surface); color: var(--accent); margin-bottom: var(--s5); }
.so-auth-icon svg { width: 2rem; height: 2rem; }
.so-auth-icon--warn { background: var(--surface-pressed); color: var(--accent-soft); }
.so-auth-note { margin-top: var(--s5); font-size: 0.9375rem; color: var(--text-muted); }
.so-auth-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s4); font-weight: 600; }
.so-auth-links a { min-height: var(--tap); display: inline-flex; align-items: center; }

.so-banner { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); border-radius: var(--r-md); margin-bottom: var(--s6); }
.so-banner p { display: grid; gap: 2px; }
.so-banner span:not(.so-banner-icon) { color: var(--text-secondary); font-size: 0.9375rem; }
.so-banner--gift { background: var(--success-surface); }
.so-banner--gift .so-banner-icon { color: var(--success); }
.so-banner-icon svg { width: 1.5rem; height: 1.5rem; }

/* =================================================================
   A · Cuento: child-first storybook scroll
   ================================================================= */
.so-a { overflow-x: clip; }
.so-a-cover { position: relative; padding: var(--s8) var(--s5) var(--s12); max-width: 72rem; margin: 0 auto; display: grid; gap: var(--s6); }
.so-a-cover-art { position: relative; height: 15rem; margin: 0 auto; width: 100%; max-width: 22rem; }
.so-a-cover-nuno { position: absolute; left: 6%; bottom: 0; width: 44%; }
.so-a-cover-nube { position: absolute; right: 0; bottom: 6%; width: 52%; }
.so-a-cover-art::before { content: ""; position: absolute; inset: 12% 8% 0; border-radius: 50%; background: var(--surface-raised); }
.so-a-cover-copy { display: grid; gap: var(--s4); justify-items: start; }
.so-a-cover-copy .so-btn { margin-top: var(--s2); }

@media (width <= 819px) {
  .so-a-cover-copy { text-align: center; justify-items: center; }
  .so-a-cover-copy .so-btn { width: 100%; }
}

@media (width >= 820px) {
  .so-a-cover { grid-template-columns: 1.1fr 1fr; align-items: center; padding: var(--s16) var(--s10); }
  .so-a-cover-art { order: 2; height: 26rem; max-width: none; }
}

.so-a-chapter { padding: var(--s12) var(--s5); max-width: 44rem; margin: 0 auto; border-top: 1px solid var(--border-subtle); }
.so-a-chapter--wide { max-width: 72rem; }
.so-a-chapter > .so-lede { margin-top: var(--s3); }
.so-a-chapter .so-section { padding: 0; }
.so-chapter-n { font: 600 0.9375rem/1 var(--font-display); color: var(--accent-soft); letter-spacing: .08em; text-transform: uppercase; margin-bottom: var(--s3); }
.so-a-steps { display: grid; gap: var(--s5); margin-top: var(--s6); }
.so-a-step { display: grid; grid-template-columns: 3.5rem 1fr; gap: var(--s4); align-items: start; }
.so-a-step-icon { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-raised); color: var(--accent-soft); }
.so-a-step-icon svg { width: 1.5rem; height: 1.5rem; }
.so-a-step .so-muted { margin-top: var(--s1); }
.so-a-shelf-wrap { padding: var(--s12) var(--s5); max-width: 72rem; margin: 0 auto; border-top: 1px solid var(--border-subtle); }
.so-a-shelf-wrap .so-muted { margin-top: var(--s2); }

@media (width >= 820px) {
  .so-a-shelf-wrap { padding-inline: var(--s10); }
  .so-a-shelf-wrap .so-shelf { grid-auto-columns: 1fr; margin-inline: 0; padding: 0; }
}
.so-a-quote figure { text-align: center; }
.so-a-quote blockquote p { font: 600 1.625rem/1.3 var(--font-display); text-wrap: balance; }
.so-a-quote figcaption { margin-top: var(--s4); color: var(--text-muted); }
.so-a-end { text-align: center; padding: var(--s16) var(--s5); display: grid; justify-items: center; gap: var(--s4); border-top: 1px solid var(--border-subtle); background: var(--surface-rail); }
.so-a-end-nube { width: 12rem; margin-bottom: var(--s2); }
.so-a-end .so-lede { margin-inline: auto; }

@media (width <= 819px) { .so-a-end .so-btn { width: 100%; } }


/* C · auth: a sheet over the story that was playing */
.so-c-auth { min-height: 100dvh; position: relative; display: flex; flex-direction: column; background: var(--surface-rail); }
.so-c-auth-backdrop { position: absolute; inset: 0 0 auto; height: 22rem; overflow: hidden; }
.so-c-auth-bg { width: 100%; height: 100%; object-fit: cover; filter: saturate(.6) brightness(.45) blur(2px); transform: scale(1.05); }
.so-c-auth-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, var(--surface-rail)); }
.so-c-auth-bar { position: relative; z-index: 1; }
.so-c-nowplaying { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); border-radius: var(--r-pill); background: var(--scrim); color: var(--text-secondary); font-size: var(--text-sm); font-weight: 600; max-width: 70%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.so-c-nowplaying svg { color: var(--accent); width: 1rem; height: 1rem; }

.so-c-sheet {
  position: relative; z-index: 1; margin-top: auto; padding: var(--s3) var(--s5) calc(var(--safe-b) + var(--s6));
  background: var(--surface-sheet); border-radius: var(--r-sheet) var(--r-sheet) 0 0; border-top: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-float);
}
.so-c-sheet > .so-mark { margin: var(--s4) 0 var(--s5); }
.so-c-grabber { display: block; width: 2.5rem; height: 5px; border-radius: 5px; background: var(--surface-pressed-strong); margin: 0 auto; }
.so-c-lang { margin-top: var(--s6); display: flex; justify-content: center; }

@media (width >= 820px) {
  .so-c-auth { justify-content: center; align-items: center; }
  .so-c-auth-backdrop { height: 100%; }
  .so-c-auth-backdrop::after { background: var(--scrim); }
  .so-c-auth-bar { position: absolute; top: 0; left: 0; right: 0; padding-inline: var(--s8); }
  .so-c-sheet { margin: var(--s16) 0; width: var(--sheet-w); border-radius: var(--r-sheet); border: 1px solid var(--border-subtle); padding: var(--s6) var(--s8) var(--s8); }
  .so-c-grabber { display: none; }
}

/* Sign-in sheet on the landing: slides up on a phone, centered dialog on desktop */
.so-dialog {
  position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: 92dvh; margin: 0; padding: 0; overflow: auto;
  border: 0; border-top: 1px solid var(--border-subtle); border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--surface-sheet); color: var(--text-primary); box-shadow: var(--shadow-float);
}
.so-dialog[open] { animation: so-sheet-up .28s var(--ease); }
.so-dialog-panel { position: relative; padding: var(--s3) var(--s5) calc(var(--safe-b) + var(--s6)); }
.so-dialog::backdrop { background: var(--scrim); }
.so-dialog .so-mark { margin: var(--s4) 0 var(--s5); }
.so-dialog-close { position: absolute; top: var(--s3); right: var(--s3); width: var(--tap); height: var(--tap); display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); cursor: pointer; }
.so-dialog-close:active { background: var(--surface-pressed); }
.so-dialog-close svg { width: 1.5rem; height: 1.5rem; }

@keyframes so-sheet-up {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) { .so-dialog[open] { animation: none; } }

@media (width >= 820px) {
  .so-dialog { inset: 0; margin: auto; width: var(--sheet-w); max-width: calc(100vw - var(--s8)); height: fit-content; border: 1px solid var(--border-subtle); border-radius: var(--r-sheet); animation: none; }
  .so-dialog-panel { padding: var(--s6) var(--s8) var(--s8); }
  .so-dialog .so-c-grabber { display: none; }
}

/* Language picker (footer and standalone sign-in) */
.so-langs { display: flex; flex-wrap: wrap; gap: var(--s2); }
.so-langs .so-lang[aria-current="true"], .so a.so-lang[aria-current="true"] { background: var(--surface-pressed); color: var(--text-primary); }

.so-play[hidden] { display: none; }
.so-google { display: flex; justify-content: center; min-height: 3.5rem; }
.so-sr:focus { position: fixed; top: var(--s2); left: var(--s2); width: auto; height: auto; clip: auto; padding: var(--s3) var(--s4); background: var(--surface-sheet); border-radius: var(--r-pill); z-index: 40; }
