/* Нови книги — in the house style of tazivecher.bg (in its own colours:
   "Пингвин" below), Sofia Sans Extra Condensed set big for everything that
   names something (titles, days, authors), Sofia Sans for the rest, and
   the colour coming from the covers themselves. Dark is the default;
   light is cool paper with the same ink.

   Token names: --ink is the page, --ink-2 raised surfaces, --ink-3 rules;
   --paper is the text, --paper-dim secondary text; --gold the marker
   (fills), --gold-text the marker as text, --accent links and primary
   buttons. A book's page redefines them from its cover (body.tinted). */

@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/sofiasans-cyrillic.woff2?v=1") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/sofiasans-latin.woff2?v=1") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }
@font-face { font-family: "Sofia Sans Extra Condensed"; font-style: normal; font-weight: 500 900; font-display: swap;
  src: url("fonts/sofiasans-xcond-cyrillic.woff2?v=1") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Sofia Sans Extra Condensed"; font-style: normal; font-weight: 500 900; font-display: swap;
  src: url("fonts/sofiasans-xcond-latin.woff2?v=1") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }

/* ---------- tokens ----------
   "Пингвин", the house theme's colours: graphite and the orange of the old
   paperbacks, dark (the default) or light. The other themes are
   skin-<id>.css over these (theme.js). html[data-palette="penguin"] stays
   on every page: the five other palettes it once chose between were
   dropped in November 2026, and the themes' selectors count on it. */
:root,
[data-palette="penguin"][data-theme="dark"] {
  --ink: #151719; --ink-2: #1e2124; --ink-3: #33373c;
  --paper: #f2efe9; --paper-dim: #aeb0b3;
  --gold: #ff8a1f; --gold-text: #ff9f45; --gold-ink: #1a1005;
  --accent: #ffc58a; --on-accent: #151719; --fav: #ff7aa2;
  --nav-a: #ffc58a; --nav-b: #ff8a1f;
  --shadow: 0 14px 30px -20px rgb(0 0 0 / 0.75); --glow-strength: 0.55;
  color-scheme: dark;
}
[data-palette="penguin"][data-theme="light"] {
  --ink: #f6f5f2; --ink-2: #ffffff; --ink-3: #dcdad5;
  --paper: #1d1f22; --paper-dim: #55585d;
  --gold: #ff8a1f; --gold-text: #a84d00; --gold-ink: #1a1005;
  --accent: #b55200; --on-accent: #ffffff; --fav: #c92a5f;
  --nav-a: #55585d; --nav-b: #ff8a1f;
  --shadow: 0 14px 30px -20px rgb(29 31 34 / 0.45); --glow-strength: 0.35;
  color-scheme: light;
}
:root {
  --display: "Sofia Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "Sofia Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --read: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif; /* long reading only */
  --gutter: 16px;
  --max: 1180px;
  --r-card: 14px;
  --r-btn: 10px;
}
@media (min-width: 900px) { :root { --gutter: 24px; } }
@media (min-width: 1400px) { :root { --max: 1320px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--ink);
  color: var(--paper);
  font: 17px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 0.8em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 56px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  background: var(--gold); color: var(--gold-ink); padding: 10px 16px; border-radius: var(--r-btn); font-weight: 700;
}
.skip:focus { left: 12px; }

/* The author's sites, the same bar on top of each (sisters.go): on a phone the
   names only, spread across; on a wide screen what each one is. */
.sisters {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  background: var(--ink-2); border-bottom: 1px solid var(--ink-3); font: 13px/1 var(--text);
}
.sisters::-webkit-scrollbar { display: none; }
.sisters a {
  flex: none; display: inline-flex; align-items: baseline; gap: 6px; padding: 9px 8px 7px;
  border-bottom: 2px solid transparent; color: var(--paper-dim); text-decoration: none; white-space: nowrap;
}
.sisters a:hover { color: var(--paper); }
.sisters a[aria-current] { color: var(--paper); border-bottom-color: var(--gold); }
.sisters b { font-weight: 750; }
.sister-sub { display: none; font-weight: 400; }
@media (max-width: 899px) { /* the six names fit a 320px phone (measured, November 2026) */
  .sisters { justify-content: space-between; gap: 0; padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); font-size: 12.5px; }
  .sisters a { padding-inline: 4px; }
}
@media (max-width: 439px) { .sisters { font-size: 11px; padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(4px, env(safe-area-inset-right)); } .sisters a { padding-inline: 2.5px; } }
@media (max-width: 359px) { .sisters { font-size: 10px; } }
@media (min-width: 900px) { .sisters { justify-content: center; gap: 12px; } }
@media (min-width: 1440px) { .sister-sub { display: inline; } } /* six with what each is: 1330px wide */
.js .nojs { display: none; }

/* ---------- buttons, chips, tags ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--ink-3); border-radius: var(--r-btn);
  background: var(--ink-2); color: var(--paper);
  font: 650 16px/1.1 var(--text); text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--paper-dim); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { border-color: var(--accent); filter: brightness(1.08); }
.btn-accent { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-size: 17px; }
.btn-accent:hover { border-color: var(--gold); filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: color-mix(in srgb, var(--paper) 30%, transparent); }
.btn-ghost:hover { border-color: var(--paper); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-google { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-google .g { width: 18px; height: 18px; }
.btn-danger { color: var(--gold-text); }
.btn-danger.is-armed { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }

.chips {
  display: flex; gap: 8px; margin: 0; padding: 2px; padding-right: 32px; list-style: none;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; height: 40px; padding: 0 15px; white-space: nowrap;
  border: 1px solid var(--ink-3); border-radius: 999px; background: var(--ink-2);
  color: var(--paper); font-weight: 650; font-size: 15px; text-decoration: none;
}
.chip:hover { border-color: var(--paper-dim); text-decoration: none; }
.chip[aria-current] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
/* A chip's count: the books it would leave. None: shown, not a link. */
.chip .n { margin-left: 7px; font-size: 13px; font-weight: 700; color: var(--paper-dim); font-variant-numeric: tabular-nums; }
.chip.is-empty { opacity: 0.38; cursor: default; }
.chip.is-empty:hover { border-color: var(--ink-3); }
/* "Още филтри": the rarer filters, open when one of them is chosen. */
.f-more > summary { display: flex; align-items: baseline; gap: 10px; padding: 12px 0 10px; cursor: pointer; list-style: none; font: 800 19px/1 var(--display); color: var(--paper-dim); }
.f-more > summary::-webkit-details-marker { display: none; }
.f-more > summary::before { content: "+"; width: 18px; color: var(--gold-text); }
.f-more[open] > summary::before { content: "–"; }
.f-more > summary:hover { color: var(--paper); }
.f-more-hint { font: 600 14px/1.2 var(--text); color: var(--paper-dim); }
.sorts { display: flex; gap: 4px; margin-left: auto; font-size: 14px; font-weight: 650; }
.sorts a { padding: 6px 10px; border-radius: 999px; color: var(--paper-dim); text-decoration: none; }
.sorts a[aria-current] { background: var(--ink-2); color: var(--paper); }
.sorts a:hover { color: var(--paper); text-decoration: none; }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 750; line-height: 1.6; white-space: nowrap;
}
.tag-soon, .tag-new { background: var(--gold); color: var(--gold-ink); }
.tag-plain { border: 1px solid color-mix(in srgb, var(--paper) 30%, transparent); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--ink) 90%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ink-3);
}
.top-in {
  max-width: var(--max); margin: 0 auto; padding: 10px var(--gutter);
  display: flex; align-items: center; gap: 10px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--paper); text-decoration: none; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .bm-1 { fill: var(--paper-dim); }
.brand-mark .bm-2 { fill: var(--gold); }
.brand-mark .bm-3 { fill: var(--paper); }
.brand-name { font: 900 27px/1 var(--display); letter-spacing: 0.002em; }
.brand-lang { font-weight: 500; color: var(--paper-dim); }
.nav { display: none; }
.top-icons { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ibtn {
  position: relative; width: 40px; height: 40px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--ink-3); background: var(--ink-2); color: var(--paper);
  text-decoration: none; cursor: pointer;
}
.ibtn:hover, .ibtn[aria-current] { border-color: var(--paper-dim); }
.ibtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ibtn .heart { width: 19px; height: 19px; }

