/* ============ ShoShows — Short Drama Frontend ============ */
:root {
  --bg: #0b0b12;
  --bg-elev: #14141f;
  --bg-card: #1a1a28;
  --text: #f2f2f7;
  --text-dim: #9a9ab0;
  --text-faint: #62627a;
  --accent: #ff3d6e;
  --accent-2: #ff7a45;
  --gold: #ffc94d;
  --radius: 14px;
  --nav-h: 62px;
  --max-w: 480px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  background: #000;
  color: var(--text);
  font-family: var(--font);
  overscroll-behavior: none;
  overflow-x: hidden;
}

#app {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 80px rgba(0,0,0,.8);
}

.view {
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + 18px);
  animation: view-in .28s ease;
}
.view.no-pad { padding-bottom: 0; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  margin: 0 auto;
  width: 100%;
  max-width: var(--max-w);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: rgba(15, 15, 24, .92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,255,255,.06);
  z-index: 50;
}
.bottom-nav.hidden { display: none; }
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 600;
  transition: color .15s;
}
.nav-item svg { width: 23px; height: 23px; fill: currentColor; }
.nav-item.active { color: var(--text); }
.nav-item.active svg { fill: url(#nav-grad), var(--accent); }
.nav-item.active { color: var(--accent); }

/* ---------- Header ---------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding:
    calc(18px + env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    10px
    max(16px, env(safe-area-inset-left, 0px));
}
.brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 201, 77, .25);
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------- Hero carousel ---------- */
.hero-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 16px 4px;
  scrollbar-width: none;
}
.hero-strip::-webkit-scrollbar { display: none; }
.hero-card {
  position: relative;
  flex: 0 0 88%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  scroll-snap-align: center;
  display: block;
}
.hero-card .poster-art { position: absolute; inset: 0; }
.hero-card .hero-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(5,5,10,.92), transparent);
}
.hero-info h2 { font-size: 20px; margin-bottom: 3px; }
.hero-info p { font-size: 12.5px; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hero-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 7px;
  letter-spacing: .04em;
}

/* ---------- Sections & rails ---------- */
.section { margin-top: 22px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 16px 10px;
}
.section-head h3 { font-size: 17px; }
.section-head a { font-size: 12.5px; color: var(--text-faint); font-weight: 600; }

.rail {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  padding: 0 16px 6px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }

.card {
  flex: 0 0 118px;
  display: block;
}
.card .poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 7px;
  transition: transform .18s ease;
}
.card:active .poster-wrap { transform: scale(.96); }
.card .title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .meta { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.poster-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.poster-art svg { width: 100%; height: 100%; display: block; }

.ep-count {
  position: absolute;
  top: 7px; left: 7px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  padding: 3px 7px;
  border-radius: 6px;
  color: #fff;
}
.rank-num {
  position: absolute;
  bottom: -6px; right: 2px;
  font-size: 44px;
  font-weight: 900;
  font-style: italic;
  color: rgba(255,255,255,.92);
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
  line-height: 1;
}

/* Grid (discover / my list) */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 11px;
  padding: 4px 16px;
}
.grid .card { flex: none; }

/* ---------- Search & chips ---------- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 4px 16px 14px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 11px 14px;
}
.search-bar svg { width: 17px; height: 17px; stroke: var(--text-faint); flex: none; }
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
}
.search-bar input::placeholder { color: var(--text-faint); }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 16px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.07);
  padding: 7px 15px;
  border-radius: 999px;
  transition: all .15s;
}
.chip.active {
  color: #fff;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.empty-state {
  text-align: center;
  color: var(--text-faint);
  padding: 70px 30px;
  font-size: 14px;
  line-height: 1.6;
}
.empty-state .big { font-size: 40px; margin-bottom: 12px; }

/* ---------- Series detail ---------- */
.detail-hero {
  position: relative;
  aspect-ratio: 4 / 4.4;
  overflow: hidden;
}
.detail-hero .poster-art { position: absolute; inset: 0; }
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 4%, rgba(11,11,18,.25) 45%, rgba(11,11,18,.3));
}
.back-btn {
  position: absolute;
  top: 14px; left: 12px;
  z-index: 5;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-btn svg { width: 20px; height: 20px; stroke: #fff; }

.detail-body { position: relative; margin-top: -74px; z-index: 4; padding: 0 18px; }
.detail-body h1 { font-size: 25px; line-height: 1.2; }
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 9px 0 13px;
  font-size: 12px;
  color: var(--text-dim);
}
.detail-meta .dot::before { content: "·"; margin-right: 7px; color: var(--text-faint); }
.tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 61, 110, .12);
  border: 1px solid rgba(255, 61, 110, .3);
  padding: 3px 9px;
  border-radius: 6px;
}
.rating { color: var(--gold); font-weight: 700; }

