/* Sinima ቤት — Jacaranda Night
   Phone-first app column. Ink-violet neutrals, jacaranda accent, Adey Abeba yellow only for NEW.
   Shelves carry their own hue (--th) so they can be found by color, not by reading. */
:root {
  --ink: #0D0B12;
  --ink-2: #16131D;
  --ink-3: #221E2B;
  --line: #2E2939;
  --text: #F6F3FA;
  --text-2: #B9B2C6;
  --text-3: #857D94;
  --accent: #B794FF;
  --accent-ink: #1A0F33;
  --accent-soft: rgba(183, 148, 255, .14);
  --accent-line: rgba(183, 148, 255, .38);
  --adey: #F7C948;
  --font-am: "Noto Sans Ethiopic", "Nyala", "Ebrima", "Kefa", sans-serif;
  --font-ui: "Plus Jakarta Sans", "Noto Sans Ethiopic", "Nyala", "Ebrima", system-ui, sans-serif;
  --r-md: 12px;
  --r-lg: 18px;
  --gutter: 16px;
  --app: 560px;
  --tabbar: 68px;
  color-scheme: dark;
}
@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body.sinimabet {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.sinimabet h1, body.sinimabet h2, body.sinimabet h3 { font-family: var(--font-am); margin: 0; letter-spacing: 0; text-wrap: balance; }
body.sinimabet a { color: inherit; text-decoration: none; }
body.sinimabet img { max-width: 100%; display: block; }
body.sinimabet button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
body.sinimabet :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sb-i { width: 22px; height: 22px; flex: none; }
.tnum { font-variant-numeric: tabular-nums; }
.sb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sb-muted { color: var(--text-3); }
.sb-skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px; }
.sb-skip:focus { left: 8px; }

/* ---------- shell ---------- */
.sb-app { position: relative; max-width: var(--app); margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + 8px); }
@media (min-width: 900px) {
  :root { --app: 1180px; --gutter: 32px; }
}
.sb-main { display: block; }

/* ---------- top bar ---------- */
.sb-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter) 10px; background: linear-gradient(var(--ink) 62%, rgba(13, 11, 18, 0)); }
.sb-brand { display: flex; align-items: center; gap: 9px; }
.sb-brand img { width: 38px; height: 38px; }
.sb-wordmark { font-weight: 800; font-size: 20px; letter-spacing: -.02em; font-family: "Plus Jakarta Sans", var(--font-am); }
.sb-wordmark em { font-style: normal; color: var(--accent); font-family: var(--font-am); font-weight: 800; }
.sb-top-actions { display: flex; gap: 8px; }
.sb-icon-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ink-3); color: var(--text); }
.sb-icon-btn .sb-i { width: 21px; height: 21px; }

/* ---------- buttons, pills ---------- */
.sb-btn { min-height: 52px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 22px; font-family: var(--font-am); font-weight: 750; font-size: 16px; white-space: nowrap; transition: transform .12s ease, background-color .2s; }
.sb-btn:active { transform: scale(.97); }
.sb-btn .sb-i { width: 20px; height: 20px; }
.sb-btn.is-primary { background: var(--accent); color: var(--accent-ink); }
.sb-btn.is-quiet { background: var(--ink-3); color: var(--text); }
.sb-btn.is-glass { background: rgba(255, 255, 255, .12); color: #fff; backdrop-filter: blur(10px); }
.sb-btn.is-round { width: 52px; padding: 0; flex: none; }
.sb-btn.is-sm { min-height: 42px; padding: 0 16px; font-size: 15px; }
.sb-btn.is-disabled, .sb-btn.is-static { opacity: .45; cursor: default; }
.sb-btn.is-static { opacity: .7; }
.sb-btn.is-saved { color: var(--accent); }
.sb-actions { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; }
.sb-actions.is-center { display: flex; justify-content: center; flex-wrap: wrap; }
.sb-pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sb-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 11px; border-radius: 999px; font-family: var(--font-am); font-weight: 700; font-size: 13px; white-space: nowrap; }
.sb-pill .sb-i { width: 15px; height: 15px; }
.sb-pill .sb-mark { width: 20px; height: 14px; }
.sb-pill.is-new { background: var(--adey); color: #231A00; }
.sb-pill.is-air { background: var(--accent-soft); color: var(--accent); }
.sb-pill.is-done { background: var(--ink-3); color: var(--text-2); }
.sb-pill.is-audio { background: rgba(255, 255, 255, .1); color: var(--text); }
.sb-pill.is-xs { min-height: 20px; font-size: 11px; padding: 0 7px; vertical-align: 1px; }
.sb-corner { position: absolute; top: 8px; left: 8px; z-index: 2; }

/* ---------- origin marks ---------- */
.sb-mark { display: inline-block; width: 26px; height: 18px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); flex: none; vertical-align: middle; }
.sb-mark svg { width: 100%; height: 100%; display: block; }
.sb-mark.is-lg { width: 44px; height: 30px; border-radius: 6px; }