.favs-link[aria-current] { color: var(--fav); }
/* How many are saved and followed (app.js), on the heart as on tazivecher.bg. */
.fav-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--fav); color: var(--on-accent); font-size: 11.5px; font-weight: 800; line-height: 18px; text-align: center;
}
.favs-link .fav-count { position: absolute; top: -6px; right: -7px; }
.tab-me { position: relative; }
.tab-me .fav-count { position: absolute; top: 4px; left: calc(50% + 6px); }
.back svg { stroke-width: 2.4; }

@media (min-width: 900px) {
  .top-in { padding-block: 12px; gap: 14px; }
  /* The menu: one pill group, all four alike; the current one filled,
     as the tiles/rows switch. */
  .nav { display: flex; flex: 1 1 auto; justify-content: center; min-width: 0; }
  .nav-g {
    display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px;
    background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--ink-3);
  }
  .nav a {
    padding: 7px 14px; border-radius: 999px; white-space: nowrap;
    color: var(--paper-dim); font-weight: 650; font-size: 16px; text-decoration: none;
  }
  .nav a:hover { color: var(--paper); background: color-mix(in srgb, var(--paper) 7%, transparent); }
  .nav a[aria-current] { color: var(--ink); background: var(--paper); }
  .top-icons { margin-left: 0; }
  .reload { display: none; }
}
@media (min-width: 900px) and (max-width: 1120px) { .brand-lang { display: none; } }
@media (max-width: 899px) {
  .top-icons .favs-link { display: none; } /* in the tab bar; the search stays up here */
  .brand-name { font-size: 25px; }
}
@media (max-width: 420px) { .brand-lang { display: none; } }
@media (max-width: 899px) and (display-mode: standalone) { .reload { display: grid; } }
@media (max-width: 899px) and (not (display-mode: standalone)) { .reload { display: none; } }
.reload.spin svg { animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- the tab bar (phones) ---------- */
.tabbar { display: none; }
@media (max-width: 899px) {
  :root { --tabbar-h: 62px; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
    padding: 4px max(4px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--ink) 92%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--ink-3);
  }
  .tabbar a {
    position: relative; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 54px; border-radius: 12px; color: var(--paper-dim); text-decoration: none;
    font-size: 11.5px; font-weight: 750; line-height: 1.1; text-align: center;
  }
  .tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .icon, .tabbar .heart { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current] { color: var(--paper); }
  .tabbar a[aria-current] .icon, .tabbar a[aria-current] .heart { color: var(--gold-text); }
  .toast { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); }
}

/* ---------- page heads ---------- */
.page-head { padding: 26px 0 6px; }
.page-head h1 { font: 900 clamp(48px, 8vw, 88px)/0.88 var(--display); letter-spacing: -0.01em; text-wrap: balance; overflow-wrap: anywhere; }
.lead { max-width: 62ch; margin: 14px 0 0; font-size: 18px; line-height: 1.45; color: var(--paper-dim); }
.crumb { margin: 0 0 8px; font-size: 15px; font-weight: 650; color: var(--paper-dim); }
.crumb a { color: inherit; }

.home-h { font: 900 clamp(54px, 7vw, 92px)/0.88 var(--display); letter-spacing: -0.012em; }
.home-h .hh-1, .home-h .hh-2 { white-space: nowrap; }
.home-h .hh-2 { font-weight: 500; color: var(--paper-dim); }
.tally { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 26px; margin: 18px 0 0; }
.tally a { color: var(--paper-dim); text-decoration: none; font-size: 15px; font-weight: 600; line-height: 1.2; }
.tally b { display: block; font: 900 40px/0.95 var(--display); color: var(--paper); }
.tally a:hover b { color: var(--gold-text); }
.i-rss { width: 14px; height: 14px; fill: currentColor; }
@media (max-width: 599px) { .home-h .hh-2 { display: block; } }

/* ---------- search and filters ---------- */
.f-search { display: flex; gap: 8px; min-width: 0; margin: 20px 0 0; max-width: 100%; }
.f-search input, .searchbar input {
  flex: 1; width: 0; min-width: 0; height: 50px; padding: 0 16px;
  border: 1.5px solid var(--ink-3); border-radius: 12px; background: var(--ink-2); color: var(--paper);
  font: 17px var(--text);
}
.f-search input:focus-visible, .searchbar input:focus-visible { outline-offset: 0; border-color: var(--accent); }
.f-search .btn, .searchbar .btn { min-height: 50px; padding: 0 20px; }
.searchbar {
  position: sticky; top: var(--header-h, 65px); z-index: 25;
  display: flex; gap: 8px; max-width: var(--max); margin: 0 auto; padding: 10px var(--gutter) 12px;
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}

