/* =========================================================
   TikTok · Tune My Feed — high-fidelity demo
   ========================================================= */
:root {
  --red: #FE2C55;
  --cyan: #25F4EE;
  --ink: #161823;
  --ink2: rgba(22, 24, 35, .5);
  --ink3: rgba(22, 24, 35, .34);
  --line: rgba(22, 24, 35, .12);
  --sheet: #F1F1F2;
  --soft: #F8F8F8;
  --green: #34C759;
  --sat: 54px;          /* safe area top (fake status bar on laptop) */
  --sab: 30px;          /* safe area bottom (home indicator) */
  --nav-h: 48px;
  --fit: 1;
  --kb: 0px;            /* on-screen keyboard height (phone) */
  --font: 'TikTok Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  --spring: cubic-bezier(.32, .72, 0, 1);
}
html.is-phone {
  --sat: max(env(safe-area-inset-top), 14px);
  --sab: max(calc(env(safe-area-inset-bottom) - 3px), 0px);
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #0d0d0f;
  font-family: var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none; -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}
body { position: fixed; inset: 0; }
button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: inherit;
}
input, textarea { font: inherit; -webkit-user-select: text; user-select: text; border: 0; outline: none; background: transparent; color: inherit; }
img, video { -webkit-user-drag: none; -webkit-touch-callout: none; display: block; }
svg { display: block; width: 100%; height: 100%; overflow: visible; }
i[data-icon], .ic { display: inline-flex; width: 24px; height: 24px; flex: none; font-style: normal; }

