/* ───────────────────────────── Tokens ───────────────────────────── */
:root {
  --bg: #0E1015;
  --bg-deep: #0A0B0F;
  --bg-reader: #08090C;
  --surface: #161920;
  --surface-2: #13161C;
  --surface-3: #12141A;
  --panel: #171A21;
  --panel-foot: #15181E;
  --raised: #1A1D25;
  --input: #0F1116;
  --chip: #1F232C;
  --chip-2: #262A34;
  --line: #242833;
  --line-2: #2A2F3A;
  --line-3: #2C313C;
  --line-4: #2E333F;
  --line-5: #1D2029;
  --line-6: #20242C;
  --hover: #1D2129;
  --hover-2: #22262F;
  --text: #EEE9E1;
  --head: #F2EDE5;
  --head-2: #F4EFE7;
  --body: #CFCBC3;
  --muted: #8B8F9A;
  --muted-2: #9DA1AB;
  --muted-3: #A6AAB4;
  --muted-4: #B4B7C0;
  --muted-5: #9A9EA9;
  --soft: #C9CCD4;
  --soft-2: #D6D2CA;
  --soft-3: #DCD8D0;
  --soft-4: #E3DFD7;
  --soft-5: #CDD0D8;
  --soft-6: #B9BCC5;
  --accent: #F3B54A;
  --accent-fg: #17120A;
  --accent-soft: #F7CF7E;
  --accent-hover: #FFD58A;
  --accent-mark: rgba(243, 181, 74, 0.14);
  --ok: #62D39B;
  --ok-2: #5FD39A;
  --ok-text: #9BE6BF;
  --warn: #F2A962;
  --danger: #F0786B;
  --danger-2: #F38E86;
  --danger-text: #F5A39A;
  --info: #8FB0FF;
  --purple: #C7A4FF;
  --font: 'Onest', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --font-serif: 'Literata', 'PT Serif', Georgia, serif;
  --font-ja-serif: 'Noto Serif JP', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
  --font-ja-sans: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', 'Onest', sans-serif;
  --radius: 12px;
  --shadow-pop: 0 24px 64px rgba(0, 0, 0, 0.6);
  --max: 1520px;
  --gutter: 40px;
}

