/* ==========================================================================
   كادر — Design system
   Ink & paper: deep ink dark theme by default, warm paper light theme.
   RTL-first with logical properties. No framework.
   ========================================================================== */

/* A late Arabic font must not reflow the reading/navigation layout. Cached or fast fonts still render. */
@font-face { font-family: 'Readex'; font-style: normal; font-display: swap; font-weight: 160 700;
  src: url(../fonts/readex-pro-arabic-wght-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Readex'; font-style: normal; font-display: swap; font-weight: 160 700;
  src: url(../fonts/readex-pro-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lalezar'; font-style: normal; font-display: swap; font-weight: 400;
  src: url(../fonts/lalezar-arabic-400-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Lalezar'; font-style: normal; font-display: swap; font-weight: 400;
  src: url(../fonts/lalezar-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF; }

:root {
  /* Global layers. Portals escape local card/hero stacking contexts; local artwork keeps small z-indices. */
  --layer-sticky: 30; --layer-header: 60; --layer-nav: 70; --layer-popover: 100;
  --layer-reader-scrim: 110; --layer-reader: 120; --layer-search: 150; --layer-filter: 180;
  --layer-sheet-scrim: 205; --layer-sheet: 210; --layer-modal: 220;
  --layer-toast: 300; --layer-lightbox: 400; --layer-progress: 500;
  --layer-admin-scrim: 85; --layer-admin-side: 90; --layer-admin-top: 50;
  --brand: #ff5a36;
  --brand-2: #ffb547;
  --brand-ink: #fff; /* replaced per brand colours in the layout (brand_ink) */
  --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  --gem-1: #5ee0ff; --gem-2: #a678ff;
  --gem-grad: linear-gradient(135deg, var(--gem-1), var(--gem-2));

  --success: #2fcf98; --danger: #ff4d6a; --warning: #ffb547; --info: #5fb3ff;

  --r-xs: 6px; --r-sm: 9px; --r: 12px; --r-lg: 18px; --r-xl: 26px; --r-pill: 999px;
  --gap: 16px;
  --container: 1320px;
  --header-h: 64px;
  --bottom-h: 0px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --font: 'Readex', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font-display: 'Lalezar', 'Readex', system-ui, sans-serif;
  color-scheme: dark;

  /* ink (dark) */
  --bg: #0a0b10;
  --bg-2: #0e1017;
  --surface: #13161f;
  --surface-2: #191d29;
  --surface-3: #222736;
  --elev: #1b1f2c;
  --line: rgba(255,255,255,.065);
  --line-2: rgba(255,255,255,.11);
  --text: #eef0f6;
  --text-2: #b9bed0;
  --muted: #7f869c;
  --shadow: 0 10px 30px -12px rgba(0,0,0,.65);
  --shadow-lg: 0 30px 60px -20px rgba(0,0,0,.75);
  --halftone: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.4px);
  --skeleton: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.08), rgba(255,255,255,.03));
  --overlay: rgba(5,6,10,.72);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f1ea;
  --bg-2: #efebe2;
  --surface: #ffffff;
  --surface-2: #f6f3ed;
  --surface-3: #ebe6dc;
  --elev: #ffffff;
  --line: rgba(20,18,12,.08);
  --line-2: rgba(20,18,12,.14);
  --text: #16161b;
  --text-2: #43454f;
  --muted: #777a86;
  --shadow: 0 10px 28px -14px rgba(40,30,10,.28);
  --shadow-lg: 0 28px 60px -24px rgba(40,30,10,.35);
  --halftone: radial-gradient(rgba(0,0,0,.07) 1px, transparent 1.4px);
  --skeleton: linear-gradient(90deg, rgba(0,0,0,.035), rgba(0,0,0,.07), rgba(0,0,0,.035));
  --overlay: rgba(20,18,14,.55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.65; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
  padding-bottom: var(--bottom-h);
}
@media (min-width: 900px) { body { font-size: 15.5px; } }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0 0 .8em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: color-mix(in srgb, var(--brand) 40%, transparent); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
bdi { unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
a.sr-only:focus { position: fixed; top: 8px; inset-inline-start: 8px; width: auto; height: auto; padding: 12px 18px; margin: 0; overflow: visible; clip: auto; z-index: 10000; background: var(--surface); color: var(--text); }
.ic { width: 1.15em; height: 1.15em; flex: none; stroke-width: 2; display: inline-block; vertical-align: -.2em; }
.ic.fill { fill: currentColor; }
.hp { position: absolute; inset-inline-start: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 700px) { .container { padding-inline: 24px; } }
.main { min-height: calc(100vh - var(--header-h) - 200px); padding-block: 20px 56px; }
.stack > * + * { margin-top: var(--stack, 16px); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: .85em; }
.tiny { font-size: .75em; }
.bold { font-weight: 700; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.clamp-1, .clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-1 { -webkit-line-clamp: 1; } .clamp-2 { -webkit-line-clamp: 2; } .clamp-3 { -webkit-line-clamp: 3; }
.mt-0{margin-top:0}.mt-1{margin-top:6px}.mt-2{margin-top:12px}.mt-3{margin-top:20px}.mt-4{margin-top:32px}
.mb-1{margin-bottom:6px}.mb-2{margin-bottom:12px}.mb-3{margin-bottom:20px}.mb-4{margin-bottom:32px}
.gap-1{gap:6px}.gap-2{gap:12px}.gap-3{gap:20px}
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.divider { height: 1px; background: var(--line); margin-block: 16px; border: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--layer-header); height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
  transition: transform .3s var(--ease), background .3s;
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--brand) 70%, transparent); position: relative; overflow: hidden; }
.brand-mark::after { content: ""; position: absolute; inset: 0; background: var(--halftone); background-size: 5px 5px; mix-blend-mode: overlay; opacity: .9; }
.brand-mark span { font-family: var(--font-display); font-size: 22px; line-height: 1; position: relative; z-index: 1; transform: translateY(2px); }
.brand-name { font-family: var(--font-display); font-size: 25px; line-height: 1; letter-spacing: 0; padding-top: 4px; }
.brand img { height: 36px; width: auto; }
.nav { display: none; align-items: center; gap: 2px; margin-inline-start: 8px; }
.nav a { padding: 8px 12px; border-radius: var(--r-pill); color: var(--text-2); font-weight: 500; font-size: .95em; transition: color .2s, background .2s; white-space: nowrap; position: relative; }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.is-active { color: var(--text); }
.nav a.is-active::after { content: ""; position: absolute; inset-inline: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad); }
.nav .new-dot { display: inline-block; font-size: 10px; padding: 0 6px; border-radius: 6px; background: var(--brand); color: #fff; margin-inline-start: 4px; vertical-align: 2px; line-height: 16px; }
@media (min-width: 1100px) { .nav { display: flex; } }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.search-trigger { display: flex; align-items: center; gap: 10px; height: 40px; padding-inline: 14px; min-width: 40px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: border-color .2s, background .2s; }
.search-trigger:hover { border-color: var(--line-2); color: var(--text-2); }
.search-trigger .label { display: none; }
.search-trigger kbd { display: none; }
@media (min-width: 700px) { .search-trigger { min-width: 230px; } .search-trigger .label { display: inline; } .search-trigger kbd { display: inline-block; margin-inline-start: auto; } }
kbd { font-family: ui-monospace, monospace; font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); direction: ltr; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--text-2); position: relative; transition: background .2s, color .2s; flex: none; }
.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn .ic { width: 21px; height: 21px; }
.badge-dot { position: absolute; top: 5px; inset-inline-end: 5px; min-width: 18px; height: 18px; padding-inline: 5px; border-radius: 9px; background: var(--brand); color: #fff;
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center; line-height: 1; border: 2px solid var(--bg); }
.gem-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 10px 12px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--gem-2) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gem-2) 30%, transparent); font-weight: 700; font-size: .9em; }
.gem-chip .ic { color: var(--gem-1); }
.gem-icon { color: var(--gem-1); }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; }
.avatar-lg { width: 96px; height: 96px; }
.avatar-sm { width: 28px; height: 28px; }
.avatar-xs { width: 22px; height: 22px; }
.user-btn { padding: 2px; border-radius: 50%; border: 2px solid transparent; transition: border-color .2s; }
.user-btn:hover { border-color: var(--line-2); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding-inline: 18px; border-radius: var(--r-pill);
  font-weight: 600; font-size: .95em; white-space: nowrap; border: 1px solid transparent; transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s, opacity .2s;
  background: var(--surface-2); color: var(--text); user-select: none; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-primary { background: var(--grad); color: var(--brand-ink); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--brand) 75%, transparent); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.07); }