/* ---------- Stage / device ---------- */
.stage {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 800px at 50% 25%, #2a2a30 0%, #121215 60%, #0b0b0d 100%);
}
.device {
  position: relative; flex: none; width: 390px; height: 844px; border-radius: 56px; overflow: hidden;
  background: #000; isolation: isolate; transform: scale(var(--fit)); transform-origin: center center;
  box-shadow: 0 0 0 10px #050505, 0 0 0 12px #2c2c31, 0 0 0 13px #4b4b52, 0 40px 100px rgba(0, 0, 0, .7);
}
html.is-phone .stage { display: block; background: #000; }
html.is-phone .device { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; transform: none; }
html.is-phone .statusbar, html.is-phone .island, html.is-phone .home-indicator, html.is-phone .presenter-hint { display: none; }

.app { position: absolute; inset: 0; overflow: hidden; background: #000; color: #fff; }

.presenter-hint { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; text-align: center; color: rgba(255, 255, 255, .32); font-size: 12px; }
.presenter-hint kbd { font: 600 11px var(--font); border: 1px solid rgba(255, 255, 255, .25); border-radius: 4px; padding: 1px 5px; }

/* ---------- Fake iOS chrome ---------- */
.statusbar { position: absolute; top: 0; left: 0; right: 0; height: 54px; z-index: 900; pointer-events: none; color: #fff; transition: color .2s; }
.sb-time { position: absolute; left: 0; width: 150px; top: 17px; text-align: center; font: 600 17px/22px -apple-system, 'SF Pro Text', var(--font); letter-spacing: -.3px; }
.sb-right { position: absolute; right: 27px; top: 21px; display: flex; align-items: center; gap: 6px; }
.sb-right i[data-icon="signal"] { width: 18px; height: 12px; }
.sb-right i[data-icon="wifi"] { width: 17px; height: 12px; }
.sb-battery {
  position: relative; width: 27px; height: 13px; border-radius: 4.3px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(90deg, currentColor 0 79%, rgba(255, 255, 255, .38) 79%);
}
.sb-battery::after { content: ''; position: absolute; right: -3px; top: 4.5px; width: 1.6px; height: 4px; border-radius: 0 1px 1px 0; background: currentColor; opacity: .4; }
.sb-battery b { font: 700 11px/1 -apple-system, var(--font); color: #000; letter-spacing: -.4px; }
.device.sb-dark .statusbar { color: #000; }
.device.sb-dark .sb-battery { background: linear-gradient(90deg, #000 0 79%, rgba(0, 0, 0, .3) 79%); }
.device.sb-dark .sb-battery b { color: #fff; }
.island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 124px; height: 36px; border-radius: 20px; background: #000; z-index: 1000; pointer-events: none; }
.home-indicator { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 3px; background: #fff; z-index: 1000; pointer-events: none; transition: background .2s; }
.device.hi-dark .home-indicator { background: #000; }
.sb-hit { position: absolute; top: 0; left: 0; right: 0; height: 54px; z-index: 950; }
html.is-phone .sb-hit { height: var(--sat); }

/* ---------- Home / feed ---------- */
.home { position: absolute; top: 0; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--sab)); overflow: hidden; background: #000; }
.feed { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.track { position: absolute; inset: 0; will-change: transform; }
.track.animating { transition: transform .38s cubic-bezier(.2, .8, .2, 1); }
.slide { position: absolute; left: 0; right: 0; top: 0; height: 100%; overflow: hidden; background: #000; }
.slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.slide::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 36%; background: linear-gradient(to top, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0)); pointer-events: none; z-index: 1; }
.slide.removing { transition: opacity .28s, transform .28s; opacity: 0; transform: scale(.94); }
.top-shade { position: absolute; top: 0; left: 0; right: 0; height: calc(var(--sat) + 72px); background: linear-gradient(rgba(0, 0, 0, .3), rgba(0, 0, 0, 0)); pointer-events: none; z-index: 5; transition: opacity .18s; }

.feed-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 36px; text-align: center; background: #000; z-index: 3; }
.feed-empty i { width: 64px; height: 64px; color: rgba(255, 255, 255, .5); }
.feed-empty b { font-size: 18px; margin: 16px 0 6px; }
.feed-empty p { margin: 0 0 20px; color: rgba(255, 255, 255, .6); font-size: 14px; line-height: 20px; }
.feed-empty .btn-red { padding: 0 28px; }

/* Slide overlay UI */
.slide-ui { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: opacity .18s; }
.slide-ui > * { pointer-events: auto; }
.menu-open .slide-ui, .clear-display .slide-ui, .scrubbing .slide-ui { opacity: 0; }
.menu-open .slide-ui *, .clear-display .slide-ui *, .scrubbing .slide-ui * { pointer-events: none !important; }
.menu-open .topbar, .clear-display .topbar, .scrubbing .topbar,
.menu-open .top-shade, .clear-display .top-shade,
.menu-open .unmute-hint, .clear-display .unmute-hint { opacity: 0; pointer-events: none; }
.menu-open .progress, .clear-display .progress { opacity: 0; pointer-events: none; }

.rail { position: absolute; right: 2px; bottom: 14px; width: 56px; display: flex; flex-direction: column; align-items: center; }
.rail-avatar { position: relative; width: 44px; height: 44px; margin-bottom: 30px; }
.rail-avatar img { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #fff; object-fit: cover; background: #333; }
.follow-btn {
  position: absolute; left: 50%; bottom: -9px; width: 20px; height: 20px; border-radius: 50%; margin-left: -10px;
  background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center;
  transition: transform .3s cubic-bezier(.3, 1.5, .6, 1), opacity .3s .5s, background .2s, color .2s;
}
.follow-btn i { width: 13px; height: 13px; }
.follow-btn .chk { display: none; }
.follow-btn.done { background: #fff; color: var(--red); transform: rotate(360deg); }
.follow-btn.done .pl { display: none; }
.follow-btn.done .chk { display: inline-flex; }
.follow-btn.gone { opacity: 0; transform: scale(.3) rotate(360deg); pointer-events: none; }
.rail-btn { display: flex; flex-direction: column; align-items: center; width: 56px; height: 64px; color: #fff; }
.rail-btn i { width: 33px; height: 33px; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .28)); transition: color .15s; }
.rail-btn.like i { width: 35px; height: 35px; margin: -1px 0 -1px; }
.rail-btn .count { font-size: 12px; font-weight: 600; line-height: 15px; margin-top: 0; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); letter-spacing: .1px; }
.rail-btn.like.on i { color: var(--red); animation: likePop .42s ease; }
.rail-btn.save.on i { color: #FACE15; animation: likePop .42s ease; }
@keyframes likePop { 0% { transform: scale(.55); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.disc {
  margin-top: 6px; width: 39px; height: 39px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: repeating-radial-gradient(circle at 50% 50%, #151515 0 1.6px, #262626 1.6px 3.2px);
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .1); animation: spin 5.5s linear infinite;
}
.disc img { width: 23px; height: 23px; border-radius: 50%; object-fit: cover; }
.slide.paused .disc, .slide.user-paused .disc { animation-play-state: paused; }
@keyframes spin { to { transform: rotate(360deg); } }

.info { position: absolute; left: 12px; right: 80px; bottom: 9px; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .3); }
.repost-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 13px 0 11px; margin-bottom: 8px;
  border-radius: 14px; background: rgba(48, 48, 48, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 14px; font-weight: 500; text-shadow: none; visibility: hidden; opacity: 0; transform: translateY(6px);
  transition: opacity .3s, transform .3s, visibility 0s .3s;
}
.repost-pill i { width: 16px; height: 16px; }
.slide.show-repost .repost-pill { visibility: visible; opacity: 1; transform: none; transition: opacity .3s, transform .3s; }
.repost-pill.done { background: rgba(254, 44, 85, .85); }
.username { display: flex; align-items: center; gap: 4px; font-size: 17px; font-weight: 700; line-height: 22px; margin-bottom: 2px; }
.verified { width: 14px; height: 14px; border-radius: 50%; background: #20D5EC; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.verified i { width: 9px; height: 9px; }
.caption { font-size: 15px; line-height: 19px; font-weight: 400; overflow-wrap: break-word; }
.caption .tag { font-weight: 600; }
.caption .more { font-weight: 700; margin-left: 2px; }
.caption.expanded { max-height: 40vh; overflow-y: auto; }
.see-translation { display: block; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .78); margin-top: 5px; line-height: 20px; }
.translation { font-size: 15px; line-height: 20px; color: rgba(255, 255, 255, .92); margin-top: 4px; padding-left: 8px; border-left: 2px solid rgba(255, 255, 255, .5); }
.sound-row { display: flex; align-items: center; gap: 6px; margin-top: 5px; height: 20px; max-width: 74%; font-size: 15px; }
.sound-row > i { width: 14px; height: 14px; }
.marquee { overflow: hidden; white-space: nowrap; flex: 1; -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.marquee .mq { display: inline-flex; animation: marquee 10s linear infinite; }
.marquee .mq span { padding-right: 36px; }
.slide.paused .mq, .slide.user-paused .mq { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.big-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; color: rgba(255, 255, 255, .55); opacity: 0; transform: scale(1.5); transition: opacity .15s, transform .15s; pointer-events: none; z-index: 3; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); }
.slide.user-paused .big-play { opacity: 1; transform: scale(1); }
.auto-caption { position: absolute; left: 50%; bottom: 30%; transform: translateX(-50%); max-width: 82%; display: none; padding: 4px 8px; border-radius: 4px; background: rgba(0, 0, 0, .6); font-size: 15px; font-weight: 600; text-align: center; line-height: 20px; z-index: 2; pointer-events: none; }
.captions-on .auto-caption { display: block; }

.burst-heart { position: absolute; width: 100px; height: 100px; margin: -64px 0 0 -50px; color: var(--red); pointer-events: none; z-index: 6; animation: burst .95s ease-out forwards; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18)); }
@keyframes burst {
  0% { transform: rotate(var(--r)) scale(1.5); opacity: 0; }
  12% { transform: rotate(var(--r)) scale(.82); opacity: 1; }
  24% { transform: rotate(var(--r)) scale(1); opacity: 1; }
  68% { transform: rotate(var(--r)) scale(1) translateY(0); opacity: 1; }
  100% { transform: rotate(var(--r)) scale(1.7) translateY(-70px); opacity: 0; }
}

/* ---------- Top bar ---------- */
.topbar { position: absolute; top: 0; left: 0; right: 0; padding-top: var(--sat); height: calc(var(--sat) + 46px); display: flex; justify-content: center; z-index: 10; transition: opacity .18s; }
.icon-btn { display: flex; align-items: center; justify-content: center; color: #fff; }
.live-btn { position: absolute; left: 6px; bottom: 0; width: 44px; height: 46px; }
.live-btn i { width: 27px; height: 24px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.search-btn { position: absolute; right: 6px; bottom: 0; width: 44px; height: 46px; }
.search-btn i { width: 23px; height: 23px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.tabs { position: relative; display: flex; align-items: center; height: 46px; }
.tab { height: 46px; padding: 0 10px; font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, .72); text-shadow: 0 1px 1px rgba(0, 0, 0, .22); transition: color .2s; letter-spacing: -.1px; }
.tab.active { color: #fff; font-weight: 700; }
.tab-underline.no-anim { transition: none; }
.tab-underline { position: absolute; left: 0; bottom: 3px; width: 22px; height: 3px; border-radius: 2px; background: #fff; transition: transform .3s var(--spring); box-shadow: 0 1px 1px rgba(0, 0, 0, .15); }

.unmute-hint {
  position: absolute; top: calc(var(--sat) + 56px); left: 50%; transform: translateX(-50%); z-index: 12;
  display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px 0 11px; border-radius: 16px;
  background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; font-size: 14px; font-weight: 600; animation: fadeIn .3s; transition: opacity .2s;
}
.unmute-hint i { width: 18px; height: 18px; }

/* Progress bar */
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; z-index: 8; display: flex; align-items: flex-end; touch-action: none; transition: opacity .18s; cursor: pointer; }
.progress-track { position: relative; width: 100%; height: 2px; background: rgba(255, 255, 255, .22); transition: height .15s; }
.progress-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 255, 255, .6); }
.progress-thumb { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%) scale(0); transition: transform .15s; }
.progress:hover .progress-track { height: 4px; }
.scrubbing .progress-track { height: 6px; }
.scrubbing .progress-fill { background: #fff; }
.scrubbing .progress-thumb { transform: translate(-50%, -50%) scale(1.3); }
.scrub-time { position: absolute; left: 0; right: 0; bottom: 96px; text-align: center; font-size: 26px; font-weight: 700; color: rgba(255, 255, 255, .6); opacity: 0; pointer-events: none; z-index: 9; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: opacity .15s; font-variant-numeric: tabular-nums; }
.scrub-time b { color: #fff; }
.scrubbing .scrub-time { opacity: 1; }

/* Coachmark */
.coachmark { position: absolute; inset: 0; z-index: 15; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; background: rgba(0, 0, 0, .52); pointer-events: none; animation: fadeIn .35s; }
.coachmark.out { animation: fadeOut .25s forwards; }
.coach-ring { position: relative; width: 104px; height: 104px; display: flex; align-items: center; justify-content: center; }
.coach-ring span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); animation: ring 1.8s ease-out infinite; }
.coach-ring span + span { animation-delay: .9s; }
.coach-ring i { width: 52px; height: 52px; color: #fff; animation: press 1.8s ease-in-out infinite; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .3)); }
@keyframes ring { 0% { transform: scale(.45); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes press { 0%, 100% { transform: translateY(0) scale(1); } 30%, 70% { transform: translateY(4px) scale(.92); } }
.coach-bubble { position: relative; max-width: 270px; padding: 14px 18px; border-radius: 12px; background: #fff; color: var(--ink); text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.coach-bubble::before { content: ''; position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.coach-bubble b { display: block; position: relative; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.coach-bubble span { position: relative; font-size: 13px; color: var(--ink2); line-height: 18px; }

/* Updating your For You */
.updating { position: absolute; inset: 0; z-index: 14; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .38); -webkit-backdrop-filter: blur(10px) saturate(.9); backdrop-filter: blur(10px) saturate(.9); animation: fadeIn .2s; }
.updating.out { animation: fadeOut .3s forwards; }
.shimmer { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .1) 44%, rgba(255, 255, 255, .22) 50%, rgba(255, 255, 255, .1) 56%, transparent 70%); background-size: 260% 100%; animation: shimmer 1.15s linear infinite; }
@keyframes shimmer { from { background-position: 140% 0; } to { background-position: -40% 0; } }
.updating-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; font-size: 16px; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.tt-loader { position: relative; width: 44px; height: 20px; }
.tt-loader span { position: absolute; top: 2px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--cyan); animation: ttA .9s ease-in-out infinite; }
.tt-loader span + span { background: var(--red); animation-name: ttB; }
@keyframes ttA { 0%, 100% { transform: translateX(0); z-index: 2; } 50% { transform: translateX(26px) scale(.82); z-index: 1; } }
@keyframes ttB { 0%, 100% { transform: translateX(26px) scale(.82); z-index: 1; } 50% { transform: translateX(0) scale(1); z-index: 2; } }
.tt-loader.dark span { mix-blend-mode: normal; }

/* ---------- Bottom nav ---------- */
.bottom-nav { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--sab)); padding-bottom: var(--sab); display: flex; background: #000; z-index: 30; transition: background .2s; }
.nav-item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; color: #fff; padding-top: 6px; transition: color .2s; }
.nav-item i { width: 25px; height: 25px; }
.nav-item .on { display: none; }
.nav-item.active .on { display: inline-flex; }
.nav-item.active .off { display: none; }
.nav-item span { font-size: 10px; font-weight: 500; line-height: 12px; letter-spacing: .1px; }
.nav-item.active span { font-weight: 700; }
.badge { position: absolute; top: 0; left: calc(50% + 3px); min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.create-btn { position: relative; width: 44px; height: 28px; margin-top: 4px; display: flex; align-items: center; justify-content: center; }
.create-btn::before, .create-btn::after { content: ''; position: absolute; top: 0; bottom: 0; width: 38px; border-radius: 8px; }
.create-btn::before { left: 0; background: var(--cyan); }
.create-btn::after { right: 0; background: var(--red); }
.create-btn i { position: relative; z-index: 1; width: 38px; height: 28px; padding: 6px 11px; border-radius: 8px; background: #fff; color: #000; }
.device.nav-light .bottom-nav { background: #fff; box-shadow: inset 0 .5px 0 var(--line); }
.device.nav-light .nav-item { color: rgba(22, 24, 35, .5); }
.device.nav-light .nav-item.active { color: var(--ink); }
.device.nav-light .create-btn i { background: #000; color: #fff; }

/* ---------- Tab screens (white) ---------- */
.tab-screen { position: absolute; top: 0; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--sab)); z-index: 20; background: #fff; color: var(--ink); overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: var(--sat); touch-action: pan-y; overscroll-behavior: contain; }

/* ---------- Overlay screens ---------- */
.overlays { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.screen { position: absolute; inset: 0; pointer-events: auto; display: flex; flex-direction: column; background: #fff; color: var(--ink); transform: translateX(100%); transition: transform .34s var(--spring); }
.screen.from-bottom { transform: translateY(100%); }
.screen.fade { transform: none; opacity: 0; transition: opacity .25s; }
.screen.in { transform: none; opacity: 1; }
.screen.dark { background: #000; color: #fff; }
.scr-head { flex: none; position: relative; height: calc(var(--sat) + 44px); padding-top: var(--sat); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; }
.scr-head .hl, .scr-head .hr { position: absolute; bottom: 0; height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.scr-head .hl { left: 4px; }
.scr-head .hr { right: 6px; }
.scr-head .hl i, .scr-head .hr i { width: 24px; height: 24px; }
.scr-head.bordered { box-shadow: inset 0 -.5px 0 var(--line); }
.scr-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; }

/* ---------- Sheets ---------- */
.sheets { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.sheet-layer { position: absolute; inset: 0; pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0); transition: background .3s; }
.sheet-layer.open .sheet-backdrop.dim { background: rgba(0, 0, 0, .45); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: var(--kb); max-height: calc(100% - var(--sat) - 8px);
  display: flex; flex-direction: column; background: #fff; color: var(--ink); border-radius: 16px 16px 0 0;
  padding-bottom: var(--sab); transform: translateY(105%); transition: transform .36s var(--spring); touch-action: none;
}
.sheet-layer.open .sheet { transform: translateY(var(--drag, 0px)); }
.sheet.dragging { transition: none !important; }
.grabber { flex: none; width: 36px; height: 4px; border-radius: 2px; background: rgba(22, 24, 35, .16); margin: 7px auto 0; }
.s-head { flex: none; position: relative; height: 50px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.s-head .s-l, .s-head .s-r { position: absolute; top: 0; height: 50px; width: 48px; display: flex; align-items: center; justify-content: center; }
.s-head .s-l { left: 2px; }
.s-head .s-r { right: 2px; }
.s-head i { width: 22px; height: 22px; }
.s-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; min-height: 0; }

/* Long-press action sheet (matches screenshot 3) */
.action-sheet { background: var(--sheet); padding: 0 16px calc(var(--sab) + 6px); }
.action-sheet .grabber { background: #C6C6C9; margin: 7px auto 8px; }
.a-group { background: #fff; border-radius: 14px; padding: 1px 0; }
.a-group + .a-group { margin-top: 11px; }
.a-row { display: flex; align-items: center; gap: 8px; width: 100%; height: 49px; padding: 0 16px 0 14px; font-size: 16px; font-weight: 500; color: var(--ink); letter-spacing: -.1px; }
.a-row:active { background: rgba(22, 24, 35, .04); }
.a-row > i { width: 24px; height: 24px; }
.a-row .grow { flex: 1; }
.new-pill { margin-left: 6px; padding: 2px 6px; border-radius: 4px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 14px; letter-spacing: .2px; }
.a-row.featured { animation: rowGlow 2.4s ease-in-out 1 .35s; }
@keyframes rowGlow { 0%, 100% { background: transparent; } 30%, 60% { background: rgba(254, 44, 85, .07); } }
.seg { display: flex; width: 190px; height: 31px; padding: 2px; border-radius: 8px; background: var(--sheet); }
.seg button { flex: 1; border-radius: 6px; font-size: 14px; font-weight: 500; color: rgba(22, 24, 35, .5); text-align: center; transition: background .15s, color .15s; }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.switch { position: relative; flex: none; width: 44px; height: 27px; border-radius: 14px; background: #E3E3E5; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 0 0 .5px rgba(0, 0, 0, .04); transition: transform .22s var(--spring); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(17px); }

/* Generic list rows in sheets/settings */
.l-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 16px; font-size: 16px; color: var(--ink); text-align: left; }
.l-row:active { background: rgba(22, 24, 35, .04); }
.l-row > i { width: 22px; height: 22px; }
.l-row .grow { flex: 1; min-width: 0; }
.l-row .chev { width: 16px; height: 16px; color: var(--ink3); }
.l-row .sub { display: block; font-size: 13px; color: var(--ink2); margin-top: 2px; }
.l-row.bordered { box-shadow: inset 0 -.5px 0 var(--line); }
.l-row .val { font-size: 14px; color: var(--ink2); }
.sec-title { padding: 18px 16px 6px; font-size: 13px; font-weight: 600; color: var(--ink2); display: flex; justify-content: space-between; align-items: center; }
.sec-title button { color: var(--ink); font-weight: 600; }
.desc { padding: 4px 16px 10px; font-size: 13px; line-height: 18px; color: var(--ink2); }

/* Comments sheet */
.comments-sheet { height: 72%; }
.c-head { flex: none; position: relative; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.c-head .s-r { position: absolute; right: 4px; top: 0; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; }
.c-head .s-r i { width: 20px; height: 20px; }
.c-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; padding: 2px 0 12px; min-height: 0; }
.c-item { display: flex; gap: 11px; padding: 9px 12px 9px 16px; }
.c-item.reply { padding-left: 59px; }
.c-item.new { animation: newComment 1.6s ease; }
@keyframes newComment { 0%, 40% { background: rgba(254, 44, 85, .08); } 100% { background: transparent; } }
.c-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: #E3E3E5; }
.c-item.reply .c-avatar { width: 24px; height: 24px; }
.c-body { flex: 1; min-width: 0; }
.c-name { font-size: 13px; font-weight: 600; color: var(--ink2); display: flex; align-items: center; gap: 5px; }
.creator-tag { font-size: 12px; font-weight: 600; color: var(--red); }
.c-text { font-size: 15px; line-height: 20px; color: var(--ink); margin: 2px 0 3px; overflow-wrap: break-word; -webkit-user-select: text; user-select: text; }
.c-meta { display: flex; gap: 16px; font-size: 13px; color: var(--ink2); }
.c-meta button { font-weight: 600; }
.c-like { flex: none; width: 34px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding-top: 12px; color: var(--ink2); font-size: 12px; }
.c-like i { width: 18px; height: 18px; }
.c-like .f { display: none; }
.c-like.on { color: var(--red); }
.c-like.on .f { display: inline-flex; animation: likePop .35s; }
.c-like.on .o { display: none; }
.c-replies { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.c-replies::before { content: ''; width: 22px; height: .5px; background: var(--ink3); }
.c-replies i { width: 14px; height: 14px; }
.c-input-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 14px; background: #fff; box-shadow: inset 0 .5px 0 var(--line); }
.c-input-bar .c-avatar { width: 32px; height: 32px; }
.c-input { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 14px; border-radius: 20px; background: var(--sheet); color: var(--ink2); }
.c-input input { flex: 1; min-width: 0; font-size: 15px; color: var(--ink); }
.c-input input::placeholder { color: rgba(22, 24, 35, .45); }
.c-input > i { width: 22px; height: 22px; }
.c-send { width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: none; align-items: center; justify-content: center; flex: none; }
.c-send i { width: 16px; height: 16px; margin-left: -2px; }
.c-input.has-text .c-send { display: flex; }
.c-input.has-text > i { display: none; }

/* Share sheet */
.share-sheet { padding-bottom: var(--sab); }
.sh-title { position: relative; flex: none; height: 50px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.sh-title .s-r { position: absolute; right: 4px; top: 0; width: 46px; height: 50px; display: flex; align-items: center; justify-content: center; }
.sh-title .s-r i { width: 20px; height: 20px; }
.sh-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 14px 14px; touch-action: pan-x; scrollbar-width: none; }
.sh-row::-webkit-scrollbar { display: none; }
.sh-contact, .sh-app { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; line-height: 14px; text-align: center; color: var(--ink); }
.sh-contact .av { position: relative; width: 56px; height: 56px; }
.sh-contact img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; transition: transform .15s; }
.sh-contact .sel { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; border: 2px solid #fff; display: none; align-items: center; justify-content: center; }
.sh-contact .sel i { width: 12px; height: 12px; }
.sh-contact.on .sel { display: flex; }
.sh-contact.on img { transform: scale(.92); }
.sh-contact span, .sh-app span { width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-app { color: rgba(22, 24, 35, .75); }
.sh-app .circ { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.sh-app .circ i { width: 25px; height: 25px; }
.sh-app .circ.gray { background: var(--sheet); color: var(--ink); }
.sh-divider { height: .5px; background: var(--line); margin: 0 16px 12px; }
.sh-cancel { display: block; width: 100%; height: 50px; font-size: 16px; font-weight: 500; text-align: center; box-shadow: inset 0 .5px 0 var(--line); }
.sh-send { display: none; padding: 0 16px 10px; }
.share-sheet.has-sel .sh-send { display: block; }
.btn-red, .btn-gray, .btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 16px;
  border-radius: 6px; font-size: 16px; font-weight: 600; transition: background .2s, color .2s;
}
.btn-red, .btn-primary { background: var(--red); color: #fff; }
.btn-gray { background: var(--sheet); color: var(--ink); }
.btn-primary { width: 100%; }
.btn-primary:disabled { background: var(--sheet); color: var(--ink3); cursor: default; }
.btn-block { width: 100%; }

/* Report / info sheets */
.report-done { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 28px 18px; }
.report-done .okc { width: 64px; height: 64px; border-radius: 50%; background: #E9FBF0; color: var(--green); display: flex; align-items: center; justify-content: center; }
.report-done .okc i { width: 32px; height: 32px; }
.report-done b { font-size: 18px; margin: 14px 0 6px; }
.report-done p { margin: 0 0 20px; font-size: 14px; line-height: 20px; color: var(--ink2); }
.why-item { display: flex; gap: 12px; padding: 12px 16px; align-items: flex-start; }
.why-item .wi { width: 36px; height: 36px; border-radius: 50%; background: var(--sheet); display: flex; align-items: center; justify-content: center; flex: none; }
.why-item .wi i { width: 20px; height: 20px; }
.why-item b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.why-item span { font-size: 13px; line-height: 18px; color: var(--ink2); }
.why-tune { margin: 8px 16px 14px; padding: 14px; border-radius: 12px; background: var(--soft); display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); text-align: left; }
.why-tune .wi { width: 40px; height: 40px; border-radius: 50%; background: rgba(254, 44, 85, .1); color: var(--red); display: flex; align-items: center; justify-content: center; flex: none; }
.why-tune .wi i { width: 22px; height: 22px; }
.why-tune b { display: block; font-size: 15px; }
.why-tune span { font-size: 13px; color: var(--ink2); }
.why-tune .chev { width: 16px; height: 16px; color: var(--ink3); margin-left: auto; }
.cast-search { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--ink2); font-size: 14px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(22, 24, 35, .12); border-top-color: var(--ink); animation: spin .8s linear infinite; flex: none; }

/* ---------- Tune My Feed ---------- */
.tune-sheet { height: calc(100% - var(--sat) - 8px); }
.tune-head { flex: none; position: relative; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; }
.tune-head .s-l { position: absolute; left: 4px; top: 0; width: 48px; height: 52px; display: flex; align-items: center; justify-content: center; }
.tune-head .s-l i { width: 24px; height: 24px; }
.tune-head .reset { position: absolute; right: 16px; top: 0; height: 52px; font-size: 15px; font-weight: 600; color: var(--ink); transition: opacity .2s; }
.tune-head .reset:disabled { opacity: .3; cursor: default; }
.tune-sub { margin: 0; padding: 0 28px 16px; font-size: 14px; line-height: 19px; color: rgba(22, 24, 35, .6); text-align: center; }
.basis-card { margin: 0 16px 6px; padding: 12px; border-radius: 12px; background: var(--soft); display: grid; grid-template-columns: 46px 1fr; gap: 0 12px; align-items: center; }
.basis-card img { width: 46px; height: 62px; border-radius: 6px; object-fit: cover; grid-row: 1 / span 3; }
.basis-label { font-size: 12px; font-weight: 500; color: var(--ink2); }
.basis-topic { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; margin: 1px 0; }
.basis-topic i { width: 18px; height: 18px; color: var(--red); }
.basis-meta { font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.basis-actions { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 12px; }
.basis-actions button { flex: 1; height: 36px; border-radius: 6px; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; }
.basis-actions i { width: 16px; height: 16px; }
.btn-less { background: #fff; box-shadow: inset 0 0 0 1px rgba(22, 24, 35, .12); color: var(--ink); }
.btn-more { background: rgba(254, 44, 85, .1); color: var(--red); }
.topics-title { padding: 16px 20px 2px; font-size: 13px; font-weight: 600; color: var(--ink2); display: flex; justify-content: space-between; }
.topic-row { padding: 12px 20px 8px; transition: background .4s; }
.topic-row.current { background: rgba(254, 44, 85, .035); }
.topic-row.flash { animation: rowFlash 1.1s ease; }
@keyframes rowFlash { 0%, 35% { background: rgba(254, 44, 85, .12); } 100% { background: rgba(254, 44, 85, .035); } }
.topic-top { display: flex; align-items: center; gap: 10px; }
.topic-ic { width: 32px; height: 32px; border-radius: 50%; background: var(--sheet); display: flex; align-items: center; justify-content: center; flex: none; color: var(--ink); }
.topic-ic i { width: 18px; height: 18px; }
.topic-name { flex: 1; display: flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 600; }
.this-tag { padding: 2px 6px; border-radius: 4px; background: rgba(254, 44, 85, .1); color: var(--red); font-size: 11px; font-weight: 600; line-height: 14px; }
.topic-val { font-size: 14px; font-weight: 600; color: rgba(22, 24, 35, .42); transition: color .2s; }
.topic-val.up { color: var(--red); }
.topic-val.down { color: var(--ink); }
.slider { position: relative; height: 34px; margin: 2px 0 0 42px; touch-action: none; cursor: pointer; outline: none; }
.sl-track { position: absolute; left: 12px; right: 12px; top: 15px; height: 4px; border-radius: 2px; background: #E6E6E8; }
.sl-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--red); transition: width .14s ease; }
.sl-tick { position: absolute; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #D2D2D6; transition: background .14s; }
.sl-tick.filled { background: rgba(255, 255, 255, .8); }
.sl-thumb { position: absolute; top: 17px; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .28), 0 0 0 .5px rgba(0, 0, 0, .06); transition: left .14s ease, transform .15s; }
.slider.active .sl-thumb { transform: scale(1.15); }
.slider:focus-visible .sl-thumb { box-shadow: 0 0 0 3px rgba(254, 44, 85, .35), 0 1px 4px rgba(0, 0, 0, .28); }
.sl-ends { display: flex; justify-content: space-between; margin: -3px 0 0 42px; padding: 0 2px; font-size: 11px; color: rgba(22, 24, 35, .38); }
.tune-foot { flex: none; padding: 10px 16px 8px; background: #fff; box-shadow: inset 0 .5px 0 var(--line); }
.tune-note { margin: 8px 0 0; font-size: 12px; line-height: 16px; color: rgba(22, 24, 35, .45); text-align: center; }

/* ---------- Toasts ---------- */
.toasts { position: absolute; inset: 0; z-index: 80; pointer-events: none; }
.toast {
  position: absolute; left: 50%; top: 45%; max-width: 78%; padding: 12px 16px; border-radius: 8px;
  background: rgba(30, 30, 30, .9); color: #fff; font-size: 15px; font-weight: 500; line-height: 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0;
  transform: translate(-50%, -50%) scale(.94); transition: opacity .2s, transform .2s; white-space: pre-line;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%); }
.toast > i { width: 30px; height: 30px; }
.toast .ring { width: 38px; height: 38px; }
.toast .ring circle { fill: none; stroke-width: 3; }

/* ---------- Profile ---------- */
.p-head { position: sticky; top: 0; z-index: 3; height: 44px; display: flex; align-items: center; justify-content: center; background: #fff; font-size: 17px; font-weight: 700; gap: 4px; }
.p-head .hl, .p-head .hr { position: absolute; top: 0; height: 44px; display: flex; align-items: center; gap: 2px; }
.p-head .hl { left: 6px; }
.p-head .hr { right: 6px; }
.p-head .hl button, .p-head .hr button { width: 40px; height: 44px; display: flex; align-items: center; justify-content: center; }
.p-head i { width: 24px; height: 24px; }
.p-head .chev { width: 14px; height: 14px; }
.p-top { display: flex; flex-direction: column; align-items: center; padding: 6px 16px 0; }
.p-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #E3E3E5; }
.p-avatar.default { display: flex; align-items: center; justify-content: center; color: #fff; background: #C9CACF; }
.p-avatar.default i { width: 60px; height: 60px; }
.p-handle { margin-top: 10px; font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.p-stats { display: flex; align-items: center; margin-top: 16px; }
.p-stat { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 20px; }
.p-stat b { font-size: 17px; font-weight: 700; }
.p-stat span { font-size: 13px; color: var(--ink2); margin-top: 2px; }
.p-stat + .p-stat::before { content: ''; position: absolute; left: 0; top: 6px; width: .5px; height: 12px; background: var(--line); }
.p-btns { display: flex; gap: 4px; margin-top: 16px; }
.p-btns .btn-gray, .p-btns .btn-red { height: 40px; border-radius: 4px; font-size: 15px; padding: 0 16px; }
.p-btns .sq { width: 40px; padding: 0; }
.p-btns .sq i { width: 20px; height: 20px; }
.p-bio { margin: 12px 0 0; font-size: 14px; line-height: 19px; text-align: center; padding: 0 30px; }
.p-tabs { position: sticky; top: 44px; z-index: 2; display: flex; background: #fff; margin-top: 14px; box-shadow: inset 0 -.5px 0 var(--line); }
.p-tab { position: relative; flex: 1; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--ink3); }
.p-tab i { width: 22px; height: 22px; }
.p-tab.on { color: var(--ink); }
.p-tab.on::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 46px; height: 2px; margin-left: -23px; background: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
.cell { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #EEE; }
.cell img { width: 100%; height: 100%; object-fit: cover; }
.cell .views { position: absolute; left: 6px; bottom: 5px; display: flex; align-items: center; gap: 3px; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.cell .views i { width: 13px; height: 13px; }
.cell .pin { position: absolute; left: 6px; top: 6px; padding: 2px 5px; border-radius: 3px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; }
.empty-state { padding: 56px 32px; text-align: center; color: var(--ink2); font-size: 14px; line-height: 20px; }
.empty-state i { width: 52px; height: 52px; color: var(--ink3); margin: 0 auto; display: flex; }
.empty-state b { display: block; margin: 12px 0 6px; color: var(--ink); font-size: 17px; }

/* ---------- Friends ---------- */
.f-search { display: flex; align-items: center; gap: 8px; height: 38px; margin: 6px 16px 4px; padding: 0 12px; border-radius: 6px; background: var(--sheet); color: rgba(22, 24, 35, .4); font-size: 15px; width: calc(100% - 32px); }
.f-search i { width: 18px; height: 18px; }
.p-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 16px; text-align: left; }
.p-row img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.p-row .grow { flex: 1; min-width: 0; }
.p-row .nm { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.p-row .sb { font-size: 13px; color: var(--ink2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-follow { flex: none; height: 32px; min-width: 88px; padding: 0 14px; border-radius: 4px; background: var(--red); color: #fff; font-size: 14px; font-weight: 600; text-align: center; }
.btn-follow.following { background: var(--sheet); color: var(--ink); }
.f-x { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--ink3); }
.f-x i { width: 16px; height: 16px; }
.f-posts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 12px 16px; }
.f-post { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: #eee; }
.f-post img { width: 100%; height: 100%; object-fit: cover; }
.f-post .who { position: absolute; left: 8px; bottom: 8px; right: 8px; display: flex; align-items: center; gap: 6px; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.f-post .who img { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #fff; }

/* ---------- Inbox ---------- */
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 6px 16px 12px; scrollbar-width: none; touch-action: pan-x; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--ink2); }
.story .ring { position: relative; width: 62px; height: 62px; border-radius: 50%; padding: 2.5px; background: linear-gradient(135deg, var(--cyan), var(--red)); }
.story .ring.seen { background: #E3E3E5; }
.story .ring img, .story .ring .me { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2.5px solid #fff; background: #C9CACF; }
.story .ring .me { display: flex; align-items: center; justify-content: center; color: #fff; }
.story .ring .me i { width: 34px; height: 34px; }
.story .ring .add { position: absolute; right: -1px; bottom: -1px; width: 20px; height: 20px; border-radius: 50%; background: #20D5EC; color: #fff; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; }
.story .ring .add i { width: 11px; height: 11px; }
.story span { width: 66px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.i-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 16px; text-align: left; }
.i-ic { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.i-ic i { width: 26px; height: 26px; }
.i-row img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.i-main { flex: 1; min-width: 0; }
.i-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.i-sub { margin-top: 2px; font-size: 14px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i-row.unread .i-sub { color: var(--ink); font-weight: 600; }
.i-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--ink3); }
.i-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.i-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.i-row .chev { width: 16px; height: 16px; color: var(--ink3); }

/* ---------- Chat ---------- */
.chat-who { display: flex; align-items: center; gap: 8px; }
.chat-who img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.chat-who small { display: block; font-size: 11px; font-weight: 500; color: #18B26B; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 8px; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.chat-time { align-self: center; font-size: 12px; color: var(--ink3); margin: 6px 0; }
.msg-row { display: flex; align-items: flex-end; gap: 8px; max-width: 80%; }
.msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
.msg-row img.av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.msg { padding: 9px 12px; border-radius: 8px; font-size: 15px; line-height: 20px; background: var(--sheet); color: var(--ink); overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.msg-row.me .msg { background: #2F80ED; color: #fff; }
.msg.video { padding: 0; width: 132px; overflow: hidden; background: #000; position: relative; }
.msg.video img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.msg.video .mv-cap { position: absolute; left: 6px; right: 6px; bottom: 6px; color: #fff; font-size: 12px; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); display: flex; align-items: center; gap: 4px; }
.msg.video .mv-cap img { width: 16px; height: 16px; border-radius: 50%; aspect-ratio: auto; }
.typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink3); animation: typing 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-input { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px calc(8px + var(--sab)); margin-bottom: var(--kb); box-shadow: inset 0 .5px 0 var(--line); background: #fff; }
.chat-input .pill { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 14px; border-radius: 20px; background: var(--sheet); color: var(--ink2); }
.chat-input .pill input { flex: 1; min-width: 0; font-size: 15px; color: var(--ink); }
.chat-input .pill > i { width: 22px; height: 22px; }

/* ---------- Search ---------- */
.s-bar { flex: none; display: flex; align-items: center; gap: 6px; height: calc(var(--sat) + 52px); padding: var(--sat) 14px 0 4px; }
.s-bar .back { width: 38px; height: 40px; display: flex; align-items: center; justify-content: center; }
.s-bar .back i { width: 24px; height: 24px; }
.s-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: 6px; background: var(--sheet); color: rgba(22, 24, 35, .4); }
.s-box i { width: 18px; height: 18px; }
.s-box input { flex: 1; min-width: 0; font-size: 16px; color: var(--ink); }
.s-box input::placeholder { color: rgba(22, 24, 35, .4); }
.s-box .clr { width: 18px; height: 18px; border-radius: 50%; background: rgba(22, 24, 35, .3); color: #fff; display: none; align-items: center; justify-content: center; }
.s-box .clr i { width: 10px; height: 10px; }
.s-box.has-text .clr { display: flex; }
.s-go { font-size: 16px; font-weight: 600; color: var(--red); padding-left: 6px; }
.sug { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 16px; font-size: 15px; text-align: left; }
.sug > i { width: 18px; height: 18px; color: var(--ink3); }
.sug .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug .hot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex: none; margin: 0 6px; }
.sug .hotlbl { font-size: 11px; font-weight: 700; color: var(--red); }
.sug-grid { display: grid; grid-template-columns: 1fr 1fr; padding: 0 4px; }
.sug-grid .sug { padding: 10px 12px; font-size: 14px; }
.r-tabs { flex: none; display: flex; gap: 22px; padding: 0 16px; overflow-x: auto; box-shadow: inset 0 -.5px 0 var(--line); scrollbar-width: none; touch-action: pan-x; }
.r-tabs::-webkit-scrollbar { display: none; }
.r-tab { position: relative; height: 42px; font-size: 15px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.r-tab.on { color: var(--ink); }
.r-tab.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink); }
.r-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 6px; padding: 8px 6px 20px; }
.r-card { min-width: 0; text-align: left; }
.r-thumb { position: relative; aspect-ratio: 3 / 4; border-radius: 4px; overflow: hidden; background: #eee; }
.r-thumb img { width: 100%; height: 100%; object-fit: cover; }
.r-thumb .r-date { position: absolute; left: 6px; bottom: 6px; color: #fff; font-size: 12px; font-weight: 500; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.r-cap { margin: 6px 4px 5px; font-size: 14px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r-meta { display: flex; align-items: center; gap: 5px; margin: 0 4px; font-size: 12px; color: var(--ink2); }
.r-meta img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.r-meta .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-meta .lk { display: flex; align-items: center; gap: 2px; }
.r-meta .lk i { width: 13px; height: 13px; }

/* ---------- Single video viewer ---------- */
.viewer .slide { bottom: calc(48px + var(--sab)); height: auto; }
.viewer-back { position: absolute; top: calc(var(--sat) + 4px); left: 6px; z-index: 6; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #fff; }
.viewer-back i { width: 26px; height: 26px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }
.viewer-bar { position: absolute; left: 0; right: 0; bottom: 0; height: calc(48px + var(--sab)); padding: 0 16px var(--sab); display: flex; align-items: center; gap: 10px; background: #000; color: rgba(255, 255, 255, .55); font-size: 15px; width: 100%; text-align: left; }
.viewer-bar i { width: 22px; height: 22px; }
.viewer-bar .grow { flex: 1; }

/* ---------- LIVE ---------- */
.live-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.live-screen::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .25), transparent 20%, transparent 55%, rgba(0, 0, 0, .45)); pointer-events: none; }
.live-top { position: absolute; z-index: 3; top: calc(var(--sat) + 6px); left: 10px; right: 6px; display: flex; align-items: center; gap: 8px; }
.host-pill { display: flex; align-items: center; gap: 7px; padding: 3px 3px 3px 3px; border-radius: 22px; background: rgba(0, 0, 0, .3); }
.host-pill img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.host-pill .hn { font-size: 13px; font-weight: 600; line-height: 16px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-pill .hl { font-size: 11px; color: rgba(255, 255, 255, .75); display: flex; align-items: center; gap: 3px; }
.host-pill .hl i { width: 10px; height: 10px; }
.host-follow { height: 28px; padding: 0 12px; border-radius: 14px; background: var(--red); font-size: 13px; font-weight: 700; margin-left: 4px; }
.host-follow.done { background: rgba(255, 255, 255, .2); }
.live-viewers { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.live-viewers .avs { display: flex; }
.live-viewers .avs img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(0, 0, 0, .25); margin-left: -8px; }
.live-viewers .cnt { padding: 5px 9px; border-radius: 14px; background: rgba(0, 0, 0, .3); font-size: 12px; font-weight: 600; }
.live-viewers .x { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.live-viewers .x i { width: 22px; height: 22px; }
.live-tags { position: absolute; z-index: 3; top: calc(var(--sat) + 52px); left: 10px; display: flex; gap: 6px; }
.live-tags span { padding: 3px 8px; border-radius: 4px; background: rgba(0, 0, 0, .3); font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.live-tags .lv { background: var(--red); }
.live-chat { position: absolute; z-index: 3; left: 10px; bottom: calc(62px + var(--sab)); width: 74%; height: 34%; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; -webkit-mask-image: linear-gradient(transparent, #000 30%); mask-image: linear-gradient(transparent, #000 30%); pointer-events: none; }
.lc-msg { display: flex; align-items: flex-start; gap: 7px; font-size: 14px; line-height: 18px; text-shadow: 0 1px 1px rgba(0, 0, 0, .4); animation: lcIn .3s ease; }
.lc-msg img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; }
.lc-msg .n { color: rgba(255, 255, 255, .7); font-weight: 600; margin-right: 5px; }
.lc-msg.sys { color: rgba(255, 255, 255, .75); font-size: 13px; }
@keyframes lcIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.live-bottom { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 8px 10px calc(8px + var(--sab)); margin-bottom: var(--kb); display: flex; align-items: center; gap: 8px; }
.live-input { flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; padding: 0 14px; border-radius: 20px; background: rgba(255, 255, 255, .18); }
.live-input input { flex: 1; min-width: 0; font-size: 15px; color: #fff; }
.live-input input::placeholder { color: rgba(255, 255, 255, .7); }
.live-ic { flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; color: #fff; }
.live-ic i { width: 22px; height: 22px; }
.live-tap { position: absolute; inset: 0; z-index: 2; }
.float-heart { position: absolute; z-index: 4; right: 26px; bottom: calc(66px + var(--sab)); width: 30px; height: 30px; pointer-events: none; animation: floatUp 2.4s ease-out forwards; }
@keyframes floatUp { 0% { transform: translate(0, 0) scale(.4); opacity: 0; } 12% { opacity: 1; transform: translate(0, -20px) scale(1); } 100% { transform: translate(var(--dx), -320px) scale(.9); opacity: 0; } }

/* ---------- Create (camera) ---------- */
.cam-view { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 40%, #2b2b30, #0c0c0e); }
.cam-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-view video.mirror { transform: scaleX(-1); }
.cam-off { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 50px; text-align: center; color: rgba(255, 255, 255, .7); font-size: 14px; line-height: 20px; }
.cam-off b { color: #fff; font-size: 17px; }
.cam-off .btn-white { margin-top: 8px; height: 40px; padding: 0 20px; border-radius: 6px; background: #fff; color: var(--ink); font-weight: 600; font-size: 15px; }
.cam-top { position: absolute; z-index: 3; top: calc(var(--sat) + 6px); left: 0; right: 0; height: 40px; display: flex; align-items: center; justify-content: center; }
.cam-top .x { position: absolute; left: 10px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.cam-top .x i { width: 26px; height: 26px; }
.add-sound { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 8px; background: rgba(0, 0, 0, .4); font-size: 14px; font-weight: 600; }
.add-sound i { width: 16px; height: 16px; }
.cam-tools { position: absolute; z-index: 3; right: 8px; top: calc(var(--sat) + 64px); display: flex; flex-direction: column; gap: 16px; }
.cam-tool { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 52px; font-size: 11px; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.cam-tool i { width: 27px; height: 27px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }
.cam-tool.on { color: #FACE15; }
.cam-bottom { position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(var(--sab) + 6px); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.dur-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 16px; background: rgba(0, 0, 0, .3); }
.dur-tabs button { height: 26px; padding: 0 12px; border-radius: 13px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.dur-tabs button.on { background: rgba(255, 255, 255, .92); color: var(--ink); }
.rec-row { display: flex; align-items: center; justify-content: space-around; width: 100%; padding: 0 20px; }
.rec-side { width: 60px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.rec-side .thumb { width: 36px; height: 36px; border-radius: 8px; border: 2px solid #fff; overflow: hidden; }
.rec-side .thumb img { width: 100%; height: 100%; object-fit: cover; }
.rec-side .fx { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #FFB800, #FE2C55 60%, #8B5CF6); display: flex; align-items: center; justify-content: center; }
.rec-side .fx i { width: 22px; height: 22px; }
.rec-btn { position: relative; width: 82px; height: 82px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .5); }
.rec-btn::after { content: ''; width: 64px; height: 64px; border-radius: 50%; background: var(--red); transition: all .25s var(--spring); }
.rec-btn.rec::after { width: 30px; height: 30px; border-radius: 7px; }
.rec-btn svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.rec-btn svg circle { fill: none; stroke: var(--red); stroke-width: 6; stroke-linecap: round; }
.mode-tabs { display: flex; gap: 24px; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, .55); }
.mode-tabs button { position: relative; padding-bottom: 8px; }
.mode-tabs button.on { color: #fff; }
.mode-tabs button.on::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #fff; }
.rec-timer { position: absolute; z-index: 3; top: calc(var(--sat) + 52px); left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 4px; background: var(--red); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Demo panel ---------- */
.demo-panel {
  position: absolute; top: 50%; width: 310px; transform: translateY(-50%); z-index: 3000;
  padding: 16px; border-radius: 14px; background: #1c1c21; color: #ECECEF; border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55); font: 13px/1.4 -apple-system, var(--font); -webkit-user-select: none;
}
html.is-phone .demo-panel { position: fixed; left: 10px; right: 10px; top: calc(env(safe-area-inset-top) + 10px); width: auto; transform: none; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-head b { font-size: 14px; letter-spacing: .2px; }
.dp-head small { color: #8C8C96; font-weight: 500; margin-left: 6px; }
.dp-head button { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; }
.dp-head button i { width: 14px; height: 14px; }
.dp-sec { font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: #8C8C96; margin: 12px 0 8px; }
.dp-legend { display: flex; gap: 12px; font-size: 11px; color: #A8A8B3; margin-bottom: 8px; }
.dp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dp-legend span::before { content: ''; width: 10px; height: 4px; border-radius: 2px; background: #5A5A66; }
.dp-legend span.now::before { background: var(--red); }
.dp-row { display: grid; grid-template-columns: 62px 1fr 52px; gap: 8px; align-items: center; margin-bottom: 7px; }
.dp-row .lbl { font-weight: 600; }
.dp-bars { display: flex; flex-direction: column; gap: 3px; }
.dp-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.dp-bar span { display: block; height: 100%; border-radius: 3px; background: #5A5A66; transition: width .5s var(--spring); }
.dp-bar.now span { background: var(--red); }
.dp-row .num { text-align: right; font-variant-numeric: tabular-nums; color: #C9C9D1; font-size: 12px; }
.dp-row .num b { color: #fff; }
.dp-queue { display: flex; gap: 3px; margin-top: 2px; }
.dp-queue span { flex: 1; height: 22px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, .9); }
.dp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dp-chips span { padding: 3px 8px; border-radius: 10px; background: rgba(255, 255, 255, .07); font-size: 12px; }
.dp-chips span.up { background: rgba(254, 44, 85, .2); color: #FF8DA3; }
.dp-chips span.down { background: rgba(37, 244, 238, .12); color: #8FF7F3; }
.dp-actions { display: flex; gap: 8px; margin-top: 14px; }
.dp-actions button { flex: 1; height: 34px; border-radius: 8px; background: rgba(255, 255, 255, .08); font-weight: 600; font-size: 13px; }
.dp-actions button.danger { background: var(--red); color: #fff; }
.dp-foot { margin-top: 10px; font-size: 11px; color: #75757F; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ---------- misc additions ---------- */
div.a-row[data-action], div.l-row[data-action] { cursor: pointer; }
.slide.enter { animation: slideEnter .34s ease; }
@keyframes slideEnter { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.report-sheet { height: 72%; }
.why-sheet .s-scroll { padding-bottom: 6px; }
.p-row .chev { width: 16px; height: 16px; color: var(--ink3); }
.p-row .i-ic { width: 52px; height: 52px; }
.l-row .new-pill { display: inline-block; vertical-align: 1px; margin-left: 6px; }
.p-head .chev { margin-left: 2px; }
.creator-screen .p-top { padding-top: 4px; }
.creator-screen .p-tabs { top: 0; }
.chat-input .c-send { width: 36px; height: 36px; }
.chat-input .c-send i { width: 18px; height: 18px; }
.viewer .slide::after { height: 30%; }
.screen.search-screen .scr-body { padding-bottom: 20px; }
.toast > i { color: #fff; }

/* Tune My Feed: per-topic mute */
.mute-btn { flex: none; width: 32px; height: 32px; margin-left: 8px; border-radius: 50%; background: var(--sheet); color: var(--ink2); display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s; }
.mute-btn i { width: 17px; height: 17px; }
.mute-btn .off, .mute-btn.on .on { display: none; }
.mute-btn.on .off { display: inline-flex; }
.mute-btn.on { background: var(--ink); color: #fff; }
.topic-val.mute { color: var(--ink2); }
.topic-row.muted .topic-name, .topic-row.muted .topic-ic { opacity: .45; }
.topic-row.muted .slider, .topic-row.muted .sl-ends { opacity: .35; }