.synopsis {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-dim);
}
.synopsis.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.more-toggle { color: var(--accent); font-size: 12.5px; font-weight: 700; margin-top: 4px; }

.action-row {
  display: flex;
  gap: 10px;
  margin: 18px 0 8px;
}
.btn-primary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 14px;
  border-radius: 13px;
  box-shadow: 0 6px 22px rgba(255, 61, 110, .35);
  transition: transform .15s;
}
.btn-primary:active { transform: scale(.97); }
.btn-primary svg { width: 18px; height: 18px; fill: #fff; }
.btn-ghost {
  width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-dim);
}
.btn-ghost svg { width: 20px; height: 20px; fill: currentColor; }
.btn-ghost.on { color: var(--accent); border-color: rgba(255,61,110,.4); }

.ep-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 4px 0 10px;
}
.ep-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dim);
  transition: all .13s;
}
.ep-cell:active { transform: scale(.93); }
.ep-cell.watched { color: var(--text-faint); background: rgba(255,255,255,.03); }
.ep-cell.current {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
}
.ep-cell .lock {
  position: absolute;
  top: 3px; right: 4px;
  font-size: 8.5px;
  color: var(--gold);
}

/* ---------- Player ---------- */
.player {
  position: fixed;
  inset: 0;
  margin: 0 auto;
  width: 100%;
  max-width: var(--max-w);
  z-index: 100;
  background: #000;
}
.player-feed {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.player-feed::-webkit-scrollbar { display: none; }

.ep-slide {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}

.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.scene .scene-bg {
  position: absolute;
  inset: -12%;
  background-size: cover;
  filter: saturate(1.15);
}
.scene.playing .scene-bg { animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.14) translate(2.5%, -2%); }
}
.ep-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.side-btn.muted { opacity: .75; }
.scene .grain {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.scene .vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 40%, rgba(0,0,0,.55) 100%),
    linear-gradient(to top, rgba(0,0,0,.65), transparent 30%),
    linear-gradient(to bottom, rgba(0,0,0,.45), transparent 22%);
  pointer-events: none;
}
.scene .flare {
  position: absolute;
  width: 60vmin; height: 60vmin;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  pointer-events: none;
}
.scene.playing .flare { animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate(-8%, 4%) scale(1); }
  to   { transform: translate(14%, -10%) scale(1.25); }
}

/* dialogue captions */
.captions {
  position: absolute;
  left: 0; right: 0;
  bottom: 128px;
  padding: 0 68px 0 18px;
  pointer-events: none;
  transition: bottom .35s ease, padding .35s ease;
}

/* ---- clear-screen mode: chrome melts away while playing ---- */
.player-top, .side-actions, .player-bottom .row {
  transition: opacity .35s ease;
}
.ep-slide.chrome-hidden .player-top,
.ep-slide.chrome-hidden .side-actions,
.ep-slide.chrome-hidden .player-bottom .row {
  opacity: 0;
  pointer-events: none;
}
.ep-slide.chrome-hidden .player-bottom { background: none; }
.ep-slide.chrome-hidden .progress-track {
  height: 2px;
  opacity: .55;
  margin-bottom: 2px;
}
.ep-slide.chrome-hidden .captions {
  bottom: 54px;
  padding: 0 22px 0 18px; /* side rail is gone — captions can breathe */
}
.progress-track { transition: height .3s ease, opacity .3s ease, margin .3s ease; }
.cap-line {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease;
}
.cap-line.show { opacity: 1; transform: none; }
.cap-speaker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 5px;
  text-shadow: 0 1px 8px rgba(0,0,0,.8);
}
.cap-text {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.85);
}

