:root {
  --bg: #080a0b;
  --panel: #0e1112;
  --panel-soft: #141819;
  --text: #f5f6f1;
  --muted: #979e9b;
  --faint: #646b68;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #d7ff63;
  --accent-dark: #141d08;
  --danger: #ff5d74;
  --rail: 220px;
  --context: 340px;
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { height: 100%; background: var(--bg); }
body {
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.ambient {
  position: fixed;
  inset: -60px;
  background-position: center;
  background-size: cover;
  filter: blur(70px) saturate(0.8);
  opacity: 0.14;
  transform: scale(1.15);
  transition: background-image 500ms ease;
  pointer-events: none;
}
.ambient::after { content: ""; position: absolute; inset: 0; background: rgba(8,10,11,0.58); }
.app-shell { position: relative; height: 100dvh; }

/* Left navigation */
.side-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--rail);
  flex-direction: column;
  padding: 30px 20px 22px;
  border-right: 1px solid var(--line);
  background: rgba(8,10,11,0.8);
  backdrop-filter: blur(24px);
}
.brand-button, .mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  background: none;
  color: var(--text);
}
.brand-symbol {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  color: var(--bg);
  transform: rotate(-5deg);
}
.brand-symbol svg { width: 19px; height: 19px; }
.brand-word, .mobile-brand > span:last-child, .discover-brand > span:last-child {
  font-size: 1.35rem;
  font-weight: 850;
  letter-spacing: -0.055em;
}
.brand-dot { color: var(--accent); }
.rail-nav { display: grid; gap: 9px; margin-top: 68px; }
.rail-link {
  position: relative;
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 15px;
  padding: 0 16px;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-align: left;
  transition: color 180ms, background 180ms, transform 180ms;
}
.rail-link:hover { background: rgba(255,255,255,0.05); color: var(--text); transform: translateX(2px); }
.rail-link.is-active { background: var(--accent); color: var(--bg); }
.rail-link svg { width: 21px; height: 21px; }
.rail-count { margin-left: auto; padding: 1px 7px; border-radius: 20px; background: rgba(255,255,255,0.12); font-size: 0.65rem; }
.rail-link.is-active .rail-count { background: rgba(0,0,0,0.13); }
.rail-bottom { display: grid; gap: 14px; margin-top: auto; }
.language-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}
.language-button:hover { color: var(--accent); border-color: rgba(215,255,99,0.35); }
.language-button svg { width: 19px; height: 19px; }
.rail-profile { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 13px 8px 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; font-size: 0.75rem; font-weight: 800; }
.avatar--nova { background: linear-gradient(145deg, #d7ff63, #769d23); color: #11170a; }
.rail-profile strong, .rail-profile small { display: block; }
.rail-profile strong { font-size: 0.73rem; letter-spacing: 0.1em; }
.rail-profile small { margin-top: 2px; color: var(--faint); font-size: 0.62rem; }
.rail-profile > svg { width: 18px; color: var(--faint); }

/* Main feed */
.main-stage { position: relative; height: 100dvh; margin-left: var(--rail); margin-right: var(--context); }
.topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 15;
  display: flex;
  height: 80px;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  background: linear-gradient(to bottom, rgba(4,5,6,0.82), transparent);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.mobile-brand { display: none; }
.feed-tabs { display: flex; align-items: center; gap: 5px; padding: 5px; border: 1px solid rgba(255,255,255,0.1); border-radius: 40px; background: rgba(12,15,16,0.65); backdrop-filter: blur(18px); }
.feed-tab { padding: 8px 15px; border-radius: 30px; background: transparent; color: rgba(255,255,255,0.58); font-size: 0.73rem; font-weight: 650; transition: 180ms; }
.feed-tab:hover { color: #fff; }
.feed-tab.is-active { background: #fff; color: #0a0c0d; }
.topbar-actions { position: absolute; right: 24px; display: flex; align-items: center; gap: 8px; }
.icon-button, .mobile-language, .close-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(10,12,13,0.5);
  backdrop-filter: blur(12px);
}
.icon-button:hover, .close-button:hover { background: rgba(255,255,255,0.12); }
.mobile-language { display: none; font-size: 0.68rem; font-weight: 800; }
.feed { height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.video-card { position: relative; display: grid; height: 100dvh; place-items: center; padding: 74px 20px 22px; scroll-snap-align: start; scroll-snap-stop: always; }
.video-frame {
  position: relative;
  height: min(86dvh, 820px);
  max-width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  background: #111;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  isolation: isolate;
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.video-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, rgba(0,0,0,0.36) 0%, transparent 23%, transparent 48%, rgba(0,0,0,0.14) 60%, rgba(0,0,0,0.9) 100%); pointer-events: none; }
.video-top { position: absolute; inset: 18px 18px auto; z-index: 3; display: flex; align-items: center; justify-content: space-between; }
.video-number { color: rgba(255,255,255,0.72); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.15em; }
.sound-controls { display: flex; align-items: center; gap: 8px; }
.sound-button { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid rgba(255,255,255,0.18); border-radius: 50%; background: rgba(0,0,0,0.3); backdrop-filter: blur(10px); }
.sound-button svg { width: 17px; height: 17px; }
.volume-slider { width: 0; opacity: 0; accent-color: var(--accent); transition: width 200ms, opacity 200ms; }
.sound-controls:hover .volume-slider, .volume-slider:focus-visible { width: 65px; opacity: 1; }
.play-state { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: transparent; pointer-events: none; }
.play-state span { display: grid; width: 72px; height: 72px; place-items: center; border: 1px solid rgba(255,255,255,0.24); border-radius: 50%; background: rgba(0,0,0,0.3); opacity: 0; transform: scale(0.85); backdrop-filter: blur(10px); transition: opacity 180ms, transform 180ms; }
.play-state svg { width: 29px; height: 29px; }
.video-card.is-paused .play-state span { opacity: 1; transform: scale(1); }
.video-info { position: absolute; z-index: 3; right: 75px; bottom: 36px; left: 22px; pointer-events: none; }
.video-info > * { pointer-events: auto; }
.author-row { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.author-avatar { display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid rgba(255,255,255,0.4); border-radius: 50%; background: var(--avatar, #66805a); color: #fff; font-size: 0.69rem; font-weight: 800; }
.author-name { font-size: 0.77rem; font-weight: 750; }
.follow-button { padding: 4px 10px; border: 1px solid rgba(255,255,255,0.38); border-radius: 20px; background: rgba(0,0,0,0.15); color: #fff; font-size: 0.59rem; font-weight: 700; }
.follow-button.is-following { border-color: rgba(215,255,99,0.55); color: var(--accent); }
.video-title { max-width: 320px; margin: 0 0 8px; font-size: clamp(1.25rem, 2.3vw, 1.65rem); font-weight: 720; line-height: 1.22; letter-spacing: -0.035em; }
.video-description { display: -webkit-box; max-width: 330px; margin: 0 0 12px; overflow: hidden; color: rgba(255,255,255,0.7); font-size: 0.72rem; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.video-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.video-tags span { color: var(--accent); font-size: 0.62rem; font-weight: 650; }
.action-rail { position: absolute; z-index: 4; right: 15px; bottom: 36px; display: grid; gap: 14px; }
.action-item { display: grid; justify-items: center; gap: 4px; padding: 0; background: none; }
.action-icon { display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid rgba(255,255,255,0.17); border-radius: 50%; background: rgba(8,10,11,0.36); backdrop-filter: blur(12px); transition: transform 160ms, background 160ms, color 160ms; }
.action-item:hover .action-icon { transform: translateY(-2px); background: rgba(255,255,255,0.16); }
.action-icon svg { width: 20px; height: 20px; }
.action-count { color: rgba(255,255,255,0.82); font-size: 0.58rem; font-weight: 700; }
.action-item.is-liked .action-icon { border-color: rgba(255,93,116,0.5); background: var(--danger); color: #fff; }
.action-item.is-liked .action-icon svg, .action-item.is-saved .action-icon svg { fill: currentColor; }
.action-item.is-saved .action-icon { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.progress-wrap { position: absolute; z-index: 5; right: 18px; bottom: 13px; left: 18px; display: flex; align-items: center; gap: 10px; }
.time-label { min-width: 68px; color: rgba(255,255,255,0.56); font-size: 0.52rem; font-variant-numeric: tabular-nums; }
.video-progress { width: 100%; height: 14px; margin: 0; appearance: none; background: transparent; cursor: pointer; }
.video-progress::-webkit-slider-runnable-track { height: 2px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--progress,0%), rgba(255,255,255,0.25) var(--progress,0%)); }
.video-progress::-moz-range-track { height: 2px; border-radius: 4px; background: rgba(255,255,255,0.25); }
.video-progress::-moz-range-progress { height: 2px; background: var(--accent); }
.video-progress::-webkit-slider-thumb { width: 9px; height: 9px; margin-top: -3.5px; appearance: none; border-radius: 50%; background: var(--accent); opacity: 0; transition: opacity 150ms; }
.video-progress:hover::-webkit-slider-thumb, .video-progress:focus-visible::-webkit-slider-thumb { opacity: 1; }
.video-progress::-moz-range-thumb { width: 9px; height: 9px; border: 0; border-radius: 50%; background: var(--accent); }
.empty-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; padding: 30px; text-align: center; }
.empty-state__icon { display: grid; width: 70px; height: 70px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); }
.empty-state h2 { margin: 24px 0 8px; font-size: 1.6rem; }
.empty-state p { margin: 0 0 24px; color: var(--muted); font-size: 0.85rem; }
.primary-button { min-height: 45px; padding: 0 22px; border-radius: 30px; background: var(--accent); color: var(--bg); font-size: 0.76rem; font-weight: 800; }
.primary-button:hover { filter: brightness(1.07); }

/* Right context */
.context-panel { position: fixed; inset: 0 0 0 auto; z-index: 18; width: var(--context); overflow-y: auto; padding: 35px 28px 24px; border-left: 1px solid var(--line); background: rgba(10,12,13,0.82); backdrop-filter: blur(28px); scrollbar-width: thin; }
.context-heading { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.61rem; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.context-author { display: flex; align-items: center; gap: 12px; margin-top: 30px; }
.context-author .author-avatar { width: 43px; height: 43px; border: 0; }
.context-author__text { min-width: 0; flex: 1; }
.context-author__text strong, .context-author__text span { display: block; }
.context-author__text strong { overflow: hidden; font-size: 0.82rem; text-overflow: ellipsis; white-space: nowrap; }
.context-author__text span { margin-top: 3px; color: var(--faint); font-size: 0.65rem; }
.context-follow { padding: 7px 12px; border-radius: 20px; background: var(--accent); color: var(--bg); font-size: 0.62rem; font-weight: 800; }
.context-follow.is-following { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.context-title { margin: 26px 0 11px; font-size: 1.55rem; line-height: 1.2; letter-spacing: -0.045em; }
.context-description { margin: 0; color: var(--muted); font-size: 0.75rem; line-height: 1.75; }
.context-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 17px; }
.context-tags span { padding: 5px 9px; border-radius: 6px; background: rgba(215,255,99,0.08); color: var(--accent); font-size: 0.58rem; }
.context-stats { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 25px; padding: 18px 0; border-block: 1px solid var(--line); }
.context-stats div { text-align: center; }
.context-stats div + div { border-left: 1px solid var(--line); }
.context-stats strong, .context-stats span { display: block; }
.context-stats strong { font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.context-stats span { margin-top: 3px; color: var(--faint); font-size: 0.55rem; }
.up-next { margin-top: 28px; }
.up-next__heading { display: flex; align-items: center; justify-content: space-between; }
.up-next__heading h2 { margin: 0; font-size: 0.78rem; }
.up-next__heading span { color: var(--faint); font-size: 0.62rem; }
.next-card { display: grid; width: 100%; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; margin-top: 13px; padding: 0; background: transparent; text-align: left; }
.next-card img { width: 52px; height: 72px; border-radius: 8px; object-fit: cover; filter: saturate(0.75); transition: filter 180ms; }
.next-card:hover img { filter: saturate(1); }
.next-card__copy { min-width: 0; }
.next-card__copy strong { display: -webkit-box; overflow: hidden; font-size: 0.7rem; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.next-card__copy span { display: block; margin-top: 5px; color: var(--faint); font-size: 0.57rem; }
.next-card > svg { width: 15px; color: var(--faint); }
.sources-link { display: flex; align-items: center; gap: 7px; margin-top: 27px; padding: 0; background: none; color: var(--faint); font-size: 0.58rem; }
.sources-link:hover { color: var(--accent); }
.sources-link svg { width: 14px; height: 14px; }
.bottom-nav { display: none; }

/* Dialogs */
dialog { color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,0.68); backdrop-filter: blur(7px); }
.close-button { flex: 0 0 auto; background: rgba(255,255,255,0.05); }
.close-button svg { width: 19px; height: 19px; }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(430px,100%); max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 28px; border: 0; border-left: 1px solid var(--line); background: #101314; }
.drawer[open] { display: flex; flex-direction: column; animation: drawerIn 220ms ease-out; }
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-kicker { display: block; margin-bottom: 9px; color: var(--accent); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.17em; text-transform: uppercase; }
.drawer-header h2 { margin: 0; font-size: 1.65rem; letter-spacing: -0.04em; }
.comments-list { flex: 1; overflow-y: auto; padding: 12px 0; }
.comment { display: grid; grid-template-columns: auto 1fr; gap: 11px; padding: 17px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.comment .avatar { width: 33px; height: 33px; background: var(--avatar,#445); color: white; font-size: 0.6rem; }
.comment__meta { display: flex; align-items: center; gap: 8px; }
.comment__meta strong { font-size: 0.7rem; }
.comment__meta span { color: var(--faint); font-size: 0.56rem; }
.comment p { margin: 6px 0 0; color: #c1c6c2; font-size: 0.73rem; line-height: 1.6; }
.comment-empty { display: grid; height: 100%; place-content: center; color: var(--faint); font-size: 0.75rem; text-align: center; }
.comment-form { display: flex; gap: 9px; padding-top: 16px; border-top: 1px solid var(--line); }
.comment-form input { min-width: 0; flex: 1; padding: 13px 16px; border: 1px solid var(--line); border-radius: 25px; outline: none; background: rgba(255,255,255,0.05); color: var(--text); font-size: 0.75rem; }
.comment-form input:focus { border-color: rgba(215,255,99,0.5); }
.comment-form button { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--accent); color: var(--bg); }
.comment-form button svg { width: 19px; }
.local-note { margin: 10px 0 0; color: var(--faint); font-size: 0.55rem; text-align: center; }
.modal { position: fixed; width: min(480px,calc(100% - 32px)); max-width: none; padding: 40px; border: 1px solid var(--line); border-radius: 25px; background: #121617; box-shadow: 0 30px 100px rgba(0,0,0,0.55); }
.modal[open] { animation: modalIn 200ms ease-out; }
@keyframes modalIn { from { transform: translateY(12px) scale(0.98); opacity: 0; } }
.modal-close { position: absolute; top: 18px; right: 18px; }
.modal-icon { display: grid; width: 55px; height: 55px; margin-bottom: 25px; place-items: center; border-radius: 17px; background: var(--accent); color: var(--bg); }
.modal h2 { max-width: 360px; margin: 0 0 13px; font-size: 1.8rem; line-height: 1.2; letter-spacing: -0.045em; }
.modal > p { margin: 0 0 24px; color: var(--muted); font-size: 0.77rem; line-height: 1.75; }
.share-field { display: flex; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 13px; background: rgba(0,0,0,0.22); }
.share-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--muted); font-size: 0.66rem; padding-left: 8px; }
.share-field button { display: flex; align-items: center; gap: 6px; padding: 10px 13px; border-radius: 9px; background: var(--accent); color: var(--bg); font-size: 0.65rem; font-weight: 750; }
.share-field button svg { width: 15px; height: 15px; }
.about-logo { display: block; margin-bottom: 35px; color: var(--accent); font-size: 2rem; font-weight: 900; letter-spacing: -0.06em; }
.source-note { margin: 24px 0; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,0.025); }
.source-note strong { font-size: 0.68rem; }
.source-note p { margin: 6px 0; color: var(--accent); font-size: 0.7rem; }
.source-note small { display: block; color: var(--faint); font-size: 0.58rem; line-height: 1.6; }

/* Discovery */
.discover-modal { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #0a0d0e; }
.discover-modal[open] { animation: discoverIn 220ms ease-out; }
@keyframes discoverIn { from { opacity: 0; transform: translateY(15px); } }
.discover-header { display: flex; height: 85px; align-items: center; justify-content: space-between; padding: 0 clamp(22px,5vw,70px); border-bottom: 1px solid var(--line); }
.discover-brand { display: flex; align-items: center; gap: 10px; }
.discover-content { width: min(1120px,calc(100% - 44px)); margin: 0 auto; padding: 55px 0 70px; }
.discover-content > h2 { margin: 0 0 30px; font-size: clamp(2.2rem,5vw,4.7rem); letter-spacing: -0.065em; }
.search-box { display: flex; max-width: 720px; align-items: center; gap: 13px; padding: 7px 9px 7px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,0.04); }
.search-box:focus-within { border-color: rgba(215,255,99,0.5); }
.search-box > svg { width: 20px; color: var(--muted); }
.search-box input { min-width: 0; flex: 1; height: 44px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 0.82rem; }
.search-key { padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--faint); font-size: 0.58rem; }
.discover-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.discover-filters button { padding: 9px 16px; border: 1px solid var(--line); border-radius: 30px; background: transparent; color: var(--muted); font-size: 0.67rem; }
.discover-filters button.is-active { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.results-count { margin: 32px 0 16px; color: var(--faint); font-size: 0.62rem; }
.video-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px 18px; }
.grid-card { padding: 0; background: transparent; text-align: left; }
.grid-card__visual { position: relative; aspect-ratio: 9/13; overflow: hidden; border-radius: 15px; background: #191d1e; }
.grid-card__visual::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent,rgba(0,0,0,0.72)); }
.grid-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 350ms, filter 350ms; filter: saturate(0.85); }
.grid-card:hover img { transform: scale(1.035); filter: saturate(1.05); }
.grid-play { position: absolute; z-index: 2; top: 13px; right: 13px; display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: rgba(0,0,0,0.38); backdrop-filter: blur(8px); }
.grid-play svg { width: 15px; height: 15px; }
.grid-duration { position: absolute; z-index: 2; right: 12px; bottom: 11px; font-size: 0.58rem; font-weight: 650; }
.grid-card h3 { margin: 13px 0 6px; font-size: 0.84rem; line-height: 1.4; }
.grid-card p { margin: 0; color: var(--faint); font-size: 0.64rem; }
.no-results { padding: 70px 20px; color: var(--muted); text-align: center; }
.no-results > span { color: var(--accent); font-size: 3rem; }
.no-results h3 { margin: 15px 0 8px; color: var(--text); }
.no-results p { font-size: 0.75rem; }
.toast { position: fixed; z-index: 100; bottom: 30px; left: 50%; max-width: calc(100% - 40px); padding: 12px 19px; border: 1px solid rgba(215,255,99,0.25); border-radius: 30px; background: rgba(20,25,20,0.94); color: var(--accent); box-shadow: 0 12px 40px rgba(0,0,0,0.4); opacity: 0; transform: translate(-50%,15px); transition: 200ms; pointer-events: none; font-size: 0.7rem; text-align: center; }
.toast.is-visible { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 1220px) {
  :root { --rail: 84px; --context: 310px; }
  .side-rail { align-items: center; padding-inline: 12px; }
  .brand-button { padding: 0; }
  .brand-word, .rail-link span, .language-button span, .rail-profile > span:not(.avatar), .rail-profile > svg { display: none; }
  .rail-nav { width: 100%; }
  .rail-link { justify-content: center; padding: 0; }
  .language-button { justify-content: center; width: 48px; height: 48px; padding: 0; }
  .rail-profile { display: block; padding: 15px 0 0; }
  .context-panel { padding-inline: 23px; }
}

@media (max-width: 980px) {
  :root { --context: 0px; }
  .context-panel { display: none; }
  .video-frame { height: min(85dvh,800px); }
}

@media (max-width: 700px) {
  :root { --rail: 0px; --radius: 0px; }
  .side-rail { display: none; }
  .main-stage { margin: 0; }
  .ambient { display: none; }
  .topbar { height: calc(70px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; justify-content: space-between; }
  .mobile-brand { display: inline-flex; padding: 0; gap: 7px; }
  .mobile-brand .brand-symbol { width: 28px; height: 28px; border-radius: 9px; }
  .mobile-brand .brand-symbol svg { width: 14px; height: 14px; }
  .mobile-brand > span:last-child { font-size: 1.03rem; }
  .feed-tabs { position: absolute; top: calc(66px + env(safe-area-inset-top)); left: 50%; gap: 1px; padding: 3px; transform: translateX(-50%); background: rgba(8,10,11,0.3); }
  .feed-tab { padding: 7px 11px; font-size: 0.65rem; white-space: nowrap; }
  .topbar-actions { position: static; }
  .topbar-actions .icon-button, .mobile-language { display: grid; width: 34px; height: 34px; }
  .topbar-actions .icon-button svg { width: 18px; height: 18px; }
  .video-card { padding: 0; }
  .video-frame { width: 100%; height: 100dvh; max-height: none; aspect-ratio: auto; border: 0; box-shadow: none; }
  .video-top { top: calc(119px + env(safe-area-inset-top)); right: 16px; left: 16px; }
  .volume-slider { display: none; }
  .video-info { right: 75px; bottom: calc(96px + env(safe-area-inset-bottom)); left: 18px; }
  .video-title { max-width: 280px; font-size: 1.35rem; }
  .video-description { max-width: 280px; font-size: 0.7rem; }
  .action-rail { right: 13px; bottom: calc(99px + env(safe-area-inset-bottom)); gap: 13px; }
  .action-icon { width: 43px; height: 43px; }
  .progress-wrap { right: 14px; bottom: calc(69px + env(safe-area-inset-bottom)); left: 14px; }
  .time-label { display: none; }
  .bottom-nav { position: fixed; inset: auto 0 0; z-index: 20; display: grid; height: calc(62px + env(safe-area-inset-bottom)); grid-template-columns: repeat(4,1fr); padding: 6px 10px env(safe-area-inset-bottom); border-top: 1px solid rgba(255,255,255,0.11); background: rgba(8,10,11,0.92); backdrop-filter: blur(20px); }
  .bottom-nav button { display: grid; place-content: center; justify-items: center; gap: 3px; background: transparent; color: var(--faint); font-size: 0.53rem; }
  .bottom-nav button svg { width: 20px; height: 20px; }
  .bottom-nav button.is-active { color: var(--accent); }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .drawer { inset: auto 0 0; width: 100%; height: min(78dvh,680px); border-top: 1px solid var(--line); border-left: 0; border-radius: 23px 23px 0 0; padding: 23px 20px calc(18px + env(safe-area-inset-bottom)); }
  .drawer[open] { animation: sheetIn 220ms ease-out; }
  @keyframes sheetIn { from { transform: translateY(50px); opacity: 0; } }
  .modal { padding: 34px 25px 28px; }
  .discover-header { height: calc(70px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .discover-content { width: calc(100% - 32px); padding: 35px 0 50px; }
  .discover-content > h2 { margin-bottom: 23px; }
  .search-key { display: none; }
  .video-grid { grid-template-columns: repeat(2,1fr); gap: 20px 11px; }
  .grid-card__visual { border-radius: 12px; }
  .grid-card h3 { font-size: 0.75rem; }
}

@media (max-width: 380px) {
  .feed-tab { padding-inline: 9px; }
  .video-info { right: 68px; }
  .video-description { -webkit-line-clamp: 1; }
  .action-rail { right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