/* ───────────────────────────── Base ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
img { display: block; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Text fields show focus with their own border or wrapper, not with the outline on top of it. */
.search__input:focus-visible, .field:focus-visible, .auth__input:focus-visible, .drawer-input:focus-visible, .prompt:focus-visible,
.composer__input:focus-visible, .pthread__input:focus-visible, .rd-composer__input:focus-visible { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.clamp1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tnum { font-variant-numeric: tabular-nums; }
.scroll { scrollbar-width: thin; scrollbar-color: #343946 transparent; }
.tlink { text-decoration: none; }
.tlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.stretch::after { content: ''; position: absolute; inset: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

#blazor-error-ui { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; padding: 12px 48px 12px 16px; background: #3A2222; color: #F2EDE5; font-size: 14px; }
#blazor-error-ui .reload { color: var(--accent); margin-left: 8px; }
#blazor-error-ui .dismiss { position: absolute; right: 16px; top: 12px; cursor: pointer; }

.site { min-height: 100vh; background: radial-gradient(1100px 420px at 12% -140px, rgba(243, 181, 74, 0.07), rgba(243, 181, 74, 0) 70%), var(--bg); }
.page-main { max-width: var(--max); margin: 0 auto; padding: 36px var(--gutter) 72px; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.page-title { font-family: var(--font-display); font-size: 34px; line-height: 42px; font-weight: 600; letter-spacing: -0.015em; color: var(--head); }
.page-count { font-size: 15px; line-height: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.section-title { font-family: var(--font-display); font-size: 20px; line-height: 28px; font-weight: 600; color: var(--head); }

/* ───────────────────────────── Header ───────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(14, 16, 21, 0.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-5); }
.site-header__inner { max-width: var(--max); margin: 0 auto; padding: 12px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.logo { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--head); text-decoration: none; }
.logo:hover { color: var(--head); }
.logo__name { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.type-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.navlink { display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: 10px; background: transparent; color: var(--muted-3); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: background-color .15s ease, color .15s ease; }
.navlink:hover { color: var(--head); background: var(--panel); }
.navlink--on { background: var(--raised); color: var(--head); font-weight: 600; }
.site-header__search { flex: 1 1 160px; max-width: 420px; margin-left: auto; }
.avatar-btn { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 22px; border: 1px solid #343946; background: var(--line-2); color: var(--text); font-size: 15px; font-weight: 700; text-decoration: none; }
.avatar-btn:hover { color: var(--head); background: #343946; }

/* ───────────────────────────── Controls ───────────────────────────── */
.search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search__input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; background: transparent; border: 0; outline: none; color: var(--text); font-size: 14.5px; }
.search__input::-webkit-search-cancel-button { display: none; }
.search--sm { height: 42px; padding: 0 6px 0 12px; background: var(--input); border-radius: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: var(--radius); border: 1px solid transparent; background: transparent; color: var(--text); font-size: 14.5px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease, filter .15s ease; }
.btn:hover { color: var(--head); }
.btn--ctl { border-color: var(--line-2); background: var(--surface); color: var(--soft); font-weight: 400; }
.btn--ctl:hover { background: var(--hover); border-color: #3A404D; color: var(--head); }
.btn--ctl-on { border-color: #3A404D; background: var(--hover); color: var(--head); font-weight: 600; }
.btn--ctl-strong { border-color: #2F3440; color: var(--text); font-weight: 500; }
.btn--primary { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.btn--primary:hover { color: var(--accent-fg); filter: brightness(1.08); }
.btn--primary:disabled { cursor: default; filter: none; }
.btn--ghost { color: var(--muted-4); font-weight: 400; height: 40px; padding: 0 12px; border-radius: 10px; }
.btn--ghost:hover { background: var(--hover-2); color: var(--head); }
.btn--sm { height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; }
.btn--xs { height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13px; }
.btn--icon { width: 44px; padding: 0; }
.btn--icon-sm { width: 40px; height: 40px; padding: 0; border-radius: 10px; color: var(--soft); }
.btn--icon-sm:hover:not(:disabled) { background: var(--hover); color: var(--head); }
.btn:disabled { opacity: .35; cursor: default; }
.btn--primary:disabled { opacity: 1; }
.chevron { flex: none; transition: transform .15s ease; }
.chevron--open { transform: rotate(180deg); }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-fg); font-size: 12px; font-weight: 700; }

.seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--input); }
.seg--lg { gap: 4px; padding: 4px; border-radius: 12px; border-color: var(--chip-2); }
.seg__btn { flex: 1 1 0; min-width: 0; height: 36px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted-2); font-size: 13.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.seg--lg .seg__btn { height: 34px; border-radius: 9px; }
.seg__btn--on { background: var(--line-2); color: var(--head); }
.seg__btn--sm { height: 30px; font-size: 12.5px; }

.switch { position: relative; flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--switch-off, #3A3F4C); transition: background-color .15s ease; }
.switch__knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 9px; background: #F2EDE5; transition: left .15s ease; }
.switch--on { background: var(--accent); }
.switch--on .switch__knob { left: 19px; }
.switch--sm { width: 32px; height: 20px; }
.switch--sm .switch__knob { width: 14px; height: 14px; }
.switch--sm.switch--on .switch__knob { left: 15px; }
.switch-row { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0; border: 0; background: transparent; color: var(--soft-4); font-size: 14px; text-align: left; cursor: pointer; width: 100%; }
.switch-row > span:first-child { flex: 1 1 auto; }

.backdrop { position: fixed; inset: 0; z-index: 35; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: default; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 10px; border-radius: 8px; border: 1px solid var(--line-3); background: var(--raised); color: var(--soft-4); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: filter .15s ease; }
.chip:hover { filter: brightness(1.15); }
.chip--inc { background: rgba(95, 211, 154, 0.1); border-color: rgba(95, 211, 154, 0.4); color: var(--ok-text); }
.chip--exc { background: rgba(240, 120, 107, 0.1); border-color: rgba(240, 120, 107, 0.4); color: var(--danger-text); }
.chip--exc .chip__label { text-decoration: line-through; }
.chip__sign { font-size: 15px; line-height: 1; font-weight: 700; }
.chip__dot { width: 7px; height: 7px; border-radius: 4px; }
.chip--genre { height: 34px; padding: 0 11px; border-radius: 9px; background: var(--chip); border-color: var(--chip); color: var(--soft-5); font-size: 13.5px; font-weight: 400; }
.chip--genre.chip--inc { background: rgba(95, 211, 154, 0.12); border-color: rgba(95, 211, 154, 0.5); color: var(--ok-text); font-weight: 600; }
.chip--genre.chip--exc { background: rgba(240, 120, 107, 0.12); border-color: rgba(240, 120, 107, 0.5); color: var(--danger-text); font-weight: 600; }
.chip__count { font-size: 12px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip--inc .chip__count { color: #7FCFA6; }
.chip--exc .chip__count { color: #E8968C; }
.chip--sel { height: 30px; padding: 0 7px 0 9px; font-weight: 600; }
.chip--preset { height: 32px; padding: 0 12px; background: var(--chip); border-color: var(--chip); color: var(--soft-5); font-weight: 400; }
.chip--preset-on { background: rgba(243, 181, 74, 0.14); border-color: rgba(243, 181, 74, 0.55); color: var(--accent-soft); }

/* Popover */
.filter { position: relative; }
.popover { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; max-width: calc(100vw - 32px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-3); border-radius: 16px; box-shadow: var(--shadow-pop); overflow: hidden; }
.popover__title { padding: 16px 16px 4px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--head); }
.popover__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 16px 16px 2px; }
.popover__hint { font-size: 12.5px; line-height: 17px; color: var(--muted); }
/* The count in "Показать 40 463 записей" grows with the catalog; when it no longer fits beside "Сбросить"
   in a narrow panel, the button takes a row of its own instead of being cut off. */
.popover__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--panel-foot); }
.popover__foot .btn--primary { flex: 1 1 auto; min-width: 0; justify-content: center; }
.popover__foot .btn--ghost { flex: none; }
.popover__foot-note { display: flex; flex-direction: column; font-size: 12px; line-height: 16px; color: var(--muted); }
.popover__foot-note span { display: flex; align-items: center; gap: 4px; }
.popover__list { display: flex; flex-direction: column; padding: 4px 8px 10px; }
.popover__row { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 8px; border-radius: 8px; cursor: pointer; }
.popover__row:hover { background: #20242D; }
.popover__row input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.popover__row-label { flex: 1 1 auto; font-size: 14px; color: var(--soft-2); }
.popover__row-count { flex: none; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.popover__group-title { padding: 12px 16px 4px; font-size: 11.5px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.popover__none { padding: 28px 16px 18px; text-align: center; font-size: 14px; line-height: 20px; color: var(--muted); }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 4px; }

/* Tag rows */
.tag-row { display: flex; align-items: center; gap: 2px; margin: 0 8px; border-radius: 9px; }
.tag-row--inc { background: rgba(95, 211, 154, 0.08); }
.tag-row--exc { background: rgba(240, 120, 107, 0.08); }
.tag-row__btn { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--soft-2); font-size: 14px; font-weight: 400; text-align: left; cursor: pointer; }
.tag-row__btn:hover { background: #20242D; }
.tag-row--inc .tag-row__btn { color: var(--head); font-weight: 600; }
.tag-row--exc .tag-row__btn { color: #F3A096; }
.tag-row--exc .tag-row__label { text-decoration: line-through; }
.tag-row__box { flex: none; display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #6E7380; background: transparent; color: var(--bg); }
.tag-row--inc .tag-row__box { border-color: var(--ok-2); background: var(--ok-2); }
.tag-row--exc .tag-row__box { border-color: var(--danger); background: var(--danger); }
.tag-row__label { flex: 1 1 auto; min-width: 0; }
.tag-row__label mark { background: rgba(243, 181, 74, 0.3); color: inherit; border-radius: 3px; }
.tag-row__count { flex: none; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tag-row__excl { flex: none; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.tag-row__excl:hover { box-shadow: inset 0 0 0 1px #4A5160; }
.tag-row--exc .tag-row__excl { background: rgba(240, 120, 107, 0.16); color: var(--danger); }

.field { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--input); color: var(--text); font-size: 14.5px; outline: none; }
.field:focus { border-color: var(--accent); }
.field-label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 17px; color: var(--muted); }

.select-wrap { position: relative; display: flex; }
.select { appearance: none; height: 44px; padding: 0 40px 0 14px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 14.5px; cursor: pointer; }
.select:hover { background: var(--hover); border-color: #3A404D; }
.select-wrap > svg { position: absolute; right: 14px; top: 14px; pointer-events: none; }

/* Status pill, age badge */
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.status-pill__dot { width: 6px; height: 6px; border-radius: 3px; }
.status-pill--overlay { height: 22px; padding: 0 8px 0 7px; background: rgba(12, 14, 19, 0.82); font-size: 11.5px; }
.status-pill--lg { height: 26px; padding: 0 11px 0 9px; font-size: 12.5px; }
.status-pill--lg .status-pill__dot { width: 7px; height: 7px; }
.age-badge { flex: none; display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border: 1px solid #3A3F4C; border-radius: 5px; font-size: 11px; font-weight: 600; color: var(--muted-4); }

/* Cover */
.cover { position: relative; overflow: hidden; background: var(--input); }
.cover__img, .cover__blur, .cover__contain { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover__blur { transform: scale(1.3); filter: blur(18px) saturate(1.2) brightness(0.5); }
.cover__blur--soft { filter: blur(14px) saturate(1.1) brightness(0.5); }
.cover__contain { object-fit: contain; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55)); }
.cover__small { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 4px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55); }
.cover__ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0px, rgba(255, 255, 255, 0.035) 2px, rgba(255, 255, 255, 0) 2px, rgba(255, 255, 255, 0) 12px); }
.cover__initial { font-family: var(--font-display); line-height: 1; font-weight: 600; }
.cover__ph-text { font-size: 12px; line-height: 16px; color: var(--muted-3); }

/* Empty state */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 72px 24px; border: 1px dashed var(--line-2); border-radius: 18px; text-align: center; }
.empty-state__title { font-size: 18px; line-height: 24px; font-weight: 600; color: var(--head); }
.empty-state__text { max-width: 440px; font-size: 14px; line-height: 20px; color: var(--muted); }

/* ───────────────────────────── Catalog ───────────────────────────── */
.toolbar { position: relative; margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar--raised { z-index: 40; }
.toolbar__spacer { flex: 1 1 16px; }
.toolbar__sort { display: flex; align-items: center; gap: 10px; }
.toolbar__sort-label { font-size: 14px; color: var(--muted); }
.filter-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 16px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); color: var(--soft); font-size: 14.5px; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.filter-btn:hover { background: var(--hover); border-color: #3A404D; color: var(--head); }
.filter-btn--has { border-color: #4A5160; color: var(--head); }
.filter-btn--open { background: var(--hover); border-color: #4A5160; color: var(--head); }
.view-toggle { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface-3); }
.view-toggle__btn { display: flex; align-items: center; justify-content: center; width: 38px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.view-toggle__btn--on { background: var(--chip-2); color: var(--head); }
.active-chips { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.year-fields { display: flex; align-items: flex-end; gap: 10px; padding: 12px 16px; }
.year-fields .field-label { flex: 1 1 0; min-width: 0; }
.year-fields__dash { display: flex; align-items: center; height: 40px; color: var(--muted); }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.chip-wrap--genres { padding: 14px 16px 16px; }
.rating-seg { margin: 12px 16px 10px; }
.rating-note { padding: 0 16px 16px; font-size: 12.5px; line-height: 17px; color: var(--muted); }
.tag-selected { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 14px; border-bottom: 1px solid var(--line); }
.tag-selected__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tag-selected__title { font-size: 11.5px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tag-selected__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-mode { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; }
.tag-mode__label { font-size: 13px; line-height: 18px; color: var(--muted-5); }
.tag-list { max-height: 336px; overflow-y: auto; padding: 2px 0 10px; }

.cards-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(560px, 100%), 1fr)); gap: 20px; }
.card { position: relative; display: flex; min-width: 0; min-height: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.card:hover { border-color: #3A4050; transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0, 0, 0, .42); }
.card--compact { min-height: 252px; }
.card__cover { flex: none; width: clamp(104px, 30%, 200px); align-self: stretch; border-right: 1px solid #1E222A; }
.card--compact .card__cover { width: clamp(96px, 26%, 168px); }
.card__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 16px 20px 15px; }
.card__top { display: flex; flex-direction: column; min-width: 0; }
.card__meta { display: flex; align-items: center; gap: 10px; height: 24px; min-width: 0; padding-right: 40px; }
.card__meta-text { min-width: 0; font-size: 13px; line-height: 18px; color: var(--muted-5); }
.card__meta-text b { color: #DCD7CF; font-weight: 600; }
.card__meta-text span { margin-left: 6px; }
.card__title { margin-top: 10px; font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -0.005em; color: var(--head); }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.card__alt { margin-top: 2px; font-size: 12.5px; line-height: 17px; color: var(--muted); }
.card__author { margin-top: 5px; font-size: 13.5px; line-height: 19px; color: var(--soft-6); }
.card__bottom { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 24px; min-width: 0; }
.stats--tight { gap: 8px 22px; }
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat__value { display: flex; align-items: center; gap: 6px; height: 22px; font-size: 17px; font-weight: 600; color: var(--head); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats--tight .stat__value { font-size: 16px; }
.stat__value--muted { color: var(--muted); }
.stat__sub { min-height: 16px; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; }
.genres { display: flex; align-items: center; gap: 6px; min-width: 0; }
.genres__list { display: flex; flex-wrap: wrap; gap: 6px; height: 24px; overflow: hidden; min-width: 0; }
.genre { flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--chip); color: var(--soft-5); font-size: 12.5px; white-space: nowrap; }
.genre--more { padding: 0 8px; background: transparent; border: 1px solid var(--line-3); color: var(--muted-3); font-size: 12px; }
.tags { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 12.5px; line-height: 18px; }
.tags__list { display: flex; flex-wrap: wrap; column-gap: 12px; height: 18px; overflow: hidden; min-width: 0; color: var(--muted); }
.tags__list span { flex: none; white-space: nowrap; }
.tags__more { flex: none; color: var(--muted-4); white-space: nowrap; }
.card__foot { display: flex; align-items: center; gap: 12px; min-width: 0; height: 18px; font-size: 12.5px; line-height: 18px; color: var(--muted); }
.card__upd { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; white-space: nowrap; }
.card__upd-what { color: #E8E3DA; font-weight: 500; }
.card__src { flex: none; margin-left: auto; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.save-btn { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--soft); cursor: pointer; transition: background-color .15s ease; }
.save-btn:hover { background: var(--hover-2); }
.save-btn--on { color: var(--accent); }

.posters-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 44%), 1fr)); gap: 28px 20px; }
.poster { position: relative; z-index: 1; min-width: 0; }
.poster:hover { z-index: 20; }
.poster__cover { position: relative; aspect-ratio: 2 / 3; border-radius: 12px; border: 1px solid var(--line); transition: top .18s ease, box-shadow .18s ease, border-color .18s ease; top: 0; }
.poster:hover .poster__cover { top: -3px; box-shadow: 0 16px 34px rgba(0, 0, 0, .45); border-color: #3A4050; }
.poster__status { position: absolute; top: 8px; left: 8px; }
.poster__rating { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 6px; border-radius: 8px; background: rgba(12, 14, 19, 0.82); color: var(--head); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.poster .save-btn { top: 6px; right: 6px; width: 36px; height: 36px; background: rgba(12, 14, 19, 0.82); display: none; }
.poster:hover .save-btn, .poster .save-btn--on { display: flex; }
.poster__title { margin-top: 10px; min-height: 40px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--head); }
.poster__title a { color: inherit; text-decoration: none; }
.poster__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.poster__meta { margin-top: 4px; min-height: 18px; font-size: 13px; line-height: 18px; color: var(--muted); }
.peek { display: none; position: absolute; top: -10px; left: calc(100% + 12px); width: 330px; flex-direction: column; gap: 12px; padding: 16px 18px 14px; background: var(--raised); border: 1px solid var(--line-4); border-radius: 16px; box-shadow: var(--shadow-pop); pointer-events: none; }
.peek--left { left: auto; right: calc(100% + 12px); }
.poster:hover .peek { display: flex; }
@media (hover: none) { .poster:hover .peek { display: none; } }
.peek__title { font-size: 16px; line-height: 21px; font-weight: 600; color: var(--head); }
.peek__alt { font-size: 12.5px; line-height: 17px; color: var(--muted); }
.peek__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; line-height: 18px; color: var(--muted-5); }
.peek__author { font-size: 13.5px; line-height: 19px; color: var(--soft-6); }
.peek__genres { display: flex; flex-wrap: wrap; gap: 6px; }
.peek__genres .genre { background: var(--chip-2); color: var(--soft-2); }
.peek__tags { display: flex; flex-wrap: wrap; column-gap: 10px; row-gap: 2px; font-size: 12.5px; line-height: 18px; color: var(--muted-5); }
.peek__tags span { white-space: nowrap; }
.peek__tags-more { color: var(--soft); }
.peek__foot { display: flex; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 12.5px; line-height: 18px; color: var(--muted-5); }
.peek__foot .card__upd { color: inherit; }
.peek__foot .card__src { color: inherit; }
.more-row { margin-top: 36px; display: flex; justify-content: center; }

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .card { min-height: 0; }
  .card__cover { align-self: flex-start; aspect-ratio: 2 / 3; }
  .site-header__search { flex-basis: 100%; max-width: none; margin-left: 0; }
  .page-title { font-size: 28px; line-height: 36px; }
}

h1:focus { outline: none; }

/* ───────────────────────────── Entry ───────────────────────────── */
.entry-hero { position: relative; }
.entry-hero__bg { position: absolute; left: 0; right: 0; top: 0; height: 470px; overflow: hidden; }
.entry-hero__bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.3); filter: blur(48px) saturate(1.3) brightness(0.6); }
.entry-hero__bg-ph { position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 2px, rgba(255, 255, 255, 0) 2px, rgba(255, 255, 255, 0) 14px); }
.entry-hero__bg-fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 16, 21, 0.3) 0%, rgba(14, 16, 21, 0.78) 58%, #0E1015 100%); }
.entry-hero__inner { position: relative; max-width: var(--max); margin: 0 auto; padding: 26px var(--gutter) 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; line-height: 20px; color: var(--muted-3); }
.crumbs a { color: var(--soft-2); }
.crumbs a:hover { color: var(--soft-2); }
.crumbs__here { max-width: 560px; }
.entry-hero__row { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px 40px; }
.entry-side { flex: none; width: 260px; display: flex; flex-direction: column; gap: 12px; }
.entry-cover { width: 260px; aspect-ratio: 2 / 3; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.07); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
.entry-cover .cover__ph-text { font-size: 13px; line-height: 18px; }
.entry-actions { margin-top: 4px; display: flex; flex-direction: column; gap: 10px; }
.btn--read { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-fg); text-decoration: none; cursor: pointer; transition: filter .15s ease; }
.btn--read:hover { color: var(--accent-fg); filter: brightness(1.08); }
.btn--read__main { display: flex; align-items: center; gap: 8px; font-size: 15.5px; line-height: 20px; font-weight: 700; }
.btn--read__sub { font-size: 12.5px; line-height: 16px; font-weight: 500; opacity: 0.8; }
.btn--follow-main { display: flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 16px; border: 1px solid transparent; border-radius: 12px; background: var(--accent); color: var(--accent-fg); font-size: 15.5px; font-weight: 700; cursor: pointer; transition: filter .15s ease; }
.btn--follow-main:hover { filter: brightness(1.08); }
.btn--follow-main.is-on { background: var(--raised); color: var(--accent-soft); border-color: rgba(243, 181, 74, 0.5); }
.entry-actions__row { display: flex; gap: 10px; }
.list-menu { position: relative; flex: 1 1 auto; min-width: 0; }
.list-menu--raised { z-index: 40; }
.list-menu__btn { width: 100%; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 14px; border-radius: 12px; border: 1px solid var(--line-4); background: rgba(22, 25, 32, 0.85); color: var(--text); font-size: 14.5px; font-weight: 500; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.list-menu__btn:hover { background: var(--hover); border-color: #3A404D; }
.list-menu__label { flex: 1 1 auto; text-align: left; }
.menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; padding: 6px; background: var(--panel); border: 1px solid var(--line-3); border-radius: 14px; box-shadow: var(--shadow-pop); }
.menu__item { width: 100%; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--soft-4); font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.menu__item:hover { background: var(--hover-2); color: var(--head); }
.menu__item--danger { color: #F3A096; }
.menu__item--danger:hover { color: #F3A096; }
.menu__sep { height: 1px; margin: 6px 4px; background: var(--chip-2); }
.bell-btn { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 12px; border: 1px solid var(--line-4); background: rgba(22, 25, 32, 0.85); color: var(--soft); cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.bell-btn:hover { background: var(--hover); border-color: #3A404D; color: var(--head); }
.bell-btn.is-on { color: var(--accent); border-color: rgba(243, 181, 74, 0.5); }
.entry-sources-link { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; font-size: 13.5px; color: var(--soft); text-decoration: none; }
.entry-sources-link:hover { color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
.entry-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.entry-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; line-height: 20px; color: var(--muted-4); }
.entry-kind__type { color: var(--soft-4); font-weight: 600; }
.entry-kind .age-badge { height: 20px; padding: 0 6px; font-size: 11.5px; }
.entry-title { margin-top: 14px; max-width: 920px; font-size: 38px; line-height: 46px; font-weight: 700; letter-spacing: -0.015em; color: var(--head-2); text-wrap: balance; }
.entry-alts { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 15px; line-height: 22px; color: var(--muted-3); }
.entry-alts__more { height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--soft-2); font-size: 13.5px; cursor: pointer; }
.entry-alts__more:hover { background: var(--hover-2); color: var(--head); }
.entry-author { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 15px; line-height: 22px; }
.entry-author a { color: var(--soft-4); font-weight: 600; text-decoration: none; }
.entry-author a:hover { color: var(--soft-4); text-decoration: underline; text-underline-offset: 3px; }
.entry-author span { color: var(--muted); }
.score-cards { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.score-card { flex: 0 1 auto; min-width: 210px; display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 14px; border: 1px solid #262A35; background: rgba(22, 25, 32, 0.8); backdrop-filter: blur(8px); }
.score-card--tr { min-width: 190px; }
.score-card--mine { flex: 0 1 430px; min-width: 0; gap: 8px; }
.score-card__cap { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.score-card__row { display: flex; align-items: center; gap: 8px; }
.score-card__value { font-size: 32px; line-height: 38px; font-weight: 700; color: var(--head-2); }
.score-card__value--muted { color: var(--muted); }
.score-card__of { align-self: flex-end; margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.score-card__sub { font-size: 13px; line-height: 18px; color: var(--muted-3); }
.score-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.score-card__mine { font-size: 15px; line-height: 20px; font-weight: 700; color: var(--muted); }
.score-card__mine--on { color: var(--accent-soft); }
.score-bar { display: flex; gap: 4px; }
.score-bar__btn { flex: 1 1 0; min-width: 0; height: 38px; padding: 0; border-radius: 8px; border: 1px solid var(--line-4); background: transparent; color: var(--soft); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color .15s ease; }
.score-bar__btn:hover:not(:disabled) { border-color: var(--accent); }
.score-bar__btn:disabled { cursor: not-allowed; opacity: 0.45; }
.score-bar__btn--under { border-color: rgba(243, 181, 74, 0.45); background: rgba(243, 181, 74, 0.16); color: var(--accent-soft); }
.score-bar__btn--on { border-color: var(--accent); background: var(--accent); color: var(--accent-fg); }
.score-card__note { font-size: 12.5px; line-height: 17px; color: var(--muted); }
.entry-chips { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip--link { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-4); background: rgba(31, 35, 44, 0.7); color: var(--soft-2); font-size: 13.5px; text-decoration: none; font-weight: 400; }
.chip--link:hover { border-color: #4A5160; color: var(--head); filter: none; }
.tag-link { display: inline-flex; align-items: center; height: 30px; padding: 0 4px; color: var(--muted-2); font-size: 13.5px; text-decoration: none; }
.tag-link:hover { color: var(--head); }
.entry-desc { margin-top: 22px; max-width: 820px; }
.entry-desc__text { font-size: 15.5px; line-height: 25px; color: var(--body); white-space: pre-line; }
.entry-desc__foot { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.entry-desc__btn { height: 32px; padding: 0 10px; margin-left: -10px; border: 0; border-radius: 8px; background: transparent; color: var(--accent-soft); font-size: 14px; font-weight: 600; cursor: pointer; }
.entry-desc__btn:hover { background: var(--hover-2); }
.entry-desc__src { font-size: 12.5px; line-height: 17px; color: var(--muted); }
.entry-desc__none { font-size: 15px; line-height: 22px; color: var(--muted); }
.entry-body { max-width: var(--max); margin: 0 auto; padding: 48px var(--gutter) 72px; }
.entry-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }
.entry-col { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.entry-aside { flex: 1 1 340px; min-width: 0; max-width: 440px; display: flex; flex-direction: column; gap: 24px; }
.esection { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 90px; }
.esection__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.esection__title { display: flex; align-items: baseline; gap: 12px; }
.esection__count { font-size: 15px; line-height: 20px; color: var(--muted); }
.esection__hint { font-size: 13px; line-height: 18px; color: var(--muted); }
.table-box { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); overflow: hidden; }
.src-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 20px; border-top: 1px solid var(--line-6); transition: background-color .12s ease; }
.src-row:first-child { border-top: 0; }
.src-row:hover { background: #191C23; }
.src-letter { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; color: var(--bg); font-size: 17px; font-weight: 700; }
.src-row__main { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.src-row__name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.src-row__name b { font-size: 15.5px; line-height: 22px; font-weight: 600; color: var(--head); }
.src-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--chip-2); color: var(--soft); }
.src-badge--best { background: rgba(243, 181, 74, 0.16); color: var(--accent-soft); }
.src-badge--warn { background: rgba(242, 169, 98, 0.16); color: #F4B47E; }
.src-row__details { font-size: 13px; line-height: 18px; color: var(--muted-5); }
.src-row__range { flex: 0 0 200px; display: flex; flex-direction: column; gap: 6px; }
.src-row__range-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; line-height: 18px; }
.src-row__range-head b { color: var(--soft-4); font-weight: 600; }
.src-row__range-head span { color: var(--muted); font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 3px; background: var(--chip-2); overflow: hidden; }
.meter__fill { height: 100%; border-radius: 3px; background: var(--soft); }
.src-row__read { font-size: 12.5px; line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.src-row__read span { white-space: nowrap; }
.src-row__here { flex: none; height: 40px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 10px; border: 1px dashed var(--line-4); color: var(--muted); font-size: 14px; }
.src-row__rating { flex: 0 0 96px; display: flex; flex-direction: column; gap: 2px; }
.src-row__rating b { display: flex; align-items: center; gap: 5px; font-size: 15px; line-height: 20px; font-weight: 700; color: var(--head); }
.src-row__rating span { font-size: 12px; line-height: 16px; color: var(--muted); }
.src-row__none { font-size: 13px; line-height: 18px; color: var(--muted); }
.btn--src { flex: none; height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-4); background: var(--raised); color: var(--text); font-size: 14px; font-weight: 500; }
.btn--src:hover { background: var(--hover); border-color: #3A404D; }
.ch-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 20px 8px; background: #111318; border-top: 1px solid #1E2128; }
.ch-head:first-child { border-top: 0; }
.ch-head b { font-size: 12.5px; line-height: 16px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-4); }
.ch-head span { font-size: 12.5px; line-height: 16px; color: var(--muted); }
.ch-row { display: flex; align-items: center; gap: 16px; min-height: 46px; padding: 8px 20px; border-top: 1px solid #1E2128; color: inherit; text-decoration: none; transition: background-color .12s ease; }
.ch-row:hover { background: #191C23; color: inherit; }
.ch-row__num { flex: none; width: 92px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.ch-row__title { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 20px; color: var(--soft-6); }
.ch-row__fresh { flex: none; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: rgba(243, 181, 74, 0.16); color: var(--accent-soft); font-size: 12px; font-weight: 600; }
.ch-row__ja { flex: none; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.ch-row__date { flex: none; width: 112px; text-align: right; font-size: 13px; line-height: 18px; color: var(--muted); white-space: nowrap; }
.ch-row__srcs { flex: none; width: 96px; display: flex; justify-content: flex-end; gap: 4px; }
.src-mini { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 5px; color: var(--bg); font-size: 11px; font-weight: 700; }
.pages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 12px; }
.pages-grid li { min-width: 0; display: flex; }
.thumb { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.thumb__box { position: relative; display: block; width: 100%; aspect-ratio: 960 / 1380; border-radius: 8px; overflow: hidden; background: #FFFFFF; border: 1px solid var(--chip-2); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.thumb__box--spread { aspect-ratio: auto; flex: 1 1 auto; min-height: 0; }
.thumb:hover .thumb__box { border-color: #4A5160; transform: translateY(-2px); }
.thumb:focus-visible { outline: none; }
.thumb:focus-visible .thumb__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.thumb__box--here { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.thumb__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb__here { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--accent); color: var(--accent-fg); font-size: 11.5px; font-weight: 700; }
.thumb__num { display: flex; align-items: center; gap: 6px; min-height: 18px; font-size: 13px; line-height: 18px; color: var(--soft); font-weight: 500; font-variant-numeric: tabular-nums; }
.thumb__num--here { color: var(--accent-soft); font-weight: 700; }
.thumb__num--read { color: var(--muted); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.rel { position: relative; display: flex; gap: 14px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); transition: border-color .18s ease; }
.rel:hover { border-color: #3A4050; }
.rel__cover { flex: none; width: 64px; height: 96px; border-radius: 8px; }
.rel__cover .cover__blur { filter: blur(10px) brightness(0.5); }
.rel__cover .cover__contain { filter: none; }
.rel__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rel__kind { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-soft); }
.rel__title { font-size: 14.5px; line-height: 20px; font-weight: 600; color: var(--head); text-decoration: none; }
.rel__title:hover { color: var(--head); text-decoration: underline; text-underline-offset: 3px; }
.rel__meta { font-size: 13px; line-height: 18px; color: var(--muted-5); }
.rel__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; line-height: 18px; color: var(--muted-5); }
.rel__status { display: flex; align-items: center; gap: 5px; }
.rel__status .dot { width: 6px; height: 6px; }
.panel { padding: 20px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); }
.panel__title { margin-bottom: 6px; font-family: var(--font-display); font-size: 16px; line-height: 24px; font-weight: 600; color: var(--head); }
.panel--gap { display: flex; flex-direction: column; gap: 14px; }
.panel--gap .panel__title { margin-bottom: 0; }
.info-row { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-6); }
.info-row:first-child { border-top: 0; }
.info-row dt { font-size: 13.5px; line-height: 20px; color: var(--muted); }
.info-row dd { margin: 0; display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 14px; line-height: 20px; color: var(--soft-4); }
.info-row .dot { width: 7px; height: 7px; }
.info-alts { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line-6); }
.info-alts__title { font-size: 13.5px; line-height: 20px; color: var(--muted); }
.info-alts ul { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.info-alts li { font-size: 14px; line-height: 20px; color: var(--soft-2); }
.src-rating { display: flex; flex-direction: column; gap: 6px; }
.src-rating__row { display: flex; align-items: center; gap: 10px; }
.src-rating__name { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 20px; color: var(--soft-4); }
.src-rating__value { font-size: 14px; line-height: 20px; font-weight: 700; color: var(--head); }
.src-rating__votes { width: 64px; text-align: right; font-size: 12.5px; line-height: 18px; color: var(--muted); }
.src-rating__none { font-size: 12.5px; line-height: 18px; color: var(--muted); }
.src-rating .meter { background: rgba(243, 181, 74, 0.14); }
.src-rating .meter__fill { background: var(--accent); }
.src-letter--sm { width: 22px; height: 22px; border-radius: 6px; font-size: 11.5px; }
.panel__note { font-size: 12.5px; line-height: 18px; color: var(--muted); }
.panel__sep { height: 1px; background: var(--line-6); }
.dist__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dist__title { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--soft-4); white-space: nowrap; }
.dist__readout { min-height: 18px; font-size: 13px; line-height: 18px; color: var(--muted-4); }
.dist__chart { display: flex; align-items: flex-end; height: 132px; border-bottom: 1px solid var(--line-2); }
.dist__col { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.dist__label { font-size: 12px; line-height: 14px; font-weight: 600; color: var(--soft-4); }
.dist__bar { width: 22px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--accent); }
.dist__bar--hot { background: var(--accent-hover); }
.dist__axis { display: flex; margin-top: -6px; }
.dist__axis span { flex: 1 1 0; text-align: center; font-size: 12px; line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dist__table { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; line-height: 18px; font-variant-numeric: tabular-nums; }
.dist__table-row { display: flex; align-items: center; }
.dist__table-row > :first-child { width: 52px; color: var(--muted); }
.dist__table-row > span:not(:first-child) { flex: 1 1 0; text-align: center; color: var(--muted-4); }
.dist__table-row--values > span:not(:first-child) { color: var(--soft-4); }
.no-rating-box { display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; border: 1px dashed var(--line-2); border-radius: 12px; }
.no-rating-box b { font-size: 14.5px; line-height: 20px; font-weight: 600; color: var(--soft-4); }
.no-rating-box span { font-size: 13px; line-height: 19px; color: var(--muted); }
.similar { margin-top: 56px; }
.sim { position: relative; min-width: 0; }
.sim__cover { aspect-ratio: 2 / 3; border-radius: 12px; border: 1px solid var(--line); transition: border-color .18s ease; }
.sim:hover .sim__cover { border-color: #3A4050; }
.sim__common { margin-top: 2px; font-size: 12.5px; line-height: 18px; color: var(--muted-4); }
.reader-modal { position: fixed; inset: 0; z-index: 100; background: var(--bg-reader); overscroll-behavior: contain; }
/* The entry page behind the reader must not scroll along: a wheel over a page that fits, or past the end of a tall one, would otherwise move the page underneath and show a second scrollbar. */
body:has(.reader-modal) { overflow: hidden; }
.empty-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 24px; border: 1px dashed var(--line-2); border-radius: 16px; text-align: center; }
.empty-box__title { font-size: 17px; line-height: 24px; font-weight: 600; color: var(--head); }
.empty-box__text { max-width: 420px; font-size: 14px; line-height: 20px; color: var(--muted); }
@media (max-width: 640px) {
  .entry-title { font-size: 28px; line-height: 34px; }
  .entry-side { width: 100%; }
  .entry-cover { width: 200px; }
  .ch-row__date { width: auto; }
  .ch-row__srcs { width: auto; }
}

/* ───────────────────────────── Manga reader ───────────────────────────── */
.reader { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; background: var(--bg-reader); color: var(--text); font-family: var(--font); }
.reader-header { position: relative; z-index: 30; flex: none; height: 61px; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--line-5); }
.reader-header__side { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 10px; }
.reader-header__side--end { justify-content: flex-end; gap: 6px; }
.reader-header__center { position: relative; flex: none; display: flex; align-items: center; gap: 4px; }
.reader-work { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.reader-work:hover { color: inherit; }
.reader-work__cover { flex: none; width: 28px; height: 42px; border-radius: 4px; object-fit: cover; background: var(--surface); }
.reader-work__text { min-width: 0; display: flex; flex-direction: column; }
.reader-work__title { font-size: 14.5px; line-height: 19px; font-weight: 600; color: var(--head); }
.reader-work:hover .reader-work__title { text-decoration: underline; text-underline-offset: 3px; }
.reader-work__meta { font-size: 12.5px; line-height: 17px; color: var(--muted); }
.iconbtn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--soft); cursor: pointer; text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.iconbtn:hover:not(:disabled) { background: var(--hover); color: var(--head); }
.iconbtn:disabled { opacity: .35; cursor: default; }
.iconbtn--lg { width: 44px; height: 44px; border-radius: 12px; }
.iconbtn--on { background: var(--hover); }
.reader-ctl { height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.reader-ctl:hover { background: var(--hover); border-color: #3A404D; }
.reader-ctl__main { flex: none; font-size: 15px; font-weight: 600; white-space: nowrap; }
.reader-ctl__sub { flex: none; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.reader-ctl__title { min-width: 0; font-size: 13.5px; color: var(--soft-6); }
.reader-ctl__chev { color: var(--muted-2); }
.reader-ctl--src { max-width: 300px; padding: 0 12px 0 10px; }
.reader-ctl--ch { max-width: 480px; }
.src-key { flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--bg); font-size: 12px; font-weight: 700; }
.src-key--lg { width: 28px; height: 28px; border-radius: 7px; font-size: 13px; }
.reader-ctl__src { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.reader-ctl__src-name { max-width: 100%; font-size: 13.5px; line-height: 17px; font-weight: 600; }
.reader-ctl__src-team { max-width: 100%; font-size: 12px; line-height: 15px; color: var(--muted); }
.reader-pop { position: absolute; top: 52px; z-index: 40; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-3); border-radius: 16px; box-shadow: var(--shadow-pop); overflow: hidden; }
.reader-pop--center { left: 50%; transform: translateX(-50%); width: 440px; max-height: 500px; }
.reader-pop--right { right: 0; }
.reader-pop__head { flex: none; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; border-bottom: 1px solid #23262E; }
.reader-pop__head b { font-size: 15px; font-weight: 600; color: var(--head); }
.reader-pop__head span { font-size: 13px; color: var(--muted); }
.reader-pop__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px; scrollbar-width: thin; scrollbar-color: #2E333E transparent; }
.vol-btn { width: 100%; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--soft-4); text-align: left; cursor: pointer; }
.vol-btn:hover { background: #20242C; }
.vol-btn b { font-size: 14px; font-weight: 600; }
.vol-btn span { font-size: 13px; color: var(--muted); }
.vol-btn .chevron { margin-left: auto; color: var(--muted); }
.vol-list { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px; }
/* The windowed table of contents: the list is as tall as all its rows, the rows that exist sit at their own heights (41 px apart). */
.vol-list--win { display: block; position: relative; }
.vol-list--win > .ch-btn-row { position: absolute; left: 0; right: 0; height: 40px; }
.ch-btn { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--soft-4); text-align: left; cursor: pointer; }
.ch-btn:hover { background: #20242C; }
.ch-btn--cur { background: rgba(243, 181, 74, 0.12); color: var(--accent-soft); }
.ch-btn__mark { flex: none; width: 16px; display: flex; justify-content: center; }
.ch-btn__num { flex: none; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ch-btn__title { flex: 1 1 auto; min-width: 0; font-size: 13.5px; color: var(--muted-3); }
.ch-btn__fresh { flex: none; height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 6px; background: rgba(98, 211, 155, 0.14); color: var(--ok); font-size: 11.5px; font-weight: 600; }
.ch-btn__date { flex: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.src-opt { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--soft-4); text-align: left; cursor: pointer; }
.src-opt:hover:not(:disabled) { background: #20242C; }
.src-opt:disabled { opacity: .55; cursor: default; }
.src-opt--cur { background: rgba(243, 181, 74, 0.08); }
.src-opt__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.src-opt__name { font-size: 14px; font-weight: 600; }
.src-opt__name span { font-weight: 400; color: var(--muted-3); }
.src-opt__info { font-size: 12.5px; color: var(--muted); }
.reader-pop__note { padding: 10px 10px 8px; font-size: 13px; color: var(--muted); }
.settings { width: 360px; max-height: calc(100vh - 80px); overflow-y: auto; padding: 16px; gap: 18px; scrollbar-width: thin; }
.settings__group { display: flex; flex-direction: column; gap: 8px; }
.settings__label { font-size: 13px; font-weight: 600; color: var(--muted-4); }
.settings__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.settings__value { font-size: 13px; font-weight: 700; color: var(--head); font-variant-numeric: tabular-nums; white-space: nowrap; }
.settings__hint { font-size: 12.5px; line-height: 17px; color: var(--muted); }
.settings__links { display: flex; justify-content: space-between; gap: 12px; }
.linkbtn { height: 24px; padding: 0; border: 0; background: transparent; color: var(--muted-2); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.linkbtn:hover { color: var(--head); }
.linkbtn--on { color: var(--accent-soft); }
.range { width: 100%; height: 24px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.hotkeys { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--chip-2); }
.hotkeys__grid { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; font-size: 13.5px; color: var(--soft); }
.hotkeys__keys { display: flex; gap: 4px; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid #343944; border-bottom-width: 2px; background: #1A1D24; color: var(--soft-4); font-family: inherit; font-size: 12px; font-weight: 600; }
.reader-cbtn { flex: none; height: 44px; display: flex; align-items: center; gap: 7px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--soft); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.reader-cbtn:hover { background: var(--hover); color: var(--head); }
.reader-cbtn--on { background: rgba(243, 181, 74, 0.14); color: var(--accent-soft); }
.reader-cbtn--on:hover { background: rgba(243, 181, 74, 0.2); color: var(--accent-soft); }
.oneshot-pill { height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); white-space: nowrap; }
.oneshot-pill b { font-size: 15px; font-weight: 600; }
.oneshot-pill span { font-size: 13.5px; color: var(--muted); }

.rbody { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: row; overflow-x: hidden; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #2E333E transparent; }
.rbody--flow { flex-direction: column; overflow-y: auto; }
.stage { position: relative; flex: 1 1 auto; min-width: 0; height: auto; overflow: hidden; background: var(--bg-reader); }
.rbody--flow .stage { flex: none; height: calc(100vh - 61px); height: calc(100dvh - 61px); }
.rbody--flow.rbody--focus .stage { height: 100vh; height: 100dvh; }
.scroller { position: absolute; inset: 0; overflow: auto; display: flex; padding: 16px 24px 56px; cursor: pointer; scrollbar-width: thin; scrollbar-color: #2E333E transparent; }
.scroller--pin { cursor: default; }
.page-wrap { position: relative; flex: none; margin: auto; background: #FFFFFF; box-shadow: 0 14px 44px rgba(0, 0, 0, 0.6); }
.page-wrap--pin { cursor: crosshair; }
.page-img { display: block; width: 100%; height: auto; user-select: none; }
.pin-btn { position: absolute; z-index: 3; width: 26px; height: 26px; margin: -13px 0 0 -13px; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 50%; border: 2px solid var(--bg); background: var(--accent); color: var(--accent-fg); font-size: 12.5px; font-weight: 700; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55); cursor: pointer; transition: width .15s ease, height .15s ease, margin .15s ease, box-shadow .15s ease; }
.pin-btn--hot { width: 32px; height: 32px; margin: -16px 0 0 -16px; background: #FFF4DC; box-shadow: 0 0 0 6px rgba(243, 181, 74, 0.35), 0 4px 12px rgba(0, 0, 0, 0.55); }
.pin-draft { position: absolute; z-index: 3; width: 28px; height: 28px; margin: -14px 0 0 -14px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px dashed var(--accent); background: rgba(14, 16, 21, 0.85); color: var(--accent); font-size: 16px; font-weight: 700; }
.chev { position: absolute; z-index: 2; top: 50%; margin-top: -26px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 26px; background: rgba(14, 16, 21, 0.8); border: 1px solid var(--line-4); color: var(--head); pointer-events: none; opacity: 0; transition: opacity .15s ease; }
.chev--l { left: 20px; }
.chev--r { right: 20px; }
.stage.is-left[data-left-ok="1"] .chev--l, .stage.is-right[data-right-ok="1"] .chev--r { opacity: 1; }
.pin-banner { position: absolute; z-index: 4; top: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--raised); border: 1px solid var(--accent); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); white-space: nowrap; font-size: 14px; }
.navbtn { height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-4); background: transparent; color: var(--soft-4); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.navbtn:hover:not(:disabled) { background: var(--hover); color: var(--head); }
.navbtn--sm { height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: #262A33; font-size: 13.5px; font-weight: 600; }
.navbtn--thanks { color: var(--danger); border-color: rgba(240, 120, 107, 0.5); }
.navbtn--thanks:hover { color: var(--danger); }
.end-wrap { position: absolute; inset: 0 0 48px; display: flex; align-items: center; justify-content: center; padding: 24px; }
.end-card { width: 100%; max-width: 540px; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 32px 32px 26px; background: var(--surface-3); border: 1px solid var(--chip-2); border-radius: 22px; text-align: center; }
.end-card__badge { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(98, 211, 155, 0.12); color: var(--ok); font-size: 13px; font-weight: 600; }
.end-card__title { font-family: var(--font-display); font-size: 22px; line-height: 30px; font-weight: 600; color: var(--head); }
.end-card__stats { font-size: 14px; color: var(--muted-2); }
.end-card__next { width: 100%; max-width: 420px; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 20px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-fg); cursor: pointer; text-decoration: none; transition: filter .15s ease; }
.end-card__next:hover { color: var(--accent-fg); filter: brightness(1.08); }
.end-card__next-text { display: flex; flex-direction: column; align-items: center; }
.end-card__next-main { font-size: 15.5px; font-weight: 700; }
.end-card__next-sub { font-size: 13px; font-weight: 500; opacity: 0.8; }
.end-card__note { font-size: 14.5px; line-height: 21px; color: var(--soft); }
.end-card__block { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 420px; }
.end-card__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.btn--follow { height: 48px; display: inline-flex; align-items: center; gap: 10px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); font-size: 15px; font-weight: 700; cursor: pointer; transition: filter .15s ease; }
.btn--follow:hover { filter: brightness(1.08); }
.btn--follow.is-on { background: transparent; color: var(--accent-soft); border-color: rgba(243, 181, 74, 0.55); }
.focus-exit { position: absolute; z-index: 5; top: 14px; right: 14px; background: rgba(14, 16, 21, 0.85); font-weight: 600; font-size: 13.5px; }
.pill { position: absolute; z-index: 3; bottom: 16px; height: 34px; display: flex; align-items: center; border-radius: 17px; background: rgba(14, 16, 21, 0.8); border: 1px solid var(--line-2); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); opacity: .7; transition: opacity .2s ease; }
.stage:hover .pill, .pill:focus-within { opacity: 1; }
.pill--pages { left: 50%; transform: translateX(-50%); gap: 2px; padding: 0 3px; }
.pill--jump { right: 16px; gap: 7px; padding: 0 12px; color: var(--soft-3); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.pill__btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 14px; background: transparent; color: var(--soft); cursor: pointer; }
.pill__btn:hover:not(:disabled) { background: #262A33; color: var(--head); }
.pill__btn:disabled { opacity: .3; cursor: default; }
.pill__text { min-width: 62px; padding: 0 4px; text-align: center; font-size: 13px; font-weight: 600; color: var(--soft-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.prog { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 14px; display: flex; gap: 2px; }
.prog--rtl { flex-direction: row-reverse; }
.seg-btn { position: relative; flex: 1 1 0; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.seg-btn__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line-2); transition: height .15s ease; }
.prog:hover .seg-btn__bar { height: 6px; }
.seg-btn--cur .seg-btn__bar { background: var(--accent); }
.seg-btn--read .seg-btn__bar { background: rgba(243, 181, 74, 0.45); }
.seg-btn:hover .seg-btn__bar { filter: brightness(1.35); }
.seg-btn__dot { position: absolute; left: 50%; bottom: 9px; border-radius: 50%; opacity: 0; transition: opacity .15s ease; }
.prog:hover .seg-btn__dot { opacity: 1; }
.seg-btn__tip { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); padding: 5px 9px; border-radius: 8px; background: var(--chip); border: 1px solid #343944; color: var(--text); font-size: 12.5px; font-weight: 500; white-space: nowrap; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity .12s ease; pointer-events: none; }
.seg-btn:hover .seg-btn__tip, .seg-btn:focus-visible .seg-btn__tip { opacity: 1; }

.cpanel { flex: none; width: 400px; min-height: 0; display: flex; flex-direction: column; background: #111318; border: 1px solid var(--line-5); border-width: 0 0 0 1px; overflow: hidden; }
.cpanel--flow { width: min(820px, calc(100% - 48px)); margin: 24px auto 72px; border-width: 1px; border-radius: 20px; }
.cpanel__head { order: 0; flex: none; padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 12px; }
.cpanel__title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cpanel__title { font-size: 17px; line-height: 24px; font-weight: 700; color: var(--head); }
.cpanel__tools { display: flex; align-items: center; gap: 6px; }
.seg--mini { gap: 2px; padding: 3px; border-radius: 10px; background: #0B0D11; border-color: #22262E; }
.seg--mini .seg__btn { width: 32px; height: 28px; padding: 0; flex: none; border-radius: 7px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #0B0D11; border: 1px solid #22262E; }
.cpanel--flow .tabs { max-width: 440px; }
.tab { flex: 1 1 0; height: 36px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted-2); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.tab--on { background: var(--line-2); color: var(--head); }
.tab__count { min-width: 22px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #22262E; font-size: 12px; font-variant-numeric: tabular-nums; }
.tab--on .tab__count { background: #3A3F4C; }
.cpanel__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sort-links { display: flex; gap: 14px; }
.sort-link { height: 28px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.sort-link:hover { color: var(--head); }
.sort-link--on { color: var(--head); font-weight: 700; }
.marks-toggle { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0; border: 0; background: transparent; color: var(--muted-4); font-size: 13px; cursor: pointer; }
.clist { order: 1; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: #2E333E transparent; }
.cpanel--flow .clist { order: 2; flex: none; overflow-y: visible; padding: 8px 8px 16px; }
.cempty { margin: 24px 12px; padding: 28px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 1px dashed var(--line-2); border-radius: 16px; text-align: center; }
.cempty b { font-size: 15px; font-weight: 600; color: var(--soft-4); }
.cempty span { font-size: 13.5px; line-height: 20px; color: var(--muted-2); }
.cmt { display: flex; gap: 12px; padding: 12px 10px; border-radius: 14px; border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease; }
.cmt--hot { background: rgba(243, 181, 74, 0.08); border-color: rgba(243, 181, 74, 0.38); }
.cmt--flat { padding: 16px 4px 12px; border-radius: 0; border: 0; border-bottom: 1px solid var(--line); }
.avatar { flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 18px; font-size: 14px; font-weight: 700; }
.avatar--sm { width: 28px; height: 28px; font-size: 12.5px; }
.avatar--2 { font-size: 12px; }
.avatar--sm.avatar--2 { font-size: 10.5px; }
.cmt__body { flex: 1 1 auto; min-width: 0; }
.cmt__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 22px; }
.cmt__name { font-size: 14px; font-weight: 600; color: var(--head); }
.cmt__badge { height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 6px; background: rgba(243, 181, 74, 0.14); color: var(--accent-soft); font-size: 11.5px; font-weight: 600; }
.cmt__time { font-size: 12.5px; color: var(--muted); }
.cmt__pin { margin-left: auto; height: 24px; display: inline-flex; align-items: center; gap: 3px; padding: 0 8px 0 5px; border-radius: 12px; border: 1px solid #3A3F4C; background: transparent; color: var(--accent-soft); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.cmt__pin--hot { border-color: var(--accent); background: rgba(243, 181, 74, 0.16); }
.cmt__page { margin-left: auto; height: 24px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 12px; border: 1px solid #343944; background: transparent; color: var(--soft); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.cmt__page:hover, .cmt__pin:hover { border-color: #4A5160; color: var(--head); }
.cmt__pin:hover { color: var(--accent-soft); }
.spoiler { position: relative; display: block; width: 100%; margin-top: 6px; padding: 8px 10px; border: 1px dashed #3A3F4C; border-radius: 10px; background: var(--panel-foot); text-align: left; cursor: pointer; }
.spoiler__text { display: block; filter: blur(5px); color: var(--soft); font-size: 14.5px; line-height: 21px; user-select: none; }
.spoiler__cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--soft-4); font-size: 13px; font-weight: 600; }
.cmt__text { margin-top: 4px; font-size: 14.5px; line-height: 21px; color: var(--soft-3); overflow-wrap: anywhere; }
.cmt__actions { margin-top: 4px; display: flex; align-items: center; gap: 16px; }
.act { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--muted-2); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.act:hover { color: var(--head); }
.act--liked { color: var(--danger); }
.act--liked:hover { color: var(--danger); }
.replies { margin-top: 6px; display: flex; flex-direction: column; gap: 10px; padding-left: 12px; border-left: 2px solid #262A33; }
.reply { display: flex; gap: 10px; }
.reply__name { font-size: 13.5px; font-weight: 600; color: var(--head); }
.reply__text { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--soft-3); overflow-wrap: anywhere; }
.composer { order: 2; flex: none; padding: 12px 14px 12px; border-top: 1px solid var(--line-5); background: #111318; }
.cpanel--flow .composer { order: 1; border-bottom: 1px solid var(--line-5); }
.composer__reply { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding-left: 42px; font-size: 13px; color: var(--muted-4); }
.composer__row { display: flex; gap: 10px; align-items: flex-start; }
.composer__avatar { flex: none; width: 32px; height: 32px; margin-top: 4px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--line-2); color: var(--text); font-size: 13px; font-weight: 700; }
.composer__input { flex: 1 1 auto; min-width: 0; min-height: 64px; resize: none; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--input); color: var(--text); font-size: 14.5px; line-height: 20px; outline: none; }
.composer__input:focus { border-color: var(--accent); }
.composer__tools { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-left: 42px; }
.composer__hint { margin-top: 6px; padding-left: 42px; font-size: 12px; color: var(--muted); }
.tchip { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-4); background: transparent; color: var(--muted-4); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s ease, color .15s ease, background-color .15s ease; }
.tchip:hover { border-color: #4A5160; color: var(--head); }
.tchip--on { border-color: rgba(243, 181, 74, 0.6); background: rgba(243, 181, 74, 0.12); color: var(--accent-soft); }
.tchip--on:hover { color: var(--accent-soft); }
.send-btn { margin-left: auto; height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border: 0; border-radius: 10px; background: #262A33; color: #7E828C; font-size: 14px; font-weight: 700; cursor: default; }
.send-btn--ready { background: var(--accent); color: var(--accent-fg); cursor: pointer; }
.send-btn--ready:hover { filter: brightness(1.08); }
@media (max-width: 900px) {
  .cpanel { width: 320px; }
  .reader-ctl--ch .reader-ctl__title { display: none; }
}

/* ───────────────────────────── History ───────────────────────────── */
.hist-tools { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.hist-types { display: flex; flex-wrap: wrap; gap: 4px; }
.typechip { height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted-4); font-size: 14.5px; font-weight: 500; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.typechip:hover { background: var(--panel); color: var(--head); }
.typechip--on { background: var(--hover); border-color: #3A404D; color: var(--head); font-weight: 600; }
.typechip--empty { color: #5E626C; }
.typechip__count { font-size: 12.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.hist-tools__end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.newcount { min-width: 24px; height: 22px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; background: rgba(98, 211, 155, 0.14); color: var(--ok); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hist-search { width: 280px; padding-right: 6px; }
.htable { margin-top: 22px; }
.hcols { display: grid; grid-template-columns: minmax(0, 1fr) 150px 240px 210px 176px; column-gap: 24px; align-items: center; }
.hhead { position: sticky; top: 69px; z-index: 5; background: var(--bg); }
.hhead__row { min-height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line-2); }
.sortbtn { height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.sortbtn:hover { color: var(--head); }
.sortbtn--on { color: var(--head); }
.hgroup__row { padding: 24px 16px 8px; border-bottom: 1px solid var(--line-5); }
.hgroup__head { display: flex; align-items: baseline; gap: 8px; }
.hgroup__head b { font-size: 14px; line-height: 20px; font-weight: 700; color: var(--head); }
.hgroup__head span { font-size: 13px; line-height: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hrow { position: relative; z-index: 1; padding: 12px 16px; border-bottom: 1px solid var(--line-5); transition: background-color .12s ease, opacity .12s ease; }
.hrow:hover { background: var(--surface-2); opacity: 1 !important; }
.hrow--raised { z-index: 30; }
.hrow--dim { opacity: .62; }
.hcell { min-width: 0; }
.hcell--work { display: flex; align-items: center; gap: 14px; }
.hthumb { position: relative; flex: none; width: 42px; height: 60px; border-radius: 6px; overflow: hidden; background: #1A1D24; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.hthumb__blur { position: absolute; top: -6px; left: -6px; width: 54px; height: 72px; object-fit: cover; filter: blur(6px) brightness(0.55); }
.hthumb__img { position: relative; display: block; width: 100%; height: 100%; }
.hthumb__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.hwork { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hwork__title { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--head); text-decoration: none; }
.hwork__title:hover { color: var(--head); text-decoration: underline; text-underline-offset: 3px; }
.hwork__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; line-height: 18px; color: var(--muted); }
.hwork__list { display: inline-flex; align-items: center; gap: 6px; }
.hwork__list .dot { width: 7px; height: 7px; }
.hdate { display: flex; flex-direction: column; gap: 2px; }
.hdate__main { font-size: 14.5px; line-height: 20px; color: var(--text); }
.hdate__sub { font-size: 13px; line-height: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hstop { display: flex; flex-direction: column; gap: 6px; }
.hstop__main { font-size: 14.5px; line-height: 20px; font-variant-numeric: tabular-nums; }
.hstop__main b { font-weight: 600; color: var(--head); }
.hstop__main span { color: var(--muted); }
.hbar { width: 100%; max-width: 200px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.hbar__fill { height: 100%; border-radius: 2px; background: var(--accent); }
.hbar__fill--done { background: var(--info); }
.hstop__sub { font-size: 13px; line-height: 18px; color: var(--muted); }
.hnew { display: flex; flex-direction: column; gap: 3px; }
.hnew__main { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; line-height: 20px; font-variant-numeric: tabular-nums; }
.hnew__sub { min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--muted); }
.ja-badge { flex: none; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; border-radius: 5px; border: 1px solid #343946; color: var(--muted-4); font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; }
.hactions { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.cont { height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px 0 12px; border-radius: 10px; border: 1px solid #2F3440; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color .15s ease, color .15s ease, background-color .15s ease; }
.cont:hover, .hrow:hover .cont { border-color: var(--accent); color: var(--head); }
.cont--follow { padding: 0 13px 0 11px; }
.cont--on { border-color: var(--accent); background: rgba(243, 181, 74, 0.1); color: var(--accent); }
.cont--on:hover, .hrow:hover .cont--on { color: var(--accent); }
.more { flex: none; width: 36px; height: 38px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted-4); opacity: .55; cursor: pointer; transition: opacity .12s ease, background-color .12s ease; }
.hrow:hover .more, .more:focus-visible, .more--open { opacity: 1; }
.more:hover { background: var(--hover); }
.more--open { background: var(--hover); }
.hmenu { top: calc(100% + 6px); left: auto; right: 0; width: 270px; }
.hist-empty { padding: 72px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; border-bottom: 1px solid var(--line-5); }
.hist-note { margin-top: 20px; max-width: 820px; font-size: 13px; line-height: 19px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 8px 8px 8px 18px; border-radius: 14px; background: #1A1D24; border: 1px solid var(--line-3); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55); }
.toast__text { min-width: 0; font-size: 14.5px; line-height: 20px; color: var(--text); }
.toast__undo { flex: none; height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--accent); font-size: 14.5px; font-weight: 700; cursor: pointer; }
.toast__undo:hover { background: var(--hover-2); }
@media (max-width: 1100px) {
  .hcols { grid-template-columns: minmax(0, 1fr) 130px 200px 170px 150px; column-gap: 16px; }
}
@media (max-width: 800px) {
  .hcols { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .hhead { display: none; }
  .hactions { justify-content: flex-start; }
}

/* ───────────────────────────── Auth ───────────────────────────── */
.auth { position: relative; min-height: 100vh; display: flex; background: var(--bg); color: var(--text); }
.auth__art { position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; background: #0B0D11; }
.auth__mosaic { position: absolute; top: -170px; left: -150px; display: flex; gap: 16px; transform: rotate(-8deg); opacity: 0.55; }
.auth__col { flex: none; display: flex; flex-direction: column; gap: 16px; }
.auth__col--shift { transform: translateY(-110px); }
.auth__mosaic img { display: block; width: 172px; height: 258px; object-fit: cover; border-radius: 12px; }
.auth__fade-v { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 16, 21, 0.7) 0%, rgba(14, 16, 21, 0.25) 28%, rgba(14, 16, 21, 0.88) 62%, #0E1015 100%); }
.auth__fade-h { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 16, 21, 0) 55%, #0E1015 100%); }
.auth__logo { position: absolute; left: 48px; top: 26px; z-index: 2; }
.auth__pitch { position: absolute; left: 64px; bottom: 64px; z-index: 2; width: min(600px, calc(100vw - 720px)); display: flex; flex-direction: column; gap: 20px; }
.auth__pitch h2 { font-family: var(--font-display); font-size: 34px; line-height: 44px; font-weight: 600; letter-spacing: -0.01em; color: var(--head-2); text-wrap: balance; }
.auth__pitch p { max-width: 520px; font-size: 16px; line-height: 24px; color: var(--soft); }
.auth__points { margin-top: 4px; display: flex; flex-direction: column; gap: 12px; }
.auth__points li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--soft-4); }
.auth__point-icon { flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(243, 181, 74, 0.12); color: var(--accent-soft); }
.auth__main { position: relative; z-index: 1; flex: none; width: 560px; min-height: 100vh; display: flex; flex-direction: column; padding: 26px 48px 32px; background: var(--bg); border-left: 1px solid var(--line-5); }
.auth__back { align-self: flex-end; min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--muted-4); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.auth__back:hover { color: var(--head); }
.auth__center { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.auth__form { width: 360px; display: flex; flex-direction: column; gap: 24px; }
.auth__title { font-family: var(--font-display); font-size: 30px; line-height: 38px; font-weight: 600; color: var(--head-2); }
.auth__sub { font-size: 15px; line-height: 22px; color: var(--muted-2); }
.auth__sub a { color: var(--accent); font-weight: 600; text-decoration: none; }
.banner { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(240, 120, 107, 0.10); border: 1px solid rgba(240, 120, 107, 0.45); }
.banner--lock { background: rgba(242, 169, 98, 0.10); border-color: rgba(242, 169, 98, 0.45); }
.banner__text { display: flex; flex-direction: column; gap: 2px; }
.banner__title { font-size: 14.5px; line-height: 21px; font-weight: 600; color: var(--head); }
.banner__body { font-size: 13.5px; line-height: 20px; color: var(--soft); }
.auth__fields { display: flex; flex-direction: column; gap: 18px; }
.auth__field { display: flex; flex-direction: column; gap: 8px; }
.auth__label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--soft-3); }
.auth__label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth__forgot { font-size: 13.5px; color: var(--soft); text-decoration: none; }
.auth__forgot:hover { color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
.auth__forgot--hi { color: var(--accent); font-weight: 600; }
.auth__input { width: 100%; height: 52px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--input); color: var(--text); font-size: 15.5px; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.auth__input::placeholder { color: #6F7480; }
.auth__input:hover { border-color: #3A404D; }
.auth__input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(243, 181, 74, .18); }
.auth__input--bad { border-color: var(--danger); }
.auth__input--bad:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(240, 120, 107, .16); }
.auth__input--pass { padding-right: 56px; }
.auth__input--masked { letter-spacing: 0.12em; }
.auth__input:disabled { opacity: .6; }
.auth__pass { position: relative; }
.eye { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted-2); cursor: pointer; }
.eye:hover, .eye--on { background: var(--hover); color: var(--head); }
.auth__err { display: flex; align-items: center; gap: 6px; font-size: 13.5px; line-height: 18px; color: var(--danger); }
.auth__caps { display: flex; align-items: center; gap: 6px; font-size: 13.5px; line-height: 18px; color: var(--warn); }
.auth__remember { display: flex; align-items: center; gap: 10px; min-height: 28px; font-size: 14.5px; color: var(--soft-3); cursor: pointer; }
.auth__remember input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.auth__submit { height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-fg); font-size: 16px; font-weight: 700; cursor: pointer; transition: filter .15s ease; }
.auth__submit:hover:not(:disabled) { filter: brightness(1.08); }
.auth__submit:disabled { cursor: default; }
.auth__submit--locked { background: #262A33; color: #7E828C; }
.auth__legal { font-size: 12.5px; line-height: 18px; color: var(--muted); }
.auth__legal a { color: var(--muted-4); text-decoration: none; }
.auth__legal a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth__ok { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 28px; background: rgba(98, 211, 155, 0.14); color: var(--ok); }
.auth__done { width: 360px; display: flex; flex-direction: column; gap: 22px; }
.auth__done p { font-size: 15px; line-height: 22px; color: var(--muted-4); }
.auth__done p b { color: var(--head); font-weight: 600; }
.auth__done-actions { display: flex; flex-direction: column; gap: 10px; }
.auth__continue { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px 16px; border-radius: 12px; background: var(--accent); color: var(--accent-fg); text-decoration: none; transition: filter .15s ease; }
.auth__continue:hover { color: var(--accent-fg); filter: brightness(1.08); }
.auth__continue b { font-size: 15.5px; font-weight: 700; }
.auth__continue span { font-size: 12.5px; font-weight: 500; opacity: 0.8; }
.auth__catalog { height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--line-4); color: var(--soft-4); font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.auth__catalog:hover { background: var(--hover); border-color: #3A404D; color: var(--head); }
.auth__logout { align-self: flex-start; padding: 0; border: 0; background: transparent; color: var(--muted-2); font-size: 14px; cursor: pointer; }
.auth__logout:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 980px) {
  .auth__art { display: none; }
  .auth__main { width: 100%; border-left: 0; }
  .auth__form, .auth__done { width: min(360px, 100%); }
}

/* ───────────────────────────── Text reader ───────────────────────────── */
.rd { --rbg: #0E1015; --surface-r: #14171D; --raised-r: #1A1D24; --text-r: #E4DFD6; --head-r: #F4EFE7; --muted-r: #9DA1AB; --line-r: #23262E; --chip-r: #1D2129; --segbg-r: #0F1116; --segon-r: #2A2F3A; --accent-r: #F3B54A; --accent-fg-r: #17120A; --quote-r: #CFCAC0; --mark-r: rgba(243, 181, 74, .14); --ff: 'Literata', 'PT Serif', Georgia, serif; --fs: 19px; --lh: 1.7; --tw: 680px; min-height: 100vh; background: var(--rbg); color: var(--text-r); font-family: var(--font); }
.rd--sepia { --rbg: #F3EAD7; --surface-r: #EADFC6; --raised-r: #FBF5E8; --text-r: #3A3026; --head-r: #2A221A; --muted-r: #6E6150; --line-r: #DCCDAE; --chip-r: #E4D6B8; --segbg-r: #E6D9BD; --segon-r: #FBF5E8; --accent-r: #9A5B10; --accent-fg-r: #FFF8EC; --quote-r: #4E4234; --mark-r: rgba(154, 91, 16, .12); color-scheme: light; }
.rd--light { --rbg: #FAFAF7; --surface-r: #F1F1EC; --raised-r: #FFFFFF; --text-r: #24272C; --head-r: #121418; --muted-r: #62666F; --line-r: #E2E2DB; --chip-r: #EAEAE4; --segbg-r: #EDEDE7; --segon-r: #FFFFFF; --accent-r: #9A5B10; --accent-fg-r: #FFFFFF; --quote-r: #3A3E45; --mark-r: rgba(154, 91, 16, .10); color-scheme: light; }
.rd a:focus-visible, .rd button:focus-visible, .rd textarea:focus-visible, .rd input:focus-visible { outline-color: var(--accent-r); }
.rd-header { position: sticky; top: 0; z-index: 30; height: 61px; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--rbg); border-bottom: 1px solid var(--line-r); }
.rd .iconbtn { color: var(--muted-r); }
.rd .iconbtn:hover:not(:disabled) { background: var(--chip-r); color: var(--head-r); }
.rd .iconbtn--on { background: var(--chip-r); }
.rd .reader-work__title { color: var(--head-r); }
.rd .reader-work__meta { color: var(--muted-r); }
.rd .reader-work__cover { background: var(--surface-r); }
.rd .reader-ctl { border-color: var(--line-r); background: var(--surface-r); color: var(--head-r); }
.rd .reader-ctl:hover { background: var(--chip-r); }
.rd .reader-ctl__sub, .rd .reader-ctl__src-team, .rd .reader-ctl__chev { color: var(--muted-r); }
.rd .reader-ctl__title { color: var(--muted-r); }
.rd-prog { font-size: 13.5px; font-weight: 600; color: var(--accent-r); font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.rd .reader-pop { background: var(--raised-r); border-color: var(--line-r); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4); color: var(--text-r); }
.rd .reader-pop__head { border-color: var(--line-r); }
.rd .reader-pop__head b { color: var(--head-r); }
.rd .reader-pop__head span, .rd .reader-pop__note { color: var(--muted-r); }
.rd .vol-btn, .rd .ch-btn, .rd .src-opt { color: var(--text-r); }
.rd .vol-btn:hover, .rd .ch-btn:hover, .rd .src-opt:hover:not(:disabled) { background: var(--chip-r); }
.rd .vol-btn span, .rd .ch-btn__title, .rd .ch-btn__date, .rd .src-opt__info, .rd .src-opt__name span { color: var(--muted-r); }
.rd .ch-btn--cur { background: var(--mark-r); color: var(--accent-r); }
.rd .src-opt--cur { background: var(--mark-r); }
.rd .ch-btn__fresh { background: rgba(98, 211, 155, 0.16); color: #2E9B66; }
.rd .ch-btn__ja { height: 20px; padding: 0 6px; display: inline-flex; align-items: center; border-radius: 6px; border: 1px solid var(--line-r); color: var(--muted-r); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; flex: none; }
.rd .settings__label { color: var(--muted-r); }
.rd .settings__value { color: var(--head-r); }
.rd .settings__hint { color: var(--muted-r); }
.rd .seg { background: var(--segbg-r); border-color: var(--line-r); }
.rd .seg__btn { color: var(--muted-r); }
.rd .seg__btn--on { background: var(--segon-r); color: var(--head-r); }
.rd .range { accent-color: var(--accent-r); }
.rd .switch-row { color: var(--text-r); }
.rd .switch { --switch-off: var(--line-r); }
.rd .switch--on { background: var(--accent-r); }
.rd .hotkeys { border-color: var(--line-r); }
.rd .hotkeys__grid { color: var(--text-r); }
.rd kbd { border-color: var(--line-r); background: var(--surface-r); color: var(--text-r); }
.rd .cmt__name, .rd .reply__name { color: var(--head-r); }
.rd .cmt__time { color: var(--muted-r); }
.rd .cmt__text, .rd .reply__text { color: var(--text-r); }
.rd .cmt__badge { background: var(--mark-r); color: var(--accent-r); }
.rd .act { color: var(--muted-r); }
.rd .act:hover { color: var(--head-r); }
.rd .act--liked, .rd .act--liked:hover { color: #E5675A; }
.rd .replies { border-color: var(--line-r); }
.rd .spoiler { border-color: var(--line-r); background: var(--surface-r); }
.rd .spoiler__text { color: var(--text-r); }
.rd .spoiler__cover { color: var(--head-r); }
.rd .cmt--flat { border-color: var(--line-r); }
.rd .tchip { border-color: var(--line-r); color: var(--muted-r); }
.rd .tchip:hover { color: var(--head-r); }
.rd .tchip--on { border-color: var(--accent-r); background: var(--mark-r); color: var(--accent-r); }
.rd .backdrop { z-index: 25; }
.theme-btn { height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 12px; border: 2px solid; cursor: pointer; }
.theme-btn__aa { font-family: var(--font-serif); font-size: 19px; line-height: 22px; font-weight: 600; }
.theme-btn__label { font-size: 12px; font-weight: 600; }
.fs-btn { flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line-r); border-radius: 9px; background: transparent; color: var(--text-r); font-family: var(--font-serif); font-weight: 600; cursor: pointer; }
.fs-btn:hover { background: var(--chip-r); }
.aa-btn { height: 44px; display: flex; align-items: center; gap: 2px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--head-r); font-family: var(--font-serif); font-weight: 600; cursor: pointer; }
.aa-btn:hover, .aa-btn--on { background: var(--chip-r); }
/* A button now (a bare "#comments" link would leave the page), so the browser's button chrome is reset. */
.rd-cjump { flex: none; height: 44px; display: flex; align-items: center; gap: 7px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--muted-r); font-family: inherit; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; text-decoration: none; cursor: pointer; }
.rd-cjump:hover { background: var(--chip-r); color: var(--head-r); }
.rd-progbar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.rd-progbar__fill { height: 100%; background: var(--accent-r); }
.mt-btn { flex: none; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text-r); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.mt-btn:hover { background: var(--chip-r); }
.mt-btn--active { color: var(--accent-r); }
.mt-btn--on { background: var(--mark-r); color: var(--accent-r); }
.mt-btn--panel { background: var(--chip-r); }

.rd-main { padding: 52px 32px 120px; transition: padding-right 0.2s ease; }
.rd-main--drawer { padding-right: 552px; }
.rd-article { width: min(var(--tw), 100%); margin: 0 auto; }
.rd-crumb { align-self: flex-start; font-size: 14px; line-height: 20px; color: var(--muted-r); text-decoration: none; }
.rd-crumb:hover { color: var(--muted-r); text-decoration: underline; text-underline-offset: 3px; }
.rd-head { display: flex; flex-direction: column; }
.rd-kicker { margin-top: 26px; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-r); }
.rd-title { margin-top: 10px; font-family: var(--ff); font-size: 40px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; color: var(--head-r); text-wrap: balance; }
.rd-title--ja { font-family: var(--font-ja-serif); }
.rd-meta { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; line-height: 20px; color: var(--muted-r); }
.rd-cred { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--muted-r); }
.rd-cred b { color: var(--text-r); font-weight: 600; }
.rd-divider { margin: 36px 0 34px; display: flex; align-items: center; gap: 14px; color: var(--muted-r); }
.rd-divider span { flex: 1 1 auto; height: 1px; background: var(--line-r); }
.rd-divider svg { color: var(--accent-r); }
.chapter-body { font-family: var(--ff); font-size: var(--fs); line-height: var(--lh); color: var(--text-r); }
.para { position: relative; }
.para__p { margin: 0 0 0.9em; transition: color 0.3s ease; }
.para__p--justify { text-align: justify; hyphens: auto; }
.para__p--pend { color: var(--muted-r); }
.para__p--ja { font-family: var(--font-ja-serif); }
.para__p--open { background: var(--mark-r); }
.dropcap::first-letter { float: left; font-size: 3.35em; line-height: .86; font-weight: 600; padding: .07em .1em 0 0; color: var(--accent-r); }
.para__quote { margin: 0.2em 0 1.1em; padding: 0.15em 0 0.15em 1.1em; border-left: 3px solid var(--accent-r); font-style: italic; color: var(--quote-r); }
.para__quote--pend { color: var(--muted-r); }
.para__orig { margin: -0.4em 0 1.2em; padding-left: 0.85em; border-left: 2px solid var(--line-r); font-family: var(--font-ja-serif); font-size: 0.8em; line-height: 1.8; font-style: normal; color: var(--muted-r); text-align: left; }
.para__orig--sans { font-family: var(--font-ja-sans); }
.para__break { margin: 1.5em 0 1.6em; text-align: center; letter-spacing: 0.7em; font-size: 0.9em; color: var(--muted-r); }
.fn { color: var(--accent-r); text-decoration: none; font-weight: 600; }
.fn:hover { text-decoration: underline; }
.fn-sup { font-family: var(--font); font-size: 0.62em; line-height: 0; margin-left: 1px; }
.pmark { position: absolute; top: 2px; right: -66px; height: 28px; display: flex; align-items: center; gap: 5px; padding: 0 9px 0 7px; border-radius: 14px; border: 1px solid var(--line-r); background: var(--rbg); color: var(--muted-r); font-family: var(--font); font-size: 12.5px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.pmark:hover { color: var(--head-r); border-color: var(--accent-r); }
.pmark--on { background: var(--accent-r); color: var(--accent-fg-r); border-color: var(--accent-r); }
.pmark--on:hover { color: var(--accent-fg-r); }
.addc { position: absolute; top: 2px; right: -52px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 14px; border: 1px dashed var(--line-r); background: transparent; color: var(--muted-r); cursor: pointer; opacity: 0; transition: opacity .15s ease; }
.para:hover .addc, .addc:focus-visible { opacity: 1; }
.pthread { margin: -0.3em 0 1.4em; padding: 12px 14px 14px; border-radius: 14px; background: var(--surface-r); border: 1px solid var(--line-r); font-family: var(--font); font-size: 14.5px; line-height: 21px; text-align: left; }
.pthread__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pthread__title { font-size: 13.5px; font-weight: 700; color: var(--head-r); }
.pthread__empty { padding: 6px 0 2px; color: var(--muted-r); }
.pthread__reply { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-r); }
.pthread__composer { margin-top: 10px; display: flex; align-items: flex-end; gap: 8px; }
.pthread__input { flex: 1 1 auto; min-width: 0; min-height: 42px; resize: none; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-r); background: var(--rbg); color: var(--text-r); font-size: 14.5px; line-height: 20px; outline: none; }
.pthread__input:focus { border-color: var(--accent-r); }
.rd-send { flex: none; height: 42px; padding: 0 14px; border: 0; border-radius: 11px; background: var(--chip-r); color: var(--muted-r); font-size: 14px; font-weight: 700; cursor: default; }
.rd-send--ready { background: var(--accent-r); color: var(--accent-fg-r); cursor: pointer; }
.rd-send--ready:hover { filter: brightness(1.07); }
.rd-notes { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line-r); font-size: 14.5px; line-height: 22px; color: var(--muted-r); }
.rd-notes__cap { font-size: 12.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-r); }
.rd-notes p { margin-top: 10px; }
.rd-end { margin-top: 56px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.rd-end__ornament { display: flex; gap: 10px; color: var(--accent-r); }
.rd-end__label { font-size: 14px; color: var(--muted-r); }
.rd-next { width: 100%; max-width: 580px; min-height: 80px; display: flex; align-items: center; gap: 16px; padding: 14px 22px 14px 24px; border: 0; border-radius: 18px; background: var(--accent-r); color: var(--accent-fg-r); text-align: left; cursor: pointer; transition: filter .15s ease; }
.rd-next:hover { filter: brightness(1.07); }
.rd-next__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rd-next__cap { font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }
.rd-next__title { font-size: 18px; line-height: 24px; font-weight: 700; }
.rd-last { width: 100%; max-width: 580px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; border-radius: 18px; background: var(--surface-r); border: 1px solid var(--line-r); }
.rd-last span { font-size: 15px; line-height: 22px; color: var(--text-r); }
.rd-follow { height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--accent-r); background: var(--accent-r); color: var(--accent-fg-r); font-size: 15px; font-weight: 700; cursor: pointer; }
.rd-follow.is-on { background: transparent; color: var(--accent-r); }
.rd-end__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rd-ghost { max-width: 300px; height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line-r); background: transparent; color: var(--text-r); font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color .15s ease; }
.rd-ghost:hover:not(:disabled) { background: var(--chip-r); }
.rd-ghost--thanks { color: #E5675A; border-color: rgba(229, 103, 90, 0.5); }
.rd-comments { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line-r); }
.rd-comments__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 16px; }
.rd-comments__title { font-size: 22px; line-height: 30px; font-weight: 700; color: var(--head-r); }
.rd-comments__title span { font-weight: 600; color: var(--muted-r); font-variant-numeric: tabular-nums; }
.rd .sort-link { color: var(--muted-r); font-size: 14px; }
.rd .sort-link--on, .rd .sort-link:hover { color: var(--head-r); }
.rd-pnote { margin-top: 16px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-r); font-size: 14px; line-height: 20px; color: var(--muted-r); }
.rd-pnote > span { flex: 1 1 auto; }
.rd-pnote .marks-toggle { color: var(--text-r); font-size: 13.5px; font-weight: 600; }
.rd-composer { margin-top: 20px; padding: 14px; border-radius: 16px; border: 1px solid var(--line-r); background: var(--surface-r); }
.rd-composer__row { display: flex; gap: 12px; align-items: flex-start; }
.rd-composer__avatar { flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 18px; background: #2A2F3A; color: #EEE9E1; font-size: 14px; font-weight: 700; }
.rd-composer__input { flex: 1 1 auto; min-width: 0; min-height: 84px; resize: vertical; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-r); background: var(--rbg); color: var(--text-r); font-size: 15px; line-height: 22px; outline: none; }
.rd-composer__input:focus { border-color: var(--accent-r); }
.rd-composer__tools { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-left: 48px; }
.rd-composer__hint { font-size: 12.5px; color: var(--muted-r); }
.rd-composer .rd-send { margin-left: auto; height: 38px; padding: 0 16px; font-size: 14.5px; }
.rd-clist { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }

/* Machine translation banner and drawer */
.mt-banner { margin-top: 28px; padding: 16px; border-radius: 16px; border: 1px solid var(--line-r); background: var(--surface-r); font-family: var(--font); }
.mt-banner__row { display: flex; gap: 14px; }
.mt-banner__row--center { align-items: center; }
.mt-banner__icon { flex: none; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 11px; background: var(--mark-r); color: var(--accent-r); }
.mt-banner__body { flex: 1 1 auto; min-width: 0; }
.mt-banner__title { font-size: 16px; line-height: 22px; font-weight: 700; color: var(--head-r); }
.mt-banner__title--sm { font-size: 15px; line-height: 21px; }
.mt-banner__text { margin-top: 3px; font-size: 14px; line-height: 20px; color: var(--muted-r); }
.mt-banner__sub { font-size: 13px; line-height: 18px; color: var(--muted-r); }
.mt-banner__sub--next { margin-top: 2px; }
.mt-banner__quick { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qbtn { height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px 0 9px; border-radius: 11px; border: 1px solid var(--line-r); background: transparent; color: var(--head-r); font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .15s ease; }
.qbtn:hover { background: var(--chip-r); }
.qbtn--on { border-color: var(--accent-r); background: var(--mark-r); }
.qbtn__mark { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--chip-r); color: var(--head-r); font-size: 12.5px; font-weight: 700; }
.qbtn__cost { font-size: 12.5px; font-weight: 500; color: var(--muted-r); }
.mt-banner__setup { height: 40px; display: inline-flex; align-items: center; gap: 7px; margin-left: 4px; padding: 0 4px; border: 0; background: transparent; color: var(--muted-r); font-size: 14px; font-weight: 600; cursor: pointer; }
.mt-banner__setup:hover { color: var(--head-r); }
.mt-banner__human { margin-top: 12px; padding: 0; border: 0; background: transparent; color: var(--accent-r); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.mt-banner__human:hover { text-decoration: underline; text-underline-offset: 3px; }
.mt-banner__bar { margin-top: 8px; height: 4px; border-radius: 2px; background: var(--line-r); overflow: hidden; }
.mt-banner__bar-fill { height: 100%; border-radius: 2px; background: var(--accent-r); transition: width 0.25s ease; }
.mt-banner__busy-sub { margin-top: 7px; font-size: 13px; line-height: 18px; color: var(--muted-r); font-variant-numeric: tabular-nums; }
.mt-banner__nudge { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-r); display: flex; align-items: center; gap: 12px; }
.mt-banner__nudge span { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 20px; color: var(--text-r); }
.mt-banner__nudge-btn { flex: none; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--accent-r); background: transparent; color: var(--accent-r); font-size: 14px; font-weight: 700; cursor: pointer; }
.mt-banner__nudge-btn:hover { background: var(--mark-r); }
.rd-ghost--sm { height: 38px; padding: 0 14px; font-weight: 600; flex: none; }
.rd .seg--mt { gap: 2px; padding: 3px; border-radius: 11px; }
.rd .seg--mt .seg__btn { height: 32px; padding: 0 11px; border-radius: 8px; flex: none; }
.drawer { position: fixed; top: 61px; right: 0; bottom: 0; z-index: 20; width: 520px; display: flex; flex-direction: column; background: var(--surface-r); border-left: 1px solid var(--line-r); box-shadow: -16px 0 48px rgba(0, 0, 0, 0.22); color: var(--text-r); font-family: var(--font); }
.drawer__head { flex: none; display: flex; align-items: flex-start; gap: 12px; padding: 18px 14px 16px 22px; border-bottom: 1px solid var(--line-r); }
.drawer__title { font-size: 18px; line-height: 24px; font-weight: 700; color: var(--head-r); }
.drawer__sub { margin-top: 2px; font-size: 13.5px; line-height: 19px; color: var(--muted-r); }
.drawer__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 22px 24px; scrollbar-width: thin; scrollbar-gutter: stable; }
.drawer__section { padding: 18px 0; border-top: 1px solid var(--line-r); display: flex; flex-direction: column; gap: 10px; }
.drawer__section--first { border-top: 0; gap: 12px; }
.drawer__label { font-size: 13px; font-weight: 600; color: var(--muted-r); }
.drawer__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.drawer__hint { font-size: 13px; line-height: 18px; color: var(--muted-r); }
.drawer__note { margin-top: 6px; font-size: 12.5px; line-height: 18px; color: var(--muted-r); }
.drawer__foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line-r); background: var(--surface-r); }
.drawer__cost { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.drawer__cost b { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--head-r); }
.drawer__cost span { font-size: 12.5px; line-height: 17px; color: var(--muted-r); }
.drawer__secondary { flex: none; height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-r); background: transparent; color: var(--text-r); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.drawer__secondary:hover { background: var(--chip-r); }
.drawer__primary { flex: none; height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--accent-r); color: var(--accent-fg-r); font-size: 14.5px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.drawer__primary:hover:not(:disabled) { filter: brightness(1.07); }
.drawer__primary:disabled { background: var(--chip-r); color: var(--muted-r); cursor: default; }
.mt-switch { display: flex; align-items: flex-start; gap: 14px; padding: 0; border: 0; background: transparent; color: var(--text-r); text-align: left; cursor: pointer; width: 100%; }
.mt-switch__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mt-switch__title { font-size: 15px; line-height: 21px; font-weight: 600; color: var(--head-r); }
.mt-switch__title--sm { font-size: 14px; line-height: 20px; }
.mt-switch__hint { font-size: 13px; line-height: 18px; color: var(--muted-r); }
.mt-switch .switch { margin-top: 1px; }
.engines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mtcard { min-height: 104px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line-r); background: var(--rbg); color: var(--text-r); text-align: left; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.mtcard:hover { border-color: var(--muted-r); }
.mtcard--on, .mtcard--on:hover { border-color: var(--accent-r); background: var(--mark-r); }
.mtcard__mark { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--chip-r); color: var(--head-r); font-size: 15px; font-weight: 700; }
.mtcard--on .mtcard__mark { background: var(--accent-r); color: var(--accent-fg-r); }
.mtcard__name { font-size: 14.5px; line-height: 19px; font-weight: 700; color: var(--head-r); }
.mtcard__sub { font-size: 12.5px; line-height: 16px; color: var(--muted-r); }
.infobox { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--rbg); border: 1px solid var(--line-r); font-size: 13px; line-height: 19px; color: var(--muted-r); }
.models { display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 14px; background: var(--rbg); border: 1px solid var(--line-r); }
.model { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text-r); text-align: left; cursor: pointer; }
.model:hover { background: var(--chip-r); }
.model--on, .model--on:hover { background: var(--mark-r); }
.radio { flex: none; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: 9px; border: 2px solid var(--muted-r); }
.radio__dot { width: 8px; height: 8px; border-radius: 4px; background: transparent; }
.model--on .radio { border-color: var(--accent-r); }
.model--on .radio__dot { background: var(--accent-r); }
.model__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.model__name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.model__name { font-size: 14.5px; line-height: 20px; font-weight: 600; color: var(--head-r); }
.model__vendor { font-size: 12.5px; color: var(--muted-r); }
.model__tag { height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 6px; background: var(--mark-r); color: var(--accent-r); font-size: 11.5px; font-weight: 700; }
.model__sub { font-size: 12.5px; line-height: 17px; color: var(--muted-r); }
.model__cost { flex: none; font-size: 13px; font-weight: 600; color: var(--muted-r); font-variant-numeric: tabular-nums; white-space: nowrap; }
.model--on .model__cost { color: var(--head-r); }
.ownbox { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--rbg); border: 1px solid var(--line-r); }
.ownbox label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted-r); }
.drawer-input { height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-r); background: var(--surface-r); color: var(--text-r); font-size: 14px; font-weight: 400; outline: none; }
.drawer-input:focus { border-color: var(--accent-r); }
.drawer-input--ja { font-family: var(--font-ja-sans); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset { height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-r); background: transparent; color: var(--text-r); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.preset:hover { color: var(--head-r); }
.preset--on { border-color: var(--accent-r); background: var(--mark-r); color: var(--accent-r); }
.prompt { width: 100%; min-height: 236px; resize: vertical; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-r); background: var(--rbg); color: var(--text-r); font-size: 14px; line-height: 21px; outline: none; }
.prompt:focus { border-color: var(--accent-r); }
.vars { display: flex; align-items: flex-start; gap: 12px; }
.vars__list { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted-r); }
.var-btn { height: 26px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line-r); background: transparent; color: var(--muted-r); font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; cursor: pointer; }
.var-btn:hover { color: var(--head-r); }
.vars__count { flex: none; padding-top: 4px; font-size: 12.5px; color: var(--muted-r); font-variant-numeric: tabular-nums; }
.vars__count--over { color: #F38E86; }
.preview { margin-top: 4px; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--rbg); border: 1px solid var(--line-r); }
.preview__row { display: flex; align-items: center; gap: 12px; }
.preview__hint { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 18px; color: var(--muted-r); }
.preview__btn { flex: none; height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-r); background: transparent; color: var(--text-r); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.preview__btn:hover:not(:disabled) { background: var(--chip-r); }
.preview__btn:disabled { opacity: .6; cursor: default; }
.preview__ja { font-family: var(--font-ja-serif); font-size: 13.5px; line-height: 23px; color: var(--muted-r); }
.preview__ru { padding-top: 10px; border-top: 1px solid var(--line-r); font-family: var(--ff); font-size: 15.5px; line-height: 25px; color: var(--text-r); }
.preview__ru--busy { opacity: .45; }
.gloss-add { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--accent-r); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.gloss-add:hover { text-decoration: underline; text-underline-offset: 3px; }
.gloss-add:disabled { opacity: .5; cursor: default; text-decoration: none; }
.ahead__form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ahead__label { font-size: 14px; color: var(--text-r); }
.ahead__count { width: 76px; background: var(--rbg); font-variant-numeric: tabular-nums; }
.ahead__range { flex: 1 1 auto; min-width: 0; font-size: 14px; color: var(--muted-r); font-variant-numeric: tabular-nums; }
.ahead__go { flex: none; }
.ahead__run { display: flex; flex-direction: column; gap: 6px; }
.ahead__run .mt-banner__bar { margin-top: 2px; }
.ahead__title { font-size: 14px; line-height: 20px; color: var(--text-r); font-variant-numeric: tabular-nums; }
.ahead__stop { align-self: flex-start; }
.ahead__last { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; line-height: 18px; color: var(--muted-r); }
.mt-banner__nudge--ahead span { font-variant-numeric: tabular-nums; }
.gloss-empty { padding: 14px; border-radius: 12px; border: 1px dashed var(--line-r); font-size: 13.5px; line-height: 19px; color: var(--muted-r); text-align: center; }
.gloss { display: flex; flex-direction: column; gap: 6px; }
.gloss__row { display: flex; align-items: center; gap: 8px; }
.gloss__row .drawer-input { flex: 1 1 0; min-width: 0; background: var(--rbg); }
.gloss__row .drawer-input--note { flex: 0 1 34%; }
.mt-summary { display: flex; flex-direction: column; gap: 6px; }
.mt-summary__text { margin: 0; padding: 10px 12px; max-height: 220px; overflow: auto; border-radius: 10px; background: var(--rbg); color: var(--text-r); font: inherit; font-size: 12.5px; line-height: 18px; white-space: pre-wrap; }
.gloss__row .drawer-input--dst { flex: 1.35 1 0; }
.gloss__row svg { color: var(--muted-r); }
.gloss__auto { flex: 0 0 auto; font-size: 11.5px; line-height: 18px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-r); background: var(--rbg); color: var(--muted-r); white-space: nowrap; cursor: default; }
.adv-btn { width: 100%; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0; border: 0; background: transparent; color: var(--text-r); font-size: 14px; font-weight: 600; cursor: pointer; }
.adv-btn .chevron { color: var(--muted-r); }
.adv { display: flex; flex-direction: column; gap: 18px; padding-bottom: 18px; }
.temp { display: flex; flex-direction: column; gap: 6px; }
.temp__ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-r); }
@media (max-width: 1100px) {
  .rd-main--drawer { padding-right: 32px; }
  .drawer { width: min(520px, 100vw); }
  .pmark { right: -8px; top: -14px; }
  .addc { right: -8px; top: -14px; }
}

/* A cover the browser could not load: the monogram placeholder takes the frame. */
.cover__ph--fallback { display: none; }
.cover--broken .cover__ph--fallback { display: flex; }
.cover--broken .cover__img, .cover--broken .cover__blur, .cover--broken .cover__contain, .cover--broken .cover__small { display: none; }

/* Entry: a chapter whose text is not here, and a source name that links to the site */
.ch-row__lock { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; background: rgba(242, 169, 98, 0.14); color: #F4B47E; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.ch-row--locked .ch-row__title { color: var(--muted); }
.src-row__site { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.src-row__site:hover b { text-decoration: underline; }
.table-box--open { overflow: visible; }

/* Reader: a chapter whose text is elsewhere, a chapter drawn as images, the same book on another site */
.rd-locked { display: flex; align-items: center; gap: 16px; margin: 8px 0 24px; padding: 18px 20px; border: 1px solid var(--line-r, var(--line)); border-radius: 14px; background: rgba(242, 169, 98, 0.08); color: #F4B47E; }
.rd-locked__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rd-locked__body b { font-size: 15px; line-height: 20px; }
.rd-locked__body span { font-size: 13.5px; line-height: 18px; color: var(--muted-r, var(--muted)); }
.rd-image { display: block; max-width: 100%; height: auto; margin: 0 auto 18px; border-radius: 6px; }
a.src-opt--link { text-decoration: none; color: inherit; }
a.src-opt--link:hover { background: var(--hover); }
.act--static { cursor: default; opacity: 0.8; }

/* ── Reading marks, hidden works, unread counters ─────────────────────────────────────────── */
.esection__read { color: var(--ok); }
.ch-row { gap: 0; padding: 0 12px 0 8px; }
.ch-row__link { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 16px; min-height: 46px; padding: 8px 8px; color: inherit; text-decoration: none; }
.ch-row__link:hover { color: inherit; }
.ch-row--read .ch-row__num, .ch-row--read .ch-row__title { color: var(--muted); }
.ch-row__mark { flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 7px; border: 1px solid var(--line-4); background: transparent; color: transparent; cursor: pointer; transition: border-color .12s ease, background-color .12s ease, color .12s ease; }
.ch-row__mark:hover { border-color: var(--ok); color: var(--ok); }
.ch-row__mark--on { background: rgba(98, 211, 155, 0.16); border-color: rgba(98, 211, 155, 0.5); color: var(--ok); }
.ch-row__mark:disabled { opacity: .35; cursor: default; }
.ch-row__upto { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; margin-left: 4px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; opacity: 0; cursor: pointer; transition: opacity .12s ease, border-color .12s ease, color .12s ease; }
.ch-row:hover .ch-row__upto, .ch-row__upto:focus-visible { opacity: 1; }
.ch-row__upto:hover { border-color: var(--line-4); color: var(--head); }
.ch-btn-row { display: flex; align-items: center; gap: 4px; }
.ch-btn-row .ch-btn { flex: 1 1 auto; min-width: 0; }
.ch-btn__toggle { flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; padding: 0; margin-left: 4px; border-radius: 7px; border: 1px solid #2B2F3A; background: transparent; color: transparent; cursor: pointer; transition: border-color .12s ease, background-color .12s ease, color .12s ease; }
.ch-btn__toggle:hover { border-color: var(--ok); color: var(--ok); }
.ch-btn__toggle--on { background: rgba(98, 211, 155, 0.16); border-color: rgba(98, 211, 155, 0.5); color: var(--ok); }
.ch-btn__toggle:disabled { opacity: .3; cursor: default; }
.reader-pop__act { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid #2B2F3A; background: transparent; color: var(--muted-r); font-size: 12px; white-space: nowrap; cursor: pointer; }
.reader-pop__act:hover { color: var(--head); border-color: #3A404D; }
.unread { flex: none; display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 6px; background: rgba(98, 211, 155, 0.14); color: var(--ok); font-size: 12px; font-weight: 600; white-space: nowrap; }
.unread--poster { margin-left: 6px; vertical-align: middle; }
.hidden-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid rgba(243, 142, 134, 0.4); color: #F3A096; font-size: 12px; font-weight: 600; }
.more-menu { position: relative; flex: none; }
.bell-btn.is-open { color: var(--head); border-color: #3A404D; }
.menu--right { left: auto; right: 0; }
.filter-btn { height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-4); background: transparent; color: var(--muted-4); font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.filter-btn:hover { background: var(--hover); color: var(--head); }
.filter-btn--on { background: rgba(243, 142, 134, 0.12); border-color: rgba(243, 142, 134, 0.45); color: #F3A096; }
.rd-ghost--done { color: var(--ok); border-color: rgba(98, 211, 155, 0.4); }
.rd-toast { position: fixed; right: 24px; bottom: 24px; left: auto; max-width: 520px; z-index: 60; }
.rd-toast .toast__text { white-space: normal; }

/* ── Replacements editor ──────────────────────────────────────────────────────────────────── */
.aa-btn--marked::after { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-r); }
.repl { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.repl__head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.repl__head b { font-size: 15px; color: var(--head-r, var(--head)); }
.repl__head span { font-size: 12.5px; line-height: 17px; color: var(--muted-r); }
.repl__empty { padding: 10px 0; font-size: 13.5px; color: var(--muted-r); }
.repl__row { display: flex; align-items: center; gap: 8px; }
.repl__row--new { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line-r); }
.repl__input { flex: 1 1 auto; min-width: 0; height: 34px; }

/* ── Machine translation: states added with the real engines ─────────────────────────────── */
.mt-banner__icon--err { color: #F3A096; }
.engines--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.infobox--warn { border-color: rgba(242, 169, 98, 0.45); color: #F2C08A; }
.preview__ja--latin { font-family: var(--ff); font-style: italic; }
.preview__ru--err { color: #F3A096; }
/* Google's page widget shows a banner ("Translated to: Russian") in an iframe wrapped in body > div.skiptranslate
   and pushes the page down by 40px for it; the reader has its own controls, so the banner, the push, the
   "original text" tooltip and the hover highlight on translated text are switched off. The widget's class
   names are obfuscated (VIpgJd-…) and change rarely; the stable ones are kept alongside. */
body > div.skiptranslate, iframe.skiptranslate, iframe.goog-te-banner-frame, iframe[class*="VIpgJd-ZVi9od-ORHb"], .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
body { top: 0 !important; }
#goog-gt-tt, .goog-tooltip, .goog-tooltip:hover, .VIpgJd-yAWNEb-L7lbkb { display: none !important; visibility: hidden !important; }
.rd font[class*="VIpgJd-yAWNEb"], .rd .goog-text-highlight, .rd .VIpgJd-yAWNEb-VIpgJd { background: none !important; background-color: transparent !important; box-shadow: none !important; }

/* ── Markup the sources set inside paragraphs and comments ────────────────────────────────── */
.para__p img, .para__quote img { display: block; max-width: 100%; height: auto; margin: 14px auto; border-radius: 6px; }
.para__p a, .para__quote a { color: var(--accent-r); text-decoration: underline; text-underline-offset: 3px; }
.para__p strong, .para__quote strong { font-weight: 600; }
.para__p code { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 0.92em; }
.cmt__text img, .reply__text img { max-width: 100%; max-height: 28px; vertical-align: middle; }
.cmt__text img[src*="/uploads/"], .cmt__text img[src*="/images/"] { max-height: 320px; display: block; margin: 6px 0; border-radius: 6px; }
.cmt__text a, .reply__text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }

/* ── Administration ─────────────────────────────────────────────────────────── */
.adm__tabs { margin-top: 22px; max-width: 720px; }
.adm__body { display: flex; flex-direction: column; gap: 18px; margin-top: 20px; }
.adm-banner { align-items: center; }
.adm-section { gap: 16px; }
.adm-section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.adm-section__head .panel__title { margin: 0; }
.adm-master { width: auto; min-height: 36px; gap: 10px; color: var(--text); font-weight: 500; }
.adm-master > span:first-child { flex: none; }
.adm-switch-field { min-height: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--input); color: var(--text); font-size: 14px; }
.adm-switch-cell { width: auto; min-height: 24px; }
.adm-grid { display: grid; gap: 14px 18px; align-items: end; }
.adm-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-grid--4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.adm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.adm-actions--fields { min-height: 40px; }
.adm-actions__end { margin-left: auto; }
.adm-worker__title { display: flex; align-items: baseline; gap: 12px; }
.adm-worker__site { font-size: 13px; color: var(--muted); text-decoration: none; }
.adm-worker__site:hover { color: var(--head); text-decoration: underline; }
.adm-kv { display: flex; flex-direction: column; gap: 10px; }
.adm-kv__title { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted-2); }
.adm-kv__title--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.adm-table { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.adm-table__row { display: grid; align-items: center; gap: 0 14px; min-height: 42px; padding: 6px 14px; border-top: 1px solid var(--line-5); font-size: 13.5px; color: var(--text); }
.adm-table__row > [role="cell"] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-table__row--fixed { height: 46px; min-height: 46px; max-height: 46px; }
.adm-table__row:first-child { border-top: 0; }
.adm-table__row--head { min-height: 36px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.adm-table__row--btn { width: 100%; text-align: left; border-left: 0; border-right: 0; border-bottom: 0; background: transparent; cursor: pointer; font: inherit; }
.adm-table__row--btn:hover, .adm-table__row--open { background: var(--hover-2); }
.adm-table--identities .adm-table__row { grid-template-columns: minmax(140px, 0.9fr) minmax(230px, 1.4fr) 110px minmax(200px, 2fr) 80px 80px 120px; }
.adm-table--overview .adm-table__row { grid-template-columns: minmax(220px, 2fr) 160px 120px 100px 110px 100px 110px; }
.adm-overview__link { color: var(--head); font-weight: 600; text-decoration: none; }
.adm-overview__link:hover { text-decoration: underline; }
.adm-overview__host { margin-left: 8px; font-size: 12px; color: var(--muted); }
.adm__tabs { flex-wrap: wrap; max-width: none; }
.adm__tabs .tab { flex: 1 1 110px; white-space: nowrap; }
.adm-table--counts .adm-table__row { grid-template-columns: minmax(160px, 2fr) repeat(4, minmax(90px, 1fr)); }
.adm-table--tasks .adm-table__row { grid-template-columns: 150px 120px 130px 70px minmax(200px, 3fr) 110px; }
.adm-table--runs .adm-table__row { grid-template-columns: 130px minmax(170px, 1.4fr) 120px 130px 90px 80px minmax(200px, 3fr); }
.adm-table--proxies .adm-table__row { grid-template-columns: 170px 130px minmax(220px, 2fr) minmax(100px, 1fr) 80px minmax(200px, 2fr) 50px; }
.adm-table__actions { display: flex; justify-content: flex-end; gap: 6px; }
.adm-num { font-variant-numeric: tabular-nums; }
.adm-num--bad { color: var(--danger-text); font-weight: 600; }
.adm-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.adm-clip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); }
.adm-pill { background: var(--raised); color: var(--soft-4); max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-flex; }
.adm-pill > span:last-child, .adm-pill { min-width: 0; }
.adm-pill .status-pill__dot { background: currentColor; }
.adm-pill--ok { background: rgba(98, 211, 155, 0.14); color: var(--ok); }
.adm-pill--bad { background: rgba(240, 120, 107, 0.14); color: var(--danger-text); }
.adm-pill--warn { background: rgba(242, 169, 98, 0.14); color: #F2C08A; }
.adm-pill--run { background: rgba(243, 181, 74, 0.16); color: var(--accent-soft); }
.adm-pill--idle { color: var(--muted-2); }
.adm-running { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 13.5px; }
.adm-running__line { flex: 1 1 100%; color: var(--soft); font-size: 13px; }
.adm-book { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 320px; }
.adm-book .field { height: 40px; }
.adm-danger { color: var(--danger-text); border-color: rgba(240, 120, 107, 0.45); }
.adm-log { padding: 10px 14px 14px; border-top: 1px solid var(--line-5); background: var(--bg-deep); }
.adm-log__pre { margin: 0; max-height: 420px; overflow: auto; padding: 10px 12px; border-radius: 8px; background: #0B0D11; color: var(--soft); font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.adm-log__pre--error { margin-bottom: 10px; color: var(--danger-text); }
.adm-check { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.adm-check__result { font-size: 12.5px; line-height: 16px; }
.adm-check__result--ok { color: var(--ok); }
.adm-check__result--bad { color: var(--danger-text); }
.adm-account { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.adm-account--other { border-style: dashed; }
.adm-account__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.adm-account__title { font-size: 15px; font-weight: 600; color: var(--head); }
@media (max-width: 960px) {
  .adm-grid--3, .adm-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-table__row { grid-template-columns: 1fr 1fr !important; }
  .adm-table__row--head { display: none; }
  .adm-book { margin-left: 0; min-width: 0; width: 100%; }
}
@media (max-width: 600px) {
  .adm-grid--3, .adm-grid--4 { grid-template-columns: minmax(0, 1fr); }
}
.adm-seg { gap: 2px; padding: 3px; border-radius: 10px; }
.adm-seg .seg__btn { flex: none; height: 28px; padding: 0 10px; font-size: 12.5px; }

/* Admin: which sites a proxy serves */
.adm-sites { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.adm-site-chip { height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line-4); background: transparent; color: var(--muted); font: inherit; font-size: 11.5px; line-height: 20px; cursor: pointer; }
.adm-site-chip:hover { border-color: #4A5160; color: var(--text); }
.adm-site-chip--on { border-color: rgba(243, 181, 74, 0.6); background: rgba(243, 181, 74, 0.12); color: var(--accent-soft); }

/* Entry: a thumbnail cut from a sheet — the tile is as tall as its box and clips the sheet's neighbours */
.thumb__sprite { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); height: 100%; aspect-ratio: 200 / 242; background-color: #FFFFFF; background-repeat: no-repeat; }

/* Catalog: the sentinels that ask for the previous and the next page, and the loading row */
.catalog-sentinel { height: 1px; margin: 0; }
.catalog-loading { display: flex; justify-content: center; align-items: center; min-height: 56px; color: var(--muted); font-size: 14px; }
.catalog-pagenote { display: flex; justify-content: center; padding: 14px 0 0; color: var(--muted); font-size: 13px; }