/* ---------- posters ---------- */
.sb-poster { position: relative; aspect-ratio: 2 / 3; max-width: 100%; border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px;
  background:
    radial-gradient(120% 70% at 20% 0%, hsl(var(--h, 270) 70% 55% / .55), transparent 60%),
    radial-gradient(90% 60% at 100% 100%, hsl(var(--h2, 300) 80% 45% / .6), transparent 65%),
    linear-gradient(160deg, hsl(var(--h, 270) 40% 16%), hsl(var(--h2, 300) 45% 9%)); }
.sb-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .6)); pointer-events: none; }
.sb-poster.has-img::after { background: linear-gradient(transparent 70%, rgba(0, 0, 0, .35)); }
.sb-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sb-pt { position: relative; z-index: 1; font-family: var(--font-am); font-weight: 900; font-stretch: 70%; line-height: 1.04; font-size: var(--pt, 24px); color: #fff; text-wrap: balance; overflow-wrap: anywhere; }
.sb-ps { position: relative; z-index: 1; margin-top: 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.sb-flag { position: absolute; top: 8px; right: 8px; z-index: 2; }
.sb-poster.is-wide { aspect-ratio: 16 / 9; border-radius: 0; }
.sb-poster.is-dim { opacity: .55; }
.sb-poster.is-dim .sb-pt, .sb-poster.is-dim .sb-ps { display: none; }
.sb-poster.is-square { aspect-ratio: 1 / 1; border-radius: 0; --pt: clamp(44px, 14vw, 72px); padding: 20px var(--gutter) 34px; }
.sb-poster.is-square::after { background: linear-gradient(transparent 35%, var(--ink)); }

/* ---------- cards ---------- */
.sb-card { width: 132px; display: grid; gap: 6px; align-content: start; }
.sb-card .sb-poster { --pt: 23px; }
.sb-stack { position: relative; display: block; padding-top: 6px; }
.sb-stack::before, .sb-stack::after { content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 12px; border-radius: 10px 10px 0 0; background: hsl(var(--h) 30% 28%); }
.sb-stack::after { left: 5px; right: 5px; top: 3px; background: hsl(var(--h) 30% 20%); }
.sb-stack .sb-poster { z-index: 1; }
.sb-card-name { font-family: var(--font-am); font-weight: 700; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.sb-card-sub { display: flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 13px; font-family: var(--font-am); }
.sb-card-sub .sb-i { width: 15px; height: 15px; color: var(--text-3); }
.sb-card:active .sb-poster { transform: scale(.98); }

.sb-thumb { position: relative; display: block; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--r-md); overflow: hidden; }
.sb-thumb .sb-poster { position: absolute; inset: 0; aspect-ratio: auto; justify-content: center; align-items: flex-start; padding: 12px 14px; --pt: 22px; }
.sb-dur { position: absolute; z-index: 2; right: 8px; bottom: 8px; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .72); }
.sb-progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255, 255, 255, .22); }
.sb-progress i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); }

