/* Nectara Viva — listener app.
   Palette from the logo: deep night violet, amethyst, a lilac glow at the center. */

:root {
  --bg: #120820;
  --bg-2: #1a0d2e;
  --surface: #221338;
  --surface-2: #2d1a49;
  --line: rgba(226, 200, 255, 0.10);
  --line-2: rgba(226, 200, 255, 0.18);
  --text: #f6efff;
  --text-2: #c7b6e2;
  --text-3: #8f7cae;
  --accent: #c58bff;
  --accent-2: #a45cf2;
  --accent-deep: #6a2bb8;
  --glow: #f0c6ff;
  --live: #ff8fd8;
  --danger: #ff8a9a;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  --tab-h: 62px;
  --mini-h: 64px;
  --side-w: 0px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); color-scheme: dark; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(164, 92, 242, 0.22), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 400 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--text-3); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- icons */
.icon { width: 24px; height: 24px; fill: currentColor; flex: none; }
.icon text { fill: currentColor; }

/* ---------------------------------------------------------------- layout shell */
.view {
  min-height: 100dvh;
  overflow-x: clip; /* decorative glows must never widen the page on phones */
  padding-left: calc(var(--side-w) + var(--safe-l));
  padding-right: var(--safe-r);
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px);
  outline: none;
}
body.has-mini .view { padding-bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 32px); }
.page { padding: 4px var(--gutter) 8px; max-width: 1180px; margin: 0 auto; }

/* ---------------------------------------------------------------- tab bar */
.tabbar {
  position: fixed;
  z-index: 40;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--safe-b));
  padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
  display: flex;
  background: rgba(18, 8, 32, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  backdrop-filter: saturate(160%) blur(22px);
  border-top: 1px solid var(--line);
}
.tabbar__brand { display: none; }
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: var(--text-3);
  font-size: 11px; font-weight: 600; letter-spacing: .01em;
  transition: color .2s;
}
.tab svg { width: 24px; height: 24px; fill: currentColor; transition: transform .25s var(--ease); }
.tab.is-active { color: var(--text); }
.tab.is-active svg { fill: var(--accent); transform: translateY(-1px); }
.tab:active svg { transform: scale(.9); }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  min-height: calc(56px + var(--safe-t));
  padding: var(--safe-t) var(--gutter) 0;
  background: linear-gradient(to bottom, rgba(18, 8, 32, 0.92), rgba(18, 8, 32, 0.6));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.topbar__title {
  flex: 1; min-width: 0;
  font: 600 16px/1.2 var(--body);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.topbar__title--big { text-align: left; font: 600 28px/1.1 var(--display); letter-spacing: -.01em; }
.topbar--brand { justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 20px/1 var(--display); letter-spacing: -.01em; }
.brand img { filter: drop-shadow(0 0 12px rgba(197, 139, 255, .45)); }

.langpill { display: flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.langpill button { padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: .04em; }
.langpill .is-on { background: var(--surface-2); color: var(--text); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: transform .15s var(--ease), background .2s, opacity .2s;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn .icon { width: 20px; height: 20px; }
.btn--primary {
  color: #1b0631;
  background: linear-gradient(135deg, #f3d4ff, var(--accent) 55%, #a76cf5);
  box-shadow: 0 8px 24px -10px rgba(197, 139, 255, .8);
}
.btn--ghost { background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); }
.btn--ghost.is-on { background: rgba(197, 139, 255, .16); border-color: rgba(197, 139, 255, .45); }
.btn--lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn--block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; }

.iconbtn {
  width: 44px; height: 44px; flex: none;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  color: var(--text);
  transition: background .2s, transform .15s;
}
.iconbtn:hover { background: rgba(255, 255, 255, .06); }
.iconbtn:active { transform: scale(.92); }
.iconbtn:disabled { opacity: .3; }
.iconbtn--sm { width: 32px; height: 32px; }
.iconbtn--sm .icon { width: 18px; height: 18px; }
.iconbtn--lg .icon { width: 34px; height: 34px; }
.iconbtn--play { background: var(--text); color: var(--bg); }
.iconbtn--play:hover { background: #fff; }
.iconbtn--play .icon { width: 22px; height: 22px; }

.linkbtn { color: var(--accent); font-weight: 600; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  font-size: 13px; font-weight: 600;
}
.chip .icon { width: 16px; height: 16px; }
.chip.is-on { background: rgba(197, 139, 255, .2); color: var(--glow); }

.tag {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px;
  border-radius: 999px;
  background: rgba(197, 139, 255, .14);
  color: var(--glow);
  font-size: 12px; font-weight: 600;
}
.tag--outline { background: transparent; border: 1px solid var(--line-2); color: var(--text-2); }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--glow);
}
.badge--live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(255, 143, 216, .6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 143, 216, .55); }
  70% { box-shadow: 0 0 0 9px rgba(255, 143, 216, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 143, 216, 0); }
}

