/* ===== Пиксельная тема =====
   Слой поверх styles.css и home.css: бирюзовая палитра, клетчатый фон, пиксельные шрифты,
   «ступенчатые» рамки вместо скруглений и никаких наклонов. Подключается последним. */
:root {
  --bg: #f6fcfb;
  --bg2: #e4f4f2;
  --panel: #ffffff;
  --panel2: #ebf7f6;
  --line: #c9e6e3;
  --edge: #2b6c78;
  --ink: #234b57;
  --ink2: #3d6a74;
  --muted: #7ea4a9;
  --dot: transparent;
  --grid: #dcf1ef;
  --accent: #45c4be;
  --accent-soft: #a5e7e2;
  --accent-wash: #e6f8f6;
  --accent2: #17858d;
  --accent-ink: #1d4450;
  --on-pastel: #1d4450;
  --ok: #1f9a62;
  --ok-bg: #dbf6e6;
  --bad: #e0506a;
  --bad-bg: #ffe6eb;
  --info: #2f86c4;
  --peach: #ffd6c4;
  --mint: #bff0e4;
  --lilac: #d9d6fb;
  --butter: #fff2ab;
  --sky: #c6ecf6;
  --pink: #ffc8d6;
  --sh: #a9dcd8;
  --shadow: 4px 4px 0 var(--sh);
  --shadow-sm: 3px 3px 0 var(--sh);
  --radius: 0px;
  --p: 3px;
  --d: 4px;
  --serif: "HandjetUI", "Courier New", monospace;
  --hand: "HandjetUI", "Courier New", monospace;
  --map-sea: #c8ecf4;
  --map-land: #fbf8e6;
  --map-line: #a9c9b8;
  --map-arrow: #e0506a;
  --map-water: #2f86c4;
}
:root[data-theme="dark"] {
  --bg: #11262b;
  --bg2: #17323a;
  --panel: #1b3942;
  --panel2: #22454f;
  --line: #2c5762;
  --edge: #7fdcd6;
  --ink: #e8fbf9;
  --ink2: #b9dedb;
  --muted: #7fa9ad;
  --grid: #183238;
  --accent-soft: #6fd6d0;
  --accent-wash: #20444d;
  --accent2: #8eeae4;
  --ok: #6fe0a4;
  --ok-bg: rgba(111, 224, 164, .14);
  --bad: #ff8fa3;
  --bad-bg: rgba(255, 143, 163, .14);
  --info: #8ecdf5;
  --sh: #0a1a1e;
  --map-sea: #17323a;
  --map-land: #2c4a45;
  --map-line: #4d7269;
  --map-arrow: #ff8fa3;
  --map-water: #8ecdf5;
}

/* никаких скруглений: всё собрано из квадратиков */
*, *::before, *::after { border-radius: 0 !important; }
.pix, .cat { display: block; width: 100%; height: auto; image-rendering: pixelated; }

body {
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 2px, transparent 2px), linear-gradient(90deg, var(--grid) 2px, transparent 2px);
  background-size: 32px 32px;
}
::selection { background: var(--mint); color: #1d4450; }
mark, .hl { background: linear-gradient(transparent 50%, var(--mint) 50%, var(--mint) 92%, transparent 92%); }
:root[data-theme="dark"] mark, :root[data-theme="dark"] .hl { background: linear-gradient(transparent 50%, rgba(111, 214, 208, .3) 50%); }

/* кружевная кайма сверху, как у пиксельных открыток */
.home::before {
  content: ""; display: block; height: 16px; margin: 0 -18px;
  background: linear-gradient(var(--accent) 8px, transparent 8px), repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 16px);
}
.foot::after {
  content: ""; display: block; height: 16px; margin: 26px -18px 0;
  background: linear-gradient(transparent 8px, var(--accent) 8px), repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 16px);
}
@media (max-width: 600px) { .home::before { margin: 0 -14px; } .foot::after { margin: 26px -14px 0; } }   /* на телефоне у .home отступ 14px — кайма не должна быть шире экрана */