/* ---------- sections & rails ---------- */
.sb-section { display: grid; gap: 12px; padding-top: 28px; }
.sb-section.is-tight { padding-top: 20px; }
.sb-section.is-flush { margin: 0 calc(var(--gutter) * -1); }
.sb-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--gutter); }
.sb-section-head h2 { font-size: 20px; font-weight: 750; display: flex; align-items: center; gap: 10px; min-width: 0; }
.sb-more { display: inline-flex; align-items: center; gap: 2px; min-height: 38px; padding: 0 6px 0 13px; border-radius: 999px; background: var(--ink-3); font-family: var(--font-am); font-weight: 650; font-size: 14px; flex: none; }
.sb-more .sb-i { width: 18px; height: 18px; }
.sb-rail { display: flex; gap: 12px; overflow-x: auto; padding: 0 var(--gutter) 4px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
.sb-rail::-webkit-scrollbar { display: none; }
.sb-rail > * { scroll-snap-align: start; flex: none; }
@media (min-width: 900px) {
  .sb-rail { scrollbar-width: thin; }
  .sb-card { width: 164px; }
}

/* ---------- resume + hero ---------- */
.sb-resume { margin: 4px var(--gutter) 0; display: grid; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-2); border: 1px solid var(--line); }
.sb-resume .sb-thumb { border-radius: 0; }
.sb-resume-body { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 16px 16px; }
.sb-resume-body small { color: var(--accent); font-family: var(--font-am); font-weight: 700; font-size: 13px; display: block; }
.sb-resume-body b { display: block; font-family: var(--font-am); font-size: 19px; line-height: 1.25; }
.sb-resume-body span { color: var(--text-2); font-size: 14px; font-family: var(--font-am); }
.sb-big-play { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 0 0 8px var(--accent-soft); flex: none; }
.sb-big-play .sb-i { width: 26px; height: 26px; margin-left: 4px; }

.sb-hero { position: relative; margin: 4px var(--gutter) 0; border-radius: var(--r-lg); overflow: hidden; }
.sb-poster.is-hero { aspect-ratio: 4 / 5; border-radius: var(--r-lg); padding: 24px 20px 210px; --pt: clamp(52px, 17vw, 76px); justify-content: flex-end; }
.sb-poster.is-hero::after { background: linear-gradient(transparent 30%, rgba(13, 11, 18, .94)); }
.sb-hero-meta { position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 2; display: grid; gap: 12px; }
.sb-hero-title { font-size: 30px; font-weight: 800; line-height: 1.15; }
.sb-hero .sb-poster:not(.has-img) ~ .sb-hero-meta .sb-hero-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sb-hero .sb-actions { grid-template-columns: 1fr auto; }
@media (min-width: 900px) {
  .sb-hero .sb-poster.is-hero { aspect-ratio: 21 / 8; padding-bottom: 32px; }
  .sb-hero-meta { left: auto; right: 32px; bottom: 32px; width: min(420px, 45%); }
}

/* ---------- tiles ---------- */
.sb-tile { position: relative; min-height: 100px; border-radius: 16px; padding: 12px; display: grid; align-content: space-between; gap: 10px; overflow: hidden; color: #fff;
  background: linear-gradient(145deg, hsl(var(--th) 55% 30%), hsl(var(--th) 50% 15%)); }