.tag--preview { background: rgba(255, 196, 120, .16); color: #ffd79a; margin-left: 6px; vertical-align: middle; height: 20px; font-size: 11px; }
.preview-banner {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 6px 0 14px; padding: 12px 14px;
  border-radius: var(--r);
  background: rgba(255, 196, 120, .10);
  border: 1px solid rgba(255, 196, 120, .35);
  color: #ffe3b8; font-size: 14px; line-height: 1.45;
}
.preview-banner .icon { width: 18px; height: 18px; flex: none; fill: #ffd79a; margin-top: 1px; }

/* ---------------------------------------------------------------- covers */
.cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--placeholder {
  background:
    radial-gradient(90% 60% at 70% 20%, hsla(var(--h), 85%, 70%, .55), transparent 70%),
    radial-gradient(80% 70% at 10% 100%, hsla(calc(var(--h) - 30), 80%, 35%, .9), transparent 70%),
    linear-gradient(160deg, hsl(var(--h), 55%, 22%), hsl(calc(var(--h) + 10), 60%, 9%));
}
.cover__title {
  /* Insets are relative to the cover itself, so small covers stay small. */
  position: absolute; z-index: 1; left: 11%; right: 11%; bottom: 9%;
  font: 600 clamp(15px, 2.4vw, 22px)/1.08 var(--display);
  letter-spacing: -.01em;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}
.cover__mark {
  position: absolute; top: 9%; right: 9%;
  width: 22% !important; height: auto !important;
  opacity: .85;
}

/* ---------------------------------------------------------------- sections, rails, grid */
.section { margin-top: 28px; }
.section__title { font: 600 21px/1.2 var(--display); letter-spacing: -.01em; margin-bottom: 12px; }
.section__note { color: var(--text-3); font-size: 13px; margin: -6px 0 12px; }

.rail {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 42%);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: var(--gutter);
  margin: 0 calc(-1 * var(--gutter));
  padding: 2px var(--gutter) 6px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; align-self: start; }
.rail--cast { grid-auto-columns: 112px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 18px 14px; }

.scard { display: block; transition: transform .2s var(--ease); }
.scard:active { transform: scale(.97); }
.scard__title { margin-top: 10px; font-weight: 600; line-height: 1.25; }
.scard__sub { color: var(--text-3); font-size: 13px; }

.ecard { display: block; text-align: left; width: 100%; }
.ecard__art { position: relative; }
.ecard__cover { aspect-ratio: 1; }
.ecard__cover .cover__title { right: 52px; font-size: 16px; }
.ecard__play {
  position: absolute; right: 10px; bottom: 10px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(246, 239, 255, .95); color: var(--bg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.ecard__play .icon { width: 18px; height: 18px; margin-left: 2px; }
.ecard__art .progress { position: absolute; left: 10px; right: 56px; bottom: 26px; }
.ecard__series { margin-top: 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ecard__title { font-weight: 600; line-height: 1.25; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ecard__sub { color: var(--text-3); font-size: 13px; margin-top: 2px; }

.progress { display: block; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* ---------------------------------------------------------------- hero (Discover) */
.hero {
  position: relative; display: block;
  aspect-ratio: 4 / 5;
  max-height: 72dvh;
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  isolation: isolate;
  margin-top: 6px;
  background: radial-gradient(70% 55% at 50% 38%, rgba(197, 139, 255, .35), transparent 70%), linear-gradient(170deg, #2b1450, #0e0619);
}
.hero__art { position: absolute; inset: 0; z-index: -2; display: grid; place-items: center; }
.hero__art img { width: 100%; height: 100%; object-fit: cover; }
.hero__art .hero__mark { width: 58%; height: auto; object-fit: contain; margin-top: -22%; filter: drop-shadow(0 0 60px rgba(197, 139, 255, .55)); animation: breathe 9s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.04) rotate(8deg); } }
.hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(14, 6, 25, .96) 8%, rgba(14, 6, 25, .55) 42%, transparent 70%); }
.hero__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; display: grid; gap: 10px; justify-items: start; }
.hero__title { font: 600 clamp(32px, 9vw, 54px)/1.02 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.hero__tagline { color: var(--text-2); font-size: 16px; max-width: 46ch; }

.tagline-footer { text-align: center; margin: 44px auto 8px; font: italic 500 19px/1.4 var(--display); color: var(--text-2); max-width: 30ch; }
.tagline-footer span { font: 600 12px/2 var(--body); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }

/* ---------------------------------------------------------------- install card */
.install {
  display: flex; align-items: center; gap: 12px;
  margin-top: 18px; padding: 12px 12px 12px 14px;
  border-radius: var(--r);
  background: linear-gradient(135deg, rgba(197, 139, 255, .14), rgba(197, 139, 255, .04));
  border: 1px solid rgba(197, 139, 255, .25);
}
.install img { border-radius: 11px; }
.install__text { flex: 1; min-width: 0; display: grid; font-size: 13px; color: var(--text-2); }
.install__text strong { color: var(--text); font-size: 14px; }

/* ---------------------------------------------------------------- series page */
.shead { position: relative; display: grid; gap: 18px; justify-items: center; text-align: center; padding-top: 6px; }
.shead__glow {
  position: absolute; z-index: -1; inset: -60px calc(-1 * var(--gutter)) auto;
  height: 420px;
  background: radial-gradient(60% 60% at 50% 40%, rgba(164, 92, 242, .45), transparent 70%) center / cover;
  filter: blur(40px) saturate(140%);
  opacity: .8;
}
.shead__cover { width: min(62%, 260px); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .8), 0 0 0 1px var(--line); }
.shead__body { display: grid; gap: 10px; justify-items: center; }
.shead__title { font: 600 clamp(30px, 8vw, 46px)/1.04 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.shead__by { color: var(--text-3); font-size: 14px; }
.shead__tagline { color: var(--text-2); font-size: 16px; max-width: 44ch; font-style: italic; }
.shead__chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.shead__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

.liveline { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; max-width: 40ch; text-align: left; }
.liveline .icon { width: 18px; height: 18px; fill: var(--glow); }
.liveline strong { color: var(--glow); }
.pulse { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--live); animation: pulse 2.2s infinite; }

.callout {
  margin-top: 22px; padding: 14px 16px;
  display: grid; gap: 8px; justify-items: start;
  border-radius: var(--r);
  background: var(--surface); border: 1px solid rgba(197, 139, 255, .3);
}
.callout__label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.callout__title { font-weight: 600; }

.synopsis { color: var(--text-2); font-size: 15px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.synopsis.is-open { -webkit-line-clamp: unset; }

.elist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.erow {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px;
  padding: 14px 10px 14px 4px;
  border-radius: var(--r-sm);
  transition: background .2s;
}
.erow:hover { background: rgba(255, 255, 255, .04); }
.erow__num { font: 600 20px/1 var(--display); color: var(--text-3); text-align: center; }
.erow__body { display: grid; gap: 3px; min-width: 0; }
.erow__title { font-weight: 600; line-height: 1.3; }
.erow__desc { color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.erow__meta { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; }
.erow__meta .tag { height: 20px; font-size: 11px; padding: 0 8px; }
.erow__left { color: var(--accent); }
.erow .progress { margin-top: 6px; max-width: 220px; }
.erow__state { width: 20px; height: 20px; fill: var(--text-3); }
.erow__state--done { fill: var(--accent); }
.erow.is-locked .erow__title { color: var(--text-2); }
.erow.is-now { background: rgba(197, 139, 255, .09); }
.erow.is-now .erow__num, .erow.is-now .erow__title { color: var(--glow); }
.erow__eq { display: none; gap: 2px; align-items: flex-end; height: 16px; }
.erow__eq i { width: 3px; background: var(--accent); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.erow__eq i:nth-child(2) { animation-delay: -.4s; }
.erow__eq i:nth-child(3) { animation-delay: -.7s; }
.erow.is-playing .erow__eq { display: flex; }
.erow.is-playing .erow__state { display: none; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }

.cast { display: grid; justify-items: center; gap: 6px; text-align: center; }
.cast__avatar {
  width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 30% 25%, #6f3bb8, #2a1347);
  border: 1px solid var(--line-2);
  font: 600 26px/1 var(--display); color: var(--glow);
}
.cast__avatar img { width: 100%; height: 100%; object-fit: cover; }
.cast__avatar--lg { width: 112px; height: 112px; font-size: 36px; margin: 0 auto 12px; }
.cast__name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.cast__role { color: var(--text-3); font-size: 12px; line-height: 1.3; }
.charsheet { text-align: center; display: grid; gap: 10px; }
.charsheet__role { color: var(--accent); font-weight: 600; }
.charsheet__bio { color: var(--text-2); line-height: 1.6; text-align: left; }

/* ---------------------------------------------------------------- library */
.llist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lrow {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center;
  padding: 8px; border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
}
.lrow__cover { width: 64px; aspect-ratio: 1; border-radius: 12px; }
.lrow__cover .cover__title { font-size: 10px; }
.lrow__cover .cover__mark { display: none; }
.lrow__body { display: grid; gap: 2px; min-width: 0; }
.lrow__series { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.lrow__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow__sub { color: var(--text-3); font-size: 13px; }
.lrow .progress { margin-top: 6px; }
.lrow .iconbtn--play { width: 40px; height: 40px; }
.lrow__chev { transform: rotate(180deg); fill: var(--text-3); width: 20px; height: 20px; margin-right: 6px; }

.invite, .empty { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 48px 8px; max-width: 420px; margin: 0 auto; }
.invite img { filter: drop-shadow(0 0 24px rgba(197, 139, 255, .5)); }
.invite h2 { font: 600 26px/1.15 var(--display); }
.invite p, .empty p { color: var(--text-2); }

/* ---------------------------------------------------------------- account */
.auth { max-width: 400px; margin: 0 auto; padding: 12px 0 24px; display: grid; gap: 16px; text-align: center; }
.auth__logo { margin: 8px auto 0; filter: drop-shadow(0 0 24px rgba(197, 139, 255, .5)); }
.auth__title { font: 600 30px/1.1 var(--display); letter-spacing: -.01em; }
.auth__sub { color: var(--text-2); }
.auth__switch { color: var(--text-3); font-size: 14px; }
.form { display: grid; gap: 14px; text-align: left; margin-top: 4px; }
.form.is-busy { opacity: .7; }
.form__error { color: var(--danger); font-size: 14px; }
.form__fine { color: var(--text-3); font-size: 12px; text-align: center; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field__input {
  height: 50px; padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font: 16px var(--body); /* 16px stops iPhone zooming into the field */
  transition: border-color .2s, background .2s;
}
.field__input:focus { outline: none; border-color: var(--accent); background: rgba(197, 139, 255, .06); }
.mailart { width: 72px; height: 72px; margin: 4px auto 0; border-radius: 50%; display: grid; place-items: center; background: rgba(197, 139, 255, .16); }
.mailart .icon { width: 34px; height: 34px; fill: var(--glow); }

.segmented { display: flex; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin: 4px auto 0; width: 100%; max-width: 320px; }
.segmented button { flex: 1; height: 38px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--text-3); }
.segmented .is-on { background: var(--surface-2); color: var(--text); }

.profile { display: flex; align-items: center; gap: 14px; padding: 18px 2px; }
.profile__avatar {
  width: 60px; height: 60px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  font: 600 26px/1 var(--display); color: #1b0631;
}
.profile__name { font: 600 22px/1.2 var(--display); }
.profile__email { color: var(--text-3); font-size: 14px; }
.panel { margin-top: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.panel__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.panel__row + .panel__row { border-top: 1px solid var(--line); }
.panel__row--stack { flex-direction: column; align-items: stretch; }
.panel__row--stack .segmented { max-width: none; }
.panel__row--btn { width: 100%; color: var(--danger); font-weight: 600; justify-content: center; }
.panel__label { font-size: 13px; color: var(--text-3); }
.panel__value { font-weight: 600; }

/* ---------------------------------------------------------------- mini player */
.miniplayer {
  position: fixed; z-index: 45;
  left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r));
  bottom: calc(var(--tab-h) + var(--safe-b) + 8px);
  animation: rise .35s var(--ease);
}
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.mini {
  position: relative;
  height: var(--mini-h);
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px 8px 8px;
  border-radius: 18px;
  background: rgba(45, 26, 73, .92);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
  backdrop-filter: saturate(160%) blur(24px);
  border: 1px solid var(--line-2);
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .7);
  overflow: hidden;
  cursor: pointer;
}
.mini__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .08); }
.mini__bar span { display: block; height: 100%; background: var(--accent); transition: width .25s linear; }
.mini__cover { width: 48px; height: 48px; aspect-ratio: 1; border-radius: 10px; flex: none; }
.mini__cover .cover__title { font-size: 8px; }
.mini__cover .cover__mark { display: none; }
.mini__text { flex: 1; min-width: 0; }
.mini__title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini__sub { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini__loading { padding-left: 8px; color: var(--text-2); font-size: 14px; }
.mini .iconbtn--play { width: 40px; height: 40px; }

/* ---------------------------------------------------------------- full player */
.player {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform .38s var(--ease);
  overflow: hidden;
}
.player.is-open { transform: none; }
body.player-open { overflow: hidden; }
.player__bg {
  position: absolute; inset: -60px;
  background: radial-gradient(70% 50% at 50% 30%, rgba(164, 92, 242, .55), transparent 70%), linear-gradient(180deg, #2a1450, var(--bg) 75%);
  background-size: cover; background-position: center;
  filter: blur(60px) saturate(150%) brightness(.65);
}
.player__inner {
  position: relative; height: 100%;
  display: flex; flex-direction: column;
  max-width: 520px; margin: 0 auto;
  padding: calc(var(--safe-t) + 6px) calc(20px + var(--safe-r)) calc(var(--safe-b) + 18px) calc(20px + var(--safe-l));
  overflow-y: auto;
}
.player__top { display: flex; align-items: center; gap: 8px; }
.player__context { flex: 1; min-width: 0; text-align: center; display: grid; font-size: 12px; }
.player__context span { color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; font-size: 10px; }
.player__context a { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__cover {
  flex: none;
  width: min(100%, 40dvh);
  aspect-ratio: 1;
  margin: auto;
  border-radius: 22px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px var(--line);
}
.player__cover .cover__title { font-size: 28px; }
.player__meta { margin-top: 8px; }
.player__ep { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.player__title { font: 600 26px/1.15 var(--display); letter-spacing: -.01em; margin-top: 4px; text-wrap: balance; }

.player__scrub { margin-top: 18px; }
.player__scrub input[type=range] {
  --pct: 0%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; margin: 0;
  background: transparent; cursor: pointer;
}
.player__scrub input[type=range]::-webkit-slider-runnable-track {
  height: 5px; border-radius: 5px;
  background: linear-gradient(to right, var(--text) var(--pct), rgba(255, 255, 255, .2) var(--pct));
}
.player__scrub input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; margin-top: -5px;
  border-radius: 50%; background: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.player__scrub input[type=range]::-moz-range-track { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .2); }
.player__scrub input[type=range]::-moz-range-progress { height: 5px; border-radius: 5px; background: var(--text); }
.player__scrub input[type=range]::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: var(--text); }
.player__times { display: flex; justify-content: space-between; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

.player__controls { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.playbtn {
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--text); color: var(--bg);
  box-shadow: 0 14px 40px -12px rgba(240, 198, 255, .6);
  transition: transform .15s var(--ease);
}
.playbtn:active { transform: scale(.94); }
.playbtn .icon { width: 34px; height: 34px; }

.player__countdown {
  margin-top: 18px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  border-radius: var(--r);
  background: rgba(197, 139, 255, .14); border: 1px solid rgba(197, 139, 255, .3);
}
.player__countdown span { flex: 1; font-weight: 600; }
.player__extras { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }

/* ---------------------------------------------------------------- bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(6, 2, 12, .6); opacity: 0; transition: opacity .25s; }
.sheet-backdrop.is-open { opacity: 1; }
.sheet {
  position: fixed; z-index: 71;
  left: 0; right: 0; bottom: 0;
  max-height: 86dvh; overflow-y: auto;
  margin: 0 auto; max-width: 520px;
  padding: 10px calc(20px + var(--safe-r)) calc(24px + var(--safe-b)) calc(20px + var(--safe-l));
  border-radius: 24px 24px 0 0;
  background: var(--bg-2);
  border: 1px solid var(--line-2); border-bottom: 0;
  transform: translateY(100%);
  transition: transform .3s var(--ease);
}
.sheet.is-open { transform: none; }
.sheet__grip { width: 40px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 0 auto 16px; }
.sheet__title { font: 600 22px/1.2 var(--display); text-align: center; margin-bottom: 12px; }
.sheet__list { display: grid; gap: 4px; }
.sheet__item { padding: 14px 16px; border-radius: 12px; text-align: left; font-weight: 600; }
.sheet__item:hover { background: rgba(255, 255, 255, .05); }
.sheet__item.is-on { background: rgba(197, 139, 255, .16); color: var(--glow); }

.gate { display: grid; gap: 12px; text-align: center; padding-bottom: 4px; }
.gate__icon { width: 64px; height: 64px; margin: 0 auto 4px; border-radius: 50%; display: grid; place-items: center; background: rgba(197, 139, 255, .16); }
.gate__icon .icon { width: 30px; height: 30px; fill: var(--glow); }
.gate__title { font: 600 26px/1.15 var(--display); }
.gate__text { color: var(--text-2); margin-bottom: 6px; }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; z-index: 90;
  left: 50%; top: calc(var(--safe-t) + 12px);
  transform: translate(-50%, -20px);
  max-width: min(92vw, 440px);
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(45, 26, 73, .96);
  border: 1px solid var(--line-2);
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .7);
  font-size: 14px; font-weight: 500; text-align: center;
  opacity: 0; transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- skeletons */
.skeleton {
  border-radius: var(--r);
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton--hero { aspect-ratio: 4 / 5; max-height: 60dvh; margin-top: 6px; border-radius: var(--r-lg); }
.skeleton--cover { width: min(62%, 260px); aspect-ratio: 2 / 3; margin: 6px auto 20px; }
.skeleton--row { height: 64px; margin-top: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- page transitions */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .26s; animation-timing-function: var(--ease); }
html[data-nav="forward"]::view-transition-old(root) { animation-name: vt-out-left; }
html[data-nav="forward"]::view-transition-new(root) { animation-name: vt-in-right; }
html[data-nav="back"]::view-transition-old(root) { animation-name: vt-out-right; }
html[data-nav="back"]::view-transition-new(root) { animation-name: vt-in-left; }
@keyframes vt-out-left { to { opacity: 0; transform: translateX(-24px); } }
@keyframes vt-in-right { from { opacity: 0; transform: translateX(24px); } }
@keyframes vt-out-right { to { opacity: 0; transform: translateX(24px); } }
@keyframes vt-in-left { from { opacity: 0; transform: translateX(-24px); } }
/* Keep the persistent pieces still while pages slide. */
.tabbar { view-transition-name: tabbar; }
.miniplayer { view-transition-name: miniplayer; }

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

/* ---------------------------------------------------------------- tablet + laptop */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .rail { grid-auto-columns: 180px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}

@media (min-width: 900px) {
  :root { --side-w: 232px; --tab-h: 0px; --mini-h: 76px; --gutter: 36px; }

  .tabbar {
    top: 0; bottom: 0; right: auto;
    width: var(--side-w); height: auto;
    flex-direction: column; gap: 4px;
    padding: calc(var(--safe-t) + 24px) 14px 24px;
    border-top: 0; border-right: 1px solid var(--line);
    background: rgba(14, 6, 25, .7);
  }
  .tabbar__brand {
    display: flex; align-items: center; gap: 10px;
    padding: 0 10px 24px;
    font: 600 20px/1 var(--display);
  }
  .tabbar__brand img { filter: drop-shadow(0 0 12px rgba(197, 139, 255, .45)); }
  .tab { flex: none; flex-direction: row; justify-content: flex-start; gap: 14px; height: 46px; padding: 0 14px; border-radius: 12px; font-size: 15px; }
  .tab:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
  .tab.is-active { background: rgba(197, 139, 255, .12); }

  .topbar--brand .brand { visibility: hidden; }
  .topbar { padding-top: calc(var(--safe-t) + 12px); }

  .miniplayer { left: calc(var(--side-w) + 16px); right: 16px; bottom: 16px; }
  .mini { padding-right: 16px; }
  .mini__cover { width: 58px; height: 58px; }
  body.has-mini .view { padding-bottom: calc(var(--mini-h) + 48px); }

  .hero { aspect-ratio: 21 / 9; max-height: 460px; }
  .hero__art .hero__mark { width: auto; height: 82%; margin: 0 0 0 38%; }
  .hero__body { padding: 36px; max-width: 60%; }

  .shead { grid-template-columns: 260px 1fr; justify-items: start; text-align: left; align-items: end; gap: 32px; padding-top: 20px; }
  .shead__cover { width: 260px; }
  .shead__body { justify-items: start; }
  .shead__chips, .shead__actions { justify-content: flex-start; }

  .player__inner { max-width: 960px; display: grid; grid-template-columns: 1fr 1fr; align-content: center; column-gap: 56px; }
  .player__top { grid-column: 1 / -1; align-self: start; margin-bottom: 24px; }
  .player__cover { grid-column: 1; grid-row: 2 / span 6; width: 100%; margin: 0; align-self: center; }
  .player__inner > :not(.player__top):not(.player__cover) { grid-column: 2; }
  .player__meta { align-self: end; }
  .player__extras { justify-content: flex-start; align-self: start; }
  .player__controls, .player__scrub, .player__countdown { align-self: center; }
}

/* ---------------------------------------------------------------- about, contact, welcome */
.footlinks { display: flex; justify-content: center; gap: 22px; margin: 6px 0 12px; font-size: 13px; }
.footlinks a { color: var(--text-3); }
.footlinks a:hover { color: var(--text); }
.tabbar__foot { display: none; }
.prose { max-width: 640px; }
.prose h1 { font: 600 clamp(28px, 7vw, 40px)/1.1 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.prose h2 { font: 600 21px/1.25 var(--display); margin: 0 0 6px; }
.prose p { color: var(--text-2); line-height: 1.65; margin: 0 0 12px; }
.prose section { margin-top: 30px; }
.prose__hero { display: grid; gap: 14px; justify-items: center; text-align: center; padding-top: 10px; }
.prose__hero img { filter: drop-shadow(0 0 28px rgba(197, 139, 255, .55)); }
.prose__lead { font-size: 17px; max-width: 46ch; }
.prose__steps { display: grid; gap: 14px; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.step__n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(197, 139, 255, .16); color: var(--glow); font: 600 18px var(--display); }
.step p { margin: 0; }
.prose__cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 30px; }
.contacts { display: grid; gap: 10px; }
.contact { display: grid; gap: 4px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.contact:hover { border-color: rgba(197, 139, 255, .45); }
.contact__t { font-weight: 600; }
.contact__d { color: var(--text-3); font-size: 14px; }
.welcome { display: grid; gap: 12px; text-align: center; padding: 4px 4px 2px; }
.welcome__logo { margin: 0 auto; filter: drop-shadow(0 0 24px rgba(197, 139, 255, .55)); }
.welcome__title { font: 600 26px/1.15 var(--display); text-wrap: balance; }
.welcome__text { color: var(--text-2); line-height: 1.6; margin-bottom: 6px; }
@media (min-width: 900px) {
  .tabbar__foot { display: grid; gap: 8px; margin-top: auto; padding: 0 14px; font-size: 13px; }
  .tabbar__foot a { color: var(--text-3); }
  .tabbar__foot a:hover { color: var(--text); }
  .sheet { bottom: auto; top: 50%; transform: translateY(-40%) scale(.98); opacity: 0; border-radius: 24px; border-bottom: 1px solid var(--line-2); padding-bottom: 24px; transition: transform .3s var(--ease), opacity .25s; }
  .sheet.is-open { transform: translateY(-50%); opacity: 1; }
  .sheet__grip { display: none; }
}

/* ---------------------------------------------------------------- account: edit profile */
.panel__heading { font: 600 15px/1.2 var(--display); color: var(--text-2); margin: 22px 4px 0; }
.panel__main { min-width: 0; flex: 1; }
.panel__value { overflow-wrap: anywhere; }
.panel__note { margin-top: 6px; font-size: 13px; color: var(--text-3); line-height: 1.45; }
.panel__note .linkbtn { font-size: 13px; margin-left: 2px; }
.panel__btn { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--accent); background: rgba(197, 139, 255, .1); }
.panel__btn:hover { background: rgba(197, 139, 255, .18); }
.sheet__sub { color: var(--text-2); text-align: center; line-height: 1.5; margin: -4px auto 14px; max-width: 420px; }
.sheet__form { max-width: 420px; margin: 0 auto; }
.sheet .mailart { margin: 4px auto 12px; }
.sheet .mailart + .sheet__sub { margin-bottom: 18px; }

/* ---------------------------------------------------------------- payments: paywall, shop, wallet */
.paywall { display: grid; gap: 12px; }
.gate__fine { color: var(--text-3); font-size: 13px; margin-top: -4px; }
.gate__icon--warn { background: rgba(255, 120, 140, .14); }
.gate__icon--warn .icon { fill: var(--danger); }
.gate__icon.spin .icon { animation: coinspin 1.4s linear infinite; }
@keyframes coinspin { to { transform: rotateY(360deg); } }
.wallet { display: inline-flex; align-items: center; gap: 8px; justify-self: center; padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 205, 120, .1); color: #ffd98a; font-weight: 600; font-size: 14px; }
.wallet .icon, .coinicon { width: 18px; height: 18px; fill: #ffcd78; vertical-align: -3px; }
.shop { display: grid; gap: 8px; margin-top: 6px; text-align: left; }
.shop__h { font-size: 13px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-top: 6px; }
.shop__soon { color: var(--text-3); font-size: 13px; text-align: center; }
.offers { display: grid; gap: 8px; }
.offer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); text-align: left; width: 100%; }
.offer:hover { border-color: rgba(197, 139, 255, .45); }
.offer--main { background: linear-gradient(135deg, rgba(197, 139, 255, .22), rgba(124, 77, 255, .14)); border-color: rgba(197, 139, 255, .45); }
.offer__main { display: grid; gap: 2px; }
.offer__label { font-weight: 600; }
.offer__sub { color: var(--text-3); font-size: 13px; }
.offer__price { font-weight: 700; white-space: nowrap; }
.field-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
.field-row > *, .sheet__form > * { min-width: 0; }
.field__input { min-width: 0; width: 100%; }
.field__input--code { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
select.field__input { appearance: none; -webkit-appearance: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); line-height: 1.45; text-align: left; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.purchases summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.purchases ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.purchases li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.purchases li small { display: block; color: var(--text-3); font-size: 12px; }
.purchases__amt { font-weight: 600; white-space: nowrap; }
.purchases__amt.is-off { color: var(--text-3); font-weight: 500; }

/* ---------------------------------------------------------------- legal pages, consent lines */
.footlinks { flex-wrap: wrap; row-gap: 8px; }
.legal { padding-bottom: 40px; }
.legal h1 { font-size: clamp(26px, 6vw, 34px); margin-top: 8px; }
.legal__meta { color: var(--text-3); font-size: 13px; margin-top: 6px; }
.legal__note { font-size: 14px; color: var(--text-3); font-style: italic; }
.legal h2 { font-size: 19px; margin-top: 28px; }
.legal ul { color: var(--text-2); line-height: 1.6; padding-left: 20px; margin: 0 0 12px; display: grid; gap: 6px; }
.legal a { color: var(--accent); }
.legal strong { color: var(--text); font-weight: 600; }
.legal__summary { margin-top: 18px; padding: 16px 18px; border-radius: var(--r); background: rgba(197, 139, 255, .08); border: 1px solid rgba(197, 139, 255, .25); }
.legal__summary h2 { margin: 0 0 8px; font-size: 16px; }
.legal__summary ul { margin: 0; }
.legal__more { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.form__legal a, .check a, .shop__soon a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------- voice credit (series page) */
.voicecredit { margin: 14px 0 0; padding-left: 12px; border-left: 2px solid rgba(197, 139, 255, .45); color: var(--text-3); font-size: 13px; line-height: 1.55; font-style: italic; }

/* ---------------------------------------------------------------- search, explore, 18+ */
.searchbar {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 18px; padding: 0 6px 0 14px; height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line-2);
}
.searchbar:focus-within { border-color: var(--accent); background: rgba(197, 139, 255, .06); }
.searchbar > .icon { width: 20px; height: 20px; fill: var(--text-3); flex: none; }
.searchbar input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.searchbar input:focus { outline: none; }
.searchbar input::-webkit-search-cancel-button { display: none; }
.searchbar__clear { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: transparent; border: 0; color: var(--text-2); }
.searchbar__clear .icon { width: 18px; height: 18px; fill: currentColor; }

.chiprow { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 12px; padding: 2px var(--gutter); }
.chiprow::-webkit-scrollbar { display: none; }
.chiprow .chip { flex: none; border: 0; color: var(--text-2); cursor: pointer; }
.chiprow .chip.is-on { color: var(--glow); }
.chiprow .chip .icon { width: 14px; height: 14px; fill: currentColor; }

.explore__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 36px; font-size: 13px; }
.sortpick { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); margin-left: auto; }
.sortpick select {
  height: 34px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: var(--text); border: 1px solid var(--line-2);
  font: inherit; font-size: 13px; font-weight: 600;
}
.explore__more { display: flex; justify-content: center; margin-top: 18px; }
.explore__empty { grid-column: 1 / -1; padding: 24px 0; text-align: center; }

.tag--adult { background: rgba(255, 120, 140, .16); color: #ffb3c0; border: 1px solid rgba(255, 120, 140, .35); }
.tag--sm { height: 18px; padding: 0 6px; font-size: 10px; vertical-align: 1px; }
a.tag { text-decoration: none; }
.adultnote { color: var(--text-2); font-size: 13px; margin-top: 10px; }
.taglist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.gate [data-warn] { margin-top: 2px; color: var(--text-2); }