/* шрифты */
h1, h2, h3, .s-title, .q-text, .res-msg, .dq-q, .logo b, .rank-row b, .rf-top b, .ticket .tb b, .pay-banner b, .prog-card b, .plan .pr, .kpi b,
.bigdate .year, .bigdate .year-label, .definition .term, .mn-k, .gl-t, .opt .letter, .tl-node .date, .tl-detail .d-date, .fc .front, .compare th,
.ring .ring-txt, .res-stats .st b, .stat-chip b, .s-cover h1, .s-section .num, .sec-h .t, .sn .n, .stn .c, .lcard .num, .sec-h .n, .lv-head .n, .goal-ring .n, .paybox .code { font-weight: 600 !important; letter-spacing: 0; }
.s-cover h1 { text-shadow: 6px 6px 0 rgba(0, 0, 0, .5); }
.bigdate .year { text-shadow: 6px 6px 0 var(--mint); }
:root[data-theme="dark"] .bigdate .year { text-shadow: 6px 6px 0 var(--sh); }
.kicker { font-size: 24px; text-transform: lowercase; }
.kicker .rn { text-transform: none; }   /* римские цифры — заглавными (обёртка ставится в player.js) */
.kicker::before { width: 12px; height: 12px; flex: 0 0 12px; -webkit-mask: none; mask: none; background: var(--pink); box-shadow: 4px 0 0 var(--accent), 8px 0 0 var(--butter); margin-right: 10px; }
.s-cover .kicker::before { display: none; }