.f-panel { display: grid; gap: 8px; margin: 14px 0 0; }
.f-group { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 8px; }
/* Phones: the panel folds behind "Филтри" (list.js), the chosen count on it. */
.f-toggle { display: none; }
@media (max-width: 899px) {
  .js .f-toggle {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 48px; padding: 0 16px; cursor: pointer;
    border: 1px solid var(--ink-3); border-radius: 14px; background: var(--ink-2); color: var(--paper);
    font: 800 19px/1 var(--display);
  }
  .f-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
  .f-toggle b { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--gold); color: var(--gold-ink); font: 900 15px/1 var(--display); }
  .f-toggle-n { margin-left: auto; font: 650 14px/1 var(--text); color: var(--paper-dim); }
  .js .f-panel:not(.is-open) > :not(.f-toggle) { display: none; }
  .f-panel.is-open .f-toggle { border-color: var(--gold); }
  .summary-row { flex-wrap: wrap; }
  .sorts { order: 3; width: 100%; margin: 0 -10px; }
}
.f-label { font: 800 19px/1 var(--display); color: var(--paper-dim); }
@media (min-width: 900px) {
  .f-panel { gap: 0; padding: 4px 20px; border: 1px solid var(--ink-3); border-radius: 16px; background: var(--ink-2); }
  .f-group { grid-template-columns: 96px minmax(0, 1fr); gap: 18px; padding: 10px 0; }
  .f-group + .f-group, .f-group + .f-more, .f-more .f-group { border-top: 1px solid var(--ink-3); }
  .f-label { font-size: 21px; }
  .f-more > summary { font-size: 21px; padding: 14px 0; }
  .f-group .chips { flex-wrap: wrap; overflow: visible; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .f-panel .chip:not([aria-current]) { background: var(--ink); }
}

.summary-row { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; }
.summary { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--paper-dim); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary b { color: var(--paper); }
.viewswitch {
  flex: none; display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--ink-3); border-radius: 999px; background: var(--ink-2);
}
.vs {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 13px; border: 0;
  border-radius: 999px; background: transparent; color: var(--paper-dim); font-weight: 650; font-size: 14.5px; cursor: pointer;
}
.vs:hover { color: var(--paper); }
.vs[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.vs .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 380px) { .vs span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* ---------- day (or month) groups ---------- */
.group { margin-top: 18px; }
.day-head {
  position: sticky; top: var(--header-h, 65px); z-index: 20;
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 calc(-1 * var(--gutter)); padding: 12px var(--gutter) 10px;
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.day-rel {
  font: 900 36px/1 var(--display); padding: 0 2px;
  background: linear-gradient(transparent 86%, var(--gold) 86%);
}
[data-theme="light"] .day-rel { background: linear-gradient(transparent 58%, var(--gold) 58%, var(--gold) 92%, transparent 92%); }
.day-date { font-size: 17px; font-weight: 600; color: var(--paper-dim); }
.day-count { margin-left: auto; font-size: 13.5px; font-weight: 650; color: var(--paper-dim); white-space: nowrap; }
@media (min-width: 900px) { .day-rel { font-size: 46px; } }

/* ---------- cards: the grid of covers ---------- */
.grid {
  list-style: none; margin: 4px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px;
}
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 16px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.card { position: relative; isolation: isolate; min-width: 0; display: flex; flex-direction: column; }
.card-game { display: flex; flex-direction: column; gap: 6px; color: var(--paper); text-decoration: none; border-radius: var(--r-card); }
.card-game:hover { text-decoration: none; }
.cover {
  position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; isolation: isolate;
  container-type: inline-size;
  border-radius: var(--r-card); background: var(--c, var(--ink-3));
  box-shadow: var(--shadow);
}
.card .cover { border-bottom: 4px solid var(--v, var(--gold)); border-radius: var(--r-card) var(--r-card) 6px 6px; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.card-game:hover .cover img { transform: scale(1.035); }
/* Coverless: a typographic tile in a colour from the ISBN. */
.cover.is-bill {
  background: hsl(var(--h, 230) 30% 17%);
  background-image: radial-gradient(120% 70% at 50% 0%, hsl(var(--h, 230) 70% 60% / 0.28), transparent 70%);
}
[data-theme="light"] .cover.is-bill {
  background: hsl(var(--h, 230) 45% 90%);
  background-image: radial-gradient(120% 70% at 50% 0%, hsl(var(--h, 230) 70% 60% / 0.25), transparent 70%);
}
.nocover {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: 46px 11cqi 13cqi; color: hsl(var(--h, 230) 25% 93%);
}
[data-theme="light"] .nocover { color: hsl(var(--h, 230) 40% 14%); }
.bill-kind {
  font: 750 max(10px, 5cqi)/1.1 var(--text); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75;
  padding-bottom: 3cqi; border-bottom: 2px solid currentColor;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nocover .t {
  margin: auto 0; padding: 4cqi 0;
  font: 900 13.5cqi/0.92 var(--display); text-transform: uppercase; overflow-wrap: anywhere; hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden;
}
.nocover .a {
  font: 700 max(11px, 5.6cqi)/1.2 var(--text); opacity: 0.8;
  padding-top: 3cqi; border-top: 2px solid currentColor;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* The cover's marks. */
.badge {
  position: absolute; z-index: 3; left: 8px; top: 8px; padding: 5px 9px 4px; border-radius: 9px;
  background: var(--ink); color: var(--paper); font: 850 18px/1 var(--display);
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.35);
}
.badge-soon, .badge-new { background: var(--gold); color: var(--gold-ink); }
/* „Сега и за Switch 2“: longer than a date, it must leave the score its corner. */
.badge-port { max-width: calc(100% - 64px); font-size: 14px; line-height: 1.15; }
.price-chip {
  position: absolute; z-index: 3; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font: 750 13.5px/1.5 var(--text); font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.35);
}
/* The platforms, each in its maker's colour (model.Platforms). */
.plats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; min-width: 0; }
.plat {
  display: inline-block; padding: 2px 7px; border-radius: 6px; background: var(--p, var(--ink-3)); color: #fff;
  font: 750 12px/1.45 var(--text); white-space: nowrap; letter-spacing: 0.01em;
}
.card .plat + .plat { margin-left: 0; }
.card h3 {
  font: 800 21px/1.04 var(--display); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-game:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.card .author {
  margin: 3px 0 0; font-size: 14px; line-height: 1.3; color: var(--paper-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .author a, .game .authors a, .game-head a:not(.btn), .facts a { color: inherit; text-decoration: none; }
.card .author a:hover, .game .authors a:hover, .facts a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.row-price { display: none; }
@media (min-width: 600px) { .card h3 { font-size: 23px; } .card .author { font-size: 14.5px; } }

/* The heart, top right of a cover. */
.fav {
  position: absolute; top: 8px; right: 8px; z-index: 4;
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--paper); transition: transform 150ms;
}
.fav:hover { transform: scale(1.08); }
.heart { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.fav[aria-pressed="true"], .save[aria-pressed="true"] { color: var(--fav); }
.fav[aria-pressed="true"] .heart, .save[aria-pressed="true"] .heart { fill: currentColor; }

/* ---------- the list view: compact rows (data-view="list") ---------- */
[data-view="list"] .games .grid { display: block; margin: 0; }
[data-view="list"] .games .card {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto;
  column-gap: 14px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--ink-3);
}
[data-view="list"] .games .card-game { display: contents; }
[data-view="list"] .games .cover { grid-column: 1; grid-row: 1 / span 4; width: 62px; border-radius: 6px; border-bottom-width: 3px; box-shadow: none; }
[data-view="list"] .games .plats { grid-column: 2; grid-row: 1; margin: 0; }
[data-view="list"] .games .card h3 { grid-column: 2; grid-row: 2; font-size: 21px; -webkit-line-clamp: 2; margin-top: 2px; }
[data-view="list"] .games .card .author { grid-column: 2; grid-row: 3; margin-top: 2px; }
[data-view="list"] .games .row-price { display: block; grid-column: 3; grid-row: 1 / span 2; margin: 0; font: 800 20px/1 var(--display); color: var(--gold-text); white-space: nowrap; }
[data-view="list"] .games .price-chip, [data-view="list"] .games .nocover .bill-kind, [data-view="list"] .games .nocover .a { display: none; }
[data-view="list"] .games .badge { left: 3px; top: 3px; padding: 2px 4px; font-size: 11px; border-radius: 5px; }
[data-view="list"] .games .nocover { padding: 6px; }
[data-view="list"] .games .nocover .t { font-size: 15cqi; -webkit-line-clamp: 5; }
[data-view="list"] .games .fav { position: static; grid-column: 3; grid-row: 3; justify-self: end; width: 36px; height: 36px; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (min-width: 900px) {
  [data-view="list"] .games .card { grid-template-columns: 76px minmax(0, 1fr) auto; }
  [data-view="list"] .games .cover { width: 76px; }
  [data-view="list"] .games .card h3 { font-size: 25px; }
}

/* ---------- pager ---------- */
.pager {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  margin: 44px 0 0; padding-top: 22px; border-top: 1px solid var(--ink-3);
}
.pager a, .pager .pg-arrow, .pager .pg-of {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; height: 44px; padding: 0 16px; border-radius: var(--r-btn);
  border: 1.5px solid var(--ink-3); background: var(--ink-2); text-decoration: none; color: var(--paper);
  font: 800 20px/1 var(--display); font-variant-numeric: tabular-nums;
}
.pager a:hover { border-color: var(--paper-dim); }
.pager .pg-arrow { font: 650 16px/1 var(--text); }
.pager .pg-arrow.off { opacity: 0.35; }
.pager .pg-nums { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pager .pg-n { padding: 0 12px; }
.pager .pg-n[aria-current] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.pager .pg-gap { min-width: 20px; text-align: center; color: var(--paper-dim); }
.pager .pg-of { display: none; background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.pager .pg-arrow:first-child { margin-right: auto; }
.pager .pg-arrow:last-child { margin-left: auto; }
@media (max-width: 760px) {
  .pager { flex-wrap: nowrap; }
  .pager .pg-nums { display: none; }
  .pager .pg-of { display: inline-flex; }
}

.empty { margin: 28px 0; padding: 22px; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--ink-3); color: var(--paper-dim); max-width: 760px; }
.empty p { margin: 0 0 10px; }
.empty p:first-child { font: 800 26px/1.1 var(--display); color: var(--paper); }
.empty p:last-child { margin-bottom: 0; }

/* ---------- a book: the page takes its colours from the cover ---------- */
html[data-palette][data-theme="dark"] body.tinted, html[data-palette][data-theme="dark"] .vw-panel.tinted {
  --ink: var(--d-bg); --ink-2: color-mix(in srgb, var(--d-bg) 86%, #fff); --ink-3: color-mix(in srgb, var(--d-bg) 72%, #fff);
  --paper: var(--d-fg); --paper-dim: var(--d-muted); --accent: var(--d-accent); --on-accent: var(--d-bg); --halo: var(--d-halo);
}
html[data-palette][data-theme="light"] body.tinted, html[data-palette][data-theme="light"] .vw-panel.tinted {
  --ink: var(--l-bg); --ink-2: color-mix(in srgb, var(--l-bg) 70%, #fff); --ink-3: color-mix(in srgb, var(--l-bg) 86%, #000);
  --paper: var(--l-fg); --paper-dim: var(--l-muted); --accent: var(--l-accent); --on-accent: var(--l-bg); --halo: var(--l-halo);
}
.hero {
  position: relative; margin: 0 calc(-1 * var(--gutter)); padding: 24px var(--gutter) 34px;
  background: radial-gradient(70% 90% at 15% 10%, var(--halo, color-mix(in srgb, var(--c) 30%, transparent)), transparent 70%);
}
.hero-in { display: grid; gap: 22px; }
.game-cover .cover { width: min(64vw, 300px); border-radius: 12px; }
.game-cover .cover img { border-radius: inherit; }
.hero-title {
  font: 900 clamp(46px, 8.5vw, 96px)/0.9 var(--display); letter-spacing: -0.008em;
  text-wrap: balance; overflow-wrap: anywhere; margin: 0 0 10px;
}
.subtitle { font: italic 600 20px/1.3 var(--text); color: var(--paper-dim); margin: -2px 0 10px; }
.game .authors { font: 800 28px/1.1 var(--display); margin: 0 0 14px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
/* Every page's buttons, one row in one order (README): the shop, Запази or Следвай, Сподели,
   Абонирай се. The same size, all but the shop's ghost; tazivecher.bg has the same row. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actions:not(:has(> :not([hidden]))) { display: none; }
.page-head .actions, .search-form + .actions { margin-top: 18px; }
.actions .btn { min-height: 46px; }
.actions .btn-accent { font-weight: 750; }
.actions .save[aria-pressed="true"] { border-color: currentColor; }
.i-share { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-down { width: 16px; height: 16px; margin-right: -4px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sub-menu { position: relative; display: inline-flex; }
.sub-menu > summary { list-style: none; }
.sub-menu > summary::-webkit-details-marker { display: none; }
.sub-menu[open] > summary .i-down { transform: rotate(180deg); }
.sub-list {
  position: absolute; z-index: 30; left: 0; top: calc(100% + 6px); min-width: 230px; display: grid; padding: 6px;
  border: 1px solid var(--ink-3); border-radius: 12px; background: var(--ink-2); box-shadow: 0 18px 40px -12px rgb(0 0 0 / 0.5);
}
.sub-list a {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 8px;
  color: var(--paper); font-weight: 700; text-decoration: none;
}
.sub-list a:hover { background: var(--ink-3); }
.sub-list a + a { border-top: 1px solid var(--ink-3); }
.sub-list small { display: block; font-weight: 500; font-size: 13px; color: var(--paper-dim); }
.sub-list svg { width: 18px; height: 18px; flex: none; }
@media (min-width: 900px) {
  .hero { padding: 40px var(--gutter) 44px; }
  .hero-in { grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: start; }
  .game-cover .cover { width: 300px; }
}

.game-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; padding: 30px 0 20px; }
.game-body > * { min-width: 0; }
@media (min-width: 900px) { .game-body { grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; } }
.desc { max-width: 66ch; font: 19px/1.65 var(--read); }
.desc p { margin: 0 0 1em; }
.desc p:first-child { font-size: 21px; line-height: 1.55; }
.desc-empty { color: var(--paper-dim); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 24px; margin: 28px 0 0; max-width: 760px; }
.facts dt { font-size: 14px; font-weight: 750; color: var(--paper-dim); }
.facts dd { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.35; }
.num { font-variant-numeric: tabular-nums; }
.seen { margin-top: 20px; color: var(--paper-dim); font-size: 14px; }

.side-box { padding: 18px; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--ink-3); margin-bottom: 16px; }
.side-box h2 { font: 850 28px/1.02 var(--display); margin-bottom: 10px; }
/* The offers, a table for each platform: shop and edition, box or
   download, availability, price. */
.offer-plat { margin: 14px 0 4px; font-size: 14px; }
.offer-plat:first-of-type { margin-top: 0; }
.offers { width: 100%; border-collapse: collapse; }
.offers th, .offers td { padding: 9px 0; border-bottom: 1px solid var(--ink-3); text-align: left; vertical-align: baseline; font-weight: 500; }
.offers tr:last-child > * { border-bottom: 0; }
.offers td { padding-left: 10px; font-size: 13px; color: var(--paper-dim); }
.offers a { font-weight: 750; color: var(--paper); }
.offers .ed { display: block; font-size: 12.5px; font-weight: 500; color: var(--paper-dim); }
.offers .st-available { color: #34c759; }
.offers .st-out_of_stock { text-decoration: line-through; }
.offers .price { font: 850 20px/1 var(--display); color: var(--gold-text); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.offers s { display: block; font-size: 14px; color: var(--paper-dim); font-weight: 600; }
.mini { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
.mini a { display: grid; gap: 6px; color: var(--paper); text-decoration: none; }
.mini .cover { border-radius: 8px; }
.mini .nocover { padding: 8px; }
.mini .nocover .t { font-size: 15cqi; }
.mini-t { font: 800 16px/1.05 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini a:hover .mini-t { text-decoration: underline; }

/* ---------- index pages: authors, publishers ---------- */
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 22px; }
.letters a {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--ink-3); background: var(--ink-2);
  font: 800 19px/1 var(--display); color: var(--paper); text-decoration: none;
}
.letters a:hover { border-color: var(--paper-dim); }
.letters a[aria-current] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.letters a:first-child { font: 750 15px/1 var(--text); }
.letters-gap { width: 12px; flex: none; }
@media (max-width: 760px) {
  .letters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .letters a { flex: none; }
}
.index { list-style: none; padding: 0; margin: 0; columns: 300px 4; column-gap: 32px; }
.index li { break-inside: avoid; display: flex; align-items: baseline; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--ink-3); }
.index a { min-width: 0; color: var(--paper); text-decoration: none; }
.index strong { font: 800 22px/1.05 var(--display); }
.index a:hover strong { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.index .n { margin-left: auto; font-size: 14px; color: var(--paper-dim); white-space: nowrap; }
.index .n b { color: var(--gold-text); font: 900 21px/1 var(--display); }
.index .total { font-size: 13.5px; color: var(--paper-dim); white-space: nowrap; }
.index .n:empty + .total { margin-left: auto; }
/* Follow from the index of authors or publishers, as from their pages. */
.index .index-fav { position: static; flex: none; align-self: center; width: 32px; height: 32px; margin: -4px 0; background: transparent; color: var(--paper-dim); }

/* ---------- sources, feeds, plain pages ---------- */
.sources, .feeds { list-style: none; padding: 0; margin: 0; max-width: 900px; }
.sources li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: baseline;
  padding: 14px 0 14px 16px; border-bottom: 1px solid var(--ink-3); border-left: 4px solid var(--c);
}
.sources strong { font: 800 22px/1.1 var(--display); }
.sources a { color: var(--paper); text-decoration: none; }
.sources .kind, .sources .when { color: var(--paper-dim); font-size: 14px; }
.sources .n { grid-row: 1 / span 2; grid-column: 2; text-align: right; color: var(--paper-dim); font-size: 14px; }
.sources .n b { display: block; font: 900 28px/1 var(--display); color: var(--paper); }
.sources em { color: var(--gold-text); font-style: normal; }
.feeds li { display: grid; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--ink-3); }
.feeds li span { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.feeds strong { font: 850 24px/1.05 var(--display); }
.feeds small { color: var(--paper-dim); font-size: 14px; }
.sub-h { font: 850 34px/1 var(--display); margin: 40px 0 8px; }
.feeds-note { color: var(--paper-dim); max-width: 64ch; margin: 0 0 4px; }
.prose { max-width: 66ch; font: 18px/1.65 var(--text); padding: 12px 0 24px; }
.prose h2 { font: 850 32px/1.05 var(--display); margin: 30px 0 10px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.notfound { padding-bottom: 48px; }
.notfound .code { font: 900 clamp(96px, 20vw, 180px)/0.85 var(--display); color: var(--gold-text); margin: 0 0 8px; }
.notfound .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- "Любими" ---------- */
.me-tabs {
  display: flex; gap: 2px; margin: 18px 0 22px; padding: 3px; border-radius: 999px;
  background: var(--ink-2); border: 1px solid var(--ink-3); width: fit-content; max-width: 100%;
  overflow-x: auto; scrollbar-width: none;
}
.me-tabs a { padding: 10px 18px; border-radius: 999px; white-space: nowrap; font-weight: 700; font-size: 15px; text-decoration: none; color: var(--paper-dim); }
.me-tabs a:hover { color: var(--paper); }
.me-tabs a[aria-current] { background: var(--paper); color: var(--ink); }
.me-tab-n { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--ink-3); color: var(--paper); font-size: 13px; }
.me-tabs a[aria-current] .me-tab-n { background: var(--gold); color: var(--gold-ink); }
@media (max-width: 480px) { .me-tabs a { padding: 9px 12px; font-size: 14px; } }
.me[aria-busy="true"], .saved[aria-busy="true"] { opacity: 0.55; }
.me-h { font: 850 30px/1 var(--display); margin: 0 0 6px; }
.me-h small { font: 650 16px var(--text); color: var(--paper-dim); margin-left: 6px; }
.me-chips { list-style: none; margin: 0; padding: 0; columns: 220px 2; column-gap: 28px; }
.me-chips li { break-inside: avoid; display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--ink-3); transition: opacity 150ms; }
.me-chips li a { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 800 20px/1.1 var(--display); color: var(--paper); text-decoration: none; }
.me-chips a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.me-chips b { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--gold); color: var(--gold-ink); font: 900 15px/1 var(--display); }
.unfollow { width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer; background: transparent; color: var(--paper-dim); font-size: 1.15rem; line-height: 1; transition: transform 150ms, color 150ms; }
.unfollow:hover { color: var(--paper); background: var(--ink-3); }
.unfollow[aria-pressed="false"] { transform: rotate(45deg); }
.me-only { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 0; }
.me-only a { display: inline-flex; align-items: center; height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--ink-3); background: var(--ink-2); text-decoration: none; font-weight: 650; font-size: 15px; color: var(--paper); }
.me-only a[aria-current] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.empty-saved { max-width: 60ch; padding: 20px 0; color: var(--paper-dim); }
.empty-saved .big { font: 850 30px/1.05 var(--display); color: var(--paper); }
.empty-saved .heart, .empty-saved .star { width: 17px; height: 17px; vertical-align: -3px; color: var(--fav); }
/* A followed thing's card (me_cards.go): its cover beside its name and
   next books, so it does not read as one more book tile. */
.me-cards { list-style: none; margin: 8px 0 18px; padding: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .me-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .me-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.me-card { display: flex; min-width: 0; overflow: hidden; border: 1px solid var(--ink-3); border-radius: var(--r-card); background: var(--ink-2); transition: opacity 150ms; }
.me-card:has(.unfollow[aria-pressed="false"]) { opacity: 0.45; }
.me-card-pic { flex: 0 0 104px; min-height: 156px; background: var(--ink-3); }
.me-card-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.me-card-pic.is-bill { background: hsl(var(--h, 230) 30% 17%); }
[data-theme="light"] .me-card-pic.is-bill { background: hsl(var(--h, 230) 45% 90%); }
.me-card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.me-card-head { position: relative; padding: 14px 44px 10px 16px; }
.me-card-kind { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--gold-text); }
.me-card-name { margin: 0; font: 850 24px/1 var(--display); overflow-wrap: anywhere; }
.me-card-name a { color: var(--paper); text-decoration: none; }
.me-card-name a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.me-card-head .unfollow { position: absolute; top: 10px; right: 10px; }
.me-card-games { list-style: none; margin: 0; padding: 0 16px; }
.me-card-games a { display: flex; flex-wrap: wrap; gap: 2px 8px; padding: 8px 0; border-top: 1px solid var(--ink-3); color: var(--paper); text-decoration: none; }
.me-card-when { flex-basis: 100%; font-size: 14px; font-weight: 650; color: var(--paper-dim); }
.me-card-title { font: 800 18px/1.1 var(--display); overflow-wrap: anywhere; }
.me-card-games a:hover .me-card-title { text-decoration: underline; text-decoration-color: var(--gold); }
.me-card-by { color: var(--paper-dim); font-size: 14px; }
.me-card-none { margin: 0; padding: 0 16px 14px; color: var(--paper-dim); }
.me-card-all { margin: auto 0 0; padding: 10px 16px 14px; font-weight: 700; }
.me-card-all a { white-space: nowrap; }
.saved-gone { color: var(--paper-dim); font-size: 14px; margin-top: 28px; }
.acct { max-width: 760px; margin: 0 0 18px; padding: 18px 20px; border-radius: 14px; background: var(--ink-2); border: 1px solid var(--ink-3); }
.acct p { margin: 0 0 12px; font-size: 15px; color: var(--paper-dim); }
.acct strong { color: var(--paper); }
.acct-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.save { cursor: pointer; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 16px); opacity: 0; visibility: hidden;
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--paper); color: var(--ink); font-weight: 700; font-size: 15px;
  box-shadow: var(--shadow);
  transition: opacity 0.18s, transform 0.18s, visibility 0s 0.18s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: opacity 0.18s, transform 0.18s; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--ink-3); margin-top: 24px; }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 26px var(--gutter) 34px; color: var(--paper-dim); font-size: 15px; }
.foot-in p { max-width: 70ch; }
.foot-brand { font: 900 30px/1 var(--display); color: var(--paper); }
.foot-brand span { font-weight: 500; color: var(--paper-dim); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 650; }
.foot-charts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.foot-charts span { flex-basis: 100%; }
.foot a { color: var(--paper); }

/* ---------- covers in motion (cover.js) ---------- */
@view-transition { navigation: auto; }
.game-cover .cover img, .game-cover .cover .nocover { view-transition-name: cover; }
::view-transition-group(cover) { animation-duration: 420ms; animation-timing-function: cubic-bezier(.2, .8, .2, 1); z-index: 2; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; }
.zoomable img { cursor: zoom-in; }
dialog.zoom {
  padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; display: none; place-items: center; cursor: zoom-out;
}
dialog.zoom[open] { display: grid; }
dialog.zoom::backdrop { background: rgb(10 9 22 / 0.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog.zoom img { height: 92vh; width: auto; max-width: 94vw; object-fit: contain; border-radius: 8px; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .8); }

/* ---------- pull to refresh (refresh.js) ---------- */
.ptr {
  position: fixed; left: 50%; top: calc(var(--header-h, 65px) + 8px); z-index: 35;
  width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow);
  transform: translateY(calc(var(--pull, 0) * 1px - 60px)) rotate(calc(var(--pull, 0) * 3deg));
  opacity: calc(var(--pull, 0) / 80); pointer-events: none;
}
.ptr svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ptr.ready { background: var(--gold); color: var(--gold-ink); }
.ptr.go svg { animation: spin 700ms linear infinite; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .toast, .toast.is-on, .fav, .cover img { transition: none; }
  .card-game:hover .cover img { transform: none; }
}
@media (max-width: 380px) { .tabbar a { font-size: 10.5px; } }

/* ---- the analytics consent banner (analytics.js) ---- */
.consent {
  position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 12px; max-width: 560px;
  padding: 16px 18px; border-radius: 14px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 18px 40px -16px rgb(0 0 0 / 0.55);
}
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; font-size: 0.95rem; line-height: 1.45; }
.consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.consent .btn:not(.btn-primary) { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.consent .btn-primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
@media (max-width: 760px) {
  .consent { bottom: calc(var(--tabbar-h, 0px) + env(safe-area-inset-bottom) + 10px); }
}
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- the RSS control (templates/rss.html, rss.js) ---------- */
/* One look everywhere: a gold pill with the RSS mark; it opens the sheet
   (or, without JavaScript, the feed itself). */
.btn-rss { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 750; }
.btn-rss:hover { border-color: var(--gold); filter: brightness(1.06); text-decoration: none; }
.btn-rss .i-rss { width: 15px; height: 15px; }
.btn-rss.is-done { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.i-copy { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

/* The address, a copy button and a link to it: in place (/feeds, "Любими")
   and in the sheet. */
.rss-box { display: grid; gap: 10px; max-width: 760px; }
.rss-url {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 10px;
  background: var(--ink); border: 1px solid var(--ink-3); color: var(--gold-text);
  font: 600 15px/1 var(--text); text-overflow: ellipsis;
}
.rss-url:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.rss-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.rss-acts .btn { min-height: 44px; }
html:not(.js) [data-rss-copy] { display: none; }
.feeds .rss-box { margin-top: 4px; }

/* The sheet: centred on wide screens, a bottom sheet on phones. */
dialog.rss-sheet {
  width: min(560px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--ink-3); border-radius: 18px;
  background: var(--ink-2); color: var(--paper); box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.6);
}
dialog.rss-sheet::backdrop { background: rgb(8 8 16 / 0.6); backdrop-filter: blur(3px); }
.rss-sheet-in { position: relative; padding: 22px 22px 18px; display: grid; gap: 12px; }
.rss-sheet h2 { margin: 0; padding-right: 40px; font: 900 32px/1 var(--display); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.rss-kicker { margin: 0; color: var(--gold-text); font-size: 13px; font-weight: 750; letter-spacing: 0.04em; }
.rss-help { margin: 2px 0 0; color: var(--paper-dim); font-size: 14px; }
.rss-help a { color: var(--paper); }
.rss-x {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--ink-3); background: transparent; color: var(--paper); font-size: 22px; line-height: 1; cursor: pointer;
}
.rss-x:hover { border-color: var(--paper-dim); }
@media (max-width: 640px) {
  dialog.rss-sheet {
    width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .rss-acts .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
  dialog.rss-sheet[open] { animation: rss-in 180ms ease-out; }
  @keyframes rss-in { from { opacity: 0; transform: translateY(16px); } }
}

.i-cal { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---- the colours sheet (theme.js) ---- */
.theme .pal-ico { fill: none; stroke: currentColor; stroke-width: 1.7; }
.theme .pal-ico circle { fill: currentColor; stroke: none; }
.pals { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
/* A row: the name and its note, then the buttons; the same place on every
   row (a wrapping flex row put them on the right of a short note and under
   a long one): beside on wide screens, the note wrapping, under on phones. */
.pal { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 14px;
  padding: 12px 0; border-top: 1px solid var(--ink-3); }
@media (max-width: 519px) { .pal { grid-template-columns: minmax(0, 1fr); } }
.pal-name { display: grid; min-width: 0; }
.pal-name b { font: 800 22px/1.1 var(--display); }
.pal-name small { color: var(--paper-dim); font-size: 14px; }
.pal-modes { display: flex; gap: 8px; }
.pal-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-btn);
  border: 1px solid var(--ink-3); background: transparent; color: var(--paper); font: 650 15px var(--text); cursor: pointer;
}
.pal-btn:hover { border-color: var(--paper-dim); }
.pal-btn[aria-pressed="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
/* The house theme's swatch carries data-palette and data-theme itself
   (theme.js), so the tokens above apply to it: its page colour and its
   marker; the other themes' have their page colour inline. */
.sw { --sw-mark: var(--gold); width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--ink) 50%, var(--sw-mark) 50%); }
.sw[data-theme="light"] { box-shadow: inset 0 0 0 1px var(--ink-3); }

/* ---------- genres (internal/genres, templates/genres.html) ----------
   An icon each, and a colour; an undefined --g-* falls back to the text
   colour. */
[data-palette="penguin"] {
  --g-adventure: #f5c26b; --g-action: #ff8a7a; --g-mmo: #67e8f9; --g-rpg: #7cb6ff; --g-fighting: #ff9ec7;
  --g-shooter: #ff5c8a; --g-horror: #f0abfc; --g-open-world: #8fe39a;
  --g-family: #7dd3fc; --g-platformer: #ffd84d; --g-strategy: #f4a261;
  --g-puzzle: #bef264; --g-simulation: #5eead4;
  --g-racing: #fdba74; --g-sports: #86efac; --g-indie: #f9a8d4;
}
[data-palette="penguin"][data-theme="light"] {
  --g-adventure: #8a5a00; --g-action: #b42318; --g-mmo: #0e7490; --g-rpg: #1f5fb3; --g-fighting: #b0306a;
  --g-shooter: #c0134f; --g-horror: #8e2c9e; --g-open-world: #1f7a32;
  --g-family: #0b6e99; --g-platformer: #7a5e00; --g-strategy: #a04a00;
  --g-puzzle: #4d7c0f; --g-simulation: #0f766e;
  --g-racing: #b45309; --g-sports: #15803d; --g-indie: #a3166b;
}
.g-adventure { --g: var(--g-adventure); } .g-action { --g: var(--g-action); } .g-mmo { --g: var(--g-mmo); } .g-rpg { --g: var(--g-rpg); }
.g-fighting { --g: var(--g-fighting); } .g-shooter { --g: var(--g-shooter); }
.g-horror { --g: var(--g-horror); } .g-open-world { --g: var(--g-open-world); } .g-family { --g: var(--g-family); }
.g-platformer { --g: var(--g-platformer); } .g-strategy { --g: var(--g-strategy); }
.g-puzzle { --g: var(--g-puzzle); } .g-simulation { --g: var(--g-simulation); }
.g-racing { --g: var(--g-racing); } .g-sports { --g: var(--g-sports); } .g-indie { --g: var(--g-indie); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.gi { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gl { display: inline-flex; align-items: center; gap: 5px; color: var(--g, var(--paper)); font-weight: 750; white-space: nowrap; }
.gl .gi { position: relative; top: -0.05em; }

/* On a card: the first genre over the publisher. */
.card-genre { display: flex; margin-top: 6px; min-width: 0; font-size: 13px; line-height: 1.2; }
.card-genre .gl { overflow: hidden; text-overflow: ellipsis; }
[data-view="list"] .games .card-genre { grid-column: 2; grid-row: 1; margin: 0 0 2px; font-size: 12.5px; }
[data-view="list"] .games .card-genre ~ h3 { grid-row: 3; }
[data-view="list"] .games .card:has(.card-genre) .author { grid-row: 4; }

/* In the filter: the icon in the genre's colour (on the chosen chip, the chip's ink). */
.chip-g { gap: 7px; }
.chip-g .gi { color: var(--g, var(--paper-dim)); width: 17px; height: 17px; }
.chip-g[aria-current] .gi { color: currentColor; }

/* On the book page: each genre a link to its page. */
.facts .genres { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.facts .genres a:hover .gl { text-decoration: underline; }
[data-view="list"] .games .card:has(.card-genre) .cover { grid-row: 1 / span 5; }

/* Following genres: every genre a toggle chip (Любими → Жанрове). */
.chips-wrap { flex-wrap: wrap; overflow: visible; padding-right: 2px; -webkit-mask-image: none; mask-image: none; margin: 14px 0 18px; }
.chip-follow { cursor: pointer; font: inherit; font-weight: 650; font-size: 15px; }
.chip-follow[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.chip-follow[aria-pressed="true"] .gi { color: currentColor; }
.me-more { margin: 4px 0 18px; }
.me-more summary { cursor: pointer; color: var(--paper-dim); font-weight: 700; }
.me-chips .gl { font-size: inherit; }
.tag-genre { display: inline-flex; align-items: center; gap: 5px; border: 1px solid color-mix(in srgb, var(--g, var(--paper)) 45%, transparent); color: var(--g, var(--paper)); text-decoration: none; }
.tag-genre:hover { border-color: var(--g, var(--paper)); text-decoration: none; }
.facts .genres { flex-direction: column; align-items: flex-start; min-width: 0; }
.facts .genres .gl { white-space: normal; align-items: flex-start; }
.facts .genres .gl .gi { top: 0.15em; }
.side-box .used { margin: 0; }

/* The genre row, where chips wrap: "Всички" and the first ten genres, the
   chosen one, and "Още жанрове" (list.js) for the rest. */
.chip-more { display: none; }
@media (min-width: 900px) {
  .js :is(.chips-genre, .chips-pub):not(.is-open) > li:nth-child(n+12):not(.chip-more):not(:has([aria-current])) { display: none; }
  .js :is(.chips-genre, .chips-pub):not(.is-open) > .chip-more { display: list-item; }
  .chip-more .chip { cursor: pointer; font: inherit; font-weight: 650; font-size: 15px; color: var(--paper-dim); border-style: dashed; }
}

.follow-mini {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 2px 9px; vertical-align: 0.15em;
  border: 1px solid var(--ink-3); border-radius: 999px; background: transparent; color: var(--paper-dim);
  font: 700 12.5px/1.5 var(--text); cursor: pointer;
}
.follow-mini[hidden] { display: none; }
.follow-mini:hover { color: var(--paper); border-color: var(--paper-dim); }
.follow-mini .heart { width: 13px; height: 13px; }
.follow-mini[aria-pressed="true"] { color: var(--fav); }
.follow-mini[aria-pressed="true"] .heart { fill: currentColor; }
.side-more { margin: 10px 0 0; font-weight: 700; font-size: 14.5px; }
.foot-sites { color: var(--paper-dim); }
.pal-auto { display: flex; align-items: center; gap: 10px; padding: 14px 0 4px; font-weight: 600; cursor: pointer; }
.pal-auto input { width: 20px; height: 20px; accent-color: var(--gold); }

/* An audiobook's square cover: whole, on the cover's colour. */
.cover.is-square { background: var(--c, var(--ink-2)); }
.cover.is-square img { object-fit: contain; }

/* ---------- the heart: a beat when pressed; "Върни" in the toast ---------- */
.is-beat .heart { animation: beat 420ms cubic-bezier(.2, .9, .3, 1.4); }
@keyframes beat { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-undo {
  margin: -6px -8px -6px 0; padding: 6px 10px; border: 0; border-radius: 8px; cursor: pointer;
  background: color-mix(in srgb, var(--ink) 12%, transparent); color: inherit; font-weight: 800; font-size: 15px;
}
.toast-undo:hover { background: color-mix(in srgb, var(--ink) 22%, transparent); }

/* A saved book's news since it was saved (app.js): out, or cheaper. */
.alert-chip {
  position: absolute; z-index: 3; right: 8px; bottom: 8px; padding: 3px 9px; border-radius: 999px;
  background: var(--fav); color: var(--ink); font: 800 13.5px/1.5 var(--text);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.35);
}
[data-view="list"] .games .alert-chip { display: none; }
.me-alerts { margin: 0 0 6px; font-weight: 700; color: var(--fav); }

/* ---------- the viewer's place in its list (viewer.js) ---------- */
.card.is-current .cover { outline: 3px solid var(--gold); outline-offset: 3px; }
[data-view="list"] .games .card.is-current { background: color-mix(in srgb, var(--gold) 9%, transparent); }
.card.is-back .cover { animation: back-here 1.1s ease-out; }
@keyframes back-here { 0%, 40% { outline: 3px solid var(--gold); outline-offset: 3px; } 100% { outline: 3px solid transparent; outline-offset: 8px; } }

/* ---------- the viewer (viewer.js): a book over its list ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; }
.vw-scrim { position: absolute; inset: 0; background: rgb(6 6 12 / 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.vw-panel {
  position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  background: var(--ink); color: var(--paper); overflow: hidden;
  transition: transform 220ms ease-out;
}
.vw-on, .vw-on body { overflow: hidden; }
.vw-docked, .vw-docked body { overflow: visible; }
.vw-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid var(--ink-3);
  background: color-mix(in srgb, var(--ink) 92%, transparent);
}
.vw-bar .ibtn svg { stroke-width: 2.2; }
.vw-pos { flex: 1; min-width: 0; margin: 0; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; overflow: hidden; }
.vw-pos b { font: 900 24px/1 var(--display); font-variant-numeric: tabular-nums; }
.vw-group { min-width: 0; font-weight: 700; font-size: 15px; color: var(--paper-dim); overflow: hidden; text-overflow: ellipsis; }
.vw-keys { flex: none; }
.vw-pos b { flex: none; }
.vw-keys { display: none; font-size: 12.5px; color: var(--paper-dim); white-space: nowrap; }
.vw-keys kbd {
  display: inline-block; min-width: 20px; padding: 1px 5px; margin: 0 1px; border: 1px solid var(--ink-3); border-bottom-width: 2px;
  border-radius: 5px; font: 700 11.5px/1.4 var(--text); text-align: center; color: var(--paper);
}
.vw-stage { position: relative; min-height: 0; overflow: hidden; touch-action: pan-y; }
.vw-slide {
  height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  transition: transform 260ms cubic-bezier(.2, .8, .2, 1), opacity 200ms;
}
.vw-slide.is-bump-l { animation: bump-l 320ms ease-out; }
.vw-slide.is-bump-r { animation: bump-r 320ms ease-out; }
@keyframes bump-l { 40% { transform: translateX(22px); } }
@keyframes bump-r { 40% { transform: translateX(-22px); } }
.vw-wait { display: grid; place-items: center; padding: 28px 16px; }
.vw-wait img { width: min(100%, 360px, calc((100vh - 300px) * 2 / 3)); width: min(100%, 360px, calc((100dvh - 300px) * 2 / 3)); border-radius: 12px; box-shadow: var(--shadow); opacity: 0.85; }
.viewer.is-docked .vw-wait { place-items: start; padding: 18px var(--gutter); }
.viewer.is-docked .vw-wait img { width: 250px; }
.vw-fail { padding: 40px 20px; text-align: center; color: var(--paper-dim); }
/* The book's page inside: one column, the cover a little smaller. */
.viewer .game { padding: 0 var(--gutter) 24px; }
.viewer .hero { padding-top: 18px; padding-bottom: 22px; }
.viewer .hero-in { grid-template-columns: minmax(0, 1fr); gap: 18px; }
/* As big as the screen allows while the title and the author still show
   under it (the bar above, the dock below: about 300px). */
.viewer .game-cover .cover { width: min(100%, 360px, calc((100vh - 300px) * 2 / 3)); width: min(100%, 360px, calc((100dvh - 300px) * 2 / 3)); margin-inline: auto; cursor: zoom-in; }
.viewer .hero-title { font-size: clamp(34px, 8vw, 52px); margin-bottom: 6px; }
.viewer .game .authors { font-size: 24px; margin-bottom: 10px; }
.viewer .crumb { display: none; }
.viewer .game-body { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 18px; }
.viewer .desc { font-size: 18px; }
.viewer .desc p:first-child { font-size: 19.5px; }
.viewer .game-cover .cover { position: relative; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.vw-burst { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; pointer-events: none; }
.vw-burst svg { width: 44%; fill: var(--fav); filter: drop-shadow(0 6px 18px rgb(0 0 0 / 0.5)); animation: burst 850ms cubic-bezier(.2, .9, .3, 1.3) forwards; }
@keyframes burst { 0% { transform: scale(0.2); opacity: 0; } 25% { transform: scale(1.15); opacity: 1; } 60% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
/* The dock: buy, love, share, always in reach of the thumb. */
.vw-dock {
  display: flex; gap: 8px; padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border-top: 1px solid var(--ink-3); background: color-mix(in srgb, var(--ink) 94%, transparent);
}
.vw-dock:empty { display: none; }
.vw-on:not(.vw-docked) .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
.vw-dock .btn { min-height: 50px; }
.vw-dock .btn-accent { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 50px; text-align: center; padding: 0 14px; }
/* A block (for the ellipsis) centred by its line: every theme's .btn sets
   font: …/1.1, which beat line-height here and put "Купи от Сиела" at the
   top of the dock's button; :root makes this one win. */
:root .vw-dock .btn-accent { line-height: 50px; }
.vw-dock .btn-ghost { width: 54px; padding: 0; }
.vw-dock .btn-label { display: none; }
.vw-dock .vw-heart .heart { width: 24px; height: 24px; }
.vw-dock .vw-heart:only-of-type { margin-left: auto; }
.vw-arrow {
  display: none; place-items: center; width: 40px; height: 40px; flex: none; order: 3;
  border-radius: 50%; border: 1px solid var(--ink-3); background: var(--ink-2); color: var(--paper); cursor: pointer;
}
.vw-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.vw-arrow:hover:not(:disabled) { border-color: var(--paper-dim); }
.vw-arrow:disabled { opacity: 0.3; cursor: default; }
.vw-keys { order: 2; }
.vw-open { order: 4; }
@media (hover: hover) and (pointer: fine) { .vw-arrow { display: grid; } .vw-keys { display: inline; } }
@media (max-width: 999px) {
  .vw-scrim { display: none; }
  .viewer.is-in .vw-panel { animation: vw-up 260ms cubic-bezier(.2, .8, .2, 1); }
  @keyframes vw-up { from { transform: translateY(40px); opacity: 0; } }
}
@media (max-width: 640px) { .vw-keys { display: none !important; } }
/* Wide: a panel on the right, as roomy as the book's own page, and the
   list stays usable beside it (two or three columns of covers). */
:root { --vw-w: min(1080px, 60vw); }
.viewer.is-docked { left: auto; width: var(--vw-w); top: 0; bottom: 0; }
.viewer.is-docked .vw-panel { container: vw / inline-size; }
.viewer.is-docked .vw-scrim { display: none; }
.viewer.is-docked .vw-panel { border-left: 1px solid var(--ink-3); box-shadow: -30px 0 60px -30px rgb(0 0 0 / 0.6); }
.viewer.is-docked.is-in .vw-panel { animation: vw-left 260ms cubic-bezier(.2, .8, .2, 1); }
@keyframes vw-left { from { transform: translateX(60px); opacity: 0; } }
.vw-docked body { padding-right: var(--vw-w); }
.vw-docked .top { margin-right: 0; }
.viewer.is-docked .game-cover .cover { width: 250px; margin-inline: 0; }
.viewer.is-docked .hero-in { grid-template-columns: 250px minmax(0, 1fr); gap: 24px; }
.viewer.is-docked .hero-title { font-size: clamp(34px, 3vw, 50px); }
.viewer.is-docked .game .authors { font-size: 24px; }
/* Room enough: the page's own two columns, the cover full size. */
@container vw (min-width: 840px) {
  .viewer.is-docked .hero { padding-top: 28px; padding-bottom: 32px; }
  .viewer.is-docked .hero-in { grid-template-columns: 300px minmax(0, 1fr); gap: 40px; }
  .viewer.is-docked .game-cover .cover, .viewer.is-docked .vw-wait img { width: 300px; }
  .viewer.is-docked .hero-title { font-size: clamp(44px, 4vw, 64px); }
  .viewer.is-docked .game .authors { font-size: 28px; }
  .viewer.is-docked .game-body { grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; padding-top: 26px; }
}

/* ---------- the quick look (browse.js): a cover's blurb and prices ---------- */
.peek {
  position: absolute; z-index: 45; width: 340px; padding: 16px 18px; border-radius: 14px;
  background: var(--ink-2); border: 1px solid var(--ink-3); box-shadow: 0 24px 50px -20px rgb(0 0 0 / 0.65);
  pointer-events: none; animation: peek-in 160ms ease-out;
}
@keyframes peek-in { from { opacity: 0; transform: translateY(6px); } }
.peek p { margin: 0 0 8px; }
.peek-t { font: 850 24px/1.02 var(--display); }
.peek-d { font: 15px/1.5 var(--read); color: var(--paper); }
.peek-o { list-style: none; margin: 0 0 8px; padding: 8px 0 0; border-top: 1px solid var(--ink-3); display: grid; gap: 3px; }
.peek-o li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 650; }
.peek-o b { font: 850 18px/1 var(--display); color: var(--gold-text); }
.peek-h { margin: 0 !important; font-size: 12.5px; color: var(--paper-dim); }

@media (prefers-reduced-motion: reduce) {
  .is-beat .heart, .vw-burst svg, .card.is-back .cover, .peek, .viewer.is-in .vw-panel { animation: none; }
  .vw-slide, .vw-panel { transition: none; }
}

/* The list beside the docked viewer is narrower than the screen: the
   menu gives way to the icons, the grid to fewer columns. */
@media (max-width: 2399px) {
  .vw-docked .nav, .vw-docked .brand-lang { display: none; }
  .vw-docked .top-icons { margin-left: auto; }
  .vw-docked .games .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1400px) and (max-width: 2399px) { .vw-docked .games .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* A series in reading order (/series/{slug}, the book page): the number,
   a small cover, the title and the edition; the work's other editions
   under it. The page's own book is marked. */
.series-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 2px; max-width: 860px; }
.se { display: grid; grid-template-columns: 44px 56px minmax(0, 1fr); align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; }
.se:hover { background: var(--ink-2); }
.se.is-here { background: var(--ink-2); box-shadow: inset 3px 0 0 var(--gold); }
.se-no { font: 900 30px/1 var(--display); color: var(--gold-text); text-align: right; font-variant-numeric: tabular-nums; }
.se-cover { display: block; width: 56px; border-radius: 6px; overflow: hidden; aspect-ratio: 2 / 3; }
.se-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.se-cover .nocover { padding: 4px; }
.se-cover .nocover .t { font-size: 9px; }
.se-body { min-width: 0; display: grid; gap: 4px; }
.se-t { font: 850 22px/1.08 var(--display); color: var(--paper); text-decoration: none; overflow-wrap: anywhere; }
.se-t:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.se-meta, .se-eds { margin: 0; font-size: 14px; color: var(--paper-dim); }
.se-eds a { color: var(--paper-dim); }
.series-list.compact { margin-top: 10px; }
.series-list.compact .se { grid-template-columns: 34px 40px minmax(0, 1fr); gap: 10px; padding: 7px 10px; }
.series-list.compact .se-no { font-size: 22px; }
.series-list.compact .se-cover { width: 40px; }
.series-list.compact .se-t { font-size: 18px; }
.game-block { margin-top: 34px; max-width: 760px; }
.game-block h2 { font: 850 30px/1.05 var(--display); margin: 0; }
.game-block h2 a { color: inherit; text-decoration-color: var(--gold); }
.block-more { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 12px 0 0; font-weight: 650; }
.eds { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 0; }
.eds li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--ink-3); }
.eds a { font-weight: 750; }
.eds span { color: var(--paper-dim); font-size: 15px; }
.moved { color: var(--paper-dim); font-weight: 500; font-size: 15px; }
/* Любими → Книги: what happened to the saved books lately. */

/* Months (/novi-knigi): the index and a month's way to the next. */
.month-nav { display: flex; gap: 12px; margin: 18px 0 0; font-weight: 750; }
.month-nav a:last-child:not(:first-child), .month-nav .next { margin-left: auto; }
.months { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 0; max-width: 640px; }
.months li { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ink-3); }
.months a { font: 850 26px/1.1 var(--display); color: var(--paper); text-decoration: none; text-transform: capitalize; }
.months a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.months span { color: var(--paper-dim); }
.months b { margin-left: auto; color: var(--gold-text); font-size: 14px; }
.series-index { margin-top: 22px; }
.series-index .si-n { color: var(--paper-dim); font-size: 14px; white-space: nowrap; }

/* A person's page: what they are on the site; the indexes mark the ones
   who are both. */
.who-role { margin: 4px 0 0; font: 750 15px/1.2 var(--text); color: var(--gold-text); letter-spacing: 0.02em; }
.index .also { font-size: 13px; color: var(--paper-dim); white-space: nowrap; }

/* ---------- games: platforms, scores, videos, screenshots ---------- */
.plat-ps5 { --p: #0070d1; } .plat-ps4 { --p: #003791; } .plat-xbox-series { --p: #107c10; } .plat-xbox-one { --p: #0e5c0e; }
.plat-switch-2 { --p: #e60012; } .plat-switch { --p: #c4000f; } .plat-pc { --p: #4b5563; }
.chip-p { border-color: var(--p); }
.chip-p[aria-current], .chip-p[aria-pressed="true"] { background: var(--p); border-color: var(--p); color: #fff; }
.plat-nav { margin: 14px 0 4px; }
.plat-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.plat-dates li { display: flex; align-items: baseline; gap: 8px; }

/* A score out of 100, coloured as the review sites colour it. */
.score { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 58px; padding: 6px 8px; border-radius: 10px; background: var(--s); color: #fff; }
.score b { font: 850 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.score small { font-size: 11.5px; font-weight: 650; opacity: 0.9; }
.score-good { --s: #2e9e44; } .score-mixed { --s: #c98a00; } .score-poor { --s: #d0342c; }
.scores { display: flex; gap: 10px; margin: 14px 0 4px; }
.score-mini {
  position: absolute; z-index: 3; right: 8px; bottom: 8px; min-width: 0; padding: 3px 7px; border-radius: 8px;
  font: 850 14px/1.2 var(--display); box-shadow: 0 2px 10px rgb(0 0 0 / 0.35);
}
[data-view="list"] .games .score-mini { right: 3px; bottom: 3px; padding: 1px 4px; font-size: 11px; }
.tag-bg { border: 1px solid #34c759; color: inherit; }

.game-block.videos .vids, .shots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.vids a { position: relative; display: block; border-radius: 10px; overflow: hidden; color: #fff; text-decoration: none; background: #000; }
.vids img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; opacity: 0.88; }
.vids a:hover img { opacity: 1; }
.vid-play { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 52px; height: 36px; border-radius: 10px; background: #f00; display: grid; place-items: center; font-size: 18px; }
.vid-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: 13px; font-weight: 700; background: linear-gradient(transparent, rgb(0 0 0 / 0.8)); }
.vid-search { margin-top: 10px; font-size: 14px; color: var(--paper-dim); }
.vid-search.big { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.shots a { display: block; border-radius: 10px; overflow: hidden; }
.shots img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.2s; }
.shots a:hover img { transform: scale(1.03); }
[data-view="list"] .games .card-genre { display: none; }

/* ---------- Нови песни ---------- */
/* A playlist's cover is square; the songs one column, in the playlist's order. */
.cover.is-square { aspect-ratio: 1; }
.card .card-sub { margin: 0; font-size: 14px; color: var(--paper-dim); }
.index.one-col { columns: auto; max-width: 880px; }
.index .artist { color: var(--paper-dim); font-size: 15px; overflow-wrap: anywhere; }
.player { margin: 22px 0 30px; }
.player iframe { display: block; width: 100%; height: 452px; border: 0; border-radius: var(--r-card); }
.player iframe.yt { height: auto; aspect-ratio: 16 / 9; }
.player-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--ink-3); }
.player-tabs button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font-weight: 700; color: var(--paper-dim); cursor: pointer; }
.player-tabs button[aria-selected="true"] { background: var(--gold); color: var(--gold-ink); }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.list-h { font: 900 34px/1 var(--display); margin: 8px 0 6px; }
