/* Kissa — Apple-style dark theme (home + watch).
   Type: SF Pro via system stack. Materials: blurred glass. Accent: system pink-red.

   ── 适配边界（定死，后续不再加断点）──
   前台 = 只做手机。设计稿宽 390，支持 320–480。
   超过 480 的屏幕（平板 / 电脑）一律显示居中的 480 手机列，不做桌面布局。
   本文件里只允许 hover / reduced-motion 这类能力查询，不要再加宽度 @media。
   后台 /admin = 只做电脑，见 index.html。 */
:root {
  color-scheme: dark;
  --app-w: 480px;
  --bg: #000;
  --bg-elev: #0f0f11;
  --card: #1c1c1e;
  --card-2: #2c2c2e;
  --fill: rgba(118, 118, 128, 0.24);
  --fill-2: rgba(118, 118, 128, 0.16);
  --label: #f5f5f7;
  --label-2: rgba(235, 235, 245, 0.62);
  --label-3: rgba(235, 235, 245, 0.34);
  --sep: rgba(84, 84, 88, 0.5);
  --accent: #ff375f;
  --accent-2: #ff6b3d;
  --gold: #ffd60a;
  --green: #30d158;
  --glass: rgba(30, 30, 32, 0.62);
  --glass-line: rgba(255, 255, 255, 0.12);
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --pad: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, label, input { touch-action: manipulation; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 400 15px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1em; height: 1em; flex: none; }
:focus-visible { outline: 2px solid #0a84ff; outline-offset: 2px; border-radius: 8px; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border: 0.5px solid var(--glass-line);
}

/* Poster box (real poster image over generated art) */
.art { position: relative; overflow: hidden; background: var(--card); }
.art > .poster-art, .art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.1); pointer-events: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border: 0; border-radius: 999px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.02em; cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease), opacity 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn .ic { width: 18px; height: 18px; }
.btn-white { background: #fff; color: #000; }
.btn-accent { background: linear-gradient(180deg, #ff4f6f, var(--accent)); color: #fff; box-shadow: 0 8px 24px rgba(255, 55, 95, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-glass { background: rgba(255, 255, 255, 0.16); color: #fff; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.btn-plain { background: var(--fill); color: var(--label); }
.circle {
  display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none;
  border: 0; border-radius: 50%; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, 0.16); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.circle:active { transform: scale(0.92); }
.circle .ic { width: 20px; height: 20px; }
.circle.on { background: #fff; color: #000; }

/* ───────────── Account (overrides the injected account.js styles) ───────────── */
body .acct { margin-left: auto; gap: 10px; font-size: 14px; color: var(--label-2); }
body .acct b { color: var(--label); font-weight: 600; }
body .acct button {
  height: 34px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--fill); color: var(--label); font-weight: 600; font-size: 14px;
}
body .acct button.primary { background: #fff; color: #000; }
body .acct-mask {
  background: rgba(0, 0, 0, 0.5); place-items: end center; padding: 0;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fade 0.25s ease;
}
body .acct-box {
  max-width: 440px; padding: 10px 22px calc(26px + env(safe-area-inset-bottom));
  border: 0.5px solid var(--glass-line); border-radius: 28px 28px 0 0;
  background: rgba(28, 28, 30, 0.92); color: var(--label);
  -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  animation: sheet-up 0.4s var(--ease);
}
body .acct-box::before { content: ""; display: block; width: 36px; height: 5px; margin: 0 auto 18px; border-radius: 3px; background: var(--label-3); }
body .acct-tabs { gap: 2px; padding: 2px; margin-bottom: 18px; border: 0; border-radius: 10px; background: var(--fill-2); }
body .acct-tabs button { padding: 7px 0; margin: 0; border: 0; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--label-2); }
body .acct-tabs button[aria-selected="true"] { background: #636366; color: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25); }
body .acct-box label { margin: 12px 0 6px; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--label-2); }
body .acct-box input {
  height: 48px; padding: 0 14px; border: 0; border-radius: 12px;
  background: var(--fill-2); color: var(--label); font-size: 17px;
}
body .acct-box input:focus { outline: 2px solid #0a84ff; outline-offset: 0; }
body .acct-box .go { height: 52px; margin-top: 22px; border-radius: 14px; background: #fff; color: #000; font-size: 17px; font-weight: 600; }
body .acct-box .msg { color: #ff6961; text-align: center; }
body .acct-box .cancel { color: #0a84ff; text-decoration: none; font-size: 16px; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

/* The phone column: full width on phones, a centered 480px column everywhere else. */
.app { width: 100%; max-width: var(--app-w); margin-left: auto; margin-right: auto; }
.app { min-height: 100svh; box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.06); }

/* ═════════════════════════════════ HOME ═════════════════════════════════ */
.app { padding: 0 0 calc(110px + env(safe-area-inset-bottom)); }

.navbar {
  position: sticky; top: 0; z-index: 20; height: calc(48px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--pad) 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 17px;
  transition: background 0.25s, border-color 0.25s;
  border-bottom: 0.5px solid transparent;
}
.navbar span { opacity: 0; transform: translateY(6px); transition: 0.25s var(--ease); }
.navbar.scrolled { background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); border-color: var(--sep); }
.navbar.scrolled span { opacity: 1; transform: none; }

.masthead { display: flex; align-items: flex-end; gap: 12px; padding: 0 var(--pad) 14px; margin-top: -8px; }
.masthead > div { flex: 1; min-width: 0; }
.masthead .acct { flex: none; }
.masthead .acct > span { display: none; }
.masthead .acct button { white-space: nowrap; }
.masthead .eyebrow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--label-2); text-transform: uppercase; }
.masthead h1 { margin: 2px 0 0; font: 700 34px/1.1 var(--display); letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; }
.mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(145deg, #ff5f7e, #ff2d55 55%, #d7193f); color: #fff;
  box-shadow: 0 4px 14px rgba(255, 45, 85, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.mark .ic { width: 16px; height: 16px; margin-left: 2px; }
.masthead .acct { padding-bottom: 4px; }

.search {
  display: flex; align-items: center; gap: 8px; height: 38px; margin: 0 var(--pad) 14px; padding: 0 10px;
  border-radius: 11px; background: var(--fill-2); color: var(--label-3);
}
.search .ic { width: 17px; height: 17px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--label); font: inherit; font-size: 17px; outline: none; }
.search input::placeholder { color: var(--label-3); }
.search input::-webkit-search-cancel-button { filter: invert(0.6); }

.chips { display: flex; gap: 8px; padding: 0 var(--pad) 18px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 15px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--fill-2); color: var(--label); font-size: 15px; font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.chip[aria-pressed="true"] { background: #fff; color: #000; font-weight: 600; }

/* Section header */
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 var(--pad); margin: 30px 0 12px; }
.sec h2 { margin: 0; font: 700 22px/1.2 var(--display); letter-spacing: -0.025em; display: flex; align-items: center; gap: 6px; }
.sec h2 .ic { width: 15px; height: 15px; color: var(--label-3); }
.sec .more { font-size: 15px; color: var(--label-2); }
.sec .count { font-size: 14px; color: var(--label-3); }

/* Hero carousel */
.hero { position: relative; }
.hero-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc(100% - 2 * var(--pad)); gap: 12px;
  padding: 0 var(--pad); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad); scrollbar-width: none;
}
.hero-track::-webkit-scrollbar { display: none; }
.slide {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 4 / 5; max-height: 72svh; border-radius: var(--r-lg); overflow: hidden; scroll-snap-align: start;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
}
.slide .art { position: absolute; inset: 0; border-radius: inherit; }
.slide .art img { transform: scale(1.02); }
.slide::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.92) 100%);
}
.slide .txt { position: relative; z-index: 2; padding: 22px; }
.slide .kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.8); }
.slide .kicker .ic { width: 13px; height: 13px; color: var(--accent); }
.slide h3 { margin: 8px 0 6px; font: 800 32px/1.05 var(--display); letter-spacing: -0.035em; text-wrap: balance; }
.slide p { margin: 0 0 18px; font-size: 15px; color: rgba(255, 255, 255, 0.72); }
.slide .acts { display: flex; gap: 10px; align-items: center; }
.slide .acts .btn { flex: 1; max-width: 260px; }
.dots { display: flex; justify-content: center; gap: 7px; margin-top: 14px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--label-3); transition: 0.3s var(--ease); }
.dots i.on { width: 20px; border-radius: 4px; background: var(--label); }

