:root {
  --bg: #1a2233;
  --bg-raise: #232c40;
  --card: #283246;
  --ink: #e7edf7;
  --muted: #a8b4c9;
  --line: rgba(176, 196, 224, .18);
  --blue: #17aaff;
  --blue-2: #7ad7ff;
  --blue-deep: #0076e9;
  --ok: #3ddc97;
  --bad: #ff6b6b;
  --warn: #f0c36a;
  --buy: #3dbe86;
  --sell: #f08a3a;
  --shadow: 0 16px 36px rgba(8, 12, 22, .28);
  --top: rgba(26, 34, 51, .9);
  --input: #1e283b;
  --table: #202a3d;
  --menu: #283246;
  --pre: #1b2436;
  --nav: #232c40;
  --track: #3a4760;
  --on-blue: #ffffff;
  --grid: rgba(255, 255, 255, .035);
  --radius: 18px;
  --sans: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f4f6fa;
  --bg-raise: #ffffff;
  --card: #ffffff;
  --ink: #1c2433;
  --muted: #5c6b82;
  --line: rgba(28, 36, 51, .12);
  --blue: #0094e8;
  --blue-2: #0076e9;
  --blue-deep: #0060c0;
  --buy: #0c7a45;
  --sell: #c2410c;
  --shadow: 0 10px 28px rgba(28, 36, 51, .08);
  --top: rgba(255, 255, 255, .92);
  --input: #ffffff;
  --table: #ffffff;
  --menu: #ffffff;
  --pre: #f3f6fb;
  --nav: #ffffff;
  --track: #d5ddea;
  --on-blue: #ffffff;
  --grid: rgba(28, 36, 51, .035);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  background:
    radial-gradient(900px 480px at 0% -10%, rgba(0, 150, 240, .28), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(0, 201, 255, .16), transparent 55%),
    var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.skip {
  position: absolute; left: 8px; top: 8px; transform: translateY(-160%);
  background: var(--blue); color: var(--on-blue); padding: 8px 12px; border-radius: 999px; z-index: 90;
}
.skip:focus, .skip:focus-visible { transform: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.maint-banner {
  display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap;
  padding: 10px 22px; background: #3a2a08; color: #ffe7ad; border-bottom: 1px solid rgba(240, 195, 106, .4);
}
.maint-banner a { color: #fff; font-weight: 700; }
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); background: var(--top); border-bottom: 1px solid var(--line); }
.top-inner, .page, .foot-inner { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.top-inner { min-height: 60px; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.brand-icon { display: block; height: 36px; width: 36px; }
.brand-word { display: inline-flex; align-items: baseline; font-weight: 750; letter-spacing: -.045em; font-size: 22px; line-height: 1; }
.brand-word .steam { color: #fff; }
html[data-theme="light"] .brand-word .steam { color: #000; }
.brand-word .pages { color: #17aaff; }
.mark {
  width: 34px; height: 34px; display: grid; place-items: center; color: var(--on-blue);
  background: linear-gradient(160deg, #9ec2ff, var(--blue) 45%, #1d4ed8);
  border-radius: 11px; box-shadow: 0 8px 20px rgba(76, 141, 255, .35);
}
.mark svg { width: 22px; height: 22px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a, .chip {
  text-decoration: none; color: var(--muted); padding: 7px 11px; border-radius: 999px; font-size: 14px; font-weight: 650;
}
.nav a:hover, .chip:hover { color: var(--ink); }
.nav a.is-active { background: linear-gradient(180deg, #36c4ff, var(--blue-deep)); color: #fff; }
.top-side { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-raise); }
.nav-toggle i { display: block; width: 18px; height: 2px; margin: 4px 0; background: var(--ink); border-radius: 2px; }
.btn, button.btn, .copy {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid transparent; text-decoration: none; font-weight: 700; cursor: pointer; background: transparent; color: var(--ink);
}
.btn-primary { background: linear-gradient(180deg, #36c4ff, var(--blue-deep)); color: #fff; box-shadow: 0 8px 18px rgba(0, 118, 233, .28); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); background: rgba(255,255,255,.03); }
.btn-danger { border-color: rgba(255,107,107,.45); color: #ffd0d0; }
.page { padding: 18px 0 40px; position: relative; z-index: 1; }
.page h1 { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 8px; }
.hero { display: grid; grid-template-columns: 1.4fr .7fr; gap: 16px; align-items: stretch; margin-bottom: 16px; }
.hero-copy h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.05; letter-spacing: -.045em; margin: 0 0 8px; }
.error-panel h1, .docs h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.08; letter-spacing: -.04em; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 16px; line-height: 1.45; max-width: 62ch; }
.kicker { color: var(--blue-2); font-weight: 750; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; margin: 0 0 8px; }
.search-bar, .tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }
input, select, textarea {
  background: var(--input); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 42px; outline: none; width: 100%;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(76,141,255,.2); }
.search-bar input, .tools input[type="search"] { flex: 1; min-width: 180px; width: auto; }
.tools select { width: auto; min-width: 160px; flex: none; }
.search-bar .btn, .tools .btn { width: auto; flex: none; }
.hero-links, .chips, .range { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: rgba(76,141,255,.08); }
.hero-panel, .card, .stats article {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-panel { padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; background:
  linear-gradient(180deg, rgba(76,141,255,.18), rgba(16,27,46,.92)); }
.hero-panel strong { font-size: 56px; letter-spacing: -.05em; line-height: 1; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 28px; }
.stats article { padding: 16px 18px; }
.stats strong { display: block; font-size: 28px; letter-spacing: -.04em; }
.stats span, .muted, .result-count { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card { padding: 16px 18px; }
.cat { text-decoration: none; display: block; min-height: 0; transition: transform .18s ease, border-color .18s ease; }
.cat:hover { transform: translateY(-2px); border-color: rgba(76,141,255,.55); }
.cat strong { display: block; font-size: 26px; margin: 6px 0; }
.bot-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-decoration: none; }
.bot-card img, .who img, .avatar-xl, .user-menu img, .menu-id img { border-radius: 12px; object-fit: cover; }
.bot-card img { width: 42px; height: 42px; }
.bot-card div { min-width: 0; }
.bot-card strong { display: block; line-height: 1.25; }
.bot-card div > span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.3; }
.who img { width: 22px; height: 22px; border-radius: 6px; }
.avatar-xl { width: 84px; height: 84px; }
.pill { display: inline-flex; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(240,195,106,.15); color: var(--warn); font-style: normal; font-size: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 8px; }
.section-head h1 { margin: 0; }
.section-head p, .section-copy p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; max-width: 68ch; }
.section-copy { min-width: 0; }
.owners { margin-top: 18px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(91,148,255,.12), transparent 42%), var(--bg-raise); }
.owners-copy h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.03em; }
.owners-copy p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.4; max-width: 68ch; }
.owner-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0 0 12px; }
.owner-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 2px 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.owner-ico { grid-row: 1 / span 2; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(91,148,255,.14); color: var(--blue-2); }
.owner-ico svg { width: 16px; height: 16px; }
.owner-no { font-size: 11px; font-weight: 750; letter-spacing: .08em; color: var(--muted); }
.owner-steps strong { font-size: 14px; line-height: 1.25; }
.owner-steps li > span:last-child { grid-column: 1 / -1; color: var(--muted); font-size: 13px; line-height: 1.35; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--table); }
table.catalog { width: 100%; border-collapse: collapse; min-width: 760px; }
table.catalog th, table.catalog td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.catalog th a, table.catalog .sort { color: var(--muted); text-decoration: none; }
table.catalog th { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
table.catalog td { font-size: 13px; }
table.catalog tbody tr:hover { background: rgba(91, 148, 255, .08); }
.who { display: flex; gap: 8px; align-items: center; text-decoration: none; font-weight: 400; min-width: 0; }
.who .name { font-weight: 400; }
.who small, .sid, .menu-id span { display: block; color: var(--muted); font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions a { color: var(--blue-2); font-weight: 700; text-decoration: none; }
.sync { width: 12px; height: 12px; border-radius: 50%; display: inline-block; position: relative; }
.sync.is-ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(61,220,151,.15); }
.sync.is-bad { background: var(--bad); box-shadow: 0 0 0 4px rgba(255,107,107,.14); }
.sync-line { display: flex; align-items: center; gap: 8px; }
.tip-float {
  position: fixed; z-index: 80; max-width: min(240px, calc(100vw - 16px));
  padding: 6px 8px; border-radius: 8px; background: var(--menu); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 12px; line-height: 1.35; pointer-events: none;
}
.empty, .error-panel { padding: 28px; border: 1px dashed var(--line); border-radius: 18px; background: rgba(255,255,255,.02); }
.empty h3, .error-panel h1 { margin-top: 0; }
.pager { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.pager a { color: var(--blue-2); font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.bot-hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 6px 12px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.set-list { display: grid; gap: 6px; margin-top: 10px; }
.set-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.note, .flash, .warn { border-radius: 12px; padding: 12px 14px; }
.note { background: rgba(76,141,255,.08); }
.flash { background: rgba(61,220,151,.12); border: 1px solid rgba(61,220,151,.3); }
.warn { background: rgba(255,107,107,.1); }
.ticks { padding-left: 18px; }
.narrow { max-width: 640px; }
.form { display: grid; gap: 10px; }
.form h2 { font-size: 16px; margin: 6px 0 0; }
.field { display: grid; gap: 4px; }
.field span, legend { font-weight: 700; }
.toggles, .switch { display: flex; align-items: center; gap: 10px; }
.toggles { flex-wrap: wrap; }
.switch em { font-style: normal; }
.switch input { position: absolute; opacity: 0; }
.track { width: 44px; height: 26px; border-radius: 999px; background: var(--track); position: relative; flex: none; border: 1px solid var(--line); }
.track::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #d5def0; top: 2px; left: 2px; transition: transform .16s ease; }
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track::after { transform: translateX(18px); background: white; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(76,141,255,.35); }
.split { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 8px; }
.inline { display: inline-flex; margin-right: 8px; }
.user-menu, .lang-menu { position: relative; }
.user-menu summary, .lang-menu summary {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 10px 4px 4px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer;
}
.user-menu summary::-webkit-details-marker, .lang-menu summary::-webkit-details-marker { display: none; }
.user-menu img { width: 32px; height: 32px; }
.user-menu summary strong { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-card {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; background: var(--menu);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 40; display: grid; gap: 2px;
  max-height: min(420px, calc(100vh - 76px)); overflow: auto;
}
.lang-menu .menu-card { min-width: 188px; width: max-content; max-width: min(260px, calc(100vw - 16px)); }
.lang-menu:not([open]) > .menu-card, .user-menu:not([open]) > .menu-card { display: none; }
.menu-card a, .menu-card button { display: flex; align-items: center; gap: 10px; min-height: 36px; text-align: left; background: transparent; border: 0; color: var(--ink); padding: 0 10px; margin: 0; border-radius: 8px; text-decoration: none; cursor: pointer; }
.menu-card a:hover, .menu-card button:hover { background: rgba(91,148,255,.12); }
.menu-card a.is-active { background: rgba(91,148,255,.18); font-weight: 750; }
.menu-id { display: flex; gap: 8px; align-items: center; padding: 8px; }
.menu-id img { width: 36px; height: 36px; }
.flag { width: 18px; height: 12px; object-fit: cover; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(128,128,128,.35); }
.docs .code, .key-once pre { position: relative; }
pre { background: var(--pre); border-radius: 14px; padding: 14px; overflow: auto; border: 1px solid var(--line); }
.copy { position: absolute; right: 8px; top: 8px; background: var(--bg-raise); }
.admin { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.side { display: grid; align-content: start; gap: 6px; }
.side a { text-decoration: none; padding: 8px 10px; border-radius: 10px; }
.side a:hover { background: rgba(76,141,255,.12); }
.range a { text-decoration: none; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.range a.is-active { background: var(--blue); color: var(--on-blue); }
.bars { height: 120px; display: flex; align-items: end; gap: 4px; }
.bars div { flex: 1; height: 100%; display: flex; align-items: end; }
.bars span { display: block; width: 100%; background: linear-gradient(180deg, var(--blue-2), var(--blue)); border-radius: 6px 6px 0 0; min-height: 2px; }
.foot { border-top: 1px solid var(--line); position: relative; z-index: 1; }
.foot-inner { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0 24px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 14px; }
.foot a { color: var(--muted); text-decoration: none; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.more { margin-top: 12px; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
fieldset[data-cat][disabled] { display: none; }
.skeleton { background: linear-gradient(90deg, #152033, #22314c, #152033); background-size: 200% 100%; animation: shine 1.1s linear infinite; border-radius: 10px; min-height: 18px; }
@keyframes shine { to { background-position: -200% 0; } }
@media (max-width: 980px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav, .top-side .lang-menu, .top-side .theme-toggle, .top-side > .btn { display: none; }
  .hero, .hero-stage, .stats, .grid-2, .admin, .split, .ad-row { grid-template-columns: 1fr; }
  .home-cats .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-book { min-height: 190px; }
  .book { height: 180px; }
  .top-inner { flex-wrap: nowrap; }
  .user-menu summary strong { display: none; }
}
@media (max-width: 1024px) {
  .owner-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .home-cats .cats { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tools, .segment { flex-wrap: wrap; }
  .page, .top-inner, .foot-inner { width: min(1180px, calc(100% - 20px)); }
  table.catalog { min-width: 680px; }
  .owner-steps { grid-template-columns: 1fr; }
  .section-head .search-bar { width: 100%; }
}
@media (max-width: 430px) {
  .top-inner { min-height: 52px; gap: 8px; }
  .brand-icon { height: 30px; width: 30px; }
  .brand-word { font-size: 17px; }
  .page, .top-inner, .foot-inner { width: min(1180px, calc(100% - 16px)); }
  .hero-copy h1 { font-size: 28px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin: 0 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
html[data-theme="light"] .hero-panel {
  background: linear-gradient(180deg, rgba(37, 99, 235, .12), #fff);
}
html[data-theme="light"] body, html[data-theme="light"] {
  background: var(--bg);
}
.theme-toggle, .icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-raise); color: var(--ink); cursor: pointer; padding: 0;
}
.theme-toggle svg, .icon-btn svg { width: 16px; height: 16px; }
.icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }
html[data-theme="light"] .icon-moon { display: block; }
.theme-toggle:hover, .icon-btn:hover { border-color: var(--blue); color: var(--blue); }
.actions { display: flex; gap: 6px; align-items: center; }
.sort {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer;
  color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit;
}
.sort-mark { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; opacity: .35; }
.sort.is-asc .sort-mark { border-bottom: 6px solid currentColor; opacity: .9; }
.sort.is-desc .sort-mark { border-top: 6px solid currentColor; opacity: .9; }
.item-ico { width: 16px; height: 16px; flex: none; }
.bot-line { display: flex; align-items: center; gap: 8px; }
.lvl { min-width: 2.4em; color: var(--muted); font-variant-numeric: tabular-nums; }
.num, .pair { font-variant-numeric: tabular-nums; }
.segment { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-raise); }
.segment button { border: 0; background: transparent; color: var(--muted); border-radius: 999px; min-height: 30px; padding: 0 12px; cursor: pointer; }
.segment button.is-on { background: var(--blue); color: var(--on-blue); }
.page-off-banner { padding: 8px 22px; background: rgba(240, 195, 106, .16); color: var(--ink); border-bottom: 1px solid rgba(240, 195, 106, .4); }
.notify-grid, .notify-card div { display: grid; gap: 8px; }
.notify-card { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--bg-raise); margin: 10px 0; }
.notify-card summary { cursor: pointer; font-weight: 700; }
.card { box-shadow: var(--shadow); }
.pair .b, .rate-buy { color: var(--buy); font-weight: 700; }
.pair .s, .rate-sell { color: var(--sell); font-weight: 700; }
.pair .slash { color: var(--muted); font-weight: 500; }
.save-bar {
  position: sticky; bottom: 0; z-index: 12; display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  margin: 4px -18px -16px; padding: 10px 16px; border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(12px);
}
.save-hint { margin-right: auto; color: var(--sell); font-weight: 700; font-size: 13px; }
.btn-save { min-height: 44px; padding: 0 18px; gap: 8px; box-shadow: 0 8px 18px rgba(37, 99, 235, .28); }
.btn-save svg { width: 16px; height: 16px; }
.btn-save:hover { filter: brightness(1.08); }
.btn-save:disabled, .btn-save.is-loading { opacity: .7; cursor: progress; }
.settings-form.is-dirty .btn-save { box-shadow: 0 0 0 3px rgba(91, 148, 255, .35), 0 8px 18px rgba(37, 99, 235, .28); }
.section-head .search-bar { margin: 0; flex: 1; min-width: min(100%, 240px); justify-content: flex-end; }
@media (max-width: 640px) {
  .save-bar { flex-direction: column; align-items: stretch; margin-left: -16px; margin-right: -16px; }
  .save-hint { margin-right: 0; }
  .btn-save { width: 100%; }
}
.hero-stage { grid-template-columns: minmax(0, 1.15fr) minmax(220px, .8fr); align-items: center; gap: 28px; margin: 6px 0 14px; }
.hero-book { display: grid; place-items: center; min-height: 260px; overflow: hidden; }
.book { position: relative; width: min(280px, 92%); height: 210px; perspective: 900px; }
.book-glow { position: absolute; inset: 24px 10px 16px 28px; border-radius: 24px; background: radial-gradient(circle, rgba(0, 201, 255, .45), transparent 68%); filter: blur(8px); }
.book-back, .sheet { position: absolute; top: 24px; bottom: 24px; left: 36px; right: 16px; border-radius: 3px 16px 16px 3px; transform-origin: left center; }
.book-back { background: linear-gradient(160deg, #0076e9, #00c9ff 55%, #b5efff); box-shadow: 0 22px 40px rgba(0, 118, 233, .35); }
.sheet { overflow: hidden; background: linear-gradient(90deg, rgba(0, 70, 130, .12), transparent 14%), linear-gradient(#ffffff, #e7f6ff); border: 1px solid rgba(255, 255, 255, .75); }
.sheet::after { content: ""; position: absolute; inset: 18px 14px; background: repeating-linear-gradient(180deg, rgba(0, 118, 233, .22) 0 2px, transparent 2px 12px); border-radius: 4px; }
.sheet-c { z-index: 1; transform: rotateY(-16deg); animation: page-turn 5.6s ease-in-out .9s infinite; }
.sheet-b { z-index: 2; transform: rotateY(-8deg); animation: page-turn 5.6s ease-in-out .45s infinite; }
.sheet-a { z-index: 3; animation: page-turn 5.6s ease-in-out infinite; }
.book-spine { position: absolute; top: 16px; bottom: 16px; left: 18px; width: 18px; border-radius: 8px; background: linear-gradient(90deg, #0057b8, #17aaff); box-shadow: inset 3px 0 0 rgba(255, 255, 255, .28); }
@keyframes page-turn {
  0%, 18% { transform: rotateY(0deg); }
  46%, 70% { transform: rotateY(-62deg); }
  100% { transform: rotateY(0deg); }
}
.home-cats { margin-top: 8px; }
.home-cats h2 { margin: 0 0 8px; font-size: 20px; }
.home-cats .cats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cat { display: grid; align-content: start; gap: 4px; padding: 14px; min-width: 0; }
.cat-ico { width: 28px; height: 28px; color: var(--blue); }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(8, 12, 20, .55); z-index: 40; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: min(320px, calc(100vw - 48px));
  background: var(--card); color: var(--ink); border-right: 1px solid var(--line);
  transform: translateX(0); padding: 12px 12px calc(16px + env(safe-area-inset-bottom));
  overflow: auto; box-shadow: var(--shadow);
}
.drawer[hidden], .drawer-backdrop[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.drawer-nav { display: grid; gap: 4px; }
.drawer-nav p { margin: 10px 0 2px; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.drawer-nav a { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 8px; border-radius: 8px; text-decoration: none; }
.drawer-nav a.is-active, .drawer-nav a:hover { background: rgba(91, 148, 255, .16); }
.drawer-langs { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-langs a { min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; }
.drawer-theme { margin: 8px 0; }
body.drawer-open { overflow: hidden; }
.ad-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.ad-banner { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; overflow: hidden; color: inherit; }
.ad-banner img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; }
.ad-slot {
  position: relative; align-content: center; justify-items: center; min-height: 112px; text-align: center; overflow: hidden;
  border: 1px solid rgba(23, 170, 255, .55); color: #eaf7ff;
  background:
    radial-gradient(90% 80% at 0% 0%, rgba(0, 201, 255, .45), transparent 58%),
    radial-gradient(80% 90% at 100% 100%, rgba(0, 80, 190, .55), transparent 55%),
    linear-gradient(135deg, #06345c, #0a6ebd 48%, #12b7ef);
  box-shadow: 0 14px 32px rgba(0, 118, 233, .28);
}
.ad-slot::before {
  content: ""; position: absolute; inset: -40% auto -40% -20%; width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  animation: ad-sheen 3.8s ease-in-out infinite;
}
.ad-slot strong, .ad-slot span { position: relative; }
.ad-slot strong { color: #fff; font-size: 18px; letter-spacing: -.02em; }
.ad-slot span { color: rgba(255, 255, 255, .82); }
.ad-slot:hover { transform: translateY(-1px); box-shadow: 0 18px 36px rgba(0, 150, 230, .38); }
.ad-home { min-height: 148px; margin: 0 0 16px; }
.ad-footer { min-height: 108px; margin: 12px 0 0; }
@keyframes ad-sheen { 0% { transform: translateX(0); } 100% { transform: translateX(320%); } }
html[data-theme="light"] .ad-slot {
  color: #04345c;
  background:
    radial-gradient(90% 80% at 0% 0%, rgba(181, 239, 255, .95), transparent 60%),
    radial-gradient(80% 90% at 100% 100%, rgba(0, 148, 232, .28), transparent 55%),
    linear-gradient(135deg, #e7f8ff, #b7e8ff 46%, #7fd4ff);
  box-shadow: 0 14px 28px rgba(0, 118, 233, .18);
}
html[data-theme="light"] .ad-slot strong { color: #04345c; }
html[data-theme="light"] .ad-slot span { color: #0b5f93; }
.drawer-head img { width: 28px; height: 28px; }
.ads-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.ads-tabs a { text-decoration: none; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.ads-tabs a.is-active { background: var(--blue); color: var(--on-blue); }
.badge { display: inline-flex; padding: 2px 8px; border-radius: 999px; font-style: normal; font-size: 12px; background: rgba(91,148,255,.15); }
.badge-active, .badge-approved { background: rgba(61,190,134,.18); color: var(--buy); }
.badge-waiting, .badge-pending { background: rgba(240,138,58,.18); color: var(--sell); }
.badge-cancelled, .badge-rejected { background: rgba(255,107,107,.15); color: var(--bad); }
