
/* ── TOKENS — locked to SaintStream style guide ───── */
:root {
  --gold:    #D9A441;
  --amber:   #E8C56A;
  --copper:  #CB5A2A;
  --slate:   #1E2A3A;
  --blue:    #65B9FF;
  --lake:    #65B9FF;
  --royal:   #0A6CF0;   /* deeper blue — highlighted tile/chip edge glow */
  --purple:  #3B256D;
  --white:   #ffffff;
  --cloud:   #F2F5FA;
  --red:     #E5484D;   /* error/deny — was only ever a var() fallback until V1.691 */
  --red-rgb: 229,72,77;
  /* SaintStream v6 spring-glass palette */
  --sky-blue:#65B9FF; --lavender:#B68CFF; --soft-green:#7AD59A;
  --white-light:#F5F7FB; --warm-gold:#D9A441; --silver-mist:#AEB7C7;
  --deep-night:#0A0B0F; --graphite:#161A22;
  --grad: linear-gradient(135deg, #D9A441 0%, #65B9FF 58%, #B68CFF 100%);
  --surface: #ffffff;
  --bg:     #F2F5FA;
  --border: #dde5f0;
  --text:   #1E2A3A;
  --text2:  #5a6a7a;
  --ink:    #0f1e2e;
  --dim:    #7a8fa3;
  --nav-h:  78px;
  --hdr-h:  58px;
  /* format identity colors + glows */
  --accent-featured: #D9A441;
  --accent-playlists:#FFB86B;
  --accent-tribes:   #E9858F;
  --accent-watch:    #B68CFF;
  --accent-listen:   #65B9FF;
  --accent-read:     #7AD59A;
  --accent-light:    #F5F7FB;
  --accent-learn:    #AEB7C7;
  /* RGB triplets — used as *light behavior* (edge rim, halo), never as a body fill */
  --accent-featured-rgb: 217,164,65;
  --accent-playlists-rgb:255,184,107;
  --accent-tribes-rgb:   233,133,143;
  --accent-watch-rgb:    182,140,255;
  --accent-listen-rgb:   101,185,255;
  --accent-read-rgb:     122,213,154;
  --accent-light-rgb:    245,247,251;
  --accent-learn-rgb:    174,183,199;

  /* SaintStream wordmark / waveform palette.
     Light variant = the vibrant logo used for splash, login, marketing surfaces, light-mode UI.
     Dark variant  = subdued logo for the persistent dark-mode in-app header so it
                     integrates with deep-night chrome instead of dominating the screen.
     Tokens are wired once the logo asset is delivered as an SVG with per-element
     class names (Saint, Stream, waveform, play-icon, tagline); until then the
     dark-mode header PNG is approximated via a saturate/brightness/contrast filter
     on #hdr-logo img — see the rule near #hdr-logo. */
  --logo-light-saint:       #F5A800;
  --logo-light-stream-start:#146BFF;
  --logo-light-stream-mid:  #1CB8E8;
  --logo-light-stream-end:  #00CFA8;
  --logo-dark-saint:        #D9A441;
  --logo-dark-stream-start: #5C91F2;
  --logo-dark-stream-mid:   #58BFE8;
  --logo-dark-stream-end:   #5DD6B3;
  --logo-dark-tagline:      rgba(245,247,251,.72);
  --logo-dark-wave-opacity: .86;
  --logo-dark-icon-opacity: .9;
  --logo-dark-glow-opacity: .18;
}

/* ── DARK THEME (default) ─────────────────────────── */
html[data-theme="dark"]{
  --surface:#161A22;   /* graphite card / panel surface */
  --bg:     #0B0B0D;   /* deep-night page background — neutral, no blue tint */
  --cloud:  #1B2030;   /* secondary surface, placeholders */
  --border: rgba(245,247,251,.10);
  --text:   #F5F7FB;
  --text2:  #AEB7C7;
  --dim:    #6B7486;
  --glass:     rgba(22,26,34,.55);
  --glass-brd: rgba(245,247,251,.14);
  /* OPAQUE tile/media fill — the animated wave field must NOT show through
     tiles or reading/media surfaces (Robert 2026-07-11). One token so every
     tile shares the same solid body; appearance packs can override --tile-solid. */
  --tile-solid: #161c26;
}
:root{
  --glass:     rgba(255,255,255,.72);
  --glass-brd: rgba(255,255,255,.6);
  --tile-solid: #ffffff;
}
/* dark overrides for elements with hardcoded light colors */
html[data-theme="dark"] #book-reader{background:#10131c !important}
html[data-theme="dark"] .reader-chapter-title{color:var(--text)}
html[data-theme="dark"] .reader-text{color:#c4cedb}

/* ── RESET ────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html{height:100%;overflow:hidden;background:#0B0B0D}
body{font-family:'Inter','Montserrat',system-ui,sans-serif;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;height:100%;overflow:hidden;max-width:480px;margin:0 auto;position:relative;box-shadow:0 0 40px rgba(0,0,0,.35)}
html[data-theme="dark"] body{ background:#0B0B0D; }

/* ═══ Atmospheric layer — deep-night base + animated flowing wave lines ═══
   Only the base color and the SVG flowlines render here. Earlier orb + radial-wash
   experiments were removed (see project memory). Sits behind all app content (z 0);
   glass tiles reveal the wave field softly. */
#atmosphere{
  position:absolute; inset:0; z-index:0; overflow:hidden; pointer-events:none;
  background:#0B0B0D;
}
#atmosphere .flowlines{
  position:absolute; inset:0; width:100%; height:100%; opacity:.8;
  -webkit-mask-image:linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
          mask-image:linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}
#atmosphere .flowlines path{ fill:none; stroke:rgba(176,200,236,.22); stroke-width:1.2; }
/* Auth-screen flowlines — same atmospheric wave field as the rest of the
   app, layered behind .auth-glow and .auth-inner. */
#auth .flowlines{
  position:absolute; inset:0; width:100%; height:100%; z-index:0; opacity:.8;
  pointer-events:none;
  -webkit-mask-image:linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
          mask-image:linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}
#auth .flowlines path{ fill:none; stroke:rgba(176,200,236,.22); stroke-width:1.2; }
/* Light theme: pale base + dark wave stroke */
html[data-theme="light"] #atmosphere{ background:#F2F5FA; }
html[data-theme="light"] #atmosphere .flowlines path{ stroke:rgba(40,55,80,.14); }
/* Animated wave field OFF — user preference (Settings › Appearance). Hides the
   flowing lines on both the app atmosphere and the auth screen; the flat base
   color stays. The rAF loop is also stopped in boot.js (flowSetEnabled). */
html.waves-off .flowlines{ display:none; }

/* ═══ Appearance Packs — seasonal background + color scheme (js/appearance/appearance.js).
   The atmosphere base is recolored from validated custom properties only; an image
   pack sits under a scrim so glass tiles + text stay readable. Tiles/text unchanged. */
html.has-pack #atmosphere{ background: var(--pack-bg-base, #0B0B0D); }
html.has-pack.pack-grad #atmosphere{ background: var(--pack-bg-grad), var(--pack-bg-base, #0B0B0D); }
html.has-pack.pack-image #atmosphere{
  background-image:
    linear-gradient(rgba(8,10,14,var(--pack-scrim,.55)), rgba(8,10,14,var(--pack-scrim,.55))),
    var(--pack-bg-image);
  background-size:cover; background-position:center; background-repeat:no-repeat;
}
html.pack-hide-waves .flowlines{ display:none; }
/* pack picker chips (Settings › Appearance) */
#pack-picker{ display:flex; gap:8px; flex-wrap:wrap; padding:2px 0; }
.pack-chip{ display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:var(--r-pill,999px);
  background:var(--panel-bg,#151b27); border:1px solid var(--tile-brd,rgba(120,138,160,.22)); color:var(--text2,#c7d2e0);
  font-size:.78rem; font-weight:600; cursor:pointer; }
.pack-chip.on{ border-color:var(--pack-accent,#65B9FF); color:var(--white,#fff); box-shadow:0 0 0 1px var(--pack-accent,#65B9FF) inset; }
.pack-chip .pack-swatch{ width:16px; height:16px; border-radius:50%; border:1px solid rgba(255,255,255,.18);
  background:linear-gradient(135deg,#0B0B0D,#1b2230); }
.pack-chip .pack-swatch[data-pack="christmas"]{ background:linear-gradient(135deg,#0b1a12 40%,#e0553b 100%); }
/* ── Skin Kit v1 theme layers (all values validated in appearance.js) ──
   pack-tiles: themed tile glass — the value is alpha-clamped + dark-guarded, so
   it routes through the shared --tile-bg token without hurting readability.
   pack-heading: display lettering only (h1/h2/section labels), contrast-checked.
   pack-cap: decorative strip (e.g. collected snow) painted on header blocks. */
html.pack-tiles{ --tile-bg: var(--pack-tile-bg); }
html.pack-heading :is(h1, h2, .pf-sec-lbl){ color: var(--pack-heading); }
html.pack-cap :is(.browse-hdr, .profile-hdr){ position:relative; }
html.pack-cap :is(.browse-hdr, .profile-hdr)::after{
  content:''; position:absolute; left:0; right:0; top:0; height:38px;
  background:var(--pack-tile-cap) top center/100% auto no-repeat;
  pointer-events:none; opacity:.92;
}
h1,h2,h3,.head{font-family:'Space Grotesk','Montserrat',system-ui,sans-serif}
/* ── reusable tile surface (solid card) ──
   The v6 smoked-glass material (backdrop-blur body + edge-light pseudo layers)
   was retired 2026-07-11 (Robert: "get rid of the glass tile, it's not
   working" — it read muddy over the animated wave field). Tiles are now a clean
   SOLID card: opaque --tile-solid body, a thin accent-tinted border for identity,
   and a soft drop shadow for depth. No blur, no ::before/::after light layers,
   so the moving wave field never shows through and there are no repaint streaks. */
.glass,.glass-tile{
  position:relative;overflow:hidden;
  box-sizing:border-box;
  --accent-rgb:245,247,251;            /* neutral fallback if no accent class */
  background:var(--tile-solid,#161c26);
  border:1px solid rgba(var(--accent-rgb,245,247,251),.14);
  box-shadow:0 2px 10px rgba(0,0,0,.22);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
/* keep tile content above nothing special now, but preserve the stacking rule
   other code relies on */
.glass>*,.glass-tile>*{position:relative;z-index:1}
.glass:hover,.glass-tile:hover{transform:translateY(-2px);
  box-shadow:0 8px 22px rgba(0,0,0,.30);border-color:rgba(var(--accent-rgb,245,247,251),.30)}
.glass:active,.glass-tile:active{transform:translateY(1px) scale(.99)}
.accent-for-you{--accent-color:#D9A441;--accent-rgb:217,164,65;--accent-glow:rgba(217,164,65,.30)}
.accent-featured{--accent-color:#D9A441;--accent-rgb:217,164,65;--accent-glow:rgba(217,164,65,.30)}
.accent-playlists{--accent-color:#FFB86B;--accent-rgb:255,184,107;--accent-glow:rgba(255,184,107,.30)}
.accent-tribes{--accent-color:#E9858F;--accent-rgb:233,133,143;--accent-glow:rgba(233,133,143,.30)}
.accent-watch{--accent-color:#B68CFF;--accent-rgb:182,140,255;--accent-glow:rgba(182,140,255,.30)}
.accent-listen{--accent-color:#65B9FF;--accent-rgb:101,185,255;--accent-glow:rgba(101,185,255,.30)}
.accent-read{--accent-color:#7AD59A;--accent-rgb:122,213,154;--accent-glow:rgba(122,213,154,.28)}
.accent-learn{--accent-color:#AEB7C7;--accent-rgb:174,183,199;--accent-glow:rgba(174,183,199,.28)}
.accent-light{--accent-color:#F5F7FB;--accent-rgb:245,247,251;--accent-glow:rgba(245,247,251,.26)}
button{font-family:inherit;cursor:pointer;border:none;background:none}
input,textarea{font-family:inherit;border:none;outline:none}
img{display:block}
input[type=range]{-webkit-appearance:none;appearance:none}

/* ── HIDDEN YT PLAYER ─────────────────────────────── */
#yt{position:fixed;width:1px;height:1px;top:-999px;left:-999px;pointer-events:none;z-index:-1}

/* ═══════════════════════════════════════════
   AUTH SCREEN
═══════════════════════════════════════════ */
#auth{
  position:fixed;inset:0;
  background:#0B0B0D;   /* match site's deep-night base (was a bluish gradient) */
  display:none;flex-direction:column;
  overflow-y:auto;z-index:9999;
  max-width:480px;margin:0 auto;
  padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px);
}
#auth.on{display:flex}

/* ── Face lineup on the auth screen (v98) ─────────────────────────────
   Shows cached adults (and, in v99, kids) above the email/password form.
   Tap an adult tile to unlock with a 4-digit PIN. */
.face-lineup{
  width:100%;max-width:380px;margin:0 auto 14px;
  padding:14px 12px 6px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  border-radius:18px;
}
.face-lineup[hidden]{display:none}
.face-lineup-label{
  font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;
  color:var(--dim,#9aa3b4);text-align:center;margin-bottom:10px;
}
.face-lineup-list{display:flex;flex-direction:column;gap:8px;margin-bottom:6px;}
.face-tile{
  display:flex;align-items:center;gap:12px;
  padding:10px 12px;border-radius:14px;cursor:pointer;
  background:#1A1F2A;
  border:1px solid rgba(255,255,255,.06);
  transition:background .15s,border-color .15s,transform .1s;
  width:100%;text-align:left;color:inherit;font:inherit;
}
.face-tile:hover,.face-tile:focus-visible{
  background:#222838;border-color:rgba(217,164,65,.4);outline:none;
}
.face-tile:active{transform:scale(.98)}
.face-tile-av{
  width:52px;height:52px;border-radius:50%;
  background:linear-gradient(135deg,#65B9FF,#B68CFF);
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-weight:700;font-size:1.2rem;
  flex-shrink:0;overflow:hidden;
}
.face-tile-av img{width:100%;height:100%;object-fit:cover;}
.face-tile-av.kid{background:linear-gradient(135deg,#D9A441,#FFD78A);font-size:1.6rem;}
.face-tile-body{flex:1;min-width:0;}
.face-tile-name{font-weight:600;line-height:1.2;}
.face-tile-meta{font-size:.76rem;color:var(--dim,#9aa3b4);margin-top:2px;}
.face-tile-arr{color:var(--dim,#9aa3b4);font-size:1.4rem;flex-shrink:0;line-height:1;}
.face-lineup-fallback{
  text-align:center;font-size:.78rem;color:var(--dim,#9aa3b4);padding:6px 0 0;
}

/* ── PIN pad overlay ─────────────────────────────────────────────── */
.pinpad-overlay{
  position:fixed;inset:0;z-index:10050;
  background:rgba(8,12,20,.78);backdrop-filter:blur(10px);
  display:none;align-items:center;justify-content:center;padding:20px;
}
.pinpad-overlay.on{display:flex;}
.pinpad-card{
  width:100%;max-width:340px;border-radius:22px;
  background:linear-gradient(180deg,#1A2030,#0E141E);
  border:1px solid rgba(255,255,255,.08);
  padding:22px 22px 18px;position:relative;
  box-shadow:0 24px 60px rgba(0,0,0,.5);
}
.pinpad-x{
  position:absolute;top:8px;right:8px;width:36px;height:36px;
  background:transparent;border:none;color:var(--dim,#9aa3b4);
  font-size:1.6rem;cursor:pointer;line-height:1;
}
.pinpad-face{display:flex;flex-direction:column;align-items:center;gap:8px;margin-bottom:12px;}
.pinpad-avatar{
  width:64px;height:64px;border-radius:50%;
  background:linear-gradient(135deg,#65B9FF,#B68CFF);
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-weight:700;font-size:1.5rem;overflow:hidden;
}
.pinpad-avatar img{width:100%;height:100%;object-fit:cover;}
.pinpad-name{font-weight:600;font-size:1rem;}
.pinpad-prompt{text-align:center;color:var(--dim,#9aa3b4);font-size:.85rem;margin-bottom:14px;}
.pinpad-dots{display:flex;justify-content:center;gap:16px;margin-bottom:18px;}
.pinpad-dots span{
  width:14px;height:14px;border-radius:50%;
  background:rgba(255,255,255,.12);
  transition:background .12s,transform .12s;
}
.pinpad-dots span.on{background:#D9A441;transform:scale(1.15);}
.pinpad-dots.shake{animation:pinpad-shake .4s;}
@keyframes pinpad-shake{
  0%,100%{transform:translateX(0);}
  20%{transform:translateX(-6px);}
  40%{transform:translateX(6px);}
  60%{transform:translateX(-4px);}
  80%{transform:translateX(4px);}
}
.pinpad-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;}
.pinpad-key{
  height:56px;border-radius:14px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  color:#F5F7FB;font-size:1.3rem;font-weight:600;
  cursor:pointer;user-select:none;
  transition:background .1s,transform .05s;
}
.pinpad-key:not(.empty):hover{background:rgba(255,255,255,.12);}
.pinpad-key:not(.empty):active{background:rgba(255,255,255,.2);transform:scale(.96);}
.pinpad-key.empty{background:transparent;border:none;cursor:default;pointer-events:none;}
.pinpad-key.bs{font-size:1.2rem;}
.pinpad-pw{
  display:block;margin:14px auto 0;padding:6px 12px;
  background:transparent;border:none;color:var(--dim,#9aa3b4);
  font-size:.85rem;cursor:pointer;text-decoration:underline;
}
.pinpad-pw:hover{color:#F5F7FB;}

/* ── iOS Safari auth fixes (V1.536) ───────────────────────────────────
   (1) Two quick taps on the same PIN key read as double-tap-to-zoom on
   iOS (user-scalable=no is ignored there), eating the second digit AND
   zooming the screen. touch-action:manipulation keeps pan/pinch but
   kills double-tap zoom across the gate + pad. */
#auth,#auth *,.pinpad-overlay,.pinpad-overlay *{touch-action:manipulation}
/* (2) iOS zooms the page when a focused input is under 16px — keep the
   auth fields at 16px so the screen stays put while typing. */
#auth .form-field{font-size:16px}
/* (3) Auth toasts render bottom-center, behind the on-screen keyboard —
   on the gate, show them near the top so PIN/sign-in errors are seen. */
body:has(#auth.on) #toast{bottom:auto;top:16vh}
/* (4) While the keyboard is up (an auth field focused), give the gate
   scroll room so Continue-with-Google / Enter-as-Guest stay reachable. */
#auth.kb{padding-bottom:48vh}

.auth-glow{
  position:absolute;top:-100px;left:50%;transform:translateX(-50%);
  width:380px;height:380px;border-radius:50%;
  background:radial-gradient(circle,rgba(242,178,51,.18) 0%,rgba(10,108,240,.08) 40%,transparent 70%);
  pointer-events:none;filter:blur(20px);
}
.auth-inner{
  position:relative;z-index:2;
  padding:34px 28px 28px;
  flex:1;display:flex;flex-direction:column;
}
.auth-logo-wrap{text-align:center;margin-bottom:8px}
.auth-logo{height:54px;max-width:280px;margin:0 auto;object-fit:contain;display:block}
.auth-logo-fb{font-size:2.1rem;font-weight:900;letter-spacing:-.03em;color:#fff}
.auth-logo-fb .g{color:var(--gold)}
.auth-logo-fb .b{color:var(--lake)}
.auth-tagline{
  text-align:center;
  font-size:.74rem;font-weight:700;letter-spacing:.18em;
  color:rgba(255,255,255,.7);
  margin-bottom:30px;text-transform:uppercase;
}
.auth-tagline .dot{color:var(--gold);margin:0 7px}

/* tabs */
.auth-tabs{
  display:flex;background:#1A1F2A;
  border-radius:99px;padding:4px;margin-bottom:22px;
  border:1px solid rgba(255,255,255,.08);
}
.auth-tab{
  flex:1;padding:11px;border-radius:99px;
  font-size:.8rem;font-weight:700;color:rgba(255,255,255,.4);
  transition:all .2s;cursor:pointer;opacity:.55;
}
.auth-tab:hover{opacity:.8}
.auth-tab.on{
  background:var(--grad);color:#fff;opacity:1;
  box-shadow:0 4px 14px rgba(10,108,240,.35);
}
.auth-tab.on:hover{opacity:1;filter:brightness(1.06)}

/* form */
.auth-form{display:none;flex-direction:column;gap:14px;flex:1}
.auth-form.on{display:flex}

/* Sam's hello on the signup form — Liahona + "Click me" arrow. The pulse is the
   whole point: it has to read as tappable, because the tap is what unlocks
   audio playback (browsers block sound before a user gesture). */
.su-sam{display:flex;align-items:center;gap:12px;margin-bottom:2px}
.su-sam-orb{flex:0 0 auto;width:62px;height:62px;padding:0;border:0;border-radius:50%;cursor:pointer;
  background:radial-gradient(circle at 50% 40%,rgba(255,255,255,.16),rgba(255,255,255,.04));
  display:grid;place-items:center;animation:suSamPulse 2.4s ease-in-out infinite}
.su-sam-orb img{width:52px;height:52px;object-fit:contain;display:block}
.su-sam-orb:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.su-sam-nudge{display:flex;align-items:center;gap:7px;color:var(--text2);min-width:0;
  background:none;border:0;padding:0;text-align:left;cursor:pointer}
.su-sam-arrow{width:34px;height:22px;flex:0 0 auto;color:var(--text2);opacity:.85;
  animation:suSamPoint 1.6s ease-in-out infinite}
.su-sam-say{font-family:var(--head);font-size:.9rem;font-weight:600;line-height:1.35}
.su-sam-nudge:hover .su-sam-say{color:var(--text)}
@keyframes suSamPulse{0%,100%{transform:scale(1);box-shadow:0 0 0 0 rgba(242,178,51,.34)}
  50%{transform:scale(1.05);box-shadow:0 0 0 12px rgba(242,178,51,0)}}
@keyframes suSamPoint{0%,100%{transform:translateX(0)}50%{transform:translateX(-5px)}}
@media(prefers-reduced-motion:reduce){.su-sam-orb,.su-sam-arrow{animation:none!important}}

/* Pre-signup Q&A panel — opens under the Liahona on the landing screen. Dark
   auth theme; sized to sit alongside the sign-in form without crowding it. */
.su-ask{margin:4px 0 2px;border:1px solid rgba(255,255,255,.12);border-radius:16px;
  background:rgba(255,255,255,.04);padding:12px;display:flex;flex-direction:column;gap:10px}
.su-ask-head{display:flex;align-items:center;justify-content:space-between}
.su-ask-title{font-family:var(--head);font-weight:700;font-size:.92rem;color:var(--text)}
.su-ask-close{background:none;border:0;color:var(--text2);font-size:.95rem;cursor:pointer;line-height:1;padding:4px}
.su-ask-close:hover{color:var(--text)}
.su-ask-log{display:flex;flex-direction:column;gap:8px;max-height:230px;overflow-y:auto;
  -webkit-overflow-scrolling:touch}
.su-ask-log:empty{display:none}
.su-ask-msg{font-size:.86rem;line-height:1.45;padding:9px 12px;border-radius:13px;max-width:88%;white-space:pre-wrap;overflow-wrap:anywhere}
.su-ask-q{align-self:flex-end;background:linear-gradient(135deg,var(--gold),#e5b91f);color:#0a0b14;font-weight:600;border-bottom-right-radius:5px}
.su-ask-a{align-self:flex-start;background:rgba(255,255,255,.08);color:var(--text);border-bottom-left-radius:5px}
.su-ask-a.err{background:rgba(224,137,74,.16);color:#f0c9a8}
.su-ask-typing{align-self:flex-start;display:inline-flex;gap:4px;padding:11px 13px;border-radius:13px;background:rgba(255,255,255,.08)}
.su-ask-typing span{width:6px;height:6px;border-radius:50%;background:var(--text2);opacity:.6;animation:suAskBlink 1.2s infinite}
.su-ask-typing span:nth-child(2){animation-delay:.2s}
.su-ask-typing span:nth-child(3){animation-delay:.4s}
@keyframes suAskBlink{0%,60%,100%{opacity:.25;transform:translateY(0)}30%{opacity:.9;transform:translateY(-3px)}}
.su-ask-chips{display:flex;flex-wrap:wrap;gap:6px}
.su-ask-chip{font-size:.76rem;font-weight:600;color:var(--text2);cursor:pointer;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);border-radius:999px;padding:6px 11px}
.su-ask-chip:hover{color:var(--text);border-color:rgba(255,255,255,.24)}
.su-ask-row{display:flex;gap:8px;align-items:center}
.su-ask-input{flex:1;min-width:0;background:rgba(255,255,255,.06);border:1.5px solid rgba(255,255,255,.12);
  border-radius:999px;padding:10px 14px;color:var(--text);font-size:.86rem}
.su-ask-input:focus{outline:none;border-color:var(--gold);background:rgba(255,255,255,.09)}
.su-ask-input::placeholder{color:rgba(255,255,255,.4)}
.su-ask-send{flex:0 0 auto;width:38px;height:38px;border-radius:50%;border:0;cursor:pointer;
  display:grid;place-items:center;background:linear-gradient(135deg,var(--gold),#e5b91f);color:#0a0b14}
.su-ask-send svg{width:17px;height:17px}
.su-ask-send:disabled{opacity:.5;cursor:default}
.form-field{
  background:rgba(255,255,255,.06);
  border:1.5px solid rgba(255,255,255,.1);
  border-radius:12px;
  padding:13px 16px;
  font-size:.88rem;font-weight:500;color:#fff;
  transition:border-color .15s,background .15s;
}
.form-field:focus{border-color:var(--gold);background:rgba(255,255,255,.09)}
.form-field::placeholder{color:rgba(255,255,255,.4)}
.pw-wrap{position:relative;display:flex}
.pw-wrap .form-field{flex:1;padding-right:64px}
.pw-toggle{
  position:absolute;right:7px;top:50%;transform:translateY(-50%);
  background:none;border:0;cursor:pointer;
  font-size:.72rem;font-weight:700;letter-spacing:.04em;
  color:var(--gold);padding:6px 9px;border-radius:8px;
}
.pw-toggle:hover{background:rgba(255,255,255,.08)}
.auth-forgot{margin-top:-6px;text-align:center;font-size:.78rem;font-weight:600;color:var(--gold);cursor:pointer;opacity:.85}
/* Sign-in method pills + segmented PIN boxes (QuickAccess-S1, Robert-directed —
   PIN separated from email/password so the OS never autofills a saved password
   over PIN entry). Coordinated with Auth-S1 (owns the auth screen). */
.signin-mode{display:flex;gap:8px;margin-bottom:12px}
.signin-pill{flex:1;padding:10px 10px;border-radius:99px;border:1.5px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);color:rgba(255,255,255,.66);font-size:.8rem;font-weight:700;cursor:pointer;transition:all .15s}
.signin-pill.on{background:var(--gold);border-color:var(--gold);color:#161007}
#si-pin-fields{display:flex;flex-direction:column}
/* The display:flex above is an ID selector, so it outranks the UA's
   [hidden]{display:none} — without this guard setSigninMode('pw') set the
   attribute but the PIN boxes stayed on screen next to the password field. */
#si-pin-fields[hidden]{display:none}
.pin-boxes-label{text-align:center;font-size:.9rem;font-weight:700;color:#fff;margin:2px 0 12px}
.pin-boxes{display:flex;gap:10px;justify-content:center}
.pin-box{
  width:100%;max-width:62px;height:66px;text-align:center;
  font-size:1.7rem;font-weight:800;color:#fff;
  background:rgba(255,255,255,.06);border:1.5px solid rgba(255,255,255,.14);border-radius:14px;
  caret-color:var(--gold);transition:border-color .12s,box-shadow .12s,background .12s;
}
.pin-box:focus{outline:none;border-color:var(--gold);background:rgba(255,255,255,.09);box-shadow:0 0 0 3px rgba(212,164,65,.22)}
.pin-box.filled{border-color:var(--gold)}
.pin-boxes-hint{text-align:center;font-size:.72rem;color:rgba(255,255,255,.45);margin-top:10px}

/* Which account the typed PIN will unlock. */
.pin-target{margin-bottom:12px}
.pin-target-row{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border-radius:14px;
  border:1.5px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);cursor:pointer;text-align:left}
.pin-target-row:hover{background:rgba(255,255,255,.08)}
.pin-target-av{flex:0 0 auto;width:34px;height:34px;border-radius:50%;overflow:hidden;display:flex;align-items:center;
  justify-content:center;background:var(--slate);color:#fff;font-weight:800;font-size:.85rem}
.pin-target-av img{width:100%;height:100%;object-fit:cover;display:block}
.pin-target-body{flex:1 1 auto;min-width:0}
.pin-target-name{display:block;font-size:.86rem;font-weight:700;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pin-target-sub{display:block;font-size:.68rem;color:rgba(255,255,255,.5)}
.pin-target-switch{flex:0 0 auto;font-size:.7rem;font-weight:700;color:var(--gold)}
.pin-target-list{margin-top:6px;display:flex;flex-direction:column;gap:6px}
.pin-target-list[hidden]{display:none}
.pin-target-opt{display:flex;align-items:center;gap:10px;width:100%;padding:7px 10px;border-radius:12px;
  border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04);color:#fff;font-size:.8rem;font-weight:600;
  cursor:pointer;text-align:left}
.pin-target-opt:hover{background:rgba(255,255,255,.09)}
.pin-target-opt.on{border-color:var(--gold)}

/* Error state — a red panel BEHIND and AROUND the digit boxes, so a wrong PIN
   is impossible to miss (a toast was too small to read at arm's length). */
.pin-shell{border-radius:16px;padding:0;transition:background .18s,border-color .18s,padding .18s;
  border:1.5px solid transparent}
.pin-shell.err{background:rgba(var(--red-rgb),.18);border-color:var(--red);padding:14px 12px 12px;
  animation:pinShellShake .38s cubic-bezier(.36,.07,.19,.97)}
.pin-shell.err .pin-box{border-color:rgba(var(--red-rgb),.75)}
.pin-error{margin-top:12px;text-align:center}
.pin-error[hidden]{display:none}
.pin-error-title{font-size:.95rem;font-weight:800;color:#fff;letter-spacing:.01em}
.pin-error-sub{margin-top:4px;font-size:.72rem;font-weight:600;color:rgba(255,255,255,.82);line-height:1.35}
@keyframes pinShellShake{
  10%,90%{transform:translateX(-2px)} 20%,80%{transform:translateX(4px)}
  30%,50%,70%{transform:translateX(-7px)} 40%,60%{transform:translateX(7px)}
}
@media (prefers-reduced-motion:reduce){ .pin-shell.err{animation:none} }
.auth-forgot:hover{opacity:1}
.auth-reset-note{font-size:.8rem;line-height:1.45;color:rgba(255,255,255,.6)}
.form-row{display:flex;gap:10px}
.form-row .form-field{flex:1}

.form-label{
  font-size:.62rem;font-weight:800;letter-spacing:.14em;
  text-transform:uppercase;color:rgba(255,255,255,.55);
  margin:8px 0 -4px 2px;
}
.form-label-hint{font-weight:600;color:rgba(255,255,255,.4);letter-spacing:.06em;text-transform:none;margin-left:6px;font-size:.72em}

/* chips */
.chip-row{display:flex;flex-wrap:wrap;gap:7px}
.fchip{
  padding:8px 13px;border-radius:99px;
  background:#1A1F2A;
  border:1.5px solid rgba(255,255,255,.12);
  font-size:.72rem;font-weight:700;color:rgba(255,255,255,.72);
  transition:all .15s;
}
.fchip.on{
  background:var(--gold);border-color:var(--gold);color:var(--slate);
  box-shadow:0 2px 10px rgba(242,178,51,.35);
}
.fchip:disabled{opacity:.35;cursor:not-allowed}

/* role cards */
.role-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.role-grid.two{grid-template-columns:1fr 1fr}
.role-card{
  padding:14px 6px;border-radius:13px;
  background:#1A1F2A;
  border:1.5px solid rgba(255,255,255,.1);
  display:flex;flex-direction:column;align-items:center;gap:5px;
  font-size:.72rem;font-weight:700;color:rgba(255,255,255,.7);
  transition:all .15s;
}
.role-card-ic{display:flex;justify-content:center;line-height:1;color:var(--lake)}
.role-card-ic svg{width:26px;height:26px}
.role-card.on{
  background:linear-gradient(135deg,rgba(242,178,51,.22),rgba(10,108,240,.18));
  border-color:var(--gold);color:#fff;
  box-shadow:0 4px 16px rgba(242,178,51,.18);
}

/* standards */
.standards-check{
  display:flex;align-items:flex-start;gap:10px;
  padding:12px 14px;
  background:rgba(255,255,255,.04);
  border:1.5px solid rgba(255,255,255,.08);
  border-radius:12px;cursor:pointer;
  margin-top:4px;
}
.standards-check input{
  margin-top:2px;flex-shrink:0;width:18px;height:18px;
  accent-color:var(--gold);cursor:pointer;
}
.standards-check span{
  font-size:.72rem;line-height:1.5;color:rgba(255,255,255,.7);font-weight:500;
}
.standards-check strong{color:var(--gold);font-weight:700}

/* submit */
.auth-submit{
  margin-top:14px;padding:15px;border-radius:13px;
  background:var(--grad);color:#fff;
  font-size:.95rem;font-weight:800;letter-spacing:.02em;
  box-shadow:0 6px 22px rgba(10,108,240,.4);
  transition:transform .12s,opacity .12s;
}
.auth-submit:hover{opacity:.95}
.auth-submit:active{transform:scale(.98)}
.auth-submit:disabled{opacity:.5;cursor:not-allowed;transform:none}

.auth-switch{
  text-align:center;
  font-size:.78rem;font-weight:600;color:rgba(255,255,255,.55);
  padding:12px;cursor:pointer;
}
.auth-switch strong{color:var(--gold);font-weight:800}

/* TEMP (v156): guest bypass — testers were getting stuck in account creation.
   Always visible under the forms, whatever tab/form is showing. Remove (or
   demote) once signup friction is fixed. */
.auth-guest{
  display:block;width:100%;margin:14px 0 2px;padding:13px 16px;
  font-family:inherit;font-size:.88rem;font-weight:800;cursor:pointer;
  color:var(--gold);background:#241B0E;
  border:1.5px dashed rgba(217,164,65,.55);border-radius:12px;
  transition:background .15s,border-color .15s;
}
.auth-guest:hover{background:#33270F;border-color:var(--gold)}
.auth-guest small{display:block;font-size:.68rem;font-weight:600;color:rgba(255,255,255,.55);margin-top:3px}

/* Founder Supporter onboarding card — set apart from the paid tiers. */
.onb-plan-founder{border-color:rgba(242,178,51,.5);background:linear-gradient(180deg,rgba(242,178,51,.07),rgba(255,255,255,.03))}
.onb-plan-founder .onb-plan-grp{color:var(--gold)}

.auth-disclaim{
  font-size:.6rem;color:rgba(255,255,255,.35);
  text-align:center;line-height:1.6;margin-top:18px;
  padding:0 12px;font-weight:500;
}
.auth-disclaim strong{color:rgba(255,255,255,.5);font-weight:700}

/* ── SHELL ────────────────────────────────────────── */
#app{height:100vh;display:flex;flex-direction:column;overflow:hidden;position:relative;z-index:1}

/* ── HEADER — large Brand Primary logo, bell + gear floating in corners ─ */
#hdr{
  position:relative;
  /* The header BAR spans the full window, but its controls (back, menu, bell)
     align to the CONTENT column edges instead of the window edges, so they read
     as part of the same screen. --hdr-gutter = the side margin outside the
     centered --shellW column; max(0px,…) collapses to 0 on phones/narrow windows
     so their inset is unchanged. (Robert 2026-07-08) */
  --hdr-gutter: max(0px, calc((100vw - var(--shellW)) / 2));
  background:var(--glass);
  -webkit-backdrop-filter:blur(22px) saturate(1.5);
  backdrop-filter:blur(22px) saturate(1.5);
  border-bottom:1px solid var(--glass-brd);
  flex-shrink:0;
  box-shadow:0 4px 24px rgba(0,0,0,.28);
  padding:calc(6px + env(safe-area-inset-top,0px)) 6px 4px;  /* almost no padding around the logo */
  display:flex;justify-content:center;align-items:center;
  /* z-index above Now Playing (150) so the menu bar / logo / bell / gear are
     never covered by a fixed content panel that drifts over the header (the
     "NP covers the menu bar" regression). Stays below Sam/steward (165/170)
     and the dropdown menu (209/210), so those still open over the header. */
  overflow:hidden;z-index:155;
}
.hdr-btn{
  position:absolute;top:50%;transform:translateY(-50%);
  width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:rgba(190,198,212,.72);font-size:1.05rem;background:transparent;
  transition:background .15s,color .15s;z-index:2;
}
.hdr-btn svg{width:20px;height:20px}
.hdr-btn.left{left:calc(var(--hdr-gutter) + 12px)}
.hdr-btn.left2{left:calc(var(--hdr-gutter) + 50px)}
.hdr-btn.right{right:calc(var(--hdr-gutter) + 12px)}
.hdr-btn.right2{right:calc(var(--hdr-gutter) + 50px)}
.hdr-btn.right2 .steward-dot{
  position:absolute;top:3px;right:3px;
  width:14px;height:14px;border-radius:50%;
  background:var(--gold);color:var(--slate);
  font-size:.55rem;font-weight:900;
  display:flex;align-items:center;justify-content:center;
  border:2px solid var(--surface);
}
.hdr-btn:hover{background:var(--bg)}
.bell-wrap{position:absolute}

/* ── MAIN MENU dropdown (hamburger, top-left) ───────── */
#mainmenu-panel{
  position:fixed;
  top:calc(54px + env(safe-area-inset-top,0px));
  /* Dock to the app column's LEFT EDGE, not the window's. The column is
     --shellW wide and centered (body max-width:var(--shellW)); on a wide
     monitor a plain left:8px flies to the screen edge. Mirrors the FAB
     shell-hug idiom (~L5072). max() keeps it at 8px when the column already
     fills the viewport (phones), so phone behavior is unchanged. */
  left:max(8px, calc(50vw - var(--shellW)/2 + 8px));
  min-width:236px;
  /* SOLID panel — no glass. The menu can open over any screen (Tribes' busy
     art made the old translucent --glass body unreadable). Opaque --tile-solid
     body + no backdrop-filter guarantees readable contrast everywhere. */
  background:var(--tile-solid,#161c26);
  border:1px solid var(--glass-brd);
  border-radius:14px;
  box-shadow:0 14px 36px rgba(0,0,0,.42), 0 2px 8px rgba(0,0,0,.28);
  padding:6px;
  /* Top-level nav surface: must sit ABOVE Now Playing (150), the media-player
     overlay (120) and the Sam panels (160-170) so the menu is always reachable,
     even with a song's Now Playing screen open. (Robert 2026-07-24) */
  z-index:210;
  /* Cap height to the gap between the header and the bottom nav, then scroll
     internally — otherwise a long menu (Owner sees every item) runs off the
     bottom and its footer (version stamp) hides behind the fixed nav.
     dvh tracks mobile browser chrome; vh line is the fallback for old engines. */
  max-height:calc(100vh - 54px - env(safe-area-inset-top,0px) - var(--nav-h) - 24px);
  max-height:calc(100dvh - 54px - env(safe-area-inset-top,0px) - var(--nav-h) - 24px);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  opacity:0; transform:translateY(-6px) scale(.98);
  pointer-events:none;
  transition:opacity .14s ease, transform .14s ease;
}
#mainmenu-panel.on{opacity:1; transform:translateY(0) scale(1); pointer-events:auto}
.mm-item{
  display:flex;align-items:center;gap:12px;
  width:100%;padding:11px 12px;
  background:transparent;border:0;border-radius:9px;
  color:var(--text);font-size:.92rem;font-weight:600;text-align:left;
  cursor:pointer;transition:background .12s;
}
.mm-item:hover,.mm-item:focus-visible{background:rgba(255,255,255,.06);outline:none}
.mm-item svg{width:18px;height:18px;color:var(--dim);flex-shrink:0}
.mm-item.danger{color:#ff7a7a}
.mm-item.danger svg{color:#ff7a7a}
.mm-sep{height:1px;background:var(--glass-brd);margin:4px 6px}
/* Staff & Admin section — gated items, color-coded by access tier. Each tier
   group sets --mm-tier (inline on the label + its items): a small labelled
   sub-header with a matching dot, and items carrying a left accent stripe and a
   tinted icon. Signals "not a user-facing option" at a glance, by privilege. */
.mm-tier-label{display:flex;align-items:center;gap:7px;padding:9px 12px 3px;margin-top:2px;
  font-size:.64rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--dim)}
.mm-tier-label::before{content:"";width:7px;height:7px;border-radius:50%;
  background:var(--mm-tier,#8A9AAA);flex:none}
.mm-tier-item{border-left:3px solid var(--mm-tier,#8A9AAA);border-radius:4px 9px 9px 4px;margin-left:6px}
.mm-tier-item svg{color:var(--mm-tier,#8A9AAA)}
/* Creator Studio tab bar — a persistent strip across the upload / album /
   manage / spreadsheet screens so they read as one tabbed workspace. Rendered
   by csRenderTabs() (js/upload/upload.js) into the [data-cstabs] slot on each. */
.cs-tabs{display:flex;gap:6px;overflow-x:auto;padding:8px 16px 6px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.cs-tabs::-webkit-scrollbar{display:none}
.cs-tab{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;flex:none;
  background:rgba(255,255,255,.05);border:1px solid var(--glass-brd);color:var(--text2);
  border-radius:999px;padding:8px 14px;font-size:.82rem;font-weight:700;cursor:pointer;
  transition:background .12s,color .12s,border-color .12s}
.cs-tab:hover{background:rgba(255,255,255,.09);color:var(--text)}
.cs-tab.on{background:var(--accent-listen,#65B9FF);border-color:transparent;color:#08111e}
.cs-tab-ic{font-size:.9em}
/* Hamburger accordion group (Interactive Docs) + its nested items. */
.mm-item.mm-accordion .mm-caret{width:16px;height:16px;margin-left:auto;color:var(--dim);
  transition:transform .15s ease}
.mm-item.mm-accordion[aria-expanded="true"] .mm-caret{transform:rotate(90deg)}
/* Children step well in from their parent: the rail drops from under the
   parent's ICON column and each child hangs off it on an elbow, so nesting is
   readable at a glance. The old 8px margin + 1px hairline was too subtle —
   a sub-item read as an odd sibling that had lost its tier stripe rather than
   as a child. The submenu is a SIBLING of its button, not a child of it, so
   --mm-tier does not cascade; it carries its own inline copy (see index.html)
   and falls back to grey if a future group forgets to set one. */
.mm-submenu{display:flex;flex-direction:column;gap:2px;margin:2px 0 6px 30px;
  padding-left:14px;border-left:2px solid var(--mm-tier-soft,var(--glass-brd))}
/* Same trap as #si-pin-fields above: an author display:flex outranks the UA's
   [hidden]{display:none}, so idocsToggle() flipped the attribute and rotated
   the caret while the submenu stayed on screen — the accordion looked broken
   because only its arrow ever moved. The group has never actually collapsed. */
.mm-submenu[hidden]{display:none}
.mm-item.mm-sub{position:relative;align-items:flex-start;padding:8px 10px;font-weight:600}
/* Elbow joining the rail to each child. top lands on the child icon's centre
   (8px padding + 1px nudge + half of the 18px icon). */
.mm-item.mm-sub::before{content:"";position:absolute;left:-14px;top:18px;
  width:11px;height:2px;border-radius:1px;background:var(--mm-tier-soft,var(--glass-brd))}
/* Tint child icons to the parent's tier, like .mm-tier-item does for top-level
   gated items — a nested dev tool is still a dev tool and should look it. */
.mm-item.mm-sub svg{margin-top:1px;color:var(--mm-tier,#8A9AAA)}
.mm-sub-txt{display:flex;flex-direction:column;gap:1px;min-width:0}
.mm-sub-title{font-size:.88rem;color:var(--text)}
.mm-sub-blurb{font-size:.72rem;font-weight:500;color:var(--text2);line-height:1.35;
  white-space:normal}
/* Interactive-doc viewer overlay (sandboxed iframe) — mirrors Founder Vault. */
#idocs-overlay .idocs-panel{position:fixed;inset:10px;max-width:1240px;margin:0 auto;
  background:#12141a;border:1px solid rgba(255,255,255,.09);border-radius:16px;
  display:flex;flex-direction:column;overflow:hidden;box-shadow:0 18px 60px rgba(0,0,0,.55)}
@supports (inset:max(0px)){ #idocs-overlay .idocs-panel{
  top:max(10px, env(safe-area-inset-top)); bottom:max(10px, env(safe-area-inset-bottom)) } }
.idocs-head{display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:10px 12px 10px 14px;border-bottom:1px solid rgba(255,255,255,.08);flex:0 0 auto}
.idocs-title{font-weight:700;font-size:15px;display:flex;align-items:center;gap:9px;min-width:0}
.idocs-title svg{width:17px;height:17px;color:var(--dim);flex:0 0 auto}
.idocs-title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.idocs-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.idocs-open{font-size:12px;font-weight:600;color:#9aa3b2;text-decoration:none;
  padding:6px 10px;border-radius:8px;border:1px solid rgba(255,255,255,.1)}
.idocs-open:hover{color:#fff;background:rgba(255,255,255,.06)}
.idocs-close{background:none;border:0;color:#9aa3b2;font-size:16px;padding:6px 10px;
  cursor:pointer;border-radius:8px}
.idocs-close:hover{color:#fff;background:rgba(255,255,255,.06)}
.idocs-body{flex:1;display:flex;min-height:0}
.idocs-frame{flex:1;width:100%;border:0;background:#0f1115}
/* Functionality Mind Map (editable Mind-Elixir editor) — full-screen overlay. */
#fmm-overlay .fmm-panel{position:fixed;inset:10px;max-width:1280px;margin:0 auto;background:#12141a;
  border:1px solid rgba(255,255,255,.09);border-radius:16px;display:flex;flex-direction:column;
  overflow:hidden;box-shadow:0 18px 60px rgba(0,0,0,.55)}
@supports (inset:max(0px)){ #fmm-overlay .fmm-panel{ top:max(10px, env(safe-area-inset-top)); bottom:max(10px, env(safe-area-inset-bottom)) } }
.fmm-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  padding:9px 12px 9px 14px;border-bottom:1px solid rgba(255,255,255,.08);flex:0 0 auto}
.fmm-title{font-weight:700;font-size:15px;display:flex;align-items:baseline;gap:9px;flex-wrap:wrap;min-width:0}
.fmm-hint{font-size:11px;font-weight:500;color:#7f8798;letter-spacing:.01em}
.fmm-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.fmm-pick{display:flex;gap:4px}
.fmm-st{cursor:pointer;font:inherit;font-size:11px;font-weight:700;color:#c7cdda;padding:4px 9px;border-radius:999px;
  border:1px solid rgba(255,255,255,.14);background:transparent;transition:.12s}
.fmm-st:hover:not(:disabled){border-color:var(--c);color:#fff}
.fmm-st.on{background:color-mix(in srgb,var(--c) 26%,transparent);border-color:var(--c);color:#fff}
.fmm-st:disabled{opacity:.35;cursor:default}
.fmm-btn{cursor:pointer;font:inherit;font-size:12px;font-weight:700;color:#c7cdda;padding:6px 12px;border-radius:9px;
  border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.04);transition:.12s}
.fmm-btn:hover:not(:disabled){color:#fff;border-color:rgba(255,255,255,.3)}
.fmm-btn.primary{background:#5a4fcf;border-color:#5a4fcf;color:#fff}
.fmm-btn.primary:disabled{opacity:.4;cursor:default}
.fmm-close{background:none;border:0;color:#9aa3b2;font-size:16px;padding:6px 10px;cursor:pointer;border-radius:8px}
.fmm-close:hover{color:#fff;background:rgba(255,255,255,.06)}
.fmm-map{flex:1;min-height:0;position:relative;background:#0f1115}
.fmm-map .map-container{width:100%;height:100%}
.fmm-foot{flex:0 0 auto;padding:7px 14px;border-top:1px solid rgba(255,255,255,.08);
  font-size:11.5px;color:#8791a3;font-variant-numeric:tabular-nums}
.role-choices{display:flex;flex-direction:column;gap:10px}
.role-choice{
  text-align:left;width:100%;padding:13px 15px;border-radius:14px;cursor:pointer;
  background:rgba(255,255,255,.04);border:1px solid var(--glass-brd);
  transition:background .12s,border-color .12s;
}
.role-choice.on{background:rgba(217,164,65,.14);border-color:var(--gold)}
.role-choice .rc-name{font-size:.98rem;font-weight:800;color:#fff;margin-bottom:2px}
.role-choice .rc-desc{font-size:.82rem;color:var(--text2);line-height:1.4}
.mm-steward-dot{
  margin-left:auto;background:var(--gold);color:var(--slate);
  font-size:.6rem;font-weight:900;min-width:18px;height:18px;border-radius:9px;
  display:inline-flex;align-items:center;justify-content:center;padding:0 5px;
  position:static;border:0;
}
.mm-version{
  text-align:center;
  padding:8px 6px 4px;
  font-size:.74rem;font-weight:700;letter-spacing:.06em;
  color:rgba(190,198,212,.55);
  pointer-events:none;
}
/* Volunteer board */
.vp-card{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:16px;margin-bottom:14px}
.vp-head{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.vp-badge{display:inline-block;font-size:.62rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;background:rgba(217,164,65,.18);color:var(--gold);padding:3px 8px;border-radius:99px;border:1px solid rgba(217,164,65,.4)}
.vp-seats{font-size:.72rem;color:var(--text2);font-weight:700}
.vp-title{color:#fff;font-size:1.05rem;font-weight:800;margin:2px 0 6px;line-height:1.25}
.vp-summary{color:var(--text);font-size:.9rem;line-height:1.5;margin:0 0 10px}
.vp-meta{font-size:.82rem;color:var(--text2);line-height:1.55;margin-bottom:10px}
.vp-meta strong{color:#fff;font-weight:700}
.vp-scope{font-size:.85rem;color:var(--text);line-height:1.55;margin-bottom:14px}
.vp-scope p{margin:0 0 8px}
.vp-scope ul{margin:0 0 8px;padding-left:20px}
.vp-scope li{margin-bottom:3px}
.vp-scope strong{color:#fff}
.vp-actions{display:flex;gap:8px}
.vp-reach{display:inline-block;background:var(--gold);color:var(--slate);font-weight:800;font-size:.85rem;padding:9px 16px;border-radius:10px;text-decoration:none}
.vp-reach:hover{filter:brightness(1.06)}
.vp-admin{margin-top:10px;padding-top:10px;border-top:1px solid rgba(255,255,255,.08);display:flex;gap:6px;flex-wrap:wrap}
.vp-mini{appearance:none;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);color:var(--text2);font-size:.74rem;font-weight:700;padding:5px 10px;border-radius:8px;cursor:pointer}
.vp-mini:hover{color:#fff;border-color:rgba(255,255,255,.3)}
/* Volunteer form overlay rows */
.vf-row{margin-bottom:11px}
.vf-row label{display:block;font-size:.74rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--text2);margin-bottom:5px}
.vf-row input, .vf-row textarea, .vf-row select{width:100%;padding:10px 12px;border-radius:9px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);color:#fff;font-size:.9rem;font-family:inherit}
.vf-row select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8b0bd' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");background-repeat:no-repeat;background-position:right 10px center;background-size:14px;padding-right:32px}
.vf-row select option{background:#1b2230;color:#fff}
.vf-row textarea{resize:vertical;line-height:1.5}
.vf-hint{font-size:.74rem;color:var(--text2);margin-top:4px}
.vf-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.vf-delete{width:100%;background:rgba(220,80,80,.12);border:1px solid rgba(220,80,80,.4);color:#ff9a9a;font-weight:700;padding:10px;border-radius:10px;cursor:pointer}
.vf-delete:hover{background:rgba(220,80,80,.2)}
/* Read · E-books toolbar — Sort By dropdown above the grid */
.ebooks-toolbar{display:flex;align-items:center;gap:10px;padding:0 16px 12px;max-width:100%}
.ebooks-toolbar label{font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--text2);flex-shrink:0}
.ebooks-toolbar select{flex:1;min-width:0;padding:10px 32px 10px 12px;border-radius:9px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.05) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8b0bd' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 10px center;background-size:14px;color:#fff;font-size:.92rem;font-family:inherit;appearance:none;-webkit-appearance:none}
.ebooks-toolbar select option{background:#1b2230;color:#fff}
/* Manage Genres admin drilldown — labelled cascading <select>s + action card */
.ga-row{display:flex;align-items:center;gap:10px;margin:10px 0 4px}
.ga-label{flex:0 0 110px;font-size:.74rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--text2)}
.ga-select{flex:1;min-width:0;padding:11px 32px 11px 12px;border-radius:9px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.05) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8b0bd' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 10px center;background-size:14px;color:#fff;font-size:.95rem;font-family:inherit;appearance:none;-webkit-appearance:none}
.ga-select option{background:#1b2230;color:#fff}
.ga-actions-card{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:12px;margin:4px 0 14px}
.ga-actions-path{font-size:.78rem;color:var(--text2);margin-bottom:10px;letter-spacing:.02em}
.ga-actions{display:flex;flex-wrap:wrap;gap:6px}
.ga-empty{padding:14px;background:rgba(255,255,255,.03);border:1px dashed rgba(255,255,255,.1);border-radius:10px;color:var(--text2);font-size:.85rem;margin:10px 0 14px}
.ga-empty strong{color:#fff}
.ga-empty em{color:var(--gold);font-style:normal;font-weight:700}
/* Tribe "messaging coming soon" banner (artist-mock only) */
.tribe-msg-soon{display:flex;gap:11px;align-items:flex-start;margin:12px 16px;padding:12px 14px;border-radius:12px;background:rgba(101,185,255,.1);border:1px solid rgba(101,185,255,.28);color:var(--text);font-size:.84rem;line-height:1.45}
.tribe-msg-soon strong{color:#fff}

/* Tribe chat V1 — flat, member-gated, realtime via Supabase */
.td-chat{margin:12px 12px 18px;border-radius:14px;background:rgba(245,247,251,.04);border:1px solid var(--glass-brd);overflow:hidden}
.td-chat-hdr{display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid var(--glass-brd);background:rgba(245,247,251,.03)}
.td-chat-ic{color:var(--blue);display:flex}
.td-chat-ic svg{width:16px;height:16px}
.td-chat-title{flex:1;font-family:var(--head);font-weight:700;font-size:.86rem;color:var(--text);letter-spacing:-.01em}
.td-chat-refresh{background:transparent;border:none;color:var(--text2);font-size:1.05rem;cursor:pointer;padding:2px 8px;border-radius:6px}
.td-chat-refresh:hover{background:rgba(245,247,251,.08);color:var(--text)}
.td-chat-list{max-height:340px;min-height:80px;overflow-y:auto;display:flex;flex-direction:column;gap:6px;padding:10px 12px;background:rgba(11,15,22,.25)}
.td-chat-list:empty::before{content:"No messages yet — say hi!";color:var(--dim);font-size:.78rem;text-align:center;display:block;padding:18px 0}
.td-msg{display:flex;gap:8px;align-items:flex-start;padding:2px 0}
.td-msg-av{flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:var(--grad);background-size:cover;background-position:center;color:var(--slate);font-weight:900;font-size:.7rem;display:inline-flex;align-items:center;justify-content:center}
.td-msg-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.td-msg-meta{display:flex;align-items:baseline;gap:6px;font-size:.66rem}
.td-msg-name{font-weight:800;color:var(--text);font-size:.74rem}
.td-msg-time{color:var(--dim)}
.td-msg-edit{color:var(--dim);font-style:italic}
.td-msg-body-tx{font-size:.83rem;line-height:1.4;color:var(--text);white-space:pre-wrap;word-break:break-word}
.chat-mention{display:inline-block;padding:0 6px;border-radius:6px;background:rgba(101,185,255,.18);color:var(--blue);font-weight:700;text-decoration:none}
.chat-mention.me{background:rgba(217,164,65,.28);color:var(--gold)}
.td-msg.mine .td-msg-name{color:var(--gold)}
.td-msg-del{background:transparent;border:none;color:var(--dim);font-size:.7rem;cursor:pointer;padding:0 4px;margin-left:6px;opacity:0;transition:opacity .15s}
.td-msg:hover .td-msg-del{opacity:.7}
.td-msg-del:hover{color:var(--copper)}
.td-chat-composer{display:flex;gap:8px;align-items:flex-end;padding:8px 10px;border-top:1px solid var(--glass-brd);background:rgba(245,247,251,.03)}
.td-chat-composer textarea{flex:1;resize:none;background:rgba(245,247,251,.06);border:1px solid var(--glass-brd);border-radius:14px;padding:8px 12px;color:var(--text);font:inherit;font-size:.86rem;line-height:1.35;max-height:140px;outline:none}
.td-chat-composer textarea:focus{border-color:rgba(101,185,255,.6);background:rgba(245,247,251,.08)}
.td-chat-composer textarea::placeholder{color:var(--dim)}
.td-chat-send{flex:0 0 36px;width:36px;height:36px;border-radius:50%;background:var(--gold);color:var(--slate);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center}
.td-chat-send:active{transform:scale(.94)}
.td-chat-send svg{width:18px;height:18px}
.td-chat-nonmember{padding:14px 16px;text-align:center;color:var(--text2);font-size:.82rem;border-top:1px solid var(--glass-brd)}
.tms-ic{flex-shrink:0;color:var(--lake)}
.tms-ic svg{width:20px;height:20px;display:block}
/* Universal media player overlay */
.mp-panel{position:relative;width:min(640px,94vw);background:#10141d;border:1px solid rgba(255,255,255,.1);border-radius:16px;padding:0;overflow:hidden;box-shadow:0 24px 70px rgba(0,0,0,.6)}
.mp-panel .cc-x{position:absolute;top:10px;right:10px;z-index:3;background:rgba(0,0,0,.45);border-radius:50%;width:32px;height:32px;display:flex;align-items:center;justify-content:center;color:#fff;border:0;cursor:pointer}
.mp-stage{width:100%;aspect-ratio:16/9;background:#000;display:flex;align-items:center;justify-content:center}
.mp-stage iframe{width:100%;height:100%;border:0;display:block}
/* Native <video> (VideoPlayer-S1): fill the stage, contain-fit so art is never
   cropped (letterboxes over the black stage instead). Mirrors the iframe fill. */
.mp-stage video{width:100%;height:100%;border:0;display:block;background:#000;object-fit:contain}
.mp-stage.audio{aspect-ratio:auto;padding:34px 22px;background:radial-gradient(circle at 50% 35%,rgba(217,164,65,.18),#10141d)}
.mp-stage.audio .mp-audio-wrap{width:100%;display:flex;flex-direction:column;align-items:center;gap:18px}
.mp-stage.audio .mp-disc{width:120px;height:120px;border-radius:50%;background:linear-gradient(135deg,var(--gold),var(--copper));display:flex;align-items:center;justify-content:center;box-shadow:0 10px 40px rgba(217,164,65,.3)}
.mp-stage.audio .mp-disc svg{width:46px;height:46px;color:rgba(0,0,0,.55)}
.mp-stage audio{width:100%}
.mp-stage.link{aspect-ratio:auto;padding:40px 22px;flex-direction:column;gap:16px;background:radial-gradient(circle at 50% 35%,rgba(101,185,255,.16),#10141d)}
.mp-open-btn{background:var(--gold);color:var(--slate);font-weight:800;font-size:.95rem;padding:13px 26px;border-radius:12px;text-decoration:none;border:0;cursor:pointer}
.mp-meta{padding:14px 18px 18px}

/* Watching a video on a phone fills the screen like a real player (rotate to
   landscape to fill completely). Only the video player goes full-bleed — audio
   and link cards keep their card layout. Triggered by the .mp-video class added
   in openMediaItem; native fullscreen is requested on top where supported. */
@media (max-width:640px){
  #media-player-overlay.mp-video{align-items:stretch;justify-content:stretch;background:#000;max-width:none;margin:0}
  #media-player-overlay.mp-video .mp-panel{
    width:100%;max-width:none;height:100vh;height:100dvh;border:0;border-radius:0;
    background:#000;box-shadow:none;display:flex;flex-direction:column;justify-content:center;
  }
  #media-player-overlay.mp-video .mp-stage{width:100%;height:100%;aspect-ratio:auto;flex:1 1 auto}
  #media-player-overlay.mp-video .mp-meta{
    position:absolute;left:0;right:0;bottom:0;padding:14px 18px calc(16px + env(safe-area-inset-bottom));
    background:linear-gradient(to top,rgba(0,0,0,.8),rgba(0,0,0,0));pointer-events:none;
  }
  #media-player-overlay.mp-video .cc-x{
    top:calc(12px + env(safe-area-inset-top));right:12px;width:46px;height:46px;z-index:10;
    background:rgba(0,0,0,.6);
  }
  #media-player-overlay.mp-video .cc-x svg{width:22px;height:22px}
  /* Scrim behind the close button so it stays visible over bright video frames. */
  #media-player-overlay.mp-video .mp-panel::before{
    content:'';position:absolute;top:0;left:0;right:0;height:84px;z-index:4;pointer-events:none;
    background:linear-gradient(to bottom,rgba(0,0,0,.45),transparent);
  }
}
/* Native fullscreen (Android etc.): the panel becomes the fullscreen element. */
#media-player-overlay .mp-panel:fullscreen{width:100vw;height:100vh;background:#000;border:0;border-radius:0;display:flex;flex-direction:column;justify-content:center}
#media-player-overlay .mp-panel:fullscreen .mp-stage{height:100%;aspect-ratio:auto;flex:1 1 auto}
/* The media player lives inside #app (a z-index:1 stacking context), while the
   mini now-playing bar, bottom nav, and fabs live OUTSIDE #app at higher real
   stacking — so they'd paint over the video. Hide them while the player is open,
   same approach as the full Now Playing screen above. */
body:has(#media-player-overlay.on) #mini,
body:has(#media-player-overlay.on) nav{display:none}
body:has(#media-player-overlay.mp-video.on) #guide-fab,
body:has(#media-player-overlay.mp-video.on) #give-fab{display:none !important}
.mp-title{color:#fff;font-size:1.05rem;font-weight:800;line-height:1.25}
.mp-creator{color:var(--text2);font-size:.85rem;margin-top:2px}
.mp-kind{color:var(--gold);font-size:.74rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;margin-top:6px}
/* Tribe browse-by-category chips + create form */
.tribe-cat-row{display:flex;gap:8px;flex-wrap:wrap;padding:4px 16px 8px}
.tribe-cat-chip{appearance:none;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.05);color:var(--text2);font-size:.78rem;font-weight:700;padding:7px 13px;border-radius:99px;cursor:pointer;transition:all .12s}
.tribe-cat-chip:hover{color:#fff;border-color:rgba(217,164,65,.5)}
.tribe-cat-chip.on{background:rgba(217,164,65,.18);border-color:var(--gold);color:#fff}
.ct-type-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:6px}
.ct-type-card{text-align:left;padding:11px 12px;border-radius:12px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:var(--text2);cursor:pointer;transition:all .12s}
.ct-type-card.on{border-color:var(--gold);background:rgba(217,164,65,.14)}
.ct-type-card .ctt-name{font-weight:800;color:#fff;font-size:.92rem;margin-bottom:2px}
.ct-type-card .ctt-desc{font-size:.74rem;line-height:1.35}
/* Shared genre picker — cascading dropdowns + add + tag list */
.g-picker{display:flex;gap:8px;flex-wrap:wrap;align-items:stretch;margin-bottom:8px}
.g-picker select{flex:1 1 140px;min-width:0;padding:11px 32px 11px 12px;border-radius:9px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.05) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8b0bd' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 10px center;background-size:14px;color:#fff;font-size:.92rem;font-family:inherit;appearance:none;-webkit-appearance:none}
.g-picker select:disabled{opacity:.45;cursor:not-allowed}
.g-picker select option{background:#1b2230;color:#fff}
.g-add{appearance:none;background:var(--gold);color:var(--slate);border:0;font-weight:800;font-size:.85rem;padding:0 16px;border-radius:9px;cursor:pointer;white-space:nowrap}
.g-add:hover{filter:brightness(1.06)}
.g-selected{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;min-height:32px}
.g-tag{display:inline-flex;align-items:center;gap:6px;appearance:none;background:rgba(217,164,65,.18);border:1px solid rgba(217,164,65,.4);color:#fff;font-weight:700;font-size:.82rem;padding:6px 10px 6px 12px;border-radius:99px;cursor:pointer}
.g-tag:hover{background:rgba(217,164,65,.28)}
.g-tag span{color:var(--text2);font-weight:900;font-size:.85rem;line-height:1}
.g-empty{color:var(--text2);font-size:.82rem;font-style:italic;padding:6px 2px}
/* Inquiry queue cards */
.inq-card{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:12px;margin-bottom:10px}
.inq-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.inq-msg{color:var(--text);font-size:.88rem;line-height:1.5;margin:6px 0 6px;padding:8px 10px;background:rgba(0,0,0,.18);border-radius:8px;white-space:pre-wrap}
.inq-hours{color:var(--text2);font-size:.8rem;margin-bottom:8px}
.inq-hours strong{color:#fff}
.inq-actions{display:flex;gap:6px;flex-wrap:wrap;padding-top:8px;border-top:1px solid rgba(255,255,255,.06)}
/* Profile staff badge — small gold chip next to the role label */
.p-staff-badge{display:inline-block;font-size:.6rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase;background:rgba(217,164,65,.18);color:var(--gold);padding:2px 7px;border-radius:99px;border:1px solid rgba(217,164,65,.4);margin-left:6px;vertical-align:middle}
/* Manage Staff screen */
.staff-card{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:12px;margin-bottom:10px}
.staff-card-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.staff-av{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.08);background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:.95rem;flex-shrink:0}
.staff-name{color:#fff;font-weight:700;font-size:.95rem;line-height:1.2}
.staff-handle{color:var(--text2);font-size:.78rem}
.staff-chips{display:flex;flex-wrap:wrap;gap:6px}
.staff-chip{appearance:none;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.04);color:var(--text2);font-size:.78rem;font-weight:700;padding:6px 11px;border-radius:99px;cursor:pointer;transition:all .12s}
.staff-chip:hover:not(:disabled){border-color:rgba(217,164,65,.55);color:#fff}
.staff-chip.on{background:rgba(217,164,65,.18);border-color:var(--gold);color:#fff}
.staff-chip.off{opacity:.4;cursor:not-allowed}
.staff-chip:disabled{cursor:not-allowed}
#mainmenu-scrim{
  position:fixed;inset:0;z-index:209;background:transparent;display:none;
}
#mainmenu-scrim.on{display:block}
/* LayerManager UX pass (Audit-S2): flag-ON backstop for the menu scrim.
   Scoped to body.ss-layers-on (js/core/layers.js adds it only while dynamic
   layers are ON), so the default flag-OFF layout is byte-for-byte unchanged.
   When the menu is open its scrim must shield EVERY focus-raised panel, so we
   pin the panel to the top of the panel band and seat its scrim one step under
   it. !important guarantees the order even if a focus-raised window's inline
   z-index tries to climb over the open menu. Both stay below the sheet band
   (1000). Mirrors LAYER_BAND.panelTop (899) in layers.js. */
body.ss-layers-on #mainmenu-scrim.on{ z-index:898 !important; }
body.ss-layers-on #mainmenu-panel.on{ z-index:899 !important; }

/* ── TUTORIAL / CUSTOMIZE modal ──────────────────── */
#tut-overlay{
  position:fixed;inset:0;z-index:120;
  background:rgba(8,10,16,.78);
  -webkit-backdrop-filter:blur(8px) saturate(1.2);
  backdrop-filter:blur(8px) saturate(1.2);
  display:none;align-items:center;justify-content:center;
  padding:env(safe-area-inset-top,0px) 14px env(safe-area-inset-bottom,0px);
}
#tut-overlay.on{display:flex}
#tut-modal{
  width:100%;max-width:440px;max-height:92vh;
  display:flex;flex-direction:column;
  background:linear-gradient(180deg, rgba(28,32,42,.92), rgba(18,22,30,.94));
  border:1px solid var(--glass-brd);
  border-radius:18px;
  box-shadow:0 22px 48px rgba(0,0,0,.55), 0 2px 10px rgba(0,0,0,.35);
  overflow:hidden;color:var(--text);
}
.tut-head{
  display:flex;align-items:center;gap:10px;
  padding:12px 14px 10px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.tut-host{display:flex;align-items:center;gap:7px;flex-shrink:0}
.tut-host-orb{
  position:relative;width:24px;height:24px;border-radius:50%;
  background:linear-gradient(135deg,var(--purple) 0%,var(--blue) 100%);
  box-shadow:0 2px 8px rgba(59,37,109,.45), 0 0 0 1px rgba(242,178,51,.36);
  display:flex;align-items:center;justify-content:center;
}
.tut-host-orb svg{width:13px;height:13px;color:#fff}
.tut-host-orb .g-pulse{
  position:absolute;inset:-2px;border-radius:50%;
  border:2px solid rgba(242,178,51,.5);pointer-events:none;
  animation:gPulse 2.6s ease-in-out infinite;
}
.tut-host-lbl{font-size:.78rem;font-weight:800;letter-spacing:.04em;color:var(--text)}
.tut-step-dots{display:flex;gap:5px;flex:1;justify-content:center}
.tut-step-dots .d{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.18)}
.tut-step-dots .d.on{background:var(--gold)}
.tut-close{
  width:30px;height:30px;border-radius:50%;
  background:transparent;border:0;color:var(--dim);cursor:pointer;
  display:flex;align-items:center;justify-content:center;font-size:1.2rem;
}
.tut-close:hover{background:rgba(255,255,255,.06);color:var(--text)}
.tut-body{
  flex:1;overflow-y:auto;padding:18px 18px 6px;
  -webkit-overflow-scrolling:touch;
}
.tut-body::-webkit-scrollbar{display:none}
.tut-title{font-size:1.32rem;font-weight:800;letter-spacing:-.01em;margin:0 0 6px}
.tut-sub{font-size:.92rem;color:var(--text2);line-height:1.45;margin:0 0 16px}

/* chips — used for category picker AND per-category preferences */
.tut-chips{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 6px}
.tut-chip{
  padding:9px 14px;border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  color:var(--text);font-size:.84rem;font-weight:600;cursor:pointer;
  transition:background .12s,border-color .12s,color .12s,transform .08s;
}
.tut-chip:hover{background:rgba(255,255,255,.09)}
.tut-chip:active{transform:scale(.97)}
.tut-chip.on{
  background:rgba(217,164,65,.18);
  border-color:var(--gold);
  color:var(--gold);
}
.tut-chip-group-label{
  font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--dim);margin:14px 0 6px;
}
/* Genre accordion — Primary genres as collapsible rows, subgenres inside.
   Replaces the flat ~160-chip wall on the Listen step. */
.tut-genre-tree{display:flex;flex-direction:column;gap:8px;margin:4px 0 6px}
.tut-genre-group{
  border:1px solid rgba(255,255,255,.10);border-radius:14px;
  background:rgba(255,255,255,.03);overflow:hidden;
}
.tut-genre-head{
  width:100%;display:flex;align-items:center;gap:10px;
  padding:12px 14px;background:transparent;border:0;cursor:pointer;
  color:var(--text);font-size:.92rem;font-weight:700;text-align:left;
}
.tut-genre-head:hover{background:rgba(255,255,255,.04)}
.tut-genre-head .tg-name{flex:1}
.tut-genre-head .tg-count{
  font-size:.7rem;font-weight:800;color:var(--gold);
  min-width:18px;text-align:center;opacity:0;transition:opacity .12s;
}
.tut-genre-head .tg-count.show{opacity:1}
.tut-genre-head .tg-chev{
  width:16px;height:16px;color:var(--dim);flex-shrink:0;
  transition:transform .18s ease;
}
.tut-genre-group.open .tg-chev{transform:rotate(180deg)}
.tut-genre-body{
  display:none;flex-wrap:wrap;gap:8px;
  padding:0 14px 14px;
}
.tut-genre-group.open .tut-genre-body{display:flex}
.up-genre-sel{font-size:.82rem;color:var(--gold);font-weight:700;margin:2px 0 10px}
.tut-genre-head .tg-count.check{color:var(--gold)}
/* nested genre groups (3rd level and deeper) sit full-width inside a body */
.tut-genre-body .tut-genre-group{width:100%;background:rgba(255,255,255,.025)}
.tut-cta{
  display:flex;gap:10px;padding:12px 16px 16px;
  border-top:1px solid rgba(255,255,255,.06);
  background:rgba(0,0,0,.18);
}
.tut-btn{
  flex:1;height:46px;border-radius:12px;
  font-size:.94rem;font-weight:700;cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:6px;
  transition:background .14s,color .14s,border-color .14s;
}
.tut-btn.primary{
  background:var(--gold);color:#1a1d24;border:1px solid var(--gold);
}
.tut-btn.primary:hover{background:#e6b252}
.tut-btn.primary[disabled]{opacity:.45;cursor:not-allowed}
.tut-btn.ghost{
  background:transparent;color:var(--text2);border:1px solid rgba(255,255,255,.14);
}
.tut-btn.ghost:hover{color:var(--text);border-color:rgba(255,255,255,.28)}
.bell-dot{
  position:absolute;top:2px;right:2px;
  width:9px;height:9px;border-radius:50%;
  background:var(--blue);border:2px solid var(--surface);
}
#hdr-logo{display:flex;justify-content:center;align-items:center;width:100%;margin:0;padding:0 88px}
#hdr-logo img{width:100%;max-width:260px;height:auto;max-height:none;object-fit:contain;display:block}
/* keep the logo identical on every screen (home + banner) */
#hdr-logo.banner{margin:0}
#hdr-logo.banner img{width:100%;max-width:260px;max-height:none}
/* Dark-mode in-app header: subdued logo so it integrates with deep-night chrome
   instead of dominating (matches design rule — vibrant logo stays for splash /
   auth / marketing surfaces, which use .auth-logo). Token reference:
   --logo-dark-saint:#D9A441 / stream:#5C91F2→#58BFE8→#5DD6B3 / tagline:.72 alpha.
   Since the asset is a single transparent PNG we cannot retint individual layers,
   so we apply a restrained color-correction filter matching those values:
   saturation ~82%, brightness ~88%, slight contrast trim. */
html[data-theme="dark"] #hdr-logo img{filter:saturate(.82) brightness(.88) contrast(.97)}
/* Bright, unfiltered logo on the Kid Kingdom screen (matches the bright
   illustrated art) and on the auth/login screen (welcoming first
   impression). Every other screen keeps the subdued dark-mode treatment. */
html[data-theme="dark"]:has(#kids.on) #hdr-logo img,
html[data-theme="dark"]:has(#auth.on) #hdr-logo img{filter:none}
.logo-fb{font-size:1.4rem;font-weight:900;letter-spacing:-.025em}
.logo-fb .g{color:var(--gold)}.logo-fb .b{color:#00B4E6}

/* ── SCREENS ──────────────────────────────────────── */
.screen{
  flex:1;overflow-y:auto;overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  display:none;
  /* Bottom padding clears the nav — the mini now docks at the TOP, not here. */
  padding-bottom:calc(var(--nav-h) + 44px + env(safe-area-inset-bottom,0px));
  transition:padding-top .26s cubic-bezier(.4,0,.2,1);
}
.screen.on{display:block}
/* let the atmospheric light field show through every screen */
.screen{background:transparent !important}
.screen::-webkit-scrollbar{display:none}
/* When the mini player is docked under the top bar (media playing), push the
   screen's content down so the search bar / first row sits BELOW it instead of
   under it. Mirror the screens that HIDE the mini — they reserve nothing.
   8px gap above mini + 72px mini + 8px gap below = 88px. */
body:has(#mini:not(.off)) .screen.on{padding-top:88px}
body:has(#playlists.on) .screen.on,
body:has(#playlist-detail.on) .screen.on,
body:has(#playlist-build.on) .screen.on,
body:has(#kids.on) .screen.on{padding-top:0}

/* ── SEARCH BAR ───────────────────────────────────── */
/* Search + the global Hover-to-Play toggle share one row; the search bar flexes
   and the toggle sits at its right (search doesn't need full width). */
.search-row{display:flex;align-items:center;gap:10px;margin:8px 16px 4px 16px}
.search-wrap{
  position:relative;flex:1 1 auto;min-width:0;   /* symmetric L/R so it aligns with the tiles below */
}
/* Lift the whole header search row into its own stacking context ABOVE the
   home content that follows it (Sam greeting, Quick Access, atmosphere box,
   shelves). Those siblings use backdrop-filter/animation → each is its own
   stacking context, so the results dropdown's z-index:50 can't win against
   them from inside .search-wrap. Raising the container here lets the dropdown
   float cleanly over everything instead of hiding behind it — no page reflow.
   Scoped to the direct child so the reused .search-row (result items) is untouched. */
#home > .search-row{position:relative;z-index:60}
/* Hover-to-Play toggle beside the search bar — matches the search field height
   and glass; headphones icon + a switch track that shows on/off at a glance. */
.hovplay-btn{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;
  height:46px;padding:0 12px;border:none;cursor:pointer;border-radius:16px;
  background:rgba(16,21,30,.30);
  -webkit-backdrop-filter:blur(16px) saturate(125%);backdrop-filter:blur(16px) saturate(125%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 8px 22px rgba(0,0,0,.20);
  color:var(--dim);transition:color .18s;
}
.hovplay-btn .hp-ico{width:18px;height:18px;flex:none}
.hovplay-btn .hp-label{font-size:.72rem;font-weight:600;color:var(--text2);white-space:nowrap}
.hovplay-btn .hp-track{width:30px;height:16px;border-radius:9px;background:rgba(255,255,255,.14);position:relative;transition:background .18s;flex:none}
.hovplay-btn .hp-knob{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:rgba(255,255,255,.75);transition:transform .18s}
.hovplay-btn.on{color:var(--lake)}
.hovplay-btn.on .hp-track{background:var(--gold)}
.hovplay-btn.on .hp-knob{transform:translateX(14px);background:#1a1c22}
/* No hover on a touch screen → the "Hover Preview" toggle is meaningless there,
   so hide it (the search bar reclaims the width). Touch also gets no preview
   wiring at all — see attachNewPreview. Matches phones AND tablets. */
@media (hover:none){ #hover-play-toggle{display:none} }
.search-input{
  width:100%;height:46px;padding:0 40px 0 40px;
  background:rgba(16,21,30,.30);
  -webkit-backdrop-filter:blur(16px) saturate(125%);backdrop-filter:blur(16px) saturate(125%);
  border:none;
  border-radius:16px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 8px 22px rgba(0,0,0,.20);
  font-size:.9rem;font-weight:500;color:var(--text);
  transition:box-shadow .15s;
}
.search-input:focus{outline:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 0 0 2px rgba(101,185,255,.35),0 8px 22px rgba(0,0,0,.22)}
.search-input::placeholder{color:var(--dim)}
.search-icon{
  position:absolute;left:14px;top:50%;transform:translateY(-50%);
  width:16px;height:16px;color:var(--dim);pointer-events:none;
}
.search-clear{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  width:26px;height:26px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--bg);color:var(--dim);
  font-size:.7rem;cursor:pointer;display:none;
}
.search-clear.show{display:flex}
.search-results{
  position:absolute;left:0;right:0;top:calc(100% + 6px);
  background:var(--surface);border:1px solid var(--border);
  border-radius:14px;box-shadow:0 10px 30px rgba(30,42,58,.18);
  z-index:50;max-height:340px;overflow-y:auto;display:none;
}
.search-results.show{display:block}
.search-results-empty{padding:18px;text-align:center;font-size:.72rem;color:var(--dim);font-weight:500}
.search-row{
  display:flex;align-items:center;gap:10px;
  padding:9px 12px;cursor:pointer;
  border-bottom:1px solid var(--border);
}
.search-row:last-child{border-bottom:none}
.search-row:hover,.search-row:active{background:var(--bg)}
.search-row-thumb{width:36px;height:36px;border-radius:6px;object-fit:contain;background:var(--surface);flex-shrink:0}
.search-row-info{flex:1;overflow:hidden}
.search-row-title{font-size:.78rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-row-meta{font-size:.62rem;font-weight:500;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Grouped full-catalog search: section headers + lettered placeholder thumbs
   for results that carry no art (tribes, playlists, coverless media). */
.search-group{
  padding:8px 12px 4px;font-size:.58rem;font-weight:800;letter-spacing:.08em;
  text-transform:uppercase;color:var(--dim);border-bottom:1px solid var(--border);
  position:sticky;top:0;background:var(--surface);z-index:1;
}
.search-thumb-ph{
  width:36px;height:36px;border-radius:6px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:var(--bg);color:var(--dim);font-size:.82rem;font-weight:800;
}

/* ── HOME / NOW-PLAYING SCREEN ────────────────────── */
@keyframes wave{0%,100%{transform:scaleY(1)}50%{transform:scaleY(.45)}}

/* AMBIENT ALBUM-ART GLOW */
#home{position:relative}
#home > *{position:relative;z-index:1}
#art-glow{
  position:absolute;top:0;left:0;right:0;height:440px;
  background-size:cover;background-position:center top;
  filter:blur(70px) saturate(1.6);
  opacity:.5;transform:scale(1.45);display:none;
  pointer-events:none;z-index:0 !important;
  -webkit-mask-image:linear-gradient(180deg,#000 0%,#000 32%,transparent 100%);
          mask-image:linear-gradient(180deg,#000 0%,#000 32%,transparent 100%);
}

/* PLAYER CARD — the altar */
.player-card{
  margin:0 16px 12px;
  background:var(--glass);
  -webkit-backdrop-filter:blur(26px) saturate(1.5);
  backdrop-filter:blur(26px) saturate(1.5);
  border-radius:22px;
  padding:14px 15px 12px;
  box-shadow:0 16px 44px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.07);
  border:1px solid var(--glass-brd);
}
.pc-top{display:flex;gap:12px;margin-bottom:8px;align-items:flex-start}
.art-wrap{position:relative;flex-shrink:0}
#art{
  width:154px;height:154px;
  border-radius:14px;object-fit:contain;
  background:var(--cloud);
  box-shadow:0 10px 30px rgba(0,0,0,.5), 0 0 30px -6px rgba(0,180,230,.4);
}
#mute-veil{
  position:absolute;inset:0;border-radius:14px;
  background:rgba(0,0,0,.68);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:5px;cursor:pointer;transition:opacity .25s;
}
#mute-veil.gone{opacity:0;pointer-events:none}
#mute-veil .mv-icon{font-size:2rem}
#mute-veil .mv-hint{font-size:.6rem;font-weight:700;color:rgba(255,255,255,.9);letter-spacing:.04em}

.pc-info{flex:1;overflow:hidden;padding-top:2px}
.pc-info-top{display:flex;align-items:flex-start;justify-content:space-between;gap:6px;margin-bottom:4px}
#song-title{font-size:1.22rem;font-weight:900;color:var(--text);letter-spacing:-.025em;line-height:1.2;flex:1}
.more-btn{font-size:1.4rem;color:var(--dim);line-height:1;flex-shrink:0;padding:2px}
#song-artist{font-size:.8rem;font-weight:600;color:var(--dim);margin-bottom:8px}
#genre-pill{
  display:inline-block;
  border:1.5px solid var(--lake);border-radius:99px;
  padding:3px 11px;
  font-size:.6rem;font-weight:800;letter-spacing:.08em;
  text-transform:uppercase;color:var(--lake);
}
.ext-links{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.ext-link{
  display:inline-flex;align-items:center;gap:5px;
  padding:4px 9px;border-radius:99px;
  font-size:.58rem;font-weight:700;letter-spacing:.04em;
  text-decoration:none;
  border:1px solid var(--border);background:var(--surface);
  color:var(--dim);transition:transform .1s,border-color .15s,color .15s;
}
.ext-link:active{transform:scale(.95)}
.ext-link.spotify{color:#1DB954;border-color:rgba(29,185,84,.35)}
.ext-link.apple{color:#FB233B;border-color:rgba(251,35,59,.35)}
.ext-link.youtube{color:#FF0033;border-color:rgba(255,0,51,.35)}

.prog-section{margin-bottom:6px}
#prog-rail{
  width:100%;height:4px;
  background:var(--border);border-radius:99px;
  cursor:pointer;position:relative;margin-bottom:7px;
}
#prog-rail:hover{height:6px;margin-top:-1px}
#prog-fill{
  height:100%;width:0%;
  background:var(--gold);border-radius:99px;
  transition:width .45s linear;position:relative;
}
#prog-fill::after{
  content:'';position:absolute;right:-7px;top:50%;
  transform:translateY(-50%);
  width:14px;height:14px;border-radius:50%;
  background:var(--gold);
  box-shadow:0 1px 9px rgba(242,178,51,.65);
}
.prog-times{
  display:flex;justify-content:space-between;
  font-size:.64rem;font-weight:600;color:var(--dim);
}

.ctrl-row{display:flex;align-items:center;justify-content:space-between;padding:0 6px;margin-bottom:8px}
.ctrl-col{display:flex;flex-direction:column;align-items:center;gap:4px}
.ctrl-lbl{font-size:.54rem;font-weight:700;color:var(--dim);letter-spacing:.04em}
.ctrl-lbl.lit{color:var(--gold)}
.ci{width:30px;height:30px;color:rgba(196,204,218,.82);transition:color .15s,opacity .15s}
.ci.active-shuffle{color:var(--gold)}
#shuffle-btn .ci{opacity:.5}
#shuffle-btn .ci.active-shuffle{opacity:1}

.play-wrap{
  position:relative;width:78px;height:78px;border-radius:50%;padding:0;
  background:radial-gradient(circle at 38% 30%,rgba(150,210,255,.98),rgba(101,185,255,.96) 52%,rgba(10,108,240,.98));
  border:1px solid rgba(255,255,255,.26);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 0 24px rgba(101,185,255,.5),0 8px 22px rgba(0,0,0,.34);
  display:flex;align-items:center;justify-content:center;
}
.play-wrap::before{
  content:'';position:absolute;width:132%;height:132%;z-index:-1;
  border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(101,185,255,.42),rgba(10,108,240,.18) 48%,transparent 70%);
  filter:blur(10px);
}
.play-glyph{width:36px;height:36px;color:#fff;position:relative;z-index:1}
.play-glyph.play-g{margin-left:4px}
.play-wrap .pause-g{display:none}
.play-wrap.is-playing .play-g{display:none}
.play-wrap.is-playing .pause-g{display:block}
.repeat-btn{position:relative}
.repeat-dot{
  position:absolute;top:-2px;right:-2px;
  width:7px;height:7px;border-radius:50%;
  background:var(--blue);display:none;
}
.repeat-dot.show{display:block}

.vol-row{display:flex;align-items:center;gap:10px}
.vol-ic{font-size:1rem;color:var(--dim)}
#vol-slider{
  flex:1;height:4px;border-radius:99px;outline:none;cursor:pointer;
  background:linear-gradient(to right,var(--blue) 50%,var(--border) 50%);
}
#vol-slider::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:14px;height:14px;border-radius:50%;
  background:var(--blue);box-shadow:0 1px 5px rgba(10,108,240,.4);
}
#vol-slider::-moz-range-thumb{
  width:14px;height:14px;border-radius:50%;border:none;
  background:var(--blue);box-shadow:0 1px 5px rgba(10,108,240,.4);
}

/* ACTIONS */
.actions-card{
  margin:0 16px 14px 4px;
  background:var(--tile-solid,#161c26);border:none;
  -webkit-backdrop-filter:blur(14px) saturate(118%);backdrop-filter:blur(14px) saturate(118%);
  border-radius:16px;
  box-shadow:0 8px 22px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(var(--accent-rgb,245,247,251),.42),0 0 14px -2px rgba(var(--accent-rgb,245,247,251),.24);
  display:flex;overflow:hidden;
}
.ai{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:6px;padding:14px 6px;
  border-right:1px solid var(--border);
  cursor:pointer;transition:background .12s;
}
.ai:last-child{border-right:none}
.ai:active{background:var(--bg)}
.ai-ico{font-size:1.35rem}
.ai-ico.gold{color:var(--gold)}
.ai-ico.blue{color:var(--blue)}
.ai-ico.copper{color:var(--copper)}
.ai-svg{width:27px;height:27px;color:rgba(196,204,218,.82);transition:transform .12s,color .15s,filter .15s}
.ai-svg.liked{color:var(--gold);fill:var(--gold);filter:drop-shadow(0 0 6px rgba(242,178,51,.7));transform:scale(1.12)}
/* "Not for me" active state — the copper (negative) accent, mirrors .liked. */
.ai-svg.disliked{color:var(--copper);fill:var(--copper);filter:drop-shadow(0 0 6px rgba(203,90,42,.55));transform:scale(1.12)}
#np-dislike.active{color:var(--copper)}
#np-dislike.active svg{fill:var(--copper)}
.ai-lbl{font-size:.58rem;font-weight:700;color:var(--dim);letter-spacing:.04em}

/* MORE THAN MUSIC */
.mtm-block,.cl-block{
  margin:0 16px 16px 4px;
  background:var(--tile-solid,#161c26);border:none;
  -webkit-backdrop-filter:blur(14px) saturate(118%);backdrop-filter:blur(14px) saturate(118%);
  border-radius:20px;
  box-shadow:0 12px 32px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(var(--accent-rgb,245,247,251),.42),0 0 14px -2px rgba(var(--accent-rgb,245,247,251),.24);
  overflow:hidden;
  padding:6px 0 12px;
}
.sec-hdr{
  display:flex;align-items:center;justify-content:space-between;
  padding:4px 16px 10px;
}
/* Section headers share ONE face across Home (Robert 2026-07-04): the
   .nb-title spec — var(--head), 1.08rem, 800, normal case, text color. */
.sec-hdr h2{font-family:var(--head);font-size:1.08rem;font-weight:800;letter-spacing:.01em;text-transform:none;color:var(--text)}
.see-all{font-size:.78rem;font-weight:700;color:var(--gold);display:flex;align-items:center;gap:3px}

/* bento grid — illuminated windows */
.bento-grid{
  display:grid;grid-template-columns:repeat(6,1fr);
  gap:11px;padding:2px 16px 0;
}
.bento-tile{
  grid-column:span 2;
  position:relative;overflow:hidden;
  background:#181D29;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.07);
  padding:14px 8px;min-height:112px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;
  cursor:pointer;transition:transform .12s;
}
.bento-tile.wide{
  grid-column:span 3;min-height:74px;
  flex-direction:row;justify-content:flex-start;gap:13px;
  padding:0 16px;
}
.bento-tile:active{transform:scale(.97)}
.bento-tile::before{
  content:'';position:absolute;left:50%;top:-34px;
  width:130px;height:88px;transform:translateX(-50%);
  border-radius:50%;opacity:.55;pointer-events:none;
  background:var(--tile-glow);filter:blur(30px);
}
.bento-svg{width:38px;height:38px;color:var(--tile-glow);opacity:.95;position:relative;z-index:1;flex-shrink:0}
/* Format-icon stroke weight. These glyphs sit alongside the Listen shelf PNGs,
   whose strokes are ~1.5px at 62px. The inline SVGs ship stroke-width="2" in
   viewBox units, which renders 2.5-3.2px at these sizes - roughly twice as
   heavy as the shelf. Override once here so the whole set stays in step. */
.bento-svg,
.lib-svg,
.mtm-tile-ic svg,
.qa-tile .qa-ic svg{stroke-width:1.25}
.bento-text{display:flex;flex-direction:column;align-items:center;gap:2px;position:relative;z-index:1}
.bento-tile.wide .bento-text{align-items:flex-start}
.bento-title{font-size:.86rem;font-weight:800;color:var(--text)}
.bento-sub{font-size:.56rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--dim)}
.bento-tile.glow-lake     {--tile-glow:#00B4E6;box-shadow:inset 0 0 0 1px rgba(0,180,230,.45), 0 8px 26px -9px rgba(0,180,230,.6)}
.bento-tile.glow-gold     {--tile-glow:#F2B233;box-shadow:inset 0 0 0 1px rgba(242,178,51,.45),0 8px 26px -9px rgba(242,178,51,.58)}
.bento-tile.glow-blue     {--tile-glow:#0A6CF0;box-shadow:inset 0 0 0 1px rgba(10,108,240,.5),  0 8px 26px -9px rgba(10,108,240,.6)}
.bento-tile.glow-bluewht  {--tile-glow:#9fb9e4;box-shadow:inset 0 0 0 1px rgba(159,185,228,.42),0 8px 26px -9px rgba(159,185,228,.5)}
.mtm-tile{
  flex-shrink:0;width:78px;border-radius:14px;
  padding:14px 8px 10px;
  display:flex;flex-direction:column;align-items:center;gap:8px;
  cursor:pointer;transition:opacity .15s;
}
.mtm-tile:active{opacity:.8}
.mtm-tile-ic{display:flex;align-items:center;justify-content:center}
.mtm-tile-ic svg{width:30px;height:30px;color:#fff}
.mtm-tile-lbl{font-size:.435rem;font-weight:700;color:#fff;text-align:center;line-height:1.3}
/* Glass variant — used on the Free page so the category tiles match the rest of the app */
.mtm-tile.glass{padding:18px 10px 14px;gap:10px}
.mtm-tile.glass .mtm-tile-ic svg{color:var(--accent-color);filter:drop-shadow(0 0 6px rgba(var(--accent-rgb),.5))}
.mtm-tile.glass .mtm-tile-lbl{font-size:.495rem;color:var(--text)}

/* CONTINUE LISTENING */
/* TRUTH WHERE YOU LEAST EXPECT IT */
.truth-block{
  margin:4px 16px 18px;padding:14px 16px 8px;
  border-radius:16px;
  background:linear-gradient(150deg,rgba(0,180,230,.09),rgba(10,108,240,.06));
  border:1.5px solid rgba(0,180,230,.24);
}
.truth-hdr{margin-bottom:10px}
.truth-title{font-size:.92rem;font-weight:900;color:var(--lake);letter-spacing:-.01em}
.truth-sub{font-size:.68rem;font-weight:500;color:var(--dim);margin-top:3px;line-height:1.5}
.truth-row{
  display:flex;align-items:flex-start;gap:11px;
  padding:10px 0;border-top:1px solid rgba(0,180,230,.15);
  cursor:pointer;
}
.truth-row:first-of-type{border-top:none}
.truth-thumb{width:50px;height:50px;border-radius:9px;object-fit:contain;background:var(--surface);flex-shrink:0}
.truth-info{flex:1;min-width:0}
.truth-song{font-size:.84rem;font-weight:800;color:var(--text)}
.truth-artist{font-size:.66rem;font-weight:600;color:var(--dim);margin:1px 0 4px}
.truth-note{font-size:.7rem;font-weight:500;color:var(--text2);line-height:1.5;font-style:italic}
.truth-play{
  width:38px;height:38px;flex-shrink:0;align-self:center;padding:0;
  border-radius:999px;
  background:rgba(245,247,251,.08);
  border:1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter:blur(10px) saturate(120%);
  backdrop-filter:blur(10px) saturate(120%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 0 14px rgba(101,185,255,.2),0 5px 14px rgba(0,0,0,.28);
  display:flex;align-items:center;justify-content:center;
}
.truth-play svg{width:18px;height:18px;color:var(--lake);margin-left:2px}

.cl-scroll{
  display:flex;gap:12px;overflow-x:auto;overflow-y:hidden;
  padding:4px 16px 10px;
  scrollbar-width:thin;scrollbar-color:var(--blue) var(--border);
}
.cl-scroll::-webkit-scrollbar{height:5px;display:block}
.cl-scroll::-webkit-scrollbar-track{background:var(--border);border-radius:3px}
.cl-scroll::-webkit-scrollbar-thumb{background:var(--blue);border-radius:3px}
.cl-card{flex-shrink:0;width:128px;cursor:pointer}
.cl-card:active .cl-art{transform:scale(.97)}
.cl-art{
  width:128px;height:128px;border-radius:12px;
  object-fit:contain;background:var(--surface);
  margin-bottom:7px;transition:transform .12s;
}
.cl-title{font-size:.74rem;font-weight:700;color:var(--text);margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cl-artist{font-size:.63rem;font-weight:500;color:var(--dim)}

/* BROWSE */
#browse{background:var(--bg)}
.browse-hdr{
  padding:calc(32px + env(safe-area-inset-top,0px)) 20px 22px 4px;
  background:linear-gradient(145deg,var(--slate),var(--ink));
  color:#fff;
}
.browse-hdr h1{font-size:1.45rem;font-weight:900;letter-spacing:-.025em;margin-bottom:3px}
.lhead{display:flex;align-items:baseline;justify-content:space-between;padding:14px 16px 2px 16px}
.lhead h2{font-size:.95rem;font-weight:800;letter-spacing:-.01em;color:var(--text)}
.lhead .see-all{font-size:.7rem;font-weight:700;color:var(--lake);background:none;border:0;cursor:pointer;padding:6px 4px}
.lsec[hidden]{display:none}
.chip-ic{width:14px;height:14px;vertical-align:-2px;margin-right:5px;flex-shrink:0}
/* Mission overlay — required read during signup */
#mission-overlay{position:fixed;inset:0;z-index:10010;background:#0b0f14;display:none;flex-direction:column}
#mission-overlay.on{display:flex;animation:npFade .3s ease}
.mission-top{flex-shrink:0;display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid rgba(255,255,255,.08)}
.mission-top .mt-x{width:34px;height:34px;border-radius:50%;border:0;background:rgba(255,255,255,.08);color:#fff;cursor:pointer;font-size:1.2rem;line-height:1;flex-shrink:0}
.mission-top .mt-title{font-weight:800;font-size:.95rem;color:#fff}
.mission-scroll{flex:1;overflow-y:auto;padding:20px 20px 30px;-webkit-overflow-scrolling:touch}
.mission-doc{max-width:680px;margin:0 auto;color:rgba(255,255,255,.74)}
.mission-doc h1{font-size:1.5rem;font-weight:900;color:#fff;margin:20px 0 6px;letter-spacing:-.02em;line-height:1.2}
.mission-doc h2{font-size:1.06rem;font-weight:800;color:#fff;margin:16px 0 4px}
.mission-doc h3{font-size:.92rem;font-weight:800;color:var(--lake);margin:14px 0 2px}
.mission-doc p{font-size:.87rem;line-height:1.62;margin:9px 0}
.mission-doc blockquote{border-left:3px solid var(--gold);padding:5px 0 5px 14px;margin:12px 0;font-style:italic;color:#fff}
.mission-doc strong{color:#fff;font-weight:700}
.mission-doc hr{border:0;border-top:1px solid rgba(255,255,255,.1);margin:22px 0}
.mission-doc ul{margin:8px 0;padding-left:20px}
.mission-doc li{font-size:.87rem;line-height:1.55;margin:5px 0}
.mission-doc .mission-tagline{font-size:1.02rem;font-weight:800;color:#fff;margin:12px 0 2px;text-align:center}
.mission-cta{flex-shrink:0;padding:10px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid rgba(255,255,255,.08);background:#0b0f14}
.mission-cta .ma-hint{text-align:center;font-size:.72rem;color:rgba(255,255,255,.45);margin-bottom:8px}
.mission-cta .ma-btn{width:100%;padding:14px;border-radius:12px;border:0;font-weight:800;font-size:.9rem;cursor:pointer;background:var(--gold);color:#1a1205}
.mission-cta .ma-btn:disabled{opacity:.4;cursor:not-allowed}
/* ── Onboarding wizard (signup) ─────────────────────────────────────── */
#onboard{position:fixed;inset:0;z-index:10000;background:#0b0f14;display:none;flex-direction:column}
#onboard.on{display:flex;animation:npFade .3s ease}
.onb-top{flex-shrink:0;display:flex;align-items:center;gap:10px;padding:12px 16px}
.onb-top .ob-back{width:34px;height:34px;border-radius:50%;border:0;background:rgba(255,255,255,.08);color:#fff;cursor:pointer;font-size:1.2rem;line-height:1;flex-shrink:0;display:grid;place-items:center}
.onb-top .ob-back[hidden]{visibility:hidden}
.onb-dots{display:flex;gap:6px;flex:1;justify-content:center}
.onb-dots .d{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.18);transition:background .2s,transform .2s}
.onb-dots .d.on{background:var(--gold);transform:scale(1.25)}
.onb-skipall{background:none;border:0;color:rgba(255,255,255,.4);font-size:.72rem;font-weight:600;cursor:pointer}
.onb-scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:6px 20px 24px}
.onb-step{max-width:620px;margin:0 auto;display:none}
.onb-step.on{display:block;animation:npFade .3s ease}
/* per-step video slot */
.onb-video{position:relative;width:100%;aspect-ratio:16/9;border-radius:16px;overflow:hidden;background:linear-gradient(135deg,#11161d,#0b0f14);border:1px solid rgba(255,255,255,.08);margin:8px 0 16px;display:flex;align-items:center;justify-content:center}
.onb-video iframe,.onb-video video{position:absolute;inset:0;width:100%;height:100%;border:0;object-fit:cover;background:#000}
.onb-video .ph{display:flex;flex-direction:column;align-items:center;gap:8px;color:rgba(255,255,255,.4)}
.onb-video .ph svg{width:40px;height:40px;filter:drop-shadow(0 0 10px rgba(var(--accent-listen-rgb),.4))}
.onb-video .ph span{font-size:.72rem;font-weight:600}
.onb-h1{font-size:1.6rem;font-weight:900;color:#fff;letter-spacing:-.02em;line-height:1.15;margin:6px 0 2px;text-align:center}
.onb-h2{font-size:1rem;font-weight:800;color:#fff;margin:14px 0 4px}
.onb-sub{font-size:.92rem;font-weight:600;color:var(--lake);text-align:center;margin-bottom:6px}
.onb-p{font-size:.86rem;line-height:1.6;color:rgba(255,255,255,.74);margin:9px 0}
.onb-quote{border-left:3px solid var(--gold);padding:6px 0 6px 14px;margin:14px 0;font-style:italic;color:#fff;font-size:.9rem}
.onb-points{list-style:none;padding:0;margin:14px 0}
.onb-points li{display:flex;align-items:flex-start;gap:10px;font-size:.88rem;color:rgba(255,255,255,.82);margin:10px 0;line-height:1.45}
.onb-points li svg{width:18px;height:18px;color:var(--gold);flex-shrink:0;margin-top:1px}
.onb-field{width:100%;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);border-radius:11px;padding:13px 14px;color:#fff;font-size:.9rem;margin:7px 0}
.onb-field::placeholder{color:rgba(255,255,255,.4)}
.onb-label{font-size:.7rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--dim);margin:14px 0 4px}
.onb-rolegrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:6px}
.onb-rolecard{padding:13px 10px;border-radius:12px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);color:rgba(255,255,255,.8);font-size:.8rem;font-weight:700;cursor:pointer;text-align:center;transition:all .15s}
.onb-rolecard.on{border-color:rgba(var(--accent-listen-rgb),.6);background:rgba(var(--accent-listen-rgb),.14);color:#fff}

/* signup category cards — three top-level identities chosen at Create Account */
.onb-catgrid{display:flex;flex-direction:column;gap:10px;margin-top:6px}
.onb-catcard{
  text-align:left;padding:13px 14px;border-radius:14px;cursor:pointer;
  background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);
  color:rgba(255,255,255,.85);transition:all .15s;
}
.onb-catcard .ct-name{font-size:.95rem;font-weight:800;letter-spacing:-.01em;color:#fff;margin-bottom:2px}
.onb-catcard .ct-sub{font-size:.78rem;line-height:1.4;color:var(--text2);font-weight:500}
.onb-catcard.on{background:rgba(var(--accent-listen-rgb),.14);border-color:rgba(var(--accent-listen-rgb),.55)}
.onb-catcard[data-v="contributor"].on{background:rgba(182,140,255,.14);border-color:rgba(182,140,255,.55)}
.onb-catcard[data-v="donor"].on{background:rgba(217,164,65,.16);border-color:rgba(217,164,65,.6)}
/* age-tier cards — same shape as catcards, distinct tints */
.onb-tiergrid{display:flex;flex-direction:column;gap:8px;margin-top:6px}
.onb-tiercard{text-align:left;padding:11px 13px;border-radius:13px;cursor:pointer;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);color:rgba(255,255,255,.85);transition:all .15s}
.onb-tiercard .ct-name{font-size:.9rem;font-weight:800;letter-spacing:-.01em;color:#fff;margin-bottom:2px}
.onb-tiercard .ct-sub{font-size:.74rem;line-height:1.4;color:var(--text2);font-weight:500}
.onb-tiercard[data-v="adult"].on{background:rgba(101,185,255,.14);border-color:rgba(101,185,255,.55)}
.onb-tiercard[data-v="youth"].on{background:rgba(182,140,255,.14);border-color:rgba(182,140,255,.55)}
.onb-tiercard[data-v="primary"].on{background:rgba(217,164,65,.14);border-color:rgba(217,164,65,.55)}
/* membership plan cards */
.onb-plan{border-radius:16px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);padding:16px;margin:12px 0;cursor:pointer;transition:all .18s;position:relative}
.onb-plan.on{border-color:var(--gold);background:linear-gradient(180deg,rgba(242,178,51,.12),rgba(242,178,51,.03));box-shadow:0 0 22px rgba(242,178,51,.18)}
.onb-plan-grp{font-size:.64rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--lake)}
.onb-plan-name{font-size:1.05rem;font-weight:900;color:#fff;margin-top:2px}
.onb-plan-price{font-size:.95rem;font-weight:800;color:var(--gold);margin:2px 0 8px}
.onb-plan-price .per{font-size:.7rem;font-weight:600;color:var(--dim)}
.onb-plan-desc{font-size:.78rem;color:rgba(255,255,255,.6);margin-bottom:8px}
.onb-plan-feats{list-style:none;padding:0;margin:0}
.onb-plan-feats li{font-size:.78rem;color:rgba(255,255,255,.78);padding-left:18px;position:relative;margin:4px 0;line-height:1.4}
.onb-plan-feats li::before{content:"✓";position:absolute;left:0;color:var(--gold);font-weight:800}
.onb-plan-check{position:absolute;top:14px;right:14px;width:22px;height:22px;border-radius:50%;border:2px solid rgba(255,255,255,.25);display:grid;place-items:center}
.onb-plan.on .onb-plan-check{border-color:var(--gold);background:var(--gold)}
.onb-plan.on .onb-plan-check::after{content:"✓";color:#1a1205;font-size:.7rem;font-weight:900}
.onb-note{font-size:.72rem;color:var(--dim);text-align:center;margin:6px 0 0;font-style:italic}
/* donation amounts */
.onb-amts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}
.onb-amt{padding:14px 6px;border-radius:12px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);color:#fff;font-weight:800;font-size:.9rem;cursor:pointer}
.onb-amt.on{border-color:var(--gold);background:rgba(242,178,51,.14);color:var(--gold)}
.onb-freq{display:flex;gap:8px;margin:8px 0}
.onb-freq button{flex:1;padding:10px;border-radius:10px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);color:rgba(255,255,255,.7);font-weight:700;font-size:.8rem;cursor:pointer}
.onb-freq button.on{border-color:var(--lake);background:rgba(0,180,230,.14);color:#fff}
.onb-chips{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}
.onb-chip{padding:9px 13px;border-radius:99px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);color:rgba(255,255,255,.78);font-size:.78rem;font-weight:600;cursor:pointer}
.onb-chip.on{border-color:var(--gold);background:rgba(242,178,51,.14);color:#fff}
.onb-cta{flex-shrink:0;padding:10px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid rgba(255,255,255,.08);background:#0b0f14;display:flex;flex-direction:column;gap:8px}
.onb-cta .ob-primary{width:100%;padding:14px;border-radius:12px;border:0;font-weight:800;font-size:.92rem;cursor:pointer;background:var(--gold);color:#1a1205}
.onb-cta .ob-primary:disabled{opacity:.4;cursor:not-allowed}
.onb-cta .ob-ghost{width:100%;padding:11px;border-radius:12px;border:0;background:none;color:rgba(255,255,255,.55);font-weight:600;font-size:.82rem;cursor:pointer}
.onb-pw{position:relative}
.onb-pw .onb-field{padding-right:46px}
.onb-eye{position:absolute;right:6px;top:7px;width:34px;height:34px;display:grid;place-items:center;background:none;border:0;color:rgba(255,255,255,.5);cursor:pointer;padding:0}
.onb-eye svg{width:20px;height:20px}
.onb-eye .eye-off{display:none}
.onb-eye.on .eye-off{display:block}
.onb-eye.on .eye-on{display:none}
.onb-social{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;padding:13px;border-radius:11px;border:1px solid rgba(255,255,255,.16);background:#fff;color:#1f2430;font-weight:700;font-size:.88rem;cursor:pointer;margin:6px 0}
.onb-social:active{transform:scale(.99)}
.onb-social svg{width:18px;height:18px;flex-shrink:0}
.onb-or{display:flex;align-items:center;gap:10px;margin:14px 0 8px;color:var(--dim);font-size:.7rem;font-weight:700;letter-spacing:.05em}
.onb-or::before,.onb-or::after{content:"";flex:1;height:1px;background:rgba(255,255,255,.12)}
.onb-hint{font-size:.72rem;color:var(--dim);margin:3px 2px 8px}
.onb-hint.bad{color:var(--copper)}
/* "Why do you need this?" — a small round info button that sits inside an
   .onb-label and toggles a short plain-language answer. Used on the signup
   fields we REQUIRE (date of birth, residence), because a required personal
   field with no stated reason reads as data harvesting. Toggled by onbWhy(). */
.onb-why{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;
  margin-left:6px;padding:0;border-radius:50%;border:1px solid var(--dim);background:transparent;
  color:var(--dim);font-size:.62rem;font-weight:800;font-style:italic;line-height:1;cursor:pointer;
  vertical-align:middle;transition:color .15s,border-color .15s}
.onb-why:hover,.onb-why[aria-expanded="true"]{color:var(--lake);border-color:var(--lake)}
.onb-why-body{display:none;gap:7px;align-items:flex-start;margin:2px 0 4px;padding:9px 11px;
  border-radius:10px;background:rgba(245,247,251,.04);border:1px solid var(--glass-brd);
  font-size:.7rem;line-height:1.45;color:var(--dim);text-transform:none;letter-spacing:normal;font-weight:400}
.onb-why-body.on{display:flex}
/* Listen hub icon grid — replaces the title banner. Tiles flow left-to-right,
   tight, wrapping to a 2nd row once they fill the width. Icons sit on the
   screen background; the "on" state is a glow on the icon + brighter label. */
.lhub-grid{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:2px 2px;padding:14px 8px 8px}
.lhub-tile{
  flex:0 0 calc((100% - 6px) / 4);
  max-width:96px;
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;
  padding:6px 2px 6px;background:none;border:0;cursor:pointer;color:var(--text);
  transition:transform .15s ease;
}
.lhub-tile:active{transform:scale(.95)}
.lhub-ic{
  width:62px;height:62px;object-fit:contain;
  filter:drop-shadow(0 0 8px rgba(var(--accent-listen-rgb),.35));
  transition:filter .2s ease,transform .2s ease;
}
.lhub-tile.on .lhub-ic{
  filter:drop-shadow(0 0 18px rgba(var(--accent-listen-rgb),.85)) drop-shadow(0 0 32px rgba(var(--accent-listen-rgb),.45));
  transform:scale(1.04);
}
.lhub-lbl{font-size:.555rem;font-weight:700;letter-spacing:0;text-align:center;line-height:1.15;color:var(--text2);max-width:100%;overflow-wrap:break-word;hyphens:auto}
.lhub-tile.on .lhub-lbl{color:#fff;text-shadow:0 0 10px rgba(var(--accent-listen-rgb),.5)}
.browse-hdr p{font-size:.73rem;font-weight:500;color:rgba(255,255,255,.55)}

.chips{
  display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;
  padding:14px 16px 12px 4px;
  scrollbar-width:thin;scrollbar-color:var(--blue) var(--border);
}
.chips::-webkit-scrollbar{height:5px;display:block}
.chips::-webkit-scrollbar-track{background:var(--border);border-radius:3px}
.chips::-webkit-scrollbar-thumb{background:var(--blue);border-radius:3px}
.chip{
  flex-shrink:0;padding:7px 18px;border-radius:99px;
  font-size:.7rem;font-weight:700;
  border:1.5px solid var(--border);background:var(--surface);
  color:var(--dim);transition:all .15s;
}
.chip.on{background:var(--blue);border-color:var(--royal);color:#fff;box-shadow:0 0 14px rgba(10,108,240,.5)}
.chip-truth{border-color:rgba(0,180,230,.5);color:var(--lake)}
.chip-truth.on{background:var(--lake);border-color:var(--lake);color:#fff}

.browse-lbl{font-size:.61rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);padding:8px 18px 10px 4px}

/* The floating Support button (#support-fab) was removed from index.html at
   some point but left its CSS + refreshSupportFab() behind; the styles matched
   nothing for months. Cleared V1.698. The Support entry now lives in the
   hamburger (.mm-support) — if a floating CTA comes back, give it a new id. */

/* Donor Requests screen */
#donor-requests{padding:14px 16px 96px}
.dr-hero{
  padding:18px 16px 16px;border-radius:18px;margin-bottom:14px;
  background:radial-gradient(circle at 30% 0%, rgba(217,164,65,.22), rgba(101,185,255,.08) 60%, rgba(0,0,0,.4));
  border:1px solid rgba(255,255,255,.08);
}
.dr-hero-title{font-family:var(--head);font-size:1.4rem;font-weight:800;letter-spacing:-.01em;color:#fff;margin-bottom:4px}
.dr-hero-sub{font-size:.85rem;color:var(--text2);line-height:1.45}
.dr-sub{font-size:.75rem;color:var(--text2);line-height:1.45;margin:-4px 4px 10px}
.dr-list{display:flex;flex-direction:column;gap:10px}
.dr-card{
  padding:14px;border-radius:14px;cursor:pointer;
  background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);
  transition:transform .15s, border-color .15s, background .15s;
}
.dr-card:hover{transform:translateY(-1px);border-color:rgba(217,164,65,.5);background:rgba(255,255,255,.07)}
.dr-card-kind{font-size:.62rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:rgba(217,164,65,.95);margin-bottom:4px}
.dr-card-title{font-size:1rem;font-weight:800;color:#fff;line-height:1.25;margin-bottom:4px}
.dr-card-summary{font-size:.82rem;color:var(--text2);line-height:1.45;margin-bottom:10px}
.dr-card-bar{height:6px;border-radius:99px;background:rgba(255,255,255,.08);overflow:hidden;margin-bottom:6px}
.dr-card-bar > i{display:block;height:100%;background:linear-gradient(90deg, #D9A441, #65B9FF);border-radius:99px}
.dr-card-meta{font-size:.72rem;color:var(--text2);display:flex;justify-content:space-between;gap:10px}
.dr-card-meta strong{color:#fff;font-weight:700}
.dr-empty{padding:14px;border-radius:12px;background:rgba(255,255,255,.04);border:1px dashed rgba(255,255,255,.1);color:var(--dim);font-size:.82rem;text-align:center}

/* Project / request detail screen */
#project-detail{padding:10px 16px 110px}
.pd-back{
  display:inline-flex;align-items:center;gap:6px;
  background:transparent;border:0;color:var(--text2);cursor:pointer;
  font-size:.84rem;font-weight:600;padding:6px 4px;margin-bottom:6px;
}
.pd-back:hover{color:#fff}
.pd-back svg{width:18px;height:18px}
.pd-hero{
  width:100%;aspect-ratio:16/9;border-radius:16px;overflow:hidden;
  background:radial-gradient(circle at 30% 0%, rgba(217,164,65,.22), rgba(101,185,255,.08) 60%, rgba(0,0,0,.4));
  background-size:contain;background-repeat:no-repeat;background-position:center;margin-bottom:14px;
  border:1px solid rgba(255,255,255,.08);
}
.pd-kind{font-size:.64rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:rgba(217,164,65,.95);margin-bottom:6px}
.pd-title{font-family:var(--head);font-size:1.5rem;font-weight:800;line-height:1.15;color:#fff;margin-bottom:6px}
.pd-creator{font-size:.85rem;color:var(--text2);margin-bottom:14px}
.pd-creator strong{color:#fff;font-weight:700}
.pd-bar{height:9px;border-radius:99px;background:rgba(255,255,255,.08);overflow:hidden;margin-bottom:8px}
.pd-bar > i{display:block;height:100%;background:linear-gradient(90deg,#D9A441,#65B9FF);border-radius:99px}
.pd-stats{display:flex;justify-content:space-between;gap:10px;font-size:.82rem;color:var(--text2);margin-bottom:18px}
.pd-stats strong{color:#fff;font-weight:800;font-size:1.02rem}
.pd-section{margin:0 0 18px}
.pd-section-h{font-size:.72rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--dim);margin-bottom:7px}
.pd-section p{font-size:.9rem;color:var(--text);line-height:1.55;margin:0 0 8px;white-space:pre-wrap}
.pd-deliverables{list-style:none;margin:0;padding:0}
.pd-deliverables li{position:relative;padding:5px 0 5px 22px;font-size:.9rem;color:var(--text);line-height:1.45}
.pd-deliverables li::before{content:"";position:absolute;left:2px;top:11px;width:8px;height:8px;border-radius:50%;background:var(--gold)}
.pd-budget{display:flex;flex-direction:column;gap:6px}
.pd-budget-row{display:flex;justify-content:space-between;gap:12px;font-size:.86rem;padding:7px 11px;border-radius:9px;background:rgba(255,255,255,.04)}
.pd-budget-row span:first-child{color:var(--text2)}
.pd-budget-row span:last-child{color:#fff;font-weight:700}
.pd-support-btn{
  width:100%;padding:14px;border-radius:14px;border:0;cursor:pointer;
  font-family:var(--head);font-size:1rem;font-weight:800;color:#1a1207;
  background:linear-gradient(135deg,#F5C467 0%,#D9A441 55%,#B8853A 100%);
  box-shadow:0 8px 22px rgba(217,164,65,.32);
  margin:6px 0 16px;transition:transform .12s,filter .12s;
}
.pd-support-btn:hover{filter:brightness(1.05)}
.pd-support-btn:active{transform:scale(.98)}
.pd-disclaimer{font-size:.74rem;color:var(--dim);line-height:1.5;padding:12px;border-radius:10px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07)}
/* ── Milestone ladder — the work-progress ruler on project detail ── */
.pd-miles{display:flex;flex-direction:column;gap:2px}
.pdm-row{display:flex;align-items:flex-start;gap:10px;padding:8px 4px;border-bottom:1px solid rgba(255,255,255,.05)}
.pdm-row:last-child{border-bottom:0}
.pdm-row.is-done .pdm-t{color:var(--text2)}
.pdm-ic{flex:0 0 18px;text-align:center;font-size:.85rem;line-height:1.4}
.pdm-done{color:var(--gold,#D9A441);font-weight:800}
.pdm-now{color:var(--lake,#65B9FF)}
.pdm-plan{color:var(--dim,#9aa3b4)}
.pdm-tx{flex:1;min-width:0}
.pdm-t{font-size:.88rem;font-weight:700;color:var(--text);line-height:1.3}
.pdm-d{font-size:.76rem;color:var(--dim);line-height:1.4;margin-top:1px}
.pdm-when{flex:0 0 auto;font-size:.64rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--gold,#D9A441);padding:2px 7px;border-radius:99px;background:rgba(217,164,65,.12)}
/* Accounts roster (admin) */
.acct-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:12px 16px 4px}
.acct-stat{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:10px 8px;text-align:center}
.acct-stat .n{font-size:1.25rem;font-weight:900;color:#fff;line-height:1}
.acct-stat .l{font-size:.6rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--dim);margin-top:4px}
.acct-row{display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:13px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);margin-bottom:8px;cursor:pointer;transition:background .15s}
.acct-row:hover{background:rgba(255,255,255,.07)}
.acct-av{flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.08);display:grid;place-items:center;font-weight:800;color:var(--text2);font-size:.9rem;overflow:hidden}
.acct-av img{width:100%;height:100%;object-fit:cover}
.acct-main{flex:1;min-width:0}
.acct-name{font-size:.9rem;font-weight:800;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.acct-sub{font-size:.7rem;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}
.acct-right{flex:0 0 auto;text-align:right}
.acct-tier{font-size:.6rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;padding:3px 8px;border-radius:99px}
.acct-freq{font-size:.66rem;color:var(--text2);margin-top:4px;font-weight:600}
.acct-detail{padding:6px 4px 2px;font-size:.78rem;color:var(--text2);line-height:1.7}
.acct-detail b{color:var(--text);font-weight:700}
.pdm-when-now{color:var(--lake,#65B9FF);background:rgba(101,185,255,.12)}
.pdm-ev{font-size:.74rem;color:var(--lake,#65B9FF);text-decoration:underline;margin-left:6px}
/* ── Give sheet — records support in the donations ledger (beta: no charge) ── */
#give-sheet{position:fixed;inset:0;z-index:340;display:none;align-items:flex-end;justify-content:center;background:rgba(8,10,16,.62);backdrop-filter:blur(4px)}
#give-sheet.on{display:flex}
.gs-card{width:100%;max-width:430px;border-radius:22px 22px 0 0;padding:20px 18px 26px;background:var(--panel,#141824);border:1px solid var(--glass-brd,rgba(255,255,255,.12));border-bottom:0}
.gs-title{font-family:var(--head);font-weight:800;font-size:1.1rem;color:var(--text);margin-bottom:2px}
.gs-sub{font-size:.8rem;color:var(--text2);margin-bottom:14px}
.gs-amounts{display:flex;gap:8px;margin-bottom:10px}
.gs-amt{flex:1;padding:13px 0;border-radius:12px;text-align:center;font-weight:800;font-size:.95rem;cursor:pointer;color:var(--text);background:rgba(255,255,255,.06);border:1px solid var(--glass-brd,rgba(255,255,255,.12))}
.gs-amt.on{background:linear-gradient(135deg,#F5C467 0%,#D9A441 100%);color:#1a1207;border-color:transparent}
.gs-custom{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--glass-brd,rgba(255,255,255,.12));background:rgba(255,255,255,.05);color:var(--text);font-size:.95rem;margin-bottom:10px}
.gs-note{width:100%;min-height:54px;padding:11px 14px;border-radius:12px;border:1px solid var(--glass-brd,rgba(255,255,255,.12));background:rgba(255,255,255,.05);color:var(--text);font-size:.88rem;resize:none;margin-bottom:10px}
.gs-beta{font-size:.74rem;color:var(--gold,#D9A441);background:rgba(217,164,65,.1);border:1px solid rgba(217,164,65,.3);border-radius:10px;padding:10px 12px;line-height:1.45;margin-bottom:14px}
.gs-actions{display:flex;gap:10px}
.gs-btn{flex:1;padding:14px 0;border-radius:13px;border:0;font-family:var(--head);font-weight:800;font-size:.98rem;cursor:pointer}
.gs-give{background:linear-gradient(135deg,#F5C467 0%,#D9A441 55%,#B8853A 100%);color:#1a1207}
.gs-cancel{background:rgba(255,255,255,.07);color:var(--text);border:1px solid var(--glass-brd,rgba(255,255,255,.12))}
/* ── Start-a-project entry + creation sheet (Project Support Page builder) ── */
.dr-start{display:flex;align-items:center;gap:12px;width:100%;margin-top:10px;padding:14px;border-radius:14px;cursor:pointer;text-align:left;background:rgba(217,164,65,.07);border:1px dashed rgba(217,164,65,.45);color:var(--text);transition:background .15s,border-color .15s}
.dr-start:hover{background:rgba(217,164,65,.12);border-color:rgba(217,164,65,.8)}
.dr-start-plus{flex:0 0 34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.3rem;font-weight:800;color:#1a1207;background:linear-gradient(135deg,#F5C467,#D9A441)}
.dr-start-tx{font-size:.8rem;color:var(--text2);line-height:1.4}
.dr-start-tx strong{display:block;font-size:.92rem;color:#fff}
#np-sheet{position:fixed;inset:0;z-index:340;display:none;align-items:flex-end;justify-content:center;background:rgba(8,10,16,.62);backdrop-filter:blur(4px)}
#np-sheet.on{display:flex}
.np-card{width:100%;max-width:430px;max-height:88vh;overflow-y:auto;border-radius:22px 22px 0 0;padding:20px 18px 26px;background:var(--panel,#141824);border:1px solid var(--glass-brd,rgba(255,255,255,.12));border-bottom:0}
.np-lbl{font-size:.68rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--dim);margin:4px 2px 6px}
.np-field{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--glass-brd,rgba(255,255,255,.12));background:rgba(255,255,255,.05);color:var(--text);font-size:.92rem;margin-bottom:10px}
textarea.np-field{min-height:84px;resize:none}
.np-mile{border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:10px;margin-bottom:10px;background:rgba(255,255,255,.03)}
.np-mile-top{display:flex;gap:6px;align-items:center;margin-bottom:6px}
.np-mile-num{flex:0 0 22px;height:22px;border-radius:50%;background:rgba(217,164,65,.16);color:var(--gold,#D9A441);font-size:.7rem;font-weight:800;display:flex;align-items:center;justify-content:center}
.np-mile-title{flex:1;min-width:0;padding:8px 10px;border-radius:9px;border:1px solid var(--glass-brd,rgba(255,255,255,.12));background:rgba(255,255,255,.05);color:var(--text);font-size:.88rem;font-weight:700}
.np-mile-desc{width:100%;min-height:44px;padding:8px 10px;border-radius:9px;border:1px solid var(--glass-brd,rgba(255,255,255,.12));background:rgba(255,255,255,.04);color:var(--text2);font-size:.8rem;resize:none}
.np-mile-btn{flex:0 0 26px;height:26px;border-radius:8px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:var(--text2);cursor:pointer;font-size:.7rem;line-height:1;display:flex;align-items:center;justify-content:center}
.np-mile-btn:disabled{opacity:.3;cursor:default}
.np-add{width:100%;padding:11px;border-radius:12px;border:1px dashed rgba(217,164,65,.45);background:transparent;color:var(--gold,#D9A441);font-weight:700;font-size:.85rem;cursor:pointer;margin-bottom:12px}
.np-drafting{display:flex;align-items:center;gap:10px;padding:14px;border-radius:12px;background:rgba(101,185,255,.08);border:1px solid rgba(101,185,255,.25);color:var(--text2);font-size:.84rem;margin-bottom:12px}
/* Owner milestone controls on project detail */
.pdm-act{flex:0 0 auto;padding:5px 10px;border-radius:99px;border:1px solid rgba(101,185,255,.45);background:rgba(101,185,255,.1);color:var(--lake,#65B9FF);font-size:.68rem;font-weight:800;letter-spacing:.04em;cursor:pointer}
.pdm-act-done{border-color:rgba(217,164,65,.5);background:rgba(217,164,65,.12);color:var(--gold,#D9A441)}
.pdm-act-undo{border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.06);color:var(--text2)}
.pdm-hint{font-size:.72rem;color:var(--dim);line-height:1.45;margin-top:8px}
.song-row{
  position:relative;overflow:hidden;
  display:flex;align-items:center;gap:12px;
  padding:11px 14px;border-radius:14px;border:none;
  margin:0 16px 8px 4px;
  --accent-rgb:101,185,255;
  background:var(--tile-solid,#161c26);
  -webkit-backdrop-filter:blur(14px) saturate(118%);backdrop-filter:blur(14px) saturate(118%);
  box-shadow:0 8px 22px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(var(--accent-rgb,245,247,251),.42),0 0 14px -2px rgba(var(--accent-rgb,245,247,251),.24);
  cursor:pointer;transition:transform .12s,box-shadow .18s;
}
.song-row::before{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;z-index:0;
  opacity:.42;mix-blend-mode:screen;
  background:linear-gradient(90deg,rgba(var(--accent-rgb),.16),transparent 24%),linear-gradient(180deg,rgba(255,255,255,.05),transparent 20%)}
.song-row>*{position:relative;z-index:1}
.song-row:active{transform:scale(.98)}
.sr-thumb{width:52px;height:52px;border-radius:8px;object-fit:contain;background:var(--surface);flex-shrink:0}
.sr-info{flex:1;overflow:hidden}
.sr-title{font-size:.85rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:2px}
.sr-feat{font-size:.67rem;font-weight:500;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:2px}
.sr-meta{font-size:.62rem;font-weight:600;color:var(--dim)}
.sr-play{
  width:36px;height:36px;border-radius:50%;
  background:var(--blue);color:#fff;
  font-size:.8rem;display:flex;align-items:center;justify-content:center;
  flex-shrink:0;transition:background .15s,transform .1s;
}
.sr-play:active{transform:scale(.88)}
.sr-play.now{background:var(--gold)}
.sr-playbtn{
  width:44px;height:44px;flex-shrink:0;padding:0;
  border-radius:999px;
  background:rgba(245,247,251,.08);
  border:1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter:blur(10px) saturate(120%);
  backdrop-filter:blur(10px) saturate(120%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 0 14px rgba(101,185,255,.2),0 5px 14px rgba(0,0,0,.28);
  display:flex;align-items:center;justify-content:center;
  transition:transform .1s;
}
.sr-playbtn:active{transform:scale(.88)}
.sr-playbtn svg{width:21px;height:21px;color:var(--lake);margin-left:2px}

/* TRIBES */
#tribes{background:var(--bg)}
.tribes-hdr{
  padding:calc(32px + env(safe-area-inset-top,0px)) 20px 22px 4px;
  background:linear-gradient(145deg,var(--ink),var(--blue));
  color:#fff;
}
.tribes-hdr h1{font-size:1.45rem;font-weight:900;letter-spacing:-.025em;margin-bottom:3px}
.tribes-hdr p{font-size:.73rem;font-weight:500;color:rgba(255,255,255,.6)}

.callout{
  margin:14px 16px 14px 4px;padding:14px 16px;
  border-radius:12px;border:1px dashed rgba(10,108,240,.35);
  background:rgba(10,108,240,.07);
  font-size:.72rem;font-weight:600;color:var(--blue);line-height:1.55;
}
.tribe-card{
  position:relative;overflow:hidden;
  margin:0 16px 12px 4px;border-radius:18px;padding:16px;border:none;
  --accent-rgb:182,140,255;
  background:var(--tile-solid,#161c26);   /* opaque — wave field must not show through */
  box-shadow:0 10px 28px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(var(--accent-rgb),.42),0 0 14px -2px rgba(var(--accent-rgb),.24);
}
.tribe-card::before{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;z-index:0;
  opacity:.42;mix-blend-mode:screen;
  background:linear-gradient(90deg,rgba(var(--accent-rgb),.16),transparent 28%),linear-gradient(180deg,rgba(255,255,255,.055),transparent 22%)}
.tribe-card>*{position:relative;z-index:1}
.tc-top{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.tc-icon{
  width:46px;height:46px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  font-size:1.35rem;flex-shrink:0;
}
.tc-name{font-size:.9rem;font-weight:800;color:var(--text)}
.tc-mem{font-size:.69rem;font-weight:500;color:var(--dim)}
.tc-desc{font-size:.74rem;color:var(--text2);line-height:1.55;margin-bottom:12px}
.tc-btn{
  width:100%;padding:10px;border-radius:9px;
  font-size:.78rem;font-weight:700;color:#fff;transition:opacity .15s;
}
.tc-btn:active{opacity:.8}
.tc-btn.joined{background:var(--cloud)!important;color:var(--lake);border:1.5px solid var(--lake)}
.tc-icon img{width:100%;height:100%;object-fit:cover;border-radius:12px}

/* ARTIST TRIBE — exclusives badge */
.tc-exclusive{
  display:inline-block;margin-left:6px;padding:1px 7px;border-radius:99px;
  font-size:.54rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  background:rgba(203,90,42,.12);color:var(--copper);
}

/* TRIBE DETAIL SCREEN */
#tribe-detail{background:var(--bg)}
.tribe-detail-hdr{
  padding:calc(28px + env(safe-area-inset-top,0px)) 20px 20px 4px;
  background:linear-gradient(150deg,var(--slate),var(--ink));
  color:#fff;position:relative;
}
.td-back{
  position:absolute;top:calc(20px + env(safe-area-inset-top,0px));left:14px;
  width:36px;height:36px;border-radius:50%;
  background:rgba(255,255,255,.12);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:1rem;
}
.td-avatar{
  width:64px;height:64px;border-radius:16px;
  background:var(--grad);
  display:flex;align-items:center;justify-content:center;
  font-size:1.7rem;font-weight:900;color:var(--slate);
  margin:0 auto 10px;
}
.td-name{text-align:center;font-size:1.3rem;font-weight:900;letter-spacing:-.02em;margin-bottom:3px}
.td-stats{text-align:center;font-size:.7rem;font-weight:600;color:rgba(255,255,255,.6);margin-bottom:14px}
.td-join-btn{
  width:100%;padding:12px;border-radius:12px;
  font-size:.85rem;font-weight:800;
  background:var(--gold);color:var(--slate);
  transition:opacity .15s;
}
.td-join-btn:active{opacity:.85}
.td-join-btn.joined{background:rgba(255,255,255,.12);color:#fff;border:1.5px solid rgba(255,255,255,.3)}
.song-row.locked{opacity:.85}
.song-row.locked .sr-thumb{filter:grayscale(.7) brightness(.92)}
.lock-pill{
  display:inline-flex;align-items:center;gap:4px;
  font-size:.62rem;font-weight:700;color:var(--copper);
}
.tribe-cta{
  margin:8px 16px 14px;padding:16px;
  border-radius:14px;text-align:center;
  background:linear-gradient(135deg,rgba(242,178,51,.1),rgba(10,108,240,.06));
  border:1.5px dashed rgba(242,178,51,.4);
}
.tribe-cta-title{font-size:.86rem;font-weight:800;color:var(--text);margin-bottom:4px}
.tribe-cta-sub{font-size:.72rem;font-weight:500;color:var(--dim);line-height:1.5}

/* FREE GLOBAL LIBRARY */
#free{background:var(--bg)}

/* PROFILE */
#profile{background:var(--bg)}
.profile-hdr{
  padding:calc(36px + env(safe-area-inset-top,0px)) 20px 28px;
  background:linear-gradient(145deg,var(--slate),var(--ink));
  text-align:center;color:#fff;
}
.p-avatar{
  width:76px;height:76px;border-radius:50%;
  background:var(--grad);
  display:flex;align-items:center;justify-content:center;font-size:2.1rem;
  margin:0 auto 12px;border:3px solid rgba(255,255,255,.2);
  color:var(--slate);font-weight:900;
}
.profile-hdr h1{font-size:1.15rem;font-weight:900;margin-bottom:3px}
.profile-hdr p{font-size:.72rem;color:rgba(255,255,255,.55);font-weight:500}

.pf-sec{padding:14px 16px 4px 4px}
.pf-sec-lbl{font-size:.6rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);padding:0 4px 8px}
.pf-row{
  position:relative;overflow:hidden;
  display:flex;align-items:center;gap:12px;
  padding:13px 14px;border:none;border-radius:12px;margin-bottom:8px;cursor:pointer;
  /* glass tile anatomy: translucent fill + backdrop blur + depth shadow */
  --accent-rgb:245,247,251;
  background:var(--tile-solid,#161c26);
  -webkit-backdrop-filter:blur(14px) saturate(118%);backdrop-filter:blur(14px) saturate(118%);
  box-shadow:0 8px 22px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(var(--accent-rgb,245,247,251),.42),0 0 14px -2px rgba(var(--accent-rgb,245,247,251),.24);
  transition:transform .18s ease,box-shadow .18s ease;
}
/* one-sided edge light (Top Light Shine + Edge Glow) — implies the rim, no hard outline */
.pf-row::before{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;z-index:0;
  opacity:.42;mix-blend-mode:screen;
  background:linear-gradient(90deg,rgba(var(--accent-rgb),.16),transparent 28%),linear-gradient(180deg,rgba(255,255,255,.055),transparent 22%)}
.pf-row>*{position:relative;z-index:1}
.pf-row:active{transform:translateY(1px) scale(.995)}
.pf-row.gold{background:linear-gradient(135deg,rgba(242,178,51,.08),rgba(229,185,31,.04));border-color:rgba(242,178,51,.25)}
.pf-row.danger{color:var(--copper)}
.pf-row.danger .pf-lbl{color:var(--copper)}
.pf-ico{display:inline-flex;align-items:center;justify-content:center;width:26px;flex-shrink:0;color:rgba(190,198,212,.85)}
.pf-ico svg{width:23px;height:23px}
.pf-row.gold .pf-ico{color:var(--gold)}
.pf-row.danger .pf-ico{color:var(--copper)}
.pf-ico .sun{display:none}
.pf-ico.light .moon{display:none}
.pf-ico.light .sun{display:block}
.pf-body{flex:1}
.pf-lbl{font-size:.82rem;font-weight:700;color:var(--text)}
.pf-sub{font-size:.68rem;font-weight:500;color:var(--dim);margin-top:1px}
.pf-arr{font-size:.8rem;color:var(--dim)}

/* ── MY LIBRARY (Accounts-S1) ─────────────────────────────────────────────*/
.mylib-tabbar{display:flex;gap:6px;padding:0 16px 10px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.mylib-tab{flex:0 0 auto;padding:7px 15px;border-radius:999px;border:1px solid var(--glass-brd,rgba(245,247,251,.12));
  background:transparent;color:var(--dim);font-size:.76rem;font-weight:700;cursor:pointer;white-space:nowrap}
.mylib-tab.on{background:var(--gold,#d8a44a);border-color:transparent;color:#1a1206}
.mylib-sec-lbl{padding:14px 18px 6px;font-size:.66rem;font-weight:800;letter-spacing:.06em;
  text-transform:uppercase;color:var(--dim)}
.mylib-empty,.mylib-loading{padding:40px 24px;text-align:center;color:var(--dim);
  font-size:.78rem;font-weight:500;line-height:1.6}
.mylib-pl-ico,.mylib-cr-ico{display:flex;align-items:center;justify-content:center;
  font-weight:800;color:var(--text2);background:var(--tile-solid,#161c26);overflow:hidden}
.mylib-cr-ico{border-radius:50%}
.mylib-cta{display:block;width:calc(100% - 32px);margin:12px 16px 4px;padding:12px;border-radius:12px;
  border:none;background:var(--gold,#d8a44a);color:#1a1206;font-size:.82rem;font-weight:800;cursor:pointer;text-align:center}
.mylib-cta.ghost{background:transparent;border:1px solid var(--glass-brd,rgba(245,247,251,.12));color:var(--text)}
.mylib-stat-row{display:flex;gap:8px;padding:14px 16px 4px}
.mylib-stat{flex:1;text-align:center;background:var(--tile-solid,#161c26);border-radius:12px;padding:12px 4px}
.mylib-stat b{display:block;font-size:1.3rem;font-weight:800;color:var(--text)}
.mylib-stat span{font-size:.62rem;font-weight:600;color:var(--dim);text-transform:uppercase;letter-spacing:.04em}
.ci-line{display:flex;justify-content:space-between;align-items:center;padding:7px 2px;
  border-bottom:1px solid var(--glass-brd,rgba(245,247,251,.08));font-size:.82rem;color:var(--text2)}
.ci-line b{color:var(--text)}

/* Sam's Voice add-on card — neutral smoked glass, gold only as accent light */
.vx-card{position:relative;overflow:hidden;border-radius:14px;padding:15px;margin-bottom:8px;
  background:var(--tile-solid,#161c26);
  -webkit-backdrop-filter:blur(14px) saturate(118%);backdrop-filter:blur(14px) saturate(118%);
  box-shadow:0 8px 22px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(242,178,51,.30),0 0 16px -3px rgba(242,178,51,.18)}
.vx-head{display:flex;align-items:flex-start;gap:11px}
.vx-ico{flex-shrink:0;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:var(--gold);background:rgba(242,178,51,.10);border:1px solid rgba(242,178,51,.22)}
.vx-ico svg{width:19px;height:19px}
.vx-head-txt{flex:1;min-width:0}
.vx-title{font-family:var(--head);font-size:.96rem;font-weight:700;color:var(--text);line-height:1.15}
.vx-pitch{font-size:.72rem;color:var(--text2);margin-top:3px;line-height:1.45}
.vx-switch{flex-shrink:0;width:46px;height:27px;border-radius:99px;border:1px solid var(--glass-brd);background:rgba(245,247,251,.06);position:relative;cursor:pointer;transition:.2s;padding:0}
.vx-switch::after{content:"";position:absolute;top:2px;left:2px;width:21px;height:21px;border-radius:50%;background:var(--text2);transition:.2s}
.vx-switch.on{background:rgba(242,178,51,.85);border-color:rgba(242,178,51,.9)}
.vx-switch.on::after{left:21px;background:#0a0b14}
.vx-body{margin-top:13px}
.vx-personas{display:flex;gap:8px;margin-bottom:13px}
.vx-pill{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;padding:9px;border-radius:11px;font-size:.78rem;font-weight:600;color:var(--text2);background:rgba(245,247,251,.05);border:1px solid var(--glass-brd);cursor:pointer;transition:.18s}
.vx-pill.on{color:var(--text);border-color:rgba(242,178,51,.55);background:rgba(242,178,51,.10)}
.vx-av{width:20px;height:20px;border-radius:50%;background:rgba(245,247,251,.12);display:grid;place-items:center;font-size:.62rem;font-weight:800;color:var(--text)}
.vx-pill.on .vx-av{background:var(--gold);color:#0a0b14}
.vx-meter-top{display:flex;justify-content:space-between;align-items:baseline;font-size:.68rem;margin-bottom:6px}
.vx-used{color:var(--text2);font-weight:600}
.vx-cap{color:var(--dim)}
.vx-meter{height:7px;border-radius:99px;background:rgba(245,247,251,.08);overflow:hidden}
.vx-meter-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,var(--gold),#e5b91f);transition:width .3s}
.vx-meter-fill.warn{background:linear-gradient(90deg,#e0894a,#d4734a)}
.vx-note{font-size:.66rem;color:var(--dim);margin-top:9px;line-height:1.5}
.vx-off-note{font-size:.72rem;color:var(--text2);margin-top:12px;line-height:1.5}
.disclaim{margin:8px 16px 28px;padding:14px;text-align:center;font-size:.6rem;color:var(--dim);line-height:1.8;border-top:1px solid var(--border)}

/* UPLOAD FORM (light theme) */
.form-label-light{font-size:.62rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--dim);margin:14px 0 6px 2px}
.form-label-hint-light{font-weight:600;color:var(--dim);letter-spacing:.06em;text-transform:none;font-size:.85em;margin-left:6px;opacity:.7}
.form-field-light{
  width:100%;
  background:var(--surface);
  border:1.5px solid var(--border);
  border-radius:11px;
  padding:12px 14px;
  font-size:.88rem;font-weight:500;color:var(--text);
  transition:border-color .15s;
}
.form-field-light:focus{outline:none;border-color:var(--blue);background:var(--surface)}
.form-field-light::placeholder{color:var(--dim)}
select.form-field-light{appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--dim) 50%),linear-gradient(135deg,var(--dim) 50%,transparent 50%);background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:34px}
/* Dropdown option list — native popup defaults to a white background, so the
   field's light var(--text) rendered white-on-white and the choices were
   unreadable. Force a dark popup + light text (matches every other select). */
select.form-field-light option{background:#1b2230;color:#fff}

/* Creator-name typeahead (js/upload/artist-autocomplete.js): a menu of
   matching existing creators anchored under the Creator field. */
.ac-wrap{position:relative}
.ac-menu{
  position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:40;
  background:var(--surface);border:1.5px solid var(--border);border-radius:11px;
  box-shadow:0 10px 30px rgba(0,0,0,.35);overflow:hidden;display:none;
  max-height:240px;overflow-y:auto;
}
.ac-menu.on{display:block}
.ac-item{
  padding:10px 14px;font-size:.86rem;font-weight:500;color:var(--text);
  cursor:pointer;border-bottom:1px solid var(--border);
}
.ac-item:last-child{border-bottom:none}
.ac-item:hover,.ac-item.active{background:var(--blue);color:#fff}

/* Chapter authoring (js/upload/chapters.js): audiobook per-chapter rows +
   the shared file-chooser button used by the EPUB picker too. */
#up-ab-chapters{display:flex;flex-direction:column;gap:8px;margin:4px 0 8px}
.abch-row{display:flex;align-items:center;gap:8px}
.abch-num{flex:0 0 auto;min-width:18px;font-size:.75rem;font-weight:800;color:var(--dim)}
.abch-row .abch-title{flex:1 1 auto;min-width:0}
.abch-file{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;max-width:42%;
  background:var(--surface);border:1.5px solid var(--border);border-radius:11px;
  padding:9px 12px;font-size:.8rem;font-weight:600;color:var(--text);cursor:pointer;overflow:hidden}
.abch-file input[type=file]{display:none}
.abch-file-tx{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.abch-x{flex:0 0 auto;width:30px;height:30px;border:none;border-radius:8px;cursor:pointer;
  background:var(--surface);color:var(--dim);font-size:.9rem;line-height:1}
.abch-x:hover{background:var(--red,#e5484d);color:#fff}
.abch-add{margin-top:2px;background:var(--surface);border:1.5px dashed var(--border);
  border-radius:11px;padding:10px 14px;font-size:.82rem;font-weight:700;color:var(--blue);
  cursor:pointer;width:100%}
.abch-add:hover{border-color:var(--blue)}
/* Kid Kingdom upload toggle */
.up-kk-toggle{display:flex;align-items:center;gap:11px;margin:10px 0 4px;padding:11px 13px;border-radius:14px;cursor:pointer;
  border:1.5px solid var(--glass-brd);background:rgba(245,247,251,.04);transition:border-color .15s,background .15s}
.up-kk-toggle:has(input:checked){border-color:var(--gold);background:linear-gradient(120deg,rgba(245,200,90,.12),rgba(245,200,90,.05))}
.up-kk-toggle input{position:absolute;opacity:0;width:0;height:0}
.up-kk-box{flex:none;width:22px;height:22px;border-radius:7px;border:2px solid var(--dim);transition:all .15s;position:relative}
.up-kk-toggle:has(input:checked) .up-kk-box{background:var(--gold);border-color:var(--gold)}
.up-kk-toggle:has(input:checked) .up-kk-box::after{content:'';position:absolute;left:6px;top:2px;width:6px;height:11px;border:solid var(--slate);border-width:0 2.5px 2.5px 0;transform:rotate(45deg)}
.up-kk-tx{display:flex;flex-direction:column;gap:1px}
.up-kk-title{font-weight:800;font-size:.86rem;color:var(--text)}
.up-kk-sub{font-size:.68rem;color:var(--dim)}
/* Reverence "Where does this song belong?" setting picker — named settings, no
   numbers shown (tier stored 1-10 internally for Sam). Neutral glass cards;
   gold light marks the chosen home. A journey, not a ladder. */
/* D2: category quick-start chips at the top of the upload form */
.up-cat-chips{display:flex;flex-wrap:wrap;gap:7px;margin:2px 0 12px}
.up-cat-chip{display:inline-flex;align-items:center;gap:5px;padding:8px 13px;border-radius:99px;cursor:pointer;
  font-size:.8rem;font-weight:600;white-space:nowrap;color:var(--text2);
  border:1.5px solid var(--glass-brd);background:rgba(245,247,251,.04);transition:border-color .14s,background .14s,color .14s}
.up-cat-chip:hover{background:rgba(245,247,251,.08)}
.up-cat-chip.on{border-color:var(--blue);background:rgba(101,185,255,.14);color:var(--text)}
.up-cat-chip:active{transform:scale(.96)}
.up-set-grid{display:flex;flex-direction:column;gap:7px;margin:4px 0 2px}
.up-set-card{display:flex;align-items:flex-start;gap:11px;padding:10px 12px;border-radius:13px;cursor:pointer;text-align:left;
  border:1.5px solid var(--glass-brd);background:rgba(245,247,251,.035);transition:border-color .14s,background .14s}
.up-set-card:hover{background:rgba(245,247,251,.06)}
.up-set-card.on{border-color:var(--gold);background:linear-gradient(120deg,rgba(245,200,90,.13),rgba(245,200,90,.04))}
.up-set-dot{flex:none;width:16px;height:16px;border-radius:50%;border:2px solid var(--dim);margin-top:2px;transition:all .14s;position:relative}
.up-set-card.on .up-set-dot{border-color:var(--gold);background:var(--gold)}
.up-set-card.on .up-set-dot::after{content:'';position:absolute;inset:3px;border-radius:50%;background:var(--slate)}
.up-set-tx{display:flex;flex-direction:column;gap:2px;min-width:0}
.up-set-name{font-weight:800;font-size:.84rem;color:var(--text)}
.up-set-blurb{font-size:.68rem;line-height:1.35;color:var(--dim)}
/* AUDIOBOOKS */
#audiobooks{background:var(--bg)}
#audiobook-detail{background:var(--bg)}
.ab-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:14px;
  padding:14px 16px 20px;
}
.ab-card{cursor:pointer;transition:transform .12s}
.ab-card:active{transform:scale(.97)}
.ab-cover{
  width:100%;aspect-ratio:1;border-radius:13px;
  object-fit:contain;background:var(--cloud);   /* book covers aren't square — never crop art */
  box-shadow:0 4px 16px rgba(30,42,58,.14);
  margin-bottom:8px;
}
.ab-card-title{font-size:.82rem;font-weight:800;color:var(--text);line-height:1.25;margin-bottom:2px}
.ab-card-author{font-size:.66rem;font-weight:500;color:var(--dim)}
.ab-card-tag{
  display:inline-block;margin-top:4px;padding:1px 7px;border-radius:99px;
  font-size:.52rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  background:rgba(0,180,230,.13);color:var(--lake);
}
.ab-card-tag.sample{background:rgba(242,178,51,.14);color:var(--amber)}

/* AUDIOBOOK DETAIL */
.ab-detail-hero{
  display:flex;gap:16px;padding:18px 16px 14px;align-items:flex-start;
}
.ab-detail-cover{
  width:124px;height:124px;border-radius:14px;
  object-fit:contain;flex-shrink:0;background:var(--cloud);
  box-shadow:0 6px 22px rgba(30,42,58,.2);
}
.ab-detail-info{flex:1;min-width:0;padding-top:2px}
.ab-detail-title{font-size:1.18rem;font-weight:900;color:var(--text);letter-spacing:-.02em;line-height:1.2;margin-bottom:5px}
.ab-detail-byline{font-size:.72rem;font-weight:600;color:var(--dim);line-height:1.5}
.ab-detail-byline strong{color:var(--text);font-weight:700}
.ab-summary{
  margin:0 16px 14px 4px;padding:13px 15px;
  background:var(--tile-solid,#161c26);border:none;
  -webkit-backdrop-filter:blur(14px) saturate(118%);backdrop-filter:blur(14px) saturate(118%);
  box-shadow:0 8px 22px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(var(--accent-rgb,245,247,251),.42),0 0 14px -2px rgba(var(--accent-rgb,245,247,251),.24);
  border-radius:12px;
  font-size:.76rem;line-height:1.6;color:var(--text2);font-weight:500;
}
.ab-play-all{
  display:flex;align-items:center;justify-content:center;gap:8px;
  margin:0 16px 14px 4px;padding:13px;
  background:var(--grad);color:#fff;border-radius:12px;
  font-size:.86rem;font-weight:800;transition:opacity .15s;
}
.ab-play-all:active{opacity:.85}
.ab-chapter{
  display:flex;align-items:center;gap:12px;
  padding:11px 16px;border-bottom:1px solid var(--border);
  cursor:pointer;transition:background .1s;
}
.ab-chapter:active{background:var(--cloud)}
.ab-chapter.now{background:rgba(10,108,240,.05)}
.ab-ch-num{
  width:30px;height:30px;border-radius:8px;flex-shrink:0;
  background:var(--cloud);color:var(--dim);
  display:flex;align-items:center;justify-content:center;
  font-size:.76rem;font-weight:800;
}
.ab-chapter.now .ab-ch-num{background:var(--blue);color:#fff}
.ab-ch-info{flex:1;overflow:hidden}
.ab-ch-title{font-size:.82rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ab-ch-dur{font-size:.64rem;font-weight:600;color:var(--dim);margin-top:1px}
.ab-ch-play{font-size:.9rem;color:var(--blue);flex-shrink:0}

/* LIBRARY HUB */
#library{background:var(--bg)}
.lib-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:14px;
  padding:16px 16px 16px 4px;
}
.lib-btn{
  cursor:pointer;transition:transform .12s;
  border-radius:20px;overflow:hidden;
  background:rgba(18,24,34,.5);
  border:1px solid rgba(255,255,255,.07);
  box-shadow:0 10px 28px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(var(--accent-rgb,245,247,251),.42),0 0 14px -2px rgba(var(--accent-rgb,245,247,251),.24);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  padding:22px 10px;min-height:104px;
}
.lib-btn:active{transform:scale(.96)}
.lib-svg{width:36px;height:36px;color:var(--lake)}
.lib-txt{display:flex;flex-direction:column;align-items:center;gap:3px}
.lib-t{font-size:.92rem;font-weight:800;color:var(--text)}
.lib-s{font-size:.56rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--dim)}
.lib-intro{
  margin:14px 16px 0 4px;font-size:.78rem;font-weight:500;
  color:var(--dim);line-height:1.55;text-align:center;
}

/* E-BOOK READER */
/* Reading is a media area — keep the moving wave field OFF the page so text is
   calm to read (tester feedback 2026-07-11). !important beats .screen's global
   transparent rule. */
#book-reader{background:#fbf9f4 !important}
.reader-top{
  padding:calc(14px + env(safe-area-inset-top,0px)) 16px 12px;
  background:var(--surface);border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:10px;
}
.reader-back{
  width:34px;height:34px;border-radius:50%;flex-shrink:0;
  background:var(--cloud);color:var(--slate);
  display:flex;align-items:center;justify-content:center;font-size:1rem;
}
.reader-top-info{flex:1;overflow:hidden}
.reader-book{font-size:.82rem;font-weight:800;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reader-ch{font-size:.66rem;font-weight:600;color:var(--dim)}
.reader-tool{
  width:32px;height:32px;border-radius:8px;flex-shrink:0;
  background:var(--cloud);color:var(--slate);font-weight:800;
  display:flex;align-items:center;justify-content:center;
}
.reader-tool:active{transform:scale(.92)}
.reader-tool.active{background:var(--gold);color:var(--slate)}
.reader-toc{
  background:var(--surface);border-bottom:1px solid var(--border);
  max-height:46vh;overflow:auto;padding:6px 0;
}
.reader-toc-item{
  display:flex;gap:10px;align-items:baseline;
  padding:9px 18px;font-size:.78rem;font-weight:600;
  color:var(--text);line-height:1.3;cursor:pointer;
}
.reader-toc-item:active{background:var(--cloud)}
.reader-toc-item.current{color:var(--lake);font-weight:800}
.reader-toc-num{font-size:.64rem;color:var(--dim);min-width:24px;flex-shrink:0}
.reader-body{
  padding:22px 22px 8px;
}
.reader-chapter-title{
  font-size:1.15rem;font-weight:900;color:var(--slate);
  letter-spacing:-.02em;margin-bottom:14px;line-height:1.25;
}
.reader-text{
  font-size:.95rem;line-height:1.85;color:#3a3228;
  font-weight:400;white-space:pre-wrap;
}
.reader-nav{
  display:flex;gap:10px;padding:16px 22px 24px;
}
.reader-nav-btn{
  flex:1;padding:12px;border-radius:11px;
  font-size:.78rem;font-weight:700;
  background:var(--surface);border:1.5px solid var(--border);color:var(--text);
}
.reader-nav-btn:disabled{opacity:.4}
.reader-nav-btn.primary{background:var(--gold);border-color:var(--gold);color:var(--slate)}

/* SERIES DETAIL (serials + podcasts) */
#series-detail{background:var(--bg)}
.series-meta-row{
  display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;
}
.series-chip{
  padding:3px 10px;border-radius:99px;
  font-size:.6rem;font-weight:800;letter-spacing:.04em;
  background:rgba(255,255,255,.14);color:#fff;
}
.series-chip.live{background:rgba(0,180,230,.92)}
.follow-btn{
  width:100%;margin:0 16px;padding:13px;border-radius:12px;
  font-size:.86rem;font-weight:800;
  background:var(--blue);color:#fff;transition:opacity .15s;
}
.follow-btn:active{opacity:.85}
.follow-btn.following{background:var(--cloud);color:var(--lake);border:1.5px solid var(--lake)}
.ep-new{
  display:inline-block;margin-left:6px;padding:1px 7px;border-radius:99px;
  font-size:.5rem;font-weight:800;letter-spacing:.08em;
  background:var(--copper);color:#fff;vertical-align:middle;
}

/* PLAYLISTS */
.pl-create-row{
  margin:14px var(--tile-inset);padding:14px 16px;
  background:var(--tile-bg);border:1.5px dashed var(--blue);
  border-radius:var(--r-tile);display:flex;align-items:center;gap:12px;
  cursor:pointer;transition:background .12s;
}
.pl-create-row:active{background:rgba(10,108,240,.06)}
.pl-create-ic{
  width:36px;height:36px;border-radius:50%;
  background:rgba(10,108,240,.1);color:var(--blue);
  display:flex;align-items:center;justify-content:center;font-size:1.2rem;flex-shrink:0;
}
.pl-create-lbl{font-size:.85rem;font-weight:800;color:var(--blue)}
.pl-row{
  display:flex;align-items:center;gap:12px;
  padding:10px 16px;border:none;
  background:var(--tile-bg);
  -webkit-backdrop-filter:blur(14px) saturate(118%);backdrop-filter:blur(14px) saturate(118%);
  border-radius:var(--r-tile);margin:0 var(--tile-inset) var(--tile-gap);
  box-shadow:0 8px 22px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(var(--accent-rgb,245,247,251),.42),0 0 14px -2px rgba(var(--accent-rgb,245,247,251),.24);
  cursor:pointer;transition:transform .12s;
}
.pl-row:active{transform:scale(.98)}
.pl-cover{
  width:60px;height:60px;border-radius:9px;
  background:var(--cloud);flex-shrink:0;
  display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;
  overflow:hidden;
}
.pl-cover img{width:100%;height:100%;object-fit:contain;display:block}
.pl-cover .pl-cover-fb{
  grid-column:1/-1;grid-row:1/-1;
  display:flex;align-items:center;justify-content:center;
  font-size:1.6rem;color:var(--dim);
  background:var(--cloud);
}
.pl-info{flex:1;overflow:hidden}
.pl-name{font-size:.92rem;font-weight:800;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pl-meta{font-size:.66rem;font-weight:500;color:var(--dim);margin-top:2px}
.pl-row-arr{font-size:1.2rem;color:var(--dim);flex-shrink:0}

/* PLAYLIST DETAIL */
.pl-detail-hero{
  padding:18px 16px 16px;
  display:flex;gap:14px;align-items:flex-end;
  background:linear-gradient(180deg,rgba(10,108,240,.06),transparent);
}
.pl-detail-cover{
  width:108px;height:108px;border-radius:14px;
  background:var(--cloud);flex-shrink:0;
  display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;
  overflow:hidden;box-shadow:0 6px 22px rgba(30,42,58,.18);
}
.pl-detail-cover img{width:100%;height:100%;object-fit:contain;display:block}
.pl-detail-cover .pl-cover-fb{grid-column:1/-1;grid-row:1/-1;display:flex;align-items:center;justify-content:center;font-size:2.6rem;color:var(--dim);background:var(--cloud)}
.pl-detail-info{flex:1;padding-bottom:6px;min-width:0}
.pl-detail-lbl{font-size:.6rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);margin-bottom:4px}
.pl-detail-name{font-size:1.32rem;font-weight:900;color:var(--text);letter-spacing:-.025em;line-height:1.15;margin-bottom:5px;word-wrap:break-word}
.pl-detail-meta{font-size:.7rem;font-weight:600;color:var(--dim)}
.pl-detail-actions{
  display:flex;gap:8px;padding:0 16px 8px;
}
.pl-action-btn{
  flex:1;padding:10px;border-radius:11px;
  font-size:.78rem;font-weight:700;color:#fff;
  background:var(--blue);
  display:flex;align-items:center;justify-content:center;gap:6px;
  transition:opacity .15s;
}
.pl-action-btn:active{opacity:.85}
.pl-action-btn.danger{background:var(--copper)}

/* ADD-TO-PLAYLIST MODAL */
.modal-veil{
  position:fixed;inset:0;background:rgba(15,30,46,.55);
  display:none;align-items:flex-end;justify-content:center;
  z-index:300;max-width:480px;margin:0 auto;
}
.modal-veil.on{display:flex}
.modal-sheet{
  width:100%;background:var(--surface);
  border-radius:18px 18px 0 0;
  padding:18px 18px calc(18px + env(safe-area-inset-bottom,0px));
  box-shadow:0 -12px 40px rgba(0,0,0,.3);
  max-height:75vh;display:flex;flex-direction:column;
  animation:sheetUp .25s cubic-bezier(.4,0,.2,1);
}
@keyframes sheetUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
/* Edit Upload sheet: reliable touch scrolling + a Save/Cancel footer that stays
   pinned to the bottom of the scroll so it's always reachable no matter how tall
   the form gets (credits, type fields, lyrics, etc.). */
#edit-upload-modal .modal-sheet{-webkit-overflow-scrolling:touch}
/* The sheet is a flex column + scroll container: stop it shrinking its children
   to fit, which was squashing the auto-grown description textarea back to one
   line. Children keep their natural height; the sheet scrolls. */
#edit-upload-modal .modal-sheet > *{flex-shrink:0}
.eu-foot{position:sticky;bottom:0;z-index:2;
  display:flex;gap:8px;margin:14px -18px 0;
  padding:12px 18px calc(8px + env(safe-area-inset-bottom,0px));
  background:var(--surface);border-top:1px solid var(--border)}
.modal-handle{
  width:42px;height:4px;background:var(--border);border-radius:99px;
  margin:0 auto 12px;
}
.modal-title{font-size:.95rem;font-weight:900;color:var(--text);margin-bottom:4px}
.modal-sub{font-size:.7rem;font-weight:500;color:var(--dim);margin-bottom:14px}
.modal-list{flex:1;overflow-y:auto;margin:0 -4px}
.modal-item{
  display:flex;align-items:center;gap:12px;
  padding:10px 8px;border-radius:10px;cursor:pointer;
}
.modal-item:hover{background:var(--cloud)}
.modal-item-cover{width:42px;height:42px;border-radius:8px;background:var(--cloud);flex-shrink:0;overflow:hidden;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}
.modal-item-cover img{width:100%;height:100%;object-fit:contain;display:block}
.modal-item-cover .pl-cover-fb{grid-column:1/-1;grid-row:1/-1;display:flex;align-items:center;justify-content:center;font-size:1.2rem;color:var(--dim)}
.modal-item-info{flex:1;overflow:hidden}
.modal-item-name{font-size:.82rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.modal-item-meta{font-size:.64rem;font-weight:500;color:var(--dim);margin-top:1px}
.modal-new{
  display:flex;align-items:center;gap:10px;
  padding:10px 8px;border-radius:10px;cursor:pointer;
  color:var(--blue);font-weight:800;font-size:.82rem;
  border-top:1px solid var(--border);margin-top:6px;padding-top:14px;
}
.modal-new:hover{background:var(--cloud)}

/* FLAG MODAL */
.flag-opt{
  display:flex;align-items:center;gap:11px;
  padding:11px 12px;border-radius:11px;cursor:pointer;
  border:1.5px solid var(--border);margin-bottom:7px;
  transition:border-color .12s,background .12s;
}
.flag-opt.on{border-color:var(--copper);background:rgba(203,90,42,.06)}
.flag-opt-ic{font-size:1.15rem;flex-shrink:0}
.flag-opt-txt{flex:1}
.flag-opt-lbl{font-size:.8rem;font-weight:700;color:var(--text)}
.flag-opt-sub{font-size:.66rem;font-weight:500;color:var(--dim);margin-top:1px}
.flag-opt-check{
  width:20px;height:20px;border-radius:50%;flex-shrink:0;
  border:2px solid var(--border);
  display:flex;align-items:center;justify-content:center;
  font-size:.7rem;color:#fff;
}
.flag-opt.on .flag-opt-check{background:var(--copper);border-color:var(--copper)}
.flag-details{
  width:100%;margin-top:4px;padding:11px 13px;
  background:var(--cloud);border:1.5px solid var(--border);
  border-radius:11px;font-size:.82rem;font-weight:500;color:var(--text);
  resize:none;font-family:inherit;min-height:64px;
}
.flag-details:focus{outline:none;border-color:var(--copper)}
.flag-submit{
  width:100%;margin-top:12px;padding:13px;border-radius:12px;
  background:var(--copper);color:#fff;
  font-size:.88rem;font-weight:800;
  transition:opacity .12s;
}
.flag-submit:active{opacity:.85}

.unreleased-check{
  display:flex;align-items:flex-start;gap:10px;
  margin-top:14px;padding:11px 14px;
  background:var(--cloud);
  border:1.5px solid var(--border);
  border-radius:12px;cursor:pointer;
}
.unreleased-check input{
  margin-top:1px;flex-shrink:0;width:18px;height:18px;
  accent-color:var(--copper);cursor:pointer;
}
.unreleased-check span{font-size:.72rem;line-height:1.45;color:var(--text);font-weight:500}
.unreleased-check strong{color:var(--copper);font-weight:800}
.unreleased-badge{
  display:inline-block;
  margin-left:6px;padding:2px 8px;
  border-radius:99px;font-size:.55rem;font-weight:800;
  letter-spacing:.1em;text-transform:uppercase;
  background:rgba(203,90,42,.12);color:var(--copper);
  border:1px solid rgba(203,90,42,.3);
  vertical-align:middle;
}
.up-row{
  display:flex;align-items:center;gap:12px;
  padding:10px 16px;background:var(--surface);
  margin:0 16px 8px 4px;border-radius:11px;
  border:1px solid var(--border);
}
.up-row-info{flex:1;overflow:hidden}
.up-row-title{font-size:.84rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.up-row-meta{font-size:.65rem;font-weight:500;color:var(--dim);margin-top:1px}
.up-row-rm{
  width:30px;height:30px;border-radius:50%;
  background:var(--cloud);color:var(--copper);
  font-size:1rem;display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.up-row-rm:active{background:rgba(203,90,42,.12)}
.up-status{display:inline-block;font-size:.56rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:2px 7px;border-radius:99px;line-height:1.4}

/* MINI PLAYER — docked just under the top bar (header ~54px + safe-area) while
   media plays; the same 54px+inset convention the main-menu panel uses. */
#mini{
  position:fixed;top:calc(54px + env(safe-area-inset-top,0px) + 8px);left:16px;right:16px;
  height:72px;--accent-rgb:101,185,255;
  background:var(--tile-solid,#161c26);
  display:flex;align-items:center;
  padding:0 10px 0 12px;gap:10px;
  z-index:90;cursor:pointer;border:none;border-radius:16px;
  /* neutral glass body; accent color lives only in the edge halo (rim + outer glow) */
  box-shadow:0 12px 32px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.06),
             inset 0 0 0 1.5px rgba(var(--accent-rgb),.42),0 0 14px -2px rgba(var(--accent-rgb),.24);
  transition:transform .26s cubic-bezier(.4,0,.2,1),opacity .26s,box-shadow .4s ease;
  max-width:448px;margin:0 auto;overflow:hidden;
}
#mini::before{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;z-index:0;
  opacity:.4;mix-blend-mode:screen;
  background:linear-gradient(180deg,rgba(255,255,255,.05),transparent 20%)}
#mini>*{position:relative;z-index:1}
#mini.off{transform:translateY(-100%);opacity:0;pointer-events:none}
/* Phone: snap the mini flush to the underside of the top bar (docked full-width,
   top corners squared so it reads as attached) instead of floating 8px below.
   Tablet/desktop keep the centered floating pill. Content reserve trims to match
   (no 8px top gap now): 72px mini + 8px gap = 80px. */
@media (max-width:767px){
  #mini{
    top:calc(54px + env(safe-area-inset-top,0px));
    left:0;right:0;max-width:none;margin:0;
    border-radius:0 0 16px 16px;
  }
  body:has(#mini:not(.off)) .screen.on{padding-top:80px}
}
#mini-thumb{width:48px;height:48px;border-radius:9px;object-fit:contain;background:var(--slate);flex-shrink:0}
#mini-info{flex:1;overflow:hidden}
#mini-title{font-size:.8rem;font-weight:700;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#mini-sub{font-size:.65rem;font-weight:500;color:rgba(255,255,255,.42)}
.mb-row{display:flex;gap:2px;flex-shrink:0}
.mb{
  width:36px;height:36px;border-radius:50%;
  color:#fff;font-size:1.05rem;
  display:flex;align-items:center;justify-content:center;
  transition:background .15s;
}
.mb:hover{background:rgba(255,255,255,.1)}
.mb svg{width:20px;height:20px;color:rgba(232,237,245,.92)}
#mini-play{width:42px;height:42px;background:rgba(245,247,251,.10)}
#mini-play svg{width:23px;height:23px}
.mb .pause-g{display:none}
.mb.is-playing .play-g{display:none}
.mb.is-playing .pause-g{display:block}
#mini-mute .mute-on{display:none}
#mini-mute.muted .mute-on{display:block}
#mini-mute.muted .mute-off{display:none}
#mini-bar{
  position:absolute;bottom:0;left:0;
  height:2px;background:var(--grad);
  border-radius:0 2px 2px 0;transition:width .45s linear;pointer-events:none;
}

/* BOTTOM NAV — floating glass dock */
nav{
  position:fixed;bottom:calc(8px + env(safe-area-inset-bottom,0px));left:4px;right:16px;
  height:var(--nav-h);
  /* Match the smoked-glass tile aesthetic used elsewhere — vertical face
     gradient over a more solid charcoal body, with directional inset
     edges so it reads as a real surface (not a transparent stripe). */
  background:
    linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.015) 18%, rgba(0,0,0,.02) 50%, rgba(0,0,0,.10) 100%),
    rgba(16,21,30,1);
  /* backdrop-filter dropped — pointless when the body is fully opaque. */
  border:none;border-radius:22px;
  display:flex;z-index:100;
  box-shadow:
    0 12px 34px rgba(0,0,0,.42),
    inset 0 -8px 16px -10px rgba(0,0,0,.22),
    inset 1px 1px 0 rgba(255,255,255,.07),
    inset -1px -1px 0 rgba(255,255,255,.045),
    inset 0 0 0 1px rgba(245,247,251,.12);
  max-width:448px;margin:0 auto;
}
.nb{
  flex:1;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:5px;
  color:var(--dim);font-size:.72rem;font-weight:700;
  letter-spacing:.02em;
  transition:color .15s;position:relative;
  padding:10px 2px;
}
.nb.on{color:var(--lake)}
.nb.on::before{
  content:'';position:absolute;top:8px;left:50%;
  width:46px;height:30px;transform:translateX(-50%);
  background:radial-gradient(ellipse,rgba(242,178,51,.32),transparent 70%);
  pointer-events:none;
}
.nb.on::after{
  content:'';position:absolute;
  bottom:6px;left:50%;transform:translateX(-50%);
  width:20px;height:3px;
  background:var(--gold);border-radius:99px;
  box-shadow:0 0 8px rgba(242,178,51,.7);
}
.nb-img{width:24px;height:24px;object-fit:contain;display:block;flex-shrink:0;opacity:.82;transition:opacity .15s,transform .12s,filter .15s}
.nb.on .nb-img{opacity:1;transform:scale(1.06);filter:drop-shadow(0 0 5px rgba(242,178,51,.55))}
.nb-svg{width:24px;height:24px;flex-shrink:0;opacity:.85;transition:opacity .15s,transform .12s,filter .15s}
.nb.on .nb-svg{opacity:1;transform:scale(1.06);filter:drop-shadow(0 0 7px rgba(101,185,255,.6))}
/* Center Kids button: raised circular tile that lifts above the nav bar.
   Tap target stays inside the .nb flex slot but the visible circle floats
   above. Sam's sparkle palette + a permanent ring distinguish it from
   ordinary nav buttons so a kid can spot it instantly. */
/* Kids slot spans 3 of 7 nav columns (Home + Browse | Kids·Kids·Kids | Tribe + Profile).
   The Kid Kingdom sign lives INSIDE this button, centered. ::before/::after
   silenced so the active-state glow/bar don't render under the sign. */
.nb-kids{flex:3;padding:4px 6px}
.nb-kids::before,.nb-kids::after{display:none !important}
.nb-kids img{
  display:block;height:100%;width:auto;max-width:100%;
  object-fit:contain;
  /* The sign IS the button face, and it renders 2.5× the button's box — with
     pointer-events:none, taps on its top slice fell THROUGH to whatever
     scrolled behind the nav (opened a News card) and its lower overhang hit
     nothing, so the "link didn't work" anywhere but the middle band. Clickable
     img = clicks bubble to the button's openKids() across the whole sign. */
  pointer-events:auto;-webkit-user-drag:none;user-select:none;
  filter:drop-shadow(0 6px 12px rgba(0,0,0,.6)) drop-shadow(0 0 5px rgba(217,164,65,.4));
  transform:translate(27px,15px) scale(2.5);transform-origin:center center;
  transition:transform .12s ease;
}
.nb-kids:active img{transform:translate(27px,15px) scale(2.35)}
/* Same dim-in-dark-mode treatment the header logo gets — desaturate + dim
   the sign on every screen, then drop the dim ONLY on the Kid Kingdom
   screen and the auth screen so the sign stays bright there (matching the
   bright-logo behavior from v107). Drop-shadows are re-listed because the
   `filter` property is one stack — overriding it would otherwise wipe
   the shadow. */
html[data-theme="dark"] .nb-kids img{
  filter:saturate(.94) brightness(.97) contrast(.99) drop-shadow(0 6px 12px rgba(0,0,0,.6)) drop-shadow(0 0 5px rgba(217,164,65,.4));
}
html[data-theme="dark"]:has(#kids.on) .nb-kids img,
html[data-theme="dark"]:has(#auth.on) .nb-kids img{
  filter:drop-shadow(0 6px 12px rgba(0,0,0,.6)) drop-shadow(0 0 5px rgba(217,164,65,.4));
}

/* (Floating Kids orb removed v110 — the Kid Kingdom sign now lives inside
   the nb-kids button so the nav tile contains all entry points.) */
/* Hide the in-nav Kid Kingdom sign for kid sessions (they're already inside)
   and on the auth screen (no nav noise during sign-in). */
body.kid .nb-kids,
body:has(#auth.on) .nb-kids{display:none !important}
/* v134 — the KK sign only appears in the nav when Home is the active screen.
   On every other screen the nav rebalances to 4 even columns (Home / Browse
   / Tribes / Profile) so the wooden-sign aesthetic doesn't fight the
   smoked-glass chrome of the rest of the app. */
nav:not(:has(.nb[data-s="home"].on)) .nb-kids{display:none !important}
/* On Home (where the KK sign is shown) darken it further so it sits inside
   the page's feel instead of leaping out. Override the existing dim filter
   and drop the gold-glow drop-shadow that was making it pop. */
html[data-theme="dark"]:has(.nb[data-s="home"].on):not(:has(#kids.on)):not(:has(#auth.on)) .nb-kids img{
  filter:saturate(.85) brightness(.85) contrast(.97) drop-shadow(0 4px 8px rgba(0,0,0,.55));
  opacity:.95;
}
/* Parent-side kid roster on the Profile screen. */
body.kid #pf-kids-sec{display:none !important}
.pf-kids-list{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:10px}
.pf-kids-list:empty{display:none}
.pf-kid-tile{position:relative;flex:0 0 calc(33.333% - 7px);min-width:90px;aspect-ratio:1;border-radius:18px;background:linear-gradient(135deg, rgba(101,185,255,.18) 0%, rgba(182,140,255,.18) 100%);border:1px solid var(--glass-brd);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;cursor:pointer;padding:8px;transition:transform .12s ease}
.pf-kid-tile:active{transform:scale(.96)}
.pf-kid-tile .pf-kid-em{font-size:2.4rem;line-height:1}
.pf-kid-tile .pf-kid-nm{font-weight:800;font-size:.78rem;color:var(--text);text-align:center;line-height:1.1;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pf-kid-tile .pf-kid-x{position:absolute;top:4px;right:4px;width:22px;height:22px;border-radius:50%;background:rgba(11,15,22,.6);color:#fff;border:none;display:flex;align-items:center;justify-content:center;font-size:.8rem;cursor:pointer;opacity:.7}
.pf-kid-tile .pf-kid-x:hover{opacity:1}
.ak-emoji-row{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:6px}
.ak-emoji{aspect-ratio:1;border-radius:12px;background:rgba(245,247,251,.06);border:1px solid var(--glass-brd);font-size:1.6rem;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;line-height:1}
.ak-emoji.on{background:rgba(101,185,255,.22);border-color:rgba(101,185,255,.6)}

/* TOAST */
#toast{
  position:fixed;
  bottom:calc(var(--nav-h) + 72px);
  left:50%;transform:translateX(-50%) translateY(0);
  background:rgba(18,28,44,.93);color:#fff;
  padding:10px 22px;border-radius:99px;
  font-size:.74rem;font-weight:600;
  z-index:10001;white-space:nowrap;pointer-events:none;
  box-shadow:0 4px 16px rgba(0,0,0,.28);
  transition:opacity .24s,transform .24s;
  max-width:90%;
}
#toast.off{opacity:0;transform:translateX(-50%) translateY(8px)}

/* ═══ NOW PLAYING ══════════════════════════════════ */
#now-playing{
  /* Sits above the bottom nav so the nav stays usable while a song plays —
     bottom edge clears nav height + safe-area inset + the same 8px gap the
     nav uses against the viewport edge. */
  /* Starts BELOW the app header so the logo, bell and gear stay visible and
     tappable while Now Playing is up. --hdr-h is kept in sync with the real
     header height by syncHdrH() in boot.js. (Robert 2026-07-22) */
  position:fixed;top:var(--hdr-h);left:0;right:0;
  bottom:calc(var(--nav-h) + 16px + env(safe-area-inset-bottom,0px));
  z-index:150;
  max-width:480px;margin:0 auto;
  display:none;flex-direction:column;
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(10,108,240,.14), transparent 62%),
    radial-gradient(100% 50% at 50% 100%, rgba(59,37,109,.26), transparent 72%),
    rgba(8,10,16,0.58);
  -webkit-backdrop-filter:blur(28px) saturate(1.25);
          backdrop-filter:blur(28px) saturate(1.25);
  /* The header already absorbs the top safe-area inset, so NP only needs its
     own breathing room here. */
  padding-top:8px;
  padding-bottom:6px;
  border-bottom-left-radius:22px;border-bottom-right-radius:22px;
}
#now-playing.on{display:flex;animation:npFade .3s ease}
/* Hide the mini-player while the full Now Playing screen is up — otherwise
   it would peek out between NP and the nav bar. */
body:has(#now-playing.on) #mini{display:none}
/* Hide the global now-playing bar on the playlist screens: it shows whatever is
   playing (not the open playlist), which reads as confusing here. */
body:has(#playlists.on) #mini,
body:has(#playlist-detail.on) #mini,
body:has(#playlist-build.on) #mini{display:none}
@keyframes npFade{from{opacity:0}to{opacity:1}}

.np-header{
  flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin:0 14px;padding:7px 8px;
  background:rgba(16,32,51,.55);
  -webkit-backdrop-filter:blur(18px) saturate(1.4);backdrop-filter:blur(18px) saturate(1.4);
  border:1px solid rgba(242,245,250,.12);border-radius:22px;
}
.np-header-title{font-size:.92rem;font-weight:800;color:var(--text)}
/* TuneProfile-S1: "Tune This Stream", under the header. Lives here rather than
   in tuneprofile.js's injected sheet because the button is on screen before
   that file has any reason to run. */
/* flex-shrink:0 because #now-playing is a flex column — an unflagged item gets
   squeezed to nothing on a short phone. */
.np-tune-row{flex-shrink:0;text-align:center;padding:2px 12px 0}
.np-tune{display:inline-flex;align-items:center;gap:6px;margin:8px auto 0;padding:6px 14px;border-radius:999px;
  border:1px solid rgba(255,255,255,.16);background:transparent;color:var(--text);font-size:.75rem;font-weight:600;cursor:pointer}
.np-tune svg{width:14px;height:14px}
.np-tune:active{transform:scale(.97)}
.np-icon-btn{
  width:40px;height:40px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:rgba(242,245,250,.06);border:1px solid rgba(242,245,250,.10);color:var(--text);
}
.np-icon-btn:active{transform:scale(.9)}
.np-icon-btn svg{width:21px;height:21px}

.np-body{
  flex:1;overflow-y:auto;overflow-x:hidden;
  display:flex;flex-direction:column;align-items:center;
  -webkit-overflow-scrolling:touch;
}
.np-body::-webkit-scrollbar{display:none}

.np-stage{
  position:relative;width:100%;height:min(82vw,360px);flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  touch-action:pan-y;cursor:grab;user-select:none;
}
.np-stage:active{cursor:grabbing}
.np-stage img{-webkit-user-drag:none;user-select:none;pointer-events:none}  /* let drags reach the stage, not native image-drag */
.np-disc-side{
  position:absolute;left:50%;top:50%;
  width:140px;height:140px;border-radius:20px;overflow:hidden;z-index:1;cursor:pointer;
  opacity:.92;
  box-shadow:0 10px 26px rgba(0,0,0,.45);
  transition:filter .25s,opacity .25s,transform .25s;
}
.np-disc-side:hover{opacity:1}
.np-disc-side img{width:100%;height:100%;object-fit:cover;display:block}
#np-disc-prev{transform:translate(-50%,-50%) translateX(-188px)}
#np-disc-next{transform:translate(-50%,-50%) translateX(188px)}
.np-disc-side:active{filter:blur(1.5px) brightness(.6);opacity:.85}
.np-disc-main{
  position:relative;z-index:2;width:min(78vw,330px);height:min(78vw,330px);flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
}
.np-disc-main::after{
  content:'';position:absolute;inset:-18px;border-radius:32px;z-index:-1;
  background:conic-gradient(from 210deg,
    rgba(10,108,240,.6),rgba(255,255,255,.55),rgba(59,37,109,.62),
    rgba(242,178,51,.5),rgba(10,108,240,.6));
  filter:blur(28px);opacity:.5;
}
.np-disc-art{
  position:relative;width:100%;height:100%;border-radius:22px;overflow:hidden;
  box-shadow:0 20px 50px rgba(0,0,0,.62),inset 0 0 0 1px rgba(242,245,250,.12);
}
.np-disc-art img{width:100%;height:100%;object-fit:cover;display:block}
.np-disc-main.spin .np-disc-art{animation:npPop .5s ease}
@keyframes npPop{0%{transform:scale(.92);opacity:.35}100%{transform:scale(1);opacity:1}}

.np-meta{text-align:center;margin:0 24px;flex-shrink:0}
.np-title{font-size:1.46rem;font-weight:900;color:var(--text);letter-spacing:-.02em;line-height:1.18}
.np-artist{font-size:.86rem;font-weight:500;color:var(--text2);margin-top:4px}
/* Follow CTA on Now Playing (todo#15) — feeds the follows +40 affinity signal */
.np-follow{margin:12px auto 0;display:block;min-width:118px;height:34px;padding:0 20px;border:none;border-radius:99px;background:var(--gold);color:#1a1c22;font-size:.78rem;font-weight:800;letter-spacing:.02em;cursor:pointer;transition:transform .12s ease,background .15s,color .15s;box-shadow:0 6px 18px rgba(0,0,0,.18)}
.np-follow.following{background:rgba(255,255,255,.12);color:var(--text2);box-shadow:none}
.np-follow:active{transform:scale(.95)}

.np-prog{width:100%;padding:0 30px;margin-top:18px;flex-shrink:0}
.np-prog-rail{height:5px;background:rgba(120,138,160,.26);border-radius:99px;position:relative;cursor:pointer;touch-action:none}
.np-prog-rail::before{content:'';position:absolute;left:0;right:0;top:-11px;bottom:-11px;}  /* bigger touch/click target */
.np-prog-fill{height:100%;width:0%;background:var(--gold);border-radius:99px;position:relative;transition:width .45s linear;
  /* Own GPU layer: the moving gold thumb + its glow otherwise left repaint
     "dash" trails as it slid over the frosted (backdrop-filter) panel. */
  transform:translateZ(0);will-change:width}
.np-prog-rail.scrubbing{cursor:grabbing}
.np-prog-rail.scrubbing .np-prog-fill{transition:none}
.np-prog-fill::after{
  content:'';position:absolute;right:-6px;top:50%;transform:translateY(-50%) translateZ(0);
  width:13px;height:13px;border-radius:50%;background:var(--gold);
  box-shadow:0 0 9px rgba(242,178,51,.75);
}
.np-prog-times{display:flex;justify-content:space-between;margin-top:8px;font-size:.69rem;font-weight:600;color:var(--text2)}
.np-vol-row{display:flex;align-items:center;gap:12px;padding:0 30px;margin-top:16px;flex-shrink:0;width:100%}
.np-vol-ic{flex-shrink:0;background:none;border:none;color:var(--text2);cursor:pointer;padding:4px;display:flex}
.np-vol-ic.muted{color:var(--gold)}
.np-vol-ic svg{width:20px;height:20px}
.np-vol-slider{flex:1;-webkit-appearance:none;appearance:none;height:5px;border-radius:99px;
  background:linear-gradient(to right,var(--gold) 100%,rgba(120,138,160,.26) 100%);cursor:pointer;outline:none}
.np-vol-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:15px;height:15px;border-radius:50%;background:var(--gold);box-shadow:0 0 8px rgba(242,178,51,.7);cursor:pointer}
.np-vol-slider::-moz-range-thumb{width:15px;height:15px;border:none;border-radius:50%;background:var(--gold);box-shadow:0 0 8px rgba(242,178,51,.7);cursor:pointer}

.np-controls{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:20px;flex-shrink:0}
.np-ctrl{
  width:48px;height:48px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;color:var(--text);
}
.np-ctrl svg{width:25px;height:25px}
.np-ctrl:active{transform:scale(.88)}
.np-ctrl.lit{color:var(--gold)}
.np-play{
  position:relative;width:76px;height:76px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:conic-gradient(from 220deg,var(--blue),#fff,var(--purple),var(--gold),var(--blue));
}
.np-play::before{content:'';position:absolute;inset:3px;border-radius:50%;background:#0e1a2b}
.np-play::after{
  content:'';position:absolute;inset:-13px;border-radius:50%;z-index:-1;
  background:conic-gradient(from 220deg,var(--blue),#fff,var(--purple),var(--gold),var(--blue));
  filter:blur(15px);opacity:.5;
}
.np-play svg{position:relative;z-index:1;width:31px;height:31px;color:#fff}
.np-play:active{transform:scale(.94)}

.np-actions{
  display:flex;align-self:stretch;margin:20px 14px 0;flex-shrink:0;
  background:rgba(16,32,51,.5);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  border:1px solid rgba(242,245,250,.10);border-radius:18px;overflow:hidden;
}
.np-act{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;
  padding:12px 4px;color:var(--text2);
}
.np-act svg{width:21px;height:21px}
.np-act span{font-size:.6rem;font-weight:700;letter-spacing:.03em}
.np-act:active{background:rgba(242,245,250,.05)}
.np-act.lit{color:var(--gold)}

.np-handle{
  flex-shrink:0;margin:11px auto 3px;
  display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--text2);
}
.np-handle::before{content:'';width:38px;height:4px;border-radius:99px;background:rgba(242,245,250,.22)}
.np-handle span{font-size:.65rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase}
.np-handle:active{opacity:.55}

/* "Playing from <playlist>" source line under the title */
.np-source{
  text-align:center;font-size:.66rem;font-weight:700;letter-spacing:.04em;
  color:var(--gold);margin:-2px 0 6px;text-transform:uppercase;
}
/* Up Next — the walled-garden queue list shown inside Now Playing */
.np-upnext{align-self:stretch;margin:18px 14px 6px;flex-shrink:0}
.np-upnext-hd{
  display:flex;align-items:center;justify-content:space-between;
  font-size:.62rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;
  color:var(--text2);padding:0 4px 8px;
}
.np-upnext-hd span{color:var(--dim);font-weight:600;letter-spacing:.02em;text-transform:none}
.np-upnext-list{
  display:flex;flex-direction:column;gap:4px;max-height:230px;overflow-y:auto;
  -webkit-overflow-scrolling:touch;padding-right:2px;
}
.np-up-row{
  display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:11px;
  cursor:pointer;transition:background .12s;
}
.np-up-row:hover{background:rgba(242,245,250,.05)}
.np-up-row.cur{background:rgba(199,164,90,.12)}
.np-up-row.past{opacity:.5}
.np-up-row img{width:38px;height:38px;border-radius:7px;object-fit:cover;flex-shrink:0}
.np-up-tx{flex:1;min-width:0}
.np-up-t{font-size:.78rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.np-up-s{font-size:.65rem;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}
.np-up-eq{color:var(--gold);font-size:.8rem;flex-shrink:0}

/* ── Browse: filter bar + bulk-select ── */
.browse-filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:2px 18px 8px 4px}
.browse-type-sel{
  background:rgba(16,32,51,.55);color:var(--text);border:1px solid rgba(242,245,250,.12);
  border-radius:10px;padding:7px 10px;font-size:.72rem;font-weight:600;cursor:pointer;
}
.browse-select-btn{
  margin-left:auto;background:rgba(16,32,51,.55);color:var(--text);
  border:1px solid rgba(242,245,250,.14);border-radius:10px;padding:7px 13px;
  font-size:.72rem;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;gap:6px;
}
.browse-select-btn.on{background:var(--blue);border-color:var(--blue);color:#fff}
.tag-chips{display:flex;flex-wrap:wrap;gap:6px;padding:0 18px 8px 4px}
.tag-chip{
  background:rgba(16,32,51,.5);color:var(--text2);border:1px solid rgba(242,245,250,.12);
  border-radius:99px;padding:5px 11px;font-size:.68rem;font-weight:600;cursor:pointer;
}
.tag-chip.on{background:var(--gold);border-color:var(--gold);color:#1a1205}
.song-row.pick{cursor:pointer}
.song-row .sr-check{
  width:22px;height:22px;border-radius:6px;border:2px solid rgba(242,245,250,.35);
  flex-shrink:0;display:grid;place-items:center;margin-right:2px;transition:.12s;
}
.song-row.sel .sr-check{background:var(--blue);border-color:var(--blue)}
.sr-check svg{width:14px;height:14px;color:#fff;opacity:0;transition:.12s}
.song-row.sel .sr-check svg{opacity:1}
.bulk-bar{
  position:sticky;bottom:0;z-index:5;display:none;align-items:center;gap:10px;
  margin:0 -4px;padding:11px 18px;background:rgba(12,18,28,.94);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  border-top:1px solid rgba(242,245,250,.12);
}
.bulk-bar.on{display:flex}
.bulk-bar-ct{font-size:.78rem;font-weight:700;color:var(--text)}
.bulk-bar-spacer{flex:1}
.bulk-bar button{
  background:none;border:1px solid rgba(242,245,250,.18);color:var(--text2);
  border-radius:9px;padding:7px 12px;font-size:.72rem;font-weight:700;cursor:pointer;
}
.bulk-bar button.primary{background:var(--blue);border-color:var(--blue);color:#fff}
.bulk-bar button:disabled{opacity:.4;cursor:default}

/* Now Playing bottom sheets */
.modal-sheet.np-glass{
  position:relative;
  background:rgba(18,24,35,.96);
  -webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);
  border-top:1px solid rgba(242,245,250,.10);
}
.np-sheet-x{
  position:absolute;top:15px;right:16px;width:30px;height:30px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--cloud);color:var(--text2);
}
.np-sheet-x svg{width:15px;height:15px}

/* ── Scrolling lyrics — full-screen premium view (V1.392) ──────────────
   Spotify/Apple-style: full-bleed panel over Now Playing, blurred cover-art
   backdrop, big bold lines. The active line reads full-white and auto-centers
   with an eased JS animation; sung lines stay readable, upcoming lines dim.
   Timing comes from lyrics.js (real LRC when synced, paced otherwise). */
/* Clears the bottom nav (same pattern as #now-playing) so the nav stays
   visible and tappable under the lyrics view. */
#np-lyrics{
  align-items:stretch;background:var(--bg,#0A0D16);
  bottom:calc(var(--nav-h) + 16px + env(safe-area-inset-bottom,0px));
  border-radius:0 0 18px 18px;overflow:hidden;
}
.lyrics-full{
  position:relative;width:100%;height:100%;min-height:0;
  display:flex;flex-direction:column;overflow:hidden;
  animation:lyricsIn .28s cubic-bezier(.4,0,.2,1);
}
@keyframes lyricsIn{from{transform:translateY(5%);opacity:0}to{transform:none;opacity:1}}
/* cover art, blown up + blurred + darkened, on its own compositor layer
   (translateZ — see the backdrop glow-trails repaint gotcha) */
.lyrics-full-bg{
  position:absolute;inset:-56px;background-size:cover;background-position:center;
  filter:blur(52px) brightness(.38) saturate(1.25);transform:translateZ(0);
}
.lyrics-full-veil{position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(8,10,16,.46),rgba(8,10,16,.16) 32%,rgba(8,10,16,.58) 100%)}
.lyrics-full-head{
  position:relative;z-index:2;display:flex;align-items:center;gap:12px;
  padding:calc(14px + env(safe-area-inset-top,0px)) 18px 8px;flex-shrink:0;
}
.lyrics-full-head .np-icon-btn{color:#fff}
.lyrics-mini-thumb{
  width:38px;height:38px;border-radius:9px;object-fit:cover;flex-shrink:0;
  background:rgba(255,255,255,.08);cursor:pointer;
}
.lyrics-play-btn{
  width:42px;height:42px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:#fff;color:#0A0D16;border:none;cursor:pointer;
  box-shadow:0 4px 16px rgba(0,0,0,.35);
}
.lyrics-play-btn:active{transform:scale(.94)}
.lyrics-play-btn svg{width:19px;height:19px}
.lyrics-full-meta{flex:1;min-width:0}
.lyrics-full-title{font-size:.92rem;font-weight:900;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lyrics-full-artist{font-size:.7rem;font-weight:600;color:rgba(255,255,255,.62);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lyric-scroll{
  position:relative;   /* the offsetParent, so active-line centering math is correct */
  z-index:2;flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;
  /* NB: no CSS scroll-behavior:smooth — it swallows programmatic scrollTop
     (and is throttled to a no-op in backgrounded tabs). lyrics.js animates
     the centering itself with rAF, falling back to instant when hidden. */
  padding:8vh 26px 42vh;   /* deep bottom pad so the last lines can still center */
  -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 7%,#000 93%,transparent 100%);
          mask-image:linear-gradient(to bottom,transparent 0,#000 7%,#000 93%,transparent 100%);
  scrollbar-width:none;    /* premium apps show no scrollbar here */
}
.lyric-scroll::-webkit-scrollbar{display:none}
.lyric-line{
  margin:0;padding:8px 0;font-size:1.42rem;line-height:1.3;font-weight:800;
  letter-spacing:-.01em;color:rgba(255,255,255,.34);
  transition:color .3s ease,transform .3s ease,opacity .3s ease;
  transform-origin:left center;cursor:pointer;word-break:break-word;
}
.lyric-line.blank{padding:6px 0;cursor:default;min-height:.6em}
.lyric-line.active{color:#fff;transform:scale(1.035);text-shadow:0 0 24px rgba(255,255,255,.18)}
.lyric-line.sung{color:rgba(255,255,255,.72)}
.lyric-line:not(.blank):hover{color:rgba(255,255,255,.85)}
.lyric-empty{position:relative;z-index:2;padding:20px 26px;color:rgba(255,255,255,.6);font-size:.9rem}
.lyric-scroll .lyric-empty{padding:0}
.lyric-sync-tag{
  display:inline-flex;align-items:center;gap:5px;flex-shrink:0;
  font-size:.6rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;
  color:rgba(255,255,255,.55);
}
.lyric-sync-tag .dot{width:6px;height:6px;border-radius:50%;background:currentColor}
.lyric-sync-tag.live{color:var(--blue)}
.np-opt{display:flex;align-items:center;gap:13px;padding:13px 8px;border-radius:12px;cursor:pointer}
.np-opt:active{background:var(--cloud)}
.np-opt-ic{
  width:40px;height:40px;border-radius:11px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:var(--cloud);color:var(--gold);
}
.np-opt-ic svg{width:20px;height:20px}
.np-opt-tx{flex:1;min-width:0}
.np-opt-lbl{font-size:.87rem;font-weight:700;color:var(--text)}
.np-opt-sub{font-size:.66rem;font-weight:500;color:var(--dim);margin-top:1px}
.np-sheet-sec{
  font-size:.6rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;
  color:var(--text2);margin:15px 4px 8px;
}
.np-pick{
  display:flex;align-items:center;gap:12px;padding:10px;border-radius:12px;cursor:pointer;
  border:1.5px solid transparent;
}
.np-pick:active{background:var(--cloud)}
.np-pick.sel{border-color:var(--gold);background:rgba(242,178,51,.08)}
.np-pick-cover{
  width:42px;height:42px;border-radius:9px;flex-shrink:0;overflow:hidden;
  background:var(--cloud);display:flex;align-items:center;justify-content:center;font-size:1.05rem;
}
.np-pick-cover img{width:100%;height:100%;object-fit:cover}
.np-pick-tx{flex:1;min-width:0}
.np-pick-name{font-size:.83rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.np-pick-meta{font-size:.65rem;font-weight:500;color:var(--dim);margin-top:1px}
.np-radio{
  width:22px;height:22px;border-radius:50%;flex-shrink:0;border:2px solid var(--border);
  display:flex;align-items:center;justify-content:center;
}
.np-pick.sel .np-radio{border-color:var(--gold);background:var(--gold)}
.np-radio svg{width:13px;height:13px;color:#0e1a2b;display:none}
.np-pick.sel .np-radio svg{display:block}
.np-confirm{
  width:100%;margin-top:15px;padding:14px;border-radius:14px;
  font-size:.86rem;font-weight:800;color:#fff;
  background:linear-gradient(135deg,var(--gold) 0%,var(--copper) 100%);
}
.np-confirm:active{opacity:.9}
.np-confirm.disabled{opacity:.38;pointer-events:none}
.np-sheet-note{font-size:.7rem;font-weight:500;color:var(--dim);text-align:center;padding:16px;line-height:1.55}

/* ═══════════════════════════════════════════
   AI LAYER — SaintStream Guide + Steward
   Prototype: routine tasks → small/cheap model;
   high-risk moderation → human review or stronger model.
═══════════════════════════════════════════ */

/* ── Guide FAB ── */
/* AI Assist button — Sam's persistent home on every in-app screen. Bottom-left
   so it balances the gold Support FAB on the bottom-right. Hidden by default;
   .on is toggled by refreshGuideFab() (hidden on the auth screen). Tapping
   plays a four-point sparkle burst, then opens Sam. The full character
   emergence animation swaps in once the Sam PNGs land in Assets/Sam/. */
#guide-fab{display:none}
#guide-fab.on{
  position:fixed;z-index:120;
  left:14px;
  bottom:calc(138px + env(safe-area-inset-bottom,0px));
  width:54px;height:54px;border-radius:50%;
  background:linear-gradient(135deg,var(--purple) 0%,var(--blue) 100%);
  box-shadow:0 6px 22px rgba(59,37,109,.55),0 0 0 2px rgba(242,178,51,.40);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:transform .15s, filter .15s;
}
#guide-fab.on:hover{filter:brightness(1.1)}
#guide-fab.on:active{transform:scale(.92)}
#guide-fab svg{width:25px;height:25px;color:#fff;position:relative;z-index:2}
#guide-fab .g-pulse{
  position:absolute;inset:-3px;border-radius:50%;
  border:2px solid rgba(242,178,51,.55);pointer-events:none;
  animation:gPulse 2.6s ease-in-out infinite;
}
@keyframes gPulse{
  0%,100%{transform:scale(1);opacity:.65}
  55%{transform:scale(1.22);opacity:0}
}
@media (max-width:380px){ #guide-fab.on{bottom:calc(132px + env(safe-area-inset-bottom,0px))} }

/* Four-point SaintStream sparkle — the summon/dismiss particle for Sam. Colors
   cycle through Sky Blue, Warm Gold, Lavender, White Light. */
.sam-spark-particle{
  position:fixed;z-index:121;pointer-events:none;
  width:14px;height:14px;
  animation:samSparkFly .72s ease-out forwards;
}
.sam-spark-particle svg{width:100%;height:100%;display:block;
  filter:drop-shadow(0 0 5px currentColor)}
@keyframes samSparkFly{
  0%{transform:translate(0,0) scale(.2) rotate(0deg);opacity:0}
  25%{opacity:1}
  100%{transform:translate(var(--dx),var(--dy)) scale(1) rotate(140deg);opacity:0}
}

/* ── shared full-screen AI panel ── */
.ai-panel{
  position:fixed;inset:0;z-index:160;
  background:rgba(8,10,16,0.58);
  -webkit-backdrop-filter:blur(28px) saturate(1.25);
          backdrop-filter:blur(28px) saturate(1.25);
  display:none;flex-direction:column;
  max-width:480px;margin:0 auto;
}
.ai-panel.on{display:flex;animation:npFade .28s ease}
#ai-pl-panel{z-index:165}
#steward-panel{z-index:170}
/* Sam Guide keeps the floating bottom nav visible + tappable. Raise the nav
   above the Guide overlay, and pad the Guide so the "Ask Sam" input + send
   bar (and disclaimer) lift to sit just above the nav instead of behind it. */
body.sam-open nav{z-index:200}
body.sam-open #guide-panel{padding-bottom:calc(var(--nav-h) + 20px + env(safe-area-inset-bottom,0px))}

.ai-hdr{
  flex-shrink:0;background:var(--glass);
  -webkit-backdrop-filter:blur(20px) saturate(1.5);
  backdrop-filter:blur(20px) saturate(1.5);
  border-bottom:1px solid var(--glass-brd);
  padding:calc(13px + env(safe-area-inset-top,0px)) 14px 13px;
  display:flex;align-items:center;gap:11px;
}
.ai-hdr-btn{
  width:36px;height:36px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  color:var(--dim);background:var(--cloud);cursor:pointer;font-size:.9rem;
}
.ai-hdr-btn svg{width:17px;height:17px}
/* The "point at something" reticle is the one actionable target in the row —
   red makes it read as a live aiming affordance. */
#guide-point svg{color:#ef4444}

/* ── "Point at this" mode ─────────────────────────────────────────────────
   Sam ducks away, the page dims + crosshairs, and the next tap is the
   question. The banner floats above everything with the answer request. */
body.ss-pointing{cursor:crosshair}
body.ss-pointing *{cursor:crosshair !important}
body.ss-pointing::after{
  content:"";position:fixed;inset:0;z-index:2147483000;pointer-events:none;
  background:rgba(10,14,30,.28);animation:gphFade .18s ease-out;
}
@keyframes gphFade{from{opacity:0}to{opacity:1}}
#guide-point-hint{
  position:fixed;left:50%;bottom:26px;transform:translateX(-50%);
  z-index:2147483001;display:flex;align-items:center;gap:10px;
  padding:11px 14px;border-radius:999px;
  background:var(--tile-solid,#fff);color:var(--text);
  box-shadow:0 10px 34px rgba(0,0,0,.34);border:1px solid var(--glass-brd);
  font-size:.9rem;font-weight:600;max-width:calc(100vw - 32px);
  animation:gphRise .2s ease-out;
}
@keyframes gphRise{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}
#guide-point-hint .gph-dot{
  width:12px;height:12px;border-radius:50%;flex-shrink:0;
  background:#ef4444;box-shadow:0 0 0 0 #ef4444;
  animation:gphPulse 1.4s ease-out infinite;
}
@keyframes gphPulse{0%{box-shadow:0 0 0 0 rgba(239,68,68,.5)}100%{box-shadow:0 0 0 10px rgba(239,68,68,0)}}
#guide-point-hint .gph-tx{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#guide-point-hint .gph-x{
  border:none;background:var(--cloud);color:var(--dim);
  padding:6px 12px;border-radius:999px;font-weight:700;cursor:pointer;font-size:.82rem;flex-shrink:0;
}
.ai-avatar{
  width:42px;height:42px;border-radius:50%;flex-shrink:0;
  background:linear-gradient(135deg,var(--purple) 0%,var(--blue) 100%);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 0 0 2px var(--gold);
}
.ai-avatar svg{width:23px;height:23px;color:#fff}
/* Sam header avatar: a transparent Liahona figure (open Sam), not a circular
   badge — strip the gradient/ring and give the character room to show. */
.ai-avatar.sam-orb{width:64px;height:64px;background:none;box-shadow:none;border-radius:0;overflow:visible}
.ai-hdr-tx{flex:1;min-width:0}
.ai-hdr-name{font-size:.92rem;font-weight:800;color:var(--text);line-height:1.2}
.ai-hdr-sub{font-size:.68rem;color:var(--gold);font-weight:600;display:flex;align-items:center;gap:5px}
.ai-hdr-sub .live-dot{width:6px;height:6px;border-radius:50%;background:#4ade80;flex-shrink:0}

/* model badge — shows which tier is doing the work */
.model-badge{
  font-size:.58rem;font-weight:800;letter-spacing:.04em;
  padding:3px 7px;border-radius:99px;white-space:nowrap;
  display:inline-flex;align-items:center;gap:4px;
}
.model-badge.routine{background:rgba(0,180,230,.14);color:var(--lake);border:1px solid rgba(0,180,230,.3)}
.model-badge.review{background:rgba(229,185,31,.16);color:var(--amber);border:1px solid rgba(229,185,31,.32)}
.model-badge.human{background:rgba(203,90,42,.15);color:var(--copper);border:1px solid rgba(203,90,42,.32)}

/* ── Guide chat ── */
.guide-chat{
  flex:1;overflow-y:auto;padding:16px 14px 6px;
  display:flex;flex-direction:column;gap:13px;
}
.guide-chat::-webkit-scrollbar{display:none}
.gcb{display:flex;gap:8px;max-width:90%}
.gcb.me{align-self:flex-end;flex-direction:row-reverse}
.gcb.guide{align-self:flex-start}
.gcb-av{
  position:relative;
  width:85px;height:85px;border-radius:50%;flex-shrink:0;align-self:flex-end;
  display:flex;align-items:center;justify-content:center;
}
/* (No halo on chat avatars: with several replies on screen, per-message pulsing
   halos flash out of sync — visual noise. The pulse lives ONLY on the quiet
   nudge dot and the offer chip, where it means something.) */
.gcb-face{position:relative;z-index:1;width:100%;height:100%;object-fit:contain;display:block}
/* Hannah's placeholder chat avatar: neutral dark disc + gold serif monogram
   (swapped for her real art when Robert provides it). */
.gcb-face-mono{
  display:flex;align-items:center;justify-content:center;
  width:72%;height:72%;border-radius:50%;
  background:#1a1d24;border:1.5px solid rgba(201,162,39,.75);
  color:#E8C547;font-family:Georgia,'Times New Roman',serif;
  font-size:1.9rem;font-weight:700;line-height:1;
}
.gcb-av svg{width:15px;height:15px;color:#fff}
.gcb-bubble{
  padding:10px 14px;border-radius:17px;
  font-size:.83rem;line-height:1.5;font-weight:500;
}
.gcb.guide .gcb-bubble{
  background:var(--surface);border:1px solid var(--border);
  color:var(--text);border-bottom-left-radius:5px;
}
.gcb.me .gcb-bubble{
  background:linear-gradient(135deg,var(--blue),var(--purple));
  color:#fff;border-bottom-right-radius:5px;
}
.gcb-bubble strong{font-weight:800}
.gcb-typing{display:flex;gap:4px;padding:13px 16px}
.gcb-typing span{
  width:7px;height:7px;border-radius:50%;background:var(--dim);
  animation:gType 1.2s ease-in-out infinite;
}
.gcb-typing span:nth-child(2){animation-delay:.18s}
.gcb-typing span:nth-child(3){animation-delay:.36s}
@keyframes gType{0%,60%,100%{opacity:.25;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}

/* rich result card inside a Guide bubble */
.guide-card{
  margin-top:9px;background:var(--cloud);
  border:1px solid var(--border);border-radius:13px;overflow:hidden;
}
.guide-card-hd{
  padding:9px 13px;font-size:.73rem;font-weight:800;color:var(--text);
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:7px;
}
.guide-card-hd .ic{font-size:.95rem}
.guide-card-row{
  display:flex;align-items:center;gap:9px;
  padding:8px 13px;border-bottom:1px solid var(--border);
}
.guide-card-row:last-child{border-bottom:none}
.guide-card-thumb{
  width:34px;height:34px;border-radius:7px;flex-shrink:0;
  background:var(--slate);overflow:hidden;
  display:flex;align-items:center;justify-content:center;font-size:1rem;
}
.guide-card-thumb img{width:100%;height:100%;object-fit:cover}
.guide-card-tx{flex:1;min-width:0}
.guide-card-t{font-size:.76rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.guide-card-s{font-size:.66rem;color:var(--dim)}
.guide-card-cta{
  display:block;width:100%;padding:10px;
  background:var(--grad);color:#fff;
  font-size:.76rem;font-weight:800;text-align:center;cursor:pointer;
}
.guide-card-cta.sec{background:var(--surface);color:var(--text);border-top:1px solid var(--border)}

/* suggested prompt chips */
.guide-chips{
  flex-shrink:0;display:flex;gap:7px;
  padding:6px 14px 8px;overflow-x:auto;scrollbar-width:none;
}
.guide-chips::-webkit-scrollbar{display:none}
.guide-chip{
  flex-shrink:0;padding:8px 14px;border-radius:99px;
  background:var(--surface);border:1.5px solid var(--border);
  font-size:.73rem;font-weight:700;color:var(--text);
  white-space:nowrap;cursor:pointer;transition:all .15s;
}
.guide-chip:active{transform:scale(.96)}
.guide-chip .ic{margin-right:5px}

.guide-input-row{
  flex-shrink:0;display:flex;align-items:center;gap:8px;
  padding:9px 13px calc(9px + env(safe-area-inset-bottom,0px));
  background:var(--glass);border-top:1px solid var(--glass-brd);
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
}
.guide-input{
  flex:1;padding:11px 15px;
  background:var(--surface);border:1.5px solid var(--border);
  border-radius:99px;font-size:.83rem;color:var(--text);
  transition:border-color .15s;
}
.guide-input:focus{border-color:var(--blue)}
.guide-input::placeholder{color:var(--dim)}
.guide-send{
  width:40px;height:40px;border-radius:50%;flex-shrink:0;
  background:var(--grad);display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 13px rgba(10,108,240,.42);
}
.guide-send svg{width:17px;height:17px;color:#fff}
/* Mic button — hidden until SpeechRecognition support is confirmed */
.guide-mic{
  width:40px;height:40px;border-radius:50%;flex-shrink:0;
  background:var(--surface);border:1.5px solid var(--border);
  display:none;align-items:center;justify-content:center;
  transition:background .15s,border-color .15s;
}
.guide-mic.avail{display:flex}
.guide-mic svg{width:16px;height:16px;color:var(--dim)}
.guide-mic.listening{background:#c0392b;border-color:#c0392b;animation:micPulse 1.2s infinite}
.guide-mic.listening svg{color:#fff}
@keyframes micPulse{
  0%,100%{box-shadow:0 0 0 0 rgba(192,57,43,.45)}
  50%{box-shadow:0 0 0 9px rgba(192,57,43,0)}
}
#guide-tts{opacity:.45;transition:opacity .15s}
#guide-tts.on{opacity:1;color:var(--gold)}
.ai-disclaim{
  font-size:.6rem;color:var(--dim);text-align:center;
  padding:7px 24px;line-height:1.5;font-weight:500;flex-shrink:0;
}

/* ── AI Playlist Builder ── */
.aip-steps{
  flex-shrink:0;display:flex;gap:5px;
  padding:11px 18px;border-bottom:1px solid var(--border);background:var(--surface);
}
.aip-step-dot{height:4px;flex:1;border-radius:99px;background:var(--border);transition:background .3s}
.aip-step-dot.on{background:var(--gold)}
.aip-step-dot.done{background:var(--lake)}
.aip-body{flex:1;overflow-y:auto;padding:18px 16px}
.aip-body::-webkit-scrollbar{display:none}
.aip-stage{display:none}
.aip-stage.on{display:block;animation:npFade .25s ease}
.aip-h{font-size:1.05rem;font-weight:800;color:var(--text);margin-bottom:5px}
.aip-p{font-size:.78rem;color:var(--text2);line-height:1.55;margin-bottom:16px}
.aip-label{
  font-size:.64rem;font-weight:800;letter-spacing:.13em;text-transform:uppercase;
  color:var(--dim);margin:14px 0 8px;
}
.aip-textarea{
  width:100%;padding:13px 15px;
  background:var(--surface);border:1.5px solid var(--border);
  border-radius:14px;font-size:.85rem;color:var(--text);
  min-height:92px;resize:none;line-height:1.5;transition:border-color .15s;
}
.aip-textarea:focus{border-color:var(--blue)}
.aip-textarea::placeholder{color:var(--dim)}
.ai-chip-row{display:flex;flex-wrap:wrap;gap:7px}
.ai-chip{
  padding:8px 13px;border-radius:99px;
  background:var(--surface);border:1.5px solid var(--border);
  font-size:.74rem;font-weight:700;color:var(--text2);
  cursor:pointer;transition:all .14s;
}
.ai-chip.on{background:var(--gold);border-color:var(--gold);color:var(--slate)}
/* Sam's invitation chip (the offer behind the quiet nudge dot): same gold,
   same 2.4s cadence as the dot, edges radiating outward. */
.ai-chip.ai-chip-nudge{
  border-color:rgba(242,178,51,.85);color:var(--text);
  box-shadow:0 0 8px rgba(242,178,51,.45);
  animation:samNudgeChip 2.4s ease-in-out infinite;
}
@keyframes samNudgeChip{
  0%,100%{box-shadow:0 0 5px rgba(242,178,51,.30), 0 0 0 0 rgba(242,178,51,.28)}
  50%{box-shadow:0 0 12px rgba(242,178,51,.65), 0 0 0 5px rgba(242,178,51,0)}
}

/* AI "thinking" loader */
.aip-thinking{text-align:center;padding:46px 20px}
.aip-orb{
  width:74px;height:74px;border-radius:50%;margin:0 auto 18px;
  background:conic-gradient(from 0deg,var(--blue),#fff,var(--purple),var(--gold),var(--blue));
  animation:aipSpin 1.5s linear infinite;
  display:flex;align-items:center;justify-content:center;
}
.aip-orb::after{content:"";width:54px;height:54px;border-radius:50%;background:var(--bg)}
@keyframes aipSpin{to{transform:rotate(360deg)}}
.aip-think-tx{font-size:.84rem;font-weight:700;color:var(--text)}
.aip-think-sub{font-size:.7rem;color:var(--dim);margin-top:5px}

/* generic AI song row (builder + tagging) */
.ai-song{
  display:flex;align-items:center;gap:11px;
  padding:10px 12px;background:var(--surface);
  border:1px solid var(--border);border-radius:13px;margin-bottom:8px;
}
.ai-song-thumb{
  width:44px;height:44px;border-radius:9px;flex-shrink:0;
  background:var(--slate);overflow:hidden;
  display:flex;align-items:center;justify-content:center;font-size:1.3rem;
}
.ai-song-thumb img{width:100%;height:100%;object-fit:cover}
.ai-song-tx{flex:1;min-width:0}
.ai-song-t{font-size:.82rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-song-s{font-size:.69rem;color:var(--dim)}
.ai-song-x{
  width:28px;height:28px;border-radius:50%;flex-shrink:0;
  background:var(--cloud);color:var(--dim);
  display:flex;align-items:center;justify-content:center;
  font-size:.85rem;cursor:pointer;
}
.ai-song-x:active{transform:scale(.9)}

/* confidence badge */
.conf{
  font-size:.6rem;font-weight:800;padding:3px 8px;border-radius:99px;
  flex-shrink:0;white-space:nowrap;
}
.conf.hi{background:rgba(74,222,128,.14);color:#4ade80}
.conf.med{background:rgba(229,185,31,.17);color:var(--amber)}
.conf.lo{background:rgba(203,90,42,.15);color:var(--copper)}

.aip-footer{
  flex-shrink:0;display:flex;gap:9px;
  padding:12px 14px calc(12px + env(safe-area-inset-bottom,0px));
  background:var(--glass);border-top:1px solid var(--glass-brd);
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
}
.aip-btn{
  flex:1;padding:14px;border-radius:13px;
  font-size:.85rem;font-weight:800;text-align:center;cursor:pointer;
  transition:transform .12s,opacity .12s;
}
.aip-btn:active{transform:scale(.97)}
.aip-btn.pri{background:var(--grad);color:#fff;box-shadow:0 6px 18px rgba(10,108,240,.38)}
.aip-btn.sec{background:var(--surface);border:1.5px solid var(--border);color:var(--text)}
.aip-btn.disabled{opacity:.4;pointer-events:none}
.aip-btn.grow{flex:2}

/* ── Steward panel ── */
.steward-tabs{
  flex-shrink:0;display:flex;flex-wrap:wrap;
  border-bottom:1px solid var(--border);background:var(--surface);
}
.steward-tabs::-webkit-scrollbar{display:none}
.steward-tab{
  padding:12px 15px;font-size:.73rem;font-weight:700;
  color:var(--dim);white-space:nowrap;
  border-bottom:2px solid transparent;cursor:pointer;transition:all .15s;
}
.steward-tab.on{color:var(--gold);border-bottom-color:var(--gold)}
.steward-body{flex:1;overflow-y:auto;padding:14px 14px calc(14px + env(safe-area-inset-bottom,0px))}
.steward-body::-webkit-scrollbar{display:none}
.steward-view{display:none}
.steward-view.on{display:block;animation:npFade .25s ease}

.steward-intro{
  font-size:.74rem;color:var(--text2);line-height:1.55;
  background:var(--surface);border:1px solid var(--border);
  border-radius:12px;padding:11px 13px;margin-bottom:13px;
  display:flex;gap:9px;align-items:flex-start;
}
.steward-intro .ic{font-size:1.05rem;flex-shrink:0}
.section-label{
  font-size:.64rem;font-weight:800;letter-spacing:.13em;text-transform:uppercase;
  color:var(--dim);margin:4px 2px 9px;display:flex;align-items:center;justify-content:space-between;
}

/* queue item */
.queue-item{
  background:var(--tile-solid,#161c26);border:1px solid transparent;
  -webkit-backdrop-filter:blur(14px) saturate(118%);backdrop-filter:blur(14px) saturate(118%);
  box-shadow:0 8px 22px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(var(--accent-rgb,245,247,251),.42),0 0 14px -2px rgba(var(--accent-rgb,245,247,251),.24);
  border-radius:14px;padding:12px;margin-bottom:10px;cursor:pointer;
  transition:border-color .15s,box-shadow .15s;
  display:flex;align-items:stretch;gap:12px;
}
.queue-item:active{transform:scale(.99)}
.queue-item:hover{border-color:var(--blue)}
.queue-main{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center}
.queue-top{display:flex;align-items:center;gap:11px}
.queue-art{
  position:relative;width:66px;height:66px;border-radius:12px;flex-shrink:0;align-self:center;
  background:var(--slate);overflow:hidden;
  display:flex;align-items:center;justify-content:center;font-size:1.5rem;
}
.queue-art img{width:100%;height:100%;object-fit:cover}
.queue-play{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  border:none;cursor:pointer;background:rgba(8,9,14,.32);transition:background .15s;
}
.queue-play:hover{background:rgba(8,9,14,.5)}
.queue-play:active .pcirc{transform:scale(.92)}
.queue-play .pcirc{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;transition:transform .12s;
  background:radial-gradient(circle at 38% 30%,#fff,#eef1f6 55%,#d7dbe6 100%);
  box-shadow:0 0 14px -2px rgba(101,185,255,.7),-5px 0 14px -7px rgba(217,164,65,.7),inset 0 1px 2px rgba(255,255,255,.9),0 4px 10px rgba(0,0,0,.5)}
.queue-play .pcirc svg{width:13px;height:13px;color:#1a56e0;margin-left:1px}
.queue-tx{flex:1;min-width:0}
.queue-t{font-size:.84rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.queue-s{font-size:.69rem;color:var(--dim);margin-top:1px}
.queue-chev{color:var(--dim);font-size:1.1rem;flex-shrink:0}

.status-chip{
  font-size:.58rem;font-weight:800;letter-spacing:.03em;
  padding:4px 9px;border-radius:99px;white-space:nowrap;flex-shrink:0;
}
.status-chip.s-pending{background:rgba(126,138,155,.16);color:var(--dim)}
.status-chip.s-tagged{background:rgba(0,180,230,.14);color:var(--lake)}
.status-chip.s-human{background:rgba(229,185,31,.17);color:var(--amber)}
.status-chip.s-approved{background:rgba(74,222,128,.14);color:#4ade80}
.status-chip.s-held{background:rgba(203,90,42,.16);color:var(--copper)}

.queue-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px}
.tag-pill{
  font-size:.62rem;font-weight:700;padding:3px 9px;border-radius:99px;
  background:var(--cloud);border:1px solid var(--border);color:var(--text2);
}
.tag-pill.ai{border-color:rgba(0,180,230,.3);color:var(--lake);background:rgba(0,180,230,.07)}

/* AI field card (tagging review) */
.ai-field{
  background:var(--surface);border:1px solid var(--border);
  border-radius:14px;padding:13px;margin-bottom:10px;
}
.ai-field.approved{border-color:rgba(74,222,128,.4);background:rgba(74,222,128,.05)}
.ai-field.rejected{border-color:rgba(203,90,42,.35);opacity:.62}
.ai-field-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
.ai-field-label{
  font-size:.62rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;
  color:var(--dim);
}
.ai-field-val{font-size:.86rem;font-weight:700;color:var(--text);line-height:1.45;margin-bottom:9px}
.ai-field-val.summary{font-size:.78rem;font-weight:500;color:var(--text2)}
.ai-field-val .vtag{
  display:inline-block;font-size:.72rem;font-weight:700;
  padding:3px 9px;margin:2px 4px 2px 0;border-radius:7px;
  background:var(--cloud);border:1px solid var(--border);color:var(--text);
}
.ai-conf-line{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.ai-conf-bar{height:5px;flex:1;max-width:110px;border-radius:99px;background:var(--border);overflow:hidden}
.ai-conf-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--amber),var(--gold))}
.ai-conf-pct{font-size:.66rem;font-weight:800;color:var(--text2)}
.ai-field-acts{display:flex;gap:6px}
.ai-act{
  flex:1;padding:8px 4px;border-radius:9px;
  font-size:.7rem;font-weight:800;text-align:center;cursor:pointer;
  transition:transform .1s;
}
.ai-act:active{transform:scale(.95)}
.ai-act.approve{background:rgba(74,222,128,.13);color:#4ade80;border:1px solid rgba(74,222,128,.32)}
.ai-act.edit{background:rgba(0,180,230,.11);color:var(--lake);border:1px solid rgba(0,180,230,.3)}
.ai-act.reject{background:rgba(203,90,42,.11);color:var(--copper);border:1px solid rgba(203,90,42,.3)}
.ai-act.on{filter:brightness(1.15)}
.ai-field-status{
  font-size:.66rem;font-weight:800;text-align:center;padding:7px;
  border-radius:9px;
}
.ai-field-status.approved{background:rgba(74,222,128,.13);color:#4ade80}
.ai-field-status.rejected{background:rgba(203,90,42,.12);color:var(--copper)}

/* safety check */
.safety-hero{
  display:flex;align-items:center;gap:15px;
  background:var(--tile-solid,#161c26);border:none;
  -webkit-backdrop-filter:blur(14px) saturate(118%);backdrop-filter:blur(14px) saturate(118%);
  box-shadow:0 8px 22px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(var(--accent-rgb,245,247,251),.42),0 0 14px -2px rgba(var(--accent-rgb,245,247,251),.24);
  border-radius:16px;padding:15px;margin-bottom:13px;
}
.safety-ring{position:relative;width:84px;height:84px;flex-shrink:0}
.safety-ring svg{transform:rotate(-90deg)}
.safety-ring-num{
  position:absolute;inset:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;
}
.safety-ring-num b{font-size:1.5rem;font-weight:900;color:var(--text);line-height:1}
.safety-ring-num span{font-size:.54rem;font-weight:700;color:var(--dim);letter-spacing:.06em}
.safety-hero-tx{flex:1}
.safety-verdict{font-size:.9rem;font-weight:800;margin-bottom:3px}
.safety-verdict.ok{color:#4ade80}
.safety-verdict.warn{color:var(--amber)}
.safety-hero-sub{font-size:.71rem;color:var(--text2);line-height:1.45}

.safety-row{
  display:flex;align-items:center;gap:11px;
  padding:11px 13px;border:none;
  background:var(--tile-solid,#161c26);
  -webkit-backdrop-filter:blur(14px) saturate(118%);backdrop-filter:blur(14px) saturate(118%);
  box-shadow:0 8px 22px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(var(--accent-rgb,245,247,251),.42),0 0 14px -2px rgba(var(--accent-rgb,245,247,251),.24);
  border-radius:12px;margin-bottom:8px;
}
.safety-row-ic{font-size:1.15rem;width:24px;text-align:center;flex-shrink:0}
.safety-row-tx{flex:1;min-width:0}
.safety-row-t{font-size:.8rem;font-weight:700;color:var(--text)}
.safety-row-s{font-size:.68rem;color:var(--dim);line-height:1.4;margin-top:1px}
.safety-badge{
  font-size:.62rem;font-weight:800;padding:3px 9px;border-radius:99px;flex-shrink:0;
}
.safety-badge.pass{background:rgba(74,222,128,.14);color:#4ade80}
.safety-badge.warn{background:rgba(229,185,31,.17);color:var(--amber)}
.safety-badge.flag{background:rgba(203,90,42,.16);color:var(--copper)}

/* moderation review */
.mod-item{
  background:var(--tile-solid,#161c26);border:none;
  -webkit-backdrop-filter:blur(14px) saturate(118%);backdrop-filter:blur(14px) saturate(118%);
  box-shadow:0 8px 22px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 1.5px rgba(var(--accent-rgb,245,247,251),.42),0 0 14px -2px rgba(var(--accent-rgb,245,247,251),.24);
  border-radius:14px;padding:13px;margin-bottom:11px;
}
.mod-top{display:flex;align-items:center;gap:11px;margin-bottom:10px}
.mod-flag{
  width:40px;height:40px;border-radius:11px;flex-shrink:0;
  background:rgba(229,185,31,.12);border:1px solid rgba(229,185,31,.28);
  display:flex;align-items:center;justify-content:center;font-size:1.2rem;
}
.mod-tx{flex:1;min-width:0}
.mod-t{font-size:.84rem;font-weight:700;color:var(--text)}
.mod-s{font-size:.68rem;color:var(--dim);margin-top:1px}
.mod-reason{
  background:rgba(229,185,31,.07);border:1px solid rgba(229,185,31,.22);
  border-radius:10px;padding:9px 11px;margin-bottom:10px;
  font-size:.73rem;line-height:1.5;color:var(--text2);
}
.mod-reason b{color:var(--amber);font-weight:800}
.mod-reason .quote{
  display:block;margin-top:5px;padding-left:9px;
  border-left:2px solid rgba(229,185,31,.4);
  color:var(--text);font-style:italic;
}
.mod-acts{display:flex;gap:7px}
.mod-act{
  flex:1;padding:9px 4px;border-radius:10px;
  font-size:.71rem;font-weight:800;text-align:center;cursor:pointer;
  transition:transform .1s;
}
.mod-act:active{transform:scale(.96)}
.mod-act.keep{background:rgba(74,222,128,.13);color:#4ade80;border:1px solid rgba(74,222,128,.3)}
.mod-act.remove{background:rgba(203,90,42,.12);color:var(--copper);border:1px solid rgba(203,90,42,.3)}
.mod-act.escalate{background:rgba(0,180,230,.11);color:var(--lake);border:1px solid rgba(0,180,230,.3)}
.mod-resolved{
  font-size:.7rem;font-weight:800;text-align:center;
  padding:9px;border-radius:10px;background:var(--cloud);color:var(--text2);
}

/* held-for-review notice */
.held-top{display:flex;align-items:center;gap:11px;margin-bottom:9px}
.held-ic{
  width:38px;height:38px;border-radius:10px;flex-shrink:0;
  background:rgba(242,178,51,.14);border:1px solid rgba(242,178,51,.3);
  display:flex;align-items:center;justify-content:center;font-size:1.15rem;
}
.held-top-tx{flex:1}
.held-t{font-size:.85rem;font-weight:800;color:var(--text)}
.held-s{font-size:.66rem;color:var(--dim);font-weight:600}
.held-body{font-size:.76rem;color:var(--text2);line-height:1.55;margin-bottom:11px}
.held-eta{
  display:flex;align-items:center;gap:7px;
  font-size:.71rem;font-weight:700;color:var(--gold);
  background:rgba(242,178,51,.1);border:1px solid rgba(242,178,51,.22);
  border-radius:9px;padding:7px 11px;margin-bottom:11px;
}
.held-acts{display:flex;gap:8px}
.held-btn{
  flex:1;padding:10px;border-radius:11px;
  font-size:.74rem;font-weight:800;text-align:center;cursor:pointer;
}
.held-btn.pri{background:var(--grad);color:#fff}
.held-btn.sec{background:var(--surface);border:1.5px solid var(--border);color:var(--text)}

/* steward entry in profile-style list (re-uses .modal patterns lightly) */
.steward-empty{text-align:center;color:var(--dim);font-size:.76rem;padding:34px 20px;line-height:1.6}

/* ═══════════ v6 content-first home ═══════════ */
#home .welcome{position:relative;padding:4px 16px 6px 104px;min-height:96px;cursor:pointer}
#home .welcome:focus-visible{outline:2px solid var(--gold);outline-offset:4px;border-radius:10px}
#home .welcome .greet{font-family:var(--head);font-size:1.95rem;line-height:1.1;font-weight:700;letter-spacing:-.02em;color:var(--text)}
#home .welcome .sub{font-size:.9rem;color:var(--text2);margin-top:5px}
/* AI avatar — lives inside the greeting space because the greeting IS the
   Guide speaking. Absolutely positioned so future work can animate it (CSS
   transition is already on transform/top/left) to fly next to or over
   whatever it's highlighting on screen. */
#home .welcome #ai-avatar{
  position:absolute;top:4px;left:6px;
  width:90px;height:90px;
  display:flex;align-items:center;justify-content:center;
  transition:transform .35s ease, top .35s ease, left .35s ease;
}
#home .welcome #ai-avatar svg{width:22px;height:22px;color:#fff}
#home .welcome #ai-avatar .g-pulse{
  position:absolute;inset:-3px;border-radius:50%;
  border:2px solid rgba(242,178,51,.55);pointer-events:none;
  animation:gPulse 2.6s ease-in-out infinite;
}
#home .welcome:hover #ai-avatar{transform:scale(1.06)}
#home .welcome:active #ai-avatar{transform:scale(.96)}
/* Quiet "Sam has a thought" dot — shows ONLY when Sam has an invited offer
   (a routine he can save, a Sabbath set). It never pops up or speaks on its own;
   tapping the Liahona is what reveals the offer. */
#home .welcome #ai-avatar.has-nudge::after,
#guide-fab.has-nudge::after{
  content:"";position:absolute;top:-1px;right:-1px;
  width:13px;height:13px;border-radius:50%;
  background:#f2b233;border:2px solid var(--bg,#0A0D16);
  box-shadow:0 0 8px rgba(242,178,51,.7);
  animation:samNudgeDot 2.4s ease-in-out infinite;
  z-index:3;pointer-events:none;
}
@keyframes samNudgeDot{0%,100%{transform:scale(1);opacity:.9}50%{transform:scale(1.18);opacity:1}}
/* ── Sam Suggests — personalized recommendation tile ── */
.sam-section{padding:8px 16px 4px}
.sam-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.sam-spark{
  flex:0 0 28px;width:28px;height:28px;border-radius:50%;
  background:linear-gradient(135deg,var(--purple) 0%,var(--blue) 100%);
  box-shadow:0 3px 10px rgba(59,37,109,.4), 0 0 0 1px rgba(242,178,51,.32);
  display:flex;align-items:center;justify-content:center;
}
.sam-spark svg{width:15px;height:15px;color:#fff}
.sam-head-tx{display:flex;flex-direction:column;line-height:1.2}
.sam-title{font-family:var(--head);font-weight:800;font-size:1.08rem;color:var(--text);letter-spacing:.01em}
.sam-sub{font-size:.82rem;color:var(--text2);margin-top:2px}
.shelf-sam{
  display:flex;gap:10px;overflow-x:auto;
  padding:2px 0 10px;
  scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  cursor:grab;   /* same drag affordance as every other shelf */
}
.shelf-sam::-webkit-scrollbar{display:none}
.sam-tile{
  flex:0 0 156px;border-radius:16px;
  background:var(--glass);
  -webkit-backdrop-filter:blur(14px) saturate(1.3);
          backdrop-filter:blur(14px) saturate(1.3);
  border:1px solid var(--glass-brd);
  padding:9px 9px 11px;cursor:pointer;
  scroll-snap-align:start;
  display:flex;flex-direction:column;gap:8px;
  transition:transform .15s ease, box-shadow .15s ease;
}
.sam-tile:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(0,0,0,.32)}
.sam-tile:active{transform:translateY(0)}
.zt-art{
  width:100%;aspect-ratio:1;border-radius:11px;
  /* contain, not cover: book covers / posters aren't square — always show ALL
     of the art and pad the edges with the neutral tile background instead of
     cropping (Robert, 2026-07-03). */
  background:var(--bg) center/contain no-repeat;
}
.zt-meta{display:flex;flex-direction:column;gap:2px;padding:0 2px}
.zt-title{font-size:.92rem;font-weight:700;color:var(--text);line-height:1.2;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.zt-sub{font-size:.76rem;color:var(--text2);line-height:1.2;
  display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.zt-format{
  font-size:.66rem;font-weight:800;letter-spacing:.06em;
  color:var(--lake);text-transform:uppercase;margin-top:1px
}
/* Sam's per-tile "why this pick" badge: gold = crowd popularity, lake = Sam's discovery pick */
.zt-kind{
  font-size:.6rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;
  color:var(--gold);margin-bottom:1px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.zt-kind-discovery{color:var(--lake)}
.zt-kind-uploader{color:var(--copper);font-weight:900}
#home .slabel{display:flex;align-items:center;justify-content:space-between;padding:1px 16px 3px}
#home .slabel .st{display:flex;align-items:center;gap:9px;font-family:var(--head);font-size:1.3rem;font-weight:600;color:var(--text)}
#home .slabel .sicon{display:inline-flex;align-items:center;color:var(--lake)}
#home .slabel .sicon svg{width:20px;height:20px}
#home .slabel .see{font-size:.78rem;font-weight:600;color:var(--gold)}
.home-tiles-row{display:flex;gap:10px;margin:10px 16px 0 16px;flex-wrap:wrap}
.home-tile{flex:1 1 auto;min-width:0;height:80px;padding:11px;border-radius:9px;display:flex;align-items:center;gap:10px;cursor:pointer}
.home-tile .art{width:46px;height:46px;border-radius:7px;flex-shrink:0;background-color:var(--cloud);background-size:contain;background-repeat:no-repeat;background-position:center}
.home-tile .tx{flex:1;min-width:0}
.home-tile .k{font-size:.5rem;font-weight:700;letter-spacing:.12em;color:var(--gold)}
.home-tile .t{font-family:var(--head);font-size:.85rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px;color:var(--text)}
.home-tile .s{font-size:.64rem;color:var(--text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-tile .v6cont-bar{height:3px;border-radius:99px;background:rgba(120,138,160,.3);margin-top:7px;overflow:hidden}
.home-tile .v6cont-fill{height:100%;background:var(--gold);border-radius:99px}
.home-tile .pf{width:38px;height:38px;border-radius:50%;flex-shrink:0;margin-left:auto;display:flex;align-items:center;justify-content:center;background:rgba(245,247,251,.92);overflow:hidden}
/* Running General Authority quotes tile — text-led, no album art. */
.quote-tile{position:relative;width:100%;min-height:78px;padding:13px 16px 13px 14px;border-radius:9px;display:flex;align-items:flex-start;gap:11px;cursor:pointer;overflow:hidden}
.quote-tile .qt-mark{font-family:Georgia,'Times New Roman',serif;font-size:2.5rem;line-height:.7;color:var(--gold);opacity:.5;flex-shrink:0;margin-top:4px}
.quote-tile .qt-body{flex:1;min-width:0;transition:opacity .3s ease}
.quote-tile.fading .qt-body{opacity:0}
.quote-tile .qt-text{font-family:var(--head);font-size:.84rem;font-weight:500;line-height:1.42;color:var(--text)}
.quote-tile .qt-by{margin-top:6px;font-size:.64rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--gold)}
.quote-tile .qt-role{color:var(--text2);font-weight:600;letter-spacing:.02em;text-transform:none}
/* Manual-advance arrow (quote changes hourly on its own; this steps it now). */
.quote-tile .qt-next{flex-shrink:0;align-self:center;margin-left:4px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.15);color:var(--gold);font-family:Georgia,'Times New Roman',serif;font-size:1.4rem;line-height:0;padding-bottom:2px;cursor:pointer;transition:background .18s ease,transform .18s ease}
.quote-tile .qt-next:hover{background:rgba(255,255,255,.12);transform:scale(1.07)}
.quote-tile .qt-next:active{transform:scale(.93)}
/* Quote popout (full passage + source link) */
.qm-close{position:absolute;top:8px;right:8px;width:34px;height:34px;border:none;
  border-radius:50%;background:var(--border);color:var(--text);
  font-size:1.4rem;line-height:1;cursor:pointer;display:flex;align-items:center;
  justify-content:center;z-index:2;transition:background .15s}
.qm-close:hover,.qm-close:active{background:var(--dim);color:var(--surface)}
.qm-mark{font-family:Georgia,'Times New Roman',serif;font-size:3rem;line-height:.5;color:var(--gold);opacity:.5;margin:4px 0 6px}
.qm-full{margin:0;padding:0;border:none;font-family:var(--head);font-size:1.02rem;font-weight:500;line-height:1.55;color:var(--text)}
.qm-by{margin-top:14px;font-size:.8rem;font-weight:800;letter-spacing:.03em;color:var(--text)}
.qm-source{margin-top:16px;display:inline-flex;align-items:center;gap:7px;padding:9px 14px;border-radius:99px;font-size:.74rem;font-weight:700;text-decoration:none;color:var(--blue);background:rgba(101,185,255,.12);border:1px solid rgba(101,185,255,.3)}
.qm-source:hover{background:rgba(101,185,255,.2)}
.qm-source-static{color:var(--dim);background:none;border:none;padding:14px 0 0;font-weight:600;letter-spacing:.01em}
/* Steward Console → Quotes tab */
.qa-form{display:flex;flex-direction:column;gap:8px;margin:4px 0 16px}
.qa-editing{font-size:.72rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--gold)}
.qa-input{width:100%;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:9px;color:#e7ebf1;font:inherit;font-size:.82rem;padding:9px 11px;resize:vertical}
.qa-input::placeholder{color:#8a8f99}
.qa-input:focus{outline:none;border-color:rgba(101,185,255,.55)}
.qa-actions{display:flex;gap:8px;margin-top:2px}
.qa-btn{padding:8px 16px;border-radius:9px;font-size:.78rem;font-weight:700;cursor:pointer;color:#d8dee6;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.14)}
.qa-btn.primary{color:#10131a;background:var(--gold);border-color:transparent}
.qa-row{display:flex;align-items:flex-start;gap:9px;padding:11px 0;border-top:1px solid rgba(255,255,255,.08)}
.qa-row.off{opacity:.5}
.qa-row.dragging{opacity:.4}
.qa-row.drag-over{border-top:2px solid var(--gold)}
.qa-grip{flex-shrink:0;margin-top:2px;color:#7a8089;cursor:grab;display:flex;touch-action:none}
.qa-grip:active{cursor:grabbing}
.qa-row-tx{flex:1;min-width:0}
.qa-row-q{font-size:.84rem;font-weight:600;color:#e7ebf1;line-height:1.35}
.qa-row-by{font-size:.68rem;color:#9aa0aa;margin-top:3px}
.qa-row-acts{display:flex;gap:6px;flex-shrink:0}
.qa-mini{padding:5px 9px;border-radius:8px;font-size:.66rem;font-weight:700;cursor:pointer;color:#d8dee6;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.14);white-space:nowrap}
.qa-mini.danger{color:#ff9a9a;border-color:rgba(255,138,138,.35)}

/* Steward Console → Quotes tab: FOCUS panel */
.qfocus{margin:4px 0 14px;padding:12px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:var(--panel-bg,rgba(255,255,255,.03))}
.qfocus .section-label #qfocus-now,.qfocus #qfocus-now{font-size:.68rem;font-weight:700;color:var(--gold)}
.qfocus-note{font-size:.72rem;color:#9aa0aa;line-height:1.5;margin:2px 0 10px}
.qfocus-custom{display:flex;flex-direction:column;gap:8px}
.qfocus-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.qfocus-w{display:flex;align-items:center;gap:6px;font-size:.7rem;color:#9aa0aa}
.qfocus-w select{background:var(--field-bg,#1b2230);border:1px solid rgba(255,255,255,.14);border-radius:8px;color:#e7ebf1;font:inherit;font-size:.78rem;padding:6px 8px}
.qfocus-row .qa-input[type=date]{width:auto;flex:1;min-width:120px}
.qfocus-row .qa-btn{margin-left:auto}
.qfocus-ov{display:flex;align-items:center;gap:9px;padding:9px 0;border-top:1px solid rgba(255,255,255,.08)}
.qfocus-ov-tx{flex:1;min-width:0;font-size:.8rem;color:#e7ebf1}
.qfocus-ov-meta{display:block;font-size:.66rem;color:#9aa0aa;margin-top:2px}
.qfocus-cal{display:flex;align-items:center;gap:9px;padding:9px 0;border-top:1px solid rgba(255,255,255,.08)}
.qfocus-cal.off{opacity:.5}
.qfocus-cal-tx{flex:1;min-width:0}
.qfocus-cal-t{font-size:.8rem;font-weight:600;color:#e7ebf1;display:flex;align-items:center;gap:7px}
.qfocus-cal-s{font-size:.66rem;color:#9aa0aa;margin-top:2px}
.qfocus-tag{font-size:.58rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#9aa0aa;background:rgba(255,255,255,.07);border-radius:99px;padding:1px 7px}
.qfocus-actions{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}
.qfocus-gather-msg{font-size:.7rem;color:#9aa0aa}
.qfocus-empty{padding:10px 0;color:var(--dim);font-size:.76rem}

/* Featured & New shelf: Two wide tiles side-by-side */
.featured-new-section{padding:12px 16px 4px;display:flex;gap:12px;flex-wrap:wrap}
.featured-new-tile{
  flex:1 1 calc(50% - 6px);min-width:140px;aspect-ratio:1.2;border-radius:16px;
  background:var(--glass) center/cover no-repeat;
  -webkit-backdrop-filter:blur(14px) saturate(1.3);
          backdrop-filter:blur(14px) saturate(1.3);
  border:1px solid var(--glass-brd);cursor:pointer;
  position:relative;overflow:hidden;
  display:flex;align-items:flex-end;
  transition:transform .15s ease, box-shadow .15s ease;
}
.featured-new-tile:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(0,0,0,.32)}
.featured-new-tile:active{transform:translateY(0)}
/* Hero art: contain (never crop — poster/book shapes vary), with a blurred
   cover-fit copy underneath so the padded edges read as atmosphere, not bars. */
.fnt-art{position:absolute;inset:0;background-position:center;background-size:contain;background-repeat:no-repeat;z-index:1}
.fnt-art-bg{position:absolute;inset:-24px;background-position:center;background-size:cover;filter:blur(22px) brightness(.55);z-index:0}
.fnt-overlay{position:absolute;inset:0;background:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.7) 100%);z-index:2}
.fnt-text{position:relative;z-index:3;padding:12px;width:100%}
/* "Featured" is now a button that opens the curated list. It sits over the media
   art, so it's a translucent smoked-glass chip (dark tint + blur), not a solid fill. */
.fnt-label{font:inherit;font-size:.68rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--gold);margin-bottom:6px;
  display:inline-flex;align-items:center;cursor:pointer;
  background:rgba(0,0,0,.34);border:1px solid rgba(255,255,255,.20);border-radius:999px;padding:3px 10px;
  -webkit-backdrop-filter:blur(4px) saturate(1.2);backdrop-filter:blur(4px) saturate(1.2);
  transition:background .15s ease}
.fnt-label:hover{background:rgba(0,0,0,.5)}
/* Play the lead featured pick. Lane-motion badge (V1.366) — the transparent
   branded play button over its media-type animation, centered on the hero. */
.fnt-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:4;
  width:88px;height:88px;padding:0;border:none;cursor:pointer;overflow:visible;
  background:none;box-shadow:none;
  display:flex;align-items:center;justify-content:center;transition:transform .15s ease}
.fnt-play:hover{transform:translate(-50%,-50%) scale(1.06)}
.fnt-play .lm{--lm:88px}
.fnt-play .lm-play{width:100%;height:100%;object-fit:contain;display:block}
.fnt-title{font-size:.95rem;font-weight:700;color:#fff;line-height:1.2;margin-bottom:4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.fnt-count{font-size:.72rem;color:rgba(255,255,255,.75)}

/* New — a horizontal shelf of latest releases using the shelf card tile
   (.sam-tile, styled above). Just the header + wrapper styling here. */
.new-shelf-section{flex:1 1 100%;width:100%;padding:0}
.nb-head{display:flex;align-items:center;justify-content:space-between;margin:2px 0 8px}
.nb-title{font-family:var(--head);font-size:1.08rem;font-weight:800;color:var(--text);letter-spacing:.01em}
.nb-seeall{display:inline-flex;align-items:center;gap:3px;background:none;border:none;color:var(--gold);font-size:.78rem;font-weight:700;cursor:pointer;padding:4px 2px}
.nb-seeall span{font-size:1.05rem;line-height:0;position:relative;top:1px}
/* Section title as a button (Featured → featured page, New Media → See all).
   Same face as .nb-title; the gold chevron signals it navigates. */
.nb-title-btn{background:none;border:none;padding:2px 0;cursor:pointer;display:inline-flex;align-items:baseline;gap:4px;text-align:left}
.nb-chev{color:var(--gold);font-size:1.1rem;line-height:0;position:relative;top:1px}
.nb-side{font-size:.74rem;font-weight:600;color:var(--text2)}
/* Play All — text + the branded SS play disc (same asset as the transport). */
.nb-playall{display:inline-flex;align-items:center;gap:8px;background:none;border:none;cursor:pointer;color:var(--gold);font-size:.78rem;font-weight:700;padding:2px}
.nb-pa-disc{width:26px;height:26px;border-radius:50%;overflow:hidden;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.4);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.nb-pa-disc img{width:100%;height:100%;object-fit:cover;display:block}
.nb-playall:hover .nb-pa-disc{transform:scale(1.08)}
/* Featured wrapper: header above the hero, matching the New Media section. */
.featured-hero-section{flex:1 1 calc(50% - 6px);min-width:0;display:flex;flex-direction:column}
.featured-hero-section .featured-new-tile{flex:1 1 auto;width:100%}
/* Branded play affordance on each New card — the compact motion badge
   (V1.370): transparent branded mark, no white disc. */
.nt-art{position:relative}
.nt-play{position:absolute;right:7px;bottom:7px;display:flex;align-items:center;justify-content:center}
.nt-play .lm{--lm:36px}
.nt-play img{width:100%;height:100%;object-fit:contain;display:block}
/* Preview state: while a 5-second clip plays (hover / long-press), ring the art
   and pulse the play disc so it's clear which card is sounding. Hosted audio only. */
.nt-art.previewing{box-shadow:0 0 0 2px var(--lake), 0 0 14px 2px rgba(55,138,221,.45);border-radius:11px}
/* Featured hero: art is inset under a tile that clips overflow, so glow inward. */
.fnt-art.previewing{box-shadow:inset 0 0 0 3px var(--lake), inset 0 0 26px 4px rgba(55,138,221,.5)}
/* Sam Suggests (.zt-art) + Listen rail (.sart) share the same ring; radius is
   inherited from each art element so the glow follows its corners. */
.zt-art.previewing,.sart.previewing{box-shadow:0 0 0 2px var(--lake), 0 0 14px 2px rgba(55,138,221,.45)}
.nt-art.previewing .nt-play{animation:ntPreviewPulse 1.1s ease-in-out infinite}
@keyframes ntPreviewPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.12)}}
@media (prefers-reduced-motion:reduce){.nt-art.previewing .nt-play{animation:none}}

/* Detail overlay & grid */
.detail-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.8);z-index:1000;
  display:flex;align-items:center;justify-content:center;
  padding:16px;overflow-y:auto
}
/* Finish card — the rating + "Continue with…" moment (reuses .detail-* shell). */
#finish-card[hidden]{display:none}
.fc-panel{max-width:520px}
.fc-head{text-align:center;margin-bottom:4px}
.fc-kicker{font-size:.7rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--gold)}
.fc-head h2{margin:4px 0 12px;font-family:var(--head);font-size:1.3rem;color:var(--text);line-height:1.2}
.fc-rate-lbl{font-size:.8rem;color:var(--text2);margin-bottom:6px}
.fc-stars{display:flex;justify-content:center;gap:6px}
.fc-star{background:none;border:none;font-size:1.9rem;line-height:1;cursor:pointer;color:rgba(160,170,185,.38);transition:transform .1s,color .12s;padding:2px}
.fc-star.on{color:var(--gold)}
.fc-star:hover{transform:scale(1.15)}
.fc-cont-lbl{font-size:.98rem;font-weight:800;color:var(--text);margin:18px 0 10px}
.fc-empty{grid-column:1/-1;text-align:center;padding:22px;color:var(--text2);font-size:.85rem}
.detail-panel{
  background:var(--bg);border-radius:16px;width:100%;max-width:600px;
  padding:20px;max-height:90vh;overflow-y:auto;position:relative
}
.detail-close{
  position:absolute;top:12px;right:12px;background:none;border:none;
  font-size:28px;color:var(--text);cursor:pointer;padding:0;width:32px;height:32px;
  display:flex;align-items:center;justify-content:center;border-radius:8px;
  transition:background .2s ease
}
.detail-close:hover{background:rgba(255,255,255,.1)}
.detail-header{margin-bottom:20px}
.detail-header h2{margin:0 0 4px;font-size:1.4rem;font-weight:700;color:var(--text)}
.detail-header p{margin:0;font-size:.85rem;color:var(--text2)}
.detail-filters{display:flex;gap:8px;margin-bottom:16px;overflow-x:auto;padding-bottom:8px;scrollbar-width:none}
.detail-filters::-webkit-scrollbar{display:none}
.detail-filter-btn{
  background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);
  padding:8px 12px;border-radius:8px;color:var(--text2);font-size:.78rem;
  font-weight:600;cursor:pointer;white-space:nowrap;
  transition:all .2s ease
}
.detail-filter-btn:hover{background:rgba(255,255,255,.12)}
.detail-filter-btn.active{background:var(--gold);color:#000;border-color:var(--gold)}
.detail-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:12px
}
.detail-tile{
  background:rgba(255,255,255,.04);border-radius:12px;overflow:hidden;
  cursor:pointer;transition:all .2s ease;position:relative;display:flex;flex-direction:column
}
.detail-tile:hover{background:rgba(255,255,255,.08);transform:translateY(-2px)}
.dt-art{aspect-ratio:1;background-position:center;background-size:contain;background-repeat:no-repeat;background-color:var(--bg);width:100%}
.dt-badge{
  position:absolute;top:6px;right:6px;background:rgba(0,0,0,.6);
  padding:4px 8px;border-radius:6px;font-size:.65rem;color:#fff;font-weight:600;
  backdrop-filter:blur(4px)
}
.dt-text{padding:8px;flex:1;display:flex;flex-direction:column}
.dt-title{
  font-size:.8rem;font-weight:700;color:var(--text);line-height:1.2;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden
}
.dt-sub{font-size:.68rem;color:var(--text2);margin-top:2px;line-height:1.2;
  display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.dt-info{font-size:.65rem;color:var(--lake);font-weight:600;margin-top:auto;padding-top:4px}
/* ── Featured dedicated page (#featured) ──────────────────────────────────── */
.fp-block{margin:0 0 22px}
.fp-block[hidden]{display:none}
.fp-block-head{display:flex;align-items:baseline;gap:10px;margin:2px 0 10px}
.fp-block-head h2{margin:0;font-family:var(--head);font-size:1.08rem;font-weight:800;color:var(--text);letter-spacing:.01em}
.fp-block-sub{font-size:.72rem;color:var(--text2)}
.fp-empty{grid-column:1/-1;text-align:center;padding:36px 12px;color:var(--text2);font-size:.85rem}
/* Badges over tile art (both are translucent so they read over any cover). */
.fp-badge{position:absolute;top:6px;left:6px;z-index:2;font-size:.6rem;font-weight:800;
  letter-spacing:.03em;text-transform:uppercase;padding:3px 7px;border-radius:999px;
  color:#fff;background:rgba(0,0,0,.42);border:1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
.fp-badge-promo{color:#fff;background:rgba(55,138,221,.6);border-color:rgba(255,255,255,.3)}
.fp-badge-winner{color:#1a1300;background:var(--gold);border-color:rgba(0,0,0,.15)}
.fp-winner-art{position:relative}
.zt-kind-winner{color:var(--gold)}
/* Per-tile 1–5 star rating — taps write through rateMedia() and tune streams. */
.fp-stars{display:flex;gap:2px;margin-top:6px}
.fp-star{background:none;border:none;padding:0 1px;line-height:1;cursor:pointer;
  font-size:.98rem;color:rgba(160,170,185,.4);transition:transform .1s,color .12s}
.fp-star.on{color:var(--gold)}
.fp-star:hover{transform:scale(1.18)}
.home-tile .pf svg{width:15px;height:15px;color:#1a56e0;margin-left:1px}
.home-tile .pf img,#v6-continue .pf img{width:100%;height:100%;object-fit:cover;display:block}

/* ── Kid Kingdom (was Kids Korner) — locked, free, child-safe mode ──
   Oversized everything: huge touch targets, bright contrast, soft corners.
   When body.kid is set, the bottom nav + hamburger + header gear + support
   FAB + AI Assist FAB are all hidden so a kid can't navigate away. */
#kids{padding:18px 14px 26px;background:radial-gradient(120% 80% at 50% 0%, rgba(101,185,255,.15) 0%, transparent 60%), var(--bg)}

/* v100 Kid Kingdom — the placeholder image IS the home view. Hotspots
   sit inside an aspect-ratio-locked frame so % coords track the image
   at any size. State machine via classes on #kids:
     .kk-home          → image hub visible, sub-page hidden
     .kk-lane-watch    → image hidden, Watch grid visible
     .kk-lane-sing     → image hidden, Sing grid visible
     .kk-lane-listen   → image hidden, Listen grid visible */
#kids.kk-home > .kk-bg               { display:flex; }
#kids.kk-home > .kk-lane-view        { display:none; }
#kids:not(.kk-home) > .kk-bg         { display:none; }
#kids:not(.kk-home) > .kk-lane-view  { display:block; }
/* Single-grid visibility per sub-page. */
#kids .kk-grid                       { display:none; }
#kids.kk-lane-watch  #kk-watch-grid  { display:grid; }
#kids.kk-lane-sing   #kk-sing-grid   { display:grid; }
#kids.kk-lane-listen #kk-listen-grid { display:grid; }
#kids.kk-lane-read   #kk-read-grid   { display:grid; }
#kids #kk-tribes-shelf               { display:none; }
#kids.kk-lane-tribes #kk-tribes-shelf{ display:block; }
/* "Your Tribes" pill on the Kid Kingdom home — only for an active kid
   session that belongs to at least one kid tribe (JS toggles [hidden]). */
.kk-tribes-btn{position:absolute;left:50%;bottom:84px;transform:translateX(-50%);z-index:6;
  display:inline-flex;align-items:center;gap:7px;padding:11px 20px;border:none;border-radius:999px;
  background:linear-gradient(135deg,#7C5CFF,#E9858F);color:#fff;font-weight:900;font-size:.92rem;
  box-shadow:0 8px 24px rgba(124,92,255,.45);cursor:pointer;font-family:var(--head);letter-spacing:.01em}
.kk-tribes-btn:active{transform:translateX(-50%) scale(.96)}
/* Kid tribe shelf inside the sub-page view (one block per tribe). */
.kk-tribe-block{margin-bottom:22px}
.kk-tribe-block h3{font-family:var(--head);font-weight:800;font-size:1.05rem;color:var(--text);
  margin:0 4px 10px;display:flex;align-items:center;gap:8px}
.kk-tribe-block h3 .kkt-crown{font-size:1.1rem}
.kk-tribe-empty{padding:14px 4px;color:var(--dim);font-size:.82rem}
/* When the bg is the home, neutralize the screen padding so the image
   can fill edge-to-edge. Sub-page view restores normal padding. */
#kids.kk-home{padding:0;background:#0B0B0D}

/* Kid Kingdom resume tile on the login screen — shown after a child taps Exit
   while still signed in, so an accidental tap is harmless. Big and friendly. */
#kk-resume{margin:0 0 18px;width:100%;max-width:340px;text-align:center}
.kkr-label{font-size:.8rem;font-weight:700;letter-spacing:.04em;color:var(--gold,#D9A441);margin-bottom:10px}
.kkr-face{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border-radius:16px;
  background:#1A1F2A;border:1px solid var(--glass-brd,rgba(255,255,255,.12));color:var(--text,#F5F7FB);cursor:pointer;text-align:left;margin-bottom:10px}
.kkr-face:active{background:#222838}
.kkr-av{width:48px;height:48px;border-radius:50%;flex-shrink:0;overflow:hidden;display:flex;align-items:center;justify-content:center;
  background:rgba(217,164,65,.2);font-size:1.4rem;font-weight:800}
.kkr-av img{width:100%;height:100%;object-fit:cover}
.kkr-body{display:flex;flex-direction:column}
.kkr-name{font-weight:800;font-size:1.05rem}
.kkr-sub{font-size:.78rem;color:var(--dim,#9aa3b4)}
.kkr-actions{display:flex;gap:10px;margin-bottom:10px}
.kkr-btn{flex:1;padding:13px 10px;border-radius:14px;font-weight:800;font-size:.95rem;cursor:pointer;border:1px solid var(--glass-brd,rgba(255,255,255,.12))}
.kkr-continue{background:var(--gold,#D9A441);color:#1a1d26;border-color:transparent}
.kkr-new{background:#1A1F2A;color:var(--text,#F5F7FB)}
.kkr-btn:active{transform:scale(.97)}
.kkr-logout{background:none;border:none;color:var(--dim,#9aa3b4);font-size:.8rem;text-decoration:underline;cursor:pointer;padding:6px}

.kk-bg{
  position:relative;
  min-height:100dvh;
  width:100%;
  background:#0B0B0D;
  display:flex;align-items:center;justify-content:center;overflow:hidden;
  animation:kk-bg-in .35s ease-out;
}
.kk-bg-frame{
  position:relative;
  /* EXACT pixel ratio of KK Screen Shot Background 3.png (898 x 1752 = 0.5126).
     Matching the frame to the image means object-fit never crops the painted
     nav graphics, and the % hotspots track the image content at any size.
     If the background art is ever re-exported at a different size, update this
     ratio (and the two calc() values below) to the new width/height. */
  aspect-ratio: 898 / 1752;
  /* Largest box that fits BOTH the viewport width and the *dynamic* height,
     keeping the ratio. 100dvh (not 100vh) so the mobile address bar
     showing/hiding can't resize the frame and re-crop on every reload. */
  width:min(100vw, calc(100dvh * 898 / 1752));
  max-width:100vw;
  max-height:100dvh;
  display:flex;align-items:center;justify-content:center;
}
@supports not (aspect-ratio:1/1){
  .kk-bg-frame{ width:min(100vw, calc(100dvh * 898 / 1752)); height:min(100dvh, calc(100vw * 1752 / 898)); }
}
.kk-bg-img{
  /* `cover` again now that KK Screen Shot Background 3.png ships with
     extra top/bottom padding designed to be cropped on different phone
     aspect ratios. Characters stay safely inside the visible center. */
  display:block;width:100%;height:100%;object-fit:cover;
  user-select:none;-webkit-user-drag:none;pointer-events:none;
}
.kk-hotspot{
  position:absolute;
  background:transparent;border:none;cursor:pointer;
  border-radius:14px;
  -webkit-tap-highlight-color:transparent;
}
.kk-hotspot:focus-visible{outline:2px solid rgba(217,164,65,.7);outline-offset:2px}
.kk-hotspot:active{background:rgba(255,255,255,.08)}
/* Debug outlines — set window.kkDebugHotspots = true (then re-open Kid
   Kingdom) to see hit-box rectangles overlaid on the image. */
body.kk-debug .kk-hotspot{background:rgba(217,164,65,.22);outline:2px dashed #D9A441}
body.kk-debug .kk-hotspot::after{content:attr(data-kk);position:absolute;left:6px;top:4px;font-size:.7rem;color:#fff;font-weight:700;letter-spacing:.08em;text-transform:uppercase;text-shadow:0 1px 2px #000}
/* Welcome-to-Kid-Kingdom header overlay — sits at the top of the painted
   scene, just below the global SaintStream logo. Sized as % of the frame
   so it scales with the home image. */
.kk-welcome-hdr{
  /* Transform-based centering is robust against any asymmetric transparent
     padding in the PNG itself — left:50% + translateX(-50%) puts the
     element's centerpoint at the frame's centerpoint regardless. */
  position:absolute;left:calc(70% - 45px);top:0%;transform:translateX(-50%);
  width:80%;height:auto;
  pointer-events:none;user-select:none;-webkit-user-drag:none;
  filter:drop-shadow(0 6px 12px rgba(0,0,0,.55));
  z-index:3;
}

/* "READ" label painted over the book stack in lower-left. Pointer events
   off so the hotspot underneath catches taps anywhere in the area. */
.kk-read-label{
  position:absolute;left:3%;top:78%;
  font-family:var(--head);font-weight:800;font-size:clamp(1.1rem,4.5vw,1.6rem);
  color:#FFD86B;letter-spacing:.1em;
  text-shadow:0 2px 6px rgba(0,0,0,.85),0 0 3px rgba(0,0,0,.95);
  pointer-events:none;transform:rotate(-4deg);user-select:none;
}
.kk-bg-fb{
  position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:24px;color:#F5F7FB;
  background:linear-gradient(180deg,#1E2840,#0B0B0D);
}
/* Author display:flex above otherwise overrides the UA [hidden]{display:none}
   rule (equal specificity, author wins), so the fallback would paint on top
   of a perfectly-loaded image. Re-assert hiding when the attribute is set. */
.kk-bg-fb[hidden]{display:none}
.kk-bg-fb-title{font-family:var(--head);font-weight:800;font-size:2rem;margin-bottom:8px;letter-spacing:-.02em}
.kk-bg-fb-sub{color:var(--dim,#9aa3b4);line-height:1.45}

/* Value-sign lesson card (Be Kind / Stay Curious / Believe). Placeholder
   until real church-leader-derived character animations are wired in. */
.kk-value-card{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.72);z-index:9999;padding:20px;animation:kk-bg-in .2s ease-out}
.kk-value-card[hidden]{display:none}
.kk-value-inner{position:relative;background:linear-gradient(180deg,#1E2840,#0B0B0D);border-radius:24px;padding:44px 28px 32px;max-width:360px;width:100%;text-align:center;color:#F5F7FB;box-shadow:0 20px 60px rgba(0,0,0,.55);border:1px solid rgba(217,164,65,.35)}
.kk-value-close{position:absolute;top:10px;right:10px;width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.1);border:none;color:#fff;font-size:1.4rem;cursor:pointer;line-height:1}
.kk-value-close:active{background:rgba(255,255,255,.2)}
.kk-value-emoji{font-size:3rem;margin-bottom:10px;line-height:1}
.kk-value-title{font-family:var(--head);font-weight:800;font-size:1.7rem;margin-bottom:10px;letter-spacing:-.01em}
.kk-value-sub{color:var(--dim,#9aa3b4);line-height:1.5;font-size:1rem}

/* Companion splash (Owl/Bird/Bunny/Sam). Replaces the grid-based
   sub-pages for V1 since there's no real media yet — a friendly character
   card auto-returns to Kid Kingdom after 5s so kids never get stuck. The
   sub-page grid markup stays dormant in the DOM for when real media lands. */
.kk-splash{
  position:absolute;inset:0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  background:linear-gradient(180deg,rgba(11,15,22,.86),rgba(30,40,64,.86));
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  z-index:50;padding:24px;text-align:center;
  animation:kk-bg-in .25s ease-out;
}
.kk-splash[hidden]{display:none}
.kk-splash-img{
  max-width:min(72vw,420px);max-height:54vh;width:auto;height:auto;
  filter:drop-shadow(0 16px 28px rgba(0,0,0,.55));
  margin-bottom:18px;
  animation:kk-splash-pop .35s cubic-bezier(.34,1.56,.64,1);
}
/* Sam reading deserves the full stage on the READ splash — roughly 2x the
   default character size. Doesn't affect Owl/Bird/Bunny/Sam splashes. */
.kk-splash[data-kk="read"] .kk-splash-img{
  max-width:min(95vw,840px);max-height:78vh;
}
@keyframes kk-splash-pop{from{transform:scale(.85);opacity:0}to{transform:scale(1);opacity:1}}
.kk-splash-title{
  font-family:var(--head);font-weight:800;font-size:1.7rem;color:#fff;
  margin-bottom:10px;letter-spacing:-.01em;text-shadow:0 2px 8px rgba(0,0,0,.55);
}
.kk-splash-msg{
  color:#D9DEEA;line-height:1.45;font-size:1.05rem;max-width:340px;
  text-shadow:0 1px 4px rgba(0,0,0,.45);margin-bottom:24px;
}
.kk-splash-progress{
  width:min(70%,260px);height:6px;border-radius:3px;
  background:rgba(255,255,255,.15);overflow:hidden;
}
.kk-splash-bar{
  width:100%;height:100%;background:linear-gradient(90deg,#FFD86B,#D9A441);
  transform-origin:left center;transform:scaleX(0);
  animation:kk-splash-fill 5s linear forwards;
}
@keyframes kk-splash-fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes kk-bg-in{from{opacity:0}to{opacity:1}}

/* Sub-page header bar. */
.kk-lane-view{padding:18px 14px 26px;animation:kk-lane-in .2s ease-out}
.kk-lane-bar{
  display:flex;align-items:center;gap:10px;
  padding:6px 4px 14px;border-bottom:1px solid rgba(255,255,255,.06);
  margin-bottom:14px;
}
.kk-lane-back{
  width:44px;height:44px;border-radius:50%;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);
  color:#F5F7FB;font-size:1.6rem;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.kk-lane-back:active{transform:scale(.94)}
.kk-lane-title{
  flex:1;text-align:left;
  font-family:var(--head);font-weight:800;font-size:1.6rem;
  color:var(--text);letter-spacing:-.01em;
}
.kk-lane-sam{
  width:44px;height:44px;border-radius:50%;
  background:linear-gradient(135deg,var(--purple,#b68cff) 0%, var(--blue,#65b9ff) 100%);
  border:none;cursor:pointer;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 16px rgba(101,185,255,.45), 0 0 0 2px rgba(217,164,65,.35);
}
.kk-lane-sam svg{width:22px;height:22px;color:#fff}
.kk-lane-sam:active{transform:scale(.94)}
@keyframes kk-lane-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.kk-hero{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:14px 16px 22px}
.kk-sam{position:relative;width:96px;height:96px;border-radius:50%;
  background:linear-gradient(135deg,var(--purple,#b68cff) 0%, var(--blue,#65b9ff) 100%);
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  box-shadow:0 10px 28px rgba(101,185,255,.45), 0 0 0 4px rgba(217,164,65,.35)}
.kk-sam svg{width:54px;height:54px;color:#fff}
.kk-sam .g-pulse{position:absolute;inset:-6px;border-radius:50%;border:2px solid rgba(217,164,65,.5);animation:kk-pulse 2.4s ease-out infinite}
@keyframes kk-pulse{0%{transform:scale(.9);opacity:.8}70%{transform:scale(1.18);opacity:0}100%{transform:scale(1.18);opacity:0}}
.kk-greet{font-family:var(--head);font-weight:800;font-size:2rem;color:var(--text);letter-spacing:-.02em;line-height:1.1}
.kk-sub{font-size:1.05rem;color:var(--text2);max-width:280px;line-height:1.35}
.kk-exit{position:absolute;top:4px;right:6px;padding:6px 12px;border-radius:99px;background:rgba(245,247,251,.08);border:1px solid var(--glass-brd);color:var(--text2);font-size:.68rem;font-weight:700;letter-spacing:.04em;cursor:pointer}
.kk-lane-lbl{font-family:var(--head);font-weight:700;font-size:1.6rem;color:var(--text);padding:18px 6px 10px;letter-spacing:-.01em}
.kk-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:0 4px}
.kk-tile{position:relative;aspect-ratio:1;border-radius:22px;overflow:hidden;cursor:pointer;
  background:linear-gradient(135deg, rgba(101,185,255,.22) 0%, rgba(182,140,255,.22) 100%) center/cover no-repeat, var(--cloud,#2a2f3a);
  border:2px solid rgba(217,164,65,.35);
  box-shadow:0 8px 22px rgba(0,0,0,.32);
  transition:transform .15s ease, box-shadow .15s ease;
  display:flex;flex-direction:column;justify-content:flex-end}
.kk-tile:active{transform:scale(.97)}
.kk-tile.has-art{background-size:cover;background-position:center}
.kk-tile-veil{position:absolute;inset:auto 0 0 0;height:55%;background:linear-gradient(to top, rgba(11,15,22,.92) 0%, rgba(11,15,22,.55) 60%, transparent 100%)}
.kk-tile-tx{position:relative;padding:14px 12px 14px;text-align:center}
.kk-tile-title{font-family:var(--head);font-weight:800;font-size:1.05rem;color:#fff;line-height:1.15;text-shadow:0 2px 6px rgba(0,0,0,.6)}
.kk-tile-kind{font-size:.72rem;font-weight:700;color:#ffd86b;letter-spacing:.08em;text-transform:uppercase;margin-top:4px;text-shadow:0 1px 4px rgba(0,0,0,.6)}
.kk-tile-play{position:absolute;top:10px;right:10px;width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.92);display:flex;align-items:center;justify-content:center;box-shadow:0 4px 10px rgba(0,0,0,.35)}
.kk-tile-play svg{width:22px;height:22px;color:var(--slate,#0b0f16);margin-left:2px}
.kk-empty{padding:40px 24px;text-align:center;color:var(--text2);font-size:1rem;line-height:1.5}
.kk-empty-ic{font-size:3rem;margin-bottom:10px}
/* Lockdown: when a kid is signed in, hide every escape hatch EXCEPT the Exit
   pill — that's the one sanctioned way out, and it's PIN-gated (kidExitLocked)
   so a child can't wander out but a grown-up can. The old long-press-Sam exit
   (a toddler-triggered accident) was removed in V1.593. */
body.kid nav,
body.kid #hdr,
body.kid #mini,
body.kid #guide-fab{display:none !important}
/* Keep the Exit pill visible + comfortably tappable inside a kid session. */
body.kid #kk-exit{display:inline-flex !important;align-items:center;top:8px;right:8px;padding:8px 16px;font-size:.74rem}
body.kid #kids{padding-top:34px}
/* Kid Kingdom, ANY account: hide the bottom nav + mini-player + FABs whenever the
   Kid Kingdom screen is showing — not just for locked Primary sessions. Kids (or
   anyone handed the device) shouldn't be able to tap their way out and kick
   themselves to another screen; the in-screen Exit button is the only way off. */
body:has(#kids.on) nav,
body:has(#kids.on) #mini,
body:has(#kids.on) #guide-fab{display:none !important}
.tribe-search-input{width:100%;padding:10px 14px;border-radius:99px;border:1px solid var(--glass-brd);background:rgba(245,247,251,.06);color:var(--text);font-size:.82rem;outline:none}
.tribe-search-input::placeholder{color:var(--dim)}
.tribe-search-results{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.tribe-search-results:empty{display:none}
/* Find-a-Tribe tile — first slot in the Your Tribes row, 140x140 compact */
.find-tribe-tile{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 10px 10px;cursor:default}
.find-tribe-tile::after{content:none}
.find-tribe-tile .ftt-ic{color:var(--accent-color);filter:drop-shadow(0 0 8px rgba(var(--accent-rgb),.65));position:relative;z-index:2}
.find-tribe-tile .ftt-ic svg{width:30px;height:30px;display:block}
.find-tribe-tile .ftt-lbl{font-family:var(--head);font-size:.74rem;font-weight:700;color:var(--text);text-align:center;letter-spacing:.04em;position:relative;z-index:2}
.find-tribe-tile .ftt-input{width:100%;padding:6px 10px;border-radius:7px;border:1px solid var(--glass-brd);background:rgba(245,247,251,.08);color:var(--text);font-size:.7rem;outline:none;margin-top:auto;position:relative;z-index:2}
.find-tribe-tile .ftt-input::placeholder{color:var(--dim)}
.find-tribe-tile .ftt-input:focus{border-color:var(--accent-color)}
.tsr-row{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:14px;background:rgba(245,247,251,.05);border:1px solid var(--glass-brd)}
.tsr-row .tsr-tx{flex:1;min-width:0}
.tsr-row .tsr-name{font-weight:700;font-size:.82rem;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tsr-row .tsr-sub{font-size:.68rem;color:var(--text2)}
.tsr-row .tsr-join{flex-shrink:0;padding:6px 14px;border-radius:99px;background:var(--gold);color:var(--slate);font-weight:800;font-size:.72rem;cursor:pointer;border:none}
.tsr-row .tsr-join.joined{background:rgba(217,164,65,.18);color:var(--gold);border:1px solid rgba(217,164,65,.5)}
.v6tribe .leader-badge{display:inline-block;font-size:.56rem;font-weight:800;letter-spacing:.08em;color:var(--slate);background:var(--gold);border-radius:99px;padding:2px 7px;margin-bottom:5px}
.td-owner-tools{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:12px}
.td-tool{padding:8px 14px;border-radius:99px;font-size:.74rem;font-weight:700;color:var(--text);background:rgba(245,247,251,.08);border:1px solid var(--glass-brd);cursor:pointer}
.td-tool:hover{background:rgba(245,247,251,.14)}
.members-list{display:flex;flex-direction:column;gap:8px;margin-top:10px;max-height:52vh;overflow-y:auto}
.mrow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-radius:14px;background:rgba(245,247,251,.05);border:1px solid var(--glass-brd)}
.mname{font-weight:700;font-size:.82rem;color:var(--text);display:flex;align-items:center;gap:9px}
.person-av{border-radius:50%;flex-shrink:0;background:var(--grad);background-size:cover;background-position:center;color:var(--slate);font-weight:900;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}
.mrole{display:inline-block;font-size:.56rem;font-weight:800;letter-spacing:.06em;color:var(--slate);background:var(--gold);border-radius:99px;padding:2px 7px;margin-left:6px;vertical-align:middle}
.mrole.mod{background:var(--blue);color:#fff}
.macts{display:flex;gap:6px;flex-shrink:0}
.mbtn{padding:6px 11px;border-radius:99px;font-size:.68rem;font-weight:700;color:var(--text);background:rgba(245,247,251,.08);border:1px solid var(--glass-brd);cursor:pointer}
.mbtn.danger{color:#ff8a8a;border-color:rgba(255,138,138,.4)}
.genre-cat-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}
.gct{padding:7px 12px;border-radius:99px;font-size:.74rem;font-weight:700;color:var(--text2);background:rgba(245,247,251,.05);border:1px solid var(--glass-brd);cursor:pointer}
.gct.on{color:var(--gold);border-color:var(--gold);background:rgba(217,164,65,.14)}
.genre-block{margin-bottom:10px;border-radius:14px;background:rgba(245,247,251,.04);border:1px solid var(--glass-brd);overflow:hidden}
.genre-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px}
.genre-row.sub{padding-left:22px;border-top:1px solid var(--glass-brd);background:rgba(245,247,251,.02)}
.genre-name{font-weight:700;font-size:.82rem;color:var(--text)}
.genre-row.sub .genre-name{font-weight:600;color:var(--text2)}
.genre-acts{display:flex;gap:6px;flex-shrink:0}
.fav-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.v6tribe .art-mini{width:100%;height:66px;border-radius:12px;background:var(--cloud);background-size:cover;background-position:center;margin-bottom:8px}
.pf-vis-toggle{flex-shrink:0;padding:6px 11px;border-radius:99px;font-size:.66rem;font-weight:700;cursor:pointer;color:var(--text2);background:rgba(245,247,251,.06);border:1px solid var(--glass-brd)}
.pf-vis-toggle.on{color:var(--gold);border-color:rgba(217,164,65,.5);background:rgba(217,164,65,.14)}
.p-avatar{position:relative;cursor:pointer;background-size:cover;background-position:center}
.p-avatar-cam{position:absolute;right:-2px;bottom:-2px;font-size:.8rem;background:var(--surface);border-radius:50%;width:22px;height:22px;display:flex;align-items:center;justify-content:center;border:1px solid var(--glass-brd)}
.p-bio{margin-top:8px;font-size:.82rem;color:var(--text2);line-height:1.5;max-width:320px;margin-left:auto;margin-right:auto;text-align:center}
.pf-edit-btn{margin-top:12px;padding:8px 18px;border-radius:99px;font-size:.78rem;font-weight:700;color:var(--text);background:rgba(245,247,251,.08);border:1px solid var(--glass-brd);cursor:pointer}
.pf-edit-btn:hover{background:rgba(245,247,251,.15)}
#v6-continue .pf{width:38px;height:38px;border-radius:50%;flex-shrink:0;margin-left:auto;display:flex;align-items:center;justify-content:center;overflow:hidden;
  background:radial-gradient(circle at 38% 30%,#fff,#eef1f6 52%,#d7dbe6 100%);
  box-shadow:0 0 20px -3px rgba(101,185,255,.7),-6px 0 18px -8px rgba(217,164,65,.7),inset 0 1px 2px rgba(255,255,255,.9),0 5px 14px rgba(0,0,0,.45)}
#v6-continue .pf svg{width:15px;height:15px;color:#1a56e0;margin-left:2px}
.shelf-featured,.shelf-explore,.shelf-tiles,.shelf{--tileH:190px;--artH:148px;display:flex;gap:10px;overflow-x:auto;padding:8px 16px 8px 16px;cursor:grab;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;align-items:flex-start}
/* Format button — vertical title at the start of each shelf row.
   Height matches every tile (var --tileH). Sticks to the left edge as the
   row scrolls underneath; opaque backing masks tiles passing behind it. */
.format-btn{
  flex-shrink:0;
  width:62px;height:var(--tileH);border:none;border-radius:12px;
  display:flex;flex-direction:column;align-items:center;
  padding:4px 0 6px;cursor:pointer;overflow:hidden;
  position:sticky;left:0;z-index:9;
  background-color:#0d1118;   /* opaque base under the glass face */
  /* Must outrank a whole tile, not individual pieces of one. Tiles now open
     their own stacking context (.stile/.fcard z-index:0), so everything inside
     them — corner button, hint, play mark — rides at the tile's level and this
     rail masks all of it. Before, the tile's corner button (z-index 6) beat the
     rail at z-index 4 and drew on top of the format name as the row scrolled. */
}
/* Glow radius is relative to a 30px icon, so the old 0 0 8px at .65 bloomed
   about four strokes wide — on the detailed format marks (soundscapes' ripples,
   the ruled tablet) neighbouring halos merged and filled the gaps, reading as
   thick mush rather than fine line art. Tightened to a 2px halo, and the
   strokes thinned to match the hairline weight of the Listen hub PNGs. */
.format-btn .lbi{width:30px;height:30px;flex-shrink:0;color:var(--accent-color,var(--text));filter:drop-shadow(0 0 2px rgba(var(--accent-rgb),.45))}
.format-btn .lbi svg{width:100%;height:100%;display:block;stroke-width:.9}
.format-btn .lbl{
  flex:1;display:flex;align-items:center;justify-content:center;
  font-family:var(--head);font-size:1.125rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--accent-color,var(--text));margin-top:4px;
  text-shadow:0 0 12px rgba(var(--accent-rgb),.45);
  writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;
}
.format-btn:active{transform:scale(.97)}
.shelf-featured.dragging,.shelf-explore.dragging,.shelf-tiles.dragging,.shelf.dragging,
.shelf-sam.dragging,.shelf-related.dragging,.shelf-news.dragging,.tf-list.dragging,
.shelf-library.dragging{cursor:grabbing;scroll-behavior:auto;user-select:none}
/* Sam Suggests snaps to tiles, which fights a JS drag: every scrollLeft write
   during the gesture gets snapped back to the nearest tile, so the row reads as
   undraggable. Suspend the snap for the duration of the drag only — it still
   snaps on release and on native touch scrolling. */
.shelf-sam.dragging{scroll-snap-type:none}
.shelf-featured::-webkit-scrollbar,.shelf-explore::-webkit-scrollbar,.shelf-tiles::-webkit-scrollbar,.shelf::-webkit-scrollbar{display:none}
.feat-hero{flex-shrink:0;width:240px;height:var(--tileH);border-radius:8px;cursor:pointer;overflow:hidden}
/* the hero's rim is drawn by .fart::after — suppress the inherited .glass::after so it isn't doubled */
.feat-hero::after{content:none}
.feat-hero .fart{height:var(--tileH);position:relative;display:flex;flex-direction:column;justify-content:flex-end;padding:13px;gap:6px;border-radius:inherit;background-size:contain;background-repeat:no-repeat;background-position:center;background-color:var(--bg)}
.feat-hero .fart::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18) 0, rgba(255,255,255,0) 4px),
    linear-gradient(90deg, rgba(255,255,255,.11) 0, rgba(255,255,255,0) 4px),
    linear-gradient(180deg,transparent 36%,rgba(7,8,12,.82));
  box-shadow:inset 0 0 0 1px rgba(var(--accent-rgb,245,247,251),.30),inset 6px 0 12px -10px rgba(var(--accent-rgb,245,247,251),.30)}
.feat-hero .fb,.feat-hero .ft,.feat-hero .fs,.feat-hero .wbtn{position:relative;z-index:1}
.feat-hero .fb{align-self:flex-start;font-size:.53rem;font-weight:700;letter-spacing:.12em;padding:4px 10px;border-radius:99px;background:rgba(10,11,15,.5);color:#fff;border:1px solid rgba(255,255,255,.18)}
.feat-hero .ft{font-family:var(--head);font-size:1.05rem;font-weight:700;line-height:1.2;color:#fff}
.feat-hero .fs{font-size:.7rem;color:rgba(245,247,251,.82)}
.feat-hero .wbtn{align-self:flex-start;margin-top:5px;display:inline-flex;align-items:center;gap:6px;padding:8px 13px;border-radius:99px;font-size:.72rem;font-weight:600;background:rgba(245,247,251,.16);border:1px solid rgba(245,247,251,.2);color:#fff}
.feat-hero .wbtn svg{width:11px;height:11px}
.fcard{flex-shrink:0;width:140px;height:var(--tileH);border-radius:8px;cursor:pointer;position:relative;z-index:0;overflow:hidden;display:flex;flex-direction:column}
.fcard .cart{position:relative;width:100%;height:var(--artH);flex-shrink:0;background-size:contain;background-repeat:no-repeat;background-position:center;background-color:var(--bg)}
.fcard::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:1;box-shadow:inset 0 0 0 1px rgba(var(--accent-rgb,245,247,251),.30),inset 6px 0 12px -10px rgba(var(--accent-rgb,245,247,251),.30);
  background:
    linear-gradient(180deg, rgba(255,255,255,.18) 0, rgba(255,255,255,0) 4px),
    linear-gradient(90deg, rgba(255,255,255,.11) 0, rgba(255,255,255,0) 4px)}
.fcard .cmeta{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;padding:6px 9px;z-index:2}
.fcard .ct{font-family:var(--head);font-size:.82rem;font-weight:600;line-height:1.25;color:#fff;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.fcard .cs{font-size:.64rem;color:rgba(245,247,251,.82);margin-top:2px}
.exbtn{flex-shrink:0;width:74px;height:82px;border-radius:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--text)}
.exbtn .exi{color:var(--accent-color,var(--text))}.exbtn .exi svg{width:25px;height:25px;display:block}
.exbtn .exl{font-size:.51rem;font-weight:600}
/* Compact 140x140 tribe tile — cover art fills, name overlays on a bottom scrim. */
.v6tribe{flex-shrink:0;width:140px;height:var(--tileH);border-radius:8px;cursor:pointer;position:relative;overflow:hidden;padding:0;display:flex;flex-direction:column}
.v6tribe .vt-art{position:relative;width:100%;height:var(--artH);flex-shrink:0;background-size:cover;background-position:center;background-color:var(--slate);display:flex;align-items:center;justify-content:center;font-family:var(--head);font-size:2.6rem;font-weight:800;color:rgba(255,255,255,.32);background-image:linear-gradient(160deg,var(--slate),var(--ink))}
/* Never crop tribe art: show the full square (contain) over a blurred
   same-image underlay that fills the letterbox gaps. */
.v6tribe .vt-art.has-img{background-image:none;overflow:hidden}
.v6tribe .vt-art.has-img::before{content:"";position:absolute;inset:0;background-image:var(--bg-img);background-size:cover;background-position:center;filter:blur(16px) brightness(.55);transform:scale(1.2);z-index:0}
.v6tribe .vt-art.has-img::after{content:"";position:absolute;inset:0;background-image:var(--bg-img);background-size:contain;background-repeat:no-repeat;background-position:center;z-index:1}
/* R10: branded no-image tribe fallback — tribes accent hue + community motif, not a dead slate square */
.v6tribe .vt-art:not(.has-img){background-color:rgba(var(--accent-rgb),.10);background-image:radial-gradient(130% 105% at 26% -12%,rgba(var(--accent-rgb),.58),transparent 58%),linear-gradient(155deg,rgba(var(--accent-rgb),.34),rgba(var(--accent-rgb),.07));color:rgba(255,255,255,.94);text-shadow:0 2px 12px rgba(0,0,0,.22)}
.v6tribe .vt-art:not(.has-img)::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:radial-gradient(circle at 79% 80%,rgba(255,255,255,.20) 0 6.5%,transparent 7%),radial-gradient(circle at 89% 68%,rgba(255,255,255,.14) 0 4.5%,transparent 5%),radial-gradient(circle at 70% 90%,rgba(255,255,255,.14) 0 4.5%,transparent 5%)}
.v6tribe::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:1;background:
    linear-gradient(180deg, rgba(255,255,255,.18) 0, rgba(255,255,255,0) 4px),
    linear-gradient(90deg, rgba(255,255,255,.11) 0, rgba(255,255,255,0) 4px);box-shadow:inset 0 0 0 1px rgba(var(--accent-rgb,245,247,251),.30),inset 6px 0 12px -10px rgba(var(--accent-rgb,245,247,251),.30)}
.v6tribe .vt-meta{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;padding:6px 9px;z-index:2}
.v6tribe .tt{font-family:var(--head);font-size:.82rem;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.15}
.v6tribe .ts{font-size:.6rem;color:rgba(245,247,251,.78);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.v6tribe .rec{position:absolute;top:7px;left:7px;z-index:3;font-size:.5rem;font-weight:700;letter-spacing:.08em;padding:3px 7px;border-radius:99px;background:rgba(217,164,65,.85);color:#1a1208;text-transform:uppercase}

/* ── Preview slot ─────────────────────────────────────────────────────
   Home shelves snap one tile at a time. The tile resting in the slot just
   right of the format button gets highlighted + a mute toggle (audio later). */
.feat-hero{position:relative}
.slot-speaker{position:absolute;bottom:8px;right:8px;top:auto;z-index:7;width:32px;height:32px;border:none;border-radius:50%;background:rgba(8,10,16,.82);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);box-shadow:0 2px 8px rgba(0,0,0,.45)}
.slot-speaker svg{width:16px;height:16px;display:block}
.slot-speaker.muted{color:rgba(255,255,255,.5)}
/* Accent-color glow that radiates INWARD from the tile edges, blooming then
   fading to nothing in ~1s when a tile lands in the slot. It's a thin overlay
   on top of the tile (so it shows over the artwork) and removes itself after,
   keeping the screen uncluttered — no padding, no persistent highlight. */
.slot-glow{position:absolute;inset:0;z-index:5;pointer-events:none;border-radius:inherit;animation:slotGlow 1s ease-out forwards}
@keyframes slotGlow{
  0%  {box-shadow:inset 0 0 0 0 rgba(var(--accent-rgb,245,247,251),0)}
  16% {box-shadow:inset 0 0 26px 4px rgba(var(--accent-rgb,245,247,251),.9)}
  100%{box-shadow:inset 0 0 0 0 rgba(var(--accent-rgb,245,247,251),0)}
}
/* Playlist cards — image fills top edge-to-edge, text below on glass */
.pl-card{flex-shrink:0;width:140px;height:var(--tileH);border-radius:8px;cursor:pointer;position:relative;overflow:hidden;display:flex;flex-direction:column}
.pl-card .pl-art{position:relative;width:100%;height:var(--artH);flex-shrink:0;background-color:var(--cloud);
  display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:2px;padding:6px;overflow:hidden}
.pl-card .pl-art img{width:100%;height:100%;min-width:0;min-height:0;object-fit:contain !important;display:block} /* !important: playlistCoverHtml inlines cover-fit for imageUrl; art never crops on Home */
.pl-card .pl-art img:only-child{grid-column:1/-1;grid-row:1/-1}
.pl-card .pl-art .pl-cover-fb{grid-column:1/-1;grid-row:1/-1;display:flex;align-items:center;justify-content:center;
  color:rgba(var(--accent-rgb,245,247,251),.65);background:transparent}
.pl-card::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:1;box-shadow:inset 0 0 0 1px rgba(var(--accent-rgb,245,247,251),.30),inset 6px 0 12px -10px rgba(var(--accent-rgb,245,247,251),.30);
  background:
    linear-gradient(180deg, rgba(255,255,255,.18) 0, rgba(255,255,255,0) 4px),
    linear-gradient(90deg, rgba(255,255,255,.11) 0, rgba(255,255,255,0) 4px)}
.pl-card .pl-meta{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;padding:6px 9px;z-index:2}
.pl-card .tt{font-family:var(--head);font-size:.84rem;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pl-card .ts{font-size:.66rem;color:rgba(245,247,251,.82);margin-top:2px}
/* Shelf cards — uniform square 140x140 across every format. */
/* z-index:0 is load-bearing: it opens a stacking context so the tile's own
   children (corner button z6, hint z7, play mark z10) can never draw above the
   sticky format rail they scroll behind. Do not remove. */
.stile{flex-shrink:0;width:140px;height:var(--tileH);border-radius:8px;cursor:pointer;position:relative;z-index:0;overflow:hidden;display:flex;flex-direction:column}
.stile .sart{position:relative;width:100%;height:var(--artH);flex-shrink:0;background-size:contain;background-repeat:no-repeat;background-position:center;background-color:var(--bg)}
.stile.has-art::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:1;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18) 0, rgba(255,255,255,0) 4px),
    linear-gradient(90deg, rgba(255,255,255,.11) 0, rgba(255,255,255,0) 4px);
  /* accent rim re-rendered above the cover art (the .glass inset rim gets covered by .sart) */
  box-shadow:inset 0 0 0 1px rgba(var(--accent-rgb,245,247,251),.30),inset 6px 0 12px -10px rgba(var(--accent-rgb,245,247,251),.30)}
/* no-art: highly translucent glass square so the flow field shows through "as if empty",
   with a centered FUTURE CONTENT pill; text below. */
.stile.no-art{background:linear-gradient(180deg,rgba(255,255,255,.03) 0%,rgba(0,0,0,.05) 100%),rgba(16,21,30,.10)}
.stile.no-art .sart{background:none;display:flex;align-items:center;justify-content:center}
.stile.no-art .sart::before{content:"FUTURE CONTENT";font-size:.5rem;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:rgba(245,247,251,.5);background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.13);padding:5px 11px;border-radius:99px;backdrop-filter:blur(2px)}
.stile.no-art::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:1;
  background:
    linear-gradient(180deg, rgba(255,255,255,.13) 0, rgba(255,255,255,0) 4px),
    linear-gradient(90deg, rgba(255,255,255,.08) 0, rgba(255,255,255,0) 4px)}
.stile .sbadge{position:absolute;top:7px;left:7px;z-index:3;font-size:.5rem;font-weight:700;letter-spacing:.1em;padding:3px 8px;border-radius:99px;background:rgba(10,11,15,.5);color:#fff;border:1px solid rgba(255,255,255,.16)}
.stile .smeta{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;padding:6px 9px;z-index:2}
.stile .stt{font-family:var(--head);font-size:.8rem;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stile .sts{font-size:.62rem;color:rgba(245,247,251,.82);margin-top:1px}
.v6dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;box-shadow:0 0 8px currentColor}
/* Placeholder artwork for media cards with no real image — deep-night neutral
   bodies with only a faint single-hue light, so an empty card reads as dark
   smoked glass, never a colored slab. */
.art-g1{background:radial-gradient(120% 90% at 26% 16%,rgba(182,140,255,.20),transparent 60%),linear-gradient(155deg,#13161f,#0a0c12)}
.art-g2{background:radial-gradient(120% 90% at 26% 16%,rgba(101,185,255,.20),transparent 60%),linear-gradient(155deg,#10141d,#090b11)}
.art-g3{background:radial-gradient(120% 90% at 26% 16%,rgba(122,213,154,.18),transparent 60%),linear-gradient(155deg,#11161a,#090c10)}
.art-g4{background:radial-gradient(120% 90% at 26% 16%,rgba(182,140,255,.18),transparent 60%),linear-gradient(155deg,#15131f,#0a0a12)}
.art-g5{background:radial-gradient(120% 90% at 26% 16%,rgba(217,164,65,.18),transparent 60%),linear-gradient(155deg,#17141c,#0b0a0e)}
.art-g6{background:radial-gradient(120% 90% at 26% 16%,rgba(174,183,199,.16),transparent 60%),linear-gradient(155deg,#12151c,#090b10)}
/* ═══════════ Creator Context Corner ═══════════ */
.creator-context-corner{position:absolute;top:10px;right:10px;z-index:6;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;
  background:linear-gradient(145deg,rgba(255,255,255,.22),rgba(255,255,255,.06)),rgba(10,11,15,.42);
  border:1px solid rgba(245,247,251,.20);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28),inset 0 -1px 0 rgba(255,255,255,.06),0 8px 22px rgba(0,0,0,.36),0 0 18px var(--accent-glow,transparent);
  -webkit-backdrop-filter:blur(18px) saturate(150%);backdrop-filter:blur(18px) saturate(150%);
  color:var(--gold);cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease,opacity .18s ease}
.creator-context-corner:hover,.creator-context-corner:focus-visible{transform:translateY(-1px) scale(1.04);border-color:rgba(245,247,251,.34);outline:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.34),0 10px 26px rgba(0,0,0,.42),0 0 26px var(--accent-glow,transparent)}
.creator-context-corner:active{transform:scale(.96)}
.creator-context-corner .quote-icon{width:20px;height:20px;opacity:1;position:relative;z-index:1}
.creator-context-corner::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:.58;
  background:linear-gradient(135deg,rgba(255,255,255,.34) 0%,rgba(255,255,255,.10) 32%,transparent 62%)}
.creator-context-corner::after{content:none}
/* first-time hint */
.cc-hint{position:absolute;top:60px;right:8px;z-index:7;font-family:var(--body);font-size:.62rem;font-weight:700;letter-spacing:.02em;
  padding:6px 10px;border-radius:11px;color:var(--text);white-space:nowrap;
  background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.05)),rgba(14,17,24,.86);
  border:1px solid rgba(245,247,251,.18);box-shadow:0 8px 22px rgba(0,0,0,.4),0 0 16px var(--accent-glow,transparent);
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);animation:ccHintIn .4s ease}
.cc-hint::before{content:"";position:absolute;top:-5px;right:18px;width:10px;height:10px;transform:rotate(45deg);
  background:rgba(20,24,32,.9);border-left:1px solid rgba(245,247,251,.18);border-top:1px solid rgba(245,247,251,.18)}
@keyframes ccHintIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
/* overlay + panel */
.cc-overlay{position:fixed;inset:0;z-index:9998;display:none;align-items:flex-end;justify-content:center;
  background:rgba(4,5,10,.55);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);max-width:480px;margin:0 auto}
.cc-overlay.on{display:flex;animation:ccFade .2s ease}
@keyframes ccFade{from{opacity:0}to{opacity:1}}
.creator-context-panel{position:relative;width:100%;max-height:86vh;overflow-y:auto;padding:18px 20px 28px;
  background:radial-gradient(circle at 18% 0%,var(--accent-glow,transparent),transparent 42%),linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.045)),rgba(10,11,15,.82);
  border:1px solid rgba(245,247,251,.16);border-radius:30px 30px 0 0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 -28px 90px rgba(0,0,0,.62),0 0 42px var(--accent-glow,transparent);
  -webkit-backdrop-filter:blur(30px) saturate(150%);backdrop-filter:blur(30px) saturate(150%);color:var(--white-light);
  animation:ccUp .32s cubic-bezier(.3,.9,.3,1)}
.creator-context-panel::-webkit-scrollbar{display:none}
@keyframes ccUp{from{transform:translateY(40px);opacity:.6}to{transform:translateY(0);opacity:1}}
.cc-grip{width:42px;height:5px;border-radius:99px;background:rgba(245,247,251,.25);margin:0 auto 12px}
.cc-x{position:absolute;top:14px;right:16px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:rgba(245,247,251,.08);border:1px solid var(--glass-brd);color:var(--text)}
.cc-x svg{width:15px;height:15px}
/* ── SHEET ESCAPE — the guaranteed way out of any bottom sheet ──────────
   A .cc-overlay is fixed at inset:0 with z-index 9998, so while one is open it
   covers BOTH the header and the bottom nav — the app's whole chrome is gone.
   Its only exit, .cc-x, lives inside .creator-context-panel, and that panel is
   itself the scroll container (max-height:86vh;overflow-y:auto) — so on a phone
   any sheet taller than the screen scrolls its own close button out of reach and
   strands the user. That is exactly what happened creating a tribe on a phone
   ("there was no way to get back to the home screen", Robert 2026-07-28).
   ccEnsureEscape() in js/core/nav.js appends this button to the OVERLAY, never
   to the panel, so panel scrolling can never move it. Left edge + back chevron
   on purpose: .cc-overlay is capped to the same centered --shellW column the
   header aligns to, so it lands where the header's own Back button sits. */
.cc-esc{
  position:absolute;
  top:calc(env(safe-area-inset-top,0px) + 8px);
  left:12px;
  width:44px;height:44px;border-radius:50%;
  display:grid;place-items:center;
  /* Solid body — glass/backdrop-filter is retired. */
  background:var(--tile-solid,#161c26);
  border:1px solid var(--glass-brd,rgba(245,247,251,.14));
  color:var(--text);
  box-shadow:0 6px 20px rgba(0,0,0,.5);
  cursor:pointer;z-index:4;
}
.cc-esc svg{width:22px;height:22px}
.cc-esc:active{transform:scale(.94)}
.cc-kicker{font-family:var(--head);font-size:.62rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--accent-color,var(--gold))}
.cc-title{font-family:var(--head);font-size:1.4rem;font-weight:700;margin-top:4px;color:var(--text)}
.cc-by{font-size:.82rem;color:var(--text2);margin-top:3px}
.cc-cover-invite{margin-top:12px;padding:9px 12px;border-radius:12px;font-size:.8rem;font-weight:600;line-height:1.4;color:var(--text);background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12)}
.cc-cover-invite[hidden]{display:none}
/* Upload progress banner — failure state (persistent, tap to dismiss). */
#up-progress.up-progress-error{background:rgba(58,16,16,.96);cursor:pointer}
#up-progress.up-progress-error #up-progress-label{color:#ffd9d4;white-space:normal}
#up-progress.up-progress-error #up-progress-fill{background:#e05a4f}
.cc-note{font-size:.88rem;line-height:1.62;color:var(--text);margin-top:16px;white-space:pre-wrap}
.cc-bio{font-size:.76rem;line-height:1.55;color:var(--text2);margin-top:14px;padding:12px 14px;border-radius:14px;background:rgba(245,247,251,.05);border:1px solid var(--glass-brd)}
.cc-primary{margin-top:18px;width:100%;padding:14px;border-radius:14px;font-family:var(--head);font-weight:600;font-size:.92rem;color:#0a0b14;cursor:pointer;
  background:linear-gradient(135deg,var(--accent-color,var(--gold)),#fff);box-shadow:0 8px 24px var(--accent-glow,rgba(0,0,0,.3))}
.cc-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px}
.cc-act{padding:9px 14px;border-radius:99px;font-size:.74rem;font-weight:600;color:var(--text);background:rgba(245,247,251,.07);border:1px solid var(--glass-brd);cursor:pointer}
.cc-act.cc-follow-btn.following{background:rgba(217,164,65,.18);border-color:rgba(217,164,65,.55);color:var(--gold)}
.cc-related{margin-top:18px}
.cc-rel-lbl{font-family:var(--head);font-size:.78rem;font-weight:600;color:var(--text);margin-bottom:9px}
.shelf-related{display:flex;gap:11px;overflow-x:auto;cursor:grab}.shelf-related::-webkit-scrollbar{display:none}
.cc-rel{flex-shrink:0;width:84px}
.cc-rel-art{width:84px;height:84px;border-radius:13px;background-color:var(--cloud);background-size:contain;background-repeat:no-repeat;background-position:center;border:1px solid var(--glass-brd)}
.cc-rel-t{font-size:.66rem;color:var(--text2);margin-top:5px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(min-width:540px){.cc-overlay{align-items:center}.creator-context-panel{max-width:430px;border-radius:30px;animation:ccPop .26s ease}}
@keyframes ccPop{from{transform:scale(.94);opacity:.6}to{transform:scale(1);opacity:1}}
/* ═══════════ Creator Page ═══════════ */
.crp-panel{max-height:92vh}
.crp-hero{display:flex;gap:15px;align-items:center;margin-top:4px}
.crp-avatar{flex-shrink:0;width:84px;height:84px;border-radius:22px;background-color:var(--cloud);background-size:cover;background-position:center;border:1px solid rgba(245,247,251,.18);box-shadow:0 8px 26px rgba(0,0,0,.4);display:grid;place-items:center;font-family:var(--head);font-weight:700;font-size:2rem;color:var(--white-light)}
.crp-id{min-width:0}
.crp-name{font-family:var(--head);font-size:1.45rem;font-weight:700;color:var(--text);line-height:1.12;display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.crp-verified{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:var(--accent-color,var(--gold));color:#0a0b14;flex-shrink:0}
.crp-verified svg{width:11px;height:11px}
.crp-meta{font-size:.74rem;color:var(--text2);margin-top:6px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.crp-meta .dot{opacity:.45}
.crp-headline{font-size:.92rem;color:var(--text);margin-top:15px;line-height:1.5;font-style:italic}
.crp-bio{font-size:.84rem;line-height:1.62;color:var(--text2);margin-top:14px;white-space:pre-wrap}
.crp-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.crp-link{display:inline-flex;align-items:center;gap:6px;padding:8px 13px;border-radius:99px;font-size:.73rem;font-weight:600;color:var(--text);background:rgba(245,247,251,.07);border:1px solid var(--glass-brd);text-decoration:none}
.crp-link svg{width:13px;height:13px;flex-shrink:0}
.crp-follow{margin-top:18px}
.crp-sec-h{font-family:var(--head);font-size:.82rem;font-weight:600;color:var(--text);margin:24px 0 12px}
.crp-works{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}
.crp-work{cursor:pointer;text-align:left;background:none;border:0;padding:0;color:inherit;font:inherit}
.crp-work-art{width:100%;aspect-ratio:1;border-radius:14px;background-color:var(--cloud);background-size:contain;background-repeat:no-repeat;background-position:center;border:1px solid var(--glass-brd);position:relative;overflow:hidden}
.crp-work-art::after{content:'';position:absolute;inset:0;background:radial-gradient(circle at 50% 120%,var(--accent-glow,transparent),transparent 60%);opacity:0;transition:opacity .2s}
.crp-work:hover .crp-work-art::after,.crp-work:active .crp-work-art::after{opacity:1}
.crp-work-play{position:absolute;left:10px;bottom:10px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:rgba(10,11,15,.66);border:1px solid rgba(245,247,251,.25);color:#fff;opacity:0;transform:translateY(6px);transition:.2s}
.crp-work:hover .crp-work-play,.crp-work:active .crp-work-play{opacity:1;transform:translateY(0)}
.crp-work-play svg{width:14px;height:14px;margin-left:2px}
.crp-work-t{font-size:.77rem;font-weight:600;color:var(--text);margin-top:8px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.crp-work-sub{font-size:.66rem;color:var(--text2);margin-top:2px}
.crp-empty{font-size:.8rem;color:var(--dim);padding:14px 2px}
/* ═══════════ Creator Page editor ═══════════ */
.ced-staffbar{display:flex;gap:8px;align-items:center;margin:4px 0 16px;padding:10px 12px;border-radius:14px;background:rgba(217,164,65,.1);border:1px solid rgba(217,164,65,.32)}
.ced-staffbar select{flex:1;min-width:0}
.ced-newbtn{flex-shrink:0;padding:9px 12px;border-radius:10px;font-size:.74rem;font-weight:600;color:var(--gold);background:rgba(245,247,251,.06);border:1px solid var(--glass-brd);cursor:pointer}
.ced-photo-row{display:flex;gap:14px;align-items:center;margin-bottom:6px}
.ced-photo{flex-shrink:0;width:78px;height:78px;border-radius:20px;background-color:var(--cloud);background-size:cover;background-position:center;border:1px solid rgba(245,247,251,.18);display:grid;place-items:center;font-family:var(--head);font-weight:700;font-size:1.8rem;color:var(--white-light)}
.ced-photo-btn{padding:9px 14px;border-radius:10px;font-size:.76rem;font-weight:600;color:var(--text);background:rgba(245,247,251,.07);border:1px solid var(--glass-brd);cursor:pointer}
.ced-photo-hint{font-size:.66rem;color:var(--dim);margin-top:6px}
.ced-fld{margin-top:13px}
.ced-fld label{display:block;font-size:.7rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--text2);margin-bottom:5px}
.ced-fld input,.ced-fld select,.ced-fld textarea{width:100%;padding:11px 13px;border-radius:11px;font-size:.86rem;color:var(--text);background:rgba(245,247,251,.06);border:1px solid var(--glass-brd);font-family:inherit;box-sizing:border-box}
/* Global default for dropdown option popups: the native popup falls back to a
   white background, so any select whose text is a light var(--text) rendered
   white-on-white. Every select in the app wants the same dark popup, so set it
   once here (more-specific per-component rules already use these same colors).
   Fixes the creator-editor Type dropdown and any future select. */
select option{background:#1b2230;color:#fff}
select optgroup{background:#1b2230;color:#9fb0c8;font-style:normal}
.ced-fld textarea{resize:vertical;min-height:62px;line-height:1.5}
.ced-fld input:focus,.ced-fld select:focus,.ced-fld textarea:focus{outline:none;border-color:var(--gold)}
.ced-grid2{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.ced-sub-h{font-family:var(--head);font-size:.74rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--accent-color,var(--gold));margin:22px 0 2px}
.ced-verify{display:flex;align-items:center;gap:9px;margin-top:14px;font-size:.82rem;color:var(--text)}
.ced-verify input{width:18px;height:18px;accent-color:var(--gold)}
/* ═══════════ Per-work credits — editor widget (light forms) ═══════════ */
.cred-list{margin-bottom:4px}
.cred-row{padding:11px;border-radius:12px;background:var(--surface);border:1.5px solid var(--border);margin-bottom:9px}
.cred-row-top{display:flex;gap:8px;align-items:center}
.cred-row-top .cred-name{flex:1}
.cred-rm{flex-shrink:0;width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:transparent;border:1.5px solid var(--border);color:var(--copper,#c0584a);cursor:pointer}
.cred-rm svg{width:13px;height:13px}
.cred-row .cred-role{margin-top:7px}
.cred-link{display:flex;align-items:center;gap:8px;margin-top:9px;font-size:.74rem;font-weight:500;color:var(--dim);cursor:pointer;user-select:none}
.cred-link input{width:16px;height:16px;flex-shrink:0;accent-color:var(--gold)}
.cred-add{display:inline-flex;align-items:center;gap:6px;padding:9px 14px;border-radius:10px;font-size:.78rem;font-weight:700;color:var(--blue);background:transparent;border:1.5px dashed var(--border);cursor:pointer;margin-top:2px}
.cred-add svg{width:14px;height:14px}
.ai-gen-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 11px;border-radius:99px;font-size:.62rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--gold);background:rgba(217,164,65,.12);border:1px solid rgba(217,164,65,.34);cursor:pointer;flex-shrink:0}
.ai-gen-btn svg{width:12px;height:12px}
.ai-gen-btn:disabled,.ai-gen-btn.busy{opacity:.55;cursor:default}
/* ═══════════ Per-work credits — info window display (dark panel) ═══════════ */
.cc-credits{margin-top:16px}
.cc-credits-h{font-family:var(--head);font-size:.68rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--accent-color,var(--gold));margin-bottom:9px}
.cc-credit-grp{margin-bottom:11px}
.cc-credit-grp-l{font-size:.64rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--text2);margin-bottom:5px;opacity:.8}
.cc-credit{display:flex;gap:8px;align-items:baseline;font-size:.84rem;line-height:1.5;padding:1px 0}
.cc-credit-role{flex-shrink:0;color:var(--text2);min-width:38%;font-size:.78rem}
.cc-credit-name{color:var(--text);font-weight:500}
.cc-credit-link{color:var(--accent-color,var(--gold));font-weight:600;background:none;border:0;padding:0;cursor:pointer;text-align:left;font-size:.84rem;text-decoration:underline;text-underline-offset:2px;text-decoration-color:rgba(217,164,65,.4)}
/* ═══════════ Steward docked review player ═══════════ */
#steward-panel.on{display:flex;flex-direction:column}
.steward-dock{flex-shrink:0;display:none;align-items:center;gap:11px;
  padding:10px 14px calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--glass-brd);
  background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.03)),rgba(14,17,24,.88);
  -webkit-backdrop-filter:blur(22px) saturate(150%);backdrop-filter:blur(22px) saturate(150%)}
.steward-dock.on{display:flex;animation:npFade .25s ease}
.sd-art{width:44px;height:44px;border-radius:10px;flex-shrink:0;background-color:var(--slate);background-size:contain;background-repeat:no-repeat;background-position:center}
.sd-tx{flex:1;min-width:0}
.sd-t{font-size:.8rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sd-s{font-size:.66rem;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sd-ctrls{display:flex;align-items:center;gap:3px;flex-shrink:0}
.sd-btn{position:relative;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;color:var(--text);background:transparent;border:none;cursor:pointer;transition:background .15s,transform .12s}
.sd-btn:hover{background:rgba(245,247,251,.08)}.sd-btn:active{transform:scale(.9)}
.sd-btn svg{width:20px;height:20px}
.sd-5{position:absolute;bottom:6px;right:7px;font-size:.46rem;font-weight:800;color:var(--text)}
.sd-play{background:radial-gradient(circle at 38% 30%,#fff,#eef1f6 55%,#d7dbe6 100%);
  box-shadow:0 0 16px -3px rgba(101,185,255,.7),-5px 0 14px -7px rgba(217,164,65,.7),0 4px 12px rgba(0,0,0,.45)}
.sd-play svg{color:#1a56e0;width:18px;height:18px}
.sd-stop svg{color:var(--copper)}

/* ── FUNCTIONALITY MAP (dev tool) ─────────────────────────────────
   Tile border color = build status. Selected tile shows an action row;
   related tiles (parent / children / linked) light up in their own
   status color while everything else dims. */
.fm-toolbar{display:flex;gap:8px;align-items:center;padding:6px 16px 2px;flex-wrap:wrap}
.fm-search{flex:1;min-width:150px;font-family:inherit;font-size:.85rem;color:var(--text);
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);border-radius:10px;
  padding:8px 12px;outline:none}
.fm-search:focus{border-color:rgba(101,185,255,.55)}
.fm-btn{font-family:inherit;font-size:.72rem;font-weight:800;cursor:pointer;color:var(--text2);
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);
  padding:8px 12px;border-radius:10px;transition:.15s;white-space:nowrap}
.fm-btn:hover{color:var(--text);border-color:rgba(255,255,255,.24)}
.fm-btn.gold{color:var(--gold);border-color:rgba(217,164,65,.4)}
.fm-legend{display:flex;flex-wrap:wrap;gap:12px;padding:8px 16px 6px;font-size:.64rem;font-weight:700;color:var(--text2)}
.fm-legend span{display:flex;align-items:center;gap:5px}
.fm-dot{width:9px;height:9px;border-radius:50%;display:inline-block;flex-shrink:0}
.fm-tile{position:relative;display:flex;align-items:flex-start;gap:8px;margin-top:7px;
  padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.10);border-left:4px solid var(--fm,#8A9AAA);
  cursor:pointer;transition:border-color .15s,box-shadow .15s,opacity .15s,background .15s}
.fm-tile.group{background:rgba(255,255,255,.07);padding:12px 13px}
.fm-tile:hover{background:rgba(255,255,255,.09)}
.fm-tile.sel{border-color:var(--fm,#8A9AAA);box-shadow:0 0 0 1px var(--fm),0 0 18px -4px var(--fm)}
.fm-tile.rel{border-color:var(--fm,#8A9AAA);border-width:2px;border-left-width:4px;
  box-shadow:0 0 14px -5px var(--fm)}
.fm-tile.fade{opacity:.30}
.fm-caret{flex-shrink:0;width:15px;color:var(--dim);font-size:.68rem;line-height:1.5;
  transition:transform .16s;text-align:center}
.fm-node.closed > .fm-tile .fm-caret{transform:rotate(-90deg)}
.fm-caret.none{visibility:hidden}
.fm-ico{flex-shrink:0;font-size:.95rem;line-height:1.3}
.fm-lbl{font-size:.84rem;font-weight:700;color:var(--text);line-height:1.35}
.fm-tile.group .fm-lbl{font-size:.95rem;font-weight:800}
.fm-note{font-size:.69rem;color:var(--text2);font-weight:500;margin-top:2px;line-height:1.45}
.fm-tags{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}
.fm-tag{font-size:.55rem;font-weight:800;letter-spacing:.03em;padding:1px 6px;border-radius:99px;
  border:1px solid rgba(255,255,255,.18);color:var(--text2)}
.fm-count{flex-shrink:0;font-size:.58rem;font-weight:800;color:var(--dim);
  background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);
  padding:1px 7px;border-radius:99px;margin-top:2px}
.fm-kids{margin-left:18px;padding-left:13px;border-left:2px solid rgba(255,255,255,.08)}
.fm-node.closed > .fm-kids{display:none}
.fm-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.fm-act{font-family:inherit;font-size:.66rem;font-weight:800;cursor:pointer;color:var(--text);
  background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.18);
  padding:5px 10px;border-radius:8px}
.fm-act.danger{color:#ff9d8f;border-color:rgba(224,83,63,.45)}
.fm-act.link-on{color:var(--gold);border-color:var(--gold)}
.fm-empty{padding:30px 16px;text-align:center;color:var(--text2);font-size:.85rem;line-height:1.6}
/* edit sheet */
.fm-sheet-bg{position:fixed;inset:0;z-index:340;background:rgba(5,8,14,.66);backdrop-filter:blur(3px);
  display:none;align-items:flex-end;justify-content:center}
.fm-sheet-bg.on{display:flex}
.fm-sheet{width:100%;max-width:480px;background:#141a26;border:1px solid rgba(255,255,255,.14);
  border-radius:18px 18px 0 0;padding:18px 16px 26px;max-height:84vh;overflow:auto}
.fm-sheet h3{font-size:.95rem;font-weight:800;color:var(--text);margin:0 0 12px}
.fm-sheet label{display:block;font-size:.66rem;font-weight:800;letter-spacing:.06em;
  text-transform:uppercase;color:var(--dim);margin:12px 0 5px}
.fm-input,.fm-ta{width:100%;font-family:inherit;font-size:.9rem;color:var(--text);
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:10px;
  padding:9px 12px;outline:none}
.fm-ta{min-height:64px;resize:vertical}
.fm-input:focus,.fm-ta:focus{border-color:rgba(101,185,255,.55)}
.fm-status-row{display:flex;gap:6px;flex-wrap:wrap}
.fm-schip{font-family:inherit;font-size:.7rem;font-weight:800;cursor:pointer;color:var(--text2);
  background:rgba(255,255,255,.05);border:1.5px solid rgba(255,255,255,.14);
  padding:6px 12px;border-radius:99px}
.fm-schip.on{color:var(--text);border-color:var(--fm);box-shadow:0 0 10px -3px var(--fm)}
.fm-sheet-btns{display:flex;gap:8px;margin-top:18px}
.fm-sheet-btns .fm-btn{flex:1;padding:11px;font-size:.8rem;text-align:center}
.fm-btn.primary{color:#10141c;background:var(--gold);border-color:var(--gold)}
    .atmo-box{margin:12px 16px 4px;border-radius:18px;background:var(--tile-solid,#161c26);border:1px solid rgba(255,255,255,.085);overflow:hidden}
    .atmo-bar-head{display:flex;align-items:center;gap:11px;width:100%;padding:12px 14px;background:none;border:none;cursor:pointer;color:inherit;font:inherit;text-align:left}
    .atmo-tile-ic{display:flex;flex:none;color:var(--dim,#9aa0aa)}
    .atmo-tile-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
    .atmo-tile-title{font-size:.84rem;font-weight:600;letter-spacing:.02em;color:var(--text,#f2f2f2)}
    .atmo-tile-sub{font-size:.72rem;color:var(--dim,#9aa0aa);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .atmo-tile-chev{flex:none;color:var(--dim,#8a8f99);display:flex;transition:transform .2s ease}
    .atmo-box.open .atmo-tile-chev{transform:rotate(90deg)}
    .atmo-body{display:none;padding:0 16px 16px}
    .atmo-box.open .atmo-body{display:block}
    .atmo-readout{font-size:.76rem;color:var(--dim,#9aa0aa);margin:0 0 12px;min-height:1em}
    .atmo-dials{display:flex;flex-direction:column;gap:11px}
    .atmo-dial{display:flex;flex-direction:column;gap:2px}
    .atmo-ends{display:flex;justify-content:space-between;align-items:baseline;font-size:.68rem;color:var(--dim,#8a8f99)}
    .atmo-ends .atmo-name{font-size:.74rem;font-weight:600;color:var(--text2,#cfd2d8);letter-spacing:.02em}
    .atmo-dial input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:24px;margin:0;background:transparent;cursor:pointer}
    .atmo-dial input[type=range]::-webkit-slider-runnable-track{height:5px;border-radius:3px;background:rgba(255,255,255,.13)}
    .atmo-dial input[type=range]::-moz-range-track{height:5px;border-radius:3px;background:rgba(255,255,255,.13)}
    .atmo-dial input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;margin-top:-6.5px;border-radius:50%;background:var(--ac,#8a8f99);border:2px solid rgba(10,12,16,.55)}
    .atmo-dial input[type=range]::-moz-range-thumb{width:18px;height:18px;border:2px solid rgba(10,12,16,.55);border-radius:50%;background:var(--ac,#8a8f99)}
    .atmo-dial input[type=range]:focus-visible{outline:none}
    .atmo-dial input[type=range]:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 3px rgba(255,255,255,.18)}
    .atmo-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px;padding-top:13px;border-top:1px solid rgba(255,255,255,.08)}
    .atmo-seg{display:flex;background:rgba(255,255,255,.06);border-radius:10px;padding:3px;gap:2px}
    .atmo-seg button{background:none;border:none;color:var(--dim,#9aa0aa);font-size:.72rem;padding:6px 10px;border-radius:8px;cursor:pointer;white-space:nowrap}
    .atmo-seg button.on{background:rgba(255,255,255,.13);color:var(--text,#f2f2f2)}
    .atmo-reset{background:none;border:none;color:var(--dim,#9aa0aa);font-size:.74rem;cursor:pointer;padding:6px 4px}
.alb-songs{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.alb-song{display:flex;align-items:center;gap:8px;background:rgba(245,247,251,.05);border:1px solid var(--glass-brd);border-radius:12px;padding:8px 10px}
.alb-song .alb-num{flex:none;width:20px;text-align:center;font-weight:800;color:var(--dim);font-size:.78rem}
.alb-song .alb-fields{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.alb-song .alb-fields input{width:100%}
.alb-song .alb-rm{flex:none;background:none;border:none;color:var(--copper);font-size:1rem;font-weight:800;cursor:pointer;padding:4px 6px}
.alb-file-name{font-size:.64rem;color:var(--text2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Drop zone: drag audio files in, or tap to multi-select. */
.alb-drop{margin-top:8px;border:1.5px dashed var(--glass-brd);border-radius:16px;padding:22px 16px;text-align:center;cursor:pointer;color:var(--text2);transition:border-color .15s,background .15s;background:rgba(245,247,251,.03)}
.alb-drop:hover{background:rgba(245,247,251,.06)}
.alb-drop.drag{border-color:var(--copper);background:rgba(203,90,42,.10);color:var(--text)}
.alb-drop svg{width:26px;height:26px;color:var(--copper);margin-bottom:6px}
.alb-drop-t{font-weight:800;font-size:.9rem;color:var(--text)}
.alb-drop-s{font-size:.7rem;color:var(--dim);margin-top:3px}
.alb-count{font-size:.72rem;font-weight:700;color:var(--text2);margin:10px 0 2px}
.pf-activity{display:flex;gap:8px;padding:6px 18px 2px;flex-wrap:wrap}
.pf-act-btn{flex:1;min-width:130px;display:flex;align-items:center;gap:8px;background:rgba(245,247,251,.05);border:1px solid var(--glass-brd);border-radius:14px;padding:11px 13px;cursor:pointer;color:var(--text);font-weight:700;font-size:.82rem}
.pf-act-btn svg{width:18px;height:18px;color:var(--copper);flex:none}
.pf-act-btn:active{background:rgba(245,247,251,.1)}
.em-opts{display:flex;flex-direction:column;gap:10px;margin-top:6px}
.em-opt{text-align:left;width:100%;background:rgba(245,247,251,.05);border:1px solid var(--glass-brd);border-radius:16px;padding:14px 16px;cursor:pointer;color:var(--text)}
.em-opt:active{background:rgba(245,247,251,.1)}
.em-opt-t{font-weight:800;font-size:.95rem;margin-bottom:3px}
.em-opt-s{font-size:.72rem;color:var(--dim);font-weight:500}
.mg-wrap{overflow:auto;-webkit-overflow-scrolling:touch;padding:0 8px 40px}
.mg-empty{padding:24px 18px;color:var(--dim);font-size:.78rem;text-align:center;line-height:1.5}
.mg-empty code{background:rgba(245,247,251,.08);padding:1px 5px;border-radius:4px;font-size:.92em}
.mg-table{border-collapse:collapse;font-size:.72rem;min-width:760px}
.mg-table th,.mg-table td{border:1px solid var(--glass-brd);padding:5px 7px;text-align:left;white-space:nowrap;vertical-align:middle}
.mg-table thead th{position:sticky;top:0;background:#0f141c;color:var(--text2);font-weight:700;z-index:2}
.mg-sort{cursor:pointer;user-select:none}
.mg-sort:active{color:var(--copper)}
.mg-in{background:transparent;border:1px solid transparent;border-radius:6px;color:var(--text);font:inherit;padding:3px 5px;min-width:90px;max-width:210px}
.mg-in:focus{border-color:var(--copper);background:rgba(245,247,251,.06);outline:none}
.mg-in.mg-saved{border-color:#65B9FF;background:rgba(101,185,255,.12)}
.mg-link{cursor:pointer;color:#9fb9e4}
.mg-link:active{color:var(--copper)}
.mg-ro{color:var(--dim)}
.mg-cov img{width:34px;height:34px;border-radius:6px;object-fit:cover;cursor:pointer;background:var(--surface)}
.mg-badge{font-size:.6rem;font-weight:800;border:1px solid;border-radius:99px;padding:2px 7px;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}
.mg-rm{cursor:pointer;color:var(--copper);text-align:center;font-weight:800}
.mg-rm:active{background:rgba(203,90,42,.15)}
/* Tabulator (vendored) — blend the midnight theme with the SaintStream look */
#metagrid-body{overflow:visible;padding:0 8px 40px}
#metagrid-body .tabulator{background:transparent;border:1px solid var(--glass-brd);border-radius:12px;font-family:inherit;font-size:.74rem}
#metagrid-body .tabulator .tabulator-header,#metagrid-body .tabulator .tabulator-header .tabulator-col{background:#0f141c;border-color:var(--glass-brd)}
#metagrid-body .tabulator .tabulator-col-title{color:var(--text2);font-weight:700}
#metagrid-body .tabulator .tabulator-row{background:rgba(245,247,251,.02);border-bottom:1px solid var(--glass-brd)}
#metagrid-body .tabulator .tabulator-row.tabulator-row-even{background:rgba(245,247,251,.045)}
#metagrid-body .tabulator .tabulator-row:hover{background:rgba(245,247,251,.07)}
#metagrid-body .tabulator .tabulator-cell{border-right:1px solid var(--glass-brd);color:var(--text)}
#metagrid-body .tabulator .tabulator-cell.tabulator-editing{border:1px solid var(--copper) !important;background:rgba(245,247,251,.06)}
#metagrid-body .tabulator .tabulator-cell input{color:var(--text);font:inherit}
#metagrid-body .tabulator .tabulator-group{background:#0f141c;border-bottom:1px solid var(--glass-brd);color:var(--text2);font-weight:800}
#metagrid-body .tabulator .tabulator-group:hover{background:#141b26}
#metagrid-toolbar{display:flex;flex-wrap:wrap;gap:8px;padding:2px 18px 10px;align-items:center}
#metagrid-toolbar .mg-tool{width:auto;padding:9px 12px;font-size:.76rem;border-radius:10px}
#metagrid-toolbar #mg-search{flex:1 1 200px;min-width:150px}

/* ── Tribe Posts (broadcast layer) ──────────────────────────────────── */
.td-tabs{display:flex;gap:6px;padding:10px 14px 4px;margin:0}
.td-tab{appearance:none;flex:1;border:1px solid var(--glass-brd);background:rgba(245,247,251,.04);color:var(--text2);font-family:var(--head);font-weight:700;font-size:.82rem;padding:9px 10px;border-radius:11px;cursor:pointer;transition:all .12s}
.td-tab:hover{color:var(--text)}
.td-tab.on{background:rgba(101,185,255,.14);border-color:rgba(101,185,255,.5);color:var(--text)}
.td-tabpanel{animation:tpFade .18s ease}
@keyframes tpFade{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
.td-posts-compose{padding:8px 14px 4px}
.td-newpost{width:100%;display:flex;align-items:center;justify-content:center;gap:6px;border:1px dashed var(--glass-brd);background:rgba(245,247,251,.04);color:var(--text);font-family:var(--head);font-weight:700;font-size:.84rem;padding:11px;border-radius:12px;cursor:pointer;transition:all .12s}
.td-newpost:hover{background:rgba(245,247,251,.07);border-color:rgba(101,185,255,.5)}
.td-newpost .tnp-plus{font-size:1.05rem;line-height:1}
.td-posts-list{display:flex;flex-direction:column;gap:12px;padding:10px 14px 22px}
.tp-empty{color:var(--dim);font-size:.82rem;text-align:center;padding:22px 8px;line-height:1.5}
.tp-empty.sm{padding:10px 4px;font-size:.78rem}
.tp-empty.err{color:var(--rose)}
.tp-err-d{display:block;color:var(--dim);font-size:.7rem;margin-top:4px}

.tp-card{border:1px solid var(--glass-brd);background:rgba(245,247,251,.04);border-radius:15px;padding:13px 14px;position:relative}
.tp-card.pinned{border-color:rgba(217,164,65,.45);background:rgba(217,164,65,.05)}
.tp-head{display:flex;align-items:center;gap:9px;margin-bottom:8px}
.tp-av{flex:0 0 auto}
.tp-by{flex:1;min-width:0}
.tp-name{display:flex;align-items:center;gap:7px;font-family:var(--head);font-weight:700;font-size:.86rem;color:var(--text);line-height:1.2}
.tp-when{font-size:.7rem;color:var(--dim);margin-top:1px}
.tp-badge{font-size:.56rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;padding:2px 7px;border-radius:99px;white-space:nowrap}
.tp-badge.rel{background:rgba(101,185,255,.18);color:#9fd0ff}
.tp-badge.evt{background:rgba(124,209,142,.18);color:#9fe0b0}
.tp-badge.nws{background:rgba(217,164,65,.2);color:#e6c47a}
.tp-tools{display:flex;gap:3px;flex:0 0 auto}
.tp-tool{background:transparent;border:none;color:var(--text2);font-size:.9rem;cursor:pointer;padding:3px 6px;border-radius:7px;line-height:1}
.tp-tool:hover{background:rgba(245,247,251,.08);color:var(--text)}
.tp-tool svg{width:15px;height:15px;display:block}
.tp-tool.on{color:var(--text)}
.tp-title{font-family:var(--head);font-weight:800;font-size:1rem;color:var(--text);margin:2px 0 5px;letter-spacing:-.01em}
.tp-body{font-size:.88rem;color:var(--text);line-height:1.5;white-space:pre-wrap;word-break:break-word}
.tp-img{width:100%;height:190px;border-radius:12px;background-size:cover;background-position:center;margin-top:10px}
.tp-song{display:flex;align-items:center;gap:10px;margin-top:10px;padding:8px;border:1px solid var(--glass-brd);border-radius:12px;background:rgba(11,15,22,.3);cursor:pointer;transition:background .12s}
.tp-song:hover{background:rgba(11,15,22,.5)}
.tp-song-art{flex:0 0 40px;width:40px;height:40px;border-radius:9px;background:linear-gradient(150deg,var(--slate),var(--ink));background-size:contain;background-repeat:no-repeat;background-position:center;display:flex;align-items:center;justify-content:center;color:#fff}
.tp-song-meta{min-width:0}
.tp-song-t{font-weight:700;font-size:.82rem;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tp-song-s{font-size:.72rem;color:var(--text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tp-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:11px}
.tp-rxrow{display:flex;gap:5px;flex:1;flex-wrap:wrap}
.tp-rx{display:inline-flex;align-items:center;gap:3px;border:1px solid var(--glass-brd);background:rgba(245,247,251,.04);border-radius:99px;padding:3px 9px;font-size:.88rem;cursor:pointer;transition:all .12s}
.tp-rx:hover:not(:disabled){background:rgba(245,247,251,.09)}
.tp-rx.on{background:rgba(101,185,255,.16);border-color:rgba(101,185,255,.5)}
.tp-rx:disabled{cursor:default;opacity:.85}
.tp-rx-n{font-size:.7rem;font-weight:700;color:var(--text2)}
.tp-cmt-toggle{background:transparent;border:none;color:var(--text2);font-size:.76rem;font-weight:600;cursor:pointer;padding:3px 6px;border-radius:7px}
.tp-cmt-toggle:hover{color:var(--text);background:rgba(245,247,251,.06)}

/* ═══════════ NEWS ═══════════════════════════════════════════════════
   Home rail + full News screen + article reader. Tiles stay neutral
   smoked glass; the stream colour shows only as a thin left edge + the
   stream dot (accent-colour-as-light rule). */
.news-section{margin:6px 0 2px}
.shelf-news{display:flex;gap:10px;overflow-x:auto;padding:8px 16px 10px 16px;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;cursor:grab}
.shelf-news::-webkit-scrollbar{display:none}
.news-card{flex:0 0 230px;display:flex;flex-direction:column;gap:7px;padding:13px 14px;border-radius:16px;cursor:pointer;position:relative;overflow:hidden}
.news-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--news-accent,var(--lake));opacity:.9;z-index:2}
.news-card-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.news-card-title{font-family:var(--head);font-size:.92rem;font-weight:800;line-height:1.22;color:var(--text)}
.news-card-sum{font-size:.74rem;font-weight:500;line-height:1.4;color:var(--dim);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.news-card-foot{margin-top:auto;font-size:.64rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--dim);opacity:.8}

.news-tag{display:inline-flex;align-items:center;gap:5px;font-size:.62rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--dim)}
.news-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;box-shadow:0 0 6px currentColor}
.news-pin{font-size:.58rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--gold,#d9a441);border:1px solid currentColor;border-radius:99px;padding:1px 7px;opacity:.85}
.news-when{font-size:.64rem;font-weight:700;color:var(--dim);opacity:.85}

/* Full News screen */
#news{padding-bottom:96px}
#news-list{display:flex;flex-direction:column;gap:10px;padding:6px 16px 16px}
.news-list-card{display:flex;align-items:center;gap:12px;padding:14px 14px;border-radius:16px;cursor:pointer;position:relative;overflow:hidden}
.news-list-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--news-accent,var(--lake));opacity:.9;z-index:2}
.news-list-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.news-list-title{font-family:var(--head);font-size:.96rem;font-weight:800;line-height:1.22;color:var(--text)}
.news-list-sum{font-size:.76rem;font-weight:500;line-height:1.42;color:var(--dim)}
.news-chev{font-size:1.4rem;color:var(--dim);opacity:.6;flex-shrink:0}
.news-empty{padding:40px 24px;text-align:center;color:var(--dim);font-size:.8rem;font-weight:500}

/* Article reader */
#news-article{padding:0 0 96px}
.news-art-accent{height:4px;width:100%;background:var(--lake)}
.news-art-wrap{padding:18px 20px 0;max-width:680px;margin:0 auto}
.news-art-back{background:none;border:0;color:var(--lake);font-size:.78rem;font-weight:700;cursor:pointer;padding:6px 0 14px}
.news-art-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
#news-art-title{font-family:var(--head);font-size:1.5rem;font-weight:900;line-height:1.18;color:var(--text);margin:0 0 16px}
.news-art-body p{font-size:.95rem;line-height:1.62;color:var(--text);opacity:.92;margin:0 0 14px}
.news-art-source{margin-top:10px;padding-top:14px;border-top:1px solid var(--border);font-size:.78rem;font-weight:600;color:var(--dim)}
.news-art-source a{color:var(--lake);text-decoration:none;font-weight:700}
.news-art-source a:hover{text-decoration:underline}
@media (max-width:380px){ .news-card{flex-basis:200px} #news-art-title{font-size:1.3rem} }

.tp-comments{margin-top:10px;border-top:1px solid var(--glass-brd);padding-top:9px}
.tp-c-list{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}
.tp-c{display:flex;gap:8px}
.tp-c-av{flex:0 0 auto}
.tp-c-b{flex:1;min-width:0;background:rgba(245,247,251,.04);border-radius:11px;padding:6px 10px}
.tp-c-meta{display:flex;align-items:center;gap:7px}
.tp-c-name{font-weight:700;font-size:.76rem;color:var(--text)}
.tp-c-when{font-size:.66rem;color:var(--dim)}
.tp-c-del{margin-left:auto;background:transparent;border:none;color:var(--dim);font-size:.74rem;cursor:pointer;padding:0 4px}
.tp-c-del:hover{color:var(--rose)}
.tp-c-tx{font-size:.82rem;color:var(--text);line-height:1.45;white-space:pre-wrap;word-break:break-word;margin-top:1px}
.tp-c-composer{display:flex;gap:7px;align-items:flex-end}
.tp-c-composer textarea{flex:1;resize:none;background:rgba(245,247,251,.06);border:1px solid var(--glass-brd);border-radius:12px;padding:7px 11px;color:var(--text);font:inherit;font-size:.82rem;line-height:1.35;max-height:120px;outline:none}
.tp-c-composer textarea:focus{border-color:rgba(101,185,255,.6)}
.tp-c-send{flex:0 0 auto;background:rgba(101,185,255,.16);border:1px solid rgba(101,185,255,.5);color:var(--text);font-weight:700;font-size:.78rem;border-radius:11px;padding:8px 13px;cursor:pointer}
.tp-c-send:active{transform:scale(.96)}

/* compose-post overlay bits */
.vf-opt{font-weight:400;text-transform:none;letter-spacing:0;color:var(--text2)}
.cp-img-preview{width:60px;height:60px;border-radius:13px;flex:0 0 auto;background:rgba(245,247,251,.05);border:1px solid var(--glass-brd);display:flex;align-items:center;justify-content:center;background-size:cover;background-position:center;color:var(--text2)}
.cp-img-preview.has-img{border-color:transparent}
.cp-img-btn{padding:9px 14px;border-radius:10px;border:1px solid var(--border);background:rgba(255,255,255,.05);color:var(--text);font-size:.78rem;font-weight:800;cursor:pointer}
.cp-img-btn:hover{background:rgba(255,255,255,.09)}

/* ── "From your Tribes" home feed ───────────────────────────────────── */
.tribes-feed{margin:6px 0 4px}
.tf-head{display:flex;align-items:center;gap:8px;padding:4px 16px 8px;font-family:var(--head);font-weight:800;font-size:1.08rem;color:var(--text);letter-spacing:.01em}
.tf-head svg{width:20px;height:20px;color:var(--text2)}
.tf-list{display:flex;gap:11px;overflow-x:auto;padding:2px 16px 10px;scrollbar-width:none;cursor:grab}
.tf-list::-webkit-scrollbar{display:none}
.tf-card{flex:0 0 78%;max-width:300px;border:1px solid var(--glass-brd);background:rgba(245,247,251,.04);border-radius:14px;padding:12px 13px;cursor:pointer;transition:background .12s}
.tf-card:hover{background:rgba(245,247,251,.07)}
.tf-top{display:flex;align-items:center;gap:7px;margin-bottom:6px}
.tf-tribe{font-family:var(--head);font-weight:700;font-size:.8rem;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:50%}
.tf-when{margin-left:auto;font-size:.68rem;color:var(--dim);white-space:nowrap}
.tf-snip{font-size:.84rem;color:var(--text);line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.tf-foot{display:flex;align-items:center;gap:8px;margin-top:9px}
.tf-by{font-size:.72rem;color:var(--text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tf-play{margin-left:auto;flex:0 0 30px;width:30px;height:30px;border-radius:50%;border:1px solid rgba(101,185,255,.5);background:rgba(101,185,255,.16);color:var(--text);display:flex;align-items:center;justify-content:center;cursor:pointer}
.tf-play svg{width:14px;height:14px}
.tf-play:active{transform:scale(.94)}

/* ── Notification center (bell panel) ───────────────────────────────── */
.nt-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.nt-markall{background:transparent;border:none;color:var(--blue);font-weight:700;font-size:.76rem;cursor:pointer;padding:4px 6px;border-radius:7px}
.nt-markall:hover{background:rgba(101,185,255,.1)}
.nt-list{display:flex;flex-direction:column;gap:8px;max-height:60vh;overflow-y:auto}
.nt-empty{color:var(--dim);font-size:.84rem;text-align:center;padding:26px 8px}
/* ── Sections are BUTTONS (Notif-S1, V1.752) ────────────────────────────
   The panel opens as a short index — SaintStream, Roles, Messages, Tribes,
   Creators — each with the number of live items on it. Tap one to expand it in
   place. Scrolling a flat list of everything was the old shape; this way the
   category you came for is one tap, and the rest stays quiet. */
.nt-acc{border:1px solid var(--glass-brd);background:rgba(245,247,251,.03);border-radius:13px;overflow:hidden}
.nt-acc.on{border-color:rgba(var(--nsec-rgb,245,247,251),.28)}
.nt-acc-h{display:flex;align-items:center;gap:9px;width:100%;padding:12px 13px;background:transparent;border:0;color:var(--text);text-align:left;cursor:pointer;transition:background .12s}
.nt-acc-h:hover{background:rgba(245,247,251,.05)}
.nt-acc-lbl{flex:1;min-width:0;font-size:.84rem;font-weight:800;line-height:1.2}
/* --nsec-ink is stamped inline only when the section colour is dark enough to
   swallow the usual slate text (royal, the Owner rose). Light colours omit it
   and keep the dark ink. */
.nt-acc-n{
  flex:0 0 auto;min-width:21px;height:21px;border-radius:11px;padding:0 6px;
  display:flex;align-items:center;justify-content:center;
  background:var(--nsec,var(--amber));color:var(--nsec-ink,var(--slate));
  font-size:.66rem;font-weight:900;line-height:1;
}
.nt-acc-caret{flex:0 0 auto;width:15px;height:15px;color:var(--dim);transition:transform .16s ease}
.nt-acc.on .nt-acc-caret{transform:rotate(180deg)}
.nt-acc-body{display:flex;flex-direction:column;gap:6px;padding:0 9px 10px;animation:ntAccIn .16s ease-out}
@keyframes ntAccIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.nt-acc-body{animation:none}}
.nt-row{display:flex;align-items:flex-start;gap:9px;width:100%;text-align:left;border:1px solid var(--glass-brd);background:rgba(245,247,251,.03);border-radius:13px;padding:11px 12px;transition:background .12s;position:relative}
.nt-row:hover{background:rgba(245,247,251,.07)}
/* The row is a container: the text opens it, the box on the right clears it. */
.nt-open{flex:1;min-width:0;display:flex;align-items:flex-start;gap:11px;background:transparent;border:0;padding:0;color:inherit;text-align:left;cursor:pointer;font:inherit}
/* Ticked off — kept, not deleted; "Show cleared" brings these back. */
.nt-row.cleared{opacity:.5}
.nt-row.cleared .nt-title{font-weight:600}
/* The "noted" box. Ticking it is the whole dismissal gesture: read, handled,
   or simply acknowledged. Unticking restores the row. */
.nt-check{
  flex:0 0 auto;width:23px;height:23px;margin-top:5px;border-radius:7px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  background:transparent;border:1.6px solid rgba(255,255,255,.24);
  color:transparent;transition:background .12s,border-color .12s,color .12s;
}
.nt-check svg{width:13px;height:13px}
.nt-check:hover{border-color:var(--nsec,var(--amber));color:rgba(255,255,255,.3)}
.nt-check.on{background:var(--nsec,var(--amber));border-color:var(--nsec,var(--amber));color:var(--nsec-ink,var(--slate))}
.nt-cleared-toggle{
  width:100%;margin-top:10px;padding:9px;border-radius:11px;cursor:pointer;
  background:transparent;border:1px solid var(--glass-brd);
  color:#9aa3b2;font-size:.74rem;font-weight:700;
}
.nt-cleared-toggle:hover{color:var(--text);border-color:rgba(255,255,255,.28)}
/* Unread rows wear their SECTION color (--nsec / --nsec-rgb, stamped inline by
   notifRowHtml from the user's own priority choice) on the edge, the icon tile
   and the dot — the same color the bell flashed on arrival. Falls back to the
   old blue if a row somehow renders without the vars. */
.nt-row.unread{
  background:rgba(var(--nsec-rgb,101,185,255),.07);
  border-color:rgba(var(--nsec-rgb,101,185,255),.34);
  box-shadow:0 0 0 1px rgba(var(--nsec-rgb,101,185,255),.10),0 2px 14px rgba(var(--nsec-rgb,101,185,255),.10);
}
.nt-ic{flex:0 0 34px;width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:rgba(245,247,251,.06);color:var(--text2)}
.nt-ic svg{width:17px;height:17px}
/* Read rows keep a quiet tint of the section color; unread rows go full. */
.nt-row .nt-ic{background:rgba(var(--nsec-rgb,245,247,251),.12);color:var(--nsec,var(--text2))}
.nt-row.unread .nt-ic{background:rgba(var(--nsec-rgb,245,247,251),.20)}
.nt-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.nt-title{font-weight:700;font-size:.84rem;color:var(--text);line-height:1.3}
/* Two lines, not one: a mention's body IS the message, and a single ellipsised
   line made every notification in the app unreadable. */
.nt-body{font-size:.78rem;color:var(--text2);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nt-when{font-size:.68rem;color:var(--dim);margin-top:1px}

/* ── Tribe channels bar (chat) ──────────────────────────────────────── */
.td-chan-bar{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:8px 12px;border-bottom:1px solid var(--glass-brd);background:rgba(245,247,251,.02)}
.chan-chip{appearance:none;border:1px solid var(--glass-brd);background:rgba(245,247,251,.04);color:var(--text2);font-family:var(--head);font-weight:700;font-size:.74rem;padding:5px 11px;border-radius:99px;cursor:pointer;transition:all .12s}
.chan-chip:hover{color:var(--text)}
.chan-chip.on{background:rgba(101,185,255,.16);border-color:rgba(101,185,255,.5);color:var(--text)}
.chan-add{appearance:none;border:1px dashed var(--glass-brd);background:transparent;color:var(--text2);font-size:.9rem;line-height:1;padding:4px 9px;border-radius:99px;cursor:pointer}
.chan-add:hover{color:var(--text);border-color:rgba(101,185,255,.5)}

/* ── Event posts + RSVP ─────────────────────────────────────────────── */
.tp-event{margin-top:10px;border:1px solid var(--glass-brd);border-radius:12px;padding:10px 12px;background:rgba(124,209,142,.05)}
.tp-event-when{display:flex;align-items:center;gap:7px;font-weight:700;font-size:.82rem;color:var(--text);margin-bottom:8px}
.tp-event-when svg{width:15px;height:15px;color:#9fe0b0}
.tp-rsvp-row{display:flex;gap:6px;flex-wrap:wrap}
.tp-rsvp{flex:1;min-width:72px;border:1px solid var(--glass-brd);background:rgba(245,247,251,.04);color:var(--text2);font-family:var(--head);font-weight:700;font-size:.78rem;padding:7px 10px;border-radius:10px;cursor:pointer;transition:all .12s;display:inline-flex;align-items:center;justify-content:center;gap:5px}
.tp-rsvp:hover:not(:disabled){color:var(--text)}
.tp-rsvp:disabled{cursor:default;opacity:.7}
.tp-rsvp.on{color:var(--text)}
.tp-rsvp.on.going{background:rgba(124,209,142,.18);border-color:rgba(124,209,142,.55)}
.tp-rsvp.on.maybe{background:rgba(217,164,65,.18);border-color:rgba(217,164,65,.55)}
.tp-rsvp.on.declined{background:rgba(229,115,115,.16);border-color:rgba(229,115,115,.5)}
.tp-rsvp-n{font-size:.7rem;color:var(--text2)}

/* Placeholder thumb for non-song tribe media with no cover art. */
.sr-thumb-ph{display:flex;align-items:center;justify-content:center;font-family:var(--head);font-weight:800;font-size:1.2rem;color:rgba(255,255,255,.5);background:linear-gradient(150deg,var(--slate),var(--ink))}

/* Posts tab filter chips (All / Newsletter / Events) */
.td-posts-filter{display:flex;gap:6px;padding:4px 14px 0;flex-wrap:wrap}
.td-posts-filter:empty{display:none}
.tpf-chip{appearance:none;border:1px solid var(--glass-brd);background:rgba(245,247,251,.04);color:var(--text2);font-weight:700;font-size:.74rem;padding:5px 12px;border-radius:99px;cursor:pointer;transition:all .12s}
.tpf-chip:hover{color:var(--text)}
.tpf-chip.on{background:rgba(101,185,255,.16);border-color:rgba(101,185,255,.5);color:var(--text)}

/* ── Tribe messaging upgrades (reactions, threads, images, pins) ─────── */
.td-chat-pinned{display:flex;flex-direction:column;gap:2px;padding:7px 12px;background:rgba(217,164,65,.08);border-bottom:1px solid var(--glass-brd)}
.td-pin-row{font-size:.74rem;color:var(--text2);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.td-pin-row:hover{color:var(--text)}
.td-pin-ic{margin-right:4px}
.td-pin-who{font-weight:700;color:var(--text)}

.td-chat-attach{flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:rgba(245,247,251,.06);border:1px solid var(--glass-brd);color:var(--text2);cursor:pointer;display:flex;align-items:center;justify-content:center}
.td-chat-attach:hover{color:var(--text);background:rgba(245,247,251,.1)}
.td-chat-attach svg{width:17px;height:17px}

.td-chat-reply{display:flex;flex-direction:column;gap:4px;padding:7px 12px;border-top:1px solid var(--glass-brd);background:rgba(101,185,255,.06)}
.td-chat-reply .td-reply-in{display:flex;align-items:center;gap:8px;min-width:0}
.td-reply-lbl{font-size:.76rem;color:var(--text2);white-space:nowrap}
.td-reply-tx{font-size:.76rem;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.td-reply-thumb{width:30px;height:30px;border-radius:6px;object-fit:cover;flex:0 0 auto}
.td-reply-x{margin-left:auto;background:transparent;border:none;color:var(--dim);cursor:pointer;font-size:.85rem;padding:2px 6px;flex:0 0 auto}
.td-reply-x:hover{color:var(--rose)}

.td-msg-quote{border-left:2px solid rgba(101,185,255,.6);padding:2px 8px;margin:2px 0 4px;background:rgba(245,247,251,.04);border-radius:4px;cursor:pointer;max-width:100%}
.td-msg-quote .tmq-who{font-weight:700;font-size:.7rem;color:var(--blue);margin-right:6px}
.td-msg-quote .tmq-tx{font-size:.72rem;color:var(--dim)}
.td-msg-img{margin-top:6px;max-width:220px;max-height:240px;border-radius:10px;cursor:pointer;display:block;object-fit:cover}
.td-msg.pinned > .td-msg-body{}
.td-msg-pintag{font-size:.66rem;margin-left:4px}
.td-msg.flash{animation:msgFlash 1.2s ease}
@keyframes msgFlash{0%,100%{background:transparent}30%{background:rgba(101,185,255,.16)}}

.td-msg-acts{display:inline-flex;gap:1px;margin-left:auto;opacity:0;transition:opacity .12s}
.td-msg:hover .td-msg-acts{opacity:1}
.td-msg-act{background:transparent;border:none;color:var(--text2);cursor:pointer;font-size:.78rem;padding:1px 5px;border-radius:6px;line-height:1}
.td-msg-act:hover{background:rgba(245,247,251,.1);color:var(--text)}

.td-rx-row{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px;align-items:center}
.td-rx{display:inline-flex;align-items:center;gap:3px;border:1px solid var(--glass-brd);background:rgba(245,247,251,.05);border-radius:99px;padding:1px 7px;font-size:.82rem;cursor:pointer;line-height:1.5}
.td-rx:hover{background:rgba(245,247,251,.1)}
.td-rx.on{background:rgba(101,185,255,.18);border-color:rgba(101,185,255,.5)}
.td-rx-n{font-size:.66rem;font-weight:700;color:var(--text2)}
.td-rx-add{border:1px dashed var(--glass-brd);background:transparent;color:var(--dim);border-radius:99px;width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:.8rem;opacity:0;transition:opacity .12s}
.td-msg:hover .td-rx-add{opacity:1}
.td-rx-add:hover{color:var(--text);border-color:rgba(101,185,255,.5)}

.chat-react-pop{position:fixed;z-index:9999;display:none;gap:3px;padding:5px 7px;background:var(--slate,#1a1f29);border:1px solid var(--glass-brd);border-radius:99px;box-shadow:0 8px 24px rgba(0,0,0,.4)}
.chat-react-pop button{background:transparent;border:none;font-size:1.15rem;cursor:pointer;padding:2px 4px;border-radius:8px;line-height:1}
.chat-react-pop button:hover{background:rgba(245,247,251,.12)}

/* ═══════════ QUICK ACCESS ═══════════════════════════════════════════
   Fixed launcher grid on Home + its customize sheet. Tiles are neutral
   smoked glass; the destination colour shows only on the icon (accent-
   colour-as-light rule). */
.qa-section{padding:12px 16px 2px}
.qa-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}
.qa-tile{display:flex;flex-direction:column;align-items:center;gap:7px;padding:13px 6px 11px;border-radius:16px;cursor:pointer;text-align:center;border:0}
.qa-tile .qa-ic{width:26px;height:26px;display:flex;align-items:center;justify-content:center;color:var(--qa-accent,var(--lake))}
.qa-tile .qa-ic svg{width:24px;height:24px}
.qa-tile .qa-lbl{font-size:.63rem;font-weight:700;letter-spacing:.005em;line-height:1.18;color:var(--text);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.qa-tile.qa-edit .qa-ic{color:var(--dim)}
.qa-tile.qa-edit .qa-lbl{color:var(--dim)}
@media (max-width:360px){ .qa-grid{gap:7px} .qa-tile{padding:11px 4px 9px} .qa-tile .qa-lbl{font-size:.6rem} }

/* Customize sheet */
.qa-cust-list{margin:14px 0 4px}
.qa-cust-row{display:flex;align-items:center;gap:10px;padding:9px 2px;border-bottom:1px solid var(--border)}
.qa-cust-row[data-cust]{cursor:grab;touch-action:none}
.qa-cust-row.qa-cust-dragging{cursor:grabbing;background:var(--surface,rgba(255,255,255,.05));border-radius:10px;box-shadow:0 8px 22px rgba(0,0,0,.4);opacity:.96;position:relative;z-index:2}
.qa-cust-grip{width:16px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--dim);opacity:.6}
.qa-cust-grip svg{width:16px;height:16px}
.qa-cust-ic{width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.qa-cust-ic svg{width:21px;height:21px}
.qa-cust-lbl{flex:1;min-width:0;font-size:.84rem;font-weight:600;color:var(--text)}
.qa-cust-move{width:30px;height:30px;flex-shrink:0;border:1px solid var(--border);background:var(--surface);color:var(--dim);border-radius:9px;font-size:.95rem;cursor:pointer;line-height:1}
.qa-cust-move:disabled{opacity:.3;cursor:default}
.qa-cust-move:not(:disabled):hover{color:var(--text);border-color:var(--lake)}
.qa-cust-toggle{position:relative;width:40px;height:23px;flex-shrink:0;border-radius:99px;border:0;background:var(--border);cursor:pointer;transition:background .15s}
.qa-cust-toggle.on{background:var(--lake)}
.qa-knob{position:absolute;top:2px;left:2px;width:19px;height:19px;border-radius:50%;background:#fff;transition:transform .15s;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.qa-cust-toggle.on .qa-knob{transform:translateX(17px)}
.qa-sheet-ft{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;padding-top:4px}
.qa-reset-btn{background:none;border:0;color:var(--dim);font-size:.78rem;font-weight:600;cursor:pointer;padding:8px 0}
.qa-reset-btn:hover{color:var(--text)}
.qa-done-btn{background:var(--lake);border:0;color:#fff;font-size:.82rem;font-weight:700;padding:10px 26px;border-radius:99px;cursor:pointer}
.qa-done-btn:hover{filter:brightness(1.06)}

/* ══════════════════════════════════════════════════════════════════════
   LANE MOTION BADGES (V1.366) — per-media-type animated play affordance.
   Listen = play button over sonar rings + equalizer. Watch = play button
   framed by a scrub-arc + breathing viewfinder. Read = blinking eyes whose
   catchlight rolls opposite the pupil, over a self-writing paragraph.
   Tribes = a swaying tree (Tree of Life) with drifting light motes.
   Rendered by motionBadge(key) in catalog.js. Size via --lm on the .lm element.
   ══════════════════════════════════════════════════════════════════════ */
.lm{--lm:72px;position:relative;display:inline-flex;align-items:center;justify-content:center;
  width:var(--lm);height:var(--lm);overflow:visible;vertical-align:middle;line-height:0}
.lm-play{width:100%;height:100%;object-fit:contain;position:relative;z-index:10;
  filter:drop-shadow(0 3px 8px rgba(0,0,0,.5));pointer-events:none}
/* Compact variant for regular-sized grid tiles: the branded mark / motif at a
   small size, static (no expanding motion that would overflow a small card). */
.lm-sm{--lm:36px}
.lm-sm .lm-play{filter:drop-shadow(0 1px 4px rgba(0,0,0,.55))}
.lm-sm .lm-eyes{width:104%}
.lm-sm .lm-tree{width:104%;height:104%}
.lm-sm .lm-eye,.lm-sm .lm-lid,.lm-sm .lm-tree{animation:none}

/* LISTEN */
.lm-sonar{position:absolute;z-index:3;inset:0;margin:auto;width:84%;height:84%;
  border-radius:50%;border:2px solid #65B9FF;opacity:0;animation:lmSonar 2.6s ease-out infinite}
.lm-sonar.s2{animation-delay:.86s}.lm-sonar.s3{animation-delay:1.72s}
@keyframes lmSonar{0%{transform:scale(.92);opacity:.7}80%{opacity:0}100%{transform:scale(1.9);opacity:0}}
.lm-eq{position:absolute;z-index:2;inset:0;margin:auto;
  display:flex;gap:9%;align-items:center;justify-content:center;width:60%;height:104%;opacity:.4}
.lm-eq i{flex:1;border-radius:2px;background:linear-gradient(#9ad4ff,#2b8cff);
  transform-origin:center;animation:lmEq 1s ease-in-out infinite}
.lm-eq i:nth-child(1){height:26%}.lm-eq i:nth-child(2){height:52%;animation-delay:.15s}
.lm-eq i:nth-child(3){height:80%;animation-delay:.3s}.lm-eq i:nth-child(4){height:100%;animation-delay:.1s}
.lm-eq i:nth-child(5){height:80%;animation-delay:.32s}.lm-eq i:nth-child(6){height:52%;animation-delay:.18s}
.lm-eq i:nth-child(7){height:26%;animation-delay:.05s}
@keyframes lmEq{0%,100%{transform:scaleY(.35)}50%{transform:scaleY(1)}}

/* WATCH */
.lm-scrub{position:absolute;z-index:3;top:50%;left:50%;width:130%;height:130%;
  transform:translate(-50%,-50%) rotate(-90deg)}
.lm-scrub-arc{stroke-dasharray:289;stroke-dashoffset:289;animation:lmScrub 3.4s linear infinite}
@keyframes lmScrub{0%{stroke-dashoffset:289}100%{stroke-dashoffset:0}}
.lm-vf{position:absolute;z-index:3;width:20%;height:20%;border:2px solid rgba(182,140,255,.6);
  animation:lmVf 2.8s ease-in-out infinite}
.lm-vf.tl{top:-6%;left:-6%;border-right:0;border-bottom:0}
.lm-vf.tr{top:-6%;right:-6%;border-left:0;border-bottom:0}
.lm-vf.bl{bottom:-6%;left:-6%;border-right:0;border-top:0}
.lm-vf.br{bottom:-6%;right:-6%;border-left:0;border-top:0}
@keyframes lmVf{0%,100%{opacity:.35;transform:scale(1)}50%{opacity:.85;transform:scale(1.12)}}

/* READ — eyes over a self-writing paragraph */
.lm-page{position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%,-50%);
  width:150%;display:flex;flex-direction:column;gap:9%;opacity:.4}
.lm-page i{height:6%;min-height:3px;border-radius:2px;background:#7AD59A;transform-origin:left;
  transform:scaleX(0);animation:lmWrite 4.6s ease-in-out infinite}
.lm-page i:nth-child(2){animation-delay:.28s}.lm-page i:nth-child(3){animation-delay:.56s;width:92%}
.lm-page i:nth-child(4){animation-delay:.84s}.lm-page i:nth-child(5){animation-delay:1.12s;width:80%}
.lm-page i:nth-child(6){animation-delay:1.4s}.lm-page i:nth-child(7){animation-delay:1.68s;width:88%}
.lm-page i:nth-child(8){animation-delay:1.96s;width:55%}
@keyframes lmWrite{0%{transform:scaleX(0)}45%,82%{transform:scaleX(1)}100%{transform:scaleX(0)}}
.lm-eyes{position:relative;z-index:10;width:120%;height:auto;filter:drop-shadow(0 3px 8px rgba(0,0,0,.5))}
.lm-lid{transform-box:fill-box;transform-origin:center;animation:lmLid 5.4s ease-in-out infinite}
@keyframes lmLid{0%,90%,100%{transform:scaleY(1)}95%{transform:scaleY(.02)}}
.lm-eye{transform-box:view-box;animation:lmRoll 4.4s ease-in-out infinite}
.lm-eyeL{transform-origin:48px 70px}.lm-eyeR{transform-origin:102px 70px}
@keyframes lmRoll{
  0%,16%{transform:translateX(0) rotate(0deg)}
  30%,46%{transform:translateX(8px) rotate(-22deg)}
  60%,78%{transform:translateX(-8px) rotate(22deg)}
  92%,100%{transform:translateX(0) rotate(0deg)}}

/* TRIBES — swaying tree (Tree of Life) + drifting light motes */
.lm-tree{position:relative;z-index:8;width:116%;height:116%;
  transform-origin:50% 96%;animation:lmSway 5.2s ease-in-out infinite;
  filter:drop-shadow(0 3px 8px rgba(0,0,0,.5))}
.lm-canopy{transform-box:view-box;transform-origin:50px 60px;animation:lmCanopy 5.2s ease-in-out infinite}
@keyframes lmSway{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}
@keyframes lmCanopy{0%,100%{transform:rotate(2deg)}50%{transform:rotate(-2deg)}}
.lm-mote{position:absolute;z-index:2;top:34%;left:50%;width:7%;height:7%;border-radius:50%;
  background:radial-gradient(circle at 35% 30%,#f7ddc0,#e9858f);
  filter:blur(.3px);opacity:0;animation:lmMote 4.4s ease-out infinite}
.lm-mote.s2{animation-delay:1.1s}.lm-mote.s3{animation-delay:2.2s}.lm-mote.s4{animation-delay:3.3s}
@keyframes lmMote{
  0%{transform:translate(-50%,0) scale(.5);opacity:0}
  20%{opacity:.85}
  60%{transform:translate(calc(-50% - 10px),-120%) scale(1);opacity:.6}
  100%{transform:translate(calc(-50% + 12px),-230%) scale(.4);opacity:0}}

@media (prefers-reduced-motion:reduce){
  .lm-sonar,.lm-eq i,.lm-scrub-arc,.lm-vf,.lm-page i,.lm-eye,.lm-lid,.lm-mote,.lm-tree,.lm-canopy{animation:none}
  .lm-page i{transform:scaleX(1)}
}

/* ── Branded transport play buttons + Tribes format icon (V1.372) ──────────
   The transparent motion-badge play mark replaces the triangle glyph on the transport
   controls; the clashing colored discs are dropped (the mark carries its own
   ring). Pause icons are enlarged so they read cleanly without a disc. */
.lm-tp{object-fit:contain;display:block}
.play-wrap{background:none;border:none;box-shadow:none}
.play-wrap::before{display:none}
.play-wrap .play-g.lm-tp{width:74px;height:74px;margin:0}
.play-wrap .pause-g{width:44px;height:44px}
.np-play{background:none}
.np-play::before{display:none}
.np-play::after{opacity:.22}
.np-play .lm-tp{width:72px;height:72px}
.np-play #np-icon-pause{width:40px;height:40px}
#mini-play{background:none}
#mini-play .play-g.lm-tp{width:40px;height:40px}
#mini-play .pause-g{width:26px;height:26px}
.lbi-tribes .lm{--lm:30px}
/* Animated format-launcher icons (V1.419): the full format motif at button size.
   The 62px format-btn clips (overflow:hidden), so expanding rings fade at its
   edge instead of spilling over neighboring tiles. */
.lm-icon{--lm:30px}
.format-btn .lbi{display:flex;align-items:center;justify-content:center}

/* ── WAVE LAB (dev tool) — live tuning card for the wave-line background ── */
#wavelab-panel{
  position:fixed;right:14px;bottom:calc(var(--nav-h) + 24px);z-index:9000;
  width:290px;max-height:calc(100vh - var(--nav-h) - 48px);overflow-y:auto;
  background:rgba(13,17,24,.92);
  -webkit-backdrop-filter:blur(18px) saturate(1.2);backdrop-filter:blur(18px) saturate(1.2);
  border:1px solid rgba(245,247,251,.14);border-radius:16px;
  box-shadow:0 18px 44px rgba(0,0,0,.5);
  padding:12px 14px 14px;display:none;
}
#wavelab-panel.on{display:block}
#wavelab-panel .wl-head{display:flex;align-items:center;justify-content:space-between;
  font-family:var(--head);font-weight:800;font-size:.95rem;color:var(--text);margin-bottom:4px}
#wavelab-panel .wl-x{background:rgba(255,255,255,.08);border:none;border-radius:50%;
  width:24px;height:24px;color:var(--text2);cursor:pointer;font-size:.7rem}
#wavelab-panel .wl-note{font-size:.66rem;color:var(--dim);line-height:1.45;margin-bottom:8px}
#wavelab-panel .wl-sec{font-size:.62rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;
  color:var(--gold,#D9A441);margin:10px 0 4px}
#wavelab-panel .wl-row{display:grid;grid-template-columns:74px 1fr 52px;align-items:center;gap:8px;margin:5px 0}
#wavelab-panel .wl-lbl{font-size:.68rem;font-weight:600;color:var(--text2)}
#wavelab-panel .wl-val{font-size:.64rem;color:var(--text);text-align:right;font-variant-numeric:tabular-nums}
#wavelab-panel input[type=range]{width:100%;accent-color:var(--gold,#D9A441);height:18px}
#wavelab-panel .wl-actions{display:flex;gap:8px;margin-top:12px}
#wavelab-panel .wl-btn{flex:1;padding:8px 0;border-radius:10px;border:1px solid rgba(245,247,251,.14);
  background:rgba(255,255,255,.06);color:var(--text);font-weight:700;font-size:.74rem;cursor:pointer}
#wavelab-panel .wl-btn:hover{background:rgba(255,255,255,.1)}
#wavelab-panel .wl-btn-primary{background:var(--blue);border-color:var(--blue);color:#fff;flex:1 1 100%;margin-top:2px}
#wavelab-panel .wl-btn-primary:hover{filter:brightness(1.08);background:var(--blue)}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET/DESKTOP  (plan: docs/responsive-plan.md)
   Phase 1 · containment. Additive only — phone (<768px) is byte-identical.
   The whole shell shares one width token: body + every fixed overlay that
   was hard-clamped to 480px now follows --shellW (still 480px on phone).
   ═══════════════════════════════════════════════════════════════════════ */
:root{ --shellW:480px }

/* ── Canonical surface tokens (Housekeeping-S1) ────────────────────────────
   ONE width, radius, and material for every tile, row, box, pill, and menu
   button so surfaces line up and read as one family. Sessions: reference
   these instead of hand-rolling inset margins / border-radii. */
:root{
  --tile-inset:16px;                  /* left+right margin: everything aligns vertically */
  --tile-gap:8px;                     /* vertical gap between stacked tiles */
  --r-tile:14px;                      /* tiles, rows, cards, text boxes */
  --r-pill:999px;                     /* segmented toggles / pills */
  --r-btn:10px;                       /* small buttons */
  --tile-bg:var(--tile-solid,#161c26);       /* shared glass fill (the canonical opacity) */
  --tile-brd:rgba(245,247,251,.42);   /* shared hairline ring color */
  --field-bg:#1b2230;                 /* opaque text-input fill (matches the <select> dropdown) */
  --field-bg-hi:#232f43;              /* opaque field fill on focus */
  --panel-bg:#151b27;                 /* opaque surface for text-heavy tiles/panels over the wave field */
}
body,
#auth,
#now-playing,
.ai-panel,
.modal-veil,
.cc-overlay{ max-width:var(--shellW) }

/* ── Premium-site layout: full-width shell, centered content column ─────────
   The shell + scroll area fill the WHOLE window so wheel, middle-click
   autoscroll, click-drag and touch all work in the side margins (no dead
   gutters). The CONTENT stays in a centered column capped at --shellW, so
   tiles keep exactly the width they had (like Amazon / Audible: extended
   header, restricted content). max(0px, …) leaves phones + narrow windows
   byte-identical (the column already fills them). Overlays/dialogs keep their
   own --shellW max-width from the rule above; the desktop FAB / Sam drawer /
   lyrics-pane docking still reads --shellW, so it hugs the CONTENT column edge
   as before. (Robert-directed, 2026-07-08.) */
body{ max-width:none }
.screen{
  padding-left:  max(0px, calc((100% - var(--shellW)) / 2));
  padding-right: max(0px, calc((100% - var(--shellW)) / 2));
}

@media (min-width:768px){
  :root{ --shellW:min(760px,92vw) }

  /* the atmosphere light-field escapes the shell and fills the window */
  #atmosphere{ position:fixed; inset:0; width:100vw; max-width:none }

  /* the column reads as an intentional surface floating on the light field */
  body{ box-shadow:0 0 0 1px rgba(245,247,251,.06), 0 0 90px rgba(0,0,0,.6) }

  /* bottom sheets become centered dialogs (extends the .cc-overlay 540px
     pattern to every sheet family) */
  #give-sheet,#np-sheet,.fm-sheet-bg,.modal-veil{ align-items:center }
  .gs-card,.np-card{ border-radius:22px; border-bottom:1px solid var(--glass-brd,rgba(255,255,255,.12)) }
  .fm-sheet,.modal-sheet{ border-radius:18px }
  .modal-sheet{ max-width:480px }

  /* FAB hugs the shell edge instead of drifting to the window edge */
  #guide-fab.on{ left:calc(50vw - var(--shellW)/2 + 14px) }
}

/* ── Phase 2 · tablet density + pointer affordances ─────────────────────── */
@media (min-width:768px){
  /* Quick Access launchers fit one row in the wide shell */
  .qa-grid{ grid-template-columns:repeat(auto-fit,minmax(92px,1fr)) }
  /* shelf tiles scale up with the column */
  .shelf-featured,.shelf-explore,.shelf-tiles,.shelf{ --tileH:210px; --artH:164px }
}
/* mouse/trackpad only — tiles lift on hover (transform only: the glass rims
   live in box-shadow and filter would re-rasterize the frosted layers) */
@media (hover:hover) and (pointer:fine){
  .stile:hover,.pl-card:hover,.v6tribe:hover,.feat-hero:hover,.news-card:hover{ transform:translateY(-3px) }
  .song-row:hover{ transform:translateY(-1px) }
  .qa-tile:hover{ transform:translateY(-2px) }
}

/* ── Phase 3 · desktop shell (≥1100) — bottom-locked nav ──────────────────
   The nav stays LOCKED to the bottom of the screen on every size (Robert,
   2026-07-03 — the earlier left-rail experiment read as detached). Same phone
   pill, widened so the desktop-only "your stuff" items fit; the mini player
   keeps its phone card treatment floating just above it. */
@media (min-width:1100px){
  :root{ --shellW:min(1040px,94vw) }

  /* nav keeps its base 448px centered pill — the desktop "your stuff" extras
     that once widened it to 640px were removed (they live in Quick Access). */

  /* Keep Now Playing floating ABOVE the bottom-locked nav on desktop too, same
     as phone — an earlier bottom:0 stretched the frosted panel over the nav and
     hid it. NP inherits the base bottom clearance so the nav stays visible. */

  /* ── slice B · two-pane Now Playing ──
     Lyrics dock as the right pane beside the art instead of covering it;
     Now Playing's own content shifts into the left half while they're open. */
  body:has(#now-playing.on) #np-lyrics{
    left:50vw; right:auto; width:calc(var(--shellW)/2); max-width:none;
    top:0; bottom:calc(var(--nav-h) + 16px + env(safe-area-inset-bottom,0px));
    margin:0; border-radius:0;
    border-left:1px solid rgba(245,247,251,.09);
  }
  body:has(#np-lyrics.on) #now-playing{ padding-right:calc(var(--shellW)/2) }

  /* Sam docks as a right-side drawer instead of a centered takeover */
  #guide-panel{
    left:auto; right:calc(50vw - var(--shellW)/2); margin:0;
    width:440px; max-width:440px;
    border-left:1px solid rgba(245,247,251,.1);
  }

}
/* slice C · Playlists / Liked / Library are NOT in the bottom nav — they live
   in Quick Access, so the desktop nav no longer duplicates them (Robert
   2026-07-08). Kept in the DOM but never shown at any width. */
.nb-desk,.nb-desk-sep{ display:none }

/* ── Desktop Featured & New — split layout (Robert, 2026-07-03) ───────────
   On large formats the hero takes half the shelf and the New releases stack
   in a vertically-scrolling column on its right (row cards: art left, meta
   right). Phone/tablet keep the stacked hero + horizontal shelf. */
@media (min-width:1100px){
  .featured-new-section{ flex-wrap:nowrap; align-items:stretch }
  .featured-hero-section{ flex:0 0 48%; min-width:0 }
  .new-shelf-section{ flex:1 1 0; min-width:0; display:flex; flex-direction:column }
  .new-shelf-section .nb-head{ margin:0 0 8px; flex:0 0 auto }
  .new-shelf-section .shelf-sam{
    flex:1 1 0; min-height:0; flex-direction:column; overflow-x:hidden; overflow-y:auto;
    gap:8px; padding:2px 6px 2px 2px; scroll-snap-type:none;
    scrollbar-width:thin; scrollbar-color:rgba(245,247,251,.18) transparent;
  }
  .new-shelf-section .shelf-sam::-webkit-scrollbar{ display:block; width:5px }
  .new-shelf-section .shelf-sam::-webkit-scrollbar-thumb{ background:rgba(245,247,251,.18); border-radius:99px }
  .new-shelf-section .sam-tile{
    flex:0 0 auto; width:auto; flex-direction:row; align-items:center;
    gap:11px; padding:8px; scroll-snap-align:none;
  }
  .new-shelf-section .sam-tile .zt-art{ width:62px; flex-shrink:0 }
  .new-shelf-section .sam-tile .zt-meta{ flex:1; min-width:0 }
  .new-shelf-section .sam-tile .nt-play{ width:24px; height:24px; right:4px; bottom:4px }
  /* keep the badge inside its shrunk 24px corner box (base .lm is 36px) */
  .new-shelf-section .sam-tile .nt-play .lm{ --lm:24px }
}

/* ── Share a song into a tribe ──────────────────────────────────────── */
#td-media-share{padding:2px 14px 8px}
.td-share-btn{display:inline-flex;align-items:center;gap:6px;border:1px dashed var(--glass-brd);background:rgba(245,247,251,.04);color:var(--text);font-family:var(--head);font-weight:700;font-size:.8rem;padding:8px 14px;border-radius:11px;cursor:pointer;transition:all .12s}
.td-share-btn:hover{background:rgba(245,247,251,.08);border-color:rgba(101,185,255,.5)}
.share-song-results{display:flex;flex-direction:column;gap:6px;max-height:52vh;overflow-y:auto}
.ss-row{display:flex;align-items:center;gap:10px;padding:6px;border:1px solid var(--glass-brd);border-radius:11px;background:rgba(245,247,251,.03)}
.ss-thumb{width:42px;height:42px;border-radius:8px;object-fit:cover;flex:0 0 auto;background:var(--slate)}
.ss-meta{flex:1;min-width:0}
.ss-t{font-weight:700;font-size:.84rem;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ss-a{font-size:.74rem;color:var(--text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ss-share{flex:0 0 auto;border:1px solid rgba(101,185,255,.5);background:rgba(101,185,255,.16);color:var(--text);font-weight:700;font-size:.76rem;border-radius:9px;padding:7px 14px;cursor:pointer}
.ss-share:active{transform:scale(.96)}

/* ── Tribe "Upload" chooser (Photo / Media) + photo-share preview ───── */
.tum-opt{display:flex;align-items:center;gap:13px;width:100%;text-align:left;padding:13px 14px;margin-top:10px;border-radius:14px;border:1px solid var(--border);background:rgba(255,255,255,.04);color:var(--text);cursor:pointer;transition:background .15s}
.tum-opt:hover{background:rgba(255,255,255,.08)}
.tum-opt:active{transform:scale(.99)}
.tum-ic{flex:0 0 auto;width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--blue),var(--lake))}
.tum-ic svg{width:22px;height:22px;color:#fff}
.tum-tx{display:flex;flex-direction:column;min-width:0}
.tum-t{font-weight:800;font-size:.95rem;line-height:1.2}
.tum-s{font-size:.75rem;color:var(--text2);margin-top:2px}
.cp-photo-preview{width:100%;height:200px;border-radius:14px;border:1px solid var(--border);background:rgba(255,255,255,.05) center/cover no-repeat;margin-bottom:2px}


/* -- Opaque text fields (Housekeeping-S1) ----------------------------------
   Text-entry boxes sit over the animated wave field, so they take an OPAQUE
   fill instead of a translucent tint; otherwise the moving lines show through
   and hurt readability. background-COLOR only, so <select> chevron images
   survive and shape/size stays per-component. Later-in-file wins the tie with
   each field own class rule. (.form-field-light already uses var(--surface),
   so it is intentionally excluded.) */
.form-field, .search-input,
.vf-row input, .vf-row textarea, .vf-row select,
.ebooks-toolbar select, .ga-select, .g-picker select,
.qa-input, .tribe-search-input, .find-tribe-tile .ftt-input,
.ced-fld input, .ced-fld select, .ced-fld textarea,
.td-chat-composer textarea, .tp-c-composer textarea{
  background-color:var(--field-bg);
}
.form-field:focus, .td-chat-composer textarea:focus, .tp-c-composer textarea:focus{
  background-color:var(--field-bg-hi);
}

/* ── Sam's guided tour (interactive coach-marks) — engine: js/onboarding/guidedtour.js ──
   The overlay is pointer-events:none so a click in the spotlight hole reaches the
   real element beneath; only the blockers, scrim, and bubble re-enable events. */
#gt{ position:fixed; inset:0; z-index:10040; display:none; pointer-events:none; }
#gt.on{ display:block; }
body.gt-open{ overflow:hidden; }
.gt-scrim{ position:fixed; inset:0; display:none; pointer-events:auto;
  background:rgba(6,8,14,.74); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); }
.gt-hole{ position:fixed; display:none; border-radius:14px; border:2px solid rgba(217,178,74,.95);
  box-shadow:0 0 0 100vmax rgba(6,8,14,.74), 0 0 22px 4px rgba(217,178,74,.45);
  pointer-events:none;
  transition:left .32s cubic-bezier(.4,0,.2,1), top .32s cubic-bezier(.4,0,.2,1), width .32s cubic-bezier(.4,0,.2,1), height .32s cubic-bezier(.4,0,.2,1); }
.gt-hole.pulse{ animation:gtPulse .5s ease; }
@keyframes gtPulse{
  0%,100%{ box-shadow:0 0 0 100vmax rgba(6,8,14,.74), 0 0 22px 4px rgba(217,178,74,.45); }
  50%    { box-shadow:0 0 0 100vmax rgba(6,8,14,.74), 0 0 30px 9px rgba(217,178,74,.9); } }
.gt-block{ position:fixed; display:none; background:transparent; pointer-events:auto; }
.gt-bubble{ position:fixed; display:none; width:340px; max-width:calc(100vw - 24px); pointer-events:auto;
  background:rgba(16,19,28,.98); border:1px solid rgba(255,255,255,.12); border-radius:16px;
  padding:16px 16px 12px; box-shadow:0 24px 60px rgba(0,0,0,.55); color:#fff;
  transition:left .3s cubic-bezier(.4,0,.2,1), top .3s cubic-bezier(.4,0,.2,1); }
.gt-arrow{ position:absolute; width:14px; height:14px; background:rgba(16,19,28,.98);
  transform:rotate(45deg); border:1px solid rgba(255,255,255,.12); }
.gt-arrow.up{ top:-8px; border-right:none; border-bottom:none; }
.gt-arrow.down{ bottom:-8px; border-left:none; border-top:none; }
.gt-arrow.hidden{ display:none; }
/* Tour-S1 (V1.584): sizes stepped up for tech-challenged / older eyes — bigger
   body copy, and a big obvious thumb-sized primary button. */
.gt-title{ font-size:1.18rem; font-weight:800; margin-bottom:7px; }
.gt-body{ font-size:1.02rem; line-height:1.55; color:#e7eaf1; }
.gt-foot{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:16px; }
.gt-skip{ background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18); color:#cfd6e4; border-radius:999px; padding:9px 14px; font-weight:700; font-size:.86rem; cursor:pointer; min-height:40px; }
.gt-skip:hover{ background:rgba(255,255,255,.14); }
.gt-dots{ display:flex; gap:6px; }
.gt-dots .d{ width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,.22); }
.gt-dots .d.on{ background:var(--gold,#d9b24a); transform:scale(1.2); }
.gt-navbtns{ display:flex; align-items:center; gap:6px; }
.gt-back{ background:none; border:0; color:rgba(255,255,255,.75); font-size:1.5rem; line-height:1; cursor:pointer; width:44px; height:44px; }
.gt-next{ background:var(--gold,#d9b24a); color:#1a1205; border:0; border-radius:12px; font-weight:800; font-size:1.02rem; padding:12px 22px; min-height:46px; cursor:pointer; }
.gt-next:active{ transform:scale(.97); }
/* Way-back teaching + guided next-tour path — shown on a tour's last step. */
.gt-nextrow{ display:none; margin-top:12px; }
.gt-nextrow.on{ display:block; }
.gt-nextbtn{ display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%;
  background:rgba(101,185,255,.14); border:1px solid rgba(101,185,255,.4); color:#dcebff;
  border-radius:12px; padding:12px 15px; font-weight:700; font-size:.98rem; cursor:pointer; min-height:46px; text-align:left; }
.gt-nextbtn:active{ transform:scale(.98); }
.gt-nextbtn .gt-nextchev{ font-size:1.25rem; opacity:.8; }
.gt-wayback{ margin-top:11px; font-size:.86rem; line-height:1.4; color:rgba(255,255,255,.62); }
.gt-bubble .gt-title{ padding-right:110px; }   /* clear the rewind + play + mute toggles in the corner */
/* Rewind 5s — sits left of the play/pause toggle. */
.gt-rewind{ position:absolute; top:11px; right:86px; width:38px; height:38px; padding:0; display:flex; align-items:center; justify-content:center; background:none; border:0; color:rgba(255,255,255,.6); cursor:pointer; }
.gt-rewind:hover{ color:rgba(255,255,255,.9); }
.gt-rewind svg{ width:20px; height:20px; display:block; }
/* "5" nested inside the circular arrow — pinned to the arc's optical centre. */
.gt-rewind .gt-rewind-n{ position:absolute; top:50%; left:50%; transform:translate(-50%,-42%); font-size:.6rem; font-weight:800; line-height:1; pointer-events:none; }
/* Play/pause narration — sits just left of the speaker toggle. */
.gt-playpause{ position:absolute; top:11px; right:48px; width:38px; height:38px; padding:0; display:flex; align-items:center; justify-content:center; background:none; border:0; color:rgba(255,255,255,.6); cursor:pointer; }
.gt-playpause:hover{ color:rgba(255,255,255,.9); }
.gt-playpause svg{ width:20px; height:20px; display:block; }
.gt-playpause .gt-pp-play{ display:none; }
.gt-playpause.paused .gt-pp-pause{ display:none; }
.gt-playpause.paused .gt-pp-play{ display:block; }
.gt-mute{ position:absolute; top:11px; right:10px; width:38px; height:38px; padding:0; display:flex; align-items:center; justify-content:center; background:none; border:0; color:rgba(255,255,255,.6); cursor:pointer; }
.gt-mute:hover{ color:rgba(255,255,255,.9); }
.gt-mute svg{ width:20px; height:20px; display:block; }
/* One-time "you can quiet me" hint on the very first step. */
.gt-mutehint{ position:absolute; top:52px; right:8px; background:#d9b24a; color:#1a1205; font-size:.76rem;
  font-weight:800; padding:5px 9px; border-radius:8px; box-shadow:0 6px 18px rgba(0,0,0,.4); display:none; white-space:nowrap; }
.gt-mutehint::after{ content:''; position:absolute; top:-5px; right:14px; width:9px; height:9px; background:#d9b24a; transform:rotate(45deg); }
.gt-mutehint.on{ display:block; }
.gt-mute .gt-mute-off{ display:none; }
.gt-mute.off{ color:rgba(255,255,255,.4); }
.gt-mute.off .gt-mute-on{ display:none; }
.gt-mute.off .gt-mute-off{ display:block; }
/* Phones: the full narration body can grow into a wall of text that buries the
   spotlight it's pointing at. Keep the bubble compact — show just the first line
   of dialog (the voice reads the rest), so the tour target stays visible. */
@media (max-width:640px){
  .gt-body{ display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical;
    overflow:hidden; text-overflow:ellipsis; }
}
/* ═══════ QUICK ACCESS rearrange / edit mode (QuickAccess-S1, V1.533) ═══════
   Reordering is an explicit MODE, entered from the Customize sheet's first row.
   In edit mode tiles jiggle, the page below is scrim-locked, and a big round
   pulsing Done button floats just under the grid. Any tile drags freely (a
   fixed ghost clone follows the pointer; the source dims). */
.qa-tile{ -webkit-user-select:none; user-select:none; -webkit-touch-callout:none }
.qa-tile.qa-drag-src{ opacity:.35 }
.qa-ghost{
  position:fixed; z-index:12001; margin:0; pointer-events:none; opacity:.95;
  transform-origin:center; border-radius:16px; animation:none !important;
  box-shadow:0 12px 32px rgba(0,0,0,.55), 0 0 0 1px rgba(245,247,251,.10);
}

/* Body-level overlay: sits ABOVE the bottom nav (z-index:100) so Done is never
   buried, and anchors the grid to the TOP of the screen (flex column). The real
   grid is MOVED in here in edit mode, so #home's stacking trap doesn't apply. */
#qa-edit-overlay{
  position:fixed; inset:0; z-index:12000;
  display:flex; flex-direction:column; align-items:stretch;
  padding:max(14px,env(safe-area-inset-top,0px)) 12px calc(24px + env(safe-area-inset-bottom,0px));
  background:rgba(4,8,16,.66);
  -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);
  opacity:0; pointer-events:none; transition:opacity .2s ease;
  overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y;
}
#qa-edit-overlay.on{ opacity:1; pointer-events:auto; }
#qa-edit-inner{ width:100%; max-width:var(--shellW,760px); margin:0 auto; }
/* The moved grid drops any inline stacking styles — it's plainly at the top. */
#qa-edit-overlay #v6-quickaccess{ position:static; z-index:auto; }
/* Tiles take the whole gesture during a drag (no iOS edge-swipe / scroll
   stealing the leftward drag), so column 0 is reachable. */
.qa-editing .qa-tile[data-qa]{ touch-action:none; }

/* Jiggle — staggered so tiles don't wobble in lockstep. */
.qa-editing .qa-tile[data-qa]{ animation:qa-jiggle .32s ease-in-out infinite; }
.qa-editing .qa-tile[data-qa]:nth-child(2n){ animation-delay:-.16s; }
.qa-editing .qa-tile[data-qa]:nth-child(3n){ animation-delay:-.08s; }
.qa-editing .qa-tile.qa-drag-src{ animation:none; }
@keyframes qa-jiggle{
  0%{ transform:rotate(-1.3deg) }
  50%{ transform:rotate(1.3deg) }
  100%{ transform:rotate(-1.3deg) }
}
@media (prefers-reduced-motion:reduce){ .qa-editing .qa-tile[data-qa]{ animation:none } }

/* Big round pulsing Done button — now in-flow beneath the grid, centered. */
.qa-edit-done{
  flex:0 0 auto; align-self:center; margin:26px auto 0; transform:scale(.9);
  width:112px; height:112px; border-radius:50%; border:0; cursor:pointer;
  color:#fff; font:800 1rem/1 'Montserrat',system-ui,sans-serif; letter-spacing:.02em;
  background:linear-gradient(150deg,#65B9FF,#7F77DD 60%,#E9858F);
  box-shadow:0 10px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(245,247,251,.16);
  transition:transform .18s ease;
  display:flex; align-items:center; justify-content:center;
  animation:qa-done-pulse 1.8s ease-in-out infinite;
}
#qa-edit-overlay.on .qa-edit-done{ transform:scale(1); }
.qa-edit-done:active{ transform:scale(.94); }
@keyframes qa-done-pulse{
  0%,100%{ box-shadow:0 10px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(245,247,251,.16), 0 0 0 0 rgba(101,185,255,.5); }
  50%{ box-shadow:0 10px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(245,247,251,.16), 0 0 0 16px rgba(101,185,255,0); }
}

/* Customize sheet — the Rearrange switch row (first item). */
.qa-cust-rearrange{ border-bottom:1px solid rgba(245,247,251,.10); padding-bottom:12px; margin-bottom:6px; }
.qa-cust-rearrange .qa-cust-ic{ color:var(--lake,#65B9FF); }
.qa-cust-rearrange .qa-cust-lbl{ display:flex; flex-direction:column; gap:2px; }
.qa-cust-rearrange .qa-cust-lbl small{ font-size:.72rem; font-weight:500; color:var(--dim); }

/* ═══════════════════════════════════════════════════════════════════════
   PHASE 5A — STREAMING-WIDTH LAYOUT (docs/responsive-plan.md · Phase 5)
   Browse/discovery screens use the window like Netflix/Prime; reading
   screens keep the capped column (Audible pattern). Housekeeping-S2,
   Robert-directed 2026-07-09. Phone (<768px) byte-identical: --browse-pad
   is 0 at base, so --browse-gutter collapses to 0 and nothing here fires.
   ═══════════════════════════════════════════════════════════════════════ */
:root{
  --browse-max:1920px;                 /* ultra-wide cap — content centers beyond this */
  --browse-pad:0px;                    /* side gutter; set >0 only at ≥768px */
  /* Where wide (browse) content starts, from the window edge. */
  --browse-gutter:max(var(--browse-pad), calc((100vw - var(--browse-max)) / 2));
  --read-col:680px;                    /* reserved: text-measure cap for reader/lyrics polish (5B) */
}

@media (min-width:768px){
  :root{ --browse-pad:clamp(20px, 3vw, 56px) }   /* Netflix-style breathing gutter */

  /* THE WIDE PILE — rail/grid discovery surfaces. These override the base
     .screen --shellW centering (id beats class) and instead pad by the browse
     gutter, capped at --browse-max. Reading/detail/admin screens keep the
     centered --shellW column untouched. Row-based screens (browse, tribes,
     news, playlists, liked, free) join in 5B once their layouts get real
     grid treatment — widening rows without that looks stretched. */
  #home, #listen, #featured,
  #watch, #soundscapes, #listencat,
  #audiobooks, #ebooks, #serials, #podcasts,
  #metagrid{
    padding-left:var(--browse-gutter);
    padding-right:var(--browse-gutter);
  }

  /* Format grids go fluid so width = more tiles, never 2 giant ones. Tiles
     scale 200px→~1fr, columns drop in/out on resize (the Netflix behavior).
     Per-format min/max + aspect tuning is 5B; 200px is the safe universal min. */
  .ab-grid{ grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)) }

  /* Chrome follows the BROWSE edge so header controls, menus and FABs read
     as part of the wide canvas (they previously hugged the --shellW column). */
  #hdr{ --hdr-gutter:var(--browse-gutter) }
  #mainmenu-panel{ left:calc(var(--browse-gutter) + 8px) }
  #guide-fab.on{ left:calc(var(--browse-gutter) + 14px) }
}

@media (min-width:1100px){
  /* Sam's desktop drawer docks at the browse edge instead of the 1040 column. */
  #guide-panel{ right:var(--browse-gutter) }
}

/* ── PLAYLISTS — Spotify-pattern tiles + detail header ─────────────────────
   (Robert 2026-07-09, per his Spotify reference screenshot.) Level 1: the
   My Playlists page is a grid of square art tiles (custom cover or the
   4-song mosaic) with name + count beneath. Level 2: tapping a tile opens
   the playlist page — art + title header above, song rows beneath (that
   structure already existed; it scales up Spotify-size on wide screens). */
.pl-tilegrid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
  gap:14px; padding:6px var(--tile-inset) 24px;
}
.pl-tile{
  cursor:pointer; padding:10px; border-radius:var(--r-tile);
  background:var(--tile-bg); border:1px solid rgba(245,247,251,.08);
  transition:transform .12s, background .15s;
}
.pl-tile:active{ transform:scale(.97) }
.pl-tile-art{
  width:100%; aspect-ratio:1; border-radius:10px; overflow:hidden;
  display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr;
  background:#10151e; margin-bottom:9px;
  box-shadow:0 6px 18px rgba(0,0,0,.30);
}
.pl-tile-art img{ width:100%; height:100%; object-fit:contain; display:block; background:#10151e }
/* one image (custom cover, or a 1-song mosaic) fills the whole square */
.pl-tile-art img:only-child, .pl-tile-art .pl-cover-fb{ grid-column:1/-1; grid-row:1/-1 }
.pl-tile-art .pl-cover-fb{ display:flex; align-items:center; justify-content:center; color:var(--dim); background:var(--cloud) }
.pl-tile-name{ font-size:.85rem; font-weight:800; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.pl-tile-meta{ font-size:.66rem; font-weight:500; color:var(--dim); margin-top:2px }
/* the detail header's single custom cover fills its square too */
.pl-detail-cover img:only-child{ grid-column:1/-1; grid-row:1/-1 }

@media (min-width:768px){
  /* playlists join the wide (browse) pile */
  #playlists, #playlist-detail, #liked{
    padding-left:var(--browse-gutter); padding-right:var(--browse-gutter);
  }
  /* create-playlist row shrinks to a pill instead of a window-wide bar */
  .pl-create-row{ width:fit-content; padding-right:26px }
  /* Spotify-scale detail header: big art, big name */
  .pl-detail-hero{ padding:34px 16px 22px; gap:24px }
  .pl-detail-cover{ width:180px; height:180px; border-radius:16px }
  .pl-detail-name{ font-size:2.2rem }
  .pl-detail-meta{ font-size:.78rem }
}
@media (hover:hover) and (pointer:fine){
  .pl-tile:hover{ transform:translateY(-3px); background:rgba(24,32,45,.60) }
}

/* ── PHASE 5B · per-format tile shapes (Robert 2026-07-09, "keep going") ─────
   Each format's tiles take the shape of their real art on wide screens:
   video stills are 16:9, book covers are portrait 2:3, music/podcast art
   stays square. Contain-fit throughout (never-crop rule); phone untouched. */
@media (min-width:768px){
  /* Watch: wider footprint + true video shape (fallback play-icon tile
     centers fine in the 16:9 box) */
  #watch-grid{ grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)) }
  #watch-grid .ab-cover{ aspect-ratio:16/9 }
  /* E-books: narrower footprint + portrait book shape (the no-cover fallback
     tile is a flex column and just gets taller) */
  #ebooks-grid{ grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)) }
  #ebooks-grid .ab-cover{ aspect-ratio:2/3 }
  /* Audiobooks / podcasts / soundscapes / serials keep square art (Audible /
     podcast convention) via the .ab-grid default. */
}
@media (min-width:1440px){
  /* Home / featured shelves scale up on big monitors (Phase 2 set 210/164
     at >=768; this is the next density step for the wide canvas). */
  .shelf-featured,.shelf-explore,.shelf-tiles,.shelf{ --tileH:240px; --artH:190px }
}

/* ── PHASE 5B · BROWSE — song rows become a card grid (Housekeeping-S3) ────
   Same tile language as the V1.540 playlist grid: neutral smoked-glass card,
   square contain-fit art (never-crop), name/artist/meta beneath. Select mode
   overlays a check on the art; the card body still toggles the pick. */
#browse-list{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
  gap:14px; padding:6px 16px 24px 4px;
}
/* Browse-S1 step 4: Discovery Rows mode (no filter active) stacks .brow
   shelves instead of the flat grid above — ID+class beats the bare #browse-
   list rule so this only overrides display, everything else (padding etc.)
   still applies harmlessly since .ab-rows shelves manage their own spacing. */
#browse-list.ab-rows{ display:block }
.bw-card{
  cursor:pointer; padding:10px; border-radius:var(--r-tile);
  background:var(--tile-bg); border:1px solid rgba(245,247,251,.08);
  transition:transform .12s, background .15s;
}
.bw-card:active{ transform:scale(.97) }
.bw-art{
  position:relative; width:100%; aspect-ratio:1; border-radius:10px;
  overflow:hidden; background:#10151e; margin-bottom:9px;
  box-shadow:0 6px 18px rgba(0,0,0,.30);
}
.bw-art img{ width:100%; height:100%; object-fit:contain; display:block }
.bw-title{ font-size:.85rem; font-weight:800; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.bw-sub{ font-size:.7rem; font-weight:500; color:var(--dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px }
.bw-meta{ font-size:.64rem; font-weight:600; color:var(--dim); margin-top:2px }
.bw-add{
  position:absolute; top:6px; right:6px; width:30px; height:30px;
  border-radius:999px; background:rgba(10,14,20,.55);
  border:1px solid rgba(255,255,255,.16); color:var(--text);
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
  font-size:1.05rem; line-height:1; display:flex; align-items:center;
  justify-content:center; cursor:pointer; padding:0;
}
.bw-play{
  position:absolute; right:8px; bottom:8px; width:42px; height:42px;
  border-radius:999px; background:var(--blue); border:none;
  display:none; align-items:center; justify-content:center;
  box-shadow:0 6px 16px rgba(0,0,0,.40); cursor:pointer; padding:0;
}
.bw-play svg{ width:20px; height:20px; color:#fff; margin-left:2px }
/* select mode — check overlay + accent ring on picked cards */
.bw-check{
  position:absolute; top:6px; left:6px; width:26px; height:26px;
  border-radius:999px; background:rgba(10,14,20,.55);
  border:2px solid rgba(255,255,255,.5);
  display:flex; align-items:center; justify-content:center;
}
.bw-check svg{ width:14px; height:14px; color:#fff; opacity:0; transition:.12s }
.bw-card.sel{ box-shadow:0 0 0 2px var(--blue) }
.bw-card.sel .bw-check{ background:var(--blue); border-color:var(--blue) }
.bw-card.sel .bw-check svg{ opacity:1 }
@media (hover:hover) and (pointer:fine){
  .bw-card:hover{ transform:translateY(-3px); background:rgba(24,32,45,.60) }
  .bw-card:hover .bw-play{ display:flex }
}
@media (min-width:768px){
  /* browse joins the wide (browse-gutter) pile; tiles match the .ab-grid
     200px universal min so the format grids and Browse read as one system */
  #browse{ padding-left:var(--browse-gutter); padding-right:var(--browse-gutter) }
  #browse-list{ grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:16px }
}

/* ═══════════════════════════════════════════════════════════════════════
   CLICKABLE SHELF TITLES — reusable across EVERY media page (Spotify pattern,
   Robert-directed 2026-07-09). A row title that navigates shows an underline
   bar on hover (+ a chevron) so it reads as tappable. Use .shelf-hdr as the
   row header and .shelf-title as the title button; pair with an optional
   .see-all on the right. Housekeeping-S3.
   ═══════════════════════════════════════════════════════════════════════ */
.shelf-hdr{
  display:flex; align-items:baseline; justify-content:space-between; gap:10px;
  padding:4px 16px 8px 4px;
}
.shelf-title{
  appearance:none; -webkit-appearance:none; background:none; border:none;
  padding:0 1px 3px; margin:0; text-align:left; cursor:pointer;
  font-family:var(--head); font-size:1.16rem; font-weight:900; letter-spacing:-.02em;
  color:var(--text); position:relative; display:inline-flex; align-items:center; gap:5px;
}
.shelf-title::after{
  content:""; position:absolute; left:1px; right:1px; bottom:0; height:2.5px;
  border-radius:2px; background:var(--lake,#65B9FF);
  transform:scaleX(0); transform-origin:left; transition:transform .18s ease;
}
.shelf-title .shelf-chev{ opacity:0; transform:translateX(-3px); transition:.18s ease; font-weight:700; color:var(--lake,#65B9FF) }
.shelf-title:active{ opacity:.75 }
@media (hover:hover) and (pointer:fine){
  .shelf-title:hover::after{ transform:scaleX(1) }
  .shelf-title:hover .shelf-chev{ opacity:.9; transform:translateX(0) }
}
.shelf-title:focus-visible{ outline:none }
.shelf-title:focus-visible::after{ transform:scaleX(1) }   /* keyboard / TV nav */

/* ── BROWSE all-media hub rows ─────────────────────────────────────────── */
#browse-hub{ padding-top:2px }
.brow{ margin-bottom:14px }
.brow .shelf{ padding-left:4px }
/* empty-shelf placeholder tile: it's an "Explore ›" affordance, not future
   content — swap the FUTURE CONTENT pill for a subtle open chevron. */
.brow-empty{ opacity:.72 }
.stile.brow-empty .sart::before{ content:"›"; font-size:1.5rem; line-height:1; letter-spacing:0; padding:1px 13px }

/* A plain (non-drill) row title — e.g. "Continue" — keeps the type but not the
   clickable underline/cursor. */
.shelf-title-plain{ cursor:default }
.shelf-title-plain::after{ display:none }
.brow-sub{ font-size:.68rem; font-weight:600; color:var(--dim); align-self:center }

/* ── Format pages rendered as shelves (audiobooks first; the drill-down pattern) ──
   .ab-rows stacks .brow shelves; each shelf is a horizontal scroll of tiles.
   Reuses .shelf so the drag-scroll + snap wiring applies. */
.ab-rows{ display:block }
.ab-rows .brow{ margin-bottom:12px }
.shelf-library{
  display:flex; gap:12px; overflow-x:auto; overflow-y:hidden;
  /* No scroll-snap: it snapped the LAST tile back out of reach so it couldn't
     be tapped. Free drag-scroll matches every other shelf (Home, etc.). */
  scroll-snap-type:none; -webkit-overflow-scrolling:touch;
  padding:2px 16px 10px 4px; scrollbar-width:none; cursor:grab;
}
.shelf-library::-webkit-scrollbar{ display:none }
.shelf-library .ab-card{ flex:0 0 138px; width:138px; margin:0 }
@media (min-width:768px){
  .shelf-library .ab-card{ flex-basis:160px; width:160px }
}
/* Browse-S1 step 4: Music's Discovery-Rows shelves reuse .shelf-library/.brow but
   the song card is .bw-card (Browse's own flat-grid card), not .ab-card — one
   sizing rule so it flexes to a shelf tile instead of stretching full-width. */
.shelf-library .bw-card{ flex:0 0 148px; width:148px; margin:0 }
@media (min-width:768px){
  .shelf-library .bw-card{ flex-basis:168px; width:168px }
}
@media (min-width:768px){
  /* the hub joins the wide pile too (the music sub-view already does via #browse) */
  #browse-hub-view, #browse-music{ }
}

/* ══ FOUNDER VAULT (V1.548) — Owner-only doc viewer ══════════════ */
#founder-overlay .founder-panel{position:fixed;inset:10px;max-width:1160px;margin:0 auto;background:#12141a;border:1px solid rgba(255,255,255,.09);border-radius:16px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 18px 60px rgba(0,0,0,.55)}
@supports (inset:max(0px)){ #founder-overlay .founder-panel{ top:max(10px, env(safe-area-inset-top)); bottom:max(10px, env(safe-area-inset-bottom)) } }
.founder-head{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid rgba(255,255,255,.08);flex:0 0 auto}
.founder-title{font-weight:700;font-size:15px;display:flex;align-items:center;gap:8px}
.founder-lock{display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:#e8c66a;background:rgba(232,198,106,.12);border:1px solid rgba(232,198,106,.3);padding:2px 8px;border-radius:20px}
.founder-close{background:none;border:0;color:#9aa3b2;font-size:16px;padding:6px 10px;cursor:pointer;border-radius:8px}
.founder-close:hover{color:#fff;background:rgba(255,255,255,.06)}
.founder-body{flex:1;display:flex;min-height:0}
.founder-frame{flex:1;width:100%;border:0;background:#0f1115}
.founder-msg{margin:auto;text-align:center;color:#9aa3b2;font-size:14px;line-height:1.7;padding:24px}
.founder-msg-sub{opacity:.6;font-size:12px}

/* ═══ RINGING BELL + STRUCTURED NOTIFICATIONS (SkoolParity-S1, V1.550) ═══
   .bell-wrap.ringing (any unread) swings the bell from its handle the way a
   caroller rings a handbell — a wind-up, two hard strikes, then a decaying
   tick-tock — and sends a circular pulse ring out on each strike (the two
   .bell-pulse rings are just delay-offset copies of the same keyframes).
   The dot becomes a numeric count badge. Panel rows group under sections. */
.bell-wrap{overflow:visible}
.bell-wrap .bell-ic{display:block;transform-origin:50% 2px}
.bell-wrap .bell-pulse{
  position:absolute;top:50%;left:50%;width:22px;height:22px;margin:-11px 0 0 -11px;
  border:2px solid currentColor;border-radius:50%;
  opacity:0;pointer-events:none;
}
/* Two independent states, deliberately decoupled (see refreshBellDot):
   .unread  = anything still unread      -> bell (and its rings) go gold, forever
   .ringing = something arrived UNSEEN   -> it also swings + pulses
   Once the user acknowledges the bell, .ringing drops but .unread persists, so a
   75-item backlog stops nagging while still reading as "you have mail". */
.bell-wrap.unread{color:var(--amber)}
/* Arrival flash takes the user's priority color for whatever just landed
   (--bell-accent, set inline by refreshBellDot; unset = stay gold). Declared
   after .unread so it wins at equal specificity while both classes are on. */
.bell-wrap.ringing{color:var(--bell-accent,var(--amber))}
.bell-wrap.ringing .bell-ic{animation:bellSwing 3.2s ease-in-out infinite}
.bell-wrap.ringing .bell-pulse{animation:bellPulse 3.2s ease-out infinite}
/* Each strike carries its OWN colour (V1.753) — one ring per thing waiting, so
   a steward who is also an admin sees cyan go out and amber follow it. With more
   than two waiting, refreshBellDot rotates the pair on each swing. Falls back to
   the first colour, then gold, so a single arrival still rings as one voice. */
.bell-wrap.ringing .bell-pulse.p1{border-color:var(--bell-accent,var(--amber))}
.bell-wrap.ringing .bell-pulse.p2{border-color:var(--bell-accent-2,var(--bell-accent,var(--amber)))}
/* ── HALO: the role signal (V1.753) ─────────────────────────────────────
   A soft coloured bloom that forms around each radiating ring and grows with
   it — the transform that scales the ring scales its glow, and the ring's own
   fade takes the glow with it, so the halo breathes outward as one wave. The
   colour is the ROLE's (cyan steward, amber admin, violet developer, rose
   owner), and it steps to the next role on each swing when more than two are
   waiting. Rings say what arrived; the halo says whose hat it is.
   A steady, quieter version sits on the bell itself whenever a role has work,
   so "you carry this" is legible even when nothing has just landed. */
.bell-wrap.has-duty{box-shadow:0 0 13px 1px rgba(var(--bell-halo-rgb,232,197,106),.30)}
.bell-wrap.has-duty.ringing .bell-pulse.p1{
  box-shadow:0 0 9px 3px rgba(var(--bell-halo-rgb,232,197,106),.45),
             inset 0 0 6px 1px rgba(var(--bell-halo-rgb,232,197,106),.35);
}
.bell-wrap.has-duty.ringing .bell-pulse.p2{
  box-shadow:0 0 9px 3px rgba(var(--bell-halo-2-rgb,var(--bell-halo-rgb,232,197,106)),.45),
             inset 0 0 6px 1px rgba(var(--bell-halo-2-rgb,var(--bell-halo-rgb,232,197,106)),.35);
}
.bell-wrap.ringing .bell-pulse.p1{animation-delay:.45s}
.bell-wrap.ringing .bell-pulse.p2{animation-delay:.70s}
@keyframes bellSwing{
  0%{transform:rotate(0)}
  6%{transform:rotate(-18deg)}   /* wind-up */
  14%{transform:rotate(21deg)}   /* strike */
  22%{transform:rotate(-18deg)}  /* strike */
  30%{transform:rotate(14deg)}
  38%{transform:rotate(-10deg)}
  46%{transform:rotate(6deg)}
  54%{transform:rotate(-3deg)}
  60%,100%{transform:rotate(0)}
}
@keyframes bellPulse{
  0%{opacity:.6;transform:scale(.35)}
  28%{opacity:0;transform:scale(2.1)}
  100%{opacity:0;transform:scale(2.1)}
}
@media (prefers-reduced-motion:reduce){
  .bell-wrap.ringing .bell-ic,.bell-wrap.ringing .bell-pulse{animation:none}
}
/* ── Notification priority panel (Profile → What matters most) ──────── */
.npri-intro{margin:0 0 14px;font-size:12.5px;line-height:1.6;color:#9aa3b2}
/* The tie-break rule, shown rather than explained: Urgent > High > Watch >
   Calm > Normal is the order the bell resolves when several kinds are waiting. */
.npri-order{padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.04);margin-bottom:6px}
.npri-order-h{font-size:11px;font-weight:700;color:#9aa3b2;margin-bottom:8px}
.npri-order-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.npri-chip{display:flex;align-items:center;gap:5px;font-size:11px;font-weight:700;color:var(--text)}
.npri-chip i{width:9px;height:9px;border-radius:50%;background:var(--npri,transparent);display:block}
.npri-chip i.npri-none{background:var(--amber)}
.npri-gt{color:#6d7789;font-size:11px}
.npri-row{padding:12px 0;border-top:1px solid var(--glass-brd)}
.npri-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.npri-lbl{font-size:14px;font-weight:800;color:var(--text)}
.npri-cur{font-size:11px;font-weight:700;color:#9aa3b2;letter-spacing:.02em}
.npri-sub{margin-top:2px;font-size:11.5px;line-height:1.5;color:#8b93a3}
/* Seven swatches now (Duty + High joined the palette) — wrap rather than
   overflow the sheet on a narrow phone. */
.npri-sws{display:flex;gap:10px;margin-top:10px;flex-wrap:wrap}
.npri-sw{
  width:26px;height:26px;border-radius:50%;cursor:pointer;
  background:var(--npri,transparent);border:2px solid transparent;
  box-shadow:0 0 0 1px rgba(255,255,255,.16);
  transition:box-shadow .12s,transform .12s;
}
.npri-sw.npri-none{background:var(--amber)}   /* "Normal" = the default gold */
.npri-sw:hover{transform:scale(1.08)}
.npri-sw.on{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--npri,var(--amber))}
.npri-reset{
  margin-top:14px;width:100%;padding:10px;border-radius:12px;cursor:pointer;
  background:transparent;border:1px solid var(--glass-brd);
  color:#9aa3b2;font-size:12px;font-weight:700;
}
.npri-reset:hover{color:var(--text);border-color:rgba(255,255,255,.28)}
/* Unread count badge (upgrades the plain 9px dot when it carries a number) */
.bell-dot.count{
  width:auto;height:15px;min-width:15px;top:0;right:0;border-radius:8px;
  display:flex;align-items:center;justify-content:center;padding:0 3px;
  font-size:9px;font-weight:800;line-height:1;color:#fff;letter-spacing:0;
}
/* ── Notification detail sheet (rows with nowhere to go) ────────────── */
.ntd-head{display:flex;gap:12px;align-items:flex-start;margin-bottom:12px}
.ntd-ic{flex:0 0 40px;width:40px;height:40px;border-radius:12px}
.ntd-ic svg{width:20px;height:20px}
.ntd-headtx{flex:1;min-width:0}
.ntd-kicker{font-size:.62rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--nsec,var(--text2))}
.ntd-title{margin:3px 0 2px;font-size:1.02rem;font-weight:800;color:var(--text);line-height:1.3}
.ntd-when{font-size:.68rem;color:var(--dim)}
.ntd-body{
  font-size:.86rem;line-height:1.65;color:var(--text2);white-space:pre-wrap;
  padding:12px 13px;border-radius:12px;
  background:rgba(var(--nsec-rgb,245,247,251),.06);
  border:1px solid rgba(var(--nsec-rgb,245,247,251),.16);
}
.ntd-empty{color:var(--dim);font-style:italic}
.ntd-done{
  margin-top:14px;width:100%;padding:11px;border-radius:12px;cursor:pointer;
  background:rgba(var(--nsec-rgb,245,247,251),.14);border:1px solid rgba(var(--nsec-rgb,245,247,251),.3);
  color:var(--text);font-size:.82rem;font-weight:800;
}
/* Section header carries the same color as a small pip, so the heading names
   the color before you look at a single row. */
.nt-sec-pip{
  width:7px;height:7px;border-radius:50%;flex:0 0 auto;
  background:var(--nsec,var(--blue));box-shadow:0 0 7px rgba(var(--nsec-rgb,101,185,255),.6);
}
/* ── Role duties — the Roles section, mirrored from the hamburger (Notif-S1) ──
   Each row wears the color of the staff tier its menu item sits under, so a
   duty in the bell reads as the same errand as the badge in the menu. The
   count sits on the right, where the menu badge sits. */
.nt-row.nt-duty .nt-ic svg{width:17px;height:17px}
.nt-row.nt-duty .nt-ic img{width:17px;height:17px;object-fit:contain}
.nt-duty-n{
  flex:0 0 auto;margin-top:2px;min-width:20px;height:20px;border-radius:10px;padding:0 6px;
  display:flex;align-items:center;justify-content:center;
  background:var(--nsec,var(--amber));color:var(--nsec-ink,var(--slate));
  font-size:.66rem;font-weight:900;line-height:1;
}

/* ═══ HEADER ACCOUNT ICON (SkoolParity-S1, V1.551) ═══
   Corner slot (Skool/YouTube convention); bell moved to right2. Photo crops
   round (avatars are the one surface allowed to crop); monogram sits under
   the photo as the dead-URL fallback. */
.hdr-avatar{overflow:hidden}
.hdr-avatar.signed{
  background:linear-gradient(135deg,rgba(101,185,255,.22),rgba(180,150,255,.22));
  border:1px solid var(--glass-brd);
}
.hdr-av-in{
  font-size:.8rem;font-weight:800;color:var(--text);
  display:flex;align-items:center;justify-content:center;
  width:100%;height:100%;position:absolute;inset:0;
}
.hdr-av-img{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;border-radius:50%;
}

/* ── Tour-S1: Sam-demonstrates cursor + input lock (engine: js/onboarding/guidedtour.js) ──
   The pointer Sam "taps" with during demo steps is the OPEN LIAHONA, gently
   pulsating (Robert 2026-07-11: the Liahona IS the AI-guide character — the
   instrument that points the way). Real asset, never a hand-rolled stand-in.
   The transparent lock swallows user input while his tap is in flight. */
.gt-demo-lock{ position:fixed; inset:0; display:none; pointer-events:auto; }
#gt.demoing .gt-demo-lock{ display:block; }
.gt-cursor{
  position:fixed; left:50%; top:50%; width:44px; height:44px; z-index:3;
  transform:translate(-50%,-50%); pointer-events:none; display:none;
  transition:left .95s cubic-bezier(.25,.8,.25,1), top .95s cubic-bezier(.25,.8,.25,1), transform .18s ease;
}
.gt-cursor.on{ display:block; }
.gt-cursor.press{ transform:translate(-50%,-50%) scale(.72); }
.gt-cursor-img{
  width:100%; height:100%; object-fit:contain; display:block;
  filter:drop-shadow(0 0 9px rgba(101,185,255,.6)) drop-shadow(0 3px 8px rgba(0,0,0,.5));
  animation:gtLiaPulse 1.7s ease-in-out infinite;
}
@keyframes gtLiaPulse{
  0%,100%{ transform:scale(1);    filter:drop-shadow(0 0 7px rgba(101,185,255,.5))  drop-shadow(0 3px 8px rgba(0,0,0,.5)); }
  50%    { transform:scale(1.12); filter:drop-shadow(0 0 16px rgba(101,185,255,.95)) drop-shadow(0 3px 8px rgba(0,0,0,.5)); }
}
.gt-cursor-ring{
  position:absolute; inset:-6px; border-radius:50%; border:2px solid rgba(101,185,255,.85);
  opacity:0; pointer-events:none;
}
.gt-cursor.press .gt-cursor-ring{ animation:gtPing .38s ease-out; }
@keyframes gtPing{
  0%{ opacity:.9; transform:scale(.6); }
  100%{ opacity:0; transform:scale(1.9); }
}
@media (prefers-reduced-motion: reduce){
  .gt-cursor{ transition:none; }
  .gt-cursor-img{ animation:none; }
  .gt-cursor.press .gt-cursor-ring{ animation:none; }
}

/* ── Tour-S1: tour picker sheet ── */
.gtp{ position:fixed; inset:0; z-index:10035; display:none; }
.gtp.on{ display:block; }
.gtp-scrim{ position:absolute; inset:0; background:rgba(6,8,14,.66); }
.gtp-sheet{
  position:absolute; left:50%; bottom:0; transform:translateX(-50%);
  width:min(560px,100%); max-height:82vh; display:flex; flex-direction:column;
  background:var(--tile-solid,#12141c); border:1px solid rgba(255,255,255,.09);
  border-bottom:none; border-radius:18px 18px 0 0;
  box-shadow:0 -12px 42px rgba(0,0,0,.55);
  animation:gtpUp .26s ease-out;
}
@keyframes gtpUp{ from{ transform:translate(-50%,26px); opacity:0; } to{ transform:translate(-50%,0); opacity:1; } }
.gtp-head{ position:relative; padding:18px 20px 10px 74px; min-height:64px; }
.gtp-lia{
  position:absolute; left:16px; top:14px; width:46px; height:46px; object-fit:contain;
  filter:drop-shadow(0 0 8px rgba(101,185,255,.55));
  animation:gtLiaPulse 1.7s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce){ .gtp-lia{ animation:none; } }
.gtp-title{ font-size:1.24rem; font-weight:800; color:var(--text,#fff); }
.gtp-sub{ font-size:.9rem; color:var(--dim); margin-top:4px; }
.gtp-close{
  position:absolute; top:12px; right:12px; width:32px; height:32px; border-radius:50%;
  background:rgba(255,255,255,.07); border:none; color:var(--dim); font-size:.85rem; cursor:pointer;
}
.gtp-list{ overflow-y:auto; padding:6px 12px 22px; display:flex; flex-direction:column; gap:8px; }
.gtp-card{
  display:flex; align-items:center; gap:12px; text-align:left; cursor:pointer;
  background:rgba(255,255,255,.045); border:1px solid rgba(255,255,255,.07);
  border-radius:14px; padding:12px 14px; color:var(--text,#fff);
}
.gtp-card:active{ background:rgba(255,255,255,.09); }
.gtp-dot{
  width:12px; height:12px; border-radius:50%; flex:none;
  background:var(--gtp-a,#65B9FF); box-shadow:0 0 10px var(--gtp-a,#65B9FF);
}
.gtp-txt{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.gtp-lbl{ font-size:1.06rem; font-weight:700; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.gtp-desc{ font-size:.86rem; color:var(--dim); margin-top:2px; }
.gtp-chev{ color:var(--dim); font-size:1.35rem; flex:none; }
/* Completion checkmark + Start-here badge (Tour-S1 V1.584). */
.gtp-check{ color:#5fd08a; font-weight:900; flex:none; font-size:1.05rem; width:20px; text-align:center; visibility:hidden; }
.gtp-card.done .gtp-check{ visibility:visible; }
.gtp-badge{ font-size:.68rem; font-weight:800; letter-spacing:.02em; text-transform:uppercase;
  color:#1a1205; background:var(--gtp-a,#65B9FF); border-radius:6px; padding:2px 7px; }
.gtp-progress{ font-size:.82rem; color:var(--dim); margin-top:6px; }
@media (min-width:768px){
  .gtp-sheet{ bottom:auto; top:50%; transform:translate(-50%,-50%); border-radius:18px; border-bottom:1px solid rgba(255,255,255,.09); }
  @keyframes gtpUp{ from{ transform:translate(-50%,-46%); opacity:0; } to{ transform:translate(-50%,-50%); opacity:1; } }
}

/* ── Browse-S1: Library-archetype format toolbar (todo.md 0b step 1) ──────────
   The two Library categories (audiobooks, e-books) carry TWO labelled controls:
   "Browse by category" (filter) + "Sort" (real order). Each is wrapped in a
   .brow-ctl group so on a narrow phone the Sort control wraps to its own line
   instead of crowding the category filter. Rows-/Shows-archetype categories keep
   the single flat select (relabeled to "Browse by category"). */
.ebooks-toolbar.lib{flex-wrap:wrap;row-gap:8px}
.ebooks-toolbar .brow-ctl{display:flex;align-items:center;gap:8px;flex:1 1 220px;min-width:0}
.ebooks-toolbar .brow-ctl-order{flex:1 1 150px}
.ebooks-toolbar .brow-ctl label{flex-shrink:0}
.ebooks-toolbar .brow-ctl select{flex:1;min-width:0}

/* ══ TRIBE KITS (Tribes-S6) ═══════════════════════════════════════════════
   The 3-step create-a-tribe flow (js/tribes/tribekits.js): a kit gallery, the
   details form, and the fifteen-feature checklist — plus the setup checklist
   that follows creation.

   Everything is prefixed .tk- so nothing here can reach an existing rule, and
   every surface is SOLID (var(--panel-bg)) — no backdrop-filter. These tiles
   sit INSIDE .creator-context-panel, which already blurs; a second blur layer
   on top of it turns text to mush and drags a glow trail behind the panel as
   it animates up.

   Phone-first: the kit gallery is one column and stays one column. Two
   columns were tried and the tagline + feature chips have nowhere to go at
   360px, which is the width that matters most. The panel scrolls; the rows
   never do. */

/* ── step chrome ─────────────────────────────────────────────────────── */
.tk-panel .tk-step{margin-top:2px}
.tk-lead{font-size:.82rem;line-height:1.5;color:var(--text2);margin:2px 0 14px}
.tk-dots{display:flex;gap:6px;justify-content:center;margin:12px 0 4px}
.tk-dot{width:7px;height:7px;border-radius:50%;background:var(--tile-brd,rgba(120,138,160,.28));transition:all .18s ease}
.tk-dot.done{background:var(--text2)}
.tk-dot.on{width:20px;border-radius:99px;background:var(--blue)}

.tk-nav{display:flex;gap:10px;margin-top:16px}
/* The step bar is PINNED to the foot of the panel. This is the sheet Robert got
   stranded in: the kit gallery and the details form are both taller than a
   360px phone, the overlay hides the header and the bottom nav, and the panel's
   ✕ scrolls away with everything else — so a bar that scrolled too left no
   control on screen at all. Sticky keeps Back/Cancel in thumb reach at every
   scroll position. Bleeds to the panel edges (negative side margins) over a
   SOLID body so scrolled content passes behind it, not through it, and the
   panel drops its own bottom padding so the bar sits flush when pinned. */
.tk-panel:has(> .tk-nav){padding-bottom:0}
.tk-panel .tk-nav{
  position:sticky;bottom:0;z-index:3;
  margin:16px -20px 0;
  padding:12px 20px calc(12px + env(safe-area-inset-bottom,0px));
  background:var(--panel-bg,#151b27);
  border-top:1px solid var(--glass-brd,rgba(245,247,251,.14));
}
.tk-btn-ghost{flex:1;padding:12px 16px;border-radius:12px;border:1px solid var(--border,rgba(120,138,160,.28));
  background:transparent;color:var(--text);font-size:.86rem;font-weight:700;cursor:pointer}
.tk-btn-next{flex:1;padding:12px 16px;border-radius:12px;border:1px solid var(--blue);
  background:rgba(101,185,255,.16);color:var(--blue);font-size:.86rem;font-weight:800;cursor:pointer}
.tk-btn-next:disabled{opacity:.42;cursor:default}
.tk-btn-ghost:active,.tk-btn-next:active{opacity:.82}
.tk-setup-done{margin-top:14px;width:100%}

/* ── step 1 · the kit gallery ────────────────────────────────────────── */
.tk-kits{display:flex;flex-direction:column;gap:8px}
.tk-kit-card{display:flex;gap:11px;align-items:flex-start;text-align:left;width:100%;
  padding:12px 13px;border-radius:var(--r-tile,14px);cursor:pointer;
  background:var(--panel-bg,#151b27);border:1px solid var(--tile-brd,rgba(120,138,160,.24));
  color:var(--text2);transition:border-color .12s ease,background .12s ease}
.tk-kit-card.on{border-color:var(--blue);background:rgba(101,185,255,.1)}
.tk-kit-card:active{opacity:.86}
.tk-kit-ico{flex:0 0 34px;width:34px;height:34px;border-radius:11px;display:grid;place-items:center;
  font-size:1.12rem;line-height:1;background:rgba(101,185,255,.13);border:1px solid var(--tile-brd,rgba(120,138,160,.2))}
.tk-kit-body{display:block;min-width:0;flex:1}
.tk-kit-name{display:block;font-weight:800;font-size:.92rem;color:var(--text);margin-bottom:2px}
.tk-kit-tag{display:block;font-size:.75rem;line-height:1.4;color:var(--text2)}
.tk-kit-chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:7px}
.tk-chip{font-size:.63rem;font-weight:700;letter-spacing:.01em;color:var(--text2);
  background:rgba(245,247,251,.06);border:1px solid var(--tile-brd,rgba(120,138,160,.2));
  border-radius:999px;padding:2px 7px;white-space:nowrap}
.tk-kit-card.on .tk-chip{color:var(--text);border-color:rgba(101,185,255,.4)}
.tk-chip-more{opacity:.72}
.tk-tour-btn{width:100%;margin-top:12px;padding:11px 14px;border-radius:12px;cursor:pointer;
  background:transparent;border:1px dashed var(--tile-brd,rgba(120,138,160,.34));
  color:var(--text2);font-size:.8rem;font-weight:700}

/* ── step 2 · the kit echo above the form ────────────────────────────── */
#tk-kit-echo{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px;
  padding:9px 11px;border-radius:var(--r-tile,14px);
  background:var(--panel-bg,#151b27);border:1px solid var(--tile-brd,rgba(120,138,160,.24));
  color:var(--text);font-size:.8rem;font-weight:700;margin-bottom:14px}
.tk-echo-ico{font-size:1rem;line-height:1}
.tk-echo-tag{font-weight:400;color:var(--text2)}

/* ── step 3 · the fifteen ────────────────────────────────────────────── */
.tk-feats{display:flex;flex-direction:column;gap:6px}
.tk-feat{display:flex;gap:10px;align-items:flex-start;padding:10px 11px;cursor:pointer;
  border-radius:var(--r-tile,14px);background:var(--panel-bg,#151b27);
  border:1px solid var(--tile-brd,rgba(120,138,160,.22));transition:border-color .12s ease,background .12s ease}
.tk-feat.on{border-color:var(--lake);background:rgba(101,185,255,.09)}
.tk-feat-box{flex:0 0 auto;width:19px;height:19px;margin:1px 0 0;accent-color:var(--blue);cursor:pointer}
.tk-feat-ico{flex:0 0 auto;font-size:1rem;line-height:1.2;width:20px;text-align:center}
.tk-feat-tx{display:block;min-width:0;flex:1}
.tk-feat-name{display:block;font-size:.85rem;font-weight:800;color:var(--text);margin-bottom:2px}
.tk-feat-blurb{display:block;font-size:.73rem;line-height:1.42;color:var(--text2)}
.tk-count{margin-top:12px;font-size:.76rem;font-weight:700;color:var(--text2);text-align:center}

/* ── the setup checklist ─────────────────────────────────────────────── */
.tk-setup-list{display:flex;flex-direction:column;gap:7px}
.tk-setup-row{display:flex;gap:11px;align-items:center;width:100%;text-align:left;cursor:pointer;
  padding:12px 13px;border-radius:var(--r-tile,14px);
  background:var(--panel-bg,#151b27);border:1px solid var(--tile-brd,rgba(120,138,160,.24));color:var(--text2)}
.tk-setup-row:active{opacity:.85}
.tk-setup-ico{flex:0 0 30px;width:30px;height:30px;border-radius:10px;display:grid;place-items:center;
  font-size:1rem;line-height:1;background:rgba(101,185,255,.13);border:1px solid var(--tile-brd,rgba(120,138,160,.2))}
.tk-setup-tx{display:block;min-width:0;flex:1}
.tk-setup-lbl{display:block;font-size:.86rem;font-weight:800;color:var(--text);line-height:1.3}
.tk-setup-hint{display:block;font-size:.72rem;line-height:1.4;color:var(--text2);margin-top:2px}
.tk-setup-arr{flex:0 0 auto;color:var(--text2);font-size:1.05rem;opacity:.7}

/* Narrow phones (360px and under): the icon tile is the first thing to give.
   The tagline and the feature chips are the whole point of a kit card, so they
   keep their width and the glyph shrinks around them. */
@media (max-width:360px){
  .tk-kit-card{padding:11px}
  .tk-kit-ico{flex-basis:28px;width:28px;height:28px;font-size:.95rem}
  .tk-feat{padding:9px}
  .tk-chip{font-size:.6rem;padding:2px 6px}
}

/* ═══════════════════════════════════════════════════════════════════════════
   CFM VIDEO CLIPPER  (js/cfm/clipper.js)
   The Lesson Planner's study surface: a Church video on the left, its
   transcript rail on the right, a selected passage becoming a lesson clip.

   Layout: side-by-side from 768px (the app's shell breakpoint); a stacked,
   full-screen study view below it. The overlay wears .modal-veil so the app's
   back-button cascade dismisses it, but it is FULL-BLEED, so the #id rules
   below deliberately outrank .modal-veil's shell max-width and its bottom-sheet
   alignment. Tiles are SOLID here - no backdrop-filter anywhere in this section.
   ═══════════════════════════════════════════════════════════════════════════ */
#cfm-clipper{
  max-width:none;margin:0;inset:0;z-index:9990;
  align-items:stretch;justify-content:stretch;
  background:rgba(8,12,19,.92);
}
#cfm-clipper:focus{outline:none}
/* The mini transport + bottom nav live outside #app at a higher real stacking
   order, so they would paint over the video. Same treatment as the media player. */
body:has(#cfm-clipper.on) #mini,
body:has(#cfm-clipper.on) nav{display:none}
body:has(#cfm-clipper.on) #guide-fab,
body:has(#cfm-clipper.on) #give-fab{display:none !important}

.cfmc-shell{
  display:flex;flex-direction:column;width:100%;height:100%;min-height:0;
  background:var(--panel-bg,#151b27);color:var(--text,#f5f7fb);
}

/* header */
.cfmc-hdr{
  flex:0 0 auto;display:flex;align-items:center;gap:12px;
  padding:calc(12px + env(safe-area-inset-top,0px)) 14px 11px;
  border-bottom:1px solid var(--tile-brd,rgba(120,138,160,.24));
}
.cfmc-hdr-tx{flex:1;min-width:0}
.cfmc-hdr-t{font-size:1.02rem;font-weight:800;line-height:1.2}
.cfmc-hdr-s{font-size:.72rem;color:var(--text2,#9fb0c6);margin-top:2px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cfmc-x{
  flex:0 0 auto;width:36px;height:36px;border-radius:10px;cursor:pointer;
  background:rgba(255,255,255,.08);border:1px solid var(--tile-brd,rgba(120,138,160,.24));
  color:var(--text,#fff);font-size:1.35rem;line-height:1;
}
.cfmc-x:active{opacity:.8}

/* search row */
.cfmc-search{flex:0 0 auto;display:flex;gap:8px;padding:11px 14px}
.cfmc-search input{
  flex:1;min-width:0;box-sizing:border-box;padding:10px 12px;font-size:.85rem;
  border-radius:10px;background:var(--field-bg,#1b2230);color:var(--text,#fff);
  border:1px solid var(--tile-brd,rgba(120,138,160,.24));
}
.cfmc-go{
  flex:0 0 auto;padding:0 18px;border-radius:10px;border:none;cursor:pointer;
  font-weight:800;font-size:.82rem;background:linear-gradient(135deg,#ffd27a,#e0a93f);color:#1a2436;
}
.cfmc-go:active{opacity:.85}

/* the two columns */
.cfmc-main{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.cfmc-left{flex:0 0 auto;display:flex;flex-direction:column;min-width:0}
.cfmc-right{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;
  border-top:1px solid var(--tile-brd,rgba(120,138,160,.24))}

/* the stage: 16:9, contain-fit so media art is never cropped */
.cfmc-stage{position:relative;width:100%;aspect-ratio:16/9;background:#000;
  display:flex;align-items:center;justify-content:center}
.cfmc-stage video{width:100%;height:100%;display:block;background:#000;object-fit:contain}
.cfmc-stage-msg{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  padding:20px 26px;text-align:center;font-size:.82rem;line-height:1.6;
  color:var(--text2,#9fb0c6);background:#0b0f16;
}

/* the control bar (native controls are off) */
.cfmc-bar{
  flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:9px 12px;
  background:#10141d;border-bottom:1px solid var(--tile-brd,rgba(120,138,160,.24));
}
.cfmc-cbtn{
  flex:0 0 auto;height:34px;min-width:34px;padding:0 9px;border-radius:9px;cursor:pointer;
  background:rgba(255,255,255,.09);border:1px solid var(--tile-brd,rgba(120,138,160,.24));
  color:var(--text,#fff);font-size:.9rem;font-weight:800;line-height:1;
}
.cfmc-cbtn:active{opacity:.8}
.cfmc-nudge{font-size:.76rem;letter-spacing:.3px}
.cfmc-time{flex:0 0 auto;font-size:.72rem;font-weight:700;color:var(--text2,#9fb0c6);
  font-variant-numeric:tabular-nums;min-width:38px;text-align:center}
.cfmc-seek{
  position:relative;flex:1 1 auto;height:20px;cursor:pointer;touch-action:none;
  display:flex;align-items:center;
}
.cfmc-seek::before{content:"";position:absolute;left:0;right:0;height:5px;border-radius:3px;
  background:rgba(255,255,255,.14)}
.cfmc-buf{position:absolute;left:0;height:5px;width:0;border-radius:3px;background:rgba(255,255,255,.26)}
.cfmc-prog{position:absolute;left:0;height:5px;width:0;border-radius:3px;background:var(--gold,#d9a441)}
.cfmc-knob{position:absolute;left:0;width:12px;height:12px;margin-left:-6px;border-radius:50%;
  background:var(--gold,#d9a441);box-shadow:0 1px 5px rgba(0,0,0,.5);pointer-events:none}

/* video attribution - always on screen while text is being taken */
.cfmc-vmeta{flex:0 0 auto;padding:9px 13px 11px}
.cfmc-vmeta-t{font-size:.86rem;font-weight:800;line-height:1.35}
.cfmc-vmeta-u{display:inline-block;margin-top:3px;font-size:.72rem;color:var(--lake,#65b9ff);text-decoration:underline}
.cfmc-vmeta-n{margin-top:5px;font-size:.72rem;color:var(--text2,#9fb0c6);line-height:1.5}

/* search results.
   The right column holds EITHER this list or the transcript rail, never both;
   the one that is not showing is display:none so it takes no space at all. */
.cfmc-results{flex:1 1 auto;min-height:0;overflow-y:auto;padding:11px 13px}
.cfmc-results.slim{flex:0 0 auto;overflow:visible;padding:9px 13px 0}
.cfmc-rail.hidden,.cfmc-selbar.hidden{display:none}
.cfmc-res{
  display:block;width:100%;text-align:left;cursor:pointer;margin-bottom:8px;
  padding:11px 12px;border-radius:var(--r-tile,13px);color:inherit;
  background:rgba(255,255,255,.05);border:1px solid var(--tile-brd,rgba(120,138,160,.24));
}
.cfmc-res:active{opacity:.85}
.cfmc-res-t{font-size:.85rem;font-weight:800;line-height:1.35}
.cfmc-res-badge{display:inline-block;margin-left:7px;vertical-align:middle;
  font-size:.56rem;font-weight:800;letter-spacing:.4px;text-transform:uppercase;
  color:var(--lake,#65b9ff);border:1px solid rgba(101,185,255,.45);border-radius:6px;padding:1px 5px}
.cfmc-res-s{font-size:.75rem;color:var(--text2,#9fb0c6);line-height:1.5;margin-top:3px}
.cfmc-res-u{font-size:.68rem;color:var(--text2,#9fb0c6);opacity:.75;margin-top:4px}
.cfmc-back-results{
  background:none;border:none;cursor:pointer;padding:2px 0;
  color:var(--lake,#65b9ff);font-size:.76rem;font-weight:800;text-decoration:underline;
}
.cfmc-msg{padding:12px 2px;font-size:.79rem;line-height:1.6;color:var(--text2,#9fb0c6)}
.cfmc-msg-bad{color:#ffb3a7}

/* the transcript rail.
   NO scroll-behavior:smooth here - it swallows the programmatic scrollTop the
   auto-scroll writes, and the rail would stop following the video. */
.cfmc-rail{
  position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;padding:4px 13px 16px;
}
.cfmc-rail.empty{flex:0 0 auto;padding:0}
.cfmc-rail-hint{font-size:.68rem;line-height:1.5;color:var(--text2,#9fb0c6);
  padding:8px 2px 10px;border-bottom:1px solid var(--tile-brd,rgba(120,138,160,.18));margin-bottom:6px}
.cfmc-line{
  display:flex;gap:10px;align-items:flex-start;cursor:pointer;
  padding:7px 9px;border-radius:9px;border:1px solid transparent;
  -webkit-user-select:none;user-select:none;
}
.cfmc-line-t{flex:0 0 auto;font-size:.66rem;font-weight:800;color:var(--text2,#9fb0c6);
  font-variant-numeric:tabular-nums;padding-top:2px;opacity:.75}
.cfmc-line-x{flex:1;min-width:0;font-size:.83rem;line-height:1.55;color:var(--text2,#9fb0c6)}
.cfmc-line.past .cfmc-line-x{opacity:.6}
.cfmc-line.active{background:rgba(217,164,65,.13)}
.cfmc-line.active .cfmc-line-x{color:var(--text,#f5f7fb);font-weight:700}
.cfmc-line.active .cfmc-line-t{color:var(--gold,#d9a441);opacity:1}
.cfmc-line.sel{background:rgba(101,185,255,.16);border-color:rgba(101,185,255,.34);border-radius:0}
.cfmc-line.sel .cfmc-line-x{color:var(--text,#f5f7fb)}
.cfmc-line.sel.active{background:rgba(101,185,255,.26)}
.cfmc-line.sel-first{border-top-left-radius:9px;border-top-right-radius:9px}
.cfmc-line.sel-last{border-bottom-left-radius:9px;border-bottom-right-radius:9px}

/* the selection bar */
.cfmc-selbar{
  flex:0 0 auto;padding:10px 13px calc(11px + env(safe-area-inset-bottom,0px));
  border-top:1px solid var(--tile-brd,rgba(120,138,160,.24));background:#10141d;
}
.cfmc-sel-hint{font-size:.71rem;color:var(--text2,#9fb0c6);line-height:1.5}
.cfmc-sel-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px;
  font-size:.72rem;font-weight:700;color:var(--text2,#9fb0c6)}
.cfmc-sel-span{color:var(--lake,#65b9ff);font-variant-numeric:tabular-nums}
.cfmc-sel-dot{opacity:.5}
.cfmc-sel-clear{margin-left:auto;background:none;border:none;cursor:pointer;
  color:var(--text2,#9fb0c6);font-size:.71rem;font-weight:700;text-decoration:underline}
.cfmc-sel-actions{display:flex;gap:8px;margin-top:9px}
.cfmc-act{
  flex:1;padding:10px 12px;border-radius:10px;cursor:pointer;font-weight:800;font-size:.79rem;
  background:rgba(255,255,255,.09);border:1px solid var(--tile-brd,rgba(120,138,160,.24));color:var(--text,#fff);
}
.cfmc-act-go{background:linear-gradient(135deg,#ffd27a,#e0a93f);color:#1a2436;border-color:transparent}
.cfmc-act:active{opacity:.85}

/* desktop: video left, transcript right (768px = the app's shell step) */
@media (min-width:768px){
  .cfmc-main{flex-direction:row}
  .cfmc-left{flex:1 1 58%;min-width:0;border-right:1px solid var(--tile-brd,rgba(120,138,160,.24))}
  .cfmc-right{flex:1 1 42%;min-width:300px;max-width:460px;border-top:none}
  .cfmc-stage{max-height:56vh}
}
@media (min-width:1100px){
  .cfmc-right{max-width:520px}
  .cfmc-line-x{font-size:.86rem}
}

/* ── Alerts sheet (Profile → Notifications → Alerts) ──────────────────────
   Solid surfaces only — no backdrop-filter anywhere here. Rows are 56px tall
   so the whole row, not the little switch, is the tap target, and everything
   is width-fluid so it holds at 320px. The switch itself is a SPAN inside the
   row rather than a button: the row already carries role="switch" and its own
   onclick, and a button inside a tappable row is a second target for the same
   act (and invalid markup if the row ever becomes a button). */
.ssal-intro{margin:0 0 14px;font-size:12.5px;line-height:1.6;color:#9aa3b2}
.ssal-row{
  display:flex;align-items:center;gap:12px;width:100%;min-height:56px;
  padding:12px 2px;border-top:1px solid var(--glass-brd);cursor:pointer;
}
.ssal-row.ssal-plain{cursor:default}
.ssal-main{flex:1 1 auto;min-width:0}
.ssal-lbl{font-size:14px;font-weight:800;color:var(--text)}
.ssal-sub{margin-top:3px;font-size:11.5px;line-height:1.5;color:#8b93a3}
.ssal-sw{
  position:relative;display:block;flex:0 0 auto;width:46px;height:27px;
  border-radius:99px;background:var(--border);transition:background .15s;
}
.ssal-sw.on{background:var(--lake)}
.ssal-knob{
  position:absolute;top:3px;left:3px;width:21px;height:21px;border-radius:50%;
  background:#fff;transition:transform .15s;box-shadow:0 1px 3px rgba(0,0,0,.3);
}
.ssal-sw.on .ssal-knob{transform:translateX(19px)}
.ssal-note{
  margin:12px 0 0;padding:11px 12px;border-radius:12px;
  background:rgba(255,255,255,.04);
  font-size:11.5px;line-height:1.6;color:#9aa3b2;
}
.ssal-btn{
  margin-top:12px;width:100%;min-height:46px;padding:12px;border-radius:12px;
  cursor:pointer;border:0;font-size:13px;font-weight:800;color:#1a2436;
  background:linear-gradient(135deg,#ffd27a,#e0a93f);
}
.ssal-btn:active{opacity:.85}
/* Secondary on purpose: sending a test is a check, not the point of the sheet. */
.ssal-test,.ssal-more{
  margin-top:10px;width:100%;min-height:46px;padding:11px;border-radius:12px;
  cursor:pointer;background:transparent;border:1px solid var(--glass-brd);
  color:#9aa3b2;font-size:12px;font-weight:700;
}
.ssal-test:hover,.ssal-more:hover{color:var(--text);border-color:rgba(255,255,255,.28)}

/* ═══════════ MANNA . OF THE MOMENT (Discovery-S1) ═══════════════════════
   The all-media showcase tile at the top of Home (js/home/moment.js). ONE
   item per hour, from any category. Deliberately quiet: it is editorial, not
   an advertisement, so it reads as a card someone set down rather than as a
   banner shouting.

   SOLID, not glass. backdrop-filter is retired in this app (it dragged glow
   trails behind every scroll), so this tile paints an opaque surface exactly
   like every other home tile and layers a very low-alpha gold wash for warmth.

   Artwork is CONTAIN-fit. Cover art is never cropped in SaintStream — a square
   crop of a book cover or a wide film still is a small act of vandalism. The
   art well is a fixed box with a neutral backing and the image sits inside it.
   ────────────────────────────────────────────────────────────────────────── */
.moment-sec{margin:12px 16px 0}
.moment-sec[hidden]{display:none}
.moment-tile{
  position:relative;overflow:hidden;cursor:pointer;
  padding:13px 15px 14px;border-radius:13px;
  background:var(--tile-solid,#161c26);
  border:1px solid rgba(217,164,65,.22);
  box-shadow:0 3px 14px rgba(0,0,0,.26);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.moment-tile::before{                   /* warmth, painted not blurred */
  content:'';position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(135deg,rgba(217,164,65,.10) 0%,rgba(217,164,65,0) 46%);
}
.moment-tile>*{position:relative;z-index:1}
.moment-tile:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(0,0,0,.34);border-color:rgba(217,164,65,.42)}
.moment-tile:active{transform:translateY(1px) scale(.995)}
.moment-tile:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* Eyebrow: the name of the thing. Small, gold, unhurried. */
.moment-eyebrow{
  display:flex;align-items:center;gap:7px;
  font-size:.6rem;font-weight:800;letter-spacing:.13em;text-transform:uppercase;
  color:var(--gold);margin-bottom:11px;
}
.moment-dot{
  width:6px;height:6px;border-radius:50%;flex-shrink:0;
  background:var(--gold);box-shadow:0 0 0 3px rgba(217,164,65,.16);
}

.moment-body{display:flex;gap:13px;align-items:flex-start}

/* CONTAIN-fit art well. Never crop. */
.moment-art{
  width:92px;height:92px;flex-shrink:0;border-radius:10px;overflow:hidden;
  background:#0d1017;border:1px solid rgba(255,255,255,.07);
  display:grid;place-items:center;
}
.moment-art img{width:100%;height:100%;object-fit:contain;display:block}
.moment-art-empty{
  background:radial-gradient(circle at 50% 40%,rgba(217,164,65,.20),rgba(13,16,23,1) 68%);
}

.moment-tx{flex:1;min-width:0}
.moment-chip{
  display:inline-block;padding:3px 9px;border-radius:99px;
  font-size:.56rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase;
  color:var(--gold);background:rgba(217,164,65,.13);border:1px solid rgba(217,164,65,.28);
  margin-bottom:7px;
}
.moment-title{
  font-family:var(--head);font-size:1rem;font-weight:700;line-height:1.28;
  color:var(--text);margin:0;
}
.moment-creator{margin-top:3px;font-size:.72rem;font-weight:600;color:var(--text2)}

/* The snippet. Per-category presentation, one rule each — a pull-quote for a
   book, a lead line for a brief, a plain excerpt otherwise. */
.moment-snip{margin-top:9px;font-size:.78rem;line-height:1.5;color:var(--text2)}
.moment-snip-quote{
  padding-left:11px;border-left:2px solid rgba(217,164,65,.45);
  font-family:var(--head);font-style:italic;font-size:.83rem;color:var(--text);
}
.moment-snip-lead{font-weight:600;color:var(--text)}
.moment-snip-logline{font-style:italic}

.moment-actions{margin-top:11px}
.moment-go{
  display:inline-flex;align-items:center;gap:7px;cursor:pointer;
  padding:7px 14px;border-radius:99px;
  font:inherit;font-size:.72rem;font-weight:800;letter-spacing:.02em;
  color:var(--gold);background:rgba(217,164,65,.12);
  border:1px solid rgba(217,164,65,.32);
  transition:background .15s ease,transform .15s ease;
}
.moment-go:hover{background:rgba(217,164,65,.22)}
.moment-go:active{transform:scale(.97)}
.moment-go-ic{display:grid;place-items:center;width:15px;height:15px}
.moment-go-ic svg{width:15px;height:15px}

/* Sam's aside. Separated by a hairline so it reads as commentary, never as
   part of the creator's own words. */
.moment-why{
  display:flex;align-items:flex-start;gap:7px;
  margin-top:12px;padding-top:11px;border-top:1px solid rgba(255,255,255,.08);
  font-size:.72rem;line-height:1.45;color:var(--dim);
}
.moment-why-ic{flex-shrink:0;width:14px;height:14px;margin-top:1px;color:var(--gold);opacity:.8}
.moment-why-ic svg{width:14px;height:14px;display:block}
.moment-why-tx{min-width:0}

/* Phones: the art shrinks rather than the words, so the snippet stays readable. */
@media (max-width:420px){
  .moment-art{width:74px;height:74px}
  .moment-title{font-size:.94rem}
}
/* Desktop: a genuinely hero-sized well, since there is room for it. */
@media (min-width:900px){
  .moment-art{width:132px;height:132px}
  .moment-title{font-size:1.12rem}
  .moment-snip{font-size:.82rem}
}