/* Rows (horizontal shelves) */
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: max-content; justify-content: start; gap: 12px; padding: 0 var(--pad);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad); scrollbar-width: none;
}
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }

/* Continue watching */
.cw { width: 132px; }
.cw .art { aspect-ratio: 3 / 4; border-radius: var(--r-md); }
.cw .play {
  position: absolute; z-index: 2; left: 10px; bottom: 14px; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.22); color: #fff;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.cw .play .ic { width: 14px; height: 14px; margin-left: 2px; }
.bar { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 6px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.25); overflow: hidden; }
.bar i { display: block; height: 100%; background: #fff; border-radius: inherit; }
.cw b { display: block; margin-top: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw span { font-size: 12px; color: var(--label-2); }

/* Top 10 */
.top { position: relative; display: flex; align-items: flex-end; width: 186px; padding-left: 58px; }
.top .num {
  position: absolute; left: -4px; bottom: -14px; z-index: 0;
  font: 900 128px/1 var(--display); letter-spacing: -0.08em;
  color: transparent; background: linear-gradient(180deg, #8e8e93 0%, #2c2c2e 85%); -webkit-background-clip: text; background-clip: text;
}
.top:nth-child(1) .num { background-image: linear-gradient(180deg, #ffe58a 0%, #b8860b 90%); }
.top:nth-child(2) .num { background-image: linear-gradient(180deg, #f2f2f7 0%, #6e6e73 90%); }
.top:nth-child(3) .num { background-image: linear-gradient(180deg, #ffb27a 0%, #8a4a1f 90%); }
.top .art { position: relative; z-index: 1; width: 128px; aspect-ratio: 3 / 4; border-radius: var(--r-md); box-shadow: -12px 0 24px rgba(0,0,0,0.6); }

/* Poster grid */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; padding: 0 var(--pad); }
.card { display: block; min-width: 0; }
.card .art { aspect-ratio: 3 / 4; border-radius: 12px; transition: transform 0.35s var(--ease); }
.card:active .art { transform: scale(0.97); }
@media (hover: hover) { .card:hover .art { transform: scale(1.03); } }
.card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; font-size: 14px; line-height: 1.25; font-weight: 600; }
.card .sub { display: block; margin-top: 3px; font-size: 12px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 700; letter-spacing: 0.01em;
}
.badge .ic { width: 11px; height: 11px; }
.badge.tr { top: 7px; right: 7px; background: rgba(0, 0, 0, 0.5); color: #fff; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.badge.tr.free { color: var(--green); }
.badge.tl { top: 7px; left: 7px; background: var(--accent); color: #fff; }
.badge.tl.hot { width: 22px; padding: 0; justify-content: center; background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.badge.tl.hot .ic { width: 12px; height: 12px; }
.dur { position: absolute; z-index: 2; right: 7px; bottom: 7px; font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.9); text-shadow: 0 1px 4px rgba(0,0,0,0.6); }

/* Ranked list (Top Charts tab) */
.ranks { padding: 0 var(--pad); }
.rk { display: grid; grid-template-columns: 26px 72px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 0.5px solid var(--sep); }
.rk:last-child { border-bottom: 0; }
.rk .n { font: 800 22px/1 var(--display); color: var(--label-3); text-align: center; font-variant-numeric: tabular-nums; }
.rk:nth-child(-n+3) .n { color: var(--accent); }
.rk .art { width: 72px; aspect-ratio: 3 / 4; border-radius: 10px; }
.rk b { display: block; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk .sub { display: block; margin-top: 3px; font-size: 13px; color: var(--label-2); }
.rk .heat { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--accent-2); }
.rk .heat .ic { width: 12px; height: 12px; }
.rk .get { height: 30px; padding: 0 14px; border-radius: 999px; background: var(--fill); color: #0a84ff; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; }
.rk .get.owned { color: var(--label); }

.empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--label-2); }
.empty .btn { margin-top: 14px; }
.skel-card { aspect-ratio: 3 / 4; border-radius: 12px; background: linear-gradient(100deg, var(--card) 30%, var(--card-2) 50%, var(--card) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -150% 0; } }

.foot { margin: 40px var(--pad) 0; font-size: 12px; color: var(--label-3); text-align: center; }

/* Floating tab bar (liquid-glass capsule) */
.tabbar {
  position: fixed; z-index: 30; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%); width: min(calc(100% - 32px), calc(var(--app-w) - 32px));
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 999px;
  background: rgba(37, 37, 40, 0.66); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px;
  border: 0; border-radius: 999px; background: none; cursor: pointer;
  font-size: 10.5px; font-weight: 600; color: var(--label-2); transition: background 0.25s, color 0.25s;
}
.tabbar .ic { width: 23px; height: 23px; }
.tabbar .on { color: var(--accent); background: rgba(255, 255, 255, 0.1); }

/* ═════════════════════════ WATCH · vertical swipe feed ═════════════════════════
   One full-screen slide per show; swipe up = next, down = previous (scroll-snap).
   A single <video> element moves into whichever slide is active. */
html:has(body.watch), body.watch { height: 100%; overflow: hidden; overscroll-behavior: none; }
.feed {
  position: fixed; top: 0; bottom: 0; left: 50%; translate: -50% 0;
  width: min(100%, var(--app-w)); overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory; overscroll-behavior-y: contain; scrollbar-width: none; background: #000;
}
.feed::-webkit-scrollbar { display: none; }

.fs { position: relative; height: 100%; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; background: #000; }
.fs-bg { position: absolute; inset: -60px; filter: blur(40px) brightness(0.5) saturate(1.3); }
.fs-bg > *, .fs-still > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.fs-bg img { object-fit: cover; }
.fs-still img { object-fit: contain; }
.fs-still { position: absolute; inset: 0; transition: filter 0.3s; }
.fs video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.fs-shade { position: absolute; z-index: 2; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0, rgba(0,0,0,0) 120px), linear-gradient(0deg, rgba(0,0,0,0.8) 0, rgba(0,0,0,0) 46%); }
.fs-tap { position: absolute; z-index: 2; inset: 0; cursor: pointer; }

.fs-center { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; pointer-events: none; }
.fs-center .playbig { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,0.18); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); opacity: 0; transform: scale(0.85); transition: 0.25s var(--ease); }
.fs-center .playbig .ic { width: 30px; height: 30px; margin-left: 4px; }
.fs.paused .playbig { opacity: 1; transform: none; }
.fs-center .spinner { position: absolute; opacity: 0; transition: opacity 0.2s; }
.fs.loading .spinner { opacity: 1; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.2); border-top-color: #fff; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.fs-info { position: absolute; z-index: 4; left: 16px; right: 84px; bottom: calc(34px + env(safe-area-inset-bottom)); text-shadow: 0 1px 8px rgba(0,0,0,0.45); }
.fs-info .kick { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; margin-bottom: 10px; border-radius: 7px; background: rgba(255,255,255,0.16); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); font-size: 12px; font-weight: 700; text-shadow: none; }
.fs-info .kick .ic { width: 12px; height: 12px; color: var(--accent-2); }
.fs-info h2 { margin: 0 0 6px; font: 700 21px/1.2 var(--display); letter-spacing: -0.02em; }
.fs-info .meta { font-size: 13px; color: rgba(255,255,255,0.75); }
.fs-info .desc { margin: 8px 0 0; font-size: 14px; line-height: 1.4; color: rgba(255,255,255,0.85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.fs-info .desc.open { -webkit-line-clamp: unset; }
.fs-info .desc:empty { display: none; }

.fs-rail { position: absolute; z-index: 4; right: 10px; bottom: calc(118px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.fs-rail button { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 56px; border: 0; background: none; cursor: pointer; color: #fff; font-size: 11px; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,0.6); }
.fs-rail .circle { width: 46px; height: 46px; background: rgba(255,255,255,0.16); box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
.fs-rail .circle .ic { width: 21px; height: 21px; }
.fs-rail button.on .circle { background: var(--accent); }

/* progress: thin line, thickens + shows time while scrubbing */
.fs-bar { position: absolute; z-index: 5; left: 0; right: 0; bottom: env(safe-area-inset-bottom); height: 26px; display: flex; align-items: flex-end; padding: 0 0 10px; touch-action: none; cursor: pointer; }
.fs-bar .track { position: relative; flex: 1; height: 2px; margin: 0 12px; border-radius: 2px; background: rgba(255,255,255,0.22); transition: height 0.15s; }
.fs-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: rgba(255,255,255,0.9); }
.fs-bar .time { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font: 700 22px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; opacity: 0; transition: opacity 0.15s; text-shadow: 0 2px 10px rgba(0,0,0,0.6); white-space: nowrap; }
.fs-bar .time span { color: rgba(255,255,255,0.55); }
.fs.scrub .fs-bar .track { height: 5px; }
.fs.scrub .fs-bar .time { opacity: 1; }
.fs.scrub .fs-info, .fs.scrub .fs-rail { opacity: 0; }
.fs-info, .fs-rail { transition: opacity 0.2s; }

/* Locked slide */
.fs-lock { position: absolute; z-index: 6; inset: 0; display: none; flex-direction: column; padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.85) 80%); }
.fs.is-locked .fs-lock { display: flex; }
.fs.is-locked .fs-still { filter: blur(4px) brightness(0.7); }
.fs.is-locked :is(.fs-info, .fs-bar, .fs-tap, .fs-center) { display: none; }
.fs.is-locked .fs-rail { top: calc(10px + env(safe-area-inset-top)); bottom: auto; right: 12px; flex-direction: row; gap: 10px; z-index: 7; }
.fs.is-locked .fs-rail button { width: auto; }
.fs.is-locked .fs-rail .t { display: none; }
.fs.is-locked .fs-rail .circle { width: 38px; height: 38px; background: rgba(60,60,64,0.55); }
.fs.is-locked .fs-rail .circle .ic { width: 17px; height: 17px; }
.lockmark {
  position: relative; flex: 1; min-height: 0; overflow: hidden; padding: calc(60px + env(safe-area-inset-top)) 24px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
}
.lockmark .glyph { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 6px; border-radius: 50%; background: rgba(255,255,255,0.14); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 0.5px solid rgba(255,255,255,0.25); }
.lockmark .glyph .ic { width: 24px; height: 24px; }
.lockmark h2 { margin: 0; font: 700 24px/1.15 var(--display); letter-spacing: -0.025em; text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.lockmark .meta { font-size: 13px; color: rgba(255,255,255,0.7); }

.paysheet {
  position: relative; flex: none; margin: 0 10px 10px; padding: 18px 18px 16px; border-radius: 24px;
  background: rgba(28, 28, 30, 0.74); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
}
.fs.is-locked.active .paysheet { animation: sheet-up 0.5s var(--ease); }
.paysheet .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.paysheet .lbl { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.paysheet h3 { margin: 4px 0 0; font: 700 19px/1.2 var(--display); letter-spacing: -0.02em; }
.paysheet .price { text-align: right; }
.paysheet .price b { display: block; font: 700 28px/1 var(--display); letter-spacing: -0.03em; }
.paysheet .price small { font-size: 12px; color: var(--label-2); white-space: nowrap; }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.perks div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 12px; background: rgba(255,255,255,0.06); font-size: 11.5px; font-weight: 500; color: var(--label-2); text-align: center; line-height: 1.2; }
.perks .ic { width: 20px; height: 20px; color: var(--label); }
.paysheet .btn { width: 100%; height: 52px; font-size: 17px; }
.paymethods { margin-top: 10px; font-size: 12px; text-align: center; color: var(--label-3); }
.paystatus { margin-top: 8px; font-size: 13px; text-align: center; color: var(--label-2); }
.paystatus:empty { display: none; }
.paystatus.ok { color: var(--green); }
.paystatus.err { color: #ff6961; }
.paylink { display: block; margin-top: 8px; font-size: 13px; text-align: center; color: #0a84ff; }
.devsim { margin-top: 10px; padding-top: 10px; border-top: 0.5px solid var(--sep); text-align: center; }
.devsim button { border: 0; background: none; color: var(--label-3); font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* End-of-feed slide */
.fs-end { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 32px; text-align: center;
  background: radial-gradient(500px 400px at 50% 35%, rgba(255,55,95,0.22), transparent 70%), #000; }
.fs-end .glyph { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 8px; border-radius: 22px; background: linear-gradient(145deg, #ff5f7e, #ff2d55 55%, #d7193f); box-shadow: 0 12px 30px rgba(255,45,85,0.4); }
.fs-end .glyph .ic { width: 32px; height: 32px; }
.fs-end h2 { margin: 0; font: 700 26px/1.2 var(--display); letter-spacing: -0.03em; }
.fs-end p { margin: 0 0 14px; font-size: 15px; color: var(--label-2); max-width: 280px; }
.fs-end .btn { width: 220px; }

/* Fixed chrome over the feed (same 480 column) */
.fchrome { position: fixed; z-index: 20; left: 50%; translate: -50% 0; width: min(100%, var(--app-w)); pointer-events: none; }
.fchrome > * { pointer-events: auto; }
.ftop { top: 0; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 0; }
.ftop .circle { width: 38px; height: 38px; background: rgba(60,60,64,0.55); }
.ftop .circle .ic { width: 18px; height: 18px; }
.ftop .count { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7); text-shadow: 0 1px 6px rgba(0,0,0,0.5); pointer-events: none; }
.sound { display: inline-flex; align-items: center; gap: 6px; height: 34px; margin-left: auto; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255,255,255,0.92); color: #000; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.35); animation: fade 0.3s ease; }
.sound .ic { width: 16px; height: 16px; }
.ftop .mast-inner { display: none; }

.upnext {
  bottom: calc(118px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px;
  width: min(calc(100% - 24px), calc(var(--app-w) - 24px)); padding: 10px; border-radius: 20px;
  background: rgba(28,28,30,0.8); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  border: 0.5px solid rgba(255,255,255,0.14); box-shadow: 0 20px 40px rgba(0,0,0,0.5); animation: sheet-up 0.4s var(--ease);
}
.upnext .art { width: 48px; aspect-ratio: 3 / 4; border-radius: 9px; flex: none; }
.upnext .txt { flex: 1; min-width: 0; }
.upnext small { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.upnext b { display: block; margin-top: 2px; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upnext .go { height: 36px; padding: 0 14px; font-size: 14px; }
.upnext .x { width: 32px; height: 32px; background: var(--fill); }
.upnext .x .ic { width: 14px; height: 14px; }

.hint { top: 58%; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; text-shadow: 0 2px 10px rgba(0,0,0,0.6); pointer-events: none; transition: opacity 0.4s; }
.hint .ic { width: 28px; height: 28px; transform: rotate(-90deg); animation: nudge 1.2s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { translate: 0 6px; opacity: 0.5; } 50% { translate: 0 -6px; opacity: 1; } }
.hint.out { opacity: 0; }

.ftoast { top: 45%; width: auto; padding: 10px 18px; border-radius: 999px; background: rgba(28,28,30,0.9); font-size: 14px; font-weight: 600; pointer-events: none; animation: fade 0.2s ease; }

/* "All shows" sheet */
.sheet-mask { position: fixed; z-index: 40; inset: 0; background: rgba(0,0,0,0.5); animation: fade 0.25s ease; }
.sheet {
  position: fixed; z-index: 41; left: 50%; bottom: 0; translate: -50% 0; width: min(100%, var(--app-w));
  max-height: 72%; display: flex; flex-direction: column; padding: 8px 0 env(safe-area-inset-bottom); border-radius: 28px 28px 0 0;
  background: rgba(28,28,30,0.94); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  border: 0.5px solid rgba(255,255,255,0.12); animation: sheet-up 0.4s var(--ease);
}
.sheet::before { content: ""; display: block; width: 36px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: var(--label-3); }
.sheet header { display: flex; align-items: baseline; justify-content: space-between; padding: 0 20px 8px; }
.sheet header h3 { margin: 0; font: 700 20px/1.2 var(--display); letter-spacing: -0.02em; }
.sheet header span { font-size: 13px; color: var(--label-3); }
.sheet .list { overflow-y: auto; padding: 0 20px 16px; overscroll-behavior: contain; }
.srow { display: grid; grid-template-columns: 20px 52px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 9px 0; border: 0; border-bottom: 0.5px solid var(--sep); background: none; color: inherit; text-align: left; cursor: pointer; }
.srow:last-child { border-bottom: 0; }
.srow .n { font: 700 15px/1 var(--display); color: var(--label-3); text-align: center; }
.srow .art { width: 52px; aspect-ratio: 3 / 4; border-radius: 8px; }
.srow b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .sub { font-size: 12px; color: var(--label-2); }
.srow .st { font-size: 12px; font-weight: 700; color: var(--label-2); display: inline-flex; align-items: center; gap: 4px; }
.srow .st .ic { width: 12px; height: 12px; }
.srow .st.free { color: var(--green); }
.srow.cur .n, .srow.cur .st { color: var(--accent); }
.srow.cur b { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.fs-media { position: absolute; inset: 0; z-index: 1; }
/* Portrait sources fill the phone like short-drama apps; landscape stays letterboxed. */
.fs.fill video, .fs.fill .fs-still img { object-fit: cover; }
/* While "Up next" is showing it owns the bottom of the screen. */
body.upnext-on .fs.active :is(.fs-info, .fs-rail) { opacity: 0; pointer-events: none; }
body.upnext-on .upnext { bottom: calc(40px + env(safe-area-inset-bottom)); }