/* ---------- пиксельная рамка: «плюсик» из теней даёт срезанные уголки ---------- */
.card, .nav-btn, .icon-btn, .opt, .lcard:not(.soon), .tcard, .subj:not(.soon), .buddy, .pill, .score-pill, .tab, .search, .fchip, .album, .prog-card, .pay-banner,
.plan, .kpi, .mapbox, .explain, .remember, .quote, .analogy-box, .order-item, .m-item, .points li, .sum-list li, .res-stats .st, .res-fun, .toast, .gl-pop,
.st-card, .bubble, .mc-col, .stat-chip, .media figure, .person .portrait, .ce .box, .sn.on, .dq-opts button, .form input, .chip, .timer, .grid-nav button,
.fc .face, .map-step, .cur-tile, .sum-ans details, .mistake, .person .years, .tag, .q-level, .logo .mark, .s-section .num, .sec-h .n, .lv-head .n,
.subj-title .ic, .lcard .num, .stn .c, .sn .n, .subj .ic, .subj .go, .name-form input, .name-form button, .map-tip, .s-cover .kicker, .mastery.ok, dialog.dlg {
  border-color: transparent !important;
  box-shadow:
    0 calc(var(--p) * -1) 0 0 var(--bc, var(--edge)), 0 var(--p) 0 0 var(--bc, var(--edge)),
    calc(var(--p) * -1) 0 0 0 var(--bc, var(--edge)), var(--p) 0 0 0 var(--bc, var(--edge)),
    var(--d) var(--d) 0 0 var(--sh), var(--d) calc(var(--d) + var(--p)) 0 0 var(--sh), calc(var(--d) + var(--p)) var(--d) 0 0 var(--sh) !important;
}
/* мелкие детали — рамка тоньше и без тени */
.pill, .score-pill, .fchip, .chip, .tag, .q-level, .points li, .sum-list li, .mistake, .person .years, .timer, .grid-nav button, .name-form input, .name-form button,
.lcard .num, .sn .n, .subj .go, .map-step, .sum-ans details, .ce .box, .mc-col, .form input, .search, .sn.on, .map-tip { --p: 2px; --d: 0px; }
.icon-btn, .tab, .dq-opts button, .order-item, .m-item, .stn .c, .sec-h .n, .lv-head .n, .subj-title .ic, .subj .ic, .logo .mark, .res-stats .st, .stat-chip, .kpi, .s-cover .kicker { --p: 2px; --d: 3px; }
.buddy, .subj:not(.soon), dialog.dlg, .s-section .num, .paywall { --d: 6px; }
.nav-btn:hover:not(:disabled), .icon-btn:hover, .opt:hover:not(:disabled), a.subj:hover, .lcard:not(.soon):hover, .tab:hover { --d: 6px; }
.nav-btn:active:not(:disabled), .icon-btn:active, .opt:active:not(:disabled), .nav-btn:disabled, .opt.dim, .opt.missed, .m-item.done { --d: 0px; }
.tab:not(.on), .map-step:not(.active) { --d: 0px; }
.map-step:not(.active):not(.done) { --bc: var(--line); }
/* цвет рамки по состоянию */
.opt.right, .order-item.right, .m-item.done, .dq-opts button.right, .mastery.ok, .grid-nav button.ok { --bc: var(--ok); --sh: color-mix(in srgb, var(--ok) 35%, transparent); }
.opt.wrong, .order-item.wrong, .m-item.err, .dq-opts button.wrong, .mistake:not(.reread) { --bc: var(--bad); --sh: color-mix(in srgb, var(--bad) 35%, transparent); }
.s-cover .kicker, .s-cover .start .nav-btn { --bc: #1d4450; --sh: rgba(0, 0, 0, .45); }
.lightbox img { border-color: #fff !important; }

/* остальные рамки — обычные прямые линии */
.topbar, .bottombar, .drawer, .drawer header { border-color: var(--edge); border-width: 3px; }
.topbar { border-top: 0; border-left: 0; border-right: 0; } .bottombar { border-bottom: 0; border-left: 0; border-right: 0; }
.drawer { box-shadow: 8px 0 0 rgba(43, 108, 120, .18); }
.drawer header { background: var(--accent-soft); }
.progress { height: 8px; bottom: -3px; border-right-width: 3px; transition-timing-function: steps(8); }
.progress::after { width: 28px; height: 26px; right: -15px; top: -12px; filter: none; image-rendering: pixelated; }
.explain::before { image-rendering: pixelated; width: 42px; height: 39px; }
.xpbar { height: 16px; border-width: 3px; }
.xpbar i { background: repeating-linear-gradient(90deg, var(--accent) 0 8px, var(--accent-soft) 8px 16px); border-right-width: 3px; transition-timing-function: steps(10); }
.bar, .sec-bar { border-width: 2px; }
.bar i { background: var(--accent); }
.opt .box { border-width: 2px; }
.hint-keys kbd { border-width: 2px; border-bottom-width: 4px; }
.quiz .q-text, .think .q-text, .tabs, .week, .drawer .modes { border-bottom-style: dashed; border-color: var(--line); }
.gl { border-bottom: 3px dotted var(--accent); }
.gl:hover, .gl:focus { background: var(--mint); }

/* цвета вместо «масляных» жёлтых */
.nav-btn.primary { background: var(--accent-soft); }
.nav-btn.primary:hover:not(:disabled) { background: #8adfd9; }
.icon-btn:hover { background: var(--mint); }
.score-pill { background: var(--pink); } .score-pill .star { color: #e0506a; }
.tab.on, .sn.on, .fchip.on, .chip.on { background: var(--accent-soft); color: var(--on-pastel); }
.toast { background: var(--mint); }
.remember { background: var(--butter); }
.remember::before, .media figure::before, .person .portrait::before, .buddy::before { height: 12px; top: -9px; opacity: 1; border: 0; background: repeating-linear-gradient(90deg, var(--pink) 0 8px, #fff 8px 16px); transform: translateX(-50%); }
.remember::before { transform: none; }
.hub h1 .mk::before, .ov h1 .mk::before, .hero h1 .mk::before, .definition .term::after { background: var(--mint); transform: none; }
:root[data-theme="dark"] .hub h1 .mk::before, :root[data-theme="dark"] .ov h1 .mk::before, :root[data-theme="dark"] .definition .term::after { background: rgba(111, 214, 208, .3); }
.s-section .num { background: var(--accent-soft); }
.logo .mark { background: var(--accent-soft); }
.pill.fire { background: var(--pink); } .pill.xp { background: var(--mint); }
.bubble { background: var(--sky); }
.bubble::before { display: none; }
.bubble::after { content: ""; position: absolute; left: -9px; bottom: 14px; width: 6px; height: 12px; background: var(--sky); box-shadow: 0 -3px 0 0 var(--edge), 0 3px 0 0 var(--edge), -3px 0 0 0 var(--edge); }
.album { background-image: linear-gradient(var(--grid) 2px, transparent 2px), linear-gradient(90deg, var(--grid) 2px, transparent 2px); background-size: 32px 32px; background-position: 0 0; }
.sticker .s-ico { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--edge), 6px 6px 0 7px var(--sh); border-width: 0; }
.sticker.off .s-ico { box-shadow: none; border: 3px dashed var(--muted) !important; }
.wd i { border-width: 3px; } .wd.on i { background: var(--pink); box-shadow: 3px 3px 0 var(--sh); }
.stn.full .c::after, .sum-list li::before, .pw-list li::before, .points li::before { border-width: 2px; }
.tl-node .dot { border-width: 3px; }
.timeline .track { border-top-width: 4px; }
.lcard .cov { border-bottom-width: 3px; image-rendering: auto; }
.lcard .done-badge, .lcard .lock-badge, .lcard .free-badge, .subj .stamp { border-width: 3px; font-size: 18px; padding: 3px 10px; box-shadow: 3px 3px 0 rgba(0, 0, 0, .2); }
.ticket .stub { border-right-width: 3px; }
.ring .ring-fg, .goal-ring circle { stroke-linecap: butt; }
.path::before { border-top-width: 4px; }
.stn.here .c::before { image-rendering: pixelated; }

/* пиксели не наклоняются: убираем все повороты */
.remember, .media figure, .grid2.img-left .media figure, .media figure:hover, .person .portrait, .tl-detail img, .ce .col.event .box, .res-stats .st, .stat-chip,
.q-img img, .hook-recall, .hook-q, .mn, .fc, .sum-list li::before, .pw-list li::before, .quiz .q-badge .q-ico, .s-section .num, .s-cover .kicker, .sticker, .m-item.sel,
.logo .mark, .logo:hover .mark, .buddy, .subj, .tab.on, .sn.on, .sec-h .n, .sec-h:hover .n, .lv-head .n, .subj-title .ic, .lcard .num, .lcard .done-badge, .lcard .lock-badge,
.lcard .free-badge, .subj .stamp, .goal, .ticket, .prog-card, .pay-banner, .plan, .mini-album, .hub .hi, .ov .hi, .hero .hi, .blk-h .hand, .wd.on i, .hero-note,
.subj:hover .ic, a.subj:hover .go, .cat-btn:active { transform: none !important; }
.gl-pop { transform: translateY(6px); } .gl-pop.on { transform: none; }
.toast { transform: translateX(-50%) translateY(20px); } .toast.on { transform: translateX(-50%); }
.person .years { transform: translateX(-50%); }
.map-step.active { transform: translateX(-4px); }
.tl-node.active .dot { transform: scale(1.3); }
.stn:nth-child(odd) .c { transform: translateY(-6px); } .stn:nth-child(even) .c { transform: translateY(6px); } .stn:hover .c { transform: translateY(-10px); }
.sticker:hover, .sticker:focus { transform: translateY(-6px) !important; }
a.subj:hover, .lcard:not(.soon):hover, .lcard:nth-child(even):hover { transform: translate(-3px, -3px) !important; }
.ticket:hover { transform: translate(-3px, -3px) !important; box-shadow: none; }
/* движения — рывками, как в старых играх */
.cat-btn, .rf-cat, .paywall .pw-cat, .stn.here .c::before { animation-timing-function: steps(2) !important; }
@keyframes catBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-4px); } 90% { transform: translateY(0); } 95% { transform: translateY(-2px); } }
@keyframes enterRight { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@keyframes enterLeft { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
@keyframes leaveLeft { to { opacity: 0; transform: translateX(-48px); } }
@keyframes leaveRight { to { opacity: 0; transform: translateX(48px); } }
@keyframes letterIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* мелкий текст пиксельным шрифтом выглядит крупнее рукописного — чуть уменьшаем */
.tcard .lab, .hk-l, .toc .sec, .media figcaption, .opt .verdict, .quiz .q-badge, .ce .col h4, .mc-col h4, .source .src-title, .crumb, .secnav .hand,
.ticket .tb .go, .dlg-h .hand, .blk-h .hand, .think-pad, .hub .hi, .ov .hi { font-size: 21px; }
.remember .r-label { font-size: 22px; }
.media figcaption, .logo small, .subj .nt, .st-card small, .gl-k, .fc .front small, .ring .ring-txt small { font-size: 17px; }
.cmp-cell::after { font-size: 17px; }
.empty, .foot { font-size: 22px; }
.lcard .cov { height: 144px; }

/* ---------- коллекция курсоров ---------- */
.cursors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 20px; }
.cur-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 12px; background: var(--bg2); border: 3px solid transparent; --bc: var(--line); --d: 0px; color: var(--ink); text-align: center; transition: transform .12s steps(2); }
.cur-tile:hover:not(.locked) { transform: translateY(-4px); --bc: var(--edge); --d: 4px; }
.cur-tile.on { background: var(--panel); --bc: var(--edge); --d: 4px; }
.cur-art { position: relative; width: 126px; height: 123px; }
.cur-art canvas { display: block; width: 126px; height: 123px; }
.cur-art .head { position: absolute; right: 0; bottom: 0; width: 78px; }
.cur-art .arr { position: absolute; left: 48px; top: 38px; width: 30px; }
.cur-tile b { font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1.1; color: inherit; }
.cur-tile small { font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--muted); min-height: 2.5em; }
.cur-tile .heart { position: absolute; left: -8px; top: -10px; width: 28px; display: none; animation: catBob 1.2s steps(2) infinite; }
.cur-tile.on .heart { display: block; }
.cur-tile.locked { cursor: default; }
.cur-tile.locked .cur-art canvas { filter: grayscale(1) brightness(1.1) opacity(.55); }
.cur-tile.locked .lk { position: absolute; right: 8px; top: 8px; width: 24px; }
.cur-tile.fresh { animation: pop .5s; }
@media (pointer: coarse) { #cursorBlk { display: none; } }

/* спутник не выбран — там, где он показывался, просто пусто */
.no-pet .cat-btn, .no-pet .rf-cat, .no-pet .pw-cat, .no-pet .progress::after, .no-pet .explain::before, .no-pet .stn.here .c::before, .no-pet #emptyCat, .no-pet #soonCat { display: none !important; }
.no-pet .explain { padding-left: 18px; padding-top: 16px; min-height: 0; }
.no-pet .paywall { padding-top: 26px; }
.no-pet .bubble::after { display: none; }
.cat-btn { width: 112px; flex: 0 0 112px; }
.explain::before { width: 46px; height: 44px; top: 10px; }
.progress::after { width: 30px; height: 28px; top: -14px; }

/* ---------- пиксельные значки (Pix.icon): только целые масштабы, чтобы квадратики не расплывались ---------- */
[data-pxi] { display: inline-flex; line-height: 0; }
svg.pxi { display: block; flex: none; image-rendering: pixelated; }
.icon-btn svg.pxi, .pill svg.pxi, .linkish svg.pxi { width: auto; height: auto; }      /* родной размер — 2× */
.subj .ic svg.pxi { width: 45px; height: auto; }                                       /* 15 → 45: 3× */
.subj-title .ic svg.pxi { width: 30px; height: auto; }                                 /* 15 → 30: 2× */
.subj .ic, .subj-title .ic { color: #234b57; }                                         /* фон значка всегда светлый — обводка тёмная и в тёмной теме */
.th-ico.sun { display: none; }
:root[data-theme="dark"] .th-ico { display: none; }
:root[data-theme="dark"] .th-ico.sun { display: inline-flex; }
.opt .box { width: 26px; height: 26px; flex-basis: 26px; }
.opt .box svg.pxi { width: 20px; height: 16px; transition-timing-function: steps(3); }
.opt .box svg.pxi[data-n="cross"] { width: 16px; height: 16px; }
.ce .arrow svg.pxi { width: 48px; height: 27px; opacity: 0; }                          /* 16×9 → 3× */
.ce .arrow.shown svg.pxi { animation: pxArrow .5s steps(4) forwards; }
@keyframes pxArrow { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.icon-btn:hover svg.pxi[data-n="home"], .icon-btn:hover svg.pxi[data-n="sound"] { animation: nudge .6s steps(3); }

/* ---------- полоски прогресса: из отдельных пиксельных блоков, заполняются рывками ---------- */
.bar, .sec-bar, .cbar, .srow .sb { height: 16px; padding: 2px; box-sizing: border-box; background: var(--panel); border: 2px solid var(--edge); overflow: hidden; }
.srow .sb { height: 14px; border-color: var(--line); }
.bar i, .sec-bar i, .cbar i, .srow .sb i {
  height: 100%; border: 0 !important; opacity: 1;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 10px) !important;
  transition: width .6s steps(8);
}
.cbar i { background: repeating-linear-gradient(90deg, var(--accent2) 0 8px, transparent 8px 10px) !important; }
.subj .bar { background: #fffdf8; border-color: #234b57; }
.subj .bar i { background: repeating-linear-gradient(90deg, #234b57 0 8px, transparent 8px 10px) !important; }

/* ---------- цель дня: 10 пиксельных звёзд, каждый верный ответ зажигает одну ---------- */
.goal-stars { display: grid; grid-template-columns: repeat(5, 33px); gap: 8px 6px; justify-content: center; margin: 8px 0 12px; }
.goal-stars i { display: block; width: 33px; height: 33px; color: var(--muted); }
.goal-stars svg.pxi { width: 33px; height: 33px; }                                      /* 11 → 33: 3× */
.goal-stars i:not(.on) rect:not([fill="currentColor"]) { fill: var(--panel); }          /* пустая звезда — только контур */
.goal-stars i.on { color: var(--edge); }
.goal-stars i.on:nth-last-child(1 of .on) { animation: starPop .5s steps(3); }          /* только что зажжённая */
.goal-stars i.next { color: var(--accent2); animation: catBob 1.2s steps(2) infinite; } /* следующая — подпрыгивает, ждёт ответа */
.goal-stars.done i { animation: starTwinkle 2s steps(1) infinite; animation-delay: calc(var(--k) * .2s); }
@keyframes starPop { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: none; } }
@keyframes starTwinkle { 0%, 89% { filter: none; transform: none; } 90%, 100% { filter: brightness(1.25); transform: translateY(-3px); } }
.tcard.goal .goal-stars { margin: auto 0; padding: 10px 0; }                           /* звёзды — по центру карточки, текст внизу */
.tcard.goal p { margin: 0; text-align: center; }

/* ---------- шапка страницы предмета: крошки, значок и заголовок собраны в одну плашку, вокруг — воздух ---------- */
.subj-hero {
  position: relative; margin: 22px 0 0; padding: 14px 22px 20px; background: var(--panel);
  box-shadow: 0 -3px 0 0 var(--edge), 0 3px 0 0 var(--edge), -3px 0 0 0 var(--edge), 3px 0 0 0 var(--edge), 6px 6px 0 0 var(--sh), 6px 9px 0 0 var(--sh), 9px 6px 0 0 var(--sh);
  background-image: repeating-linear-gradient(90deg, var(--hero, var(--mint)) 0 8px, transparent 8px 16px); background-size: 100% 6px; background-repeat: no-repeat;   /* кайма из квадратиков сверху */
}
.hero-peach { --hero: var(--peach); } .hero-sky { --hero: var(--sky); } .hero-lilac { --hero: var(--lilac); } .hero-mint { --hero: var(--mint); }
.subj-hero .crumb { margin: 6px 0 12px; font-size: 19px; color: var(--muted); }
.subj-hero .crumb:hover { color: var(--accent2); text-decoration: none; }
.subj-title { gap: 20px; margin: 0; align-items: center; }
.subj-title .ic { width: 72px; height: 72px; flex: 0 0 72px; }
.subj-title .ic svg.pxi { width: 45px; }                                               /* 15 → 45: 3× */
.subj-title h1 { font-size: clamp(30px, 4vw, 44px); }
.subj-note { margin: 6px 0 0; font-size: 14px; font-weight: 700; color: var(--ink2); }
.subj-hero + .tabs { margin-top: 24px; }
@media (max-width: 600px) { .subj-hero { padding: 10px 14px 16px; } .subj-title { gap: 14px; } .subj-title .ic { width: 58px; height: 58px; flex-basis: 58px; } .subj-title .ic svg.pxi { width: 30px; } }

/* ---------- наклейки: пиксельные значки на «вырезанной» карточке с белой каймой ---------- */
.sticker .s-ico { width: 72px; height: 72px; position: relative; overflow: visible;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, .35) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .35) 75%), linear-gradient(45deg, rgba(255, 255, 255, .35) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .35) 75%);
  background-size: 12px 12px; background-position: 0 0, 6px 6px; }
.sticker .s-ico svg.pxi { width: 48px; height: 48px; color: #234b57; }                    /* 12 → 48: 4× */
.sticker.on .s-ico::after { content: ""; position: absolute; left: 5px; top: 5px; width: 8px; height: 4px; background: #fff; box-shadow: -2px 4px 0 -0px #fff; opacity: .9; }   /* блик */
.sticker.off .s-ico { background-image: none; }
.sticker.off .s-ico svg.pxi { color: var(--muted); opacity: .55; }
.sticker.off .s-ico svg.pxi rect:not([fill="currentColor"]) { fill: transparent; }       /* закрытая — только силуэт */
.sticker .s-name { font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1.05; margin-top: 6px; }
.sticker.on:hover .s-ico svg.pxi, .sticker.on:focus .s-ico svg.pxi { animation: nudge .6s steps(3); }
.mini-row .sticker .s-ico, .st-card .sticker .s-ico { width: 52px; height: 52px; }
.mini-row .sticker .s-ico svg.pxi, .st-card .sticker .s-ico svg.pxi { width: 36px; height: 36px; }   /* 3× */
.mini-row .sticker .s-name { font-size: 15px; }

/* ---------- тема-арт на правой половине плашки предмета ---------- */
.subj-hero { overflow: hidden; }
.subj-hero.has-art { min-height: 168px; }
.subj-hero > :not(.hero-art) { position: relative; z-index: 1; }
.hero-art { position: absolute; right: 0; top: 6px; bottom: 0; width: min(60%, calc(100% - 600px)); height: calc(100% - 6px); image-rendering: pixelated; pointer-events: none; }
.hero-art { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26%); mask-image: linear-gradient(90deg, transparent 0, #000 26%); }   /* левый край мягко гаснет в плашке */   /* арт начинается после заголовка */
@media (max-width: 900px) { .hero-art { width: 100%; opacity: .18; } }   /* узкий экран: арт уходит в фон, текст главнее */

/* ---------- раздел «Арты» на главной ---------- */
.art-group + .art-group { margin-top: 28px; }
.art-group h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-family: var(--serif); font-weight: 600; font-size: 24px; }
.art-group h3 .ic { width: 40px; height: 40px; display: grid; place-items: center; color: #234b57; box-shadow: 0 -2px 0 0 var(--edge), 0 2px 0 0 var(--edge), -2px 0 0 0 var(--edge), 2px 0 0 0 var(--edge); }
.art-group h3 .ic svg.pxi { width: 30px; height: auto; }
.art-go { margin-left: auto; font-size: 19px; color: var(--muted); text-decoration: none; }
.art-go:hover { color: var(--accent2); }
.arts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px 20px; }
.art-tile { position: relative; display: flex; flex-direction: column; padding: 0; text-align: left; background: var(--panel); border: 0; color: var(--ink); cursor: pointer; --bc: var(--line); --d: 0px; transition: transform .12s steps(2);
  box-shadow: 0 -3px 0 0 var(--bc), 0 3px 0 0 var(--bc), -3px 0 0 0 var(--bc), 3px 0 0 0 var(--bc), var(--d) var(--d) 0 0 var(--sh), var(--d) calc(var(--d) + 3px) 0 0 var(--sh), calc(var(--d) + 3px) var(--d) 0 0 var(--sh); }
.art-tile canvas { display: block; width: 100%; height: 124px; image-rendering: pixelated; background: var(--bg2); }   /* 62 строки × 2 */
.art-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 9px 12px 10px; border-top: 3px solid var(--bc); }
.art-cap b { font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.1; }
.art-cap small { font-size: 12.5px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.art-tile:hover:not(.locked) { transform: translateY(-4px); --bc: var(--edge); --d: 5px; }
.art-tile:hover:not(.locked) .art-cap small { color: var(--accent2); }
.art-tile.on { --bc: var(--edge); --d: 5px; }
.art-tile.on .art-cap small { color: var(--ok); }
.art-pin { position: absolute; left: -10px; top: -12px; width: 28px; animation: catBob 1.2s steps(2) infinite; }
.art-frame { overflow: hidden; background: var(--bg2); image-rendering: auto !important; }
.art-tile .art-frame { position: relative; display: block; width: 100%; height: 170px; }
.art-frame img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }

.art-cap b em { display: block; font-family: var(--sans); font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 3px; }
.art-tile.locked { cursor: default; } .art-tile.locked img, .art-tile.locked canvas { filter: grayscale(1) brightness(1.15) opacity(.5); }
.art-swap { position: absolute !important; right: 10px; bottom: 8px; z-index: 2; padding: 2px 9px; font-family: var(--serif); font-size: 16px; color: #fff; text-decoration: none; background: rgba(20, 24, 50, .55); opacity: 0; transition: opacity .15s steps(2); }
.subj-hero:hover .art-swap, .art-swap:focus { opacity: 1; }
.subj-hero:not(.has-art) .art-swap { display: none; }
@media (hover: none) { .art-swap { opacity: .85; } }

/* ---------- ленты выбора: спутники и арты в одну строку, листаются вбок ---------- */
.rail-wrap { position: relative; }
.cursors, .arts { display: flex; gap: 18px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain;
  padding: 16px 14px 18px; margin: -16px -14px -6px; scrollbar-width: thin; scrollbar-color: var(--edge) var(--bg2); }
.cursors::-webkit-scrollbar, .arts::-webkit-scrollbar { height: 8px; }
.cursors::-webkit-scrollbar-track, .arts::-webkit-scrollbar-track { background: var(--bg2); }
.cursors::-webkit-scrollbar-thumb, .arts::-webkit-scrollbar-thumb { background: var(--edge); border-radius: 0; }
.cursors, .arts { scroll-padding-inline: 14px; }   /* прилипание с отступом: сердечко и рамка крайней карточки не обрезаются */
.cursors > .cur-tile { flex: 0 0 150px; scroll-snap-align: start; }
.arts > .art-tile { flex: 0 0 300px; scroll-snap-align: start; }
@media (max-width: 600px) { .arts > .art-tile { flex-basis: 260px; } .cursors > .cur-tile { flex-basis: 138px; } }
/* стрелки по бокам ленты */
.rail-btn { position: absolute; top: 50%; z-index: 3; width: 42px; height: 38px; margin-top: -22px; display: grid; place-items: center; background: var(--panel); color: var(--ink); border: 0; cursor: pointer;
  box-shadow: 0 -3px 0 0 var(--edge), 0 3px 0 0 var(--edge), -3px 0 0 0 var(--edge), 3px 0 0 0 var(--edge), 4px 4px 0 0 var(--sh), 4px 7px 0 0 var(--sh), 7px 4px 0 0 var(--sh); transition: transform .1s steps(2), opacity .15s; }
.rail-btn.prev { left: -14px; } .rail-btn.next { right: -14px; }
.rail-btn svg.pxi { width: 24px; height: auto; } .rail-btn svg.pxi[data-n="arrow"] { width: 32px; height: 18px; }
.rail-btn.prev svg.pxi { transform: scaleX(-1); }
.rail-btn:hover { background: var(--mint); transform: translateY(-2px); }
.rail-btn[hidden] { display: none; }
@media (pointer: coarse) { .rail-btn { display: none; } }