.sb-tile::after { content: ""; position: absolute; right: -18px; bottom: -22px; width: 86px; height: 86px; border-radius: 50%; background: hsl(var(--th) 70% 60% / .18); }
.sb-tile-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.sb-kind { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(0, 0, 0, .25); }
.sb-kind .sb-i { width: 20px; height: 20px; }
.sb-kind.is-lg { width: 52px; height: 52px; border-radius: 14px; }
.sb-tile b { position: relative; z-index: 1; display: block; font-family: var(--font-am); font-size: 17px; line-height: 1.2; font-weight: 750; }
.sb-tile small { position: relative; z-index: 1; display: block; font-size: 12px; color: rgba(255, 255, 255, .75); font-family: var(--font-am); margin-top: 2px; }
.sb-rail.is-tiles .sb-tile { width: 152px; }
.sb-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 var(--gutter); }
@media (min-width: 900px) { .sb-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- new parts ---------- */
.sb-np { width: 216px; display: grid; gap: 8px; }
.sb-cap { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--text-2); font-family: var(--font-am); }
.sb-cap b { color: var(--text); font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- top 10 ---------- */
.sb-top { width: 176px; display: flex; align-items: flex-end; }
.sb-rank { font-size: 104px; font-weight: 800; line-height: .78; letter-spacing: -.08em; color: var(--ink); -webkit-text-stroke: 2px var(--text-3); margin-right: -14px; font-family: "Plus Jakarta Sans", sans-serif; }
.sb-top-art { width: 110px; flex: none; position: relative; z-index: 1; }
.sb-top-art .sb-poster { --pt: 20px; }
.sb-views { display: block; font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ---------- telegram card, footer ---------- */
.sb-tg-card { margin: 30px var(--gutter) 0; padding: 18px; border-radius: var(--r-lg); background: var(--ink-2); border: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.sb-tg-card b { display: block; font-family: var(--font-am); font-size: 16px; }
.sb-tg-card small { color: var(--text-2); font-size: 13px; font-family: var(--font-am); }
.sb-foot { padding: 30px var(--gutter) 8px; display: grid; gap: 10px; color: var(--text-3); font-size: 13px; }
.sb-foot-brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-family: var(--font-am); }
.sb-foot-brand .sb-wordmark { color: var(--text); font-size: 17px; }
.sb-foot-tg { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; width: fit-content; min-height: 40px; }
.sb-foot-tg .sb-i { width: 18px; height: 18px; }
.sb-legal { margin: 0; font-size: 12px; line-height: 1.5; max-width: 60ch; }

/* ---------- page titles, shelves, grid ---------- */
.sb-page-title { padding: 6px var(--gutter) 14px; font-size: 26px; font-weight: 800; }
.sb-page-title.is-sm { font-size: 18px; padding-top: 18px; padding-bottom: 0; }
.sb-shelf-head { margin: 4px var(--gutter) 0; padding: 18px; border-radius: var(--r-lg); display: flex; gap: 14px; align-items: center; color: #fff; background: linear-gradient(145deg, hsl(var(--th) 55% 28%), hsl(var(--th) 50% 14%)); }
.sb-shelf-head h1 { font-size: 24px; font-weight: 800; }
.sb-shelf-head p { margin: 2px 0 0; color: rgba(255, 255, 255, .78); font-family: var(--font-am); font-size: 14px; }
.sb-chips { display: flex; gap: 8px; padding: 14px var(--gutter) 2px; overflow-x: auto; scrollbar-width: none; }
.sb-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--ink-3); color: var(--text-2); font-family: var(--font-am); font-weight: 650; font-size: 15px; flex: none; display: inline-flex; align-items: center; gap: 7px; }
.sb-chip .sb-i { width: 17px; height: 17px; }
.sb-chip[aria-current] { background: var(--text); color: var(--ink); }
.sb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; padding: 16px var(--gutter) 0; }
.sb-grid .sb-card { width: auto; }
.sb-grid .sb-poster { --pt: clamp(16px, 5vw, 22px); }
@media (min-width: 640px) { .sb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .sb-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.sb-pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 26px var(--gutter) 0; color: var(--text-2); }

/* ---------- detail (series) ---------- */
.sb-detail-art { margin-top: -68px; position: relative; z-index: 0; }
.sb-detail-body { padding: 0 var(--gutter); display: grid; gap: 16px; position: relative; z-index: 1; margin-top: -8px; }
.sb-detail.is-genart .sb-detail-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (min-width: 900px) { .sb-detail.is-genart .sb-detail-title { position: static; width: auto; height: auto; clip: auto; } }
.sb-detail-title { font-size: 28px; font-weight: 800; line-height: 1.2; }
.sb-syn { color: var(--text-2); font-family: var(--font-am); font-size: 15px; line-height: 1.75; max-width: 65ch; }
.sb-syn p { margin: 0 0 .6em; }
@media (min-width: 900px) {
  .sb-detail { display: grid; grid-template-columns: 320px 1fr; gap: 32px; padding: 16px var(--gutter) 0; align-items: end; }
  .sb-detail-art { margin-top: 0; }
  .sb-detail-art .sb-poster.is-square { aspect-ratio: 2 / 3; border-radius: var(--r-lg); }
  .sb-detail-art .sb-poster.is-square::after { background: linear-gradient(transparent 45%, rgba(0, 0, 0, .6)); }
  .sb-detail-body { padding: 0; margin: 0; }
}