.btn-gem { background: var(--gem-grad); color: #0b0b16; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--gem-2) 75%, transparent); }
.btn-gem:hover { background: var(--gem-grad); filter: brightness(1.06); }
.btn-outline { background: transparent; border-color: var(--line-2); }
.btn-outline:hover { background: var(--surface); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-danger { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 24%, transparent); }
.btn-success { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.btn-sm { height: 34px; padding-inline: 13px; font-size: .86em; }
.btn-xs { height: 28px; padding-inline: 10px; font-size: .8em; gap: 5px; }
.btn-lg { height: 52px; padding-inline: 26px; font-size: 1.02em; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-sm.btn-icon { width: 34px; }
.btn.is-on { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.link { color: var(--brand); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Chips & badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding-inline: 13px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line);
  color: var(--text-2); font-size: .86em; font-weight: 500; transition: all .18s; white-space: nowrap; cursor: pointer; user-select: none; }
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.is-on, .chip[aria-pressed="true"], input:checked + .chip { background: color-mix(in srgb, var(--brand) 15%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 45%, transparent); color: var(--text); }
.chip.is-excluded, input.ex:checked + .chip { background: color-mix(in srgb, var(--danger) 13%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); text-decoration: line-through; }
.chip-sm { height: 26px; padding-inline: 10px; font-size: .78em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--r-pill); font-size: .74em; font-weight: 600; line-height: 1.6;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.tag-brand { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); border-color: transparent; }
.tag-success { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); border-color: transparent; }
.tag-danger { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); border-color: transparent; }
.tag-warning { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); border-color: transparent; }
.tag-info { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); border-color: transparent; }
.tag-gem { background: color-mix(in srgb, var(--gem-2) 18%, transparent); color: color-mix(in srgb, var(--gem-1) 70%, var(--text)); border-color: transparent; }
.tag-adult { background: #e0245e; color: #fff; border-color: transparent; }
.tag-new { background: var(--grad); color: #fff; border: 0; }
.type-badge { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2; padding: 1px 8px; border-radius: 7px; font-size: 11px; font-weight: 700;
  background: rgba(10,11,16,.82); color: #fff; border: 1px solid rgba(255,255,255,.12); }
.type-manhwa { color: #7fd4ff; } .type-manga { color: #ff8fa3; } .type-manhua { color: #ffd166; } .type-novel { color: #b9a6ff; } .type-oneshot { color: #8ef0c6; } .type-comic { color: #ffb38a; }
/* light theme: deeper type colours so they stay readable on paper (badges over covers keep their dark chip) */
:root[data-theme="light"] :not(.type-badge).type-manhwa { color: #0b6fa8; } :root[data-theme="light"] :not(.type-badge).type-manga { color: #c2264a; }
:root[data-theme="light"] :not(.type-badge).type-manhua { color: #9a6a00; } :root[data-theme="light"] :not(.type-badge).type-novel { color: #6246d6; }
:root[data-theme="light"] :not(.type-badge).type-oneshot { color: #0f8a5f; } :root[data-theme="light"] :not(.type-badge).type-comic { color: #b5531a; }

/* ---------- Section heads ---------- */
.section { margin-top: 36px; }
.section:first-child { margin-top: 0; }
/* Skip style/layout work for off-screen home sections until they approach the viewport */
.home-cols { content-visibility: auto; contain-intrinsic-size: auto 2400px; }
.home-cols > .stack > .section:nth-child(n+2), .home-cols > aside > .section:nth-child(n+3) { content-visibility: auto; contain-intrinsic-size: auto 560px; }
/* only the visible hero slide paints its blurred backdrop (others load on activation) */
.hero-slide:not(.is-active) .hero-bg { background-image: none !important; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 1.32em; font-weight: 800; }
.section-title .ic { width: 22px; height: 22px; color: var(--brand); }
.section-title::before { content: ""; width: 5px; height: 22px; border-radius: 3px; background: var(--grad); flex: none; }
.section-title.no-bar::before { display: none; }
.section-sub { color: var(--muted); font-size: .88em; margin-top: 2px; }
.see-all { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: .9em; font-weight: 600; padding: 6px 10px; border-radius: var(--r-pill); }
.see-all:hover { color: var(--brand); background: var(--surface); }
.see-all .ic { width: 16px; height: 16px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); width: max-content; max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { height: 34px; padding-inline: 14px; border-radius: var(--r-pill); color: var(--muted); font-weight: 600; font-size: .88em; white-space: nowrap; transition: all .2s; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--text); }
.tab.is-active, .tab[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 8px -2px rgba(0,0,0,.3); }
.tab .count { font-size: .8em; color: var(--muted); }
/* overflow-y must be hidden: with only overflow-x:auto the bar became a vertical scroller too,
   so a finger could drag the tabs up and out of sight */
.tabs-line { display: flex; gap: 22px; box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; touch-action: pan-x pan-y; }
.tabs-line::-webkit-scrollbar { display: none; }
.tabs-line .tab { height: 46px; padding: 0; border-radius: 0; position: relative; flex: none; background: none !important; box-shadow: none !important; }
.tabs-line .tab.is-active { color: var(--text); }
.tabs-line .tab.is-active::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--grad); }
/* series page: the section tabs stay reachable while scrolling a long chapter list, and move together with the header */
.s-tabs { position: sticky; top: var(--header-h); z-index: var(--layer-sticky); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  margin-inline: -16px; padding-inline: 16px; transition: top .3s var(--ease); }
html.hdr-hidden .s-tabs { top: 0; }
@media (min-width: 700px) { .s-tabs { margin-inline: 0; padding-inline: 0; } }

/* ---------- Series card ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 14px; }
@media (min-width: 700px) { .grid-cards { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 24px 18px; } }
.card { position: relative; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.card-cover { position: relative; aspect-ratio: 2 / 3; border-radius: var(--r); overflow: hidden; background: var(--surface-2); isolation: isolate;
  box-shadow: 0 1px 0 var(--line) inset; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out), opacity .4s; }
.card-cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); pointer-events: none; }
.card:hover .card-cover img { transform: scale(1.05); }
.card-cover .shade { position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, rgba(0,0,0,.78), transparent); z-index: 1; pointer-events: none; }
.card-rating { position: absolute; bottom: 8px; inset-inline-start: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; color: #fff; font-weight: 700; font-size: 12.5px; }
.card-rating .ic { width: 14px; height: 14px; color: #ffcc4d; fill: #ffcc4d; }
.card-status { position: absolute; bottom: 8px; inset-inline-end: 8px; z-index: 2; width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(0,0,0,.35); }
.card-status.completed { background: var(--info); } .card-status.hiatus { background: var(--warning); } .card-status.cancelled { background: var(--danger); }
.card-title { font-weight: 700; font-size: .95em; line-height: 1.45; }
.card-with-chapters .card-title { min-block-size: 2.9em; }
.card-title a::before { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: var(--r); }
.card-meta { color: var(--muted); font-size: .8em; display: flex; gap: 8px; align-items: center; min-width: 0; }
.card-meta > span:first-child { white-space: nowrap; }
.card-chapters { display: flex; flex-direction: column; gap: 5px; position: relative; z-index: 4; }
.ch-pill { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line);
  font-size: .8em; transition: background .2s, border-color .2s; }
.ch-pill:hover { background: var(--surface-2); border-color: var(--line-2); }
.ch-pill .n { font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.ch-pill .t { color: var(--muted); font-size: .92em; white-space: nowrap; }
.ch-pill .ic { width: 13px; height: 13px; }
.ch-pill.locked .n { color: color-mix(in srgb, var(--gem-1) 70%, var(--text)); }
.ch-pill.is-new .t { color: var(--brand); font-weight: 700; }
.card-progress { position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.18); z-index: 2; }
.card-progress span { display: block; height: 100%; background: var(--grad); }
.card-badge-corner { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2; }
.card-unread { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2; min-width: 24px; height: 24px; padding-inline: 7px; border-radius: 12px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0,0,0,.4); }

/* List (compact) view */
.list-rows { display: flex; flex-direction: column; gap: 10px; }
.row-card { display: grid; grid-template-columns: 74px 1fr; gap: 14px; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); position: relative; transition: border-color .2s, background .2s; }
.row-card:hover { border-color: var(--line-2); }
.row-card .card-cover { border-radius: var(--r-sm); }
.row-card .title { font-weight: 700; }
.row-card .meta { color: var(--muted); font-size: .82em; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
@media (min-width: 700px) { .row-card { grid-template-columns: 92px 1fr; } }

/* ---------- Horizontal rails ---------- */
.rail { position: relative; }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(138px, 1fr); gap: 14px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-bottom: 6px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; }
@media (min-width: 700px) { .rail-track { grid-auto-columns: 168px; gap: 18px; margin-inline: 0; padding-inline: 0; } }
.rail-btn { position: absolute; top: 34%; z-index: 5; width: 42px; height: 42px; border-radius: 50%; background: var(--elev); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  display: none; place-items: center; color: var(--text); transition: opacity .2s, transform .2s; }
.rail-btn:hover { transform: scale(1.06); }
.rail-btn.prev { inset-inline-start: -14px; } .rail-btn.next { inset-inline-end: -14px; }
.rail-btn[disabled] { opacity: 0; pointer-events: none; }
@media (min-width: 900px) { .rail-btn { display: grid; } }

/* ---------- Hero slider ---------- */
.hero { position: relative; display: grid; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); isolation: isolate; min-height: 360px; box-shadow: var(--shadow-lg); }
@media (min-width: 900px) { .hero { min-height: 430px; } }
/* all slides share one grid cell, so the hero is as tall as its tallest slide and never jumps */
.hero-slide { position: relative; grid-area: 1 / 1; display: grid; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility .7s; }
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero-bg { position: absolute; inset: -30px; background-size: cover; background-position: center 30%; filter: blur(28px) saturate(1.4); opacity: .55; transform: scale(1.1); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: var(--halftone); background-size: 6px 6px; opacity: .6; }
.hero-slide::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 25%, transparent) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 55%, var(--bg) 100%); }
[dir="rtl"] .hero-slide::before { background: linear-gradient(270deg, color-mix(in srgb, var(--bg) 25%, transparent) 0%, color-mix(in srgb, var(--bg) 72%, transparent) 50%, color-mix(in srgb, var(--bg) 96%, transparent) 100%); }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: 22px; padding: 26px 22px 64px; }
@media (min-width: 760px) { .hero-inner { grid-template-columns: 1fr 230px; align-items: center; padding: 40px 48px 70px; } }
@media (min-width: 1100px) { .hero-inner { grid-template-columns: 1fr 270px; } }
.hero-cover { display: block; aspect-ratio: 2/3; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08); transform: rotate(-2.5deg); }
.hero-cover img { width: 100%; height: 100%; object-fit: cover; }
/* phones: cover beside the title, synopsis and buttons full width underneath */
@media (max-width: 759px) {
  .hero { min-height: 0; border-radius: var(--r-lg); }
  .hero-inner { grid-template-columns: minmax(0, 1fr) 104px; align-items: start; gap: 0 16px; padding: 20px 18px 56px; }
  .hero-text { display: contents; }
  .hero-text > * { grid-column: 1; }
  .hero-cover { grid-column: 2; grid-row: 1 / span 3; border-radius: var(--r); transform: none; align-self: start; }
  .hero .hero-title { font-size: clamp(24px, 7vw, 32px); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; }
  .hero-kicker { font-size: .8em; margin-bottom: 4px; }
  .hero-meta { margin-bottom: 0; gap: 6px; }
  .hero-meta a.tag:nth-of-type(n+2) { display: none; }
  .hero-synopsis, .hero-actions { grid-column: 1 / -1; }
  .hero-synopsis { margin-top: 12px; font-size: .9em; -webkit-line-clamp: 2; }
  .hero-actions { margin-top: 14px; flex-wrap: nowrap; }
  .hero-actions .btn { flex: 1 1 0; min-width: 0; height: 46px; padding-inline: 12px; font-size: .92em; }
}
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-2); font-weight: 700; font-size: .85em; margin-bottom: 8px; }
.hero-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 6vw, 56px); line-height: 1.15; margin-bottom: 10px; text-wrap: balance; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.hero-meta .rating { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; }
.hero-meta .rating .ic { color: #ffcc4d; fill: #ffcc4d; }
.hero-synopsis { color: var(--text-2); max-width: 620px; font-size: .97em; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-controls { position: absolute; bottom: 14px; inset-inline: 18px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: none; }
.hero-controls > * { pointer-events: auto; }
@media (min-width: 760px) { .hero-controls { inset-inline: 48px auto; justify-content: flex-start; gap: 18px; bottom: 20px; } }
.hero-dots { display: flex; gap: 6px; }
.hero-dot { width: 26px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--text) 25%, transparent); overflow: hidden; position: relative; transition: width .35s var(--ease); }
.hero-dots .hero-dot { overflow: visible; }
.hero-dot::before { content: ""; position: absolute; inset: -16px -3px; }
.hero-dot.is-active::after { border-radius: inherit; }
.hero-dot.is-active { width: 46px; }
.hero-dot.is-active::after { content: ""; position: absolute; inset: 0; background: var(--grad); transform-origin: right; animation: dotfill var(--hero-interval, 7s) linear forwards; }
[dir="ltr"] .hero-dot.is-active::after { transform-origin: left; }
.hero:hover .hero-dot.is-active::after, .hero.is-paused .hero-dot.is-active::after { animation-play-state: paused; }
@keyframes dotfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-nav { display: flex; gap: 8px; }
@media (hover: none) { .hero-nav { display: none; } }
.hero-nav button { width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line-2); display: grid; place-items: center; backdrop-filter: blur(8px); }
.hero-nav button:hover { background: var(--surface-2); }