/* player chrome */
.player-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent);
}
.player-top .ptitle { flex: 1; min-width: 0; }
.player-top .ptitle .s { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-top .ptitle .e { font-size: 11.5px; color: rgba(255,255,255,.65); margin-top: 1px; }
.icon-btn {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-btn svg { width: 19px; height: 19px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* fullscreen is a desktop affordance; phones are already full-screen */
@media (max-width: 559px) {
  .fs-btn { display: none; }
}
/* theater mode: pure black stage around the phone column */
:fullscreen body, :fullscreen #app { background: #000; }

.side-actions {
  position: absolute;
  right: 10px;
  bottom: 118px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 10;
}
.side-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.side-btn svg { width: 30px; height: 30px; fill: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); transition: transform .15s; }
.side-btn:active svg { transform: scale(1.25); }
.side-btn.on svg { fill: var(--accent); }
.side-btn.on-gold svg { fill: var(--gold); }

.speed-ico {
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #fff;
  border-radius: 50%;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: #fff;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
  transition: transform .15s;
}
.side-btn:active .speed-ico { transform: scale(1.15); }

.speed-sheet { text-align: center; }
.speed-opts {
  display: flex;
  gap: 9px;
  padding: 4px 0 8px;
}
.speed-opt {
  flex: 1;
  padding: 13px 0;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 800;
  transition: all .15s;
}
.speed-opt:active { transform: scale(.94); }
.speed-opt.active {
  color: #fff;
  background: linear-gradient(110deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(255, 61, 110, .35);
}

.player-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
}
.progress-hit {
  padding: 14px 0 8px;
  margin: -14px 0 -6px;
  touch-action: none;
  cursor: pointer;
}
.progress-track {
  position: relative;
  height: 3px;
  border-radius: 4px;
  background: rgba(255,255,255,.22);
  margin-bottom: 10px;
  transition: height .15s ease;
}
.progress-fill {
  position: relative;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
}
.progress-fill::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.5);
  transition: transform .15s ease;
}
.player-bottom.scrubbing .progress-track { height: 7px; }
.player-bottom.scrubbing .progress-fill::after { transform: translateY(-50%) scale(1); }
.scrub-bubble {
  position: absolute;
  bottom: 52px;
  transform: translateX(-50%);
  display: none;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 9px;
  white-space: nowrap;
  pointer-events: none;
}
.player-bottom .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: rgba(255,255,255,.75);
  font-weight: 600;
}

.pause-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 74px; height: 74px;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.pause-badge.show { opacity: 1; }
.pause-badge svg { width: 32px; height: 32px; fill: #fff; margin-left: 4px; }

.boost-badge {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  padding: 7px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.boost-badge.show { opacity: 1; }

.seek-ind {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
  background: rgba(0,0,0,.35);
  padding: 14px 18px;
  border-radius: 999px;
  pointer-events: none;
  animation: seek-pop .6s ease forwards;
}
.seek-ind.left { left: 26px; }
.seek-ind.right { right: 26px; }
@keyframes seek-pop {
  0% { opacity: 0; scale: .7; }
  25% { opacity: 1; scale: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

/* locked overlay */
.locked-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 34px;
  text-align: center;
  background: rgba(6, 6, 12, .72);
  backdrop-filter: blur(14px);
}
.locked-overlay .lock-ico { font-size: 40px; margin-bottom: 4px; }
.locked-overlay h3 { font-size: 19px; }
.locked-overlay p { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-bottom: 12px; }
.locked-overlay .btn-primary { flex: none; width: 100%; max-width: 280px; }
.btn-outline {
  width: 100%;
  max-width: 280px;
  padding: 13px;
  border-radius: 13px;
  border: 1.5px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-top: 4px;
}

/* end-of-episode paywall (next episode locked) */
.end-paywall {
  position: absolute;
  inset: 0;
  z-index: 13;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(5,5,12,.55) 40%, transparent 75%);
  animation: fade-in .25s ease;
}
.pw-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  text-align: center;
  padding: 24px 20px calc(26px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-elev);
  border-top: 1px solid rgba(255,255,255,.08);
  border-radius: 22px 22px 0 0;
  animation: slide-up .3s ease;
}
.pw-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--text-dim);
  font-size: 13px;
}
.pw-eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--accent-2);
}
.pw-sheet h3 { font-size: 18.5px; }
.pw-balance { font-size: 13px; color: var(--text-dim); }
.pw-balance b { color: var(--gold); }
.pw-sheet .btn-primary,
.pw-sheet .btn-outline { flex: none; width: 100%; max-width: 300px; margin-top: 0; }
.pw-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.pw-toggle input { display: none; }
.pw-toggle .switch {
  width: 38px; height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  position: relative;
  transition: background .2s;
}
.pw-toggle .switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.pw-toggle input:checked + .switch { background: linear-gradient(100deg, var(--accent), var(--accent-2)); }
.pw-toggle input:checked + .switch::after { transform: translateX(16px); }

/* episodes drawer */
.drawer-scrim {
  position: fixed;
  inset: 0;
  margin: 0 auto;
  width: 100%;
  max-width: var(--max-w);
  z-index: 120;
  background: rgba(0,0,0,.5);
  animation: fade-in .2s ease;
}
@keyframes fade-in { from { opacity: 0; } }
.drawer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--bg-elev);
  border-radius: 20px 20px 0 0;
  padding: 14px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  max-height: 62%;
  overflow-y: auto;
  animation: slide-up .25s ease;
}
@keyframes slide-up { from { transform: translateY(40%); opacity: .4; } }
.drawer h3 { font-size: 16px; margin: 4px 0 14px; }
.drawer .handle {
  width: 38px; height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,.2);
  margin: 0 auto 10px;
}

