/* The v6 feed (index.html, feed.js). Phone first: on a phone the feed is the whole screen; on a wider screen it is a
   9:16 column in the middle. Only transform and opacity change while a video plays or the feed moves. */
@font-face { font-family: 'TikTok Sans'; font-weight: 300 900; font-display: swap; src: url(fonts/tiktok-sans-latin-var.woff2) format('woff2'); }
:root {
  --font: 'TikTok Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --red: #fe2c55;
  --yellow: #face15;
  --ink: #161823;
  --gray: #f1f1f2;
  --muted: rgba(22, 24, 35, .5);
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --nav: 0px;
  --shadow: 0 1px 1.5px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
html.with-nav { --nav: calc(49px + var(--sb)); }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; color: #fff; -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 15px; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-user-select: none; user-select: none; }
a { color: inherit; }
svg { display: block; }
img { -webkit-user-drag: none; user-select: none; }
#app { position: fixed; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto; width: min(100vw, calc(100vh * 9 / 16)); overflow: hidden; background: #000;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@supports (height: 100dvh) { #app { width: min(100vw, calc(100dvh * 9 / 16)); } }
html.with-nav #app { width: min(100vw, calc((100vh - 49px) * 9 / 16)); }
@supports (height: 100dvh) { html.with-nav #app { width: min(100vw, calc((100dvh - 49px) * 9 / 16)); } }

/* a wide screen: the feed in a phone (390 x 844, an iPhone's screen), with its status bar (2:47 at night, the battery
   nearly gone) and home bar drawn in; never on a real phone, which has its own */
.ios-bar, .ios-home, .side { display: none; }
@media (min-aspect-ratio: 3/4) and (min-width: 700px) {
  :root { --st: 47px; --sb: 21px; }
  body { background: radial-gradient(ellipse at 50% 40%, #232326, #0b0b0c 70%); }
  #app, html.with-nav #app { top: 22px; bottom: 22px; width: calc((100vh - 44px) * 390 / 844); border-radius: 52px;
    box-shadow: 0 0 0 11px #19191b, 0 0 0 12.5px #3b3b3f, 0 30px 80px rgba(0, 0, 0, .7); }
  @supports (height: 100dvh) { #app, html.with-nav #app { width: calc((100dvh - 44px) * 390 / 844); } }
  .ios-bar { display: flex; position: absolute; left: 0; right: 0; top: 0; height: 47px; z-index: 20; align-items: center; justify-content: space-between;
    padding: 4px 30px 0 44px; pointer-events: none; color: #fff; font: 600 16px/1 -apple-system, var(--font); letter-spacing: .01em; }
  .ios-bar .isl { position: absolute; left: 50%; top: 11px; width: 122px; height: 35px; margin-left: -61px; border-radius: 18px; background: #000; }
  .ios-bar .ics { display: flex; align-items: center; gap: 6px; }
  .ios-bar svg { height: 12px; fill: #fff; }
  .ios-bar .bat { position: relative; width: 25px; height: 12px; border: 1.3px solid rgba(255, 255, 255, .5); border-radius: 4px; }
  .ios-bar .bat::before { content: ''; position: absolute; left: 1.5px; top: 1.5px; bottom: 1.5px; width: 3px; border-radius: 1.5px; background: #ff3b30; }
  .ios-bar .bat::after { content: ''; position: absolute; right: -4px; top: 3.2px; width: 1.6px; height: 4px; border-radius: 0 1px 1px 0; background: rgba(255, 255, 255, .5); }
  .ios-home { display: block; position: absolute; left: 50%; bottom: 7px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: #fff; z-index: 20; pointer-events: none; }
  html.layer-open .ios-home { background: #000; }
  .side { display: flex; flex-direction: column; gap: 16px; position: fixed; top: 50%; transform: translateY(-50%); left: calc(50% + (100vh - 44px) * 195 / 844 + 40px); }
  .side-b { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; }
  .side-b:hover { background: rgba(255, 255, 255, .2); }
  .side-b svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
  .side-b:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
}

/* ------------------------------------------------------------------ the scroller: one full-screen slot per video */
.feed { position: absolute; top: 0; left: 0; right: 0; bottom: var(--nav); overflow-x: hidden; overflow-y: scroll; scroll-snap-type: y mandatory;
  overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; outline: none; touch-action: pan-y; }
.feed::-webkit-scrollbar { display: none; }
.slot { position: relative; width: 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; contain: strict; }
.media { position: absolute; inset: 0; background: #000 center / cover no-repeat; }
.media video, .media .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.media video { z-index: 0; }
.media .poster { z-index: 1; transition: opacity .12s linear; }
.slot.shown .media .poster { opacity: 0; }
/* the bottom (and a little of the top) a shade darker, so the white text reads on any picture */
.shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .22) 0, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, .42) 100%); }

/* paused: a big pale play mark */
.pz { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; opacity: 0; transform: scale(1.25);
  transition: opacity .14s, transform .14s; pointer-events: none; }
.pz svg { width: 100%; height: 100%; fill: rgba(255, 255, 255, .5); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .15)); }
.slot.paused .pz { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ the right rail */
.rail { position: absolute; right: 4px; bottom: calc(20px + var(--sb)); width: 64px; display: flex; flex-direction: column; align-items: center; gap: 16px; z-index: 2; }
html.with-nav .rail, html.with-nav .info { bottom: 14px; }
.slot.has-sbar .rail, .slot.has-sbar .info { bottom: calc(54px + var(--sb)); }
html.with-nav .slot.has-sbar .rail, html.with-nav .slot.has-sbar .info { bottom: 50px; }
.av-wrap { position: relative; width: 48px; height: 48px; margin-bottom: 8px; }
.av { width: 48px; height: 48px; border-radius: 50%; padding: 0; overflow: hidden; border: 1px solid #fff; display: block; background: #333; }
.av-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.av-letter { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 700; font-size: 20px; color: #fff; border-radius: 50%; }
.follow { position: absolute; left: 50%; bottom: -10px; width: 21px; height: 21px; margin-left: -10.5px; border-radius: 50%; background: var(--red); display: grid; place-items: center;
  transition: transform .25s, opacity .25s .5s, background-color .2s; }
.follow svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; transition: opacity .15s; }
.follow svg:last-child { opacity: 0; stroke: var(--red); }
.slot.followed .follow { background: #fff; opacity: 0; transform: scale(.6); pointer-events: none; }
.slot.followed .follow svg:first-child { opacity: 0; }
.slot.followed .follow svg:last-child { opacity: 1; }
.follow.pop { animation: fpop .35s ease-out; }
@keyframes fpop { 40% { transform: scale(1.25); } }
.rb { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 44px; width: 56px; color: #fff; }
.rb svg { width: 38px; height: 38px; fill: #fff; filter: drop-shadow(var(--shadow)); transition: fill .15s; }
.rb.cmt svg { width: 37px; height: 37px; }
.rb.cmt .cdot { fill: rgba(22, 24, 35, .55); }
.rb.save svg { width: 34px; height: 34px; margin: 2px 0; }
.rb.share svg { width: 35px; height: 35px; }
.rb-t { font-size: 12.5px; font-weight: 600; line-height: 1.1; text-shadow: var(--shadow); }
.slot.liked .like svg { fill: var(--red); }
.slot.saved .save svg { fill: var(--yellow); }
.like.pop svg, .save.pop svg { animation: hpop .38s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes hpop { 0% { transform: scale(.6); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
/* the spinning record with the creator in it */
.disc { position: relative; width: 46px; height: 46px; margin-top: 6px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, #2b2b2b 0 38%, #161616 39% 46%, #2a2a2a 47% 52%, #121212 53% 60%, #262626 61% 66%, #0e0e0e 67% 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset; animation: spin 5.5s linear infinite; animation-play-state: paused; }
.disc-in { width: 27px; height: 27px; border-radius: 50%; overflow: hidden; display: block; }
/* the little notes that float up and to the left of the record while it plays */
.notes { position: absolute; left: -18px; top: -10px; width: 40px; height: 40px; pointer-events: none; }
.notes i { position: absolute; right: 0; bottom: 0; width: 15px; height: 15px; opacity: 0; }
.notes svg { width: 100%; height: 100%; fill: rgba(255, 255, 255, .85); filter: drop-shadow(var(--shadow)); }
.slot.cur.playing .notes i { animation: note 2.6s linear infinite; }
.slot.cur.playing .notes i:nth-child(2) { animation-delay: 1.3s; }
@keyframes note { 0% { opacity: 0; transform: translate(0, 0) scale(.6) rotate(0deg); } 15% { opacity: 1; }
  70% { opacity: .9; } 100% { opacity: 0; transform: translate(-22px, -34px) scale(1) rotate(-18deg); } }
.slot.cur.playing .disc { animation-play-state: running; }
.disc-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.disc-in .av-letter { font-size: 13px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ the handle, caption and sound line */
.info { position: absolute; left: 12px; right: 78px; bottom: calc(22px + var(--sb)); z-index: 2; text-shadow: var(--shadow); }
.chips { display: flex; gap: 6px; margin-bottom: 10px; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; height: 26px; padding: 0 7px 0 6px; border-radius: 4px; flex: 0 1 auto;
  background: rgba(30, 30, 34, .5); color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; text-shadow: none; white-space: nowrap; }
.chip span { flex: none; }
.chip .ch-j { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chip .ch-s { opacity: .8; }
.chip svg { width: 15px; height: 15px; flex: none; fill: #fff; }
.chip svg .ln { fill: none; stroke: rgba(30, 30, 34, .9); stroke-width: 1.2; stroke-linecap: round; }
.chip svg:last-child { width: 12px; height: 12px; fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip svg .ln2 { fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; }
/* "Search · <words>": a bar along the bottom of the video */
.sbar { position: absolute; left: 0; right: 0; bottom: var(--sb); height: 36px; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: rgba(22, 22, 26, .72); color: #fff; font-size: 14px; text-align: left; }
html.with-nav .sbar { bottom: 0; }
.sbar svg { width: 16px; height: 16px; flex: none; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }
.sbar span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sbar svg:last-child { width: 14px; height: 14px; stroke: rgba(255, 255, 255, .7); stroke-width: 1.8; }
.slot.has-sbar .prog, .slot.has-sbar .seek { bottom: calc(36px + var(--sb)); }
html.with-nav .slot.has-sbar .prog, html.with-nav .slot.has-sbar .seek { bottom: 36px; }
.who-row { display: flex; align-items: baseline; gap: 5px; margin-bottom: 4px; min-width: 0; }
.who { display: block; font-size: 17px; font-weight: 700; line-height: 1.25; padding: 0; text-align: left; letter-spacing: .005em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.when { flex: none; font-size: 14px; font-weight: 400; color: rgba(255, 255, 255, .75); }
.cap { font-size: 15px; line-height: 1.34; font-weight: 400; overflow-wrap: anywhere; }
.cap .htag { font-weight: 700; cursor: pointer; }
.more { display: inline; font-size: 15px; font-weight: 700; line-height: 1.34; padding: 0 0 0 2px; text-shadow: var(--shadow); }
.slot.expanded .cap { max-height: 42vh; overflow-y: auto; }
.slot.expanded .shade { background: linear-gradient(to bottom, rgba(0, 0, 0, .22) 0, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, .3) 40%, rgba(0, 0, 0, .7) 100%); }
.snd { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 14.5px; font-weight: 400; width: 100%; padding: 0; text-align: left; text-shadow: var(--shadow); }
.snd svg { width: 15px; height: 15px; flex: none; fill: #fff; filter: drop-shadow(var(--shadow)); }
.mq { display: block; overflow: hidden; width: 64%; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 88%, transparent 100%); }
.mq span { display: inline-block; white-space: nowrap; padding-left: 7%; animation: mq 9s linear infinite; animation-play-state: paused; }
.slot.cur.playing .mq span { animation-play-state: running; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------ the progress bar (drag to seek) */
.prog { position: absolute; left: 0; right: 0; bottom: var(--sb); height: 2px; background: rgba(255, 255, 255, .2); z-index: 3; pointer-events: none;
  transition: height .12s; }
html.with-nav .prog { bottom: 0; }
.prog i { display: block; height: 100%; background: rgba(255, 255, 255, .85); transform-origin: 0 50%; transform: scaleX(0); }
.seek { position: absolute; left: 0; right: 0; bottom: var(--sb); height: 20px; z-index: 4; touch-action: none; cursor: pointer; }
html.with-nav .seek { bottom: 0; }
.slot.scrub .prog { height: 4px; background: rgba(255, 255, 255, .3); }
.slot.scrub .prog::before { content: ''; position: absolute; top: 50%; left: var(--knob, 0); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; }
.slot.scrub .prog i { background: #fff; }
.slot.scrub .info, .slot.scrub .rail { opacity: 0; }
.stime { position: absolute; left: 0; right: 0; bottom: calc(90px + var(--sb)); text-align: center; font-size: 28px; font-weight: 700; color: rgba(255, 255, 255, .7);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .4); opacity: 0; pointer-events: none; font-variant-numeric: tabular-nums; }
.stime b { color: #fff; }
.slot.scrub .stime { opacity: 1; }
/* waiting for data: a line that grows out of the middle of the bar */
.slot.buf .prog::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(255, 255, 255, .75);
  animation: buf .9s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes buf { 0% { transform: scaleX(0); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

/* failed to load */
.slot.failed .media::after { content: "Couldn't play this video"; position: absolute; left: 0; right: 0; top: 46%; text-align: center; font-size: 15px; font-weight: 600;
  color: rgba(255, 255, 255, .8); }

/* a v5 kit clip in a slot: its full-bleed background and its 540 x 960 stage, scaled to fit */
.slot.kit .media { background: #22004a; }
.slot.kit .k-bg { position: absolute; inset: 0; }
.slot.kit .k-stage { position: absolute; left: 50%; top: 50%; transform: scale(var(--k-scale, .72)); }
.slot.kit .k-bg .rays { width: min(2400px, calc(1.25 * (100vw + 100vh))); height: min(2400px, calc(1.25 * (100vw + 100vh))); }
.slot.kit.cur .k-bg .blob, .slot.kit.cur .k-bg .rays { will-change: transform; }
.slot.kit.cur .k-bg .wash { will-change: opacity; }
.slot.kit:not(.cur) .it { will-change: auto; }
html.lite .slot.kit .k-bg .rays { display: none; }
.slot.loading .media::before { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: #fff; opacity: .5; }

/* ------------------------------------------------------------------ the top: sound, the two feeds, search */
.top { position: absolute; left: 0; right: 0; top: 0; z-index: 5; height: calc(50px + var(--st)); padding: var(--st) 6px 0; display: flex; align-items: center;
  justify-content: space-between; pointer-events: none; }
.top > * { pointer-events: auto; }
.top-ic { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; }
.top-ic svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(var(--shadow)); }
#mute .spk { fill: #fff; }
#mute .off { opacity: 0; }
html.is-muted #mute .on { opacity: 0; }
html.is-muted #mute .off { opacity: 1; }
.tabs { position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; height: 50px; display: flex; align-items: center; gap: 22px; }
.tab { position: relative; height: 44px; font-size: 17px; font-weight: 600; color: rgba(255, 255, 255, .62); text-shadow: var(--shadow); letter-spacing: .005em; white-space: nowrap; }
.tab.on { color: #fff; font-weight: 700; }
.tab.on::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 28px; height: 3px; margin-left: -14px; border-radius: 2px; background: #fff;
  box-shadow: var(--shadow); }
.tab:focus-visible, .top-ic:focus-visible, .rb:focus-visible, .av:focus-visible, .who:focus-visible, .chip:focus-visible, .disc:focus-visible, .unmute:focus-visible {
  outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }

/* not yet unmuted: a pill under the tabs */
.unmute { position: absolute; z-index: 5; left: 50%; top: calc(var(--st) + 62px); transform: translateX(-50%); display: flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 15px 0 12px; border-radius: 19px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap;
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s linear .2s; }
.unmute svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.unmute .spk { fill: #fff; }
html.locked .unmute { opacity: 1; visibility: visible; transition: opacity .2s; }
html.layer-open .unmute, html.no-feed .unmute { opacity: 0; visibility: hidden; }

/* a double tap: a heart where the finger was */
.hburst { position: absolute; z-index: 6; width: 96px; height: 96px; margin: -60px 0 0 -48px; pointer-events: none; transform: rotate(var(--rot, 0deg));
  animation: hburst .75s ease-out forwards; }
.hburst svg { width: 100%; height: 100%; fill: var(--red); filter: drop-shadow(0 4px 10px rgba(254, 44, 85, .35)); }
@keyframes hburst { 0% { opacity: 0; transform: rotate(var(--rot)) scale(.6); } 18% { opacity: 1; transform: rotate(var(--rot)) scale(1.2); }
  32% { transform: rotate(var(--rot)) scale(1); } 65% { opacity: 1; transform: rotate(var(--rot)) scale(1) translateY(0); }
  100% { opacity: 0; transform: rotate(var(--rot)) scale(1.1) translateY(-70px); } }

/* ------------------------------------------------------------------ Following, with nobody followed yet */
.empty { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: calc(70px + var(--st)) 0 calc(40px + var(--sb)); background: #000; }
.empty[hidden] { display: none; }
.em-h { font-size: 17px; font-weight: 600; text-align: center; padding: 0 32px 22px; line-height: 1.35; }
.em-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px; scrollbar-width: none; }
.em-row::-webkit-scrollbar { display: none; }
.em-card { position: relative; flex: none; width: 62%; max-width: 260px; aspect-ratio: 3 / 4.6; border-radius: 8px; overflow: hidden; background: #222; scroll-snap-align: center; cursor: pointer; }
.em-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.em-in { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 40px 12px 14px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .75)); text-align: center; }
.em-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1.5px solid #fff; margin-bottom: 6px; font-size: 26px; }
.em-in b { font-size: 15px; font-weight: 700; }
.em-in > span:not(.em-av) { font-size: 13px; color: rgba(255, 255, 255, .75); margin-bottom: 10px; }
.em-in .btn-red { width: 100%; }

/* ------------------------------------------------------------------ sheets (receipts, share) and pages (profile, search) */
.scrim { position: absolute; inset: 0; z-index: 7; background: rgba(0, 0, 0, .35); opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s linear .25s; }
.scrim.on { opacity: 1; visibility: visible; transition: opacity .25s; pointer-events: auto; }
.scrim { pointer-events: none; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; max-height: 74%; display: flex; flex-direction: column; background: #fff; color: var(--ink);
  border-radius: 12px 12px 0 0; padding-bottom: var(--sb); transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.sheet.open { transform: none; }
.sheet:not(.open), .page:not(.open) { pointer-events: none; }
.sheet[hidden], .page[hidden] { display: none; }
.sh-grab { width: 36px; height: 4px; border-radius: 2px; background: #d0d0d3; margin: 8px auto 0; flex: none; }
.sh-head { position: relative; flex: none; height: 44px; display: flex; align-items: center; justify-content: center; }
.sh-head h2 { font-size: 15px; font-weight: 700; }
.sh-x { position: absolute; right: 6px; top: 0; width: 44px; height: 44px; display: grid; place-items: center; }
.sh-x svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.sh-body { overflow-y: auto; padding: 6px 16px 18px; }
.rc-paper { display: flex; align-items: center; gap: 12px; padding: 10px 0 14px; }
.rc-paper svg { width: 40px; height: 40px; padding: 8px; flex: none; border-radius: 50%; background: var(--gray); fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linejoin: round; }
.rc-paper b { display: block; font-size: 15px; font-weight: 700; }
.rc-paper span { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
.rc-claim { font-size: 16px; line-height: 1.42; font-weight: 500; padding: 0 0 18px; }
.rc-note { font-size: 13px; color: var(--muted); text-align: center; padding-top: 12px; }
.btn-red, .btn-gray { display: flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: 4px; font-size: 16px; font-weight: 600;
  text-decoration: none; white-space: nowrap; }
.btn-red { background: var(--red); color: #fff; }
.btn-red.on { background: var(--gray); color: var(--ink); }
.btn-gray { background: var(--gray); color: var(--ink); }
.btn-red.wide, .btn-gray.wide { width: 100%; margin-top: 8px; }
.sh-row { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 22px; scrollbar-width: none; }
.sh-row::-webkit-scrollbar { display: none; }
.sh-it { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--ink); text-decoration: none; }
.sh-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.sh-ic svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sh-it[data-share="more"] .sh-ic svg { fill: #fff; stroke: none; }
.sh-t { font-size: 12px; color: rgba(22, 24, 35, .75); text-align: center; line-height: 1.2; }
.page { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; background: #fff; color: var(--ink); transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.page.open { transform: none; }
.pg-head { flex: none; display: flex; align-items: center; gap: 4px; height: calc(48px + var(--st)); padding: var(--st) 8px 0 4px; border-bottom: 1px solid rgba(22, 24, 35, .08); }
.pg-head h2 { flex: 1; text-align: center; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-sp { width: 44px; flex: none; }
.pg-back { width: 44px; height: 44px; flex: none; display: grid; place-items: center; }
.pg-back svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.pg-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--sb); }
.pf-top { display: flex; flex-direction: column; align-items: center; padding: 20px 24px 14px; text-align: center; }
.pf-av { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; font-size: 38px; }
.pf-handle { font-size: 17px; font-weight: 600; margin-top: 12px; }
.pf-btns { display: flex; gap: 6px; margin-top: 16px; }
.pf-follow { min-width: 164px; }
.pf-share { width: 44px; padding: 0; }
.pf-share svg { width: 22px; height: 22px; fill: var(--ink); }
.pf-bio { font-size: 14px; line-height: 1.4; margin-top: 14px; max-width: 320px; white-space: pre-line; }
.pf-tabs { display: flex; justify-content: center; border-bottom: 1px solid rgba(22, 24, 35, .12); }
.pf-tabs span { padding: 10px 40px 8px; border-bottom: 2px solid var(--ink); }
.pf-tabs svg { width: 22px; height: 22px; fill: var(--ink); }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
.pgrid.two { grid-template-columns: repeat(2, 1fr); gap: 12px 8px; padding: 10px 8px 16px; }
.g-it { display: flex; flex-direction: column; text-align: left; color: var(--ink); min-width: 0; }
.g-img { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; background: #222 center / cover no-repeat; overflow: hidden; }
.pgrid.two .g-img { border-radius: 4px; aspect-ratio: 3 / 4; }
.g-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-pl { position: absolute; left: 6px; bottom: 5px; display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: #fff; text-shadow: var(--shadow); }
.g-pl svg { width: 13px; height: 13px; fill: #fff; filter: drop-shadow(var(--shadow)); }
.g-cap { font-size: 14px; line-height: 1.3; margin-top: 6px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.g-who { display: flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 12.5px; color: rgba(22, 24, 35, .7); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.g-av { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex: none; font-size: 10px; }
.sq-box { flex: 1; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 4px; background: var(--gray); margin-right: 8px; }
.sq-box svg { width: 18px; height: 18px; flex: none; fill: none; stroke: rgba(22, 24, 35, .45); stroke-width: 2.3; stroke-linecap: round; }
.sq-box input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.sq-users { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid rgba(22, 24, 35, .08); }
.sq-user { display: flex; align-items: center; gap: 12px; padding: 8px 16px; text-align: left; color: var(--ink); }
.sq-av { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; font-size: 20px; }
.sq-user b { display: block; font-size: 15px; font-weight: 700; }
.sq-user span span { display: block; font-size: 13px; color: var(--muted); }
.sq-none { text-align: center; padding: 60px 16px; color: var(--muted); }
.page :focus-visible, .sheet :focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.sq-box input:focus-visible { outline: none; }
.sq-box:focus-within { box-shadow: 0 0 0 1px rgba(22, 24, 35, .2) inset; }

.toast { position: absolute; z-index: 9; left: 50%; top: 42%; transform: translate(-50%, -50%); max-width: 80%; padding: 12px 18px; border-radius: 6px;
  background: rgba(37, 37, 42, .92); color: #fff; font-size: 15px; font-weight: 600; text-align: center; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s, visibility 0s linear .18s; }
.toast.on { opacity: 1; visibility: visible; transition: opacity .18s; }

/* a slow phone (frames over 24 ms for a while, feed.js): nothing turns or slides but the video */
html.lite .disc, html.lite .mq span, html.lite .notes i { animation: none !important; }
/* reduce motion (the long-press menu, or the system setting): nothing turns, slides or bursts */
html.calm .disc, html.calm .mq span, html.calm .notes i, html.calm .coach svg { animation: none !important; }
html.calm .sheet, html.calm .page, html.calm .scrim, html.calm .pz, html.calm .toast, html.calm .unmute, html.calm .media .poster { transition: none; }
html.calm .like.pop svg, html.calm .save.pop svg, html.calm .follow.pop { animation: none; }
html.calm .slot.kit .k-cam, html.calm .slot.kit .k-bg .blob { transform: none !important; }
html.calm .slot.kit .k-bg .rays { display: none; }

/* ------------------------------------------------------------------ the bottom bar */
.bnav { display: none; }
html.with-nav .bnav { display: flex; position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; height: var(--nav); padding-bottom: var(--sb); background: #000;
  border-top: .5px solid rgba(255, 255, 255, .12); }
.bnav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: rgba(255, 255, 255, .62);
  font-size: 10px; font-weight: 500; }
.bnav button svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bnav button.on { color: #fff; }
.bnav button.on[data-nav="home"] svg { fill: #fff; stroke: #fff; }
.bnav button.on[data-nav="me"] svg, .bnav button.on[data-nav="inbox"] svg { stroke-width: 2.4; }
.bnav .plusbox { width: 44px; height: 29px; border-radius: 8px; background: #fff; display: grid; place-items: center; }
.bnav .plusbox svg { width: 20px; height: 20px; stroke: #000; stroke-width: 2.8; }
.bnav button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; border-radius: 8px; }
/* the tab pages (Discover, Inbox, Profile) keep the bar; a creator's page, a sound's page and the sheets go over it */
html.with-nav .page.tabpage { bottom: var(--nav); }

/* ------------------------------------------------------------------ the first-visit hint (no dimming, takes no taps) */
.coach { position: absolute; left: 0; right: 0; top: 40%; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s, visibility 0s linear .3s; }
html.coaching .coach { opacity: 1; visibility: visible; transition: opacity .3s; }
.coach svg { width: 58px; height: 58px; fill: #fff; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .45)); animation: swipeup 1.4s ease-in-out infinite; }
.coach b { font-size: 17px; font-weight: 700; padding: 6px 14px; border-radius: 16px; background: rgba(0, 0, 0, .45); }
@keyframes swipeup { 0% { transform: translateY(36px); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateY(-40px); opacity: 1; } 100% { transform: translateY(-48px); opacity: 0; } }

/* ------------------------------------------------------------------ the long-press menu */
.sheet-menu .sh-body { padding: 8px 0 14px; }
.mn-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 0 20px; font-size: 16px; font-weight: 500; color: var(--ink); text-align: left; }
.mn-row svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mn-row span { flex: 1; }
.mn-btn { cursor: pointer; }
.mn-btn:active { background: rgba(22, 24, 35, .06); }
.mn-row input { width: 22px; height: 22px; accent-color: var(--red); }
.mn-speeds { display: flex; gap: 8px; padding: 0 20px 12px 58px; }
.mn-sp { flex: 1; height: 36px; border-radius: 18px; background: var(--gray); color: var(--ink); font-size: 14px; font-weight: 600; }
.mn-sp.on { background: var(--ink); color: #fff; }
.mn-sp:disabled { opacity: .4; cursor: default; }

/* ------------------------------------------------------------------ a sound's or playlist's page; you; the inbox */
.ls-top { display: flex; align-items: center; gap: 14px; padding: 18px 16px; }
.ls-disc, .ls-pl { width: 88px; height: 88px; flex: none; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: #161823; }
.ls-av { width: 100%; height: 100%; object-fit: cover; font-size: 34px; }
.ls-pl svg { width: 44px; height: 44px; fill: #fff; }
.ls-pl svg .ln2 { fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; }
.ls-top b { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; }
.ls-top span { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; }
.me-av { display: grid; place-items: center; background: #e3e3e6; border-radius: 50%; }
.me-av svg { width: 54px; height: 54px; fill: none; stroke: #8a8b91; stroke-width: 1.6; }
.me-tabs button { flex: 1; display: grid; place-items: center; padding: 10px 0 8px; border-bottom: 2px solid transparent; color: rgba(22, 24, 35, .4); }
.me-tabs button.on { border-bottom-color: var(--ink); color: var(--ink); }
.me-tabs svg { width: 22px; height: 22px; fill: currentColor; }
.me-tabs button[data-me="following"] svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.pf-tabs.me-tabs { justify-content: stretch; }
.sq-user .me-u { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; color: var(--ink); }
.sq-user .me-f { height: 34px; font-size: 14px; padding: 0 14px; }
.ib-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 90px 24px; text-align: center; }
.ib-empty svg { width: 56px; height: 56px; fill: none; stroke: rgba(22, 24, 35, .35); stroke-width: 1.5; stroke-linejoin: round; margin-bottom: 6px; }
.ib-empty b { font-size: 17px; }
.ib-empty span { font-size: 14px; color: var(--muted); }
.rc-img { display: block; width: 100%; border-radius: 6px; margin: 0 0 14px; border: 1px solid rgba(22, 24, 35, .1); }

@media (prefers-reduced-motion: reduce) {
  .sheet, .page, .scrim, .pz, .toast, .unmute, .media .poster { transition: none; }
}