/* ---------- Continue reading ---------- */
.cont-card { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  min-width: 260px; transition: transform .2s var(--ease), border-color .2s; }
.cont-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, transparent); transform: translateY(-2px); }
.cont-card .card-cover { border-radius: 9px; }
.cont-card .t { font-weight: 700; font-size: .92em; }
.cont-card .c { color: var(--muted); font-size: .8em; }
.cont-card .bar { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.cont-card .bar span { display: block; height: 100%; background: var(--grad); border-radius: 3px; }
.cont-card .go { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 700; font-size: .8em; margin-top: 6px; }
.rail-track.cont { grid-auto-columns: minmax(270px, 300px); }

/* ---------- Ranked list (most popular) ---------- */
.ranked { display: flex; flex-direction: column; gap: 6px; }
.ranked-item { display: grid; grid-template-columns: 34px 52px 1fr auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r); transition: background .2s; position: relative; }
.ranked-item:hover { background: var(--surface); }
.ranked-item .num { font-family: var(--font-display); font-size: 30px; line-height: 1; text-align: center; color: var(--muted); -webkit-text-stroke: 1px var(--line-2); padding-top: 6px; }
.ranked-item:nth-child(1) .num, .ranked-item:nth-child(2) .num, .ranked-item:nth-child(3) .num { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 0; }
.ranked-item .cv { width: 52px; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.ranked-item .cv img { width: 100%; height: 100%; object-fit: cover; }
.ranked-item .t { font-weight: 700; font-size: .93em; }
.ranked-item .m { color: var(--muted); font-size: .78em; display: flex; gap: 8px; }
.ranked-item .v { color: var(--muted); font-size: .8em; display: inline-flex; align-items: center; gap: 4px; }
.ranked-item a.cover-link::before { content: ""; position: absolute; inset: 0; }

/* ---------- Panels / boxes ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.panel-sm { padding: 14px; border-radius: var(--r); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-title { font-weight: 800; font-size: 1.05em; display: flex; align-items: center; gap: 8px; }
.panel-title .ic { color: var(--brand); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: color-mix(in srgb, var(--info) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); font-size: .92em; }
.notice .ic { color: var(--info); margin-top: 3px; }
.notice.warning { background: color-mix(in srgb, var(--warning) 10%, var(--surface)); border-color: color-mix(in srgb, var(--warning) 28%, transparent); }
.notice.warning .ic { color: var(--warning); }
.notice.danger { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 28%, transparent); }
.notice.danger .ic { color: var(--danger); }
.notice.success { background: color-mix(in srgb, var(--success) 10%, var(--surface)); border-color: color-mix(in srgb, var(--success) 28%, transparent); }
.notice.success .ic { color: var(--success); }

.announce-bar { background: var(--grad); color: #fff; font-weight: 600; font-size: .9em; }
.announce-bar .container { display: flex; align-items: center; gap: 10px; min-height: 40px; padding-block: 6px; }
.announce-bar a { text-decoration: underline; text-underline-offset: 3px; }
.announce-bar .x { margin-inline-start: auto; opacity: .85; }

/* Announcements list */
.ann-item { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 12px; border-radius: var(--r); transition: background .2s; }
.ann-item:hover { background: var(--surface-2); }
.ann-date { width: 48px; height: 52px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ann-date b { font-size: 1.15em; display: block; }
.ann-date span { font-size: .7em; color: var(--muted); }

/* Join CTA */
.join-cta { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 34px 26px; background: radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--brand) 35%, transparent), transparent 55%), radial-gradient(circle at 90% 100%, color-mix(in srgb, var(--gem-2) 35%, transparent), transparent 50%), var(--surface);
  border: 1px solid var(--line-2); }
.join-cta::before { content: ""; position: absolute; inset: 0; background: var(--halftone); background-size: 7px 7px; opacity: .5; mask-image: linear-gradient(120deg, #000 0%, transparent 60%); }
.join-cta > * { position: relative; }
.join-cta h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 4vw, 38px); }
.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-block: 20px; }
.perk { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--r); background: color-mix(in srgb, var(--bg) 40%, transparent); border: 1px solid var(--line); }
.perk .ic { color: var(--brand-2); width: 22px; height: 22px; margin-top: 2px; }
.perk b { display: block; font-size: .95em; }
.perk span { color: var(--muted); font-size: .82em; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span, .label { font-weight: 600; font-size: .9em; color: var(--text-2); }
.field .hint { color: var(--muted); font-size: .8em; }
.field .error { color: var(--danger); font-size: .82em; }
.input, .select, .textarea { width: 100%; height: 46px; padding-inline: 14px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s; outline: none; }
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus { border-color: color-mix(in srgb, var(--brand) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); background: var(--surface); }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .8; }
.input.is-invalid { border-color: var(--danger); }
.select { overflow: hidden; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center; padding-inline-end: 14px; padding-inline-start: 38px; }
[dir="ltr"] .select { background-position: right 12px center; }
.input-sm { height: 36px; font-size: .9em; border-radius: var(--r-sm); }
.input-group { position: relative; }
.input-group .ic { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 14px; color: var(--muted); pointer-events: none; }
.input-group .input { padding-inline-start: 42px; }
.input-group .toggle-pass { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 6px; }
.form-row { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } .form-row.cols-3 { grid-template-columns: repeat(3, 1fr); } .form-row.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 44px; height: 26px; border-radius: 13px; background: var(--surface-3); transition: background .2s; position: relative; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(-18px); }
[dir="ltr"] .switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .info b { display: block; font-weight: 600; }
.setting-row .info span { color: var(--muted); font-size: .85em; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--bg-2); border: 1px solid var(--line-2); gap: 2px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding-inline: 12px; border-radius: var(--r-pill); font-size: .85em; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .2s; }
.seg input:checked + span { background: var(--surface-3); color: var(--text); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 32px 16px; position: relative; }
.auth-wrap::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 40%), radial-gradient(circle at 80% 90%, color-mix(in srgb, var(--gem-2) 18%, transparent), transparent 40%); }
.auth-card { width: 100%; min-width: 0; max-width: 440px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 30px 24px; box-shadow: var(--shadow-lg); }
@media (min-width: 500px) { .auth-card { padding: 36px 34px; } }
.auth-card h1 { font-family: var(--font-display); font-weight: 400; font-size: 32px; margin-bottom: 4px; }
.oauth-btns { display: grid; gap: 10px; margin-block: 18px; }
.oauth-btn { height: 46px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; transition: background .2s; }
.oauth-btn:hover { background: var(--surface-2); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82em; margin-block: 16px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.code-input { letter-spacing: 12px; text-align: center; font-size: 26px; font-weight: 700; height: 60px; direction: ltr; }

/* ---------- Dropdown / popover ---------- */
.dropdown { position: relative; }
/* closed menus are display:none so they never widen the page on phones; @starting-style keeps the open animation */
.menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 240px; max-width: calc(100vw - 24px); background: var(--elev); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: var(--layer-popover); display: none; opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top left;
  transition: opacity .18s, transform .18s var(--ease), display .18s allow-discrete, overlay .18s allow-discrete; }
[dir="ltr"] .menu { transform-origin: top right; }
.menu.is-open { display: block; opacity: 1; transform: none; }
.menu.as-popover { position: fixed; inset: auto; margin: 0; overflow-y: auto; overscroll-behavior: contain; z-index: var(--layer-popover); }
@starting-style { .menu.is-open { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu .is-on { color: var(--brand); }
.menu .is-on .ic { color: var(--brand); }
/* Phones: every dropdown becomes a bottom sheet (moved to <body> by app.js so no parent can clip it) */
html.sheet-open, html.sheet-open body { overflow: hidden; }
.sheet-scrim { position: fixed; inset: 0; z-index: var(--layer-sheet-scrim); background: var(--overlay); opacity: 0; visibility: hidden; transition: opacity .22s, visibility 0s linear .22s; -webkit-tap-highlight-color: transparent; }
.sheet-scrim.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
/* (.as-sheet is only ever set by app.js on phones, or for the bottom bar's "المزيد") */
.menu.as-sheet, .menu.start.as-sheet { position: fixed; inset: auto 0 0 0; top: auto; min-width: 0 !important; width: auto; max-width: none; max-height: min(86dvh, 680px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: var(--r-xl) var(--r-xl) 0 0; border-inline: 0; border-bottom: 0; padding: 22px 12px calc(12px + env(safe-area-inset-bottom)) !important; z-index: var(--layer-sheet);
  transform: translateY(100%); opacity: 1; transition: transform .3s var(--ease-out), display .3s allow-discrete; }
@media (min-width: 641px) { .menu.as-sheet, .menu.start.as-sheet { max-width: 560px; margin-inline: auto; border-inline: 1px solid var(--line-2); } }
.menu.as-sheet.is-open { transform: none; }
@starting-style { .menu.as-sheet.is-open { transform: translateY(100%); opacity: 1; } }
.menu.as-sheet::before { content: ""; position: absolute; top: 8px; inset-inline: 0; margin-inline: auto; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); }
.menu.as-sheet a, .menu.as-sheet button.mi { min-height: 48px; padding-block: 12px; font-size: 1em; }
.menu.as-sheet.notif-pop { width: auto; padding: 18px 0 0; }
.menu.as-sheet.notif-pop .list { max-height: none; flex: 1; }
.menu.as-sheet.notif-pop > a { min-height: 52px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }

/* All-sections menu: a grid of big tiles, then account links */
.site-menu { min-width: 340px; }
.site-menu .sm-head { padding: 4px 10px 10px; font-size: 1.05em; }
.site-menu .sm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 2px 4px; }
.menu .sm-grid a { flex-direction: column; justify-content: center; gap: 6px; min-height: 84px; padding: 10px 4px; text-align: center; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); font-size: .86em; font-weight: 600; line-height: 1.3; }
.menu .sm-grid a .sm-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 13%, transparent); }
.menu .sm-grid a .ic { width: 21px; height: 21px; color: var(--brand); }
.menu .sm-grid a.is-on { border-color: color-mix(in srgb, var(--brand) 55%, transparent); background: color-mix(in srgb, var(--brand) 10%, var(--surface-2)); }
.menu .sm-grid a:active { transform: scale(.96); }
@media (min-width: 420px) { .site-menu .sm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.site-menu .sm-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 4px; padding: 4px 0 2px; }
.menu .sm-links a { width: auto; min-height: 0 !important; padding: 8px 10px; font-size: .82em; color: var(--muted); }
/* header menu button: only when the desktop nav does not fit and there is no bottom bar (tablets) */
.header-menu { display: none; }
@media (min-width: 900px) and (max-width: 1099px) { .header-menu { display: block; } .header-menu .site-menu { width: 420px; } }
.bottom-nav > .site-menu { grid-column: auto; }
.menu.start { inset-inline-end: auto; inset-inline-start: 0; }
.menu a, .menu button.mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text-2); font-size: .92em; text-align: start; transition: background .15s, color .15s; }
.menu a:hover, .menu button.mi:hover { background: var(--surface-2); color: var(--text); }
.menu .ic { width: 18px; height: 18px; color: var(--muted); }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 6px 4px; }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 12px; }
.menu-head b { display: block; }
.menu-head span { color: var(--muted); font-size: .82em; }
.menu .xp { padding: 0 12px 10px; }