/* account sign-in */
.auth-sheet {
  max-height: min(760px, calc(100dvh - env(safe-area-inset-top, 0px) - 18px));
  padding: 14px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.auth-brand {
  display: inline-block;
  margin: 2px 0 12px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.04em;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-sheet h3 { margin-bottom: 6px; font-size: 20px; }
.auth-sub {
  max-width: 300px;
  margin: 0 auto 18px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.45;
}
.auth-providers { display: flex; flex-direction: column; gap: 10px; }
.auth-provider {
  position: relative;
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.16);
  transition: transform .12s, opacity .12s;
}
.auth-provider:not(:disabled):active { transform: scale(.98); }
.auth-provider.google { background: #fff; color: #202124; border-color: #747775; }
.auth-provider.facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.auth-provider.apple { background: #050505; color: #fff; }
.auth-provider:disabled { opacity: .46; cursor: default; }
.provider-mark {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 900;
}
.google .provider-mark { color: #4285f4; background: #fff; }
.facebook .provider-mark { color: #1877f2; background: #fff; font-family: Arial, sans-serif; }
.provider-soon {
  position: absolute;
  right: 12px;
  color: var(--text-faint);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 15px 0;
  color: var(--text-faint);
  font-size: 11px;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.08);
}
.auth-email {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.auth-email:disabled { opacity: .55; cursor: default; }
.auth-email:not(:disabled):active { transform: scale(.98); }
.auth-email span { margin-left: 6px; color: var(--text-faint); font-size: 10px; text-transform: uppercase; }
.auth-back {
  position: absolute; left: 16px; top: 22px;
  color: var(--text-dim); font-size: 13px; font-weight: 700;
}
.auth-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.auth-form label { color: var(--text-dim); font-size: 12px; font-weight: 700; }
.auth-form input {
  width: 100%; min-height: 50px; margin-top: 7px; padding: 0 14px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  background: var(--bg-card); color: var(--text); font-size: 16px; outline: none;
}
.auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,61,110,.12); }
.auth-form .auth-code { margin-top: 0; text-align: center; font-size: 26px; font-weight: 800; letter-spacing: .28em; padding-left: calc(14px + .28em); }
.auth-submit { width: 100%; min-height: 48px; border-radius: 12px; }
.auth-submit:disabled { opacity: .55; }
.auth-form-error { margin: -3px 2px 0; color: #ff9bb3; font-size: 12px; line-height: 1.4; }
.auth-dev-note { margin: -4px 0 0; text-align: center; color: var(--text-dim); font-size: 11px; }
.auth-dev-link { text-align: center; color: var(--accent-2); font-size: 12px; font-weight: 700; }
.auth-link-state {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 28px;
}
.auth-link-state .big {
  margin-bottom: 24px;
  font-size: 54px;
  line-height: 1;
}
.auth-link-state h2 {
  max-width: 340px;
  color: var(--text);
  font-size: 27px;
  line-height: 1.18;
}
.auth-link-state p {
  max-width: 330px;
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.5;
}
.auth-link-state .btn-primary {
  flex: none;
  width: min(100%, 240px);
  min-height: 50px;
  margin-top: 28px;
  padding: 13px 22px;
  display: inline-flex;
  text-decoration: none;
}
.auth-resend { margin: 13px auto 0; color: var(--accent-2); font-size: 12.5px; font-weight: 700; }
.auth-resend:disabled { color: var(--text-faint); }
.auth-api-note {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 201, 77, .08);
  border: 1px solid rgba(255, 201, 77, .15);
  color: rgba(255, 221, 150, .72);
  font-size: 11px;
  line-height: 1.4;
}
.auth-guest {
  display: block;
  margin: 12px auto 3px;
  padding: 10px 16px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
}
.auth-legal { color: var(--text-faint); font-size: 10.5px; line-height: 1.45; }

/* daily check-in */
.daily-sheet { text-align: center; }
.daily-sub { font-size: 12.5px; color: var(--text-dim); margin: 4px 0 14px; }
.daily-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-bottom: 16px;
}
.daily-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 11px 4px 9px;
  border-radius: 13px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.07);
}
.daily-tile .d { font-size: 10px; font-weight: 700; color: var(--text-faint); }
.daily-tile .c { font-size: 17px; line-height: 1.2; }
.daily-tile .amt { font-size: 12.5px; font-weight: 800; color: var(--gold); }
.daily-tile.claimed { opacity: .45; }
.daily-tile.claimed .c { color: #4ade80; font-weight: 900; }
.daily-tile.today {
  border-color: rgba(255, 61, 110, .55);
  background: rgba(255, 61, 110, .1);
  box-shadow: 0 0 14px rgba(255, 61, 110, .25);
}
.daily-tile.today .d { color: var(--accent); }
.daily-tile.big {
  grid-column: span 2;
  background: linear-gradient(115deg, rgba(255, 201, 77, .07), rgba(255, 122, 69, .05));
  border-color: rgba(255,255,255,.07); /* same as regular tiles — only "today" gets a colored border */
}
.daily-tile.big.today {
  border-color: var(--gold);
  background: linear-gradient(115deg, rgba(255, 201, 77, .16), rgba(255, 122, 69, .12));
  box-shadow: 0 0 16px rgba(255, 201, 77, .3);
}
.daily-tile.big.today .d { color: var(--gold); }
.daily-btn { width: 100%; flex: none; }
.daily-success {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 13px;
  background: linear-gradient(100deg, rgba(255,61,110,.18), rgba(255,122,69,.16));
  border: 1px solid rgba(255,122,69,.28);
  color: #fff;
  animation: daily-success-pop .32s cubic-bezier(.34,1.45,.64,1);
}
.daily-success-check {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #4ade80;
  color: #102417;
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 0 18px rgba(74,222,128,.35);
}
@keyframes daily-success-pop {
  from { opacity: 0; transform: scale(.92); }
}
.drawer-scrim.daily-closing {
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.drawer-scrim.daily-closing .drawer {
  transform: translateY(18%);
  transition: transform .18s ease;
}

@media (prefers-reduced-motion: reduce) {
  .daily-success { animation: none; }
}

/* ---------- wallet / store ---------- */
.wallet-actions { display: flex; gap: 8px; }
.wallet-actions .ghost {
  background: none;
  border: 1.5px solid rgba(255, 201, 77, .5);
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  padding: 9px 14px;
  border-radius: 10px;
}
.vip-chip {
  display: inline-block;
  vertical-align: 2px;
  background: linear-gradient(100deg, #ffc94d, #ff9f45);
  color: #241a05;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 6px;
}
.vip-banner {
  margin: 12px 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(115deg, rgba(255,201,77,.1), rgba(255,122,69,.06));
  border: 1px solid rgba(255,201,77,.25);
}
.vip-banner.active { border-color: rgba(255,201,77,.6); }
.vip-banner .v-t { font-size: 14.5px; font-weight: 800; color: var(--gold); }
.vip-banner .v-b { font-size: 12px; color: var(--text-dim); margin-top: 3px; line-height: 1.5; }
.vip-row { display: flex; gap: 10px; padding: 0 16px; }
.vip-card {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 16px 6px 13px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.08);
}
.vip-card.pop { border-color: rgba(255,201,77,.55); }
.vip-card .badge, .pkg-card .badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .05em;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.vip-card .v-name { font-size: 12.5px; font-weight: 800; }
.vip-card .v-price { font-size: 18px; font-weight: 900; color: var(--gold); }
.vip-card .v-per { font-size: 10px; color: var(--text-faint); }
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 10px;
  padding: 4px 16px;
}
.pkg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 15px 4px 11px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .12s;
}
.pkg-card:active { transform: scale(.95); }
.pkg-card.pop { border-color: rgba(255,61,110,.5); }
.pkg-card .p-coins { font-size: 13.5px; font-weight: 800; }
.pkg-card .p-bonus { font-size: 10px; font-weight: 700; color: #4ade80; }
.pkg-card .p-price { font-size: 13px; font-weight: 900; color: var(--gold); margin-top: 3px; }
.first-tag {
  font-size: 10.5px;
  font-weight: 800;
  color: #4ade80;
  background: rgba(74,222,128,.1);
  border: 1px solid rgba(74,222,128,.35);
  padding: 3px 9px;
  border-radius: 999px;
}
.tx-list { margin: 0 16px; background: var(--bg-card); border-radius: 14px; overflow: hidden; }
.tx-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 15px;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.tx-row:last-child { border-bottom: none; }
.tx-k { color: var(--text-dim); font-weight: 600; }
.tx-d { font-weight: 800; }
.tx-d.plus { color: #4ade80; }
.tx-d.minus { color: var(--text-dim); }
.demo-note {
  font-size: 10.5px;
  color: var(--text-faint);
  text-align: center;
  padding: 16px 30px 4px;
  line-height: 1.5;
}
.btn-outline.gold { border-color: rgba(255,201,77,.5); color: var(--gold); }
.batch-btn { width: 100%; max-width: none; margin-top: 4px; font-size: 13px; }

/* ---------- earn / missions ---------- */
.earn-sub { font-size: 12.5px; color: var(--text-dim); padding: 0 16px 14px; margin-top: -4px; }
.mission-list { display: flex; flex-direction: column; gap: 9px; padding: 0 16px; }
.mission-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 12px 13px;
}
.mission-row.done { opacity: .55; }
.mission-row .m-ico {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.mission-row .m-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mission-row .m-t { font-size: 13.5px; font-weight: 700; }
.mission-row .m-p { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.m-btn {
  flex: none;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--text-dim);
}
.m-btn.claim {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 3px 12px rgba(255,61,110,.35);
  animation: claim-pulse 1.6s ease infinite;
}
@keyframes claim-pulse { 50% { transform: scale(1.06); } }
.m-btn.off { background: none; color: var(--text-faint); }
.m-btn.ghost { border: 1px solid rgba(255,255,255,.15); background: none; }

/* ---------- history ---------- */
.hist-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.hist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 10px;
}
.hist-row .h-poster {
  position: relative;
  width: 52px;
  aspect-ratio: 3/4;
  flex: none;
  border-radius: 9px;
  overflow: hidden;
}
.hist-row .h-poster svg { width: 100%; height: 100%; display: block; }
.hist-row .h-txt { flex: 1; min-width: 0; }
.hist-row .h-t { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-row .h-m { font-size: 11px; color: var(--text-faint); margin: 3px 0 7px; }
.hist-row .h-bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.hist-row .h-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.hist-row .h-play {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
}

/* ---------- For You feed ---------- */
.foryou {
  position: fixed;
  inset: 0;
  margin: 0 auto;
  width: 100%;
  max-width: var(--max-w);
  z-index: 40; /* under the bottom nav (50) */
  background: #000;
}
.fy-feed {
  height: calc(100dvh - var(--nav-h) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.fy-feed::-webkit-scrollbar { display: none; }
.fy-card {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}
.fy-info {
  position: absolute;
  left: 0; right: 74px; bottom: 0;
  padding: 0 0 22px 16px;
  z-index: 5;
}
.fy-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.fy-info h2 { font-size: 22px; line-height: 1.15; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.fy-tag { font-size: 12.5px; color: rgba(255,255,255,.8); margin-top: 4px; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.fy-quote {
  font-size: 12px;
  color: rgba(255,255,255,.65);
  font-style: italic;
  margin-top: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fy-cta {
  display: inline-flex;
  margin-top: 13px;
  padding: 12px 22px;
  font-size: 13.5px;
  flex: none;
}
.fy-side { bottom: 30px; }

/* ---------- onboarding ---------- */
.onboard-scrim {
  position: fixed;
  inset: 0;
  margin: 0 auto;
  width: 100%;
  max-width: var(--max-w);
  z-index: 400;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in .3s ease;
}
.onboard {
  width: 100%;
  padding: 30px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.ob-logo {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.onboard h2 { font-size: 21px; }
.onboard p { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.ob-grid { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-bottom: 18px; }
.ob-chip {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1.5px solid rgba(255,255,255,.1);
  padding: 10px 18px;
  border-radius: 999px;
  transition: all .15s;
}
.ob-chip.on {
  color: #fff;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  border-color: transparent;
}
.ob-done { width: 100%; max-width: 300px; flex: none; }
.ob-skip { color: var(--text-faint); font-size: 13px; font-weight: 600; padding: 12px; }

/* notification center */
.notif-groups { padding: 0 0 24px; }
.notif-group + .notif-group { margin-top: 20px; }
.notif-group > h2 {
  margin: 0 16px 8px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 4px 16px;
}
.notif-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.07);
  text-align: left;
  transition: transform .12s;
}
.notif-item:active { transform: scale(.98); }
.notif-item.unread {
  border-color: rgba(255, 61, 110, .3);
  background: rgba(255, 61, 110, .06);
}
.notif-item .n-ico {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.notif-item .n-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.notif-item .n-t { font-size: 13.5px; font-weight: 700; }
.notif-item .n-b { font-size: 12px; color: var(--text-dim); line-height: 1.45; }
.notif-item .n-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  color: #ff7397;
  font-size: 11.5px;
  font-weight: 800;
}
.notif-item .n-action span { font-size: 17px; line-height: 10px; }
.notif-item.notif-daily .n-ico,
.notif-item.notif-streak .n-ico { background: rgba(255, 184, 61, .12); }
.notif-item.notif-promoVip {
  border-color: rgba(255, 190, 70, .2);
  background: linear-gradient(110deg, rgba(255, 190, 70, .08), rgba(255, 61, 110, .06));
}
.notif-item.notif-promoVip .n-action { color: #ffc857; }
.notif-item .n-time { flex: none; font-size: 10.5px; color: var(--text-faint); margin-top: 2px; padding-right: 10px; }
.notif-item .n-dot {
  position: absolute;
  top: 12px; right: 12px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* unclaimed-reward badges */
.mi-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 7px;
  flex: none;
}
.nav-item { position: relative; }
.nav-item.notify::after {
  content: "";
  position: absolute;
  top: 9px;
  left: calc(50% + 8px);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

/* language settings */
.language-page {
  height: 100dvh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.language-header {
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(58px + env(safe-area-inset-top, 0px));
  padding: calc(12px + env(safe-area-inset-top, 0px)) 58px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.language-header h1 { font-size: 20px; }
.language-back {
  position: absolute;
  left: max(16px, env(safe-area-inset-left, 0px));
  bottom: 8px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-card);
  font-size: 31px;
  line-height: 1;
}
[dir="rtl"] .language-back { left: auto; right: max(16px, env(safe-area-inset-right, 0px)); transform: scaleX(-1); }
.language-search {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 8px;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 13px;
  background: var(--bg-card);
}
.language-search svg { width: 18px; height: 18px; stroke: var(--text-faint); flex: none; }
.language-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.language-search input::placeholder { color: var(--text-faint); }
.language-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  overscroll-behavior: contain;
  padding: 3px 10px calc(26px + env(safe-area-inset-bottom, 0px)) 16px;
  scrollbar-width: auto;
  scrollbar-color: var(--accent) rgba(255,255,255,.10);
}
.language-scroll::-webkit-scrollbar { width: 11px; }
.language-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,.08); border-radius: 10px; }
.language-scroll::-webkit-scrollbar-thumb {
  min-height: 54px;
  border: 2px solid var(--bg);
  border-radius: 10px;
  background: linear-gradient(var(--accent), var(--accent-2));
}
[dir="rtl"] .language-scroll { padding-left: 10px; padding-right: 16px; }
.language-section { margin-top: 12px; }
.language-section + .language-section { margin-top: 24px; }
.language-section h2 {
  margin: 0 4px 9px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.language-options { display: flex; flex-direction: column; gap: 7px; }
.language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.07);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  transition: all .15s;
}
.language-option:active { transform: scale(.99); }
.language-option.active { border-color: rgba(255,61,110,.52); background: rgba(255,61,110,.10); }
.language-flag { font-size: 21px; flex: none; }
.language-name { min-width: 0; flex: 1; }
.language-device {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.language-check { margin-left: 2px; color: var(--accent); font-size: 18px; font-weight: 900; }
.language-empty { padding: 56px 20px; color: var(--text-faint); text-align: center; }
[dir="rtl"] .language-option { text-align: right; }

/* feedback */
.feedback-page { padding: 0; overflow: hidden; }
.feedback-header { position: relative; }
.feedback-scroll {
  height: calc(100dvh - 64px);
  overflow-y: auto;
  padding: 8px 16px calc(30px + env(safe-area-inset-bottom, 0px));
}
.feedback-intro { margin: 10px 0 22px; }
.feedback-intro h2 { font-size: 22px; line-height: 1.2; }
.feedback-intro p { margin-top: 7px; color: var(--text-faint); font-size: 13px; line-height: 1.55; }
.feedback-form { display: flex; flex-direction: column; gap: 17px; }
.feedback-form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 750; }
.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
}
.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus { border-color: rgba(255,61,110,.62); box-shadow: 0 0 0 3px rgba(255,61,110,.10); }
.feedback-form textarea { min-height: 145px; resize: vertical; line-height: 1.5; }
.feedback-form select { appearance: auto; }
.feedback-form .required { color: var(--accent); margin-left: 3px; }
.feedback-diagnostics { color: var(--text-faint); font-size: 11.5px; line-height: 1.45; }
.feedback-error { padding: 11px 13px; border-radius: 11px; background: rgba(255,77,101,.12); color: #ff9bab; font-size: 12.5px; }
.feedback-submit { width: 100%; min-height: 48px; }
.feedback-submit:disabled { opacity: .55; }
.feedback-form[hidden],
.feedback-success[hidden] { display: none; }
.feedback-scroll.is-success { overflow: hidden; }
.feedback-scroll.is-success .feedback-intro { display: none; }
.feedback-success {
  min-height: 100%;
  padding: 24px 12px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.feedback-success > div { width: 58px; height: 58px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: rgba(55,210,135,.15); color: #55e59e; font-size: 30px; font-weight: 900; }
.feedback-success h2 { font-size: 22px; }
.feedback-success p { margin: 8px auto 24px; max-width: 310px; color: var(--text-faint); font-size: 13px; line-height: 1.55; }
.feedback-success .btn-primary { flex: none; min-width: 150px; min-height: 48px; display: inline-flex; justify-content: center; text-decoration: none; }
[dir="rtl"] .feedback-form label { text-align: right; }

/* ---------- Modal ---------- */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  animation: fade-in .18s ease;
}
.modal {
  width: 100%;
  max-width: 330px;
  background: var(--bg-elev);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 26px 22px 20px;
  text-align: center;
  animation: pop-in .22s cubic-bezier(.34,1.4,.64,1);
}
@keyframes pop-in { from { transform: scale(.88); opacity: 0; } }
.modal .m-ico { font-size: 38px; margin-bottom: 10px; }
.modal h3 { font-size: 18px; margin-bottom: 7px; }
.modal p { font-size: 13px; color: var(--text-dim); line-height: 1.55; margin-bottom: 18px; }
.modal .btn-primary { width: 100%; }
.modal .btn-plain { width: 100%; padding: 12px; margin-top: 6px; color: var(--text-faint); font-size: 13.5px; font-weight: 600; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 26px);
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(30, 30, 46, .96);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 999px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Profile ---------- */
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding:
    calc(24px + env(safe-area-inset-top, 0px))
    max(18px, env(safe-area-inset-right, 0px))
    20px
    max(18px, env(safe-area-inset-left, 0px));
}
.avatar {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
}
.profile-head .who h2 { font-size: 19px; }
.profile-head .who p { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.profile-head .who { flex: 1; min-width: 0; }
.profile-head .who p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-guest-id {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 10.5px;
  line-height: 1;
}
.profile-guest-id span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-guest-id strong {
  color: var(--text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: .015em;
}
.profile-guest-id button {
  flex: none;
  width: 24px;
  height: 24px;
  margin: -7px 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 24px;
}
.profile-guest-id button:active { color: var(--accent); }
.profile-head.guest .avatar {
  background: linear-gradient(135deg, #343448, #232334);
  color: var(--text-dim);
  font-size: 25px;
}
.profile-sync {
  flex: none;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(74, 222, 128, .1);
  color: #78e6a0;
  font-size: 10.5px;
  font-weight: 800;
}
.guest-auth-card {
  margin: 0 16px 16px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,61,110,.13), rgba(255,122,69,.06));
  border: 1px solid rgba(255,61,110,.24);
}
.guest-auth-copy h3 { font-size: 16px; margin-bottom: 5px; }
.guest-auth-copy p { color: var(--text-dim); font-size: 12.5px; line-height: 1.45; }
.guest-auth-card .btn-primary { width: 100%; margin-top: 13px; }
.profile-logout {
  display: block;
  width: calc(100% - 32px);
  margin: 10px 16px 24px;
  padding: 13px;
  border-radius: 12px;
  background: rgba(255, 61, 110, .07);
  border: 1px solid rgba(255, 61, 110, .16);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 700;
}

.wallet-card {
  margin: 0 16px 18px;
  background: linear-gradient(115deg, #2a1f0e, #3a2c12);
  border: 1px solid rgba(255, 201, 77, .3);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wallet-card .bal { font-size: 24px; font-weight: 800; color: var(--gold); }
.wallet-card .lbl { font-size: 11.5px; color: rgba(255, 221, 150, .7); font-weight: 600; margin-bottom: 2px; }
.wallet-card button {
  background: var(--gold);
  color: #241a05;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: 10px;
}

.menu-list { margin: 0 16px; background: var(--bg-card); border-radius: 16px; overflow: hidden; }
.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.menu-item:last-child { border-bottom: none; }
.menu-item .mi { font-size: 17px; width: 24px; text-align: center; }
.menu-item .chev { margin-left: auto; color: var(--text-faint); }

.continue-row {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  padding: 0 16px 6px;
  scrollbar-width: none;
}
.continue-row::-webkit-scrollbar { display: none; }
.continue-card {
  position: relative;
  flex: 0 0 168px;
  aspect-ratio: 16 / 9.6;
  border-radius: 12px;
  overflow: hidden;
}
.continue-card .poster-art { position: absolute; inset: 0; }
.continue-card .cc-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
  font-size: 11.5px;
  font-weight: 700;
}
.continue-card .cc-info .ep { display: block; font-size: 10px; color: var(--text-dim); font-weight: 600; margin-top: 1px; }
.continue-card .cc-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,.25);
}
.continue-card .cc-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}

@media (min-width: 500px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