.sb-parts { display: grid; gap: 2px; }
.sb-part-row { display: grid; grid-template-columns: 124px 1fr auto; gap: 14px; align-items: center; padding: 8px var(--gutter); }
.sb-part-row:active, .sb-part-row:hover { background: var(--ink-2); }
.sb-part-row .sb-thumb .sb-poster { --pt: 13px; padding: 8px; }
.sb-part-text b { display: block; font-family: var(--font-am); font-size: 18px; }
.sb-part-text > span { color: var(--text-3); font-size: 13px; font-family: var(--font-am); }
.sb-part-row.is-soon { opacity: .55; }
.sb-row-play { width: 44px; height: 44px; border-radius: 50%; background: var(--ink-3); display: grid; place-items: center; color: var(--accent); }
.sb-row-play .sb-i { width: 16px; height: 16px; margin-left: 2px; }

.sb-num-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0 var(--gutter); }
.sb-num-grid.is-scroll { max-height: 290px; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 4px; }
@media (min-width: 640px) { .sb-num-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); } }
.sb-num { height: 50px; border-radius: 12px; background: var(--ink-3); font-weight: 800; font-size: 17px; display: grid; place-items: center; position: relative; }
.sb-num.is-cur { background: var(--accent); color: var(--accent-ink); }
.sb-num.is-seen { color: var(--text-3); }
.sb-num.is-seen::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 7px; height: 3px; border-radius: 3px; background: var(--accent); opacity: .7; }