/* ---------- Modal / sheet ---------- */
.modal { position: fixed; inset: 0; z-index: var(--layer-modal); display: grid; place-items: center; padding: 16px; visibility: hidden; pointer-events: none; }
.modal.is-open { visibility: visible; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: var(--overlay); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.modal.is-open .modal-backdrop { opacity: 1; }
.modal-box { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--elev); border: 1px solid var(--line-2); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 22px; transform: translateY(16px) scale(.97); opacity: 0; transition: transform .3s var(--ease-out), opacity .25s; }
.modal.is-open .modal-box { transform: none; opacity: 1; }
.modal-box.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-head h3 { font-size: 1.15em; }
@media (max-width: 640px) {
  .modal.sheet { place-items: end stretch; padding: 0; }
  .modal.sheet .modal-box { border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 88vh; transform: translateY(100%); padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .modal.sheet.is-open .modal-box { transform: none; }
}

/* ---------- Search overlay ---------- */
.search-overlay { position: fixed; inset: 0; z-index: var(--layer-search); display: none; }
.search-overlay.is-open { display: block; }
.search-overlay .modal-backdrop { opacity: 1; }
.search-panel { position: relative; max-width: 720px; margin: 70px auto 0; background: var(--elev); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .22s var(--ease-out); }
@media (max-width: 760px) { .search-panel { margin: 0; border-radius: 0; min-height: 100%; border: 0; } }
@keyframes pop { from { transform: translateY(-10px) scale(.98); opacity: 0; } }
.search-box { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.search-box .ic { width: 22px; height: 22px; color: var(--muted); }
.search-box input { flex: 1; height: 50px; background: transparent; border: 0; outline: 0; font-size: 1.12em; }
.search-results { max-height: min(62vh, 560px); overflow-y: auto; padding: 8px; }
@media (max-width: 760px) { .search-results { max-height: calc(100vh - 80px); } }
.sr-item { display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--r); cursor: pointer; }
.sr-item:hover, .sr-item.is-active { background: var(--surface-2); }
.sr-item .cv { width: 50px; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.sr-item .cv img { width: 100%; height: 100%; object-fit: cover; }
.sr-item .t { font-weight: 700; }
.sr-item .m { color: var(--muted); font-size: .8em; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.sr-item mark { background: color-mix(in srgb, var(--brand) 25%, transparent); color: inherit; border-radius: 3px; padding-inline: 1px; }
.sr-group { padding: 10px 12px 4px; color: var(--muted); font-size: .8em; font-weight: 700; display: flex; justify-content: space-between; }
.sr-empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.sr-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78em; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: var(--layer-toast); bottom: calc(18px + var(--bottom-h)); inset-inline-start: 50%; transform: translateX(50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
[dir="ltr"] .toasts { transform: translateX(-50%); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r); background: var(--elev); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
  font-weight: 600; font-size: .92em; animation: toastIn .3s var(--ease-out); max-width: 100%; }
.toast.is-out { animation: toastOut .25s forwards; }
.toast .ic { width: 20px; height: 20px; }
.toast.success .ic { color: var(--success); } .toast.error .ic { color: var(--danger); } .toast.info .ic { color: var(--info); } .toast.warning .ic { color: var(--warning); }
.toast .act { margin-inline-start: 8px; color: var(--brand); font-weight: 700; }
@keyframes toastIn { from { transform: translateY(14px); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(10px); opacity: 0; } }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; padding-inline: 10px; display: grid; place-items: center; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .9em; }
.pager a:hover { border-color: var(--line-2); }
.pager .is-current { background: var(--grad); color: #fff; border-color: transparent; }
.pager .gap { background: transparent; border: 0; }

/* ---------- Empty & skeleton ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .art { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px dashed var(--line-2); }
.empty .art .ic { width: 36px; height: 36px; color: var(--text-2); }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 1.1em; }
.skel { background: var(--skeleton); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-sm); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 26px; height: 26px; border: 3px solid var(--surface-3); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 20px auto; }
img.lazy-fade { opacity: 0; }
img.lazy-fade.is-loaded { opacity: 1; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-block: 40px 30px; margin-top: 30px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-grid h4, .footer-grid .footer-h { font-size: .92em; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.footer-grid a { display: block; color: var(--muted); font-size: .9em; padding-block: 4px; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82em; }
.socials { display: flex; gap: 8px; margin-top: 14px; }
.socials a { width: 38px; height: 38px; display: grid !important; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); padding: 0 !important; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav { position: fixed; inset: auto 0 0 0; z-index: var(--layer-nav); display: grid; grid-template-columns: repeat(5, 1fr); height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); transition: transform .3s var(--ease); }
.bottom-nav.is-hidden { transform: translateY(100%); }
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 600; position: relative; }
.bottom-nav .ic { width: 22px; height: 22px; }
.bottom-nav .is-active { color: var(--text); }
.bottom-nav .is-active::before { content: ""; position: absolute; top: 0; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }
.bottom-nav .badge-dot { top: 6px; inset-inline-end: calc(50% - 20px); }
body.has-bottom-nav { --bottom-h: 62px; }
@media (min-width: 900px) { .bottom-nav { display: none; } body.has-bottom-nav { --bottom-h: 0px; } }

/* ---------- Series page ---------- */
.s-hero { position: relative; isolation: isolate; margin-top: calc(-1 * 20px); }
/* the blurred art is clipped on its own layer so dropdowns in the header are never cut off */
.s-hero-art { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.s-hero-bg { position: absolute; inset: -40px; background-size: cover; background-position: center 25%; filter: blur(34px) saturate(1.35); opacity: .45; transform: scale(1.1); }
.s-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 35%, transparent), var(--bg) 92%); }
.s-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--halftone); background-size: 6px 6px; opacity: .45; mask-image: linear-gradient(to bottom, #000, transparent 70%); }
.s-head { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px 14px; padding-block: 22px 10px; align-items: end; }
.s-info { min-width: 0; }
.s-main-mobile { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 700px) {
  .s-head { grid-template-columns: 210px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 30px; padding-block: 44px 16px; }
  .s-cover { grid-row: 1 / span 2; align-self: start; }
  .s-main-mobile { grid-column: 2; align-self: start; }
}
@media (min-width: 1000px) { .s-head { grid-template-columns: 240px minmax(0, 1fr); } }
.s-cover { aspect-ratio: 2/3; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 24px 50px -18px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.08); background: var(--surface-2); }
.s-cover img { width: 100%; height: 100%; object-fit: cover; }
.s-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 5vw, 46px); line-height: 1.2; text-wrap: balance; }
.s-alt { color: var(--muted); font-size: .9em; margin-top: 4px; }
.s-alt button { color: inherit; padding-block: 2px; border-radius: 4px; }
@media (hover: hover) { .s-alt button:hover { color: var(--text-2); } }
.s-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.s-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 6px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); text-align: center; }
.s-stats .stat { align-items: center; min-width: 0; }
.s-stats .stat span { max-width: 100%; line-height: 1.35; text-wrap: balance; }
@media (min-width: 700px) { .s-stats { grid-template-columns: repeat(4, max-content); gap: 10px 30px; padding: 0; background: none; border: 0; text-align: start; margin-top: 18px; } .s-stats .stat { align-items: flex-start; } }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 1.15em; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.stat b .ic { width: 18px; height: 18px; }
.stat span { color: var(--muted); font-size: .78em; }
.stat .star { color: #ffcc4d; fill: #ffcc4d; }
.s-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.s-actions .btn-primary { min-width: 200px; }
.s-act-more { display: none; }
.s-act.is-set { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
/* Phones: the main read button full width, then three equal tiles (icon above a label that is never cut off) */
@media (max-width: 699px) {
  .s-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .s-actions > .btn:first-child { grid-column: 1 / -1; min-width: 0; height: 52px; font-size: 1em; }
  .s-actions > .dropdown { min-width: 0; }
  .s-actions .s-act { width: 100%; min-width: 0; height: auto; min-height: 66px; padding: 9px 4px 8px; flex-direction: column; gap: 5px;
    border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); white-space: normal; text-align: center; line-height: 1.25; font-size: .84em; font-weight: 700; }
  .s-actions .s-act > .ic { width: 22px; height: 22px; }
  .s-actions .s-act > span { overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .s-actions .s-act .chev { display: none; }
  .s-actions .s-act-more { display: inline; }
  .s-actions .s-act.is-on { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
  .s-actions .s-act.is-on .ic { fill: currentColor; }
  .s-actions .s-act.is-set { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
  .s-actions .s-act:active { transform: scale(.96); }
}
.s-people { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .88em; margin-top: 10px; }
.s-people a { color: var(--text-2); font-weight: 600; }
.s-people a:hover { color: var(--brand); }
.s-layout { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr); margin-top: 10px; }
.s-layout > [data-tabs-scope] { min-width: 0; }
@media (min-width: 1050px) { .s-layout { grid-template-columns: minmax(0, 1fr) 330px; } }
.synopsis { color: var(--text-2); line-height: 1.9; white-space: pre-line; }
.synopsis.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Chapter list */
.ch-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-block: 14px; }
.ch-toolbar .input-group { flex: 1 1 180px; }
.ch-groups { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ch-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
/* no overflow:hidden here — it would clip the per-chapter menus; round the end rows instead */
.ch-list > div:first-child > .ch-row:first-child { border-start-start-radius: calc(var(--r-lg) - 1px); border-start-end-radius: calc(var(--r-lg) - 1px); }
.ch-list > div > .ch-row:last-child { border-end-start-radius: calc(var(--r-lg) - 1px); border-end-end-radius: calc(var(--r-lg) - 1px); }
.ch-list > div:first-child > .ch-row:first-child::before { border-start-start-radius: 3px 14px; }
.ch-list > div > .ch-row:last-child::before { border-end-start-radius: 3px 14px; }
.ch-list > div > .ch-row:last-child .prog { border-end-start-radius: calc(var(--r-lg) - 1px); }
.ch-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); position: relative; transition: background .15s; }
.ch-row:last-child { border-bottom: 0; }
.ch-row:hover { background: var(--surface-2); }
.ch-row .num { font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; }
.ch-row .num a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-row .num a::before { content: ""; position: absolute; inset: 0; }
.ch-row .ttl { color: var(--text-2); font-weight: 500; }
.ch-row .meta { color: var(--muted); font-size: .78em; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.ch-row .side { display: flex; align-items: center; gap: 8px; position: relative; z-index: 2; }
.ch-row.is-read .num, .ch-row.is-read .ttl { color: var(--muted); }
.ch-row.is-read .num::after { content: ""; }
.ch-row .prog { position: absolute; inset-inline-start: 0; bottom: 0; height: 2px; background: var(--grad); }
.ch-row.is-current { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.ch-row.is-current::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px; background: var(--grad); }
.lock-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); font-size: .78em; font-weight: 700; background: color-mix(in srgb, var(--gem-2) 15%, transparent); color: color-mix(in srgb, var(--gem-1) 75%, var(--text)); }
.lock-pill .ic { width: 13px; height: 13px; }
.lock-pill.open { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.lock-pill .cd { color: inherit; opacity: .9; font-weight: 500; }
.read-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }

/* Rating distribution */
.dist { display: flex; flex-direction: column; gap: 5px; }
.dist-row { display: grid; grid-template-columns: 22px 1fr 40px; gap: 8px; align-items: center; font-size: .8em; color: var(--muted); }
.dist-bar { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.dist-bar span { display: block; height: 100%; background: var(--grad); border-radius: 4px; }
.big-score { font-family: var(--font-display); font-size: 52px; line-height: 1; }
.stars { display: inline-flex; gap: 2px; direction: ltr; }
.stars .ic { width: 16px; height: 16px; color: var(--surface-3); fill: var(--surface-3); }
.stars .ic.on { color: #ffcc4d; fill: #ffcc4d; }
.rate-stars { display: flex; gap: 2px; direction: ltr; justify-content: flex-end; }
[dir="rtl"] .rate-stars { justify-content: flex-start; flex-direction: row-reverse; }
.rate-stars button { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; color: var(--surface-3); transition: color .15s, transform .15s var(--ease); }
.rate-stars button .ic { width: 34px; height: 34px; fill: currentColor; stroke: none; }
.rate-stars button.is-on, .rate-stars.is-previewing button.is-preview { color: #ffcc4d; }
.rate-stars.is-previewing button:not(.is-preview) { color: var(--surface-3); }
.rate-stars button:active { transform: scale(.9); }
.score-box .stars { justify-content: center; margin-top: 6px; gap: 3px; }
.score-box .stars .ic { width: 20px; height: 20px; }
.stars .ic.on, .stars .ic.half { stroke: #ffcc4d; }
/* settings rows with a select/field: stack on phones so the label is never squeezed */
@media (max-width: 600px) {
  .setting-row:has(> .select, > .input, > select, > div > .select) { flex-direction: column; align-items: stretch; gap: 10px; }
  .setting-row:has(> .select, > .input, > select, > div > .select) .select { width: 100% !important; }
}
[dir="rtl"] .stars { flex-direction: row-reverse; }
.stars .ic.half { color: #ffcc4d; fill: #ffcc4d; opacity: .5; }
.dist-row .ic { width: 12px; height: 12px; color: #ffcc4d; fill: #ffcc4d; display: inline-block; vertical-align: -1px; }
.dist-row { grid-template-columns: 38px 1fr 40px; }
.rate-input { display: flex; gap: 4px; flex-wrap: wrap; direction: ltr; justify-content: flex-end; }
.rate-input button { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: .9em; transition: all .15s; }
.rate-input button:hover, .rate-input button.is-on { background: var(--grad); color: #fff; border-color: transparent; }

/* Reviews */
.review { padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-score { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; padding: 3px 10px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.sub-scores { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

/* ---------- Comments ---------- */
.comments { margin-top: 10px; }
.comment-form { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; margin-bottom: 20px; }
.comment-form .box { min-width: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); transition: border-color .2s, box-shadow .2s; }
.comment-form .box:focus-within { border-color: color-mix(in srgb, var(--brand) 50%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 10%, transparent); }
.comment-form textarea { width: 100%; min-height: 70px; max-height: 300px; border: 0; outline: 0; background: transparent; padding: 12px 14px; resize: none; line-height: 1.7; }
.comment-form .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; border-top: 1px solid var(--line); }
.comment-form .tools > * { flex-shrink: 0; }
.comment-form .tools .btn { min-width: 44px; }
.comment-form .tools .count { color: var(--muted); font-size: .75em; margin-inline-start: auto; margin-inline-end: 8px; }
.comment { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding-block: 12px; }
.comment + .comment { border-top: 1px solid var(--line); }
.comment .avatar { width: 40px; height: 40px; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: .88em; }
.comment-head .name { font-weight: 700; }
.comment-head .time { color: var(--muted); font-size: .9em; }
.comment-body { margin-top: 4px; line-height: 1.75; word-wrap: break-word; overflow-wrap: anywhere; }
.comment-body img.att { max-width: 260px; max-height: 260px; border-radius: var(--r); margin-top: 8px; cursor: zoom-in; }
.comment-actions { display: flex; align-items: center; gap: 2px; margin-top: 6px; margin-inline-start: -8px; }
.comment-actions button, .comment-actions a { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding-inline: 8px; border-radius: var(--r-pill); color: var(--muted); font-size: .8em; font-weight: 600; }
.comment-actions button:hover { background: var(--surface-2); color: var(--text); }
.comment-actions .is-on { color: var(--brand); }
.comment-actions .ic { width: 15px; height: 15px; }
.replies { margin-top: 8px; padding-inline-start: 4px; border-inline-start: 2px solid var(--line); }
.replies .comment { grid-template-columns: 30px 1fr; padding-inline-start: 12px; }
.replies .comment .avatar { width: 30px; height: 30px; }
.comment.is-pinned { background: color-mix(in srgb, var(--brand) 5%, transparent); border-radius: var(--r); padding-inline: 10px; }
.comment.is-pending { opacity: .7; }
.spoiler { position: relative; border-radius: 6px; cursor: pointer; }
.spoiler:not(.is-revealed) { color: transparent; background: var(--surface-3); user-select: none; }
.spoiler:not(.is-revealed) * { visibility: hidden; }
.spoiler:not(.is-revealed)::after { content: "⚠ حرق — اضغط للكشف"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-2); font-size: .82em; font-weight: 700; visibility: visible; }
.badge-role { display: inline-flex; align-items: center; gap: 3px; font-size: .72em; font-weight: 700; padding: 0 7px; border-radius: 6px; line-height: 1.75; }
.lvl { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 18px; padding-inline: 5px; border-radius: 5px; font-size: .7em; font-weight: 800; color: #0b0b10; }
.mention { color: var(--brand); font-weight: 600; }

/* ---------- Reactions ---------- */
.reactions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 600px) { .reactions { grid-template-columns: repeat(6, 1fr); } }
.reaction { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: transform .2s var(--ease), border-color .2s, background .2s; }
.reaction:hover { transform: translateY(-3px); border-color: var(--line-2); }
.reaction .emo { font-size: 30px; line-height: 1.1; transition: transform .3s var(--ease); }
.reaction.is-on { border-color: color-mix(in srgb, var(--brand) 55%, transparent); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.reaction.is-on .emo { transform: scale(1.15); }
.reaction .lbl { font-size: .78em; font-weight: 600; color: var(--text-2); }
.reaction .cnt { font-size: .8em; color: var(--muted); font-weight: 700; }

/* ---------- Profile ---------- */
.p-cover { height: 180px; border-radius: 0 0 var(--r-xl) var(--r-xl); background: var(--grad); background-size: cover; background-position: center; position: relative; overflow: hidden; }
@media (min-width: 700px) { .p-cover { height: 240px; } }
.p-cover::after { content: ""; position: absolute; inset: 0; background: var(--halftone); background-size: 6px 6px; opacity: .4; }
.p-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; margin-top: -48px; position: relative; z-index: 2; }
.p-head .avatar-lg { border: 4px solid var(--bg); width: 110px; height: 110px; }
/* only the avatar overlaps the cover; the name block starts below the cover edge */
@media (min-width: 600px) { .p-head > .grow { margin-top: 54px; } }
.p-name { font-size: 1.6em; font-weight: 800; }
.xp-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.xp-bar span { display: block; height: 100%; background: var(--grad); border-radius: 4px; transition: width .6s var(--ease); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.ach { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; text-align: center; }
.ach .medal { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--c, var(--brand)) 70%, #fff), var(--c, var(--brand))); color: #fff; box-shadow: 0 8px 18px -8px var(--c, var(--brand)), inset 0 -3px 0 rgba(0,0,0,.2); }
.ach .medal .ic { width: 24px; height: 24px; }
.ach span { font-size: .72em; font-weight: 600; color: var(--text-2); line-height: 1.3; }
.ach.locked .medal { filter: grayscale(1); opacity: .35; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-box { padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.stat-box b { display: block; font-size: 1.45em; font-weight: 800; }
.stat-box span { color: var(--muted); font-size: .8em; }

/* ---------- Leaderboard ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; margin-block: 20px 26px; }
.pod { text-align: center; padding: 16px 8px 14px; border-radius: var(--r-xl) var(--r-xl) var(--r) var(--r); background: var(--surface); border: 1px solid var(--line); position: relative; }
.pod .avatar { width: 64px; height: 64px; margin: 0 auto 8px; border: 3px solid var(--c); }
.pod.first { padding-top: 26px; background: linear-gradient(to bottom, color-mix(in srgb, #ffcc4d 14%, var(--surface)), var(--surface)); }
.pod.first .avatar { width: 84px; height: 84px; }
.pod .place { position: absolute; top: -14px; inset-inline-start: 50%; transform: translateX(50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #111; background: var(--c); }
[dir="ltr"] .pod .place { transform: translateX(-50%); }
.pod .n { font-weight: 800; }
.pod .v { color: var(--muted); font-size: .85em; }
.lb-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: 0; }
.lb-row .r { font-weight: 800; color: var(--muted); text-align: center; }
.lb-row.me { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.lb-me-sticky { position: sticky; bottom: calc(var(--bottom-h) + 10px); margin-top: 12px; border-radius: var(--r-lg); background: var(--elev); border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); box-shadow: var(--shadow-lg); }

/* ---------- Store ---------- */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.pack { position: relative; padding: 22px 18px 18px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.pack:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--gem-2) 45%, transparent); box-shadow: 0 20px 40px -20px color-mix(in srgb, var(--gem-2) 60%, transparent); }
.pack .gems { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--gem-2) 30%, transparent), transparent 70%); }
.pack .gems .ic { width: 42px; height: 42px; color: var(--gem-1); filter: drop-shadow(0 6px 12px color-mix(in srgb, var(--gem-2) 60%, transparent)); }
.pack .amount { font-size: 1.7em; font-weight: 800; line-height: 1.1; }
.pack .bonus { color: var(--success); font-weight: 700; font-size: .85em; }
.pack .price { margin-top: 8px; font-weight: 800; font-size: 1.1em; }
.pack .per { color: var(--muted); font-size: .75em; }
.pack .ribbon { position: absolute; top: 12px; inset-inline-end: -1px; padding: 3px 12px; font-size: .74em; font-weight: 800; border-radius: var(--r-pill) 0 0 var(--r-pill); background: var(--grad); color: #fff; }
[dir="ltr"] .pack .ribbon { border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.pack.is-best { border-color: color-mix(in srgb, var(--brand) 50%, transparent); }

/* Wallet */
.balance-card { position: relative; overflow: hidden; padding: 24px; border-radius: var(--r-xl); background: radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--gem-2) 40%, transparent), transparent 60%), radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--gem-1) 30%, transparent), transparent 60%), var(--surface); border: 1px solid var(--line-2); }
.balance-card .big { font-size: 2.6em; font-weight: 800; line-height: 1.1; display: flex; align-items: center; gap: 10px; }
.balance-card .big .ic { width: 36px; height: 36px; color: var(--gem-1); }
.tx { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.tx .i { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); }
.tx .amt { font-weight: 800; direction: ltr; }
.tx .amt.plus { color: var(--success); } .tx .amt.minus { color: var(--danger); }

/* ---------- Unlock screen ---------- */
.unlock { max-width: 560px; margin: 30px auto; text-align: center; padding: 32px 22px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.unlock::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--gem-2) 25%, transparent), transparent 60%); pointer-events: none; }
.unlock > * { position: relative; }
.unlock .lock-ico { width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--gem-grad); color: #0b0b16; box-shadow: 0 16px 34px -12px var(--gem-2); }
.unlock .lock-ico .ic { width: 34px; height: 34px; }
.unlock .cover-mini { width: 88px; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; margin: 0 auto 14px; box-shadow: var(--shadow); }
.unlock .opts { display: grid; gap: 10px; margin-top: 20px; }
.countdown { display: inline-flex; gap: 8px; margin-top: 10px; }
.countdown div { min-width: 58px; padding: 8px 6px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.countdown b { display: block; font-size: 1.4em; font-weight: 800; }
.countdown span { font-size: .7em; color: var(--muted); }

/* ---------- Community ---------- */
.comm-layout { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .comm-layout { grid-template-columns: 240px minmax(0, 1fr) 300px; } }
.channel-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r); color: var(--text-2); font-weight: 600; font-size: .92em; }
.channel-nav a:hover { background: var(--surface); color: var(--text); }
.channel-nav a.is-active { background: var(--surface-2); color: var(--text); }
.channel-nav .cnt { margin-inline-start: auto; color: var(--muted); font-size: .8em; font-weight: 500; }
.channel-nav .hash { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--brand)) 18%, transparent); color: var(--c, var(--brand)); }
.post { padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.post + .post { margin-top: 12px; }
.post-body { margin-top: 10px; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }
.post-images { display: grid; gap: 6px; margin-top: 10px; border-radius: var(--r); overflow: hidden; }
.post-images.n2 { grid-template-columns: 1fr 1fr; } .post-images.n3, .post-images.n4 { grid-template-columns: 1fr 1fr; }
.post-images img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; cursor: zoom-in; }
.post-link { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 8px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.post-link .cv { width: 40px; aspect-ratio: 3/4; border-radius: 6px; overflow: hidden; }
.post-link .cv img { width: 100%; height: 100%; object-fit: cover; }
.poll { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.poll-opt { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; text-align: start; width: 100%; }
.poll-opt .fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: color-mix(in srgb, var(--brand) 18%, transparent); z-index: 0; transition: width .6s var(--ease); }
.poll-opt > span { position: relative; z-index: 1; font-weight: 600; }
.poll-opt.is-mine { border-color: color-mix(in srgb, var(--brand) 55%, transparent); }
.post-actions { display: flex; gap: 4px; margin-top: 10px; margin-inline-start: -8px; }

/* ---------- Library page ---------- */
.lib-layout { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .lib-layout { grid-template-columns: 280px minmax(0, 1fr); } }
.filters { position: sticky; top: calc(var(--header-h) + 14px); max-height: calc(100vh - var(--header-h) - 28px); overflow-y: auto; }
.filters-wrap .modal-backdrop { display: none; }
.filter-block { padding-block: 14px; border-bottom: 1px solid var(--line); }
.filter-block:first-child { padding-top: 0; }
.filter-block:last-child { border-bottom: 0; }
.filter-block h4 { font-size: .88em; color: var(--text-2); margin-bottom: 10px; display: flex; justify-content: space-between; }
.filter-block .chips { gap: 6px; }
@media (max-width: 999px) {
  .filters-wrap { position: fixed; inset: 0; z-index: var(--layer-filter); display: none; }
  .filters-wrap.is-open { display: block; }
  .filters-wrap .modal-backdrop { display: block; opacity: 1; }
  .filters { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(360px, 88vw); max-height: none; background: var(--elev); padding: 18px; animation: slideIn .28s var(--ease-out); padding-bottom: 90px; }
  .filters-apply { position: fixed; bottom: 0; inset-inline-start: 0; width: min(360px, 88vw); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: var(--elev); border-top: 1px solid var(--line); display: flex; gap: 8px; }
}
@media (min-width: 1000px) { .filters-apply { display: none; } .filters-toggle { display: none !important; } }
@keyframes slideIn { from { transform: translateX(100%); } }
[dir="ltr"] .filters { animation-name: slideInL; }
@keyframes slideInL { from { transform: translateX(-100%); } }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.toolbar .count { color: var(--muted); font-size: .9em; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.letter-bar { display: flex; flex-wrap: wrap; gap: 4px; }
.letter-bar a { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-size: .85em; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); }
.letter-bar a.is-on { background: var(--grad); color: #fff; border-color: transparent; }

/* Genres page */
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.genre-card { position: relative; height: 120px; border-radius: var(--r-lg); overflow: hidden; display: flex; align-items: flex-end; padding: 14px; isolation: isolate; border: 1px solid var(--line); transition: transform .25s var(--ease); }
.genre-card:hover { transform: translateY(-3px); }
.genre-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: saturate(1.2); transition: transform .5s var(--ease-out); }
.genre-card:hover img { transform: scale(1.06); }
.genre-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, color-mix(in srgb, var(--c, #000) 75%, #000) 0%, color-mix(in srgb, var(--c, #000) 30%, transparent) 70%); }
.genre-card b { color: #fff; font-size: 1.2em; font-weight: 800; display: block; }
.genre-card span { color: rgba(255,255,255,.8); font-size: .8em; }
@media (max-width: 560px) { .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .genre-card { height: 96px; padding: 12px; border-radius: var(--r); } .genre-card b { font-size: 1.05em; } }

/* Latest page timeline */
.latest-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); position: relative; }
.latest-row:hover { background: var(--surface-2); }
.latest-row .cv { width: 52px; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.latest-row .cv img { width: 100%; height: 100%; object-fit: cover; }
.latest-day { padding: 12px 14px 6px; color: var(--muted); font-weight: 700; font-size: .85em; }
/* the whole row opens the chapter; series and team links stay tappable above it */
.latest-row .ch-link::before { content: ""; position: absolute; inset: 0; }
.latest-row a:not(.ch-link) { position: relative; z-index: 1; }
@media (max-width: 760px) {
  .chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; max-width: calc(100% + 32px); }
  .chips.scroll-x::-webkit-scrollbar { display: none; }
  .chips.scroll-x > * { flex: none; }
  .toolbar .chips.scroll-x { margin-inline-start: -16px !important; }
}

/* Notifications */
.notif { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: start; padding: 14px; border-bottom: 1px solid var(--line); position: relative; }
.notif.is-unread { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.notif.is-unread::before { content: ""; position: absolute; inset-inline-start: 0; inset-block: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.notif .ni { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.notif .ni img { width: 100%; height: 100%; object-fit: cover; }
.notif .ni .ic { color: var(--brand); }
.notif .t { font-weight: 600; font-size: .94em; }
.notif .b { color: var(--muted); font-size: .85em; }
.notif .time { color: var(--muted); font-size: .75em; white-space: nowrap; }
.notif a.cover::before { content: ""; position: absolute; inset: 0; }
.notif-pop { width: min(400px, calc(100vw - 24px)); padding: 0; max-height: min(520px, calc(100dvh - var(--header-h) - 20px)); flex-direction: column; }
.notif-pop.is-open { display: flex; }
.notif-pop .list { overflow-y: auto; }
.notif-pop .notif { padding: 12px; }

/* Settings layout */
.settings-layout { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .settings-layout { grid-template-columns: 230px minmax(0, 1fr); } }
.side-nav { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
@media (min-width: 900px) { .side-nav { flex-direction: column; position: sticky; top: calc(var(--header-h) + 14px); } }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); color: var(--text-2); font-weight: 600; font-size: .92em; white-space: nowrap; }
.side-nav a:hover { background: var(--surface); }
.side-nav a.is-active { background: var(--surface-2); color: var(--text); }
.side-nav a .ic { color: var(--muted); }
.side-nav a.is-active .ic { color: var(--brand); }

/* Page (static) */
.prose { max-width: 820px; line-height: 1.95; color: var(--text-2); }
.prose h1 { font-family: var(--font-display); font-weight: 400; font-size: 2.1em; color: var(--text); margin-bottom: .5em; }
.prose h2 { color: var(--text); font-size: 1.3em; margin: 1.6em 0 .6em; }
.prose h3 { color: var(--text); margin: 1.3em 0 .5em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin-bottom: 1em; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 1em 0; padding: 10px 16px; border-inline-start: 3px solid var(--brand); background: var(--surface); border-radius: var(--r-sm); }
.prose img { border-radius: var(--r); }
.ta-center { text-align: center; } .ta-left { text-align: left; } .ta-right { text-align: right; }
details.faq { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 16px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: var(--text); list-style: none; display: flex; justify-content: space-between; }
details.faq summary::after { content: "+"; font-size: 1.3em; color: var(--muted); }
details.faq[open] summary::after { content: "−"; }
details.faq p { padding-bottom: 14px; }

/* Error pages */
.err { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.err .code { font-family: var(--font-display); font-size: clamp(90px, 18vw, 160px); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Utility: two column page */
.page-head { margin-bottom: 20px; }
.page-head .row { flex-wrap: wrap; }
.page-head.row-between { flex-wrap: wrap; }
.page-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 4.5vw, 40px); line-height: 1.2; }
.page-sub { color: var(--muted); margin-top: 4px; }
.cols { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1050px) { .cols { grid-template-columns: minmax(0, 1fr) 330px; } }
.home-cols { display: grid; gap: 30px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .home-cols { grid-template-columns: minmax(0, 1fr) 340px; } }
.sticky-side { position: sticky; top: calc(var(--header-h) + 16px); }

/* Tooltip */
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); inset-inline-start: 50%; transform: translateX(50%); white-space: nowrap; padding: 4px 9px; border-radius: 7px; background: var(--text); color: var(--bg); font-size: 11.5px; font-weight: 600; z-index: 90; pointer-events: none; }
[dir="ltr"] [data-tip]:hover::after { transform: translateX(-50%); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: var(--layer-lightbox); background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* Install prompt */
.install-banner { position: fixed; bottom: calc(var(--bottom-h) + 12px); inset-inline: 12px; z-index: 90; max-width: 460px; margin-inline: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--elev); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: toastIn .4s var(--ease-out); }


/* ==========================================================================
   Mobile & touch ergonomics
   ========================================================================== */
/* dynamic viewport units: phones' browser bars no longer cut screens short */
.main { min-height: calc(100dvh - var(--header-h) - 200px); }
.auth-wrap { min-height: calc(100dvh - var(--header-h)); }
.modal-box { max-height: calc(100dvh - 32px); }
.filters { max-height: calc(100dvh - var(--header-h) - 28px); }

/* iOS zooms the page into any field under 16px — keep fields at 16px on phones */
@media (max-width: 760px) {
  .input, .select, .textarea, .search-box input, .comment-form textarea, .r-select { font-size: 16px; }
  .input-sm { font-size: 15px; }
}
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* finger-sized targets where the pointer is a finger */
@media (pointer: coarse) {
  .tab { height: 40px; }
  .tabs-line .tab { height: 48px; }
  .chip { height: 38px; }
  .chip-sm { height: 34px; padding-inline: 12px; }
  .btn-sm { height: 40px; }
  .btn-xs { height: 34px; padding-inline: 11px; }
  .btn-sm.btn-icon { width: 40px; }
  .icon-btn { width: 44px; height: 44px; }
  .see-all { padding: 10px 12px; margin-inline-end: -10px; }
  .pager a, .pager span { min-width: 44px; height: 44px; }
  .rate-input button { width: 40px; height: 40px; }
  .comment-actions button, .comment-actions a { height: 36px; padding-inline: 10px; }
  .letter-bar a { min-width: 38px; height: 38px; }
  .ch-pill { padding-block: 7px; }
  .input-sm { height: 42px; }
  .seg span { height: 38px; }
  .footer-grid a { padding-block: 8px; }
  .s-alt button { padding-block: 6px; }
  .menu a, .menu button.mi { padding-block: 11px; }
}

/* hover-only effects stay on devices that really hover (no "stuck" zoom after a tap) */
@media (hover: none) {
  .card:hover .card-cover img, .genre-card:hover img { transform: none; }
  .cont-card:hover, .reaction:hover, .pack:hover, .genre-card:hover, .rail-btn:hover { transform: none; }
  [data-tip]:hover::after { display: none; }
  .sr-foot { display: none; }
}

/* file pickers look like the rest of the form */
.input[type="file"] { height: auto; min-height: 46px; padding: 6px; color: var(--muted); font-size: .88em; cursor: pointer; }
.input[type="file"]::file-selector-button { font: inherit; font-weight: 600; color: var(--text); background: var(--surface-3); border: 0; border-radius: var(--r-pill); padding: 8px 16px; margin-inline-end: 10px; cursor: pointer; transition: background .2s; }
.input[type="file"]:hover::file-selector-button { background: color-mix(in srgb, var(--brand) 20%, var(--surface-3)); }

/* horizontal scrollers fade at the edge that has more content (classes set by app.js) */
.has-more-start { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28px); mask-image: linear-gradient(to left, transparent 0, #000 28px); }
.has-more-end { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px); mask-image: linear-gradient(to right, transparent 0, #000 28px); }
.has-more-start.has-more-end { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); }
[dir="ltr"] .has-more-start { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px); mask-image: linear-gradient(to right, transparent 0, #000 28px); }
[dir="ltr"] .has-more-end { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28px); mask-image: linear-gradient(to left, transparent 0, #000 28px); }

/* rails snap to the content edge, not the screen edge */
.rail-track { scroll-padding-inline: 16px; }

/* Readable, touch-sized controls without changing the visual size of carousel indicators. */
@media (max-width: 900px), (pointer: coarse) {
  .btn, .btn-sm, .btn-xs, .icon-btn, .search-trigger, .tab, .chip, .chip-sm, .see-all, .nav a { min-height: 44px; }
  .icon-btn { min-width: 44px; }
  .input-sm, input, select, textarea { font-size: max(16px, 1em); }
  .hero-dots { gap: 4px; }
  .hero-dot, .hero-dot.is-active { width: 44px; height: 44px; border-radius: 0; background: transparent; }
  .hero-dot::before { inset: 20px 4px 19px; border-radius: 4px; background: color-mix(in srgb,var(--text) 25%,transparent); }
  .hero-dot.is-active::after { inset: 20px 4px 19px; }
  .hero-controls { bottom: 8px; }
  .hero-actions { flex-wrap: wrap; }
  .hero-inner { min-width: 0; }
  .hero-title { overflow-wrap: anywhere; }
  .hero-title, .s-title, .card-title, .comment-body { overflow-wrap: anywhere; }
}
.modal-box, .modal.sheet .modal-box { max-height: calc(var(--visible-vh, 100dvh) - 32px); }
.modal-box input, .modal-box textarea, .modal-box select { max-width: 100%; min-width: 0; }
.modal-head > :first-child { min-width: 0; overflow-wrap: anywhere; }
.search-box { max-height: calc(var(--visible-vh, 100dvh) - 24px); }
.hero-title { min-width: 0; }
@media (min-width: 700px) { .rail-track { scroll-padding-inline: 0; } }

/* search: full-screen sheet on phones, sized to the visible viewport (keyboard included) */
@media (max-width: 760px) {
  .search-panel { min-height: 100dvh; display: flex; flex-direction: column; animation-name: sheetUp; }
  .search-results { max-height: none; flex: 1; overscroll-behavior: contain; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .search-box { padding-top: calc(8px + env(safe-area-inset-top)); }
  .sr-item { padding-block: 10px; }
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } }

/* footer: compact link columns on phones instead of one long list */
@media (max-width: 799px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 12px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .footer-grid a { font-size: .86em; }
  .site-footer { padding-block: 30px calc(24px + var(--bottom-h)); }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* bottom navigation: larger labels, a pill behind the active icon, press feedback */
.bottom-nav a, .bottom-nav button { font-size: 11px; -webkit-tap-highlight-color: transparent; gap: 4px; }
.bottom-nav .ic { width: 22px; height: 22px; transition: transform .2s var(--ease); position: relative; z-index: 1; }
.bottom-nav a::after, .bottom-nav button::after { content: ""; position: absolute; top: 7px; width: 54px; height: 30px; border-radius: 15px; background: color-mix(in srgb, var(--brand) 16%, transparent); transform: scaleX(.4); opacity: 0; transition: transform .28s var(--ease-out), opacity .2s; }
.bottom-nav .is-active::after { transform: none; opacity: 1; }
.bottom-nav .is-active .ic { color: var(--brand); }
.bottom-nav .is-active::before { display: none; }
.bottom-nav a:active .ic, .bottom-nav button:active .ic { transform: scale(.86); }
.bottom-nav .badge-dot { z-index: 2; }

/* chapter list rows on phones: the lock/countdown pill may wrap instead of squeezing the title */
@media (max-width: 600px) {
  .ch-row { padding: 12px 14px; gap: 8px; }
  /* the lock / countdown pill drops under the meta line so the chapter title keeps the full width */
  .ch-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .ch-row .side { display: contents; }
  .ch-row .side > .lock-pill { grid-column: 1; grid-row: 2; justify-self: start; }
  .ch-row .side > .dropdown { grid-column: 2; grid-row: 1 / span 2; align-self: center; position: relative; z-index: 2; }
}

/* ranked lists can use two lines for long titles */
.ranked-item .t.clamp-1 { -webkit-line-clamp: 2; line-height: 1.4; }

/* community channels: a swipeable row of chips on phones and tablets */
@media (max-width: 999px) {
  .channel-nav { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 6px; }
  .channel-nav::-webkit-scrollbar { display: none; }
  .channel-nav a { flex: none; padding: 6px 12px 6px 8px; border-radius: var(--r-pill); }
  .channel-nav .hash { width: 24px; height: 24px; border-radius: 50%; }
  .channel-nav .cnt, .channel-nav hr { display: none; }
}

/* settings / profile sub-navigation on phones */
@media (max-width: 899px) {
  .side-nav { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .side-nav a { padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); }
  .side-nav a.is-active { border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
}

/* filters drawer sits above the bottom bar and keeps its own scroll */
@media (max-width: 999px) {
  .filters { overscroll-behavior: contain; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .filters .btn-block[type="submit"] { display: none; }
}


/* ==========================================================================
   Motion — every animation answers a question for the reader:
   "did my tap register?", "where did that come from?", "is it still loading?"
   All of it is switched off by the reduced-motion rule at the end of the file.
   ========================================================================== */

/* Page-to-page: a quick cross-fade instead of a white flash; header and bottom bar stay put,
   and a tapped cover grows into the series page cover (browsers without support just navigate) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; animation-timing-function: ease-out; }
.site-header { view-transition-name: site-header; }
.bottom-nav { view-transition-name: bottom-nav; }
.s-cover img { view-transition-name: kd-cover; }
::view-transition-group(kd-cover) { animation-duration: .32s; animation-timing-function: var(--ease-out); }
::view-transition-old(kd-cover), ::view-transition-new(kd-cover) { animation: none; mix-blend-mode: normal; }
::view-transition-image-pair(kd-cover) { isolation: none; }
/* a cover with no partner on the other page (back to a list whose card is off screen, on to the reader):
   it fades with the page instead of standing still on top of it until the transition ends */
::view-transition-old(kd-cover):only-child { animation: kdVtOut .18s ease-out both; }
::view-transition-new(kd-cover):only-child { animation: kdVtIn .18s ease-out both; }
@keyframes kdVtOut { to { opacity: 0; } }
@keyframes kdVtIn { from { opacity: 0; } }

/* Slow host, tapped link: a thin bar shows the next page is on its way */
.nav-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: var(--layer-progress); pointer-events: none; transform-origin: right; transform: scaleX(0); background: var(--grad); opacity: 0; }
[dir="ltr"] .nav-progress { transform-origin: left; }
.nav-progress.is-on { opacity: 1; animation: navProgress 8s cubic-bezier(.1,.7,.2,1) forwards; }
@keyframes navProgress { 0% { transform: scaleX(0); } 10% { transform: scaleX(.35); } 100% { transform: scaleX(.92); } }

/* Covers fade in when their image arrives instead of popping in (the accent colour holds the space) */
/* (above-the-fold LCP images — hero, series cover, fetchpriority=high — are never faded) */
.kd-fade :is(.card-cover, .cv) img:not(.is-loaded):not([fetchpriority="high"]) { opacity: 0; }
.kd-fade :is(.card-cover, .cv) img { transition: opacity .35s ease-out, transform .5s var(--ease-out); }

/* Touch: the thing you pressed answers immediately */
@media (hover: none) {
  .card .card-cover, .cont-card, .genre-card, .pack, .reaction, .next-card { transition: transform .16s var(--ease); }
  .card:active .card-cover { transform: scale(.965); }
  .cont-card:active, .genre-card:active, .pack:active, .next-card:active { transform: scale(.98); }
  .ch-row:active, .latest-row:active, .ranked-item:active, .row-card:active, .sr-item:active, .notif:active { background: var(--surface-2); }
  .reaction:active { transform: scale(.94); }
}

/* Favourite / reaction: a small pop confirms the toggle */
.is-popping .ic, .reaction.is-popping .emo { animation: kdPop .42s var(--ease-out); }
@keyframes kdPop { 0% { transform: scale(1); } 40% { transform: scale(1.32); } 100% { transform: scale(1); } }

/* Hero: the incoming slide's text and cover drift in from the side it came from */
.hero-slide.is-active .hero-text > *, .hero-slide.is-active .hero-cover { animation: heroIn .6s var(--ease-out) both; }
.hero-slide.is-active .hero-cover { animation-name: heroCoverIn; }
.hero-slide.is-active .hero-text > :nth-child(2) { animation-delay: .04s; }
.hero-slide.is-active .hero-text > :nth-child(3) { animation-delay: .08s; }
.hero-slide.is-active .hero-text > :nth-child(n+4) { animation-delay: .12s; }
.hero:not(.has-moved) .hero-slide.is-active :is(.hero-text > *, .hero-cover) { animation: none; }
@keyframes heroIn { from { opacity: 0; transform: translateX(calc(var(--hero-dir, 1) * 18px)); } }
@keyframes heroCoverIn { from { opacity: 0; transform: translateX(calc(var(--hero-dir, 1) * 24px)) rotate(-2.5deg) scale(.96); } }
@media (max-width: 759px) { @keyframes heroCoverIn { from { opacity: 0; transform: translateX(calc(var(--hero-dir, 1) * 16px)) scale(.96); } } }

/* Card hover on desktop: the title picks up the brand colour together with the cover zoom */
@media (hover: hover) { .card-title a { transition: color .2s; } .card:hover .card-title a { color: var(--brand); } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
  .kd-fade :is(.card-cover, .cv) img:not(.is-loaded) { opacity: 1; }
}
@media (max-width: 600px) { .hide-sm { display: none; } }
.footer-grid a.brand { display: flex; padding: 0; }

/* ---------- Reading ⇄ watching switch (header) ---------- */
.mode-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); flex: none; }
.mode-switch a { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding-inline: 11px; border-radius: var(--r-pill); font-size: .8em; font-weight: 700; color: var(--muted); transition: background .2s, color .2s; }
.mode-switch a .ic { width: 15px; height: 15px; }
.mode-switch a:hover { color: var(--text); }
.mode-switch a.is-on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px var(--brand); }
@media (max-width: 1180px) { .site-header .nav a:nth-child(n+6) { display: none; } }
/* phones: icons only, so the header keeps its width (the full menu also links both sections) */
@media (max-width: 560px) { .mode-switch a { padding-inline: 8px; height: 28px; } .mode-switch a span { display: none; } }

/* Narrow phones (320–400 px): the reading/watching switch joined the header, so the brand keeps its mark only and
   the header spacing tightens; nothing in the header may widen the page. */
@media (max-width: 400px) {
  .site-header .container { gap: 8px; }
  .site-header .brand-name { display: none; }
  .header-actions { gap: 4px; min-width: 0; }
  .header-actions .btn-sm { padding-inline: 10px; }
  .mode-switch a { padding-inline: 7px; }
}

/* ───── Community live chat ───── */
.chat { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; height: calc(var(--visible-vh, 100vh) - 210px); min-height: 420px; max-height: 820px; }
.chat-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; overflow-anchor: none; padding: 10px 6px 14px; scroll-behavior: auto; }
.chat-log:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.chat-older { display: flex; justify-content: center; padding: 4px 0 8px; }
.chat-empty { padding: 60px 20px; }
.chat-day { display: flex; align-items: center; gap: 10px; margin: 14px 10px 8px; color: var(--muted); font-size: .76em; font-weight: 700; }
.chat-day::before, .chat-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.chat-msg { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 6px 10px; border-radius: var(--r); transition: background .2s; }
.chat-msg.is-grouped { padding-top: 1px; }
.chat-msg:hover, .chat-msg:focus-within { background: var(--surface); }
.chat-msg.is-mention { background: color-mix(in srgb, var(--brand) 9%, transparent); box-shadow: inset 3px 0 0 var(--brand); }
.chat-msg.is-focus { background: color-mix(in srgb, var(--brand) 16%, transparent); }
.chat-avatar { width: 32px; height: 32px; }
.chat-avatar .avatar { width: 32px; height: 32px; }
.chat-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 2px; font-size: .85em; }
.chat-name { font-weight: 800; color: var(--text); }
.chat-head .tag { font-size: .78em; padding: 1px 7px; color: var(--c, var(--text-2)); }
.chat-head time { color: var(--muted); font-size: .9em; }
.chat-text { font-size: .95em; line-height: 1.75; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-text.is-deleted { color: var(--muted); font-style: italic; font-size: .88em; }
.chat-text.is-deleted .ic { width: 13px; height: 13px; vertical-align: -2px; }
.chat-text a { color: var(--brand); }
.chat-quote { display: block; width: 100%; text-align: start; margin: 2px 0 4px; padding: 5px 10px; border-inline-start: 3px solid var(--line-2); border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: .82em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.chat-quote:hover { color: var(--text); }
.chat-more { opacity: 0; transition: opacity .15s; }
.chat-msg:hover .chat-more, .chat-msg:focus-within .chat-more, .chat-more:has(.is-open) { opacity: 1; }
@media (hover: none) { .chat-more { opacity: .7; } }
.chat-more .icon-btn { width: 32px; height: 32px; }
.chat-pinned { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: .86em; }
.chat-pinned .chat-quote { margin: 0; border: 0; background: none; padding: 0; }
.chat-jump { position: absolute; inset-inline: 0; margin-inline: auto; width: max-content; bottom: 84px; z-index: 3; box-shadow: var(--shadow, 0 8px 24px rgba(0,0,0,.3)); }
.chat-form { border-top: 1px solid var(--line); padding: 10px; background: var(--bg-2, var(--surface)); }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; }
.chat-compose .textarea { flex: 1; min-height: 44px; max-height: 160px; resize: none; padding-block: 10px; line-height: 1.6; font-size: 16px; }
.chat-send { width: 44px; height: 44px; padding: 0; flex: none; border-radius: 50%; }
.chat-spoiler .icon-btn { width: 44px; height: 44px; }
.chat-spoiler input:checked + .icon-btn { color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.chat-spoiler input:focus-visible + .icon-btn { outline: 2px solid var(--brand); outline-offset: 2px; }
.chat-replying { display: flex; align-items: center; gap: 8px; padding: 4px 6px 8px; font-size: .84em; color: var(--text-2); }
.chat-replying .ic { width: 14px; height: 14px; vertical-align: -2px; }
.chat-gate { display: flex; align-items: center; gap: 10px; padding: 14px; border-top: 1px solid var(--line); color: var(--text-2); font-size: .92em; }
.chat-edit .textarea { font-size: 16px; }
.chat-online { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-size: .85em; font-weight: 700; color: var(--text-2); }
.chat-online .dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 3px color-mix(in srgb, #2ecc71 25%, transparent); }
@media (max-width: 999px) { .chat { height: calc(var(--visible-vh, 100vh) - 190px); } }
@media (max-width: 640px) {
  .chat { height: calc(var(--visible-vh, 100vh) - 170px); min-height: 360px; border-radius: var(--r); }
  .chat-msg { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; padding-inline: 6px; }
  .chat-avatar, .chat-avatar .avatar { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) { .chat-msg, .chat-more { transition: none; } }
.channel-nav .chat-link .live-dot { width: 8px; height: 8px; margin-inline-start: auto; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 3px color-mix(in srgb, #2ecc71 25%, transparent); }
