:root {
  --violet: #B9A4FF; --violet-ink: #1B1236;
  --bg: #0F0F11; --surface: #18181B; --surface2: #202024; --line: #2A2A30; --text: #E6EDF3; --muted: #93939C;
  --accent: var(--accent); --accent-ink: #062A25; --amber: #F0B36A; --danger: #F87171;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --tab-h: 56px; --pad: 16px; --radius: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden; overscroll-behavior-y: none;
}
body.playing { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }
.ic { width: 22px; height: 22px; fill: currentColor; flex: none; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.ok { color: var(--accent); }
.hidden, [hidden] { display: none !important; }

#boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 50; }
#boot img { width: 84px; height: 84px; border-radius: 20px; opacity: .9; }

#view { padding: 0 var(--safe-r) calc(var(--tab-h) + var(--safe-b) + 20px) var(--safe-l); max-width: 100vw; }
.page { min-height: 60vh; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: calc(var(--safe-t) + 6px) var(--pad) 8px; min-height: calc(var(--safe-t) + 56px);
  background: rgba(15, 15, 17, .86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(42, 42, 48, .6);
}
.top-title { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.2px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; letter-spacing: -.2px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; flex: none; color: var(--text); }
.icon-btn:active { background: var(--surface2); }
.icon-btn.glass { background: rgba(15, 15, 17, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.avatar-btn { width: 44px; height: 44px; display: grid; place-items: center; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--surface2); }
.pill .ic { width: 14px; height: 14px; }
.pill.amber { color: var(--amber); background: rgba(240, 179, 106, .14); }

/* ---------- avatars ---------- */
.avatar { --av: var(--accent); display: grid; place-items: center; background: var(--av); color: #0F0F11; font-weight: 800; border-radius: 10px; flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 15px; border-radius: 8px; }
.avatar.md { width: 44px; height: 44px; font-size: 19px; }
.avatar.lg { width: 64px; height: 64px; font-size: 28px; border-radius: 14px; }
.avatar.xl { width: 96px; height: 96px; font-size: 42px; border-radius: 16px; }
.avatar.add { background: var(--surface2); color: var(--muted); border: 2px dashed var(--line); }
.avatar.add .ic { width: 36px; height: 36px; }

/* ---------- buttons, fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border-radius: 12px; background: var(--surface2); color: var(--text); font-weight: 650; font-size: 15px; border: 1px solid var(--line);
}
.btn:active { filter: brightness(1.15); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; }
.btn .ic { width: 20px; height: 20px; }
.link { color: var(--accent); font-weight: 600; min-height: 32px; padding: 4px 0; }
.field {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}
.field:focus { border-color: var(--accent); }

/* ---------- rows + cards ---------- */
.row { margin: 18px 0 4px; }
.row-head { display: flex; align-items: baseline; gap: 8px; padding: 0 var(--pad); margin-bottom: 8px; }
.row-head h2 { font-size: 18px; margin: 0; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-head .link { margin-left: auto; font-size: 14px; }
.row-type { color: var(--muted); font-size: 13px; white-space: nowrap; }
.scroller {
  display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 0 var(--pad) 6px; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain;
}
.scroller::-webkit-scrollbar { display: none; }
.card { width: 112px; flex: none; text-align: left; scroll-snap-align: start; scroll-margin-left: var(--pad); }
.poster { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--surface2); }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #3F3F46; }
.poster .badge { position: absolute; left: 6px; top: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(15, 15, 17, .82); font-size: 11px; font-weight: 700; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .22); }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar.big { position: relative; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.card-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.25; margin-top: 6px; font-weight: 550; }
.card-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.skeleton .poster { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 14px 10px; padding: 8px var(--pad); }
.grid .card { width: auto; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px var(--pad) 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 6px 14px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip small { font-size: 12px; opacity: .7; font-weight: 700; }
.chip.select { -webkit-appearance: none; appearance: none; padding-right: 14px; font-size: 16px; }

.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 18px; }
.empty p { margin: 0 0 16px; }
.spin-line { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- setup + who ---------- */
.setup { max-width: 520px; margin: 0 auto; padding: calc(var(--safe-t) + 24px) var(--pad) 32px; }
.setup-hero { text-align: center; margin-bottom: 18px; }
.setup-logo { width: 76px; height: 76px; border-radius: 18px; margin: 0 auto 10px; }
.setup-hero h1 { margin: 0; font-size: 28px; }
.setup-hero p { margin: 4px 0 0; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 14px 0; display: grid; gap: 10px; }
.panel h2 { margin: 0; font-size: 17px; }
.panel p { margin: 0; font-size: 14px; }
.addon-mini { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }

.who { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: calc(var(--safe-t) + 24px) var(--pad) calc(var(--safe-b) + 24px); }
.who h1 { margin: 0; font-size: 26px; text-align: center; }
.who-grid { display: grid; grid-template-columns: repeat(2, 120px); gap: 20px 24px; justify-content: center; }
@media (min-width: 420px) { .who-grid { grid-template-columns: repeat(3, 110px); } }
.who-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 44px; }
.who-tile .who-name { font-size: 15px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-tile.manage .avatar { opacity: .55; }
.who-edit { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); color: #fff; }
.who-edit .ic { width: 28px; height: 28px; }

/* ---------- detail ---------- */
.hero { position: relative; height: min(56vw, 300px); background: var(--surface) center 20% / cover no-repeat; background-image: var(--hero, none); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 15, 17, .25) 0%, rgba(15, 15, 17, .1) 40%, var(--bg) 100%); }
.hero-top { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 6px) 10px 0; }
.detail { padding: 0 var(--pad); margin-top: -64px; position: relative; z-index: 3; }
.detail-head { display: flex; gap: 14px; align-items: flex-end; }
.detail-poster { width: 92px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); flex: none; }
.detail-title { margin: 0; font-size: 24px; line-height: 1.15; letter-spacing: -.3px; overflow-wrap: anywhere; }
.detail-info { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.detail-actions { display: flex; gap: 10px; margin: 16px 0 12px; flex-wrap: wrap; }
.detail-actions .btn.primary { flex: 1 1 160px; }
.detail-desc { margin: 0 0 14px; color: #C4C4CC; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.detail-desc.open { -webkit-line-clamp: unset; display: block; }
.seasons { display: flex; gap: 8px; overflow-x: auto; margin: 4px calc(-1 * var(--pad)) 0; padding: 6px var(--pad); scrollbar-width: none; }
.seasons::-webkit-scrollbar { display: none; }
.season-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
.mal-note { color: var(--accent); font-weight: 600; }
.eps { display: grid; gap: 4px; }
.ep { display: flex; align-items: flex-start; gap: 4px; border-radius: 12px; }
.ep-main { flex: 1; min-width: 0; display: flex; gap: 12px; text-align: left; padding: 8px 0; border-radius: 12px; }
.ep-main:active { background: var(--surface); }
/* v1.12.5: Crunchyroll-style episode cards: the length on the thumbnail, a sort chip */
.thumb .dur { position: absolute; right: 5px; bottom: 7px; z-index: 1; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .78); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; }
.season-sub .sort-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 12.5px; }
.season-sub .sort-chip .ic { width: 16px; height: 16px; }
.thumb { position: relative; width: 128px; aspect-ratio: 16 / 9; flex: none; border-radius: 8px; overflow: hidden; background: var(--surface2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .watched { position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.thumb .watched .ic { width: 16px; height: 16px; }
.ep-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ep-title { font-weight: 650; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.ep-meta { font-size: 12px; color: var(--muted); }
.ep-meta.has-dl { color: var(--accent); }
.ep-ov { font-size: 13px; color: #A8B3C2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-more { margin-top: 6px; color: var(--muted); }

/* ---------- streams ---------- */
.streams-title { margin: 12px var(--pad) 2px; font-weight: 700; font-size: 16px; }
.streams-note { margin: 0 var(--pad) 10px; color: var(--muted); font-size: 13px; }
.streams { display: grid; gap: 10px; padding: 0 var(--pad); }
.stream { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; overflow: hidden; }
.stream.g1 { border-left-color: #60A5FA; }
.stream.g2 { border-left-color: var(--amber); }
.stream-main { flex: 1; min-width: 0; text-align: left; padding: 12px; display: grid; gap: 6px; }
.stream-main:active { background: var(--surface2); }
.stream-name { color: var(--accent); font-weight: 700; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.stream.g2 .stream-name { color: var(--amber); }
.stream-detail { font-size: 13px; color: #C4C4CC; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.stream-dl { align-self: center; color: var(--muted); margin-right: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--surface2); color: var(--muted); }
.tag .ic { width: 12px; height: 12px; }
.tag.teal { color: var(--accent); background: rgba(255, 255, 255, .12); }
.tag.amber { color: var(--amber); background: rgba(240, 179, 106, .14); }

/* ---------- search ---------- */
.searchbar { position: sticky; top: calc(var(--safe-t) + 56px); z-index: 15; padding: 8px var(--pad); background: var(--bg); }
.searchbar .field { padding-left: 42px; }
.sb-ic { position: absolute; left: calc(var(--pad) + 12px); top: 20px; color: var(--muted); }

/* ---------- lists (profile, scan, addons) ---------- */
.me { display: flex; align-items: center; gap: 14px; padding: 16px var(--pad); }
.me h2 { margin: 0; font-size: 20px; }
.list-head { margin: 18px var(--pad) 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.list { margin: 0 var(--pad); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.list-row { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); text-align: left; }
.list-row:first-child { border-top: 0; }
.list-row > span:first-child { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.list-row .muted { font-size: 14px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.list-row.danger { color: var(--danger); }
.list-row select { background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 16px; max-width: 55%; }
.list-row.addon img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.addon-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.addon-text .muted { text-align: left; max-width: 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; }
.switch { -webkit-appearance: none; appearance: none; width: 51px; height: 31px; border-radius: 16px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.scan { font-weight: 700; font-size: 14px; white-space: nowrap; }
.scan.ok { color: var(--accent); }
.scan.no { color: var(--amber); }
.lead { margin: 12px var(--pad); color: var(--muted); font-size: 14px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin: 18px var(--pad); }
.pad { padding: 12px var(--pad); display: grid; gap: 10px; }

/* ---------- downloads ---------- */
.storage { margin: 12px var(--pad); padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 14px; display: grid; gap: 4px; }
.dl { display: flex; align-items: center; gap: 10px; margin: 0 var(--pad); padding: 10px 0; border-top: 1px solid var(--line); }
.dl.active, .dl.failed { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px var(--pad); }
.dl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.dl-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-play { width: 44px; height: 44px; border-radius: 22px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.dl-show { margin-top: 18px; }
.dl-show-head { display: flex; align-items: center; gap: 10px; padding: 0 var(--pad) 6px; }
.dl-show-head img { width: 34px; aspect-ratio: 2/3; object-fit: cover; border-radius: 6px; }
.dl-show-head h2 { margin: 0; font-size: 17px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around;
  padding: 4px var(--safe-r) var(--safe-b) var(--safe-l); background: rgba(15, 15, 17, .92);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-top: 1px solid rgba(42, 42, 48, .8);
}
.tabbar a { position: relative; flex: 1; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.tabbar a.on { color: var(--accent); }
.tabbar .dl-dot { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; display: grid; place-items: center; }
body.playing .tabbar { display: none; }
body:has(.field:focus) .tabbar { visibility: hidden; }   /* keep the tab bar from riding on top of the keyboard */

/* ---------- sheets + toast ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 200; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .2s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; max-height: 86dvh; overflow-y: auto; background: var(--surface);
  border-radius: 18px 18px 0 0; padding: 8px var(--pad) calc(var(--safe-b) + 14px); transform: translateY(100%); transition: transform .22s ease-out;
  border-top: 1px solid var(--line); margin: 0 auto; max-width: 640px;
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grip { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 2px auto 10px; }
.sheet-title { margin: 0 4px 4px; font-size: 18px; }
.sheet-sub { margin: 0 4px 10px; color: var(--muted); font-size: 14px; }
.sheet-error { color: var(--danger); margin: 6px 4px 0; font-size: 14px; }
.sheet-actions { display: grid; gap: 8px; margin-top: 10px; }
.sheet-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 12px; background: var(--surface2); text-align: left; }
.sheet-btn .sb-label { font-weight: 650; font-size: 16px; }
.sheet-btn .sb-sub { color: var(--muted); font-size: 13px; }
.sheet-btn.primary { background: rgba(255, 255, 255, .14); color: var(--accent); }
.sheet-btn.danger { color: var(--danger); }
.sheet-btn.cancel { align-items: center; background: transparent; }
.sheet-btn[disabled] { opacity: .5; }
.sheet .field { margin-top: 6px; }
.swatches { display: flex; gap: 12px; margin: 14px 4px 0; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 10px; border: 3px solid transparent; }
.swatch.on { border-color: #fff; }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 300; max-width: calc(100vw - 32px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  background: #E6EDF3; color: #0F0F11; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.has-act { display: flex; align-items: center; gap: 12px; text-align: left; width: max-content; }
#toast.show.has-act { pointer-events: auto; }
.toast-act { flex: none; min-height: 36px; padding: 6px 10px; margin: -4px -8px -4px 0; border-radius: 8px; font-weight: 800; color: #4C2DB8; white-space: nowrap; }
.toast-act:active { background: rgba(76, 45, 184, .12); }
body.playing #toast { top: calc(var(--safe-t) + 68px); bottom: auto; transform: translate(-50%, -16px); }
body.playing #toast.show { transform: translate(-50%, 0); }
#update { position: fixed; z-index: 150; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 8px); background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 10px 16px; border-radius: 99px; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); white-space: nowrap; }

/* ---------- player ---------- */
.player { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.p-tap { position: absolute; inset: 0; }
.p-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; transition: opacity .25s;
  background: linear-gradient(180deg, rgba(0, 0, 0, .65) 0, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, .75) 100%); }
.player.ui-off .p-ui { opacity: 0; }
.player.ui-off .p-ui * { pointer-events: none !important; }
.p-ui > * { pointer-events: auto; }
.p-top { display: flex; align-items: center; gap: 4px; padding: calc(var(--safe-t) + 4px) calc(var(--safe-r) + 8px) 0 calc(var(--safe-l) + 8px); }
.p-titles { flex: 1; min-width: 0; padding: 0 6px; }
.p-title { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-sub { font-size: 13px; color: #cfd8e3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; flex: none; }
.p-btn:active, .p-big:active { background: rgba(255, 255, 255, .15); }
.p-center { display: flex; align-items: center; justify-content: center; gap: 36px; pointer-events: none; }
.p-center > * { pointer-events: auto; }
.p-big { position: relative; width: 64px; height: 64px; border-radius: 32px; display: grid; place-items: center; }
.p-big .ic { width: 36px; height: 36px; }
.p-big span { position: absolute; font-size: 10px; font-weight: 800; top: 26px; }
.p-play { width: 76px; height: 76px; border-radius: 38px; background: rgba(255, 255, 255, .14); }
.p-play .ic { width: 40px; height: 40px; }
.p-bottom { padding: 0 calc(var(--safe-r) + 14px) calc(var(--safe-b) + 6px) calc(var(--safe-l) + 14px); }
.p-times { display: flex; justify-content: space-between; font-size: 13px; font-variant-numeric: tabular-nums; color: #dfe7ef; }
.p-seek { width: 100%; height: 36px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; }
.p-seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
.p-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 9px; background: var(--accent); margin-top: -7px; }
.p-row { display: flex; align-items: center; gap: 2px; }
.p-spacer { flex: 1; }
.p-chip { min-width: 52px; height: 36px; padding: 0 10px; border-radius: 18px; background: rgba(255, 255, 255, .14); font-weight: 700; font-size: 14px; }
.p-spinner { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .25); border-top-color: var(--accent); animation: spin .8s linear infinite; pointer-events: none; }
.p-pop { position: absolute; right: calc(var(--safe-r) + 14px); bottom: calc(var(--safe-b) + 112px); z-index: 2; max-width: calc(100vw - 28px); transition: bottom .25s; }
/* v1.9.6: with the controls up, Skip intro / Next episode sit above the bar, never on it */
.player:not(.ui-off) .p-pop { bottom: calc(var(--safe-b) + 180px); }
.p-skip { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.p-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 12px; background: rgba(20, 28, 38, .92); border: 1px solid rgba(255, 255, 255, .25); font-weight: 700; color: #fff; }
.p-pill .ic { width: 18px; height: 18px; }
.p-pill.primary { background: #fff; color: #0F0F11; border-color: #fff; }
.p-next { background: rgba(20, 28, 38, .94); border: 1px solid rgba(255, 255, 255, .2); border-radius: 14px; padding: 12px; width: 280px; max-width: 100%; }
.p-next-t { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); font-weight: 800; }
.p-next-l { font-weight: 700; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-next-c { font-size: 13px; color: #cfd8e3; min-height: 18px; }
.p-next-b { display: flex; gap: 8px; margin-top: 8px; }
.p-next-b .p-pill.primary { flex: 1; justify-content: center; }
.p-cues { position: absolute; left: 5%; right: 5%; bottom: calc(var(--safe-b) + 7%); z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; transition: bottom .25s; }
.player:not(.ui-off) .p-cues { bottom: calc(var(--safe-b) + 172px); }
.p-cue { max-width: 100%; background: rgba(0, 0, 0, .62); color: #fff; padding: 3px 10px; border-radius: 6px; font-size: clamp(16px, 4.6vw, 28px); line-height: 1.3; text-align: center; white-space: pre-line; text-shadow: 0 1px 2px #000; }
.p-msg { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); background: rgba(0, 0, 0, .7); padding: 10px 14px; border-radius: 10px; }
video::cue { background: rgba(0, 0, 0, .55); font-size: 1em; }

@media (orientation: landscape) and (max-height: 500px) {
  .p-pop { bottom: calc(var(--safe-b) + 96px); }
  .player:not(.ui-off) .p-pop { bottom: calc(var(--safe-b) + 158px); }
  .player:not(.ui-off) .p-cues { bottom: calc(var(--safe-b) + 150px); }
  .hero { height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- v1.1: best-3 streams, Infuse, MyAnimeList + AniList ---------- */
.tag.violet { color: var(--violet); background: rgba(185, 164, 255, .14); }
.tag.warn { color: var(--danger); background: rgba(248, 113, 113, .12); }
.streams.rest { margin-bottom: 4px; }
.show-all { color: var(--muted); border-style: dashed; }
.ib-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.violet { background: var(--violet); color: var(--violet-ink); border-color: var(--violet); }

.list.track .svc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.list.track .svc:first-child { border-top: 0; }
.svc-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.svc-text .muted { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.login[disabled] { opacity: .6; color: var(--muted); }
.list-row > span.row-text { flex-direction: column; align-items: flex-start; gap: 2px; }
.row-text small { color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.3; }
.hint { margin: 8px calc(var(--pad) + 4px) 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.hint .link { font-size: 14px; }
.hint.warn { color: var(--amber); }
.track-aiom { margin-top: 12px; }

.malst-select:disabled { opacity: .6; }
/* v1.9.6: the season's MyAnimeList box: the title on its own line, status and score side by side under it (roomy on
   a phone); on a wide screen all three on one line */
.malst { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 10px; margin: 14px 0 0; padding: 12px 14px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), transparent 70%), var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.malst-label { grid-column: 1 / -1; min-width: 0; display: flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: 15px; }
.malst-label small { min-width: 0; color: var(--muted); font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.malst-select { width: 100%; min-width: 0; min-height: 46px; font-size: 16px; font-weight: 600; background: var(--surface2); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.malst-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 255, 255, .2); }
.malst-select.malst-score { color: #FACC15; }
.malst-open { margin-left: auto; flex: none; font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.malst-open:hover, .malst-open:focus-visible { background: rgba(255, 255, 255, .22); }
@media (min-width: 720px) { .malst-label .malst-open { margin: 4px 0 0; justify-self: start; } }
@media (min-width: 720px) {
  .malst { grid-template-columns: minmax(0, 1fr) 220px 170px; align-items: center; }
  .malst-label { grid-column: auto; display: grid; }
}

.who-cell { display: grid; justify-items: center; gap: 8px; }
.who-track { min-height: 32px; padding: 4px 10px; font-size: 13px; white-space: nowrap; }

.authcopy { max-width: 520px; margin: 0 auto; padding: calc(var(--safe-t) + 28px) var(--pad) calc(var(--safe-b) + 32px); display: grid; gap: 14px; text-align: center; }
.authcopy h1 { margin: 0; font-size: 23px; line-height: 1.25; }
.authcopy p { margin: 0; }
.field.code { min-height: 108px; resize: none; font-family: ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; text-align: left; }
.steps { margin: 0; padding-left: 22px; text-align: left; color: var(--muted); display: grid; gap: 4px; }
.field.paste { min-height: 96px; resize: none; font-family: ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; margin-bottom: 6px; }
.player.pending .p-center, .player.pending .p-bottom, .player.pending .p-top [data-p]:not([data-p=close]) { visibility: hidden; }

/* ---------- v1.2: MyAnimeList prompt ---------- */
.sheet-link { display: block; margin: 4px auto 0; min-height: 40px; padding: 8px 12px; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.sheet.mal-prompt .sheet-title { font-size: 20px; line-height: 1.25; }
.sheet.mal-prompt .sheet-sub { color: var(--text); opacity: .86; font-size: 15px; line-height: 1.45; margin-bottom: 14px; }
.row-text small.inline { display: inline; }

/* ---------- v1.3: accounts, the owner's network, PINs ---------- */
.tabbar .pf-dot { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #2A0606; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.center { text-align: center; }
.small { font-size: 13px; }
.pad-x { margin-left: var(--pad); margin-right: var(--pad); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #2A0606; font-size: 12px; font-weight: 800; vertical-align: 1px; }
.list-head .count { margin-left: 6px; }

.auth { max-width: 460px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: calc(var(--safe-t) + 12px) calc(var(--pad) + 4px) calc(var(--safe-b) + 28px);
  display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.auth.welcome, .auth.wait, .auth.pin-ask, .auth.pin-screen { justify-content: center; align-items: center; text-align: center; }
.auth.welcome .setup-hero { margin-bottom: 4px; }
.auth.welcome .setup-logo { width: 92px; height: 92px; border-radius: 22px; }
.auth.welcome .setup-hero h1 { font-size: 34px; letter-spacing: -.01em; }
.auth-top { display: flex; align-items: center; min-height: 44px; margin-left: -8px; }
.auth-title { margin: 4px 0 0; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
.auth.wait .auth-title, .auth.pin-ask .auth-title, .auth.pin-screen .auth-title, .code-screen .auth-title { text-align: center; }
.auth > p { margin: 0; line-height: 1.45; }
.auth-form { display: grid; gap: 14px; margin-top: 6px; }
.field-label { display: grid; gap: 6px; }
.field-label > span:first-child { font-size: 14px; font-weight: 600; color: var(--muted); }
.field-hint { margin: -8px 2px 0; min-height: 18px; font-size: 13px; color: var(--muted); }
.field-hint.ok { color: var(--accent); }
.pw { position: relative; display: block; }
.pw .field { width: 100%; padding-right: 72px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 12px; border-radius: 8px; color: var(--violet); font-size: 14px; font-weight: 650; }
.auth-form .error { margin: -4px 2px 0; font-size: 14px; line-height: 1.4; }
.auth-alt { text-align: center; color: var(--muted); font-size: 15px; margin-top: 4px; }
.auth-alt .link, .auth-links .link { font-size: 15px; }
.auth-actions { display: grid; gap: 10px; width: 100%; margin-top: 10px; }
.auth-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-top: 6px; }
.auth-links .link { min-height: 44px; color: var(--muted); }
.note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .3); color: var(--text); font-size: 14px; text-align: left; }
.note .ic { width: 18px; height: 18px; color: var(--accent); }
.auth-icon { width: 64px; height: 64px; margin: 6px auto 0; border-radius: 20px; display: grid; place-items: center; background: rgba(185, 164, 255, .14); color: var(--violet); }
.auth-icon .ic { width: 32px; height: 32px; }
.code-input { text-align: center; font: 700 30px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .32em; padding: 14px 10px 14px calc(10px + .32em); }
.code-input::placeholder { color: var(--line); }

.wait-ring { position: relative; display: grid; place-items: center; width: 132px; height: 132px; margin-bottom: 6px; }
.wait-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 30px; border: 2px solid rgba(185, 164, 255, .55); animation: ring 2.4s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.82); opacity: 1; } 100% { transform: scale(1.12); opacity: 0; } }
.auth.pin-ask .wait-ring::before { animation: none; opacity: .5; transform: none; }
.ring-lock { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 19px; display: grid; place-items: center; background: var(--violet); color: var(--violet-ink); border: 3px solid var(--bg); }
.ring-lock .ic { width: 18px; height: 18px; }

.pin-screen { gap: 12px; }
.pin-dots { display: flex; justify-content: center; gap: 18px; margin: 10px 0 2px; }
.pin-dots i { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--muted); transition: background .12s, border-color .12s; }
.pin-dots i.on { background: var(--text); border-color: var(--text); }
.pin-dots.shake { animation: shake .38s; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.pin-err { min-height: 21px; margin: 0; font-size: 14px; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 22px; justify-content: center; margin-top: 4px; }
.pin-key { width: 76px; height: 76px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--line); font-size: 30px; font-weight: 500; display: grid; place-items: center; }
.pin-key:active { background: var(--line); }
.pin-key.ghost { background: transparent; border-color: transparent; font-size: 16px; color: var(--muted); }
.pin-key.ghost .ic { width: 28px; height: 28px; }
@media (max-height: 600px) { .pin-pad { grid-template-columns: repeat(3, 64px); gap: 10px 20px; } .pin-key { width: 64px; height: 64px; font-size: 26px; } .pin-screen .avatar.lg { width: 48px; height: 48px; font-size: 22px; } }

.who-tile.dim .avatar { opacity: .5; }
.who-av { position: relative; display: block; }
.who-lock { position: absolute; right: -6px; bottom: -6px; width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; background: var(--surface2); color: var(--text); border: 3px solid var(--bg); }
.who-lock .ic { width: 16px; height: 16px; }
.who-tile .who-sub { margin-top: -6px; font-size: 12px; color: var(--muted); max-width: 120px; text-align: center; line-height: 1.25; }
.sheet-name { margin: 8px 0 2px; font-size: 18px; font-weight: 700; text-align: center; }

.list.people { padding: 2px 0; }
.people .person, .list .person { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.people .person:first-child, .list .person:first-child { border-top: 0; }
.person-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.person-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-text .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-acts { display: flex; gap: 8px; flex: none; }
.empty-line { margin: 0; padding: 14px; font-size: 14px; }
.list-row > span.row-text > span { display: flex; align-items: center; gap: 10px; }
.me h2 .tag { vertical-align: 3px; margin-left: 4px; }
/* full-screen account screens (no tab bar): toasts at the top, clear of the buttons and the PIN pad */
body.no-tabs #toast { top: calc(var(--safe-t) + 14px); bottom: auto; transform: translate(-50%, -16px); }
body.no-tabs #toast.show { transform: translate(-50%, 0); }
@media (max-width: 359px) {
  .person { flex-wrap: wrap; }
  .person-acts { flex-basis: 100%; justify-content: flex-end; }
}

/* ---------- v1.4: sideways full screen that keeps Skip Intro / Next, Next button, MyAnimeList pacing, Library lists ---------- */
/* On a portrait screen (Portrait Orientation Lock on, or the phone held upright) the player turns sideways itself.
   Its left edge is then the top of the phone (the notch) and its right edge the bottom (the home indicator). */
@media (orientation: portrait) {
  .player.p-land { inset: auto; top: 0; left: 100vw; width: 100vh; height: 100vw; transform-origin: 0 0; transform: rotate(90deg);
    --safe-l: env(safe-area-inset-top, 0px); --safe-r: env(safe-area-inset-bottom, 0px); --safe-t: 0px; --safe-b: 0px; }
  .player.p-land .p-pop { bottom: 96px; max-width: calc(100vh - 28px); }
  .player.p-land:not(.ui-off) .p-pop { bottom: 158px; }
  .player.p-land:not(.ui-off) .p-cues { bottom: 150px; }
  .player.p-land .p-cue { font-size: clamp(16px, 4.6vh, 28px); }
  body.p-landed #toast { top: 50%; bottom: auto; left: 0; right: auto; transform: translate(calc(-50% + 36px), -50%) rotate(90deg); }
  body.p-landed #toast.show { transform: translate(calc(-50% + 44px), -50%) rotate(90deg); }
}
.p-nextbtn { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }
.p-nextbtn .ic { width: 18px; height: 18px; }
.p-nextbtn[hidden] { display: none; }

.mal-next-note { margin: -4px 0 12px; font-size: 13px; color: var(--accent); font-weight: 600; }
.ep.up-next .ep-main { box-shadow: inset 3px 0 0 var(--accent); }
.up-next-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; vertical-align: 1px; }

.chips.mal-tabs { padding-top: 0; }
.chip.mal { border-color: rgba(46, 81, 162, .55); }
.chip.mal.on { background: #2e51a2; border-color: #2e51a2; color: #fff; }
.lib-count { margin: 4px 16px 8px; font-size: 13px; color: var(--muted); }

/* ---------- v1.4: top picks (IMAX → 4K → 1080p + the best that plays here, all on the first screen), Outplayer ---------- */
.picks { display: grid; gap: 8px; padding: 0 var(--pad); }
.pick { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-height: 66px; }
.pick.here { border-color: rgba(255, 255, 255, .42); }
.pick.outp { border-color: rgba(185, 164, 255, .42); }
.pick-main { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 8px 2px 8px 10px; text-align: left; }
.pick-main:active { background: var(--surface2); }
.pick-q { flex: none; width: 60px; height: 48px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 18px; letter-spacing: .2px; background: var(--surface2); color: var(--text); }
.pick-q.long { font-size: 13px; }
.pick-q.imax { background: linear-gradient(140deg, #2563EB, #0EA5E9); color: #fff; font-size: 15px; letter-spacing: .8px; }
.pick-text { min-width: 0; display: grid; gap: 1px; }
.pick-app { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; }
.pick-app .ic { width: 15px; height: 15px; }
.pick.here .pick-app { color: var(--accent); }
.pick.outp .pick-app { color: var(--violet); }
.pick.try .pick-app { color: #60A5FA; }
.pick-bits, .pick-name { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-bits { color: #C4C4CC; }
.pick .icon-btn { width: 38px; color: var(--muted); }
.pick .stream-dl { margin-right: 4px; }
.outp-nudge { margin: 10px var(--pad) 0; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(185, 164, 255, .4); background: rgba(185, 164, 255, .07); display: grid; gap: 8px; }
.outp-nudge p { margin: 0; font-size: 13px; line-height: 1.4; }
.btn.outp { background: var(--violet); color: var(--violet-ink); border-color: var(--violet); }
.streams-note.after { margin-top: 10px; }
.stream.outp { border-left-color: var(--violet); }
.stream.outp .stream-name { color: var(--violet); }
.stream-side { display: flex; flex-direction: column; justify-content: center; align-items: center; padding-right: 2px; }
.stream-side .icon-btn { width: 40px; height: 40px; color: var(--muted); }
.stream-side .stream-dl { margin-right: 0; }
.tag.q { color: var(--text); background: rgba(230, 237, 243, .1); }
.tag.q.imax { color: #fff; background: #2563EB; }
.tag.outp { color: var(--violet); background: rgba(185, 164, 255, .14); }

/* ---------- v1.4: Home categories (per profile) ---------- */
.he-row { display: flex; align-items: center; gap: 0; min-height: 56px; padding: 4px 4px 4px 14px; border-top: 1px solid var(--line); }
.he-row:first-child { border-top: 0; }
.he-row.off .he-text { opacity: .55; }
.he-text { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 4px 0; }
.he-text b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.he-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.he-row .icon-btn { width: 40px; height: 44px; color: var(--muted); }
.he-row .icon-btn[disabled] { opacity: .25; }
.he-genres .list-row .ok { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.he-genres .list-row .ic, .list-row > .ic { width: 18px; height: 18px; color: var(--muted); }

/* ---------- v1.4: Add to Home Screen ---------- */
.install-card { display: flex; align-items: center; gap: 12px; margin: 12px var(--pad) 4px; padding: 10px 6px 10px 12px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(185, 164, 255, .10)); border: 1px solid rgba(255, 255, 255, .35); }
.install-card.welcome { margin: 0 0 18px; width: 100%; max-width: 420px; padding-right: 12px; }
.install-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); color: var(--accent); flex: none; }
.install-text { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; }
.install-text b { font-size: 15px; }
.install-text small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.install-card .icon-btn { width: 36px; height: 36px; color: var(--muted); }
.install-guide { position: fixed; inset: 0; z-index: 80; background: rgba(5, 8, 12, .74); display: flex; align-items: flex-end; justify-content: center;
  padding: calc(var(--safe-t) + 16px) 12px calc(var(--safe-b) + 84px); opacity: 0; transition: opacity .2s; }
.install-guide.open { opacity: 1; }
.ig-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 16px 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.ig-head { display: flex; gap: 12px; align-items: center; }
.ig-head img { width: 52px; height: 52px; border-radius: 12px; }
.ig-head h3 { margin: 0 0 2px; font-size: 17px; }
.ig-head p { margin: 0; font-size: 13px; }
.ig-steps { margin: 14px 0 8px; padding-left: 22px; display: grid; gap: 10px; font-size: 15px; line-height: 1.5; }
.kbd { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--surface2); border: 1px solid var(--line); vertical-align: -8px; }
.kbd .ic { width: 16px; height: 16px; }
.ig-note { font-size: 13px; margin: 6px 0 12px; }
.ig-actions { display: flex; gap: 8px; justify-content: flex-end; }
.ig-arrow { position: fixed; width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent); z-index: 81; animation: igbob 1.1s ease-in-out infinite; }
.ig-arrow .ic { width: 42px; height: 42px; }
.ig-arrow.br { right: 12px; bottom: calc(var(--safe-b) + 16px); }
.ig-arrow.bc { left: calc(50% - 22px); bottom: calc(var(--safe-b) + 16px); }
.ig-arrow.tr { right: 12px; top: calc(var(--safe-t) + 8px); rotate: 180deg; animation-name: igbobup; }
@keyframes igbob { 0%, 100% { translate: 0 0; } 50% { translate: 0 8px; } }
@keyframes igbobup { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .ig-arrow { animation: none; } }

/* ---------- v1.4: picture in picture — Aperature's mini player (and iPhone's own) ---------- */
.p-mini-ui, .p-mini-pip { display: none; }
.player.p-mini { inset: auto; width: min(58vw, 340px); height: auto; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; z-index: 60; touch-action: none;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .08); }
.player.p-mini[data-corner=br] { right: calc(var(--safe-r) + 12px); bottom: calc(var(--tab-h) + var(--safe-b) + 12px); }
.player.p-mini[data-corner=bl] { left: calc(var(--safe-l) + 12px); bottom: calc(var(--tab-h) + var(--safe-b) + 12px); }
.player.p-mini[data-corner=tr] { right: calc(var(--safe-r) + 12px); top: calc(var(--safe-t) + 64px); }
.player.p-mini[data-corner=tl] { left: calc(var(--safe-l) + 12px); top: calc(var(--safe-t) + 64px); }
.player.p-mini.p-dragging { box-shadow: 0 18px 50px rgba(0, 0, 0, .75), 0 0 0 2px var(--accent); }
.player.p-mini .p-ui, .player.p-mini .p-pop, .player.p-mini .p-cues, .player.p-mini .p-msg { display: none; }
.player.p-mini .p-mini-ui { display: flex; position: absolute; left: 0; right: 0; bottom: 0; justify-content: flex-end; gap: 2px; padding: 4px; pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.player.p-mini .p-mini-ui > button { pointer-events: auto; }
.p-mbtn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 18px; color: #fff; }
.p-mbtn .ic { width: 20px; height: 20px; }
.p-mbtn:active { background: rgba(255, 255, 255, .18); }
.player.p-pipped .p-mini-pip { display: flex; position: absolute; left: 0; right: 0; top: 0; bottom: 40px; align-items: center; justify-content: center; gap: 6px;
  padding: 0 10px; font-size: 12px; text-align: center; color: rgba(255, 255, 255, .82); pointer-events: none; }
.player.p-pipped .p-mini-pip .ic { width: 18px; height: 18px; }
body.p-mini-on #view { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 20px + 150px); }

/* ---------- v1.5: Play → the best file in your app (the scan line under Play, Playback apps, the file list's why) ---------- */
.play-scan { display: flex; align-items: center; gap: 8px; width: 100%; margin: -4px 0 12px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; color: var(--muted); text-align: left; line-height: 1.35; }
.play-scan[hidden] { display: none; }
.play-scan > span:not(.ps-files):not(.spinner) { flex: 1; min-width: 0; }
.play-scan b { color: var(--text); font-weight: 650; }
.play-scan > .ic { width: 16px; height: 16px; flex: none; color: var(--accent); }
.play-scan .spinner { width: 14px; height: 14px; border-width: 2px; flex: none; }
.play-scan .ps-files { flex: none; display: inline-flex; align-items: center; color: var(--accent); font-weight: 650; }
.play-scan .ps-files .ic { width: 16px; height: 16px; }
.play-scan:active { background: var(--surface2); }
.pl-row { border-top: 1px solid var(--line); padding: 6px 4px 8px 10px; }
.pl-row:first-child { border-top: 0; }
.pl-main { display: flex; align-items: center; gap: 2px; min-height: 48px; }
.pl-num { flex: none; width: 24px; height: 24px; margin-right: 8px; border-radius: 12px; display: grid; place-items: center; font-size: 13px; font-weight: 800;
  background: rgba(255, 255, 255, .16); color: var(--accent); }
.pl-row.off .pl-num { background: var(--surface2); }
.pl-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.pl-text b { font-size: 15px; font-weight: 650; }
.pl-text b small { color: var(--muted); font-weight: 500; font-size: 13px; }
.pl-text > small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.pl-row.off .pl-text { opacity: .55; }
.pl-main .icon-btn { width: 36px; height: 44px; color: var(--muted); flex: none; }
.pl-main .icon-btn[disabled] { opacity: .25; }
.pl-main .switch { margin-left: 4px; }
.pl-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 2px 6px 0 32px; font-size: 13px; }
.pl-state { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.pl-state.yes { color: var(--accent); }
.pl-state.no { color: var(--amber); }
.pl-state .ic { width: 15px; height: 15px; }
.pl-foot .link { min-height: 30px; font-size: 13px; }
.pl-foot .btn.small { min-height: 30px; padding: 4px 12px; font-size: 13px; }
.pl-skip { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.sheet.pl-setup .list { margin-left: 0; margin-right: 0; }
.sheet.pl-setup .hint { margin-left: 4px; margin-right: 4px; }
.why-note { margin: 0 var(--pad) 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(240, 179, 106, .45); background: rgba(240, 179, 106, .08); display: grid; gap: 8px; }
.why-note p { margin: 0; font-size: 13px; line-height: 1.4; }

/* ---------- v1.5: each season's own MyAnimeList status, on its season button ---------- */
.chip.has-st { flex-direction: column; align-items: flex-start; gap: 1px; border-radius: 14px; padding: 5px 14px 6px; }
.chip.has-st .chip-top { display: inline-flex; align-items: center; gap: 6px; }
.chip-st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.chip-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-st.watching, .chip-st.rewatching { color: #4ADE80; }
.chip-st.completed { color: #7DA2FF; }
.chip-st.on_hold { color: #F9D457; }
.chip-st.dropped { color: #F87171; }
.chip-st.plan_to_watch { color: #C3CBD6; }
.chip-st.none { color: var(--muted); font-weight: 600; }
.chip-st.none::before { background: transparent; border: 1px solid currentColor; }
.chip.on .chip-st { color: var(--accent-ink); }

/* ---------- v1.5: other people's MyAnimeList lists (Library) ---------- */
.chips.mal-who { padding-top: 0; padding-bottom: 6px; align-items: center; }
.mal-who-label { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-right: 2px; }
.chip.mal-person { padding-left: 6px; }
.chip-av { width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center; background: var(--av, var(--accent)); color: #0F0F11; font-size: 12px; font-weight: 800; flex: none; }
.chip.mal-person.on { background: #2e51a2; border-color: #2e51a2; color: #fff; }
.lib-count .muted { font-size: 12px; }

/* ---------- v1.5: light mode (Profile › Appearance) ---------- */
html[data-theme=light] {
  --bg: #F4F6F9; --surface: #FFFFFF; --surface2: #EBEFF4; --line: #D6DEE8; --text: #0F1722; --muted: #566577;
  --accent: #0B8577; --accent-ink: #FFFFFF; --amber: #A85F06; --danger: #CC3535; --violet: #5E3FD6; --violet-ink: #FFFFFF;
  color-scheme: light;
}
html[data-theme=light] .top { background: rgba(244, 246, 249, .88); border-bottom-color: rgba(15, 23, 34, .08); }
html[data-theme=light] .tabbar { background: rgba(255, 255, 255, .94); border-top-color: rgba(15, 23, 34, .08); }
html[data-theme=light] .icon-btn.glass { background: rgba(255, 255, 255, .7); }
html[data-theme=light] .hero::after { background: linear-gradient(180deg, rgba(244, 246, 249, .2) 0%, rgba(244, 246, 249, .1) 40%, var(--bg) 100%); }
html[data-theme=light] .detail-desc, html[data-theme=light] .stream-detail, html[data-theme=light] .pick-bits { color: #2E3B4B; }
html[data-theme=light] .ep-ov { color: #4A5868; }
html[data-theme=light] .poster .ph { color: #9AA9BA; }
html[data-theme=light] .poster .badge { background: rgba(255, 255, 255, .9); color: var(--text); }
html[data-theme=light] .tag.q { background: rgba(15, 23, 34, .07); }
html[data-theme=light] .tag.teal, html[data-theme=light] .sheet-btn.primary { background: rgba(11, 133, 119, .1); }
html[data-theme=light] .pick.try .pick-app { color: #1D5FD1; }
html[data-theme=light] .stream.g1 { border-left-color: #1D5FD1; }
html[data-theme=light] .swatch.on { border-color: var(--text); }
html[data-theme=light] .pick-q.imax, html[data-theme=light] .tag.q.imax { color: #fff; }
html[data-theme=light] #toast { background: #0F1722; color: #F4F6F9; }
html[data-theme=light] .toast-act { color: #9FE8DD; }
html[data-theme=light] .chip-st.watching, html[data-theme=light] .chip-st.rewatching { color: #15803D; }
html[data-theme=light] .chip-st.completed { color: #1D4ED8; }
html[data-theme=light] .chip-st.on_hold { color: #A16207; }
html[data-theme=light] .chip-st.dropped { color: #B91C1C; }
html[data-theme=light] .chip-st.plan_to_watch { color: #475569; }
html[data-theme=light] .chip.on .chip-st { color: var(--accent-ink); }
/* the status bar stays light-on-dark (iPhone keeps it that way for Home Screen apps), so a dark strip under it */
html[data-theme=light] body::after { content: ""; position: fixed; left: 0; right: 0; top: 0; height: var(--safe-t); background: #0F1722; z-index: 999; pointer-events: none; }

/* ---------- v1.5: your background (Profile › Background) ---------- */
body.has-bg::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--user-bg) center / cover no-repeat; opacity: .32; pointer-events: none; }
body.has-bg { background: linear-gradient(180deg, rgba(15, 15, 17, .55), rgba(15, 15, 17, .9)) fixed, var(--bg); }
html[data-theme=light] body.has-bg { background: linear-gradient(180deg, rgba(244, 246, 249, .55), rgba(244, 246, 249, .92)) fixed, var(--bg); }
html[data-theme=light] body.has-bg::before { opacity: .22; }
body.has-bg #view { background: transparent; }

/* ---------- v1.5: profile pictures, Profile rows ---------- */
.avatar.photo { position: relative; overflow: hidden; }
.avatar.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pic-row { cursor: pointer; }
.pic-thumb { width: 40px; height: 40px; border-radius: 10px; background: var(--surface2) center / cover no-repeat; border: 1px solid var(--line); flex: none; }
.pic-thumb.bg { width: 64px; border-radius: 8px; }
.list-row.sub-row { min-height: 40px; padding-top: 4px; padding-bottom: 4px; border-top: 0; justify-content: flex-end; font-size: 13px; }
.small-note { font-size: 12px; text-align: right; max-width: 40%; }
.install-btn { min-height: 36px; padding: 6px 12px 6px 10px; gap: 6px; background: rgba(255, 255, 255, .14); color: var(--accent); border-color: rgba(255, 255, 255, .4); }
html[data-theme=light] .install-btn { background: rgba(11, 133, 119, .1); border-color: rgba(11, 133, 119, .35); }
.install-btn .ic { width: 18px; height: 18px; }
.grid-form { display: grid; gap: 12px; }
.hint .ic { width: 15px; height: 15px; vertical-align: -3px; margin-right: 2px; }
.roku-steps { margin: 6px var(--pad) 10px; padding-left: 22px; display: grid; gap: 12px; line-height: 1.5; }

/* ---------- v1.5: keyboard and remote focus (computers, TVs) ---------- */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.card:focus-visible { outline: none; }
.card:focus-visible .poster { outline: 3px solid var(--accent); outline-offset: 2px; }
.list-row:focus-visible, .sheet-btn:focus-visible, .pick-main:focus-visible, .stream-main:focus-visible { outline-offset: -3px; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 300; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
/* v1.17.9: only when Tab brought it (the Windows app handing the keyboard back to the page focused it too, and it
   sat over the logo) */
html[data-tabbed] .skip-link:focus { top: calc(var(--safe-t) + 8px); }

/* ---------- v1.5: computers — a side rail for the tabs, wider rows, hover ---------- */
@media (min-width: 900px) {
  html[data-layout=desktop], html[data-layout=tv] { --tab-w: 92px; --pad: 28px; }
  html[data-layout=desktop] .tabbar, html[data-layout=tv] .tabbar {
    top: 0; right: auto; bottom: 0; width: var(--tab-w); flex-direction: column; justify-content: flex-start; gap: 6px;
    padding: calc(var(--safe-t) + 18px) 0 18px; border-top: 0; border-right: 1px solid var(--line);
  }
  html[data-layout=desktop] .tabbar a, html[data-layout=tv] .tabbar a { flex: none; height: 72px; border-radius: 14px; margin: 0 10px; font-size: 12px; }
  html[data-layout=desktop] #view, html[data-layout=tv] #view { padding-left: var(--tab-w); padding-bottom: 40px; max-width: none; }
  html[data-layout=desktop] body.no-tabs #view, html[data-layout=tv] body.no-tabs #view { padding-left: 0; }
  html[data-layout=desktop] .page { max-width: 1480px; margin: 0 auto; }
  html[data-layout=desktop] .card { width: 150px; }
  html[data-layout=desktop] .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; }
  html[data-layout=desktop] .detail, html[data-layout=desktop] .picks, html[data-layout=desktop] .streams, html[data-layout=desktop] .list,
  html[data-layout=desktop] [data-slot=players], html[data-layout=desktop] .lead, html[data-layout=desktop] .hint { max-width: 980px; }
  html[data-layout=desktop] .list, html[data-layout=desktop] .lead, html[data-layout=desktop] .hint { margin-left: var(--pad); }
  html[data-layout=desktop] .sheet { bottom: 24px; max-width: 560px; border-radius: 18px; border: 1px solid var(--line); padding-bottom: 14px; transform: translateY(calc(100% + 40px)); }
  html[data-layout=desktop] .hero { height: 46vh; }
  html[data-layout=desktop] .player.p-mini { width: 420px; }
  html[data-layout=desktop] .scroller { scrollbar-width: thin; }
}
@media (hover: hover) and (pointer: fine) {
  .card:hover .poster { transform: scale(1.03); box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
  .poster { transition: transform .15s ease, box-shadow .15s ease; }
  .list-row:hover, .pick-main:hover, .stream-main:hover, .sheet-btn:hover { background: var(--surface2); }
  .btn:hover { filter: brightness(1.08); }
  .tabbar a:hover { color: var(--text); }
  button, a, label.list-row, .chip { cursor: pointer; }
}

/* ---------- v1.5: TVs (Fire TV, Android TV, TV browsers) — 10-foot sizes, a big clear focus ---------- */
html[data-layout=tv] { font-size: 20px; --pad: 40px; }
html[data-layout=tv] body { font-size: 20px; }
html[data-layout=tv] .top-title { font-size: 34px; }
html[data-layout=tv] .brand { font-size: 30px; }
html[data-layout=tv] .row-head h2 { font-size: 26px; }
html[data-layout=tv] .card { width: 190px; }
html[data-layout=tv] .card-name { font-size: 18px; }
html[data-layout=tv] .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 28px 20px; }
html[data-layout=tv] .btn, html[data-layout=tv] .chip, html[data-layout=tv] .list-row { min-height: 60px; font-size: 20px; }
html[data-layout=tv] .icon-btn { width: 60px; height: 60px; }
html[data-layout=tv] :focus-visible, html[data-layout=tv] :focus { outline: 4px solid var(--accent); outline-offset: 3px; }
html[data-layout=tv] .card:focus .poster { outline: 5px solid var(--accent); outline-offset: 3px; transform: scale(1.06); }
html[data-layout=tv] .card:focus { outline: none; }
html[data-layout=tv] .scroller { overflow-x: auto; scroll-snap-type: none; }
html[data-layout=tv] .install-btn, html[data-layout=tv] .install-card, html[data-layout=tv] .ep-more { display: none; }
html[data-layout=tv] .sheet { bottom: 32px; max-width: 760px; border-radius: 20px; border: 1px solid var(--line); transform: translateY(calc(100% + 50px)); }
html[data-layout=tv] .sheet-btn { min-height: 72px; }
html[data-layout=tv] .sheet-btn .sb-label { font-size: 22px; }
@media (prefers-reduced-motion: reduce) { .poster, .card:hover .poster, html[data-layout=tv] .card:focus .poster { transition: none; transform: none; } }

/* ---------- v1.5: the player with a mouse, a keyboard, a TV remote ---------- */
.player.ui-off { cursor: none; }
html[data-layout=tv] .p-btn { width: 64px; height: 64px; }
html[data-layout=tv] .p-big { width: 88px; height: 88px; }
html[data-layout=tv] .p-play { width: 104px; height: 104px; border-radius: 52px; }
html[data-layout=tv] .p-chip { height: 52px; min-width: 72px; font-size: 18px; border-radius: 26px; }
html[data-layout=tv] .p-title { font-size: 24px; }
html[data-layout=tv] .p-sub, html[data-layout=tv] .p-times { font-size: 18px; }
html[data-layout=tv] .player :focus { outline: 4px solid #fff; outline-offset: 3px; }
html[data-layout=tv] .p-seek:focus { outline-offset: 8px; }
html[data-layout=tv] .p-cue { font-size: clamp(22px, 3.4vw, 44px); }
/* moving with a remote: what's focused clears the sticky header and the screen's edge */
html[data-layout=tv] #view :is(a, button, input, select, textarea, [tabindex]) { scroll-margin: 96px 40px 40px; }
@media (min-width: 1500px) {
  html[data-layout=tv] { font-size: 26px; }
  html[data-layout=tv] .card { width: 250px; }
  html[data-layout=tv] .card-name { font-size: 22px; }
  html[data-layout=tv] .grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  html[data-layout=tv] .row-head h2 { font-size: 32px; }
  html[data-layout=tv] .btn, html[data-layout=tv] .chip, html[data-layout=tv] .list-row { min-height: 72px; font-size: 24px; }
}

/* ---------- v1.5: the calendar, a game, your teams ---------- */
#view:focus { outline: none; }
.tabbar [data-tab=calendar] { display: none; }
html[data-layout=desktop] .tabbar [data-tab=calendar], html[data-layout=tv] .tabbar [data-tab=calendar] { display: flex; }
@media (min-width: 900px) { html[data-layout=desktop] .cal-btn, html[data-layout=tv] .cal-btn { display: none; } }
.cal-day { margin-bottom: 4px; }
.cal-date { margin-top: 16px; }
.cal-item { gap: 12px; }
.cal-thumb { width: 44px; height: 60px; flex: none; border-radius: 8px; overflow: hidden; background: var(--surface2); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--muted); }
.cal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cal-thumb.logo { width: 44px; height: 44px; border-radius: 50%; background: var(--surface2); }
.cal-thumb.logo img { object-fit: contain; padding: 5px; }
.cal-thumb.small { width: 34px; height: 34px; }
.cal-time { flex: none; font-size: 13px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cal-time .ic { width: 15px; height: 15px; }
.pill.live { color: #fff; background: #DC2626; }
.pill.live .ic { width: 14px; height: 14px; }
.pill.new { color: var(--accent-ink); background: var(--accent); }
.cal-progress { margin-top: 4px; }
.cal-note { margin: 12px var(--pad) 0; }
.cal-note span { flex: 1; }
.cal-skel .row-text { flex: 1; }
.skeleton-line { display: block; height: 12px; width: 60%; border-radius: 6px; background: var(--surface2); }
.cal-day.past .cal-item { opacity: .82; }
.team-row.on { background: rgba(255, 255, 255, .08); }
html[data-theme=light] .team-row.on { background: rgba(11, 133, 119, .08); }
.team-row .ic:last-child { color: var(--accent); }
/* a game's page */
.game-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 14px var(--pad) 16px; padding: 18px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.game-team { display: grid; justify-items: center; gap: 6px; text-align: center; min-width: 0; }
.game-team b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.game-team small, .game-mid small { color: var(--muted); font-size: 12px; }
.game-logo { width: 64px; height: 64px; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; font-weight: 800; color: var(--muted); overflow: hidden; }
.game-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.game-mid { display: grid; justify-items: center; gap: 4px; text-align: center; }
.game-time { font-size: 20px; }
.game-score { font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
/* Home's "Coming up": a game shows the other team's logo */
.game-card .poster.logo { background: var(--surface2); display: grid; place-items: center; }
.game-card .poster.logo img { position: static; width: 70%; height: auto; aspect-ratio: 1; object-fit: contain; }
.poster .badge.live { background: #DC2626; color: #fff; }
html[data-layout=tv] .cal-thumb { width: 60px; height: 82px; }
html[data-layout=tv] .cal-thumb.logo { width: 60px; height: 60px; }
html[data-layout=tv] .cal-time { font-size: 18px; }
html[data-layout=tv] .game-logo { width: 96px; height: 96px; }
html[data-layout=tv] .game-team b { font-size: 24px; }
html[data-layout=tv] .game-time { font-size: 28px; }

/* ---------- v1.5: Home's header fits a phone (install, calendar, Home categories, profile) ---------- */
.top .brand { min-width: 0; flex: 0 1 auto; overflow: hidden; }
.top .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .brand img { flex: none; }
@media (max-width: 430px) {
  .top .install-btn span { display: none; }
  .top .install-btn { padding: 0; width: 44px; height: 44px; min-height: 0; justify-content: center; border-radius: 22px; }
  .top .icon-btn, .top .avatar-btn { width: 40px; }
  .top { gap: 4px; }
}
@media (max-width: 360px) { .top .brand span { display: none; } }

/* ---------- v1.5: Continue Watching on a computer — a small ⋯ over the card changes the file ---------- */
.card-wrap { position: relative; flex: none; scroll-snap-align: start; }
.card-more { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center;
  background: rgba(15, 15, 17, .72); color: #fff; opacity: .85; transition: opacity .15s, background .15s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card-more .ic { width: 18px; height: 18px; }
.card-more:hover, .card-more:focus-visible { opacity: 1; background: var(--accent); color: var(--accent-ink); }
html[data-layout=desktop] .card-wrap .card { width: 150px; }

/* ---------- v1.5: the owner's announcements ---------- */
.news-item { align-items: flex-start; }
.news-item .row-text { gap: 4px; }
.news-body, .news-sheet .news-body { white-space: pre-line; overflow-wrap: anywhere; color: var(--text); font-size: 14px; line-height: 1.45; }
.news-sheet .news-body { margin: 4px 4px 12px; font-size: 15px; }
.grid-form textarea.field { min-height: 110px; resize: vertical; font: inherit; }

/* v1.5: languages per show; files named as other episodes */
.title-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.title-langs .tl { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.title-langs .tl > span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.title-langs .tl > span .ic { width: 14px; height: 14px; }
.title-langs select { width: 100%; min-width: 0; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line, rgba(255,255,255,.12)); background: var(--surface2); color: var(--text); font: inherit; font-size: 14px; }
.tag.warn { color: var(--amber); background: rgba(240, 179, 106, .14); }
.tag.lang { color: var(--violet); background: rgba(185, 164, 255, .14); }
.wrong-ep .stream { opacity: .72; }
@media (max-width: 360px) { .title-langs { grid-template-columns: 1fr; } }
html[data-layout=tv] .title-langs select { font-size: 20px; padding: 12px 14px; }
.row-btns { display: grid; gap: 10px; }

/* v1.5.1: subtitle size (Profile), sleep timer */
.p-cue { font-size: calc(clamp(16px, 4.6vw, 28px) * var(--cue-scale, 1)); }
/* v1.9.8: the profile's subtitle look */
.p-cue { color: var(--cue-color, #fff); opacity: var(--cue-op, 1); }
.player[data-cue-bg=none] .p-cue { background: transparent; text-shadow: -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000, 0 2px 6px rgba(0,0,0,.9); }
.player[data-cue-bg=solid] .p-cue { background: #000; }
.player[data-cue-bg=plain] .p-cue { background: transparent; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }   /* v1.13.4: just the words */
.sub-preview { display: block; margin: 0 14px 12px; padding: 18px 12px; border-radius: 12px; text-align: center; background: linear-gradient(135deg, #2b3a55, #5b3b4d); }
.sub-preview span { padding: 3px 10px; border-radius: 6px; font-weight: 600; font-size: 18px; }
/* v1.12.5: subtitle opacity slider */
.op-row { display: flex; align-items: center; gap: 12px; }
.op-row input[type=range] { flex: 1; min-width: 120px; accent-color: var(--accent, #5eead4); }
.op-row output { min-width: 44px; text-align: right; font-weight: 650; }
.player.p-land .p-cue { font-size: calc(clamp(16px, 4.6vh, 28px) * var(--cue-scale, 1)); }
html[data-layout=tv] .p-cue { font-size: calc(clamp(22px, 3.4vw, 44px) * var(--cue-scale, 1)); }
.p-sleep { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 58px); right: 14px; z-index: 6; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; font-weight: 650; }
.player.ui-off .p-sleep:not(.last) { opacity: 0; transition: opacity .3s; }
.p-sleep.last { background: rgba(20, 24, 32, .86); font-size: 15px; }
.player.p-slept video { filter: brightness(.25); transition: filter 2s; }

/* v1.5.1: the remote */
.rm-status { display: flex; align-items: center; justify-content: center; gap: 8px; }
.rm-status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.rm-status.on .dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 255, 255, .18); }
.rm { display: grid; gap: 18px; max-width: 360px; margin: 10px auto 18px; padding: 0 16px; }
.rm-row { display: flex; gap: 12px; justify-content: center; }
.rm-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 260px; margin: 0 auto; }
.rm-btn { min-height: 64px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font: inherit; font-weight: 750; font-size: 18px; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.rm-btn:active { transform: scale(.96); background: var(--surface); }
.rm-btn.ok { border-radius: 50%; background: var(--accent); color: #062421; font-size: 20px; aspect-ratio: 1; }
.rm-btn.small { flex: 1; min-height: 52px; font-size: 15px; }
.rm-btn.wide { flex: 2; min-height: 56px; font-size: 16px; }

/* ---------------------------------------------------------------- v1.5.1: the look, refined
   One bold thing: the ambient wash — the artwork you're about to watch glows behind the top of Home. Everything
   else stays quiet: deeper surfaces, softer edges, a single teal light for focus. */
:root { --glow: rgba(255, 255, 255, .28); --shadow: 0 10px 28px rgba(0, 0, 0, .45); --ease: cubic-bezier(.2, .8, .2, 1); }
#ambient { position: fixed; inset: 0 0 auto 0; height: min(78vh, 720px); z-index: 0; pointer-events: none; opacity: 0; transition: opacity .6s var(--ease); overflow: hidden; }
body.ambient-on #ambient { opacity: 1; }
#ambient img { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(48px) saturate(1.5) brightness(.8); opacity: 0; transition: opacity .9s var(--ease); transform: translateZ(0);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%); }
#ambient img.on { opacity: .55; }
html[data-theme=light] #ambient img.on { opacity: .35; filter: blur(48px) saturate(1.3) brightness(1.1); }
#view { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { #ambient, #ambient img { transition: none; } }

/* headings: tighter, weightier */
.row-head h2 { font-weight: 780; letter-spacing: -.012em; }
.top-title, .detail-title, .brand { letter-spacing: -.02em; }

/* posters: depth, and a teal light when chosen */
.poster { box-shadow: 0 6px 16px rgba(0, 0, 0, .35); transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.poster::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); pointer-events: none; }
@media (hover: hover) {
  .card:hover .poster { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, .55), 0 0 0 2px var(--glow); }
  .card:hover .card-name { color: #fff; }
}
.card:focus-visible .poster { outline: none; box-shadow: 0 0 0 3px var(--accent), 0 0 28px var(--glow); }

/* Continue Watching: wider, landscape-feeling cards with the progress bar as a light strip */
[data-slot=cw] .bar { height: 5px; background: rgba(255, 255, 255, .16); }
[data-slot=cw] .bar i { box-shadow: 0 0 10px var(--accent); }

/* buttons and sheets: softer, deeper */
.btn.primary { box-shadow: 0 8px 22px rgba(255, 255, 255, .22); }
.sheet { box-shadow: 0 -18px 50px rgba(0, 0, 0, .55); }

/* title page on computers and TVs: a cinematic hero */
html[data-layout=desktop] .hero, html[data-layout=tv] .hero { height: min(52vw, 560px); background-position: center 18%; }
html[data-layout=desktop] .hero::after, html[data-layout=tv] .hero::after { background: linear-gradient(90deg, rgba(15, 15, 17, .85) 0%, rgba(15, 15, 17, .35) 45%, rgba(15, 15, 17, 0) 70%), linear-gradient(180deg, rgba(15, 15, 17, .1) 0%, var(--bg) 100%); }
html[data-layout=desktop] .detail, html[data-layout=tv] .detail { margin-top: -220px; position: relative; z-index: 2; max-width: 980px; }
html[data-layout=desktop] .detail-poster, html[data-layout=tv] .detail-poster { box-shadow: var(--shadow); border-radius: 14px; }

/* TV: a 10-foot living-room look — bigger art, a glowing highlight, calmer chrome */
html[data-layout=tv] .card { width: 212px; }
html[data-layout=tv] .scroller { gap: 22px; padding-top: 14px; padding-bottom: 22px; }
html[data-layout=tv] .row { margin-top: 26px; }
html[data-layout=tv] .row-head h2 { font-size: 30px; }
html[data-layout=tv] .card:focus .poster { outline: none; transform: scale(1.09); box-shadow: 0 0 0 5px var(--accent), 0 0 46px var(--glow), 0 18px 40px rgba(0, 0, 0, .6); }
html[data-layout=tv] .card:focus .card-name { color: #fff; font-weight: 700; }
html[data-layout=tv] .card .card-name { transition: color .2s; color: var(--muted); }
html[data-layout=tv] #ambient { height: 100vh; }
html[data-layout=tv] #ambient img.on { opacity: .7; }
html[data-layout=tv] .tabbar { background: rgba(15, 15, 17, .72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-right: 1px solid rgba(255, 255, 255, .05); }
html[data-layout=tv] .tabbar a:focus, html[data-layout=tv] .tabbar a[aria-current=page] { background: rgba(255, 255, 255, .14); color: var(--accent); outline: none; box-shadow: inset 3px 0 0 var(--accent); }
html[data-layout=tv] .list-row:focus, html[data-layout=tv] .btn:focus, html[data-layout=tv] .chip:focus, html[data-layout=tv] .sheet-btn:focus { outline: none; box-shadow: 0 0 0 4px var(--accent), 0 0 30px var(--glow); }
html[data-layout=tv] .ep:focus-within { background: rgba(255, 255, 255, .04); border-radius: 14px; }
html[data-layout=tv] .p-pop .p-pill { font-size: 22px; padding: 16px 28px; border-radius: 40px; }
html[data-layout=tv] .p-pop .p-pill:focus { box-shadow: 0 0 0 5px var(--accent), 0 0 40px var(--glow); outline: none; }
html[data-layout=tv] .card .card-name { margin-top: 16px; }

/* v1.5.1: browse by category */
.browse { padding: 6px 0 20px; }
.browse-h { font-size: 18px; font-weight: 780; letter-spacing: -.012em; margin: 10px var(--pad) 10px; }
.browse .chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--pad); margin-bottom: 12px; }
.browse .chips.kinds .chip { font-weight: 700; }
.browse .chip.on { background: var(--accent); color: var(--accent-ink, #062421); border-color: transparent; }
.browse .chip .ic { width: 16px; height: 16px; margin-right: 4px; }
html[data-layout=tv] .browse-h { font-size: 30px; }

/* v1.6: invite codes */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.invite-form { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
/* v1.12.11: the invite code, up front on the waiting screen */
.invite-form.invite-card { margin-top: 18px; padding: 16px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 14px; background: rgba(255, 255, 255, .07); display: grid; gap: 10px; }
.invite-card .field-label > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.invite-card .field-label .ic { width: 18px; height: 18px; color: var(--accent); }
.or-line { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; color: var(--muted); font-size: 13px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line, rgba(255,255,255,.1)); }
html[data-theme=light] .invite-form.invite-card { background: rgba(13, 148, 136, .06); border-color: rgba(13, 148, 136, .3); }
.invite-code { width: 100%; text-align: center; font-size: 15px; padding: 14px 10px; margin: 6px 0 10px; user-select: all; -webkit-user-select: all; }
/* v1.6: Trakt */
.trakt-code { font-size: 34px; font-weight: 700; letter-spacing: .18em; text-align: center; margin: 10px 0 16px; padding: 14px; border-radius: 14px; background: var(--card, rgba(255,255,255,.06)); user-select: all; -webkit-user-select: all; }
/* v1.6: service status */
.services { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.services .svc { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 10px; border-radius: 999px; background: var(--card, rgba(255,255,255,.06)); }
.services .svc small { opacity: .7; }
.services .svc i { width: 8px; height: 8px; border-radius: 50%; background: #8a8f98; box-shadow: 0 0 0 3px rgba(138,143,152,.18); }
.services .svc.up i { background: #2fd27a; box-shadow: 0 0 0 3px rgba(47,210,122,.2); }
.services .svc.slow i { background: #f5b83d; box-shadow: 0 0 0 3px rgba(245,184,61,.2); }
.services .svc.down i { background: #ff5a5f; box-shadow: 0 0 0 3px rgba(255,90,95,.2); }
.trakt-list { margin-top: 10px; }
/* v1.6: Recommend to… */
.rec-people { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.rec-person { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 999px; background: var(--card, rgba(255,255,255,.06)); cursor: pointer; }
.rec-person input { position: absolute; opacity: 0; pointer-events: none; }
.rec-person:has(input:checked) { background: var(--accent, #7c5cff); color: #fff; }
.rec-note { width: 100%; margin-bottom: 8px; }
.rec-card { display: flex; flex-direction: column; gap: 4px; }
.rec-note-text { font-size: 12px; opacity: .8; max-width: 140px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rate-sheet .sheet-btn .sb-label { letter-spacing: .12em; color: #f5b83d; }
/* v1.7: watch together */
.p-party { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 58px); left: 50%; transform: translateX(-50%); z-index: 6; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff; background: rgba(124, 92, 255, .85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: none; white-space: nowrap; }
.party-join { padding: 40px 16px; }

/* v1.10: live categories editor */
.lc-list { display: grid; gap: 12px; padding: 0 16px; }
.lc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 8px; }
.lc-card.off { opacity: .6; }
.lc-head { display: flex; align-items: center; gap: 8px; }
.lc-name { flex: 1; min-width: 0; font-weight: 700; }
.lc-words { width: 100%; resize: vertical; font-size: 15px; }
.lc-note { margin: 0; color: var(--muted); font-size: 14px; }
.lc-count { color: var(--accent); font-weight: 600; }

/* v1.12.7: History */
.hist-list .list-head.hist-day { margin: 14px 14px 6px; }
.hist { display: flex; align-items: center; gap: 4px; padding-right: 4px; border-top: 1px solid var(--line); }
.hist-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 14px; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.hist-art { position: relative; flex: none; width: 54px; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--surface2); }
.hist-art img { width: 100%; height: 100%; object-fit: cover; }
.hist-art .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); }
.hist-art .bar i { display: block; height: 100%; background: var(--accent); }
.hist-art .hist-play, .hist-art .watched { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.25); color: #fff; }
.hist-art .ic { width: 22px; height: 22px; }
.hist-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hist-text b, .hist-text span, .hist-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-text span { font-size: 14px; }
.hist-text small { color: var(--muted); font-size: 12.5px; }
.tabbar a span { white-space: nowrap; }

/* v1.12.8: iPhone — the tab bar and the page header stay put while scrolling fast. WebKit on iOS could draw them
   (and a stale strip of the page) in the wrong place mid-scroll when they blur what's behind them: on iPhone they
   get their own layer and a near-solid background instead of the live blur, and the hidden ambient wash is off. */
@supports (-webkit-touch-callout: none) {
  .tabbar, .top {
    -webkit-backdrop-filter: none; backdrop-filter: none;
    -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
    will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  }
  .tabbar { background: rgba(15, 15, 17, .985); }
  .top { background: rgba(15, 15, 17, .97); }
  html[data-theme=light] .tabbar { background: rgba(255, 255, 255, .985); }
  body:not(.ambient-on) #ambient { visibility: hidden; }
}

/* v1.12.11: the calendar as cards */
.cal-cards { display: grid; gap: 10px; padding: 0 var(--pad); }
.cal-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; color: inherit; font: inherit; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.cal-card:hover { background: var(--surface2); border-color: rgba(255, 255, 255, .35); }
.cal-card:active { transform: scale(.99); }
.cal-art { position: relative; flex: none; width: 132px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface2); }
.cal-art img { width: 100%; height: 100%; object-fit: cover; }
.cal-badge { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .3px; }
.cal-badge.live { left: auto; right: 6px; top: 6px; bottom: auto; background: #e5484d; }
.cal-art.matchup { display: flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(115deg, var(--c1) 0%, var(--c1) 48%, var(--c2) 52%, var(--c2) 100%); }
.cal-art.matchup::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.35)); }
.cal-art.matchup i { position: relative; z-index: 1; font-style: normal; font-size: 11px; font-weight: 800; color: rgba(255,255,255,.85); text-transform: uppercase; }
.cal-team { position: relative; z-index: 1; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.cal-team img { width: 78%; height: 78%; object-fit: contain; }
.cal-team b { font-size: 11px; color: #111; }
.cal-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cal-info b { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-info small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; background: var(--surface2); color: var(--text); font-size: 12.5px; font-weight: 750; white-space: nowrap; }
.cal-chip .ic { width: 14px; height: 14px; }
.cal-chip.new { background: var(--accent); color: var(--accent-ink); }
.cal-chip.live { background: #e5484d; color: #fff; }
.cal-chip.done { color: var(--muted); }
.cal-day.past .cal-card { opacity: .8; }
@media (min-width: 900px) {
  .cal-cards { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
  .cal-art { width: 168px; }
}
@media (max-width: 420px) {
  .cal-art { width: 112px; }
  .cal-team { width: 34px; height: 34px; }
  .cal-card { gap: 11px; padding: 8px; }
}
html[data-layout=tv] .cal-art { width: 220px; }
html[data-layout=tv] .cal-info b { font-size: 22px; }
html[data-layout=tv] .cal-info small, html[data-layout=tv] .cal-chip { font-size: 17px; }
html[data-layout=tv] .cal-card:focus { outline: 4px solid var(--accent); outline-offset: 2px; }
html[data-theme=light] .cal-card { background: #fff; }

/* v1.12.11: live categories stand apart from the rest of Home — a red-edged panel and a pulsing LIVE tag */
.live-row { position: relative; margin: 22px 10px 10px; padding: 12px 0 6px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(220, 38, 38, .14), rgba(220, 38, 38, .03) 70%); border: 1px solid rgba(220, 38, 38, .28); }
.live-row .row-head { padding: 0 calc(var(--pad) - 10px); align-items: center; }
.live-row .scroller { padding-left: calc(var(--pad) - 10px); padding-right: calc(var(--pad) - 10px); }
.live-tag { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 2px 7px; border-radius: 6px; background: #DC2626; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; line-height: 16px; margin-right: 2px; vertical-align: 1px; }
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: livePulse 1.6s ease-in-out infinite; }
.he-text b .live-tag { margin-right: 6px; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-tag i { animation: none; } }
html[data-theme=light] .live-row { background: linear-gradient(180deg, rgba(220, 38, 38, .09), rgba(220, 38, 38, .02) 70%); }
/* v1.12.12: the volume boost chip beside mute (shows when it's on) */
.p-chip.p-boost { color: var(--accent); border-color: rgba(255, 255, 255, .45); }

/* =====================================================================================================================
   v1.13: the Miruro look — near-black neutrals, Karla, white "Watch Now" buttons, an icon rail on computers with the
   search bar across the top, a big hero on Home, posters with EP badges and small chips, a schedule-style calendar.
   (Layered over everything above; the light theme keeps its own colours.)
   ===================================================================================================================== */
@font-face { font-family: "Karla"; src: url("fonts/karla.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
:root {
  --bg: #0F0F11; --surface: #18181B; --surface2: #202024; --line: #2A2A30; --text: #EDEDEF; --muted: #93939C;
  --accent: #F4F4F5; --accent-ink: #0B0B0C; --glow: rgba(255, 255, 255, .08); --radius: 10px;
  --live-dot: #4ADE80; --soon-dot: #F59E0B;
}
body { font-family: "Karla", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif; letter-spacing: .005em; }
html:not([data-theme=light]) body { background: var(--bg); }
.btn { border-radius: 8px; font-weight: 700; }
.btn.primary { background: #fff; color: #0B0B0C; border-color: #fff; box-shadow: none; }
.btn.primary:hover { filter: none; background: #E4E4E7; }
.chip { border-radius: 8px; }
.chip.on { background: #fff; color: #0B0B0C; border-color: #fff; }
.link, .ok, .mal-note { color: var(--text); }
.field { border-radius: 8px; background: var(--surface); }
.field:focus { border-color: #52525B; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
.panel, .list, .sheet { border-color: var(--line); }
.row-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.row-type { font-size: 12px; }

/* posters: square-ish corners, a soft shade at the bottom for "EP 4 · 7h ago", chips under them, bold names */
.poster { border-radius: 8px; }
.pov { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px;
  padding: 26px 8px 7px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .82)); color: #fff; font-size: 11.5px; font-weight: 800; pointer-events: none; }
.pov small { font-size: 11px; font-weight: 700; opacity: .92; }
.poster:has(.pov) .bar { bottom: 0; z-index: 2; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.card-meta i { font-style: normal; font-size: 10.5px; font-weight: 700; line-height: 1; padding: 4px 6px; border-radius: 5px; background: var(--surface2); color: var(--muted); white-space: nowrap; }
.card-name { font-weight: 750; font-size: 13.5px; margin-top: 6px; }
.card-meta + .card-name { margin-top: 6px; }
@media (hover: hover) and (pointer: fine) {
  .card:hover .poster { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 0, 0, .5); }
  .card:hover .card-name { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .25); text-underline-offset: 3px; }
}

/* the search bar across the top (computers) */
.top-search { display: none; }
@media (min-width: 900px) {
  html[data-layout=desktop] .top { position: sticky; }
  html[data-layout=desktop] .top-search { display: flex; align-items: center; gap: 10px; position: absolute; left: 50%; top: calc(var(--safe-t) + 10px); transform: translateX(-50%);
    width: min(420px, 38vw); height: 38px; padding: 0 12px; border-radius: 8px; background: rgba(24, 24, 27, .78); border: 1px solid var(--line); color: var(--muted);
    font-size: 14px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); z-index: 5; }
  html[data-layout=desktop] .top-search .ic { order: 2; margin-left: auto; width: 18px; height: 18px; }
  html[data-layout=desktop] .top-search:hover { border-color: #3F3F46; color: var(--text); }
}

/* the icon rail (computers): icons only, the one you're on a white square — like Miruro's */
.rail-logo { display: none; }
@media (min-width: 900px) {
  html[data-layout=desktop] { --tab-w: 72px; }
  html[data-layout=desktop] .tabbar { background: var(--bg); border-right: 1px solid rgba(255, 255, 255, .04); gap: 4px; padding-top: calc(var(--safe-t) + 14px); align-items: center; }
  html[data-layout=desktop] .rail-logo { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; }
  html[data-layout=desktop] .rail-logo img { width: 32px; height: 32px; border-radius: 8px; }
  html[data-layout=desktop] .tabbar a { width: 44px; height: 44px; margin: 0; border-radius: 10px; color: #A1A1AA; gap: 0; }
  html[data-layout=desktop] .tabbar a span { display: none; }
  html[data-layout=desktop] .tabbar a .ic { width: 21px; height: 21px; }
  html[data-layout=desktop] .tabbar a.on { background: #fff; color: #0B0B0C; }
  html[data-layout=desktop] .tabbar a:hover:not(.on) { background: var(--surface2); color: #fff; }
  html[data-layout=desktop] .tabbar a[data-tab=profile] { margin-top: auto; }
  html[data-layout=desktop] .tabbar .dl-dot, html[data-layout=desktop] .tabbar .pf-dot { top: -2px; left: auto; right: -4px; }
}
/* phones: the bottom bar in the same neutrals, the tab you're on in white */
.tabbar a.on { color: #fff; }
html[data-theme=light] .tabbar a.on { color: #0B0B0C; }

/* ---- Home's hero ---- */
.hx { position: relative; height: clamp(420px, 62vh, 760px); margin: 0 0 8px; overflow: hidden; isolation: isolate; }
#view { position: relative; }
body:has(.hx) .home-top { position: absolute; top: 0; left: 0; right: 0; }
@media (min-width: 900px) { html[data-layout=desktop] body:has(.hx) .home-top { left: var(--tab-w); } }
.hx-bg { position: absolute; inset: 0; z-index: -1; }
.hx-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; animation: hxIn .8s ease both; }
.hx-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(15, 15, 17, .92) 0%, rgba(15, 15, 17, .55) 38%, rgba(15, 15, 17, 0) 70%), linear-gradient(180deg, rgba(15, 15, 17, .35) 0%, rgba(15, 15, 17, 0) 30%, rgba(15, 15, 17, .2) 60%, var(--bg) 100%); }
.hx-body { position: absolute; left: var(--pad); right: var(--pad); bottom: 54px; max-width: 560px; display: grid; gap: 14px; animation: hxUp .6s ease both; }
.hx-logo { max-width: min(330px, 70vw); max-height: 150px; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .5)); }
.hx-title { margin: 0; font-size: clamp(28px, 4.2vw, 48px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; text-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.hx-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.hx-pills span { padding: 5px 11px; border-radius: 99px; background: rgba(39, 39, 42, .75); border: 1px solid rgba(255, 255, 255, .08); font-size: 12px; font-weight: 700; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hx-desc { margin: 0; color: #D4D4D8; font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hx-acts { display: flex; gap: 8px; }
.hx-acts .btn { min-height: 42px; padding: 0 18px; }
.hx-watch { background: #fff; color: #0B0B0C; border-color: #fff; }
.hx-watch:hover { background: #E4E4E7; }
.hx-more, .hx-add { background: rgba(39, 39, 42, .82); border-color: rgba(255, 255, 255, .06); }
.hx-add { width: 42px; padding: 0 !important; justify-content: center; }
.hx-dots { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 6px; }
.hx-dots button { width: 14px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); padding: 0; min-height: 0; transition: width .25s ease, background .25s ease; }
.hx-dots button.on { width: 30px; background: #fff; }
@keyframes hxIn { from { opacity: .3; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@keyframes hxUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hx-bg img, .hx-body { animation: none; } }
@media (max-width: 899px) {
  .hx { height: 74vh; min-height: 460px; max-height: 640px; }
  .hx-bg::after { background: linear-gradient(180deg, rgba(15, 15, 17, .25) 0%, rgba(15, 15, 17, 0) 30%, rgba(15, 15, 17, .55) 62%, var(--bg) 100%); }
  .hx-body { bottom: 40px; }
  .hx-logo { max-height: 110px; }
  .hx-desc { -webkit-line-clamp: 2; font-size: 14px; }
  .hx-acts .btn { flex: 1; }
  .hx-acts .hx-add { flex: none; }
}
@media (min-width: 900px) { html[data-layout=desktop] .hx-body { left: 56px; bottom: 70px; } }
/* Home's header floats over the hero */
.home-top { z-index: 4; }
body:has(.hx) .home-top { background: transparent !important; border-bottom-color: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: none !important; }
body:has(.hx) #ambient { display: none; }
html[data-theme=light] .hx-bg::after { background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0) 30%, rgba(0,0,0,.45) 70%, var(--bg) 100%); }
html[data-theme=light] .hx { color: #fff; }

/* ---- a title's page ---- */
.detail-title { font-weight: 800; letter-spacing: -.02em; }
.detail-info { color: #D4D4D8; font-weight: 600; }
.detail-desc { color: #C4C4CC; line-height: 1.6; }
.detail-actions .btn.primary { padding: 0 20px; }
@media (min-width: 900px) {
  html[data-layout=desktop] .hero { height: 52vh; filter: saturate(1.05); }
  html[data-layout=desktop] .hero::after { background: linear-gradient(180deg, rgba(15, 15, 17, .55) 0%, rgba(15, 15, 17, .45) 40%, var(--bg) 100%); }
  html[data-layout=desktop] .detail { margin-top: -32vh; max-width: 1200px; padding: 0 48px; }
  html[data-layout=desktop] .detail-head { align-items: flex-start; gap: 32px; }
  html[data-layout=desktop] .detail-poster { width: 200px; border-radius: 8px; }
  html[data-layout=desktop] .detail-title { font-size: 46px; margin-top: 8px; }
  html[data-layout=desktop] .detail-info { font-size: 14px; margin-top: 12px; }
  html[data-layout=desktop] .detail-actions { margin-left: 232px; margin-top: -86px; min-height: 48px; }
  html[data-layout=desktop] .detail-actions + .play-scan, html[data-layout=desktop] .detail-actions ~ .mal-next-note, html[data-layout=desktop] .detail-desc { margin-left: 232px; }
  html[data-layout=desktop] .detail-desc { margin-top: 44px; max-width: 640px; }
}

/* ---- the calendar, as Miruro's schedule: compact rows, two across on a computer ---- */
.cal-card { padding: 8px; gap: 12px; border-radius: 10px; }
.cal-art { width: 46px; aspect-ratio: 3 / 4; border-radius: 6px; }
.cal-badge { position: static; display: inline-block; padding: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 700; margin-right: 6px; }
.cal-art .cal-badge { position: absolute; left: 3px; bottom: 3px; padding: 1px 4px; background: rgba(0, 0, 0, .78); color: #fff; font-size: 9.5px; margin: 0; }
.cal-badge.live { left: 3px; top: 3px; right: auto; bottom: auto; background: #e5484d; color: #fff; padding: 1px 4px; }
.cal-art.matchup { width: 92px; aspect-ratio: 16 / 10; gap: 4px; }
.cal-team { width: 30px; height: 30px; }
.cal-info b { font-size: 14px; }
.cal-info small { font-size: 12.5px; }
.cal-chip { padding: 4px 9px; border-radius: 6px; font-size: 12px; }
.cal-chip.new { background: #fff; color: #0B0B0C; }
.cal-date { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.cal-date::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (min-width: 900px) { html[data-layout=desktop] .cal-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
@media (min-width: 1500px) { html[data-layout=desktop] .cal-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* the TV keeps its big focus, now white */
html[data-layout=tv] .tabbar a:focus, html[data-layout=tv] .tabbar a[aria-current=page] { background: #fff; color: #0B0B0C; box-shadow: none; }
html[data-layout=tv] :focus-visible, html[data-layout=tv] :focus { outline-color: #fff; }

/* ---- v1.13: Who's watching, as Crunchyroll lays it out — round faces in a row, art behind that changes with whoever
   you point at, an outlined MANAGE PROFILES ---- */
.who-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--bg); }
.who-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .7s ease, transform 6s ease; }
.who-bg img.on { opacity: .42; transform: scale(1); }
.who-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(15, 15, 17, .35) 0%, rgba(15, 15, 17, .85) 70%, var(--bg) 100%); }
.who { position: relative; z-index: 1; }
.who h1 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; letter-spacing: -.02em; text-shadow: 0 2px 18px rgba(0, 0, 0, .5); }
.who-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 26px; max-width: 760px; }
.who-tile, .who-cell { width: 104px; }
.who-tile .avatar.xl { width: 104px; height: 104px; border-radius: 50%; font-size: 40px; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); transition: box-shadow .18s ease, transform .18s ease; }
.who-tile .avatar.xl { overflow: hidden; }
.who-tile .avatar.xl img { border-radius: 50%; }
.who-tile:hover .avatar.xl, .who-tile:focus-visible .avatar.xl { box-shadow: 0 0 0 3px #fff; transform: scale(1.04); }
.who-tile:focus-visible { outline: none; }
.who-tile .avatar.add { background: rgba(15, 15, 17, .6); border: 2px solid rgba(255, 255, 255, .85); color: #fff; }
.who-tile .who-name { font-weight: 500; font-size: 15px; color: #E4E4E7; }
.who-lock { right: 2px; bottom: 2px; width: 28px; height: 28px; border-width: 2px; }
.who-lock .ic { width: 14px; height: 14px; }
.who > .btn.ghost { margin-top: 18px; min-height: 40px; padding: 0 16px; border: 2px solid #fff; border-radius: 2px; background: transparent; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.who > .btn.ghost:hover { background: #fff; color: #0B0B0C; }
.who-edit { top: 38px; }
@media (max-width: 480px) { .who-tile, .who-cell { width: 92px; } .who-tile .avatar.xl { width: 92px; height: 92px; } .who-grid { gap: 18px 16px; } }

/* v1.13.1: the hero fills the whole window, under the icon rail too (like Miruro); the rail is see-through — just its
   icons over the art — and Home's own logo moves to the rail */
@media (min-width: 900px) {
  html[data-layout=desktop] .hx { width: 100vw; margin-left: calc(-1 * (var(--tab-w) + (100vw - var(--tab-w) - 100%) / 2)); height: clamp(460px, 74vh, 860px); }
  html[data-layout=desktop] .hx-body { left: calc(var(--tab-w) + 56px); }
  html[data-layout=desktop] .tabbar { background: linear-gradient(90deg, rgba(10, 10, 12, .55), rgba(10, 10, 12, 0)); border-right: 0; }
  html[data-layout=desktop] body:not(:has(.hx)) .tabbar { background: transparent; }
  html[data-layout=desktop] .tabbar a { color: rgba(255, 255, 255, .78); }
  html[data-layout=desktop] .tabbar a .ic { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); }
  html[data-layout=desktop] .tabbar a.on .ic { filter: none; }
  html[data-layout=desktop] .tabbar a:hover:not(.on) { background: rgba(255, 255, 255, .1); }
  html[data-layout=desktop] .home-top .brand { visibility: hidden; }
  html[data-layout=desktop] body:has(.hx) .home-top { background: transparent !important; }
}
@media (min-width: 900px) {
  html[data-theme=light][data-layout=desktop] body:not(:has(.hx)) .tabbar a:not(.on) { color: #52525B; }
  html[data-theme=light][data-layout=desktop] body:not(:has(.hx)) .tabbar a .ic { filter: none; }
}
/* v1.13.1: Miruro's proportions — bigger posters on Home; no line under the header anywhere on a computer */
.card { width: 124px; }
@media (min-width: 900px) {
  html[data-layout=desktop] .card { width: 184px; }
  html[data-layout=desktop] .grid { grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 26px 18px; }
  html[data-layout=desktop] .scroller { gap: 18px; }
  html[data-layout=desktop] .row { margin-top: 30px; }
  html[data-layout=desktop] .top { border-bottom-color: transparent; background: rgba(15, 15, 17, .82); }
}
@media (min-width: 1700px) { html[data-layout=desktop] .card { width: 206px; } }

/* v1.13.1: Aperature for Windows — the page is the top edge: drag anywhere along the top, the window buttons in the
   corner (see-through until you point at them), nothing else over the art */
.winbar { position: fixed; top: 0; left: 0; right: 0; height: 0; z-index: 300; }
.win-drag { position: fixed; top: 0; left: 0; right: 138px; height: 32px; app-region: drag; -webkit-app-region: drag; }
.win-btns { position: fixed; top: 0; right: 0; display: flex; app-region: no-drag; -webkit-app-region: no-drag; }
.win-btns button { width: 46px; height: 32px; min-height: 0; padding: 0; display: grid; place-items: center; background: transparent; color: rgba(255, 255, 255, .86);
  font: 10px/1 "Segoe Fluent Icons", "Segoe MDL2 Assets"; border-radius: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.win-btns button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.win-btns .win-close:hover { background: #C42B1C; }
html.win-frame :is(button, a, input, select, textarea, label, [tabindex], .card, .scroller) { app-region: no-drag; -webkit-app-region: no-drag; }
html.win-frame .top { app-region: drag; -webkit-app-region: drag; padding-right: 150px; }
html.win-frame .top-search { top: calc(var(--safe-t) + 10px); }
html.win-frame body.playing .winbar { display: none; }
html[data-theme=light].win-frame .win-btns button { color: #18181B; text-shadow: none; }

/* v1.13.2: Top Airing / Upcoming (Miruro's side boxes): beside Home's rows on a big screen, under them elsewhere */
.home-cols { display: block; }
.home-side { display: grid; gap: 18px; padding: 24px var(--pad) 8px; align-content: start; }
.home-side:empty { display: none; }
.side-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px 12px; background: rgba(24, 24, 27, .5); display: grid; gap: 8px; }
.side-box h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.side-box h3 .ic { width: 16px; height: 16px; }
.side-item { position: relative; display: flex; gap: 12px; align-items: center; width: 100%; padding: 0; border-radius: 8px; overflow: hidden; text-align: left; color: inherit; background: var(--surface); isolation: isolate; }
.side-item::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sb, none) center / cover; opacity: .16; filter: grayscale(1); }
.side-item::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--surface) 30%, transparent); }
.side-item:hover { background: var(--surface2); }
.side-art { flex: none; width: 64px; aspect-ratio: 2 / 3; background: var(--surface2); }
.side-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-text { min-width: 0; display: grid; gap: 7px; padding: 8px 10px 8px 0; }
.side-text b { font-size: 14px; font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-text .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 2px; }
.dot.on { background: #A3E635; } .dot.soon { background: #F59E0B; }
.side-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.side-chips i { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 3px 6px; border-radius: 5px; background: rgba(255, 255, 255, .06); color: var(--muted); }
.side-more { width: 100%; min-height: 34px; border-radius: 8px; background: var(--surface); display: grid; place-items: center; color: var(--muted); }
.side-more .ic { width: 18px; height: 18px; }
@media (min-width: 900px) { html[data-layout=desktop] .home-side { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1200px; } }
@media (min-width: 1400px) {
  html[data-layout=desktop] .home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 8px; align-items: start; }
  html[data-layout=desktop] .home-side { grid-template-columns: 1fr; padding: 30px var(--pad) 0 0; position: sticky; top: 64px; }
}
html[data-theme=light] .side-box { background: rgba(255, 255, 255, .7); }
/* v1.13.2: the rail fully see-through (just icons), as Miruro's */
@media (min-width: 900px) {
  html[data-layout=desktop] .tabbar, html[data-layout=desktop] body:not(:has(.hx)) .tabbar { background: transparent; }
  html[data-layout=desktop] .tabbar a { color: rgba(255, 255, 255, .92); }
  html[data-layout=desktop] .tabbar a .ic { filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .8)); }
  html[data-layout=desktop] .rail-logo img { filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .8)); }
}
/* v1.13.2: the background picker (anime art) and a stronger background, as Miruro shows it */
.bg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 52vh; overflow-y: auto; padding: 4px 0 10px; }
.bg-opt { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface2); padding: 0; border: 2px solid transparent; }
.bg-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-opt.on { border-color: #fff; }
.bg-opt:hover { border-color: rgba(255, 255, 255, .5); }
body.has-bg::before { opacity: .5; filter: saturate(1.05); }
body.has-bg::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(15, 15, 17, .25), rgba(15, 15, 17, .75) 60%, var(--bg)); }
body.has-bg:has(.hx)::before, body.has-bg:has(.hx)::after { display: none; }
@media (min-width: 900px) { html[data-layout=desktop] .bg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* v1.13.2: the volume bar beside mute (computers / TVs; phones set volume with their buttons), the Boost toggle */
.p-vol { width: 96px; height: 36px; margin: 0 2px; -webkit-appearance: none; appearance: none; background: transparent; --p: 100%; }
.p-vol::-webkit-slider-runat-track, .p-vol::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #fff var(--p), rgba(255, 255, 255, .28) var(--p)); }
.p-vol::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .28); }
.p-vol::-moz-range-progress { height: 4px; border-radius: 2px; background: #fff; }
.p-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; margin-top: -4px; }
.p-vol::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.p-vol.hot::-webkit-slider-runnable-track { background: linear-gradient(90deg, #fff 0, #fff calc(var(--p) * .25), #F59E0B calc(var(--p) * .6), #EF4444 var(--p), rgba(255, 255, 255, .28) var(--p)); }
.p-vol.hot::-moz-range-progress { background: linear-gradient(90deg, #fff, #F59E0B 60%, #EF4444); }
.p-chip.p-boost { min-width: 0; font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }
.p-chip.p-boost.on { background: #fff; color: #0B0B0C; }
html[data-layout=touch] .p-vol { display: none; }
@media (max-width: 420px) { .p-chip.p-boost { display: none; } }
/* v1.13.2: Continue Watching ends with "View history" (Miruro's), the ⋯ sits on the poster's corner */
.hist-card .poster { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); display: grid; place-items: center; }
.hist-in { display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.hist-in .ic { width: 22px; height: 22px; }
.hist-card:hover .poster { background: var(--surface2); }
.card-more { top: 8px; right: 8px; background: rgba(0, 0, 0, .55); color: #fff; opacity: 1; }
.card-more:hover, .card-more:focus-visible { background: #fff; color: #0B0B0C; }
.pov b { font-size: 12px; }
/* v1.13.2: the rail is only its floating buttons — no panel, no edge, no blur behind it; no blurred wash on computers */
@media (min-width: 900px) {
  html[data-layout=desktop] .tabbar, html[data-layout=desktop] body:not(:has(.hx)) .tabbar { background: transparent !important; border: 0 !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: none; }
  html[data-layout=desktop] #ambient { display: none; }
  html[data-layout=desktop] .tabbar a { background: rgba(0, 0, 0, .001); }
  html[data-layout=desktop] .tabbar a.on { background: #fff; }
  html[data-layout=desktop] .tabbar a:hover:not(.on) { background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}
.bg-scroll { max-height: 56vh; overflow-y: auto; padding-bottom: 8px; }
.bg-scroll .bg-grid { max-height: none; overflow: visible; }
.bg-head { margin: 10px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* v1.13.3: the profile's top — a banner of your background, the picture over its edge, name, how you're signed in, your numbers */
.pf-top { position: relative; margin: 0 0 8px; }
.pf-banner { height: 150px; background: var(--pfbg, linear-gradient(135deg, #202024, #141416)) center / cover; border-radius: 0 0 16px 16px; }
.pf-row { display: flex; align-items: flex-end; gap: 16px; padding: 0 var(--pad); margin-top: -44px; flex-wrap: wrap; }
.pf-av { padding: 0; border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.pf-av .avatar.xl { border-radius: 14px; border: 3px solid var(--bg); }
.pf-name { display: grid; gap: 2px; padding-bottom: 6px; }
.pf-name h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.pf-name small { color: var(--muted); font-size: 13px; }
.pf-stats { display: flex; gap: 18px; padding-bottom: 8px; }
.pf-stats span { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.pf-stats span i { grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; color: #C4B5FD; }
.pf-stats span i .ic { width: 18px; height: 18px; }
.pf-stats b { font-size: 16px; line-height: 1.1; }
.pf-stats small { color: var(--muted); font-size: 11.5px; }
.me-slim { padding-top: 6px; padding-bottom: 4px; }
@media (min-width: 900px) { html[data-layout=desktop] .pf-banner { height: 220px; margin: 0 var(--pad); } html[data-layout=desktop] .pf-row { margin-top: -60px; padding: 0 calc(var(--pad) + 24px); } html[data-layout=desktop] .pf-av .avatar.xl { width: 140px; height: 140px; font-size: 56px; } }
/* v1.13.3: My anime list — lists down the side, the table (Miruro's) */
.ml { display: grid; gap: 16px; padding: 8px var(--pad) 24px; }
.ml-side { display: grid; gap: 8px; align-content: start; }
.ml-side h4 { margin: 10px 0 0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ml-lists { display: grid; }
.ml-list { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-weight: 600; text-align: left; }
.ml-list i { width: 7px; height: 7px; border-radius: 50%; }
.ml-list small { margin-left: auto; font-size: 12.5px; }
.ml-list.on { background: var(--surface2); color: var(--text); }
.ml-list:hover { color: var(--text); }
.ml-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.ml-head, .ml-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 56px 80px 64px; align-items: center; gap: 8px; padding: 0 12px; }
.ml-head { height: 36px; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); }
.ml-head span:not(:first-child), .ml-row > span:not(:first-child) { text-align: right; font-size: 12.5px; color: var(--muted); }
.ml-row { width: 100%; min-height: 64px; border-bottom: 1px solid var(--line); color: inherit; text-align: left; }
.ml-row:last-child { border-bottom: 0; }
.ml-row:hover { background: var(--surface2); }
.ml-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ml-title b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-pic { flex: none; width: 46px; height: 46px; border-radius: 6px; background: var(--surface2); overflow: hidden; }
.ml-pic img { width: 100%; height: 100%; object-fit: cover; }
.ml-re { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #34D399; color: #34D399; display: grid; place-items: center; }
.ml-re .ic { width: 14px; height: 14px; }
.ml-count { margin: 8px 0 0; }
@media (max-width: 599px) { .ml-head span:nth-child(2), .ml-row > span:nth-child(2), .ml-head span:nth-child(5), .ml-row > span:nth-child(5) { display: none; } .ml-head, .ml-row { grid-template-columns: minmax(0, 1fr) 48px 70px; } .ml-lists { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { html[data-layout=desktop] .ml { grid-template-columns: 220px minmax(0, 1fr); max-width: 1240px; gap: 28px; padding-top: 18px; } }
/* v1.13.3: room at the end of every page on a computer, so the last row clears the bottom */
@media (min-width: 900px) { html[data-layout=desktop] #view { padding-bottom: 72px; } html[data-layout=desktop] .scroller { scroll-snap-type: none; scroll-behavior: auto; } }
.who-head { margin: 10px 0 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.who-accts { width: min(520px, 100%); margin: 0; }
.btn.danger { background: rgba(239, 68, 68, .18); color: #FCA5A5; border-color: rgba(239, 68, 68, .35); }
/* v1.13.4: the scrub preview above the bar */
.p-bottom { position: relative; }
.p-peek { position: absolute; bottom: 100%; margin-bottom: 4px; transform: translateX(-50%); display: grid; justify-items: center; gap: 4px; pointer-events: none; z-index: 3; }
.p-peek canvas { width: 192px; height: 108px; border-radius: 8px; border: 2px solid rgba(255, 255, 255, .9); background: #000; box-shadow: 0 8px 24px rgba(0, 0, 0, .6); }
.p-peek-t { font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
html[data-layout=touch] .p-peek canvas { width: 144px; height: 81px; }
/* v1.13.4: Trending, Discover and News on computers' rail (phones keep the bottom bar short; they're in Profile and Search) */
.tabbar .tab-wide { display: none; }
@media (min-width: 900px) { html[data-layout=desktop] .tabbar .tab-wide, html[data-layout=tv] .tabbar .tab-wide { display: flex; } }
.tabbar .news-dot, .tabbar .bell-dot { position: absolute; top: -2px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #fff; color: #0B0B0C; font-size: 10px; font-weight: 800; display: grid; place-items: center; }

/* Trending (AniChart's season page) */
.tr-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px var(--pad) 14px; }
.tr-h { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.tr-seasons { display: flex; gap: 22px; margin: 0 auto; }
.tr-season { padding: 8px 2px; font-size: 14px; font-weight: 800; letter-spacing: .14em; color: var(--muted); border-bottom: 2px solid transparent; }
.tr-season.on { color: #fff; border-bottom-color: #fff; }
.tr-right { display: flex; align-items: center; gap: 8px; }
.tr-right .field { width: auto; min-height: 36px; padding: 0 10px; }
.tr-year { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 8px; padding: 0 4px; }
.tr-year b { min-width: 46px; text-align: center; font-size: 14px; }
.tr-year .icon-btn { width: 32px; height: 34px; }
.tr-grid { display: grid; gap: 12px; padding: 0 var(--pad) 24px; }
.tr-card { display: flex; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-height: 160px; }
.tr-pic { flex: none; width: 108px; padding: 0; }
.tr-pic .poster { border-radius: 8px; }
.tr-body { min-width: 0; flex: 1; display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; }
.tr-title { text-align: left; font-size: 15px; font-weight: 800; color: inherit; padding: 0; line-height: 1.25; }
.tr-title:hover { color: #F0ABFC; }
.tr-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.tr-chips span { font-size: 10.5px; font-weight: 700; padding: 3px 6px; border-radius: 5px; background: var(--surface2); color: var(--muted); }
.tr-chips .dot { width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
.dot.done { background: #60A5FA; }
.tr-body p { margin: 0; color: #B4B4BB; font-size: 12.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tr-foot { display: flex; align-items: center; justify-content: space-between; }
.tr-foot small { color: var(--muted); font-size: 11.5px; }
.tr-add { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; }
@media (min-width: 900px) { html[data-layout=desktop] .tr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1400px; } }
@media (min-width: 1400px) { html[data-layout=desktop] .tr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Discover */
.dc-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px var(--pad) 14px; }
.dc-acts { margin-left: auto; display: flex; gap: 8px; }
.dc-acts .btn { min-height: 38px; }
.dc-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 0 var(--pad); }
.dc-big, .dc-side { padding: 0; border-radius: 14px; overflow: hidden; background: var(--surface2); }
.dc-big { aspect-ratio: 16 / 9; border: 1px solid rgba(255, 255, 255, .25); }
.dc-big img, .dc-side img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-side { display: none; aspect-ratio: 2 / 3; }
.dc-side:hover img { filter: brightness(1.1); }
.dc-info { padding: 16px var(--pad) 30px; display: grid; gap: 10px; max-width: 760px; }
.dc-info h3 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.dc-info h3 small { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.dc-info p { margin: 0; color: #C4C4CC; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 900px) {
  html[data-layout=desktop] .dc-stage { grid-template-columns: minmax(0, 2.2fr) minmax(0, .8fr) minmax(0, .8fr); max-height: 62vh; }
  html[data-layout=desktop] .dc-big { aspect-ratio: auto; height: 100%; }
  html[data-layout=desktop] .dc-side { display: block; aspect-ratio: auto; height: 100%; }
  html[data-layout=desktop] .dc-info { max-width: none; }
}
@media (min-width: 900px) { html[data-layout=desktop] .dc-stage { height: min(62vh, 560px); } html[data-layout=desktop] .dc-big, html[data-layout=desktop] .dc-side { height: 100%; min-height: 0; } }
/* v1.13.4: Notifications */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px var(--pad) 12px; scrollbar-width: none; }
.notes .note.new { background: rgba(255, 255, 255, .04); }
.notes .note.new .row-text > span { font-weight: 800; }
.note-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; color: #C4B5FD; }
.note-ic .ic { width: 18px; height: 18px; }
.who-tile.person { padding: 0; border: 0; gap: 8px; }
/* v1.13.5: the schedule (Miruro's): a strip of days, time-of-day groups */
.cal-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px var(--pad) 12px; scrollbar-width: none; }
.cal-dayb { flex: none; display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: center; min-width: 118px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-align: left; color: inherit; }
.cal-dayb b { font-size: 14px; }
.cal-dayb small { grid-column: 1; color: var(--muted); font-size: 11.5px; }
.cal-dayb i { grid-row: 1 / 3; grid-column: 2; font-style: normal; font-size: 11px; font-weight: 800; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--surface2); display: grid; place-items: center; }
.cal-dayb.today { border-color: rgba(255, 255, 255, .5); }
.cal-dayb.today b::after { content: " TODAY"; font-size: 9px; letter-spacing: .08em; color: var(--muted); }
.cal-slot { margin: 10px var(--pad) 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.cal-slot::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cal-day { scroll-margin-top: 72px; }
@media (min-width: 900px) {
  html[data-layout=desktop] .cal-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
  html[data-layout=desktop] .cal-strip { flex-direction: column; overflow: visible; position: sticky; top: 72px; align-self: start; padding-right: 0; }
  html[data-layout=desktop] .cal-dayb { min-width: 0; }
}
/* v1.13.5: a page with its own big heading (Trending, Discover) doesn't repeat it in the top bar */
#view:has(.tr-h) .top-title { visibility: hidden; }
.dc-stage { position: relative; }
.dc-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: rgba(15, 15, 17, .72); color: #fff; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .15); }
.dc-arrow.prev { left: calc(var(--pad) + 8px); } .dc-arrow.next { right: calc(var(--pad) + 8px); }
.dc-arrow .ic { width: 20px; height: 20px; }
.dc-big { border-color: rgba(255, 255, 255, .35); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 50px rgba(0, 0, 0, .5); }
@media (min-width: 900px) { html[data-layout=desktop] .dc-stage { height: min(68vh, 640px); gap: 14px; } }
/* v1.13.6: Home as Miruro's — rows are 7-wide grids on a computer (the page scrolls as one), Continue Watching as wide
   16:9 cards with the episode's own frame */
@media (min-width: 900px) {
  html[data-layout=desktop] .scroller.grid7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 22px 16px; overflow: visible; padding-bottom: 4px; }
  html[data-layout=desktop] .scroller.grid7 .card { width: auto; }
  html[data-layout=desktop] .scroller { scrollbar-width: none; }
  html[data-layout=desktop] .scroller::-webkit-scrollbar { display: none; }
  html[data-layout=desktop] .row-more { margin: 10px var(--pad) 0; min-height: 34px; padding: 0 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
  html[data-layout=desktop] .row-more:hover { color: #fff; background: var(--surface2); }
  html[data-layout=desktop] .row-more .ic { width: 16px; height: 16px; }
  html[data-layout=desktop] .cw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; overflow: visible; }
}
@media (min-width: 1700px) { html[data-layout=desktop] .scroller.grid7 { gap: 26px 20px; } }
.cw-cards { gap: 14px; }
.cw-card { position: relative; flex: none; width: 260px; display: grid; gap: 6px; scroll-snap-align: start; }
.cw-art { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface2); padding: 0; border: 1px solid rgba(255, 255, 255, .06); }
.cw-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.cw-card:hover .cw-art img { transform: scale(1.03); }
.cw-time { position: absolute; right: 8px; bottom: 10px; padding: 2px 6px; border-radius: 5px; background: rgba(0, 0, 0, .8); color: #fff; font-size: 11.5px; font-weight: 800; }
.cw-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .22); }
.cw-bar i { display: block; height: 100%; background: #EF4444; }
.cw-name { text-align: left; font-size: 14.5px; font-weight: 800; color: inherit; padding: 0; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-name:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .3); }
.cw-ep { color: var(--muted); font-size: 12.5px; }
.cw-card .card-more { top: 8px; right: 8px; }
.cw-card.hist-card { display: block; }
.cw-card.hist-card .cw-art { display: grid; place-items: center; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
@media (max-width: 899px) { .cw-card { width: 220px; } }
/* v1.13.6: the Schedule (Miruro's): a column of days with counts, two columns of rows, the pointed-at show's art blurred behind */
.cal-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.cal-bg img { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; opacity: 0; filter: blur(34px) saturate(1.2) brightness(.55); transition: opacity .8s ease; }
.cal-bg img.on { opacity: .5; }
.cal-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 15, 17, .35), rgba(15, 15, 17, .88) 70%, var(--bg)); }
#view:has(.cal-bg) > :not(.cal-bg) { position: relative; z-index: 1; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px var(--pad) 10px; }
.cal-chips { padding: 0; }
.cal-chips .chip { min-height: 32px; padding: 0 12px; border-radius: 6px; font-size: 13px; }
.cal-wrap { padding: 0 var(--pad) 24px; }
.cal-left { display: contents; }
.cal-dayb.past b::after { content: none; }
.cal-card { background: rgba(24, 24, 27, .62); border-color: rgba(255, 255, 255, .06); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cal-card.fresh { border-color: rgba(250, 204, 21, .45); }
.cal-card.fresh:hover { border-color: #FACC15; box-shadow: 0 0 0 1px rgba(250, 204, 21, .35); }
.cal-art { width: 48px; aspect-ratio: 3 / 4; }
.cal-art .cal-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .35); color: #fff; opacity: 0; transition: opacity .15s; }
.cal-art .cal-play .ic { width: 22px; height: 22px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.8)); }
.cal-card:hover .cal-play { opacity: 1; }
.cal-card.fresh .cal-info b { color: #FDE68A; }
.cal-line s { text-decoration: none; opacity: .5; margin: 0 2px; }
.cal-line i { font-style: normal; opacity: .6; }
@media (min-width: 900px) {
  html[data-layout=desktop] .cal-wrap { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; max-width: 1200px; }
  html[data-layout=desktop] .cal-left { display: grid; align-content: start; gap: 4px; position: sticky; top: 72px; }
  html[data-layout=desktop] .cal-strip { display: grid; gap: 4px; padding: 0; overflow: visible; }
  html[data-layout=desktop] .cal-dayb { min-width: 0; background: transparent; border: 0; border-left: 2px solid transparent; border-radius: 0 8px 8px 0; padding: 8px 10px; }
  html[data-layout=desktop] .cal-dayb.on { background: rgba(255, 255, 255, .06); border-left-color: #fff; }
  html[data-layout=desktop] .cal-dayb:hover { background: rgba(255, 255, 255, .04); }
  html[data-layout=desktop] .cal-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-layout=desktop] .cal-slot:first-child { margin-top: 0; }
}
@media (min-width: 1500px) { html[data-layout=desktop] .cal-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } html[data-layout=desktop] .cal-wrap { max-width: 1400px; } }
/* v1.13.6: Who's watching fills the screen — no scroll, the art edge to edge and sharper (less wash, no zoom) */
body:has(.who-bg) { overflow: hidden; }
.who { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; }
.who-bg img { transform: none; filter: saturate(1.05); image-rendering: auto; }
.who-bg img.on { opacity: .62; }
.who-bg::after { background: radial-gradient(ellipse at center, rgba(15, 15, 17, .25) 0%, rgba(15, 15, 17, .72) 68%, rgba(15, 15, 17, .9) 100%); }
.who-grid { gap: 16px 22px; }
@media (max-height: 700px) { .who h1 { font-size: 24px; } .who-tile, .who-cell { width: 84px; } .who-tile .avatar.xl { width: 84px; height: 84px; font-size: 34px; } .who { gap: 14px; } }
/* v1.13.6: notification rows — title, one line, time; the icon on the left where it belongs */
.notes .note { align-items: flex-start; padding: 12px 14px; }
.notes .note .note-ic { margin-top: 2px; }
.note-text { display: grid; gap: 3px; min-width: 0; text-align: left; }
.note-title { font-weight: 800; font-size: 14px; }
.note-body { font-size: 13px; color: #C4C4CC; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: left; }
.notes .note.new .row-text > span { font-weight: inherit; }
.notes .note.new .note-title::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #fff; margin-right: 7px; vertical-align: 2px; }
.notes .note > .ic:last-child { flex: none; margin-top: 10px; color: var(--muted); }
/* v1.13.7: "Keep these downloads?" */
.keep-list { display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; margin-bottom: 10px; }
.keep-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; background: var(--surface2); }
.keep-row input { width: 18px; height: 18px; accent-color: #fff; }
.keep-pic { width: 34px; height: 48px; border-radius: 6px; overflow: hidden; background: var(--surface); flex: none; }
.keep-pic img { width: 100%; height: 100%; object-fit: cover; }
.keep-one { margin: 0 0 12px; font-weight: 700; }
.keep-one small { color: var(--muted); font-weight: 500; margin-left: 6px; }
/* v1.13.7: who's on now (Home, top right) */
.here { display: inline-flex; align-items: center; margin-right: 6px; }
.here-face { position: relative; margin-left: -8px; }
.here-face:first-child { margin-left: 0; }
.here-face .avatar.sm { width: 30px; height: 30px; border-radius: 50%; font-size: 13px; border: 2px solid var(--bg); overflow: hidden; }
.here-face .avatar.sm img { border-radius: 50%; }
.here-face i { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #22C55E; border: 2px solid var(--bg); }
.here-more { margin-left: 4px; font-size: 11px; font-weight: 800; color: var(--muted); }
.pic-thumb.avatar-thumb { width: 44px; height: 44px; border-radius: 50%; background-size: cover; background-position: center 25%; }
.avatar.photo img { object-position: center 25%; }
/* v1.13.7: every Home row (Recommended, Coming up, Library, MyAnimeList lists) is the same 7-wide grid */
.rec-card .link.small { align-self: flex-start; padding: 0; margin-top: 2px; font-size: 13px; color: var(--muted); }
.rec-card .link.small:hover { color: #fff; }
.rec-note-text { max-width: none; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (min-width: 900px) {
  html[data-layout=desktop] .scroller.grid7 .rec-card, html[data-layout=desktop] .scroller.grid7 .game-card { width: auto; min-width: 0; }
  html[data-layout=desktop] .scroller.grid7 .game-card .poster { width: 100%; }
}
.pf-pencil { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: 8px; vertical-align: middle; border-radius: 50%; color: var(--muted); background: rgba(255, 255, 255, .06); }
.pf-pencil:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.pf-pencil .ic { width: 15px; height: 15px; }
/* v1.13.7: Your languages */
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.lang-chip .ic { width: 16px; height: 16px; }
.lang-save { display: grid; gap: 10px; max-width: 420px; }
/* v1.13.8: art search */
.art-search { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: end; padding: 0 2px 8px; }
.art-field { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.art-field .field { min-height: 38px; font-size: 14px; text-transform: none; letter-spacing: 0; }
.art-search .btn { min-height: 38px; }
.art-status { margin: 0 2px 8px; font-size: 13px; }
@media (max-width: 600px) { .art-search { grid-template-columns: 1fr 1fr; } .art-search .btn { grid-column: span 1; } }
/* v1.13.11: the title page on a computer as a real grid — poster in its own column, title, buttons and the
   description beside it — so a long title or a missing poster never puts the buttons over the title */
@media (min-width: 900px) {
  html[data-layout=desktop] .detail { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 32px; align-items: start; }
  html[data-layout=desktop] .detail > * { grid-column: 1 / -1; min-width: 0; }
  html[data-layout=desktop] .detail-head { display: contents; }
  html[data-layout=desktop] .detail-poster { grid-column: 1; grid-row: 1 / span 6; align-self: start; }
  html[data-layout=desktop] .detail-head > div, html[data-layout=desktop] .detail > .detail-actions, html[data-layout=desktop] .detail > .play-scan,
  html[data-layout=desktop] .detail > .mal-next-note, html[data-layout=desktop] .detail > .detail-desc { grid-column: 2; }
  html[data-layout=desktop] .detail-actions, html[data-layout=desktop] .detail-actions + .play-scan, html[data-layout=desktop] .detail-actions ~ .mal-next-note, html[data-layout=desktop] .detail-desc { margin-left: 0; }
  html[data-layout=desktop] .detail-actions { margin-top: 18px; }
  html[data-layout=desktop] .detail-desc { margin-top: 14px; }
  html[data-layout=desktop] .detail-title { font-size: clamp(30px, 3.2vw, 46px); }
  /* no poster (none, or it didn't load): one column */
  html[data-layout=desktop] .detail:not(:has(.detail-poster)) { grid-template-columns: minmax(0, 1fr); }
  html[data-layout=desktop] .detail:not(:has(.detail-poster)) > * { grid-column: 1 / -1; }
}
/* v1.13.13: Problems */
.problem-form { max-width: 720px; display: grid; gap: 12px; }
.field-label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.field-label small { font-weight: 500; }
.field-label .field { color: var(--text, #fff); font-weight: 500; font-size: 15px; }
.check-row { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.problems { display: grid; gap: 12px; padding: 0 var(--pad) 24px; max-width: 900px; }
.problem { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; }
.problem header { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.problem header small { color: var(--muted); font-size: 12px; width: 100%; }
.pr-state { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.problem.st-looking .pr-state { background: rgba(250, 204, 21, .16); color: #facc15; }
.problem.st-fixed .pr-state { background: rgba(34, 197, 94, .16); color: #4ade80; }
.problem.st-needs-ok .pr-state { background: rgba(249, 115, 22, .18); color: #fb923c; }
.pr-body { margin: 0; white-space: pre-wrap; font-size: 14px; }
.pr-reply { margin: 0; padding: 8px 10px; border-left: 3px solid var(--accent); background: rgba(255, 255, 255, .04); border-radius: 6px; font-size: 14px; }
.pr-diag summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.pr-diag dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 12px; margin: 8px 0 0; }
.pr-diag dt { color: var(--muted); } .pr-diag dd { margin: 0; overflow-wrap: anywhere; }
.pr-answer { display: grid; grid-template-columns: 200px 1fr auto; gap: 8px; }
@media (max-width: 600px) { .pr-answer { grid-template-columns: 1fr; } }
/* v1.13.14: who's on now — tap the faces */
button.here { background: none; border: 0; padding: 2px 4px; border-radius: 99px; cursor: pointer; }
button.here:hover { background: rgba(255, 255, 255, .08); }
.here-face.watching i { background: #ef4444; box-shadow: 0 0 0 2px var(--bg, #0f0f11); }
.here-list { display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.here-row { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: left; color: inherit; width: 100%; }
.here-row:not(.watching) { grid-template-columns: auto 1fr; }
button.here-row:hover { background: var(--surface2); }
.here-poster { width: 44px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; }
.here-txt { display: grid; gap: 3px; min-width: 0; }
.here-txt b { font-size: 15px; }
.here-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.here-txt small { color: var(--muted); font-size: 12px; }
.here-bar { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.here-bar i { display: block; height: 100%; background: var(--accent); }
/* v1.13.16: one face per person everywhere */
.avatar.xs { width: 22px; height: 22px; font-size: 11px; border-radius: 50%; }
.avatar.xs img { border-radius: 50%; }
.chip-face { display: inline-flex; margin-right: 2px; }
.rec-from { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.note-ic.face .avatar.sm { border-radius: 50%; overflow: hidden; }
.note-ic.face .avatar.sm img { border-radius: 50%; }
.art-shows { padding: 0 2px 8px; flex-wrap: wrap; overflow: visible; }
/* v1.15.0: the watch page (Miruro's) — the player in the page, the episodes down the right */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; padding: 4px var(--pad) 40px; align-items: start; }
.watch-main { min-width: 0; display: grid; gap: 18px; }
.watch-stage { position: relative; aspect-ratio: 16 / 9; background: #000 var(--wbg, none) center / cover no-repeat; border-radius: 12px; overflow: hidden; }
.watch-stage.live { background: #000; }
.watch-cover { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .55)); color: #fff; }
.watch-cover .ic { width: 64px; height: 64px; padding: 18px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #0b0b0c; box-sizing: content-box; }
.watch-stage.live .watch-cover { display: none; }
.player.p-docked { position: absolute; inset: auto; z-index: 30; border-radius: 12px; overflow: hidden; }
.wi-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.wi-show { color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: none; }
.wi-show:hover { color: #fff; }
.wi-title { margin: 4px 0 2px; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.wi-meta { margin: 0; color: var(--muted); font-size: 13px; }
.wi-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.wi-desc { margin: 10px 0 0; color: rgba(255, 255, 255, .78); font-size: 14px; line-height: 1.55; max-width: 900px; }
.wi-opts { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.wi-opt { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; }
.wi-langs { flex: 1 1 360px; }
.w-h { margin: 6px 0 10px; font-size: 18px; font-weight: 800; }
.ws-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ws-tile { position: relative; min-height: 84px; border-radius: 10px; overflow: hidden; display: grid; align-content: end; gap: 2px; padding: 10px 12px; text-align: left; color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .78)), var(--art) center / cover no-repeat, var(--surface2); border: 2px solid transparent; }
.ws-tile.on { border-color: #fff; }
.ws-tile small { color: rgba(255, 255, 255, .75); font-size: 12px; }
.w-grid { padding: 0 !important; }
.watch-eps { position: sticky; top: 12px; max-height: calc(100vh - 24px); display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.we-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.we-head { margin: 0; font-size: 16px; font-weight: 800; }
.we-list { overflow: auto; display: grid; gap: 2px; align-content: start; }
.we-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 8px; border-radius: 8px; text-align: left; color: inherit; font-size: 14px; }
.we-row:hover { background: rgba(255, 255, 255, .06); }
.we-row.on { background: rgba(255, 255, 255, .12); font-weight: 700; }
.we-row.seen .we-t { color: var(--muted); }
.we-n { color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; }
.we-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.we-now .ic, .we-done .ic { width: 16px; height: 16px; }
.we-bar { width: 40px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.we-bar i { display: block; height: 100%; background: #fff; }
@media (max-width: 1280px) { .watch { grid-template-columns: minmax(0, 1fr) 300px; } }
.d-related { margin-top: 18px; }
.d-related .w-h { padding: 0 var(--pad); }
.trailer-sheet { max-width: min(960px, 96vw); }
.trailer-box { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.trailer-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* v1.15.2: the song over the opening / ending */
.p-song { position: absolute; left: 22px; top: 72px; z-index: 6; display: grid; gap: 2px; padding: 10px 14px; border-radius: 10px; background: rgba(11, 11, 12, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; max-width: min(70%, 420px); opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s; pointer-events: none; }
.p-song.show { opacity: 1; transform: none; }
.p-song-k { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: rgba(255, 255, 255, .6); }
.p-song-t { font-size: 15px; font-weight: 800; }
.p-song-a { font-size: 13px; color: rgba(255, 255, 255, .75); }
/* v1.16.0: the calendar's blurred art goes behind the page (it was painting over it: everything looked dimmed) */
.cal-bg { z-index: -1; }
#view { isolation: isolate; }
/* v1.16.0: the UI pass — tidier alignment everywhere */
/* list rows with an icon: the line under the label starts under the label, not under the icon */
.row-text:has(> span:first-child > .ic) > small { padding-left: 42px; }
.row-text > span:first-child > .ic, .list-row > span:first-child > .ic { width: 20px; height: 20px; margin-right: 12px; vertical-align: -4px; color: var(--muted); }
.list-row > span:first-child:has(> .ic) { display: inline-flex; align-items: center; gap: 10px; }
.list-row > span:first-child:has(> .ic) > .ic { margin-right: 0; }
/* Profile: Switch next to your name; a softer banner when there's no art */
.pf-switch { align-self: center; }
.pf-banner { background: var(--pfbg, radial-gradient(120% 140% at 0% 0%, #26262b 0%, #17171a 55%, #111113 100%)) center / cover; }
/* Continue Watching: "View history" lines up with the cards; cards fill their columns */
.cw-card.hist-card { display: grid; align-content: start; gap: 6px; padding: 0; margin: 0; background: none; border: 0; }
.cw-card.hist-card .cw-art { aspect-ratio: 16 / 9; }
@media (min-width: 900px) { html[data-layout=desktop] .cw-cards .cw-card { width: auto; } }
/* the title page: Play is a button, not a bar */
@media (min-width: 900px) { html[data-layout=desktop] .detail-actions .btn.primary { flex: 0 0 auto; min-width: 200px; } }
/* Library: the sort menu looks like the chips beside it */
.chips .chip.select, .chips select.chip { font-size: 14px; font-weight: 600; }
.field-label { grid-template-columns: 1fr; }
.field-label > small { display: inline; margin-left: 6px; }
.problem-form .field-label { display: block; }
.problem-form .field-label .field { margin-top: 6px; width: 100%; }
input[type=checkbox]:not(.switch), input[type=radio] { accent-color: #E4E4E7; }
/* ======================= v1.16.2: the title page, as Miruro's ======================= */
html[data-layout=desktop] .page:has(> [data-slot=detail]), html[data-layout=desktop] .page:has([data-slot=detail]) { max-width: none; }
.dx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.dx-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 6px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 13px; font-weight: 700; backdrop-filter: blur(6px); }
.dx-genres { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; color: rgba(255, 255, 255, .72); font-size: 14px; font-weight: 600; }
.dx-genres span + span::before { content: "•"; margin-right: 14px; opacity: .5; }
.dx .detail-desc { margin: 14px 0 0; max-width: 760px; color: rgba(255, 255, 255, .8); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.dx .detail-desc.open { -webkit-line-clamp: unset; }
.dx .detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.dx .detail-actions .btn { height: 44px; padding: 0 18px; border-radius: 8px; font-size: 15px; font-weight: 700; gap: 8px; }
.dx .detail-actions .btn:not(.primary) { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .08); color: #fff; backdrop-filter: blur(8px); }
.dx .detail-actions .btn:not(.primary):hover { background: rgba(255, 255, 255, .18); }
.dx .detail-actions .btn.icon-only { width: 44px; padding: 0; justify-content: center; }
.dx .detail-actions .btn .ic { width: 18px; height: 18px; }
.dx-body { display: grid; gap: 28px; margin-top: 26px; }
.dx-col { min-width: 0; display: grid; gap: 22px; align-content: start; }
/* v1.17.29 (kahmelj): a grid item's min-width is its content's, so the season slot took the season row's full
   width (South Park's 27 seasons: ~2700 px) and the row could only scroll ~450 px (to about Season 9) before the page
   clipped it. The slot keeps the column's width; the row scrolls inside it. */
.dx-col > [data-slot=seasons] { min-width: 0; }
.dx-sec .trailer-box { max-width: 900px; }
.dx-side { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; align-self: start; }
.dx-side .w-h { margin-top: 0; }
.dx-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.dx-facts dt { color: var(--muted); font-weight: 700; }
.dx-facts dd { margin: 0; color: #fff; overflow-wrap: anywhere; }
@media (min-width: 900px) {
  /* the art from the side rail to the right edge; the page's content centred on it */
  html[data-layout=desktop] .dx-hero { height: min(72vh, 680px); background-position: center 22%; }
  html[data-layout=desktop] .dx-hero::after { background: linear-gradient(90deg, rgba(15, 15, 17, .92) 0%, rgba(15, 15, 17, .55) 38%, rgba(15, 15, 17, .05) 75%), linear-gradient(180deg, rgba(15, 15, 17, .35) 0%, rgba(15, 15, 17, 0) 30%, rgba(15, 15, 17, .6) 75%, var(--bg) 100%); }
  html[data-layout=desktop] .detail.dx { display: block; max-width: 1440px; margin: -40vh auto 0; padding: 0 48px 48px; position: relative; z-index: 2; }
  html[data-layout=desktop] .dx .detail-head { display: flex; gap: 34px; align-items: flex-end; }
  html[data-layout=desktop] .dx .detail-poster { display: block; width: 230px; flex: none; border-radius: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); grid-row: auto; grid-column: auto; }
  html[data-layout=desktop] .dx-main { flex: 1; min-width: 0; }
  html[data-layout=desktop] .dx .detail-head > div { grid-column: auto; }
  html[data-layout=desktop] .dx .detail-title { font-size: clamp(32px, 3.4vw, 52px); line-height: 1.08; margin: 0; }
  html[data-layout=desktop] .dx .detail-actions, html[data-layout=desktop] .dx .detail-desc { margin-left: 0; }
  html[data-layout=desktop] .dx .detail-actions .btn.primary { min-width: 0; flex: 0 0 auto; }
  html[data-layout=desktop] .dx-body { grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; }
  html[data-layout=desktop] .dx .d-related .w-h { padding: 0; }
}
@media (max-width: 899px) {
  .dx .detail-head { gap: 14px; }
  .dx-body { padding: 0 var(--pad); }
  .dx .detail-actions .btn.primary { flex: 1 1 100%; }
}
/* v1.16.2: Home scrolls as one page — Top Airing / Upcoming move with everything else (no pinned column) */
@media (min-width: 1400px) { html[data-layout=desktop] .home-side { position: static; top: auto; max-height: none; overflow: visible; } }
.home-side, .side-box, .side-list { overflow: visible; max-height: none; }

@media (min-width: 900px) { html[data-layout=desktop] .hx { width: calc(100vw / var(--z, 1)); margin-left: calc(-1 * (var(--tab-w) / var(--z, 1) + (100vw / var(--z, 1) - var(--tab-w) / var(--z, 1) - 100%) / 2)); } }

/* ---- v1.16.2: phones (the iPhone app and the website on a phone) — Miruro's mobile look: no bottom tab bar; logo,
   search and ☰ across the top; ☰ opens a panel of every page; rows are 3-across poster grids ---- */
.m-search, .menu-btn { display: none; }
html[data-layout=touch] { --tab-h: 0px; }
html[data-layout=touch] .tabbar { display: none !important; }
html[data-layout=touch] .m-search, html[data-layout=touch] .menu-btn { display: inline-grid; }
html[data-layout=touch] .top .top-search, html[data-layout=touch] .top .avatar-btn, html[data-layout=touch] .home-top .cal-btn { display: none; }
html[data-layout=touch] .top .menu-btn .ic { width: 24px; height: 24px; }
.m-wrap { position: fixed; inset: 0; z-index: 400; }
.m-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .2s; }
.m-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 380px); background: var(--bg); border-left: 1px solid rgba(255, 255, 255, .06);
  padding: calc(var(--safe-t) + 10px) 16px calc(var(--safe-b) + 20px); overflow-y: auto; transform: translateX(100%); transition: transform .22s ease; display: flex; flex-direction: column; gap: 14px; }
.m-wrap.show .m-scrim { opacity: 1; }
.m-wrap.show .m-panel { transform: none; }
body.menu-on { overflow: hidden; }
.m-head { display: flex; align-items: center; justify-content: space-between; }
.m-head .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; }
.m-head .brand img { width: 28px; height: 28px; border-radius: 7px; }
.m-prof { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface2); color: var(--text); }
.m-prof .m-ptxt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.m-prof b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-prof small { color: var(--muted); font-size: 12.5px; }
.m-prof > .ic, .m-row > .ic:last-of-type { width: 18px; height: 18px; color: var(--muted); }
.m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-tile { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 12px; border-radius: 12px; background: var(--surface2); color: var(--text); font-weight: 600; font-size: 14px; }
.m-tile .ic { width: 20px; height: 20px; flex: none; }
.m-tile.on { background: #fff; color: #0B0B0C; }
.m-rows { display: flex; flex-direction: column; border-radius: 12px; background: var(--surface2); overflow: hidden; }
.m-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 12px; color: var(--text); font-weight: 600; font-size: 14px; }
.m-row + .m-row { border-top: 1px solid rgba(255, 255, 255, .06); }
.m-row span { flex: 1; }
.m-row .ic { width: 20px; height: 20px; }
.m-dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #fff; color: #0B0B0C; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.m-tile .m-dot { position: absolute; top: 6px; right: 8px; }
html[data-theme=light] .m-panel { border-left-color: rgba(15, 23, 34, .08); }
html[data-theme=light] .m-tile.on { background: #0B0B0C; color: #fff; }
html[data-theme=light] .m-dot { background: #0B0B0C; color: #fff; }
html[data-layout=touch] .scroller.grid7 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; overflow: visible; padding-left: var(--pad); padding-right: var(--pad); }
html[data-layout=touch] .scroller.grid7 .card, html[data-layout=touch] .scroller.grid7 .rec-card, html[data-layout=touch] .scroller.grid7 .game-card { width: auto; min-width: 0; }
html[data-layout=touch] .scroller.grid7 .game-card .poster { width: 100%; }
html[data-layout=touch] .scroller.grid7 .card-name { font-size: 12.5px; }
@media (min-width: 900px) { html[data-layout=touch] .scroller.grid7 { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
html[data-layout=touch] .row-more { margin: 10px var(--pad) 0; min-height: 36px; padding: 0 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
html[data-layout=touch] .row-more .ic { width: 16px; height: 16px; }
.m-panel > * { flex: none; }
.hero-top .m-search, .hero-top .menu-btn { margin-left: 6px; }

/* ---- v1.16.2: Home at Miruro's proportions (measured side by side at 1920×1080): a 56px rail, the hero ~84% of the
   screen, the page edge to edge (no centred column), a 340px Top Airing / Upcoming column 32px off the grid ---- */
@media (min-width: 900px) {
  html[data-layout=desktop] { --tab-w: 56px; }
  html[data-layout=desktop] .tabbar a { width: 40px; height: 40px; }
  html[data-layout=desktop] .page:has(.home-cols) { max-width: none; }
  html[data-layout=desktop] .home-cols { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
  html[data-layout=desktop] .home-cols .row, html[data-layout=desktop] .home-cols .row-head { padding-right: 0; }
  html[data-layout=desktop] .hx { height: clamp(460px, 84vh, 1000px); }
  html[data-layout=desktop] .hx-body { left: calc(var(--tab-w) + 32px); bottom: 12vh; max-width: 600px; }
  html[data-layout=desktop] .row-head h2 { font-size: 20px; font-weight: 700; }
}
@media (min-width: 900px) {
  html[data-layout=desktop] .home-cols .home-side { padding-right: 39px; }
  html[data-layout=desktop] .home-cols .scroller.grid7 { column-gap: 31px; }
}
@media (min-width: 900px) {
  html[data-layout=desktop] .hx-body { bottom: 14.6vh; }
  html[data-layout=desktop] .page:has(.home-cols) .hx + * , html[data-layout=desktop] .home-cols { position: relative; z-index: 1; }
  html[data-layout=desktop] .home-cols { margin-top: -94px; }
}
/* v1.16.2: Miruro's row pager — "‹ 1/3 ›" at the right end of the row's heading */
.row:has(> .row-pager) { position: relative; }
.row-pager { position: absolute; top: -1px; right: var(--pad); display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 3px; border-radius: 999px; background: var(--surface); }
.rp-btn { width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; color: #B5B2BC; }
.rp-btn .ic { width: 16px; height: 16px; }
.rp-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .1); color: #fff; }
.rp-btn:disabled { opacity: .35; cursor: default; }
.rp-n { font-size: 12px; font-weight: 500; color: #B5B2BC; min-width: 20px; text-align: center; }
html[data-layout=desktop] .home-cols .row-pager { right: 0; }
html[data-theme=light] .rp-btn, html[data-theme=light] .rp-n { color: #52525B; }
html[data-layout=desktop] .home-cols .scroller.grid7 { padding-right: 0; }
.scroller.grid7 { align-items: start; }

/* ---- v1.16.2: Search at Miruro's measurements (1920×1080): a 1568px column; title 24px with a quiet line under it;
   the kinds as tabs at the right; filters as equal 36px boxes; a 7-wide grid ---- */
.sx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 0 var(--pad); margin: 18px 0 14px; flex-wrap: wrap; }
.sx-head .browse-h { margin: 0; font-size: 24px; font-weight: 750; padding: 0; }
.sx-sub { margin: 2px 0 0; font-size: 14px; color: #B5B2BC; }
.sx-head .chips.kinds { margin: 0; padding: 0; gap: 4px; }
.sx-head .chip.kind { height: 32px; border-radius: 7px; font-size: 14px; font-weight: 600; background: transparent; border: 0; color: #B5B2BC; }
.sx-head .chip.kind.on { background: var(--surface2); color: #EEEEF0; }
.sx-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 48px; gap: 8px; padding: 0 var(--pad); margin-bottom: 12px; }
.sx-sel { position: relative; display: block; }
.sx-sel select { width: 100%; height: 36px; appearance: none; -webkit-appearance: none; padding: 0 34px 0 13px; border-radius: 8px; border: 1px solid #49474E; background: rgba(23, 22, 25, .65); color: #B5B2BC; font: 500 14px/1 inherit; font-family: inherit; cursor: pointer; }
.sx-sel select:hover, .sx-sel select:focus { border-color: #6B6870; color: #EEEEF0; outline: none; }
.sx-sel .ic { position: absolute; right: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: #B5B2BC; pointer-events: none; }
.sx-reset { height: 36px; border-radius: 8px; border: 1px solid #49474E; color: #B5B2BC; display: grid; place-items: center; background: rgba(23, 22, 25, .65); }
.sx-reset .ic { width: 16px; height: 16px; }
.sx-reset:hover { color: #fff; border-color: #6B6870; }
.sx .chips.genres { margin-bottom: 6px; }
.sx-count { font-size: 14px; color: #B5B2BC; }
html[data-theme=light] .sx-sel select, html[data-theme=light] .sx-reset { background: #fff; border-color: #D4D4D8; color: #3F3F46; }
@media (max-width: 700px) { .sx-filters { grid-template-columns: 1fr 1fr; } .sx-reset { width: 100%; } }
@media (min-width: 900px) {
  html[data-layout=desktop] .page:has(.searchbar) { max-width: 1568px; }
  html[data-layout=desktop] .sx-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 24px 16px; }
}
.sx-grid { align-items: start; }
.sx-count { padding: 0 var(--pad); margin: 6px 0 4px; }

/* ---- v1.16.2: every page but Home in Miruro's 1568px column; Trending at Miruro's measurements: seasons as words
   (16px, a 3px bar under the one picked), 3 cards across of 211px with the art blurred behind each ---- */
@media (min-width: 900px) {
  html[data-layout=desktop] .page { max-width: 1568px; }
  html[data-layout=desktop] .tr-grid { max-width: none; gap: 11px; }
  html[data-layout=desktop] .tr-card { min-height: 211px; }
  html[data-layout=desktop] .tr-pic { width: 126px; }
}
.tr-h { font-size: 24px; font-weight: 750; letter-spacing: 0; }
.tr-season { font-size: 16px; font-weight: 800; letter-spacing: 0; padding: 9px 20px; border-bottom-width: 3px; border-radius: 0; }
.tr-seasons { gap: 8px; }
.tr-card { position: relative; overflow: hidden; isolation: isolate; border-color: transparent; }
.tr-bg { position: absolute; inset: -20px; z-index: -1; background-size: cover; background-position: center; filter: blur(24px) saturate(1.2); opacity: .22; }
.tr-card p { font-size: 12px; line-height: 1.6; color: #B5B2BC; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.tr-title { font-size: 14px; font-weight: 600; }
.tr-chips span { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 4px; background: rgba(35, 34, 37, .5); color: #B5B2BC; }
.tr-add { width: 32px; height: 32px; border-radius: 999px; background: #121113; }
html[data-theme=light] .tr-add { background: #fff; }

/* ---- v1.16.2: Discover at Miruro's measurements: edge to edge; a 696px stage — the pick (68%) and the next ones as
   464px posters running off the right edge; the name 32px over a "TV · 2027 · Action" line ---- */
.dc-more { display: none; }
@media (min-width: 900px) {
  html[data-layout=desktop] .page:has(.dc-stage) { max-width: none; --pad: 16px; padding-right: 15px; }
  html[data-layout=desktop] .dc-stage { display: flex; gap: 12px; height: min(64.4vh, 696px); max-height: none; overflow: hidden; }
  html[data-layout=desktop] .dc-big { flex: 0 0 68%; }
  html[data-layout=desktop] .dc-side { flex: 0 0 auto; aspect-ratio: 2 / 3; width: auto; }
  html[data-layout=desktop] .dc-more { display: block; }
  html[data-layout=desktop] .dc-arrow.next { right: 8px; }
  html[data-layout=desktop] .dc-info h3 { font-size: 32px; }
  html[data-layout=desktop] .dc-info h3 small { display: block; margin: 8px 0 0; font-size: 13.6px; font-weight: 600; color: #EEEEF0; }
  html[data-layout=desktop] .dc-info p { font-size: 14.72px; color: rgba(238, 238, 240, .78); max-width: 704px; }
}
.dc-arrow { width: 38px; height: 38px; border-radius: 999px; background: rgba(23, 22, 25, .55); }

/* ---- v1.16.2: Schedule at Miruro's measurements: a 1248px column; days down a 176px list (today: a bar at its
   left); episodes two across, 80px tall, a 44×66 poster; "in 1h 25m" in lavender ---- */
.cal-in { font-style: normal; font-weight: 500; color: #BAA7FF; }
html[data-theme=light] .cal-in { color: #6D4AFF; }
@media (min-width: 900px) {
  html[data-layout=desktop] .page:has(.cal-head) { max-width: 1248px; }
  html[data-layout=desktop] .cal-wrap { grid-template-columns: 176px minmax(0, 1fr) !important; gap: 20px; }
  html[data-layout=desktop] .cal-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  html[data-layout=desktop] .cal-card { min-height: 80px; padding: 7px 9px; gap: 10px; border-radius: 8px; border: 0; background: rgba(28, 27, 30, .7); }
  html[data-layout=desktop] .cal-art { width: 44px; aspect-ratio: 2 / 3; border-radius: 4px; }
  html[data-layout=desktop] .cal-info b { font-size: 14px; font-weight: 600; }
  html[data-layout=desktop] .cal-line { font-size: 12px; color: #B5B2BC; }
  html[data-layout=desktop] .cal-dayb { min-height: 52px; border-radius: 8px; position: relative; }
  html[data-layout=desktop] .cal-dayb.on { background: #232225; }
  html[data-layout=desktop] .cal-dayb.on::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: #EEEEF0; }
  html[data-layout=desktop] .cal-slot { font-size: 10px; font-weight: 700; text-transform: none; letter-spacing: 0; display: flex; align-items: center; gap: 8px; }
  html[data-layout=desktop] .cal-slot::after { content: ''; flex: 1; height: 1px; background: rgba(73, 71, 78, .7); }
}

/* ---- v1.16.2: History at Miruro's measurements: a 1218px column, a 240px panel at the left ---- */
.hist-wrap { display: grid; gap: 14px; padding: 0 var(--pad); }
.hist-wrap .hist-list { margin: 0; }
.hist-side { display: grid; gap: 8px; align-content: start; }
.hist-q { height: 36px; min-height: 36px; border-radius: 7px; font-size: 14px; }
.hist-sortrow { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 6px; }
.hist-sortrow .sx-reset { height: 36px; }
.hist-help { margin: 6px 0 0; font-size: 12px; line-height: 1.6; color: #B5B2BC; }
@media (max-width: 899px) { .hist-help { display: none; } }
@media (min-width: 900px) {
  html[data-layout=desktop] .page:has(.hist-wrap) { max-width: 1218px; }
  html[data-layout=desktop] .hist-wrap { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
}

/* ---- v1.16.2: Announcements at Miruro's measurements: a 736px column; each one its own card (#1A191B, a 1px
   line, 8px corners), its title 18px ---- */
@media (min-width: 900px) { html[data-layout=desktop] .page:has(.news-list) { max-width: 736px; } }
.news-list { display: grid; gap: 12px; background: transparent; border: 0; }
.news-list .news-item { background: #1A191B; border: 1px solid #49474E; border-radius: 8px; padding: 22px 24px; }
.news-list .news-item + .news-item { border-top: 1px solid #49474E; }
.news-list .news-item b { font-size: 18px; font-weight: 600; }
html[data-theme=light] .news-list .news-item { background: #fff; border-color: #E4E4E7; }

/* ---- v1.16.2: Profile at Miruro's measurements: a 1202px column; a 235px banner; a 160px picture over its edge;
   the name 36px ---- */
@media (min-width: 900px) {
  html[data-layout=desktop] .page:has(.pf-top) { max-width: 1202px; }
  html[data-layout=desktop] .pf-banner { height: 235px; border-radius: 10px; }
  html[data-layout=desktop] .pf-av { width: 160px; height: 160px; }
  html[data-layout=desktop] .pf-av .avatar.xl { width: 160px; height: 160px; font-size: 64px; border-radius: 10px; }
  html[data-layout=desktop] .pf-name h2 { font-size: 36px; font-weight: 750; }
  html[data-layout=desktop] .pf-name small { font-size: 14px; color: #B5B2BC; }
  html[data-layout=desktop] .pf-stats b { font-size: 16px; font-weight: 700; }
  html[data-layout=desktop] .pf-stats small { font-size: 12px; color: #B5B2BC; }
}

/* ---- v1.16.2: Settings, Miruro's panel: 704px; sections down a 135px column at the left; choices as tiles ---- */
.sheet.st-sheet { max-width: 704px; width: min(704px, 100vw); }
.st-wrap { display: grid; grid-template-columns: 135px minmax(0, 1fr); gap: 20px; min-height: 420px; max-height: 70vh; }
.st-nav { display: flex; flex-direction: column; gap: 4px; }
.st-nav p { margin: 8px 0 4px; font-size: 12px; font-weight: 500; color: #B5B2BC; }
.st-nav button { height: 40px; padding: 0 12px; border-radius: 8px; text-align: left; font-size: 14px; font-weight: 600; color: #B5B2BC; }
.st-nav button.on { background: rgba(186, 167, 255, .1); color: #EEEEF0; }
.st-nav .st-ver { margin-top: auto; font-weight: 400; }
.st-panes { overflow-y: auto; padding-right: 4px; }
.st-panes h2 { margin: 6px 0 14px; font-size: 16px; font-weight: 600; }
.st-panes h3 { margin: 18px 0 6px; font-size: 14px; font-weight: 500; }
.st-panes p { margin: 0 0 8px; font-size: 12px; color: #B5B2BC; }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.st-tile { min-height: 40px; padding: 8px 10px; border-radius: 8px; border: 1px solid #49474E; font-size: 14px; font-weight: 600; color: #B5B2BC; display: grid; place-items: center; gap: 2px; }
.st-tile small { font-size: 11px; font-weight: 400; }
.st-tile.on { background: rgba(186, 167, 255, .1); border-color: #BAA7FF; color: #EEEEF0; }
.st-sw { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(73, 71, 78, .6); }
.st-sw span { flex: 1; display: grid; gap: 2px; }
.st-sw b { font-size: 14px; font-weight: 500; }
.st-sw small { font-size: 12px; color: #B5B2BC; }
.st-keys { display: grid; }
.st-key { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(73, 71, 78, .6); font-size: 14px; }
.st-key kbd { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 6px; border: 1px solid #49474E; background: #232225; font: 600 12px/1 inherit; font-family: inherit; }
.st-key i { font-style: normal; font-size: 12px; color: #B5B2BC; margin: 0 6px; }
.pf-banner { position: relative; }
.pf-gear { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 999px; background: rgba(23, 22, 25, .4); }
@media (max-width: 600px) { .st-wrap { grid-template-columns: 1fr; max-height: none; } .st-nav { flex-direction: row; flex-wrap: wrap; } .st-nav p { display: none; } }
html[data-theme=light] .st-key kbd { background: #F4F4F5; border-color: #D4D4D8; }
html[data-theme=light] .st-tile { border-color: #D4D4D8; color: #3F3F46; }
html[data-theme=light] .st-tile.on, html[data-theme=light] .st-nav button.on { background: rgba(109, 74, 255, .1); color: #0B0B0C; border-color: #6D4AFF; }
.pf-row { position: relative; z-index: 1; }
.st-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 900px) { .sheet-wrap:has(.st-sheet) { align-items: center; } .sheet.st-sheet { border-radius: 12px; } }

/* ---- v1.16.2: the title page at Miruro's measurements: a 1552px column; the poster 192×288 beside a 48px title;
   "About this anime" across the page as two columns of facts, the title's other sites as small buttons under them;
   Related / More like this as 192px posters ---- */
.dx-about { padding: 0 var(--pad); margin: 26px 0 8px; }
.dx-h { margin: 0 0 14px; font-size: 18px; font-weight: 600; }
.dx-facts { display: grid; grid-template-columns: 1fr; gap: 0 32px; margin: 0; }
.dx-facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: 14px; }
.dx-facts dt { color: #B5B2BC; font-weight: 400; margin: 0; flex: none; }
.dx-facts dd { margin: 0; font-weight: 500; text-align: right; min-width: 0; }
.dx-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dx-link { height: 36px; padding: 0 12px; border-radius: 7px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; color: #EEEEF0; background: rgba(28, 27, 30, .4); border: 1px solid #49474E; text-decoration: none; }
.dx-link:hover { border-color: #6B6870; background: rgba(255, 255, 255, .06); }
html[data-theme=light] .dx-link { color: #18181B; border-color: #D4D4D8; background: #fff; }
html[data-theme=light] .dx-facts dt { color: #52525B; }
@media (min-width: 900px) {
  html[data-layout=desktop] .detail.dx { max-width: 1552px; }
  html[data-layout=desktop] .detail.dx .detail-poster { width: 192px; height: 288px; object-fit: cover; }
  html[data-layout=desktop] .detail.dx .detail-title { font-size: 48px; font-weight: 750; }
  html[data-layout=desktop] .dx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-layout=desktop] .dx-body { grid-template-columns: minmax(0, 1fr) !important; }
  html[data-layout=desktop] .detail.dx .d-related .card, html[data-layout=desktop] .detail.dx .d-related .poster { width: 192px; }
}
/* the episodes as Miruro's cards on a computer: a 256px picture with the length on it, the name and date under */
@media (min-width: 900px) {
  html[data-layout=desktop] .detail.dx .eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px 12px; padding: 0 var(--pad); }
  html[data-layout=desktop] .detail.dx .ep { position: relative; display: block; padding: 0; border: 0; min-width: 0; }
  html[data-layout=desktop] .detail.dx .ep-main { display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; padding: 0; text-align: left; }
  html[data-layout=desktop] .detail.dx .ep .thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 8px; }
  html[data-layout=desktop] .detail.dx .ep-title { font-size: 12px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  html[data-layout=desktop] .detail.dx .ep-meta { font-size: 11px; }
  html[data-layout=desktop] .detail.dx .ep-ov { display: none; }
  html[data-layout=desktop] .detail.dx .ep > .icon-btn, html[data-layout=desktop] .detail.dx .ep > button:not(.ep-main) { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 999px; background: rgba(23, 22, 25, .8); }
  html[data-layout=desktop] .detail.dx .ep.up-next .thumb { outline: 2px solid #EEEEF0; outline-offset: 2px; }
}
.detail.dx .dx-about { padding-left: 0; padding-right: 0; }
@media (min-width: 900px) { html[data-layout=desktop] .detail.dx .eps { padding: 0; } }

/* ---- v1.16.2: the watch page's episodes, Miruro's way: numbered tiles five across (the one playing lavender), or the list ---- */
.we-top { flex-wrap: wrap; }
.we-range { width: auto; }
.we-views { display: inline-flex; gap: 4px; margin-left: auto; }
.we-view { width: 35px; height: 35px; border-radius: 8px; background: #232225; color: #B5B2BC; display: grid; place-items: center; }
.we-view .ic { width: 16px; height: 16px; }
.we-view.on { color: #EEEEF0; outline: 1px solid #49474E; }
.we-list.we-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; align-content: start; }
.we-grid .we-row { display: grid; place-items: center; height: 29px; min-height: 0; padding: 0; border-radius: 6px; background: rgba(35, 34, 37, .6); position: relative; }
.we-grid .we-row .we-t, .we-grid .we-row .we-now, .we-grid .we-row .we-done { display: none; }
.we-grid .we-row .we-n { font-size: 13.3px; font-weight: 400; min-width: 0; }
.we-grid .we-row.on { background: #BAA7FF; color: #121113; }
.we-grid .we-row.seen { color: #B5B2BC; }
.we-grid .we-row .we-bar { position: absolute; left: 4px; right: 4px; bottom: 2px; height: 2px; }
.we-grid .we-row[hidden] { display: none; }
html[data-theme=light] .we-grid .we-row { background: #F4F4F5; }
html[data-theme=light] .we-view { background: #F4F4F5; }

/* ---- v1.16.2: Characters (Miruro's): two across; the character at the left, who voices them at the right ---- */
.dx-ch-head { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.dx-ch-head .dx-h { margin: 0; }
.ch-n { font-size: 12px; color: #B5B2BC; }
.ch-lang select { height: 32px; font-size: 12px; font-weight: 600; padding-right: 30px; }
.ch-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 24px; }
.ch-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ch-pic { position: relative; flex: none; width: 48px; height: 72px; border-radius: 6px; overflow: hidden; background: #232225; display: grid; place-items: center; }
.ch-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ch-pic b { color: #B5B2BC; font-size: 18px; }
.ch-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ch-txt b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-txt small { font-size: 12px; color: #B5B2BC; text-transform: capitalize; }
.ch-va { display: flex; align-items: center; gap: 12px; margin-left: auto; min-width: 0; }
.ch-txt.r { text-align: right; }
.ch-txt.r b { font-size: 12px; font-weight: 500; }
.ch-txt.r small { font-size: 10px; }
html[data-theme=light] .ch-pic { background: #F4F4F5; }
@media (min-width: 900px) { html[data-layout=desktop] .ch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.detail.dx .w-h { font-size: 18px; font-weight: 600; }
.w-grid .poster .badge { top: 6px; left: 6px; right: auto; bottom: auto; font-size: 9px; font-weight: 700; padding: 3px 6px; border-radius: 4px; background: rgba(18, 17, 19, .85); color: #EEEEF0; }

/* ---- v1.16.2: Artwork & Posters (Miruro's): a masonry of 249px pictures, each labeled ---- */
.art-mason { columns: 2 150px; column-gap: 12px; }
.art-pc { position: relative; display: block; break-inside: avoid; margin-bottom: 12px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(73, 71, 78, .6); background: #1A191B; }
.art-pc img { display: block; width: 100%; height: auto; }
.art-pc span { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 2px 6px; border-radius: 4px; background: rgba(18, 17, 19, .85); font-size: 10px; font-weight: 600; color: #EEEEF0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) { html[data-layout=desktop] .art-mason { columns: 6 220px; } }

/* ---- v1.16.2: phones at Miruro's measurements (390 wide): 8px margins on Home, the hero 79% of the screen, menu
   tiles 64px tall and rows 40px ---- */
html[data-layout=touch] .page:has(.home-cols), html[data-layout=touch] .page:has(.hx) { --pad: 8px; }
@media (max-width: 899px) { html[data-layout=touch] .hx { height: 79vh; max-height: 700px; min-height: 460px; } }
html[data-layout=touch] .scroller.grid7 { gap: 14px 9px; }
.m-panel { width: min(88vw, 307px); padding-left: 10px; padding-right: 11px; }
.m-tiles { gap: 6px; }
.m-tile { min-height: 64px; font-weight: 500; }
.m-prof { min-height: 64px; }
.m-row { min-height: 40px; padding: 8px 12px; font-weight: 500; }
button.m-row { width: 100%; text-align: left; font: inherit; font-size: 14px; font-weight: 500; color: var(--text); background: transparent; border: 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.we-grid .we-row .we-n { width: 100%; text-align: center; }
.we-grid .we-row.on .we-n { color: #121113; font-weight: 600; }
.we-top .field.small { width: auto; flex: 1 1 120px; }
.we-top { display: flex; align-items: center; gap: 8px; }
.we-top .we-head { flex: 1 0 100%; }

/* ---- v1.16.2: Miruro's poster cards: a play mark when you point at one, and a round + (add to list) in its corner ---- */
.card { position: relative; }
.card-add { position: absolute; top: 8px; right: 8px; z-index: 2; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: rgba(35, 34, 37, .9); color: #EEEEF0; opacity: 0; transition: opacity .15s, background .15s; }
.card-add .ic { width: 14px; height: 14px; }
.card-add.in { opacity: 1; }
.card:hover .card-add, .card:focus-visible .card-add { opacity: 1; }
.card-add:hover { background: #fff; color: #121113; }
html[data-layout=touch] .card-add { display: none; }
@media (hover: hover) {
  .card .poster::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 4.5v15a1 1 0 0 0 1.5.86l12.5-7.5a1 1 0 0 0 0-1.72L8.5 3.64A1 1 0 0 0 7 4.5z'/%3E%3C/svg%3E") center / 29px no-repeat; opacity: 0; transition: opacity .15s; pointer-events: none; }
  .card:hover .poster::after { opacity: 1; }
}

/* ---- v1.16.2: Top Airing / Upcoming at Miruro's measurements: a rounded box, a 16px heading as written, 96px rows
   (a 68×96 poster), the show's banner showing through at the right, a lime dot, the title 15px ---- */
.side-box { border: 0; border-radius: 8px; padding: 0 13px 13px; background: rgba(28, 27, 30, .4); gap: 8px; }
.side-box h3 { min-height: 44px; margin: 0; font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.side-item { min-height: 96px; background: transparent; }
.side-item::before { left: 40%; opacity: .5; filter: none; }
.side-item::after { background: linear-gradient(90deg, rgba(28, 27, 30, 1) 40%, rgba(28, 27, 30, .2)); }
.side-art { width: 68px; height: 96px; aspect-ratio: auto; border-radius: 0; }
.side-text b { font-size: 15px; font-weight: 600; }
.side-text .dot.on { background: #AAFF00; }
.side-chips i { font-size: 11px; font-weight: 500; }
html[data-theme=light] .side-box { background: rgba(244, 244, 245, .8); }
html[data-theme=light] .side-item::after { background: linear-gradient(90deg, #F4F4F5 40%, rgba(244, 244, 245, .2)); }
@media (min-width: 900px) { html[data-layout=desktop] .hx-dots { bottom: 14.6vh; left: calc(50% + var(--tab-w) / 2); } html[data-layout=desktop] .hx-dots button { height: 5px; } html[data-layout=desktop] .hx-dots button.on { width: 32px; } }
/* v1.16.2: the sign-in prompt's perks (Miruro's) */
.perk-list { list-style: none; margin: 4px 0 14px; padding: 0; display: grid; gap: 12px; }
.perk-list li { display: grid; gap: 2px; padding-left: 16px; position: relative; }
.perk-list li::before { content: ''; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #BAA7FF; }
.perk-list b { font-size: 14px; font-weight: 600; }
.perk-list small { font-size: 12px; color: #B5B2BC; }

/* ---- v1.16.2: Continue Watching across the whole page above Home's two columns (Miruro's): 288px cards (162px
   pictures), 12px apart; a round ✕ in the corner ---- */
.cw-full:empty { display: none; }
@media (min-width: 900px) {
  html[data-layout=desktop] .cw-full:not(:empty) { position: relative; z-index: 1; margin-top: -94px; padding-right: 39px; }
  html[data-layout=desktop] .cw-full:not(:empty) ~ .home-cols { margin-top: 0; }
  html[data-layout=desktop] .cw-full .cw-cards { grid-template-columns: repeat(auto-fill, 288px); gap: 12px; }
  html[data-layout=desktop] .cw-full .row { margin-top: 0; }
}
.cw-card .bar i { background: #FF0000; }
html[data-layout=tv] .card .poster::after { display: none; }

/* ---- v1.16.2: the watch page under the player, Miruro's way: "Episode 3 ·" over a 20px title; the show as a card
   (a 56×84 poster, its name, a line); the synopsis two lines tall until you tap it ---- */
.wi-epn { margin: 0; font-size: 12px; font-weight: 500; color: #B5B2BC; }
.wi-epn s { text-decoration: none; margin-left: 4px; }
.wi-title { font-size: 20px; font-weight: 750; }
.wi-card { display: flex; align-items: center; gap: 14px; margin: 16px 0 0; padding: 0 16px; min-height: 84px; color: inherit; text-decoration: none; }
.wi-card img, .wi-card-ph { flex: none; width: 56px; height: 84px; object-fit: cover; border-radius: 6px; background: #232225; }
.wi-card-txt { flex: 1; min-width: 0; display: grid; gap: 4px; }
.wi-card-txt b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wi-card-txt small { font-size: 12px; color: #B5B2BC; }
.wi-card-txt s { text-decoration: none; margin: 0 4px; }
.wi-card:hover .wi-card-txt b { text-decoration: underline; }
.wi-syn { cursor: pointer; padding: 0 16px; }
.wi-syn p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wi-syn.open p { -webkit-line-clamp: unset; display: block; }
.wi-syn small { display: block; margin-top: 8px; font-size: 12px; font-weight: 500; color: #B5B2BC; }
.wi-card { padding: 12px 16px; border-radius: 8px 8px 0 0; background: rgba(28, 27, 30, .4); }
.wi-card + .wi-syn { margin-top: 0; padding: 4px 16px 14px; border-radius: 0 0 8px 8px; background: rgba(28, 27, 30, .4); }
.wi-card:not(:has(+ .wi-syn)) { border-radius: 8px; }
html[data-theme=light] .wi-card, html[data-theme=light] .wi-card + .wi-syn { background: #F4F4F5; }

/* ---- v1.16.3: Search › Titles / Characters (Miruro's tabs) ---- */
.sx-modes { display: flex; gap: 4px; padding: 10px var(--pad) 0; }
.sx-mode { height: 32px; padding: 0 14px; border-radius: 7px; font-size: 14px; font-weight: 600; color: #B5B2BC; }
.sx-mode.on { background: var(--surface2); color: #EEEEF0; }
html[data-theme=light] .sx-mode.on { background: #E4E4E7; color: #0B0B0C; }
.ch-card .card-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* v1.16.3: Discover's For You / Surprise me (Miruro's: quiet 39px buttons, the picked one lit) */
.dc-acts .btn { min-height: 39px; height: 39px; border-radius: 7px; border: 0; background: rgba(240, 240, 242, .06); color: #B5B2BC; font-size: 14px; font-weight: 600; }
.dc-acts .btn.primary { background: #EEEEF0; color: #121113; }
html[data-theme=light] .dc-acts .btn { background: #F4F4F5; color: #3F3F46; }
html[data-theme=light] .dc-acts .btn.primary { background: #18181B; color: #fff; }
@media (min-width: 900px) { html[data-layout=desktop] .top-search { width: 448px; height: 36px; border-radius: 8px; } }

/* ---- v1.16.3: the phone menu as Miruro's: a rounded panel dropping down from under the top bar (☰ becomes ✕),
   tiles with the icon over the word, the page you're on tinted lavender ---- */
.m-wrap { top: var(--m-top, 56px); }
.m-scrim { background: rgba(0, 0, 0, .4); }
.m-panel { top: 6px; right: 8px; bottom: auto; width: min(calc(100vw - 16px), 300px); max-height: calc(100vh - var(--m-top, 56px) - 16px); padding: 8px; gap: 8px;
  border: 1px solid #49474E; border-radius: 12px; background: #1A191B; transform: translateY(-8px); opacity: 0; transition: transform .18s ease, opacity .18s ease; }
.m-wrap.show .m-panel { transform: none; opacity: 1; }
.m-head { display: none; }
.m-prof { min-height: 52px; padding: 8px 12px; background: transparent; border: 1px solid rgba(73, 71, 78, .6); border-radius: 10px; }
.m-tile { flex-direction: column; justify-content: center; gap: 6px; min-height: 60px; padding: 8px; border-radius: 10px; background: transparent; border: 1px solid rgba(73, 71, 78, .6); font-size: 13px; text-align: center; }
.m-tile.on { background: rgba(186, 167, 255, .1); color: #EEEEF0; border-color: rgba(186, 167, 255, .35); }
.m-tile .m-dot { top: 4px; right: 6px; }
.m-rows { background: transparent; gap: 6px; }
.m-row, button.m-row { border: 1px solid rgba(73, 71, 78, .6); border-radius: 10px; min-height: 40px; }
.m-row + .m-row { border-top: 1px solid rgba(73, 71, 78, .6); }
html[data-theme=light] .m-panel { background: #fff; border-color: #E4E4E7; }
html[data-theme=light] .m-tile.on { background: rgba(109, 74, 255, .08); color: #0B0B0C; border-color: rgba(109, 74, 255, .35); }

/* ---- v1.16.4: the trailer at the top, beside About (Miruro's): a 608px box, its picture with a Play mark until you press it ---- */
.dx-top2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin: 26px 0 8px; }
.dx-top2 .dx-about { margin: 0; }
.dx-trailer .trailer-box { max-width: none; border-radius: 8px; }
.trailer-cover { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  background: #000 var(--tb) center / cover no-repeat; color: #fff; }
.trailer-cover::before { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .25); transition: background .15s; }
.trailer-cover:hover::before { background: rgba(0, 0, 0, .1); }
.trailer-cover .ic { position: relative; width: 56px; height: 56px; padding: 14px; border-radius: 999px; background: rgba(18, 17, 19, .7); box-sizing: content-box; }
@media (min-width: 900px) { html[data-layout=desktop] .dx-top2.has-trailer { grid-template-columns: minmax(0, 1fr) 608px; gap: 40px; } }
/* v1.16.4: the title's other sites, each with its logo */
.dx-link { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px 0 9px; }
.dx-link img { width: 18px; height: 18px; border-radius: 4px; flex: none; }

/* ---- v1.16.4: Discover, Miruro's way — the picked anime behind the whole page, blurred (44px, 55%) under a veil that
   darkens toward the edges; the pick glows in its own cover colour; the next ones dimmed until you point at them;
   the arrows show when you point at the stage ---- */
.page:has(.dc-stage) { position: relative; isolation: isolate; }
.dc-amb { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.dc-amb img { position: absolute; left: -7.5%; top: -7.5%; width: 115%; height: 115%; object-fit: cover; filter: blur(44px) saturate(1.15); opacity: .55; transition: opacity .4s; }
.dc-amb i { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, rgba(0, 0, 0, 0) 0%, rgba(18, 17, 19, .55) 55%, #121113 100%), linear-gradient(rgba(18, 17, 19, .4), rgba(18, 17, 19, .88)); }
html[data-theme=light] .dc-amb img { opacity: .35; }
html[data-theme=light] .dc-amb i { background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .55) 55%, #fff 100%), linear-gradient(rgba(255, 255, 255, .3), rgba(255, 255, 255, .85)); }
.dc-big { position: relative; border: 0; box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc, #BAA7FF) 45%, transparent), 0 0 16px color-mix(in srgb, var(--acc, #BAA7FF) 45%, transparent); transition: box-shadow .3s; }
.dc-big::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .25) 62%, rgba(0, 0, 0, .85) 98%); pointer-events: none; }
.dc-big:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc, #BAA7FF) 70%, transparent), 0 0 28px color-mix(in srgb, var(--acc, #BAA7FF) 55%, transparent); }
.dc-side { opacity: .7; border: 0; box-shadow: inset 0 0 0 1px rgba(240, 240, 242, .08); transition: opacity .2s; }
.dc-side:hover, .dc-side:focus-visible { opacity: 1; }
.dc-arrow { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity .2s; }
@media (hover: hover) { .dc-stage .dc-arrow { opacity: 0; } .dc-stage:hover .dc-arrow, .dc-stage .dc-arrow:focus-visible { opacity: 1; } }
.dc-acts .btn { border: 1px solid #49474E; background: rgba(240, 240, 242, .06); }
.dc-acts .btn.primary { border-color: transparent; }

/* ---- v1.16.4: Search › Studios / Staff / Characters (Miruro's): four across, 86px cards — a 64px picture, the name,
   the native name, what they do and a ♡ count; "Studios · Page 1" with arrows above, Prev / Next below ---- */
.sx-mode { display: inline-flex; align-items: center; gap: 7px; }
.sx-mode .ic { width: 16px; height: 16px; }
.ent-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--pad) 12px; font-size: 14px; color: #B5B2BC; }
.ent-pg { display: inline-flex; gap: 4px; }
.ent-pg .rp-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid #49474E; }
.ent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 0 var(--pad); }
.ent-card { display: flex; align-items: center; gap: 12px; min-height: 86px; padding: 10px; border-radius: 8px; border: 1px solid #49474E; background: rgba(28, 27, 30, .4); text-align: left; color: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.ent-card:hover { border-color: #6B6870; background: rgba(255, 255, 255, .04); }
.ent-pic { flex: none; width: 64px; height: 64px; border-radius: 6px; overflow: hidden; background: #232225; display: grid; place-items: center; color: #B5B2BC; position: relative; }
.ent-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ent-pic .ic { width: 22px; height: 22px; }
.ent-txt { min-width: 0; display: grid; gap: 3px; }
.ent-txt b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ent-txt small { font-size: 12px; color: #B5B2BC; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ent-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ent-chips i { font-style: normal; display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 4px; background: rgba(35, 34, 37, .8); font-size: 10.5px; font-weight: 600; color: #B5B2BC; }
.ent-chips .ic { width: 11px; height: 11px; }
.ent-chips .ent-show { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.ent-foot { display: flex; justify-content: center; gap: 8px; padding: 22px var(--pad) 8px; }
.ent-foot .btn { min-width: 92px; }
.ent-head { display: flex; align-items: center; gap: 12px; padding: 14px var(--pad); font-size: 16px; }
@media (min-width: 900px) { html[data-layout=desktop] .ent-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
html[data-theme=light] .ent-card { background: #fff; border-color: #E4E4E7; }
html[data-theme=light] .ent-chips i { background: #F4F4F5; color: #3F3F46; }
/* v1.16.4: line icons (the Announcements megaphone): drawn, not filled */
.ic.ic-line { fill: none !important; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- v1.16.4: History (Miruro's): the count under the title; Local / MAL; cards two across — a 208px picture with
   "EP 5" and a red line for how far along, a play mark when you point at it ---- */
.hist-top { display: flex; align-items: flex-end; justify-content: space-between; padding: 6px var(--pad) 14px; }
.hist-top small { display: block; margin-top: 2px; font-size: 14px; }
.hist-src { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border: 1px solid #49474E; border-radius: 8px; }
.hist-src button { height: 32px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; color: #B5B2BC; }
.hist-src button .ic { width: 14px; height: 14px; }
.hist-src button.on { background: #232225; color: #EEEEF0; }
.hist-st-mal select { color: #4ADE80; }
.hist-what summary { cursor: pointer; font-size: 12px; color: #B5B2BC; margin-top: 6px; }
.hist-what[open] summary { margin-bottom: 4px; }
.hist-what .hist-help { display: block; }
.hc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; background: none; border: 0; padding: 0; }
.hist.hc { position: relative; display: block; padding: 0; border: 1px solid rgba(73, 71, 78, .8); border-radius: 8px; overflow: hidden; background: rgba(28, 27, 30, .5); }
.hist.hc + .hist.hc { border-top: 1px solid rgba(73, 71, 78, .8); }
.hc .hist-main { display: flex; align-items: stretch; gap: 0; width: 100%; padding: 0; text-align: left; min-height: 117px; }
.hc .hist-art { position: relative; flex: none; width: 208px; height: auto; min-height: 117px; aspect-ratio: auto; border-radius: 0; overflow: hidden; background: #232225; }
.hc .hist-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hc-ep { position: absolute; left: 6px; top: 6px; padding: 2px 6px; border-radius: 4px; background: rgba(18, 17, 19, .85); font-size: 10px; font-weight: 700; color: #EEEEF0; }
.hc-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .25); opacity: 0; transition: opacity .15s; }
.hc-play .ic { width: 22px; height: 22px; padding: 9px; border-radius: 999px; background: #fff; color: #121113; box-sizing: content-box; }
.hc:hover .hc-play { opacity: 1; }
.hc .hist-art .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .15); border-radius: 0; }
.hc .hist-art .bar i { background: #FF0000; }
.hc .hist-text { flex: 1; min-width: 0; display: grid; align-content: center; gap: 4px; padding: 10px 44px 10px 12px; }
.hc .hist-text b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc .hist-text > span:not(.hc-chips) { font-size: 12px; color: #B5B2BC; }
.hc .hist-text s { text-decoration: none; margin: 0 3px; }
.hc .hist-text small { font-size: 11px; color: #8A8792; }
.hc-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hc-chips i { font-style: normal; display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 4px; background: rgba(35, 34, 37, .9); font-size: 11px; font-weight: 600; color: #B5B2BC; }
.hc-chips .ic { width: 12px; height: 12px; }
.hc:hover { border-color: #6B6870; }
.hc:hover .hist-text b { color: #BAA7FF; }
.hist-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 999px; background: rgba(35, 34, 37, .9); }
.hist-x .ic { width: 15px; height: 15px; }
@media (min-width: 900px) { html[data-layout=desktop] .hc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } html[data-layout=desktop] .page:has(.hist-wrap) { max-width: 1300px; } }
@media (max-width: 599px) { .hc .hist-art { width: 150px; } }
html[data-theme=light] .hist.hc { background: #fff; border-color: #E4E4E7; }

/* v1.16.4 — Profile is Miruro's list view (banner: gear + log out); every setting lives in Settings (the gear) */
.pf-gear.pf-out { right: 56px; }
.st-nav { overflow-y: auto; min-height: 0; }
.st-pf .list { margin: 0 0 12px; }
.st-pf .hint, .st-pf .foot { margin: 8px 0; }
.pf-list { margin-top: 18px; }
.pf-nolist { display: grid; justify-items: center; gap: 12px; margin: 28px auto; max-width: 520px; text-align: center; }
.pf-nolist .btn { display: inline-flex; align-items: center; gap: 8px; }
.tabbar .rail-gear { cursor: pointer; }
@media (min-width: 900px) { .sheet.st-sheet { max-width: 820px; width: min(820px, 100vw); } .st-wrap { grid-template-columns: 170px minmax(0, 1fr); max-height: 74vh; } }

/* v1.16.4 — Notifications, cleaned up (phones first): icon · title, text, time · › in a tidy card; the unread dot on the icon */
.notes { display: grid; gap: 8px; }
.notes .note.list-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; align-items: start; column-gap: 12px; margin: 0; padding: 14px; border-radius: 12px; background: #171619; border: 1px solid rgba(255, 255, 255, .08); }
.notes .note.list-row.new { background: #1D1B21; border-color: rgba(186, 167, 255, .28); }
.notes .note.list-row > .note-ic { flex: none; position: relative; width: 40px; height: 40px; margin: 0; border-radius: 10px; background: rgba(186, 167, 255, .12); color: #BAA7FF; display: grid; place-items: center; }
.notes .note.list-row > .note-ic .ic { width: 20px; height: 20px; margin: 0; color: inherit; }
.notes .note.list-row.new > .note-ic::after { content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: #BAA7FF; box-shadow: 0 0 0 2px #1D1B21; }
.notes .note.new .note-title::before { content: none; }
.notes .note.list-row > .note-text { display: grid; gap: 4px; min-width: 0; align-items: start; }
.notes .note .note-title { display: block; font-size: 15px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes .note .note-body { font-size: 13.5px; color: #B5B2BC; }
.notes .note .note-text small { font-size: 12px; color: #8B8794; }
.notes .note.list-row > .ic:last-child { width: 16px; height: 16px; margin: 12px 0 0; color: #8B8794; }
.nt-read { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nt-read .ic { width: 16px; height: 16px; }
.top .top-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .nt-read { width: 40px; height: 40px; min-height: 0; padding: 0; justify-content: center; border-radius: 999px; }
  .nt-read span { display: none; }
  .nt-read .ic { width: 20px; height: 20px; }
  .chips:has(.chip[data-act=note-filter]) .chip { min-height: 32px; padding: 4px 12px; font-size: 13px; }
}
.list.notes { background: none; border: 0; box-shadow: none; overflow: visible; padding: 0; margin-top: 12px; }
.list.notes .note.list-row + .note.list-row { border-top: 1px solid rgba(255, 255, 255, .08); }

/* v1.16.4 (Miruro): the top bar stays at the top as you scroll — clear over the big picture, solid once you've scrolled */
body:has(.hx) .home-top, html[data-layout=touch] .hero-top { position: fixed; z-index: 30; transition: background-color .2s ease, border-color .2s ease; }
html[data-layout=touch] .hero-top { padding-bottom: 6px; }
body.scrolled:has(.hx) .home-top, html[data-layout=touch] body.scrolled .hero-top { background: rgba(15, 15, 17, .94) !important; border-bottom: 1px solid rgba(42, 42, 48, .6) !important; }
html[data-theme=light] body.scrolled:has(.hx) .home-top, html[data-theme=light] body.scrolled .hero-top { background: rgba(244, 246, 249, .94) !important; }

/* v1.16.4 (Miruro's watch page): Sub / Dub · Source · ⋯ as small menus under their buttons */
.wi-btns .wi-dd { height: 40px; padding: 0 12px; gap: 8px; border-radius: 8px; background: transparent; border: 1px solid rgba(255, 255, 255, .14); font-size: 13px; font-weight: 600; }
.wi-btns .wi-dd .ic { width: 16px; height: 16px; }
.wi-btns .wi-dd > .ic:last-child { width: 14px; height: 14px; opacity: .7; }
.wi-btns .wi-dd span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wi-btns .wi-dd-more { width: 40px; padding: 0; justify-content: center; }
.wi-btns .wi-dd-more > .ic:last-child { width: 18px; height: 18px; opacity: 1; }
.wi-pop { position: absolute; z-index: 80; min-width: 230px; max-width: min(360px, calc(100vw - 16px)); max-height: 60vh; overflow-y: auto; padding: 6px; border-radius: 10px; background: #1A191B; border: 1px solid #2E2D31; box-shadow: 0 16px 40px rgba(0, 0, 0, .55); }
.wi-pop-h { margin: 6px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8B8794; }
.wi-pop-i { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border-radius: 7px; text-align: left; font-size: 14px; color: #EEEEF0; }
.wi-pop-i:hover { background: rgba(255, 255, 255, .06); }
.wi-pop-i > .ic:first-child, .wi-pop-i > i { width: 16px; height: 16px; flex: none; color: #B5B2BC; }
.wi-pop-i > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wi-pop-i em { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .14); color: #B5B2BC; }
.wi-pop-i em.dub { color: #F0B47A; border-color: rgba(240, 180, 122, .35); }
.wi-pop-i em.sub { color: #9FB4D9; border-color: rgba(159, 180, 217, .3); }
.wi-pop-i > .ic:last-child { width: 16px; height: 16px; color: #EEEEF0; }
.wi-pop-i > b { width: 16px; flex: none; }
.wi-pop-i.wait { color: #B5B2BC; }
.wi-pop-i.wait .spinner { width: 14px; height: 14px; }
.st-range { display: grid; gap: 6px; margin: 14px 0 10px; }
.st-range > span { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.st-range output { font-weight: 600; color: #BAA7FF; }
.st-range input[type=range] { width: 100%; accent-color: #BAA7FF; height: 28px; }
.st-range small { font-size: 12px; color: #B5B2BC; }

/* v1.16.11: a fixed report asks its reporter — Fixed / Not fixed */
.pr-confirm { margin-top: 10px; padding: 12px; border-radius: 10px; background: rgba(186, 167, 255, .1); border: 1px solid rgba(186, 167, 255, .3); }
.pr-confirm p { margin: 0 0 8px; font-size: 14px; }
.pr-confirm-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-confirm-btns .btn { display: inline-flex; align-items: center; gap: 6px; }
.pr-confirmed { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; color: #B5B2BC; }
.pr-confirmed.ok { color: #7CF29A; }
.pr-confirmed.no { color: #F0B47A; }
.pr-confirmed .ic { width: 16px; height: 16px; }
/* v1.16.14: a film's place in its series */
.film-series-head { margin: 4px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #9aa); }
.seasons.film-series { margin-bottom: 12px; }
/* v1.16.15: the sleep timer's "Still watching?" */
.p-sleepask { position: absolute; inset: 0; display: grid; place-items: center; z-index: 30; background: rgba(0,0,0,.35); }
.p-sleepask-card { background: rgba(24,24,27,.94); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 22px 24px; max-width: min(420px, calc(100% - 32px)); text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.p-sleepask-t { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.p-sleepask-c { font-size: 14px; color: #a1a1aa; margin-bottom: 16px; }
.p-sleepask-b { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* v1.16.26: Windows app — a Roku is connected to this PC */
.roku-link { position: fixed; left: 16px; bottom: calc(var(--tab-h, 56px) + 12px); z-index: 60; padding: 6px 12px 6px 26px; border-radius: 999px; background: rgba(20,20,24,.88); color: #EDEDEF; font-size: 13px; pointer-events: none; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.roku-link::before { content: ''; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #3DDC84; }
.roku-link.live::before { animation: rokuPulse 1.4s ease-in-out infinite; }
@keyframes rokuPulse { 50% { opacity: .35; } }

/* v1.16.40: the sharing choice on Create account */
.auth-form .auth-share { display: flex; align-items: center; gap: 12px; padding: 10px 0 4px; text-align: left; }
.auth-form .auth-share .row-text { flex: 1; min-width: 0; }
.auth-form .auth-share small { display: block; opacity: .7; font-size: 12px; line-height: 1.35; margin-top: 2px; }

/* ---------- v1.17.0: Read — the section (rows, the title page, sources) ---------- */
.rd-chips { display: flex; gap: 8px; padding: 6px var(--pad) 0; overflow-x: auto; scrollbar-width: none; }
.rd-chips::-webkit-scrollbar { display: none; }
.card .poster.book { aspect-ratio: 2 / 3; }
.card .rd-kind { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 10.5px; font-weight: 750; letter-spacing: .02em; }
.read-search { display: flex; gap: 8px; padding: 8px var(--pad) 4px; }
.read-search .field { min-height: 44px; }
.src-list { margin: 8px var(--pad); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.src-list .list-row small { color: var(--muted); font-size: 12.5px; }
.src-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--surface2); display: grid; place-items: center; flex: none; overflow: hidden; }
.src-ico img { width: 100%; height: 100%; object-fit: cover; }
.src-tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--surface2); color: var(--muted); }
.feed-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 8px var(--pad); }
.feed-nav .list-row { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.feed-more { display: flex; justify-content: center; gap: 10px; padding: 12px var(--pad) 20px; }
.rt-hero { display: grid; grid-template-columns: 132px 1fr; gap: 16px; padding: 14px var(--pad) 6px; align-items: start; }
.rt-cover { position: relative; width: 132px; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--surface2); display: grid; place-items: center; font-size: 40px; font-weight: 800; color: var(--muted); }
.rt-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rt-info h1 { margin: 0 0 4px; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; }
.rt-info .muted { font-size: 14px; }
.rt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.rt-chips i { font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--surface2); color: var(--muted); }
.rt-btns { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px var(--pad); }
.rt-desc { padding: 6px var(--pad); color: var(--text); opacity: .9; line-height: 1.5; white-space: pre-line; max-width: 72ch; }
.rt-desc.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.rt-sec { margin: 14px var(--pad) 0; }
.rt-sec h2 { font-size: 17px; margin: 0 0 8px; }
.rt-list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ch-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 8px 12px; border-top: 1px solid var(--line); text-align: left; }
.ch-row:first-child { border-top: 0; }
.ch-row .ch-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-height: 40px; justify-content: center; }
.ch-row .ch-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-row .ch-main small { color: var(--muted); font-size: 12.5px; }
.ch-row.read .ch-main b { color: var(--muted); }
.ch-row.cur { box-shadow: inset 3px 0 0 var(--accent); }
.ch-mark { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; color: var(--muted); flex: none; }
.ch-mark.on { color: var(--accent); }
.legal-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.legal-links .btn { justify-content: space-between; font-size: 14px; }
.legal-links .btn.dim { opacity: .7; }
.list-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.list-pill b { color: var(--accent); }
.rd-help { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 6px 0; }
.rd-help code { font-size: 12px; background: var(--surface2); padding: 1px 5px; border-radius: 5px; }
.src-form { display: grid; gap: 8px; margin-top: 8px; }
.src-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cr-card .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); }
@media (min-width: 900px) { .rt-hero { grid-template-columns: 200px 1fr; } .rt-cover { width: 200px; } .rt-info h1 { font-size: 30px; } }
html[data-layout=tv] .rt-hero { grid-template-columns: 220px 1fr; } html[data-layout=tv] .rt-cover { width: 220px; }
html[data-layout=tv] .ch-row { min-height: 64px; font-size: 20px; }

/* ---------- v1.17.0: the reader (full screen) ---------- */
body.reading { overflow: hidden; }
body.reading #view, body.reading #tabbar, body.reading .winbar ~ #view { visibility: hidden; }
.rd { position: fixed; inset: 0; z-index: 90; background: var(--rd-bg, #000); color: #e8e8ea; overflow: hidden; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.rd[data-bg=white], .rd[data-bg=sepia], .rd[data-bg=light] { color: #222; }
.rd-defs { position: absolute; width: 0; height: 0; }
.rd-stage { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; display: flex; }
.rd-stage::-webkit-scrollbar { display: none; }
.rd-page { margin: auto; display: flex; gap: 0; justify-content: center; align-items: center; transform-origin: center center; transition: transform .12s ease-out; will-change: transform; }
.rd[data-mode=rtl] .rd-page.two { flex-direction: row-reverse; }
.rd-page img { display: block; background: transparent; }
.rd-page img.rd-bad, .rd-vp img.rd-bad { min-width: 200px; min-height: 280px; background: repeating-linear-gradient(45deg, #222 0 10px, #2a2a2e 10px 20px); }
.rd.sharpen .rd-page img, .rd.sharpen .rd-vp img { filter: url(#rd-sharp); }
.fit-screen .rd-page { width: 100%; height: 100%; }
.fit-screen .rd-page img { width: 100%; height: 100%; object-fit: contain; }
.fit-screen .rd-page.two img { width: 50%; }
.rd[data-mode=rtl] .fit-screen .rd-page.two img:first-child { object-position: left center; } .rd[data-mode=rtl] .fit-screen .rd-page.two img:last-child { object-position: right center; }
.rd[data-mode=ltr] .fit-screen .rd-page.two img:first-child { object-position: right center; } .rd[data-mode=ltr] .fit-screen .rd-page.two img:last-child { object-position: left center; }
.fit-height .rd-page { height: 100%; }
.fit-height .rd-page img { height: 100%; width: auto; max-width: none; }
.fit-width .rd-page { width: 100%; margin: 0 auto; align-items: flex-start; }
.fit-width .rd-page img { width: 100%; height: auto; }
.fit-width .rd-page.two img { width: 50%; }
.fit-original .rd-page img { max-width: none; }
.rd-page.zoomed { transition: none; }
.rd[data-mode=vertical] .rd-stage { display: block; touch-action: pan-y pinch-zoom; }
.rd-strip { width: min(var(--rd-w, 100%), 100%); margin: 0 auto; display: flex; flex-direction: column; gap: var(--rd-gap, 0px); }
.rd-strip { width: var(--rd-w, 100%); max-width: none; }
.fit-width .rd-strip { max-width: 100%; }
.rd-vp { min-height: 60vh; width: 100%; display: flex; justify-content: center; }
.rd-vp:has(img[src]) { min-height: 0; }
.rd-vp img { width: 100%; height: auto; display: block; }
.fit-original .rd-vp img { width: auto; max-width: 100%; }
.rd-end { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px 24px; text-align: center; color: #e8e8ea; margin: auto; }
.rd[data-bg=white] .rd-end, .rd[data-bg=sepia] .rd-end { color: #222; }
.rd-bookstage { display: block; }
.rd-book { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--rd-bg); }
.rd[data-mode=ltr] .rd-book, .rd[data-mode=rtl] .rd-book { pointer-events: none; }
.rd-tapper { position: absolute; inset: 0; }
.rd[data-mode=vertical] .rd-tapper { display: none; }
.rd-dim { position: absolute; inset: 0; background: #000; opacity: var(--rd-dim, 0); pointer-events: none; z-index: 2; }
.rd-line { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .2s; }
.rd.line-on:not(.hud) .rd-line { opacity: .85; }
.rd-line i { display: block; height: 100%; background: var(--accent, #B9A4FF); }
.rd-line[dir=rtl] i { margin-left: auto; }
.rd-top, .rd-bot { position: absolute; left: 0; right: 0; z-index: 4; display: flex; align-items: center; gap: 6px; padding: 8px calc(var(--safe-r) + 10px) 8px calc(var(--safe-l) + 10px);
  background: rgba(12, 12, 14, .86); color: #f1f1f3; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .22s ease, opacity .22s ease; }
.rd-top { top: 0; padding-top: calc(var(--safe-t) + 6px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.rd-bot { bottom: 0; padding-bottom: calc(var(--safe-b) + 8px); border-top: 1px solid rgba(255, 255, 255, .06); }
.rd:not(.hud) .rd-top { transform: translateY(-110%); opacity: 0; pointer-events: none; }
.rd:not(.hud) .rd-bot { transform: translateY(110%); opacity: 0; pointer-events: none; }
.rd-top .icon-btn, .rd-bot .icon-btn { color: #f1f1f3; }
.rd-top .icon-btn.on { color: var(--accent, #B9A4FF); }
.rd-bot [data-rd=next-ch] .ic, .rd-bot [data-rd=prev-ch] .ic { width: 24px; height: 24px; }
.rd-bot .icon-btn[disabled] { opacity: .3; }
.rd-zoom { font-size: 24px; font-weight: 700; line-height: 1; }
@media (pointer: coarse) { .rd-bot [data-zoom] { display: none; } }
.rd-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.rd-titles b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-titles small { font-size: 12.5px; color: #a8a8b0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-seek { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: stretch; }
.rd-seek input { width: 100%; accent-color: var(--accent, #B9A4FF); }
.rd-seek span { font-size: 12.5px; color: #c4c4cc; text-align: center; font-variant-numeric: tabular-nums; }
.rd-msg { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; text-align: center; color: #e8e8ea; pointer-events: none; }
.rd-msg .btn { pointer-events: auto; }
.rd-msg.err { background: rgba(0, 0, 0, .6); pointer-events: auto; }
.rd-sheet { position: absolute; inset: 0; z-index: 6; display: flex; justify-content: flex-end; background: rgba(0, 0, 0, .35); }
.rd-sheet-in { width: min(420px, 100%); height: 100%; overflow-y: auto; background: #161618; color: #ececef; padding: calc(var(--safe-t) + 8px) 14px calc(var(--safe-b) + 24px); box-shadow: -12px 0 40px rgba(0, 0, 0, .45); }
.rd-sheet-head { display: flex; align-items: center; gap: 8px; position: sticky; top: calc(-8px - var(--safe-t)); background: #161618; padding: 6px 0; z-index: 1; }
.rd-sheet-head b { flex: 1; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-sheet-head .icon-btn { color: #ececef; }
.rd-sheet h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #9a9aa2; margin: 18px 0 8px; }
.rd-sheet .st-tile { color: #cfcfd6; border-color: #3a3a40; }
.rd-sheet .st-tile.on { background: var(--accent, #B9A4FF); color: #160f2c; border-color: transparent; }
.rd-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 8px 12px; border-radius: 10px; text-align: left; color: #ececef; }
.rd-row.on { background: rgba(255, 255, 255, .08); }
.rd-row .ic { width: 18px; height: 18px; color: var(--accent, #B9A4FF); }
.rd-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-dot { width: 18px; height: 18px; flex: none; display: inline-grid; place-items: center; }
.rd-dot::after { content: ''; width: 6px; height: 6px; border-radius: 3px; background: #55555c; }
.rd-sw { display: flex; align-items: center; gap: 12px; justify-content: space-between; min-height: 48px; font-size: 14.5px; }
.rd-rng { display: grid; gap: 6px; margin: 10px 0; font-size: 14.5px; }
.rd-rng span { display: flex; justify-content: space-between; }
.rd-rng input { width: 100%; accent-color: var(--accent, #B9A4FF); }
.rd-note { font-size: 13px; color: #9a9aa2; margin: 8px 0 0; }
.rd-note .link { font-size: 13px; min-height: 0; padding: 0; text-align: left; }
.rd-stepper { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rd-stepper span { min-width: 60px; text-align: center; font-variant-numeric: tabular-nums; }
.rd .icon-btn:focus-visible, .rd .btn:focus-visible, .rd-row:focus-visible, .rd .st-tile:focus-visible, .rd input:focus-visible { outline: 3px solid var(--accent, #B9A4FF); outline-offset: 2px; }
html[data-layout=tv] .rd-top .icon-btn, html[data-layout=tv] .rd-bot .icon-btn { width: 60px; height: 60px; }
html[data-layout=tv] .rd-titles b { font-size: 22px; } html[data-layout=tv] .rd-row { min-height: 60px; font-size: 20px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* v1.17.0 */
/* v1.17.3: Watch order — a franchise's entries in release or story order (the existing cards, chips and series heads) */
.wo-head { margin-top: 4px; margin-bottom: 8px; }
.wo-switch { margin: 0 0 10px; padding: 0; overflow: visible; flex-wrap: wrap; }
.wo-note { margin: 0 0 10px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.wo-group { margin-top: 14px; }
.wo-group.branch { border-left: 2px solid var(--line); padding-left: 12px; }
.wo-group .film-series-head { margin-top: 0; }
.wo-row { margin-bottom: 4px; }
.wo-card.on .poster { box-shadow: 0 0 0 3px var(--accent); }
.wo-card.on .card-sub { color: var(--text); font-weight: 700; }
.wo-card.wo-done .card-name { color: var(--muted); }
.wo-notes { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); }
.wo-notes b { color: var(--text); font-variant-numeric: tabular-nums; margin-right: 4px; }
.watch-main .wo { margin-top: 22px; }
html[data-layout=tv] .wo-switch .chip:focus { outline: 4px solid var(--accent); outline-offset: 2px; }
/* v1.17.4: Settings › Sound › Tune your Boost — presets, the seven-band curve (drag a point, or ↑ ↓ on it), the test reel */
.bq-top { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; }
.bq-pre { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; font-weight: 500; }
.sheet .bq-pre select { flex: 1; min-width: 0; max-width: 280px; min-height: 0; height: 40px; margin: 0; padding: 0 36px 0 12px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.bq-reset { flex: none; min-height: 36px; padding: 0 16px; border-radius: 18px; }
.st-panes p.bq-sub { margin: 4px 0 10px; }
.bq-eq { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: 190px auto; margin: 6px 0 10px; padding: 14px 12px 6px 4px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(73, 71, 78, .6); }
.bq-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; font-weight: 600; color: #B5B2BC; text-align: right; padding-right: 8px; margin: -7px 0; }
.bq-plot { position: relative; touch-action: none; cursor: ns-resize; user-select: none; -webkit-user-select: none; }
.bq-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bq-grid { stroke: rgba(181, 178, 188, .18); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bq-zero { stroke: rgba(181, 178, 188, .35); }
.bq-s1 { stop-color: var(--violet, #B9A4FF); stop-opacity: .55; }
.bq-s2 { stop-color: var(--violet, #B9A4FF); stop-opacity: .04; }
.bq-area { fill: url(#bq-fill); }
.bq-line { fill: none; stroke: var(--violet, #B9A4FF); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.bq-pt { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; display: grid; place-items: center; touch-action: none; }
.bq-pt::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 0 2px var(--violet, #B9A4FF), 0 1px 4px rgba(0, 0, 0, .5); transition: transform .12s; }
.bq-pt:hover::after, .bq-pt:focus-visible::after { transform: scale(1.35); }
.bq-pt:focus-visible { outline: 2px solid var(--violet, #B9A4FF); outline-offset: -4px; }
.bq-tip { position: absolute; transform: translate(-50%, calc(-100% - 16px)); padding: 4px 8px; border-radius: 6px; background: #EEEEF0; color: #0F0F11; font-size: 12px; font-weight: 700; white-space: nowrap; pointer-events: none; z-index: 2; }
.bq-x { grid-column: 2; position: relative; height: 38px; margin-top: 6px; }
.bq-x span { position: absolute; transform: translateX(-50%); display: grid; justify-items: center; line-height: 1.2; white-space: nowrap; }
.bq-x b { font-size: 11.5px; font-weight: 700; color: #D5D3DA; }
.bq-x small { font-size: 10.5px; color: #B5B2BC; }
.bq-rng small { font-size: 12px; color: #B5B2BC; }
.bq-play { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; }
.bq-play .btn { min-width: 110px; }
.bq-ab { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex: 1; min-width: 200px; max-width: 320px; }
.st-panes p.bq-note { margin-top: 6px; color: var(--amber); }
.st-panes p.bq-note:empty { display: none; }
html[data-theme=light] .bq-eq { background: rgba(0, 0, 0, .02); border-color: #D4D4D8; }
html[data-theme=light] .bq-y, html[data-theme=light] .bq-x small, html[data-theme=light] .bq-rng small { color: #52525B; }
html[data-theme=light] .bq-x b { color: #27272A; }
html[data-theme=light] .bq-grid { stroke: rgba(63, 63, 70, .15); }
html[data-theme=light] .bq-zero { stroke: rgba(63, 63, 70, .3); }
html[data-theme=light] .bq-tip { background: #18181B; color: #FFFFFF; }
@media (max-width: 600px) { .bq-eq { grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: 170px auto; padding-right: 8px; } .bq-y { font-size: 10px; padding-right: 4px; } .bq-x b { font-size: 10px; } .bq-x small { font-size: 9px; } .bq-pt { width: 32px; height: 32px; margin: -16px 0 0 -16px; } }
html[data-layout=tv] .bq-eq { grid-template-rows: 240px auto; } html[data-layout=tv] .bq-pt::after { width: 16px; height: 16px; }
/* v1.17.4: a long Settings pane scrolls inside the sheet (it ran past it, under Close) */
.st-wrap { grid-template-rows: minmax(0, 1fr); }
.st-panes { min-height: 0; }
@media (max-width: 600px) { .st-wrap { grid-template-rows: auto; } }

/* ---- v1.17.10: Multiview — up to 4 streams at once (2×2, or 1 big + small); the sound follows the tile you pick */
.card .card-mv { left: 8px; right: auto; z-index: 2; }
.mv { padding: 0 var(--pad, 16px) 24px; display: grid; gap: 10px; }
.mv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mv-bar .btn { gap: 6px; }
.mv-bar .btn .ic { width: 18px; height: 18px; }
.mv-bar .btn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mv-count { font-size: 12px; font-weight: 700; opacity: .75; margin-left: 2px; }
.mv-sp { flex: 1; }
.mv-lay { display: inline-flex; gap: 6px; }
.mv-hint { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.mv-note { margin: 0; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.mv-note .ic { width: 16px; height: 16px; }
.mv-grid { display: grid; gap: 6px; height: calc(100vh - 170px); height: calc(100dvh - 170px); min-height: 240px; }
.mv-grid[hidden] { display: none; }
html[data-layout=touch] .mv-grid { height: calc(100dvh - 190px - env(safe-area-inset-bottom)); }
.mv-tile { position: relative; min-width: 0; min-height: 0; border-radius: 12px; overflow: hidden; background: #000; border: 2px solid transparent; outline: none; cursor: pointer; }
.mv-tile.audio { border-color: var(--accent); }
.mv-tile:focus-visible { box-shadow: 0 0 0 3px #fff; }
.mv-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.mv-tile:fullscreen .mv-v { object-fit: contain; }
.mv-spin { position: absolute; inset: 0; display: none; place-items: center; pointer-events: none; }
.mv-tile.loading .mv-spin { display: grid; }
.mv-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,0)); color: #fff; pointer-events: none; }
.mv-ttl { min-width: 0; display: grid; line-height: 1.2; flex: 1; }
.mv-ttl b, .mv-ttl small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-ttl b { font-size: 14px; }
.mv-ttl small { font-size: 12px; opacity: .8; }
.mv-badge { flex: none; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.55); font-variant-numeric: tabular-nums; }
.mv-badge:empty { display: none; }
.mv-badge.live { background: #DC2626; display: inline-flex; align-items: center; gap: 5px; letter-spacing: .04em; }
.mv-badge.live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: livePulse 1.6s ease-in-out infinite; }
.mv-spk { flex: none; display: none; width: 28px; height: 28px; border-radius: 14px; place-items: center; background: var(--accent); color: var(--accent-ink); }
.mv-spk .ic { width: 16px; height: 16px; }
.mv-tile.audio .mv-spk { display: grid; }
.mv-ctl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 6px; padding: 8px; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.72)); opacity: 0; transition: opacity .15s; }
.mv-tile:hover .mv-ctl, .mv-tile:focus-within .mv-ctl, .mv-tile.cant .mv-ctl, html[data-layout=touch] .mv-ctl { opacity: 1; }
.mv-b { width: 38px; height: 38px; border-radius: 19px; display: grid; place-items: center; background: rgba(20,20,22,.8); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.mv-b .ic { width: 18px; height: 18px; }
.mv-b:hover, .mv-b:focus-visible { background: #fff; color: #0B0B0C; }
.mv-b[data-mv=mute][aria-pressed=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mv-tile.big .mv-b[data-mv=big] { opacity: .45; }
.mv-msg { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; padding: 48px 14px 60px; text-align: center; background: rgba(15,15,17,.92); color: var(--text); }
.mv-msg[hidden] { display: none; }
.mv-msg p { margin: 0; font-size: 14px; font-weight: 600; }
.mv-msg-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mv-empty .btn { display: inline-flex; gap: 6px; }
/* small tiles: smaller type and buttons */
.mv-grid[data-n="3"] .mv-tile:not(.big) .mv-b, .mv-grid[data-n="4"] .mv-tile:not(.big) .mv-b { width: 32px; height: 32px; }
.mv[data-layout=focus] .mv-tile:not(.big) .mv-ttl small { display: none; }
@media (max-width: 599px) {
  .mv-bar .btn span { font-size: 13px; }
  .mv-lay .btn span { display: none; }
  .mv-b { width: 32px; height: 32px; }
  .mv-ctl { gap: 4px; padding: 6px; }
}
/* the Add stream picker */
.mv-pl { display: grid; gap: 6px; max-height: 60vh; overflow: auto; margin-bottom: 8px; }
.mv-pl h4 { margin: 10px 0 2px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.mv-pi { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line); min-height: 52px; }
.mv-pi img, .mv-pi-ph { width: 54px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; background: var(--surface); }
.mv-pi-t { min-width: 0; flex: 1; display: grid; }
.mv-pi-t b, .mv-pi-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-pi-t b { display: flex; align-items: center; gap: 6px; }
.mv-pi-t small { color: var(--muted); font-size: 12px; }
.mv-pi.no { opacity: .6; }
.mv-pi > .ic { width: 18px; height: 18px; flex: none; color: var(--accent); }
.mv-pi:hover, .mv-pi:focus-visible { border-color: var(--accent); }
.mv-q { display: flex; align-items: center; gap: 8px; }
.mv-q .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.mv-none { margin: 4px 2px; color: var(--muted); font-size: 14px; }
html[data-layout=desktop] .page:has(.mv[data-mv-page]) { max-width: none; }
/* v1.17.11: a live game drawn as the game on its card — upright like every other card: the away team's logo, "@", the
   home team's, on their colours (as the calendar), the start in this device's own time (or LIVE · Q2 7:45, or Final) */
.lv-art { position: relative; overflow: hidden; container-type: inline-size; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 6% 6% 24%; background: linear-gradient(180deg, var(--c1) 0%, var(--c1) 49%, var(--c2) 51%, var(--c2) 100%); }
.lv-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .4)); pointer-events: none; }
.lv-team { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; max-width: 100%; }
.lv-logo { width: 40px; width: 40cqw; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.lv-logo > * { grid-area: 1 / 1; }
.lv-art .lv-logo img { position: static; inset: auto; width: 78%; height: 78%; object-fit: contain; }
.lv-logo b { display: none; font-size: 11px; font-size: 10cqw; font-weight: 800; color: #111; }
.lv-logo.nologo b, .lv-logo:not(:has(img)) b { display: block; }
.lv-name { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; font-size: 9cqw; font-weight: 800; line-height: 1.15;
  letter-spacing: .03em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.lv-score { font-style: normal; font-size: 1.25em; letter-spacing: 0; }
.lv-sep { position: relative; z-index: 1; font-style: normal; font-size: 10px; font-size: 9cqw; font-weight: 800; color: rgba(255, 255, 255, .9); text-transform: uppercase; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.lv-when { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 4px;
  background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; font-size: 10cqw; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-when.live { background: #DC2626; }
.lv-when.live i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: livePulse 1.6s ease-in-out infinite; }
.lv-when.final { background: rgba(15, 15, 17, .82); color: #E4E4E7; }
@media (prefers-reduced-motion: reduce) { .lv-when.live i { animation: none; } }
.detail-poster.lv-art { display: flex; height: auto; }
html[data-layout=desktop] .detail.dx .detail-poster.lv-art { display: flex; }
.lv-line { margin: 2px 0 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.lv-line.live { color: #F87171; }
html[data-theme=light] .lv-line.live { color: #B91C1C; }
/* v1.17.11: a live listing that isn't a game we know: the addon's own (wide) picture shown whole, on a blurred copy of it */
.poster.lv-fit { background: #0B0D12; }
.poster.lv-fit img.lv-blur { object-fit: cover; filter: blur(14px) brightness(.55); transform: scale(1.3); }
.poster.lv-fit img.lv-img { object-fit: contain; }

/* v1.17.15: nothing on a title page widens it past the screen — a long "Part of the series" row (Kizumonogatari's
   ten) stretched the page and the phone zoomed out to fit it */
html[data-layout=touch] .dx-body { grid-template-columns: minmax(0, 1fr); }
html[data-layout=touch] .dx-body > *, html[data-layout=touch] .detail.dx > *, html[data-layout=touch] .dx-sec { min-width: 0; max-width: 100%; }
html[data-layout=touch] .detail, html[data-layout=touch] .watch { max-width: 100vw; overflow-x: clip; }
/* v1.17.28: the same on a TV — a long watch order or series row stretched the TV's title page sideways (the two
   language menus 2,000 px wide), and the remote's ↑ from that row jumped past Release / Story order */
html[data-layout=tv] .dx-body { grid-template-columns: minmax(0, 1fr); }
html[data-layout=tv] .dx-body > *, html[data-layout=tv] .detail.dx > *, html[data-layout=tv] .dx-sec { min-width: 0; max-width: 100%; }

/* v1.17.23: the Windows app, easy to find — a band on Home, a filled header button, a lit rail button */
.win-banner { display: flex; align-items: center; gap: 14px; margin: 14px 16px 18px; position: relative; z-index: 2; padding: 14px 16px; border-radius: 14px; background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 8%, transparent)); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.win-banner-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.win-banner-ic .ic { width: 22px; height: 22px; }
.win-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.win-banner-text b { font-size: 16px; }
.win-banner-text small { color: var(--muted); font-size: 13px; }
.win-banner .btn.primary { flex: none; gap: 8px; white-space: nowrap; }
.win-banner-x { flex: none; }
@media (max-width: 760px) { .win-banner { flex-wrap: wrap; } .win-banner .btn.primary { flex: 1 1 100%; justify-content: center; order: 3; } }
html[data-theme=light] .win-banner { background: linear-gradient(100deg, rgba(11, 133, 119, .14), rgba(11, 133, 119, .04)); border-color: rgba(11, 133, 119, .45); }
.top .install-btn.win-get { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
html[data-layout=desktop] .tabbar a.rail-install { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent), 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); margin-top: 6px; }
html[data-layout=desktop] .tabbar a.rail-install .ic { filter: none; }
html[data-layout=desktop] .tabbar a.rail-install:hover { filter: brightness(1.1); }
html[data-layout=tv] .win-banner { display: none; }