/* ---------- player ---------- */
.sb-player { position: sticky; top: 0; z-index: 40; aspect-ratio: 16 / 9; max-width: 100%; background: #000; overflow: hidden; }
@media (min-width: 900px) { .sb-player { position: relative; border-radius: 0 0 var(--r-lg) var(--r-lg); max-height: 72vh; margin: 0 auto; } }
.sb-player > .sb-poster { position: absolute; inset: 0; aspect-ratio: auto; --pt: 34px; justify-content: center; align-items: center; text-align: center; }
.sb-video, .sb-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.sb-player-back { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; z-index: 6; background: rgba(0, 0, 0, .5); color: #fff; }
.sb-player.is-playing .sb-player-back { opacity: 0; pointer-events: none; transition: opacity .3s; }
.sb-player-start { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: linear-gradient(rgba(0, 0, 0, .15), rgba(0, 0, 0, .35)); }
.sb-player-start > .sb-poster { position: absolute; inset: 0; aspect-ratio: auto; --pt: 34px; justify-content: center; align-items: center; text-align: center; }
.sb-player-start .sb-big-play { position: relative; z-index: 2; width: 76px; height: 76px; }
.sb-resume-at { position: absolute; z-index: 2; left: 50%; bottom: 16px; transform: translateX(-50%); background: rgba(0, 0, 0, .7); padding: 6px 12px; border-radius: 999px; font-family: var(--font-am); font-size: 14px; font-weight: 700; white-space: nowrap; }
.sb-player-soon { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; gap: 4px; text-align: center; padding: 20px; font-family: var(--font-am); }
.sb-player-soon strong { font-size: 18px; }
.sb-player-soon span { color: var(--text-2); font-size: 13px; }
.sb-autonext { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 7; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: rgba(13, 11, 18, .88); border: 1px solid var(--accent-line); backdrop-filter: blur(10px); }
.sb-autonext b { display: block; font-family: var(--font-am); font-size: 16px; }
.sb-autonext span { color: var(--text-2); font-family: var(--font-am); font-size: 13px; }
.sb-autonext .sb-btn { min-height: 44px; }

.sb-watch { padding: 16px var(--gutter) 0; display: grid; gap: 16px; }
.sb-watch-title { font-size: 26px; font-weight: 800; line-height: 1.2; }
.sb-watch-title a { display: block; font-size: 15px; font-weight: 650; color: var(--accent); margin-bottom: 2px; }
.sb-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sb-share { display: flex; gap: 10px; }
.sb-share > .sb-btn:first-child { flex: 1; }
.sb-ad-slot { min-height: 60px; display: grid; place-items: center; overflow: hidden; border-radius: var(--r-md); }
@media (min-width: 900px) {
  .sb-watch { max-width: 820px; }
}

/* ---------- search ---------- */
.sb-searchbox { margin: 8px var(--gutter) 0; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 6px 0 16px; border-radius: 16px; background: var(--ink-3); }
.sb-searchbox > .sb-i { color: var(--text-3); }
.sb-searchbox input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: 17px var(--font-am); padding: 0; }
.sb-searchbox input::placeholder { color: var(--text-3); }
.sb-searchbox input::-webkit-search-cancel-button { filter: invert(1); }
.sb-mic { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.sb-mic.is-listening { animation: sb-pulse 1s ease-in-out infinite; }
@keyframes sb-pulse { 50% { box-shadow: 0 0 0 10px var(--accent-soft); } }
.sb-search-go { flex: none; }
.sb-mic:not([hidden]) + .sb-search-go { display: none; }
.sb-hint { padding: 10px var(--gutter) 0; margin: 0; color: var(--text-3); font-size: 13px; font-family: var(--font-am); }
.sb-hint.is-center { text-align: center; padding-top: 24px; }
.sb-tiles.is-inline { padding-top: 0; }

/* ---------- empty states ---------- */
.sb-empty { padding: 36px 24px 8px; text-align: center; color: var(--text-2); display: grid; gap: 12px; justify-items: center; font-family: var(--font-am); }
.sb-empty h1, .sb-empty h2 { color: var(--text); font-size: 22px; }
.sb-empty p { margin: 0; max-width: 40ch; }
.sb-empty .sb-i { width: 18px; height: 18px; vertical-align: -3px; }
.sb-empty.is-page { padding-top: 64px; }
.sb-empty-ic { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.sb-empty-ic .sb-i { width: 34px; height: 34px; }
.sb-empty-home { padding: 60px 24px 20px; display: grid; gap: 14px; justify-items: center; text-align: center; font-family: var(--font-am); }
.sb-empty-home h1 { font-size: 34px; font-family: "Plus Jakarta Sans", var(--font-am); }
.sb-empty-home h1 em { font-style: normal; color: var(--accent); font-family: var(--font-am); }
.sb-empty-home p { margin: 0; }

/* ---------- tab bar ---------- */
.sb-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0 auto; max-width: var(--app); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(13, 11, 18, .93); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
.sb-tab { display: grid; justify-items: center; gap: 2px; padding: 4px 0; color: var(--text-3); font-family: var(--font-am); font-size: 13px; font-weight: 650; text-align: center; }
.sb-tab-ic { width: 54px; height: 32px; border-radius: 999px; display: grid; place-items: center; transition: background-color .2s; }
.sb-tab .sb-i { width: 24px; height: 24px; }
.sb-tab[aria-current] { color: var(--text); }
.sb-tab[aria-current] .sb-tab-ic { background: var(--accent-soft); color: var(--accent); }
@media (min-width: 900px) { .sb-tabbar { border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: 0; max-width: 560px; } }

/* ---------- install sheet ---------- */
.sb-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .62); display: flex; align-items: flex-end; justify-content: center; }
.sb-sheet { width: 100%; max-width: 480px; background: var(--ink-2); border-radius: 22px 22px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 16px; animation: sb-up .25s ease-out; font-family: var(--font-am); }
@keyframes sb-up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sb-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); justify-self: center; }
.sb-sheet-top { display: flex; gap: 14px; align-items: center; }
.sb-app-icon img { width: 62px; height: 62px; border-radius: 16px; }
.sb-sheet h3 { font-size: 19px; }
.sb-sheet p { margin: 0; color: var(--text-2); font-size: 13px; }
.sb-perks { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.sb-perks li { display: flex; gap: 12px; align-items: center; }
.sb-perks li > span { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.sb-perks .sb-i { width: 19px; height: 19px; }
.sb-sheet-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.sb-ios { background: var(--ink-3); border-radius: 12px; padding: 12px; font-size: 14px !important; color: var(--text) !important; }

/* ---------- toast ---------- */
.sb-toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 95; background: var(--text); color: var(--ink); padding: 12px 18px; border-radius: 999px; font-family: var(--font-am); font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: sb-up .2s ease-out; white-space: nowrap; }

/* ---------- loading feedback ---------- */
#sb-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none; transform-origin: 0 50%; transform: scaleX(0); opacity: 0;
  background: linear-gradient(90deg, #8A5CF6, var(--accent), #D2BBFF); box-shadow: 0 0 10px var(--accent); }
#sb-progress.is-on { opacity: 1; animation: sb-trickle 20s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes sb-trickle { 0% { transform: scaleX(0); } 4% { transform: scaleX(.3); } 15% { transform: scaleX(.6); } 40% { transform: scaleX(.8); } 100% { transform: scaleX(.95); } }
.sb-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--accent); animation: sb-rot .7s linear infinite; flex: none; display: inline-block; }
@keyframes sb-rot { to { transform: rotate(360deg); } }
.is-loading { pointer-events: none; }
/* buttons: icon becomes a spinner */
.sb-btn.is-loading, .sb-more.is-loading, .sb-chip.is-loading { opacity: .85; }
.sb-btn.is-loading > .sb-i:first-child, .sb-more.is-loading > .sb-i, .sb-chip.is-loading > .sb-i { display: none; }
.sb-btn.is-loading, .sb-more.is-loading, .sb-chip.is-loading { position: relative; }
.sb-btn.is-loading::after, .sb-more.is-loading::after, .sb-chip.is-loading::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-top-color: transparent; animation: sb-rot .7s linear infinite; flex: none; }
.sb-btn.is-loading > .sb-i:first-child { position: absolute; }
/* cards, tiles, rows: dim + centered spinner */
.sb-card.is-loading .sb-poster, .sb-np.is-loading .sb-thumb, .sb-part-row.is-loading .sb-thumb, .sb-top.is-loading .sb-poster, .sb-resume.is-loading .sb-thumb { filter: brightness(.55); }
.sb-card.is-loading, .sb-np.is-loading, .sb-part-row.is-loading, .sb-top.is-loading, .sb-tile.is-loading, .sb-resume.is-loading { position: relative; }
.sb-card.is-loading::after, .sb-np.is-loading::after, .sb-part-row.is-loading::after, .sb-top.is-loading::after, .sb-tile.is-loading::after, .sb-resume.is-loading::after {
  content: ""; position: absolute; z-index: 5; width: 34px; height: 34px; border-radius: 50%; border: 3.5px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: sb-rot .7s linear infinite; }
