/* Gooners — vertical short-video feed.
   Original styling throughout. Dark, edge-to-edge, phone-first; the desktop
   case is handled by centring a phone-width column rather than inventing a
   second layout, because the whole interaction is built around full-bleed
   portrait video. */

:root {
  --bg: #000;
  --fg: #fff;
  --dim: rgba(255, 255, 255, .62);
  --faint: rgba(255, 255, 255, .34);
  --line: rgba(255, 255, 255, .12);
  --hot: #ff2e63;      /* like / accent */
  --cool: #00f0ff;     /* secondary accent */
  --nav-h: 54px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

/* An author `display:` rule BEATS the `hidden` attribute's UA style, so any
   element styled with display: here would ignore hidden entirely. That shipped
   broken: .sheet (flex) and .empty (grid) were both permanently on screen - the
   comments sheet could not be closed and the empty-state overlay covered the
   feed. One global rule rather than a per-selector [hidden] each time, because
   the next element with a display: rule would hit the same trap. */
[hidden] { display: none !important; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--fg);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2;
      stroke-linecap: round; stroke-linejoin: round; }

/* On a wide screen the feed stays a phone-shaped column, centred. */
@media (min-width: 620px) {
  body::before {
    content: ''; position: fixed; inset: 0;
    background: radial-gradient(900px 600px at 50% -10%, #16121a, #000 70%);
  }
  .screen, .nav, .sheet {
    max-width: 440px; left: 50% !important; transform: translateX(-50%);
    box-shadow: 0 0 0 1px var(--line);
  }
  .sheet { transform: translateX(-50%) translateY(var(--sheet-y, 0)); }
}

.screen { position: fixed; inset: 0; bottom: 0; display: flex; flex-direction: column; }

/* ── feed ────────────────────────────────────────────────────────────── */
.feed-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 10px;
  background: linear-gradient(#000a, #0000);
  pointer-events: none;
}
.feed-top .tab, .feed-top .icon-btn { pointer-events: auto; }
.tab {
  font-size: 16px; font-weight: 600; color: var(--faint);
  padding: 2px 0; position: relative; transition: color .15s;
}
.tab.is-on { color: #fff; }
.tab.is-on::after {
  content: ''; position: absolute; left: 50%; bottom: -6px; translate: -50% 0;
  width: 26px; height: 2.5px; border-radius: 2px; background: #fff;
}
.tab-sep { width: 1px; height: 14px; background: var(--line); }
.feed-search { position: absolute; right: 10px; top: calc(10px + env(safe-area-inset-top, 0px)); }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }

.reel {
  flex: 1; overflow-y: auto; scroll-snap-type: y mandatory;
  scrollbar-width: none; overscroll-behavior-y: contain;
}
.reel::-webkit-scrollbar { display: none; }

.slide {
  position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; place-items: center; overflow: hidden; background: #0b0b0f;
}
.slide video, .slide .poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
/* With no media yet, the poster IS the slide. Generated from the video's hue so
   an empty library still looks deliberate rather than broken. */
.poster {
  background:
    radial-gradient(120% 80% at 20% 15%, hsl(var(--h) 85% 42% / .85), transparent 60%),
    radial-gradient(100% 90% at 85% 80%, hsl(calc(var(--h) + 60) 90% 45% / .75), transparent 62%),
    linear-gradient(160deg, #15101c, #05050a);
}
.poster::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, #fff0 0 22px, #ffffff07 22px 44px);
}
.pending {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--dim); background: #0009; backdrop-filter: blur(8px);
  border: 1px solid var(--line);
}
.pending i { width: 7px; height: 7px; border-radius: 50%; background: var(--cool);
             animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

.slide-shade {
  position: absolute; inset: auto 0 0 0; height: 52%;
  background: linear-gradient(#0000, #000c 62%, #000e);
  pointer-events: none;
}

/* caption block */
.meta {
  position: absolute; left: 0; right: 72px; bottom: calc(var(--nav-h) + var(--safe-b) + 14px);
  padding: 0 14px; z-index: 3;
}
.meta .who { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 16px; }
.meta .who .tick { width: 15px; height: 15px; color: var(--cool); }
.meta .cap { margin: 7px 0 0; font-size: 14px; line-height: 1.4; }
.meta .cap .tag { color: #fff; font-weight: 600; }
.meta .sound { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 13px; color: var(--dim); }
.meta .sound svg { width: 15px; height: 15px; flex: none; }
.ticker { overflow: hidden; white-space: nowrap; max-width: 190px; }
.ticker span { display: inline-block; animation: slide 11s linear infinite; }
@keyframes slide { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* action rail */
.rail {
  position: absolute; right: 8px; bottom: calc(var(--nav-h) + var(--safe-b) + 14px);
  z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 17px;
}
.rail button { display: grid; place-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.rail svg { width: 31px; height: 31px; filter: drop-shadow(0 1px 3px #0008); }
.rail .n { font-size: 12px; text-shadow: 0 1px 3px #000a; }
.rail .like.on svg { fill: var(--hot); stroke: var(--hot); animation: pop .32s; }
.rail .save.on svg { fill: #ffd400; stroke: #ffd400; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.32); } 100% { transform: scale(1); } }

.avatar {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 17px; color: #fff; overflow: hidden;
  background: linear-gradient(145deg, hsl(var(--h) 80% 48%), hsl(calc(var(--h) + 50) 85% 38%));
}
.rail .follow {
  position: absolute; bottom: -8px; left: 50%; translate: -50% 0;
  width: 21px; height: 21px; border-radius: 50%; background: var(--hot);
  display: grid; place-items: center; font-size: 15px; line-height: 1; font-weight: 700;
}
.rail .follow.on { background: #fff; color: var(--hot); }

/* the spinning sound disc */
.disc {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, #2a2a33, #0c0c10);
  border: 1px solid var(--line); animation: spin 5s linear infinite;
}
.disc.paused { animation-play-state: paused; }
.disc i { width: 13px; height: 13px; border-radius: 50%;
          background: linear-gradient(145deg, hsl(var(--h) 80% 55%), hsl(calc(var(--h) + 60) 80% 45%)); }
@keyframes spin { to { transform: rotate(360deg); } }

/* double-tap heart */
.burst {
  position: absolute; z-index: 5; width: 96px; height: 96px; translate: -50% -50%;
  color: var(--hot); pointer-events: none; animation: burst .72s ease-out forwards;
}
.burst svg { width: 100%; height: 100%; fill: currentColor; stroke: none; }
@keyframes burst {
  0% { opacity: 0; transform: scale(.3) rotate(-14deg); }
  28% { opacity: 1; transform: scale(1.1) rotate(8deg); }
  100% { opacity: 0; transform: scale(1.5) rotate(12deg); }
}

/* Draggable scrubber. A 2px line is impossible to grab, so the hit area is
   padded far beyond the visible bar without moving it, and touch-action keeps
   a drag here from scrolling the reel. */
.progress {
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--nav-h) + var(--safe-b) - 11px);
  height: 2px; padding: 11px 0; box-sizing: content-box;
  background: none; z-index: 6; touch-action: none; cursor: pointer;
}
.progress::before {
  content: ''; position: absolute; left: 0; right: 0; top: 11px;
  height: 2px; border-radius: 2px; background: #ffffff2e;
  transition: height .12s, top .12s;
}
.progress i {
  position: absolute; left: 0; top: 11px; display: block;
  height: 2px; width: 0; border-radius: 2px; background: #fff;
  transition: height .12s, top .12s;
}
/* grabbed: thicken and show a knob, the way TikTok does */
.slide.scrubbing .progress::before,
.slide.scrubbing .progress i { height: 5px; top: 9.5px; }
.slide.scrubbing .progress i::after {
  content: ''; position: absolute; right: -7px; top: 50%; margin-top: -7px;
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 7px #000a;
}
.slide.scrubbing .slide-shade { opacity: .55; }

.play-badge {
  position: absolute; z-index: 5; width: 64px; height: 64px; opacity: 0;
  transition: opacity .18s; color: #fff;
}
.play-badge svg { width: 100%; height: 100%; fill: currentColor; stroke: none; filter: drop-shadow(0 2px 8px #000a); }
.slide.is-paused .play-badge { opacity: .88; }

/* ── empty state ─────────────────────────────────────────────────────── */
.empty {
  position: absolute; inset: 0; z-index: 7; display: grid; place-content: center;
  justify-items: center; text-align: center; gap: 10px; padding: 32px;
  background: radial-gradient(700px 500px at 50% 35%, #1a1320, #000 72%);
}
.empty-mark svg { width: 74px; height: 74px; fill: var(--hot); stroke: none; opacity: .9; }
.empty-mark .ring { fill: none; stroke: var(--cool); stroke-width: 3; }
.empty h2 { margin: 6px 0 0; font-size: 20px; }
.empty p { margin: 0; max-width: 300px; color: var(--dim); font-size: 14px; }
.empty code {
  margin-top: 6px; font-size: 12px; color: var(--cool);
  background: #ffffff0d; border: 1px solid var(--line); padding: 6px 11px; border-radius: 8px;
}

/* ── bars / scroll screens ───────────────────────────────────────────── */
.bar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  border-bottom: 1px solid var(--line); background: #000;
}
.bar-title { font-weight: 700; font-size: 16px; }
.bar-spacer { flex: 1; }
.bar-profile { justify-content: center; position: relative; }
.bar-profile .icon-btn { position: absolute; left: 6px; }

.search-wrap { flex: 1; display: flex; align-items: center; gap: 8px;
  background: #ffffff14; border-radius: 10px; padding: 8px 11px; }
.search-ico { width: 17px; height: 17px; color: var(--faint); flex: none; }
#q { flex: 1; background: none; border: 0; outline: none; color: #fff; font-size: 15px; }
#q::placeholder { color: var(--faint); }
.clear { color: var(--faint); font-size: 20px; line-height: 1; padding: 0 2px; }

.scroll { flex: 1; overflow-y: auto; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
.scroll::-webkit-scrollbar { width: 0; }

.sec-h { padding: 16px 14px 8px; font-size: 13px; font-weight: 700;
         letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px; }
.chip { background: #ffffff14; border: 1px solid var(--line); border-radius: 999px;
        padding: 7px 13px; font-size: 13.5px; font-weight: 600; }
.chip b { color: var(--cool); font-weight: 700; }

.row { display: flex; align-items: center; gap: 11px; padding: 10px 14px; width: 100%; text-align: left; }
.row .avatar { width: 42px; height: 42px; border-width: 0; font-size: 16px; }
.row .rt { flex: 1; min-width: 0; }
.row .rt b { display: block; font-size: 14.5px; }
.row .rt span { display: block; font-size: 12.5px; color: var(--faint);
                overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .btn-follow { border: 1px solid var(--hot); background: var(--hot); color: #fff;
                   border-radius: 7px; padding: 6px 15px; font-size: 13px; font-weight: 700; }
.row .btn-follow.on { background: none; color: var(--dim); border-color: var(--line); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; }
.cell { position: relative; aspect-ratio: 9 / 15; overflow: hidden; background: #111; }
.cell .poster { position: absolute; inset: 0; }
.cell .n { position: absolute; left: 6px; bottom: 5px; font-size: 12px; font-weight: 700;
           display: flex; align-items: center; gap: 4px; text-shadow: 0 1px 3px #000; }
.cell .n svg { width: 13px; height: 13px; fill: #fff; stroke: none; }

.prof-head { display: grid; justify-items: center; gap: 8px; padding: 20px 14px 10px; }
.prof-head .avatar { width: 86px; height: 86px; font-size: 32px; border-width: 0; }
.prof-head h2 { margin: 2px 0 0; font-size: 17px; }
.prof-head .bio { color: var(--dim); font-size: 13.5px; text-align: center; max-width: 300px; margin: 0; }
.stats { display: flex; gap: 26px; margin: 6px 0 4px; }
.stats div { text-align: center; }
.stats b { display: block; font-size: 17px; }
.stats span { font-size: 12px; color: var(--faint); }

.muted { color: var(--faint); text-align: center; padding: 34px 20px; font-size: 14px; }

/* ── bottom nav ──────────────────────────────────────────────────────── */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; align-items: center; justify-content: space-around;
  background: #000; border-top: 1px solid var(--line);
}
.nav-item { display: grid; place-items: center; gap: 2px; color: var(--faint); flex: 1; }
.nav-item svg { width: 23px; height: 23px; }
.nav-item span { font-size: 10.5px; font-weight: 600; }
.nav-item.is-on { color: #fff; }

/* ── comments sheet ──────────────────────────────────────────────────── */
.sheet-scrim { position: fixed; inset: 0; background: #0008; z-index: 29; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: 68vh; display: flex; flex-direction: column;
  background: #15151a; border-radius: 16px 16px 0 0;
  padding-bottom: var(--safe-b);
  animation: rise .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes rise { from { transform: translateY(100%); } }
@media (min-width: 620px) { @keyframes rise { from { transform: translateX(-50%) translateY(100%); } } }
.sheet-grab { width: 36px; height: 4px; border-radius: 2px; background: #ffffff2e; margin: 8px auto 2px; }
.sheet-head { display: flex; align-items: center; justify-content: center; position: relative; padding: 8px 12px; }
.sheet-head .icon-btn { position: absolute; right: 6px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 14px 10px; }
.cmt { display: flex; gap: 10px; padding: 9px 0; }
.cmt .avatar { width: 34px; height: 34px; border-width: 0; font-size: 13px; flex: none; }
.cmt .ct { flex: 1; min-width: 0; }
.cmt .ct b { font-size: 13px; color: var(--dim); font-weight: 600; }
.cmt .ct p { margin: 2px 0 0; font-size: 14.5px; word-wrap: break-word; }
.cmt .ct time { font-size: 11.5px; color: var(--faint); }
.sheet-form { display: flex; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--line); }
#sheet-input { flex: 1; background: #ffffff14; border: 0; border-radius: 999px;
               padding: 10px 15px; color: #fff; outline: none; font-size: 14.5px; }
#sheet-send { color: var(--hot); font-weight: 700; padding: 0 6px; }
#sheet-send:disabled { color: var(--faint); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 18px);
  translate: -50% 0; z-index: 40; background: #fff; color: #000;
  padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  animation: rise2 .2s;
}
@keyframes rise2 { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}


/* ── polish pass ──────────────────────────────────────────────────────────
   Refinements only: the desktop case is still the centred phone column. */

.slide { background: #07070a; }

/* Stronger bottom scrim. The caption sits on top of whatever frame is playing,
   and a thin gradient left white text unreadable on a bright clip. */
.slide-shade { height: 58%; background: linear-gradient(#0000, #000a 46%, #000f); }

/* caption block */
.meta { right: 84px; bottom: calc(var(--nav-h) + var(--safe-b) + 18px); padding: 0 16px; }
.meta .who { font-size: 15.5px; letter-spacing: -.01em; }
.meta .cap {
  margin-top: 8px; font-size: 14px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 1px 4px #0009;
}
.meta .cap .tag { color: var(--cool); font-weight: 700; }
.meta .sound { margin-top: 10px; color: rgba(255, 255, 255, .8); }
.meta .who button { font-weight: 800; text-shadow: 0 1px 4px #0009; }

/* action rail */
.rail { right: 10px; gap: 20px; bottom: calc(var(--nav-h) + var(--safe-b) + 18px); }
.rail svg { width: 29px; height: 29px; filter: drop-shadow(0 2px 6px #000b); }
.rail .n { font-size: 11.5px; font-weight: 700; }
.rail button { transition: transform .12s ease; }
.rail button:active { transform: scale(.88); }
.avatar { width: 48px; height: 48px; box-shadow: 0 2px 12px #0008; }

/* header */
.feed-top {
  padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 16px;
  background: linear-gradient(#000b, #0006 46%, #0000);
}
.tab { font-size: 16.5px; font-weight: 700; }
.tab.is-on::after { width: 22px; height: 3px; bottom: -7px; }

/* bottom nav */
.nav { background: #000000e6; backdrop-filter: blur(16px) saturate(1.2); }
.nav-item { transition: color .15s; }
.nav-item span { font-size: 10px; }
.nav-item.is-on svg { filter: drop-shadow(0 0 9px #ffffff4d); }

.play-badge { width: 70px; height: 70px; }

/* desktop surround: the column reads as a device instead of a black strip */
@media (min-width: 620px) {
  body::before {
    background:
      radial-gradient(760px 520px at 50% -10%, #231b30, #0a0810 60%),
      radial-gradient(620px 520px at 12% 88%, #1b1026, #0000 70%),
      radial-gradient(620px 520px at 88% 82%, #0f1a29, #0000 70%),
      #050508;
  }
  .screen {
    border-radius: 18px 18px 0 0; overflow: hidden;
    box-shadow: 0 0 0 1px #ffffff1f, 0 34px 90px #000c;
  }
  .nav { box-shadow: 0 0 0 1px #ffffff1f; }
}


/* ── sound, grid thumbnails, accounts ─────────────────────────────────── */
.feed-sound { position: absolute; left: 10px; top: calc(10px + env(safe-area-inset-top, 0px)); }
.feed-sound.off { color: var(--faint); }

/* each grid cell shows its own first frame rather than a bare gradient */
.cell .cell-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.auth {
  position: fixed; z-index: 31; left: 50%; top: 50%; translate: -50% -50%;
  width: min(380px, calc(100vw - 32px));
  display: flex; flex-direction: column;
  background: #15151a; border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 22px 16px; box-shadow: 0 30px 80px #000d;
  animation: pop-in .18s cubic-bezier(.2, .8, .3, 1);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.auth-x { position: absolute; top: 8px; right: 8px; color: var(--faint); }
.auth h2 { margin: 0; font-size: 20px; }
.auth-sub { margin: 6px 0 16px; font-size: 13.5px; color: var(--dim); line-height: 1.45; }
#auth-form { display: flex; flex-direction: column; gap: 10px; }
#auth-form input {
  background: #ffffff12; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; color: #fff; font-size: 15px; outline: none;
  transition: border-color .15s, background .15s;
}
#auth-form input:focus { border-color: var(--hot); background: #ffffff1a; }
#auth-form input::placeholder { color: var(--faint); }
#auth-go {
  margin-top: 4px; background: var(--hot); color: #fff;
  border-radius: 10px; padding: 12px; font-size: 15px; font-weight: 700;
}
#auth-go:disabled { opacity: .55; }
.auth-err { margin: 0; font-size: 13px; color: #ff7391; }
.auth-swap { margin-top: 12px; font-size: 13px; color: var(--dim); padding: 6px; }
.auth-swap b { color: #fff; font-weight: 700; }
.btn-logout {
  margin-top: 12px; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 24px; font-size: 13.5px; font-weight: 700; color: var(--dim);
}


/* ── monochrome + brand ───────────────────────────────────────────────────
   One palette: black, white and grey. Every accent that used to be pink, cyan
   or gold is white now, and the per-video hue gradients are neutral, so no two
   controls on screen disagree. */
:root {
  --hot: #fff;
  --cool: #fff;
  --ink: #000;          /* text on a white fill */
}

/* filled states */
.rail .like.on svg,
.rail .save.on svg { fill: #fff; stroke: #fff; }
.rail .repost.on svg { stroke: #fff; }
.rail .repost.on .n { color: #fff; }
.rail .follow,
.rail .follow.on { background: #fff; color: var(--ink); }

#auth-go { background: #fff; color: var(--ink); }
#auth-go:disabled { opacity: .5; }
.auth-err { color: #fff; opacity: .92; }
.auth-swap b,
.chip b,
.meta .cap .tag,
.empty code { color: #fff; }
#sheet-send { color: #fff; }
#sheet-send:disabled { color: var(--faint); }
.empty-mark svg { fill: #fff; }
.empty-mark .ring { stroke: #ddd; }
.pending i { background: #fff; }
.row .btn-follow { background: #fff; color: var(--ink); border-color: #fff; }
.row .btn-follow.on { background: none; color: var(--dim); border-color: var(--line); }
#auth-form input:focus { border-color: #fff; background: #ffffff1c; }

/* neutral in place of the per-video hue */
.avatar { background: linear-gradient(145deg, #4e4e4e, #151515); color: #fff; }
.disc { background: linear-gradient(145deg, #2a2a2a, #0c0c0c); }
.disc i { background: linear-gradient(145deg, #dcdcdc, #8c8c8c); }
.poster {
  background:
    radial-gradient(120% 80% at 20% 15%, #2d2d2d, transparent 60%),
    radial-gradient(100% 90% at 85% 80%, #1d1d1d, transparent 62%),
    linear-gradient(160deg, #151515, #060606);
}
.cell { background: #0d0d0d; }
.up-thumb { background: linear-gradient(150deg, #3a3a3a, #121212); }

@media (min-width: 620px) {
  body::before {
    background:
      radial-gradient(760px 520px at 50% -10%, #1c1c1c, #070707 62%),
      radial-gradient(620px 520px at 12% 88%, #151515, #0000 70%),
      radial-gradient(620px 520px at 88% 82%, #131313, #0000 70%),
      #050505;
  }
}

/* brand mark, top-left */
.brand {
  position: absolute; left: 13px; top: calc(13px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 7px;
  pointer-events: auto; user-select: none;
}
.brand-mark { width: 19px; height: 19px; flex: none; color: #fff; }
.brand-mark .fill { fill: currentColor; stroke: none; }
.brand span {
  font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; color: #fff;
  text-shadow: 0 1px 4px #000a;
}
.top-actions {
  position: absolute; right: 6px; top: calc(8px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 0;
}
#sound-btn.off { color: var(--faint); }


/* ── paywall ──────────────────────────────────────────────────────────── */
.lock-ico {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: #ffffff14; border: 1px solid var(--line); color: #fff;
}
.lock-ico.big { width: 64px; height: 64px; }
.lock-ico svg { width: 24px; height: 24px; }
.pw-btn {
  background: #fff; color: #000; font-weight: 800; border-radius: 999px;
  padding: 11px 28px; font-size: 14.5px; transition: transform .12s;
}
.pw-btn:active { transform: scale(.95); }

.slide.paywall { background: #050505; }
.pw {
  display: grid; justify-items: center; gap: 12px; text-align: center;
  padding: 30px 26px; max-width: 340px;
}
.pw h2 { margin: 4px 0 0; font-size: 21px; }
.pw p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.5; }
.pw-btn { margin-top: 6px; padding: 13px 32px; font-size: 15.5px; }


/* ── 1:1 pass ─────────────────────────────────────────────────────────────
   Numbers measured from tiktok.com's own mobile DOM (2026-10-27): TikTok Sans
   throughout, 32px solid rail glyphs, counts 13/600, handle 17/600, caption
   15/400 on an 18px line, music row 15/400, 12px left inset. */
html, body {
  font-family: "TikTok Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
}

.rail { right: 8px; gap: 15px; }
.rail button { gap: 2px; }
.rail svg {
  width: 32px; height: 32px; fill: currentColor; stroke: none;
  filter: drop-shadow(0 1px 2px #0006);
}
.rail .n { font-size: 13px; font-weight: 600; line-height: 17px; text-shadow: 0 1px 2px #0007; }
.avatar { width: 48px; height: 48px; border-width: 1.5px; }
.disc { width: 40px; height: 40px; }

/* TikTok marks a like in red; the palette here is black and white, so the
   state is a glow on the solid glyph instead. */
.rail .like.on svg,
.rail .save.on svg,
.rail .repost.on svg {
  fill: #fff;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9)) drop-shadow(0 1px 2px #0006);
}

.meta { padding: 0 12px; right: 76px; }
.meta .who { font-size: 17px; font-weight: 600; line-height: 17px; }
.meta .who button { font-weight: 600; }
.meta .cap { margin-top: 6px; font-size: 15px; font-weight: 400; line-height: 18px; }
.meta .cap .tag { font-weight: 600; }
.meta .sound { margin-top: 9px; font-size: 15px; line-height: 15px; color: #fff; }
.meta .sound svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }

.tab { font-size: 17px; font-weight: 600; }
.nav-item span { font-size: 10px; font-weight: 600; }
.nav-item svg { width: 24px; height: 24px; }
/* TikTok fills the active Home and Profile glyphs; Discover stays an outline */
.nav-item.is-on[data-go="feed"] svg,
.nav-item.is-on[data-go="profile"] svg { fill: currentColor; }


/* ── save-your-purchase bar ───────────────────────────────────────────── */
.claimbar {
  position: fixed; z-index: 21; left: 0; right: 0;
  bottom: calc(var(--nav-h) + var(--safe-b));
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #fff; color: #000;
  box-shadow: 0 -6px 20px #0008;
}
.claimbar-t { flex: 1; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.claimbar-go {
  flex: none; background: #000; color: #fff;
  font-size: 12.5px; font-weight: 800; border-radius: 999px; padding: 8px 14px;
}
.claimbar-x { flex: none; font-size: 20px; line-height: 1; color: #666; padding: 0 2px; }
@media (min-width: 620px) {
  .claimbar { max-width: 440px; left: 50%; transform: translateX(-50%); }
}


/* ── price tiers ──────────────────────────────────────────────────────── */
.tiers { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
.tier {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 14px 6px;
  background: #fff; color: #000; border-radius: 12px;
  transition: transform .12s;
}
.tier b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.tier span {
  font-size: 11px; font-weight: 600; line-height: 1.25; color: #555;
  text-align: center;
}
.tier:active { transform: scale(.96); }
.tier[disabled] { opacity: .4; }
.pw { max-width: 360px; }


/* ── category rail + referral popup (GOONERS_CATRAIL_2026_10_28) ─────────── */
.catrail {
  position: absolute; z-index: 6; left: 0; right: 0;
  top: calc(50px + env(safe-area-inset-top, 0px));
  display: flex; gap: 8px; padding: 0 14px 2px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;      /* momentum swipe on iOS */
  overscroll-behavior-x: contain;         /* no page-level horizontal bounce */
}
.catrail::-webkit-scrollbar { display: none; }
.catchip {
  flex: 0 0 auto; appearance: none; cursor: pointer;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid #ffffff2e; background: #0000005c; color: #ffffffc4;
  font: 600 13.5px/1 inherit; letter-spacing: .01em;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .14s, color .14s, border-color .14s;
}
.catchip.is-on { background: #fff; border-color: #fff; color: #111; }

/* The rail sits below the header, so the first clip must start lower or the
   rail covers it. */
.reel { scroll-padding-top: 0; }

.pw-free {
  margin-top: 12px; width: 100%; cursor: pointer;
  padding: 12px 14px; border-radius: 12px;
  border: 1px dashed #ffffff40; background: #ffffff0d; color: #fff;
  font: 700 14px/1 inherit;
}
.pw-free:active { background: #ffffff1f; }
.pw-free small { display: block; margin-top: 5px; font-weight: 500; color: #ffffff8f; }


/* ===== REDDIT SUBREDDITS POPUP — PORNYARD_POPUP_PORT_2026_10_29 =====
   Copied verbatim out of pornyard's styles.css (operator: "line for line font
   for font color for color"), including the 4px square-corner override and the
   nowrap instruction rule that keeps each step on one line. */
.reddit-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9996;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);}
.reddit-popup-overlay.active {
  display: flex;}
.reddit-popup-modal {
  background: #111118;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 30px 28px;
  max-width: 440px;
  width: 90%;
  position: relative;
  text-align: center;}
.reddit-popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.5);
  background: none;
  border: none;
  cursor: pointer;}
.reddit-popup-close:hover { color: #fff;}
.reddit-popup-instruction {
  font-size: 14px;
  font-weight: 700;
  color: #eee;
  margin-bottom: 22px;
  line-height: 1.5;}
.reddit-popup-grid {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;}
.reddit-popup-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: rgba(255, 69, 0, 0.08);
  border: 1px solid rgba(255, 69, 0, 0.2);
  border-radius: 12px;
  padding: 16px 14px;
  min-width: 110px;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;}
.reddit-popup-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 69, 0, 0.5);
  background: rgba(255, 69, 0, 0.14);}
.reddit-popup-card .reddit-logo {
  width: 42px;
  height: 42px;}
.reddit-popup-name {
  font-size: 11px;
  font-weight: 700;
  color: #FF4500;
  letter-spacing: 0.3px;}
.reddit-popup-linkbox {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 18px;}
.reddit-popup-linklabel {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;}
.reddit-popup-linkrow {
  display: flex;
  gap: 8px;}
.reddit-referral-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: #ccc;
  font-size: 12px;
  font-family: monospace;
  outline: none;}
.reddit-referral-copy {
  background: #FF4500;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;}
.reddit-referral-copy:hover { background: #e03d00;}
/* pornyard's SQUARE-CORNER PASS, reddit selectors only */
.reddit-popup-card, .reddit-referral-copy, .reddit-popup-close,
.reddit-referral-input {
  border-radius: 4px !important;}
/* TWO_BUTTONS_FIX_2026_09_26 — each step must fit on ONE line. */
.reddit-popup-instruction p {
  white-space:nowrap;font-size:13px;letter-spacing:-.3px;line-height:1.6;
  overflow:visible;}

/* operator: make the paywall's free-access button pulsate */
@keyframes pw-free-pulse {
  0%, 100% { transform: scale(1);     box-shadow: 0 0 0 0 rgba(255, 69, 0, .45); }
  50%      { transform: scale(1.025); box-shadow: 0 0 0 10px rgba(255, 69, 0, 0); }
}
.pw-free {
  border-color: rgba(255, 69, 0, .55);
  animation: pw-free-pulse 1.7s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .pw-free { animation: none; } }