.sb-card.is-loading::after { left: calc(50% - 17px); top: 30%; }
.sb-np.is-loading::after, .sb-resume.is-loading::after { left: calc(50% - 17px); top: 22%; }
.sb-part-row.is-loading::after { left: calc(var(--gutter) + 45px); top: calc(50% - 17px); }
.sb-top.is-loading::after { right: 38px; top: 35%; }
.sb-tile.is-loading::after { right: 14px; bottom: 14px; width: 26px; height: 26px; }
.sb-tile.is-loading { filter: brightness(.8); }
.sb-num.is-loading { color: transparent; }
.sb-num.is-loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--accent); animation: sb-rot .7s linear infinite; }
.sb-tab.is-loading .sb-tab-ic { background: var(--accent-soft); }
.sb-tab.is-loading .sb-i { animation: sb-bob .6s ease-in-out infinite alternate; color: var(--accent); }
@keyframes sb-bob { to { transform: translateY(-3px); } }
/* slow-network note */
.sb-slow { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 96; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 14px; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--accent-line); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); font-family: var(--font-am); animation: sb-up .25s ease-out; white-space: nowrap; }
.sb-slow b { display: block; font-size: 15px; }
.sb-slow small { display: block; color: var(--text-2); font-size: 12px; }
/* player buffering */
.sb-player.is-buffering::after { content: ""; position: absolute; left: calc(50% - 26px); top: calc(50% - 26px); z-index: 5; width: 52px; height: 52px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .22); border-top-color: var(--accent); animation: sb-rot .8s linear infinite; pointer-events: none; }

/* ---------- ads ---------- */
.sb-ad { display: grid; justify-items: center; gap: 4px; margin: 4px 0; max-width: 100%; overflow: hidden; }
.sb-ad-label { font-family: var(--font-am); font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--text-3); }
.sb-ad-frame { border: 0; display: block; max-width: 100%; background: transparent; color-scheme: dark; }
.sb-ad.is-section { padding: 26px var(--gutter) 0; }
.sb-ad.is-desktop { display: none; }
@media (min-width: 760px) { .sb-ad.is-desktop { display: grid; } .sb-ad.is-mobile { display: none; } }
.sb-anchor { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + 2px); z-index: 45; width: min(100%, 360px); display: grid; justify-items: center; gap: 2px; padding: 4px 0 6px; background: rgba(13, 11, 18, .96); border: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.sb-anchor .sb-ad-label { font-size: 10px; }
.sb-anchor-x { position: absolute; top: -14px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink-3) !important; color: var(--text) !important; border: 1px solid var(--line) !important; font-size: 13px !important; }
body.has-anchor .sb-app { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + 80px); }
body.has-anchor .sb-slow, body.has-anchor .sb-toast { bottom: calc(var(--tabbar) + 90px + env(safe-area-inset-bottom, 0px)); }
.sb-admodal { position: fixed; inset: 0; z-index: 92; background: rgba(0, 0, 0, .7); display: grid; place-items: center; padding: 16px; animation: sb-up .2s ease-out; }
.sb-admodal-box { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 10px 12px; display: grid; gap: 8px; justify-items: center; max-width: 100%; }
.sb-admodal-top { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.sb-admodal-x { min-width: 36px; height: 36px; border-radius: 50%; background: var(--ink-3) !important; color: var(--text) !important; font-weight: 800; font-size: 14px !important; }
.sb-admodal-x:disabled { color: var(--text-3) !important; cursor: default; }
.sb-midroll { position: fixed; inset: 0; z-index: 150; background: rgba(13, 11, 18, .97); display: grid; align-content: center; justify-items: center; gap: 16px; padding: calc(20px + env(safe-area-inset-top, 0px)) 16px calc(20px + env(safe-area-inset-bottom, 0px)); overflow: auto; animation: sb-up .2s ease-out; }
.sb-midroll-head { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; font-family: var(--font-am); }
.sb-midroll-note { font-size: 15px; color: var(--text); font-weight: 700; }
.sb-midroll-ad { display: grid; place-items: center; width: 100%; max-width: 480px; }
.sb-midroll-go { min-width: 220px; }
.sb-midroll-go:disabled { background: var(--ink-3); color: var(--text-2); opacity: 1; }
.sb-player.is-midroll .sb-player-back { opacity: 0; pointer-events: none; }

#sb-debug { position: fixed; left: 8px; right: 8px; top: 8px; z-index: 300; max-height: 60vh; overflow: auto; margin: 0; padding: 12px; background: rgba(0, 0, 0, .92); color: #fff; font: 12px/1.5 ui-monospace, monospace; white-space: pre-wrap; border: 1px solid var(--accent); border-radius: 12px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .sb-screen, .sb-sheet, .sb-toast, .sb-slow, #sb-progress.is-on { animation: none !important; }
  #sb-progress.is-on { transform: scaleX(.7); }
  @view-transition { navigation: none; }
}
