/* =========================================================================
   POTOM · тема «пыльная библиотека»
   Чернильная зелень вместо бумаги, лайм как источник света, пыль в воздухе.
   Ни одного скругления, углы срезаны скобками, тени — свечение, а не отступ.

   Палитра:
     ink-900  #060805   фон
     ink-800  #0a0d08   панель
     ink-700  #10150c   карточка
     ink-600  #182013   ховер
     lime     #c4ff3e   главный акцент / свет
     violet   #8b5cf6   вторичный (редкость, смена)
     amber    #ffb01f   внимание
     rouge    #ff4d6d   опасность, мифическая рамка
     bone     #e9efd9   текст
   ========================================================================= */

:root {
  --ink-900: #060805;
  --ink-800: #0a0d08;
  --ink-700: #10150c;
  --ink-600: #182013;
  --line: #223018;
  --line-soft: #1b2513;
  --bone: #e9efd9;
  --bone-dim: #b9c4a6;
  --muted: #83917a;
  --lime: #c4ff3e;
  --lime-dim: #9ad12b;
  --violet: #8b5cf6;
  --amber: #ffb01f;
  --rouge: #ff4d6d;
  --teal: #3fd3c6;
  --glow-lime: 0 0 24px rgba(196, 255, 62, .16);
  --glow-lime-strong: 0 0 30px rgba(196, 255, 62, .38);
  --r: 0px;
  --display: 'Handjet', 'IBM Plex Mono', monospace;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --nav-h: 62px;
  --grain: rgba(196, 255, 62, .045);
}

/* светлая тема — опция, включается тумблером */
html.light {
  --ink-900: #eef1e3;
  --ink-800: #e6ead9;
  --ink-700: #f6f8ee;
  --ink-600: #dfe5d1;
  --line: #b9c4a6;
  --line-soft: #cdd6bd;
  --bone: #11150c;
  --bone-dim: #2f3a26;
  --muted: #5c6a51;
  --lime: #5f8f00;
  --lime-dim: #4d7500;
  --violet: #5b3fd0;
  --amber: #a86a00;
  --rouge: #c22b45;
  --teal: #0f766e;
  --glow-lime: 0 0 18px rgba(95, 143, 0, .12);
  --glow-lime-strong: 0 0 24px rgba(95, 143, 0, .22);
  --grain: rgba(17, 21, 12, .05);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--ink-900);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ── атмосфера: зерно, виньетка, пыль ───────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(var(--grain) .7px, transparent .8px),
    radial-gradient(rgba(255, 255, 255, .022) .5px, transparent .6px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 2px 3px;
  opacity: .9;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(196, 255, 62, .07), transparent 55%),
    radial-gradient(90% 60% at 50% 120%, rgba(139, 92, 246, .07), transparent 60%),
    radial-gradient(140% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}

.dust-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.dust-field i {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--lime);
  opacity: 0;
  border-radius: 50%;
  animation: drift linear infinite;
  box-shadow: 0 0 6px rgba(196, 255, 62, .6);
}
@keyframes drift {
  0% { opacity: 0; transform: translate3d(0, 10vh, 0) scale(.6); }
  15% { opacity: .55; }
  85% { opacity: .28; }
  100% { opacity: 0; transform: translate3d(var(--dx, 20px), -95vh, 0) scale(1.1); }
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
::selection { background: var(--lime); color: #06210a; }

/* ── типографика ─────────────────────────────────────────────────────────── */
h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: .005em;
  line-height: .9;
  margin: 0;
  text-transform: uppercase;
}
h1 { font-size: clamp(44px, 9vw, 108px); }
h2 { font-size: clamp(30px, 5vw, 52px); }
h3 { font-size: clamp(20px, 2.6vw, 28px); }
p { margin: 0 0 12px; }
.mono { font-family: var(--mono); }

.kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker::before {
  content: '';
  width: 18px; height: 1px;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
}
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.dim { color: var(--bone-dim); }

/* ── каркас ──────────────────────────────────────────────────────────────── */
.section { position: relative; }
.bubble-slot { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); }

.wrap { position: relative; z-index: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 22px; }
.page { min-height: calc(100vh - var(--nav-h)); padding: 30px 0 100px; }

/* ── бегущая строка ──────────────────────────────────────────────────────── */
.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(196, 255, 62, .08), rgba(139, 92, 246, .08));
  color: var(--bone-dim);
  padding: 5px 0;
  white-space: nowrap;
}
.marquee__track {
  display: inline-block;
  animation: slide 34s linear infinite;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: .26em;
  text-transform: uppercase;
}
.marquee__track span { padding: 0 20px; }
.marquee__track b { color: var(--lime); font-weight: 400; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── шапка ───────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--ink-900) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px) saturate(120%);
}
.topbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 255, 62, .5), transparent);
}
.topbar__in { height: var(--nav-h); display: flex; align-items: center; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex: 0 0 auto; }
.brand__mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 23px;
  color: #06210a;
  background: var(--lime);
  box-shadow: 0 0 20px rgba(196, 255, 62, .45), inset 0 0 0 1px rgba(0, 0, 0, .25);
  clip-path: polygon(0 6px, 6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}
.brand__name {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: .18em;
  line-height: 1;
  text-shadow: 0 0 22px rgba(196, 255, 62, .25);
}
.brand__dot { color: var(--lime); }

.nav { display: flex; align-items: center; gap: 3px; margin-left: 10px; }
.navlink {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-dim);
  padding: 8px 11px;
  position: relative;
  transition: color .15s;
}
.navlink:hover { color: var(--bone); }
.navlink::after {
  content: '';
  position: absolute;
  left: 11px; right: 11px; bottom: 4px; height: 1px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s;
  box-shadow: 0 0 8px var(--lime);
}
.navlink:hover::after, .navlink.active::after { transform: scaleX(1); }
.navlink.active { color: var(--lime); }

.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 9px; }

.ticks {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--ink-700);
  padding: 6px 11px;
  font-size: 12px;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.ticks:hover { border-color: var(--lime); box-shadow: var(--glow-lime); }
.ticks b { font-family: var(--display); font-size: 20px; letter-spacing: .06em; line-height: 1; color: var(--lime); }
.ticks__coin {
  width: 11px; height: 11px;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.iconbtn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--ink-700);
  color: var(--bone-dim);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  transition: color .15s, border-color .15s, box-shadow .15s;
}
.iconbtn:hover { color: var(--lime); border-color: var(--lime); box-shadow: var(--glow-lime); }

.avatar {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  background: var(--ink-600);
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 17px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: border-color .15s, box-shadow .15s;
}
.avatar:hover { border-color: var(--lime); box-shadow: var(--glow-lime); }
.avatar img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) contrast(1.05); }

.menu {
  position: fixed;
  right: 22px;
  top: calc(var(--nav-h) + 10px);
  min-width: 224px;
  background: var(--ink-700);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6), var(--glow-lime);
  z-index: 60;
  padding: 6px;
  animation: drop .14s ease-out;
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.menu a, .menu button {
  display: block; width: 100%; text-align: left;
  background: none; border: 0;
  padding: 10px 11px;
  font-size: 12.5px;
  color: var(--bone-dim);
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.menu a:hover, .menu button:hover { background: var(--ink-600); color: var(--lime); }
.menu__hr { height: 1px; background: var(--line); margin: 5px 0; }

/* ── кнопки ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--ink-700);
  color: var(--bone);
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s, border-color .15s, box-shadow .15s, background .15s, transform .08s;
  position: relative;
}
.btn:hover { border-color: var(--lime); color: var(--lime); box-shadow: var(--glow-lime); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn--lime {
  background: var(--lime);
  border-color: var(--lime);
  color: #06210a;
  box-shadow: 0 0 26px rgba(196, 255, 62, .32);
}
.btn--lime:hover { background: #d4ff6b; color: #06210a; box-shadow: 0 0 40px rgba(196, 255, 62, .5); }
.btn--ink { background: transparent; }
.btn--danger { color: var(--rouge); border-color: rgba(255, 77, 109, .5); }
.btn--danger:hover { background: rgba(255, 77, 109, .12); color: var(--rouge); border-color: var(--rouge); box-shadow: 0 0 24px rgba(255, 77, 109, .3); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--bone-dim); }
.btn--ghost:hover { color: var(--lime); }
.btn--sm { padding: 8px 12px; font-size: 10px; }
.btn--wide { width: 100%; }
.btn--xl { padding: 17px 28px; font-size: 13px; }

/* ── поверхности ─────────────────────────────────────────────────────────── */
.panel {
  background: linear-gradient(180deg, rgba(196, 255, 62, .022), transparent 40%), var(--ink-700);
  border: 1px solid var(--line);
  padding: 18px;
  position: relative;
}
.panel + .panel { margin-top: 14px; }

/* угловые скобки — замена «бумажным» срезам */
.ticket {
  background:
    linear-gradient(180deg, rgba(196, 255, 62, .03), transparent 45%),
    var(--ink-700);
  border: 1px solid var(--line);
  padding: 20px;
  position: relative;
}
.ticket::before, .ticket::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--lime);
  pointer-events: none;
  opacity: .85;
}
.ticket::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; box-shadow: -2px -2px 12px -4px var(--lime); }
.ticket::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; box-shadow: 2px 2px 12px -4px var(--lime); }

.row { display: flex; gap: 12px; align-items: center; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.dashed {
  height: 1px;
  margin: 16px 0;
  background-image: linear-gradient(90deg, var(--line) 40%, transparent 0);
  background-size: 7px 1px;
  background-repeat: repeat-x;
}

/* ── поля ────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .label { font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.input, .select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--ink-800);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 0;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, textarea::placeholder { color: #5d6b53; }
.input:focus, .select:focus, textarea:focus { border-color: var(--lime); box-shadow: var(--glow-lime); }
textarea { resize: vertical; min-height: 110px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }

/* ── чипы / табы ─────────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line);
  background: var(--ink-800);
  color: var(--bone-dim);
  padding: 6px 11px;
  font-size: 11px;
  letter-spacing: .07em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color .14s, border-color .14s, background .14s, box-shadow .14s;
}
.chip:hover { color: var(--bone); border-color: #33452a; }
.chip.on {
  background: rgba(196, 255, 62, .1);
  border-color: var(--lime);
  color: var(--lime);
  box-shadow: inset 0 0 18px -8px var(--lime);
}
.chip.on::before { content: '×'; font-weight: 700; }
.chip--static { cursor: default; }
.chip--static:hover { border-color: var(--line); color: var(--bone-dim); }

.tabs { display: flex; border: 1px solid var(--line); background: var(--ink-800); }
.tab {
  flex: 1; border: 0; background: none; color: var(--bone-dim);
  padding: 10px 8px;
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer;
  border-right: 1px solid var(--line);
  transition: color .14s, background .14s;
}
.tab:last-child { border-right: 0; }
.tab:hover { color: var(--bone); }
.tab.on { background: rgba(196, 255, 62, .12); color: var(--lime); box-shadow: inset 0 -2px 0 var(--lime); }

/* ── лендинг: герой ──────────────────────────────────────────────────────── */
.hero { position: relative; padding: 56px 0 34px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero__title { font-size: clamp(52px, 11vw, 132px); letter-spacing: .04em; }
.hero__title .pot span:nth-child(1) { color: var(--bone); }
.hero__title .pot span:nth-child(2) { color: var(--lime); text-shadow: 0 0 40px rgba(196, 255, 62, .45); }
.hero__sub {
  font-family: var(--display);
  font-size: clamp(20px, 2.6vw, 30px);
  letter-spacing: .04em;
  color: var(--bone-dim);
  margin: 2px 0 16px;
}
.hero__lead { max-width: 52ch; font-size: 14.5px; color: var(--bone-dim); margin: 0 0 24px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { font-size: 11px; color: var(--muted); margin-top: 14px; line-height: 1.6; }

.hero__scene {
  position: relative;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 50% 110%, rgba(196, 255, 62, .13), transparent 60%),
    radial-gradient(80% 60% at 50% 0%, rgba(139, 92, 246, .12), transparent 60%),
    var(--ink-800);
  padding: 26px 20px 20px;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}
.hero__scene::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background: repeating-linear-gradient(90deg, rgba(196, 255, 62, .16) 0 1px, transparent 1px 26px);
  opacity: .5;
  mask-image: linear-gradient(transparent, #000);
}
/* полка: на ней стоят Пыльники, за ней — корешки непройденных игр */
.hero__shelf {
  position: absolute;
  left: 7%; right: 7%; bottom: 30%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--line) 12%, #3a4d2a 50%, var(--line) 88%, transparent);
  box-shadow: 0 0 18px rgba(196, 255, 62, .18);
}
.hero__shelf::before {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 100%; height: 46px;
  background:
    repeating-linear-gradient(90deg, rgba(196, 255, 62, .14) 0 3px, transparent 3px 11px),
    repeating-linear-gradient(90deg, rgba(139, 92, 246, .16) 0 5px, transparent 5px 23px),
    repeating-linear-gradient(90deg, rgba(233, 239, 217, .1) 0 2px, transparent 2px 17px);
  mask-image: linear-gradient(transparent, #000 60%);
  opacity: .75;
}
.hero__shelf::after {
  content: '';
  position: absolute; inset: 2px 0 auto 0; height: 40px;
  background: linear-gradient(180deg, rgba(6, 8, 5, .92), transparent);
}
.hero__mascots { display: flex; align-items: flex-end; gap: 22px; position: relative; z-index: 2; margin-bottom: 6px; }
.hero__caption { font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-top: 12px; z-index: 2; }

/* ── спрайты ─────────────────────────────────────────────────────────────── */
.sprite { display: block; image-rendering: pixelated; }
.sprite__glow { opacity: .22; filter: blur(2px); }
/* Анимация спрайтов живёт в sprites.js (requestAnimationFrame): одинаково
   работает в Chrome, Safari и Firefox. Здесь — только статичная база.
   Запасной вариант на CSS для случая «JS не загрузился»: */
.sprite--idle .sprite__body,
.sprite--idle .sprite__specks,
.sprite__zzz { transform-box: fill-box; transform-origin: center bottom; }
.sprite--firefly .sprite__glow { opacity: .55; }
@keyframes sprite-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.5px); } }
@keyframes specks { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes zzz { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; } }
@keyframes firefly-pulse { 0%, 100% { opacity: .25; } 50% { opacity: .7; } }
/* если JS отключён совсем — хотя бы дышим по-старому */
.no-js .sprite--idle .sprite__body { animation: sprite-bob 3.4s ease-in-out infinite; }
.no-js .sprite--idle .sprite__specks { animation: specks 4.6s ease-in-out infinite; }

/* ── витрина видов ───────────────────────────────────────────────────────── */
.species-card {
  border: 1px solid var(--line);
  background: radial-gradient(100% 70% at 50% 0%, rgba(196, 255, 62, .07), transparent 60%), var(--ink-700);
  padding: 20px 18px 18px;
  text-align: center;
  position: relative;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.species-card:hover { border-color: var(--lime); box-shadow: var(--glow-lime); transform: translateY(-2px); }
.species-card__art { display: grid; place-items: center; padding: 14px 0 18px; }
.species-card h3 { font-size: 26px; margin-bottom: 6px; }
.species-card p { font-size: 12.5px; color: var(--bone-dim); margin: 0; }
.species-card__tag {
  position: absolute; top: 12px; right: 12px;
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--lime);
  border: 1px solid rgba(196, 255, 62, .4);
  padding: 2px 6px;
}

/* ── старые блоки лендинга (шаги/статистика) ─────────────────────────────── */
.stat-strip { display: flex; flex-wrap: wrap; border: 1px solid var(--line); background: var(--ink-800); }
.stat-strip > div { padding: 14px 18px; border-right: 1px solid var(--line); flex: 1 1 auto; }
.stat-strip > div:last-child { border-right: 0; }
.stat-strip b { font-family: var(--display); font-size: 34px; display: block; line-height: 1; color: var(--lime); text-shadow: 0 0 22px rgba(196, 255, 62, .3); }
.stat-strip span { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

.steps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { border: 1px solid var(--line); background: var(--ink-700); padding: 18px; position: relative; overflow: hidden; }
.step::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 2px; height: 100%;
  background: linear-gradient(180deg, var(--lime), transparent);
  opacity: .6;
}
.step__n { font-family: var(--display); font-size: 44px; line-height: .8; color: var(--lime); display: block; margin-bottom: 8px; opacity: .9; }

/* ── автомат ─────────────────────────────────────────────────────────────── */
.machine {
  border: 1px solid var(--line);
  background:
    radial-gradient(100% 60% at 50% 0%, rgba(196, 255, 62, .06), transparent 60%),
    var(--ink-800);
  position: relative;
  overflow: hidden;
}
.machine__head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(196, 255, 62, .06), transparent);
}
.machine__plate {
  margin-left: auto;
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: .24em;
  color: var(--lime);
  text-shadow: 0 0 18px rgba(196, 255, 62, .5);
}
.tokens { display: flex; gap: 6px; }
.token {
  width: 14px; height: 14px;
  border: 1px solid var(--line);
  background: transparent;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.token.on { background: var(--lime); box-shadow: 0 0 10px var(--lime); }

.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px; }
.reel {
  position: relative;
  border: 1px solid var(--line);
  background: var(--ink-700);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.reel:hover { border-color: var(--lime); box-shadow: var(--glow-lime); transform: translateY(-2px); }
.reel__art { position: absolute; inset: 0; }
.reel__art img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.05) brightness(.92); }
.reel__art::after {
  content: '';
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, transparent 40%, rgba(4, 6, 3, .92) 100%);
}
.reel__fallback {
  position: absolute; inset: 0; z-index: 0;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 30px;
  color: var(--muted);
  background: repeating-linear-gradient(45deg, var(--ink-700) 0 8px, var(--ink-800) 8px 16px);
}
.reel__body { position: relative; z-index: 3; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 13px; }
.reel__name { font-family: var(--display); font-size: 22px; line-height: .95; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0, 0, 0, .9); }
.reel__meta { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--bone-dim); margin-top: 6px; }
.reel__plate {
  position: absolute; top: 9px; left: 9px; z-index: 4;
  background: var(--lime); color: #06210a;
  font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 6px;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(196, 255, 62, .55);
}
.reel__plate--catalog { background: var(--ink-900); color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.reel--spinning .reel__body { filter: blur(2px); animation: shake .12s linear infinite; }
.reel--spinning .reel__art { animation: roll .5s linear infinite; }
@keyframes shake { 50% { transform: translateY(-6px); } }
@keyframes roll { from { opacity: .2; } 50% { opacity: 1; } to { opacity: .2; } }

.lever {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 16px; border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(196, 255, 62, .04), transparent);
}
.lever__btn {
  border: 1px solid var(--lime);
  background: var(--lime);
  color: #06210a;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: .18em;
  padding: 10px 34px;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(196, 255, 62, .35);
  transition: box-shadow .15s, background .15s, transform .08s;
}
.lever__btn:hover { box-shadow: 0 0 48px rgba(196, 255, 62, .55); }
.lever__btn:active { transform: translateY(1px); }
.lever__btn:disabled { background: transparent; color: var(--muted); border-color: var(--line); box-shadow: none; cursor: not-allowed; }
.lever__note { color: var(--muted); font-size: 10.5px; letter-spacing: .1em; }

.cooldown { padding: 28px 16px; text-align: center; }
.cooldown__time {
  font-family: var(--display);
  font-size: clamp(48px, 9vw, 84px);
  letter-spacing: .08em;
  line-height: 1;
  color: var(--lime);
  text-shadow: 0 0 40px rgba(196, 255, 62, .45);
}

/* ── талон игры ──────────────────────────────────────────────────────────── */
.game-hero { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line);
  background: var(--ink-800);
  color: var(--bone-dim);
  padding: 3px 8px;
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
}
.badge--lime { background: rgba(196, 255, 62, .12); border-color: var(--lime); color: var(--lime); }
.badge--orange { background: rgba(255, 176, 31, .12); border-color: var(--amber); color: var(--amber); }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.shots img { border: 1px solid var(--line); aspect-ratio: 16/9; object-fit: cover; filter: saturate(.85) contrast(1.04); }

/* ── прогресс ────────────────────────────────────────────────────────────── */
.bar { height: 14px; border: 1px solid var(--line); background: var(--ink-800); position: relative; overflow: hidden; }
.bar > i {
  display: block; height: 100%;
  background: repeating-linear-gradient(90deg, var(--lime) 0 6px, rgba(196, 255, 62, .45) 6px 12px);
  box-shadow: 0 0 18px rgba(196, 255, 62, .55);
  transition: width .4s;
}
.bar__num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9.5px; letter-spacing: .16em; font-weight: 600; color: #06210a; mix-blend-mode: screen; }

/* ── коллекционные карточки ──────────────────────────────────────────────── */
.ccard {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--lvl, var(--line));
  background: var(--ink-700);
  overflow: hidden;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s, border-color .16s;
  padding: 0;
  text-align: left;
  width: 100%;
}
.ccard:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(0, 0, 0, .55), 0 0 22px -6px var(--lvl, var(--lime)); }
.ccard__frame { position: absolute; inset: 0; padding: 7px; display: flex; flex-direction: column; }
.ccard__art { position: relative; flex: 1; border: 1px solid color-mix(in oklab, var(--lvl, var(--line)) 60%, transparent); overflow: hidden; background: var(--ink-800); }
.ccard__art img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) contrast(1.05); }
.ccard__name {
  font-family: var(--display); font-size: 15px; line-height: 1;
  text-transform: uppercase; padding: 7px 2px 0; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ccard__lvl { font-size: 8px; letter-spacing: .18em; text-transform: uppercase; padding: 2px 2px 0; color: var(--lvl, var(--muted)); }
.ccard__seals { position: absolute; right: 5px; top: 5px; display: flex; flex-direction: column; gap: 4px; z-index: 3; }
.seal {
  width: 21px; height: 21px;
  border: 1px solid rgba(0, 0, 0, .5);
  background: var(--lime); color: #06210a;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 12px;
  transform: rotate(-6deg);
  box-shadow: 0 0 14px rgba(196, 255, 62, .45);
}

/* редкость */
.lvl-common    { --lvl: #7f8a72; }
.lvl-uncommon  { --lvl: #3fd3a0; }
.lvl-rare      { --lvl: #4aa8ff; }
.lvl-epic      { --lvl: #a679ff; }
.lvl-mythic    { --lvl: #ff4d6d; }
.lvl-legendary { --lvl: #ffb01f; }

/* эффекты карточек */
.fx-matte .ccard__art img { filter: saturate(.85) contrast(1.05); }
.fx-film .ccard__art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px);
  background-size: 3px 3px; mix-blend-mode: screen; opacity: .3;
}
.fx-scan .ccard__art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .3) 0 2px, transparent 2px 4px);
}
.fx-lamp .ccard__art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(circle at 50% 15%, rgba(255, 220, 130, .45), transparent 60%);
  mix-blend-mode: screen;
}
.fx-invert .ccard__art img { filter: invert(1) hue-rotate(180deg) saturate(1.1); }
.fx-neon .ccard__art { box-shadow: inset 0 0 26px color-mix(in oklab, var(--lime) 65%, transparent); }
.fx-glitch .ccard__art img { animation: glitch 3.2s steps(1) infinite; }
@keyframes glitch {
  0%, 92%, 100% { filter: saturate(.92); transform: none; }
  93% { filter: hue-rotate(80deg) saturate(2); transform: translateX(-2px); }
  95% { filter: invert(.2); transform: translateX(2px); }
  97% { filter: saturate(0) contrast(1.5); }
}
.fx-foil .ccard__art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: conic-gradient(from 0deg, rgba(255, 0, 128, .22), rgba(0, 200, 255, .22), rgba(255, 225, 0, .22), rgba(0, 255, 150, .22), rgba(255, 0, 128, .22));
  mix-blend-mode: overlay;
}
.fx-dust .ccard__art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(circle at 70% 80%, rgba(210, 190, 130, .4), transparent 62%);
  mix-blend-mode: screen;
}
.fx-eclipse .ccard__art::after {
  content: ''; position: absolute; inset: -20%; pointer-events: none; z-index: 2;
  background: conic-gradient(from 120deg, transparent, rgba(255, 255, 255, .7), transparent 60%);
  animation: spin 7s linear infinite;
  mix-blend-mode: screen;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── питомец ─────────────────────────────────────────────────────────────── */
.pet-scene {
  position: relative;
  border: 1px solid var(--line);
  background:
    radial-gradient(110% 80% at 50% 115%, rgba(196, 255, 62, .16), transparent 62%),
    radial-gradient(70% 50% at 50% 0%, rgba(139, 92, 246, .1), transparent 60%),
    var(--ink-800);
  display: grid;
  place-items: center;
  padding: 34px 22px;
  min-height: 300px;
  overflow: hidden;
}
.pet-scene__floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 24%;
  background: repeating-linear-gradient(90deg, rgba(196, 255, 62, .14) 0 1px, transparent 1px 24px);
  mask-image: linear-gradient(transparent, #000);
  opacity: .7;
}
.pet-scene__glow {
  position: absolute; width: 260px; height: 260px; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(196, 255, 62, .18), transparent 65%);
  filter: blur(10px);
  animation: firefly-pulse 4s ease-in-out infinite;
}
.pet-scene__name {
  position: absolute; left: 16px; bottom: 14px;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.pet-scene__mood {
  position: absolute; right: 16px; top: 14px;
  font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--lime);
  border: 1px solid rgba(196, 255, 62, .35);
  padding: 3px 8px;
}
.pet-svg { position: relative; z-index: 2; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6)); }

.needs { display: grid; gap: 10px; }
.need { display: grid; grid-template-columns: 72px 1fr 44px; gap: 10px; align-items: center; font-size: 12px; }
.need__bar { height: 10px; border: 1px solid var(--line); background: var(--ink-800); overflow: hidden; }
.need__bar i { display: block; height: 100%; background: var(--lime); box-shadow: 0 0 12px rgba(196, 255, 62, .6); }
.need--low .need__bar i { background: var(--rouge); box-shadow: 0 0 12px rgba(255, 77, 109, .6); }
.need span:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.item {
  border: 1px solid var(--line);
  background: var(--ink-800);
  padding: 13px;
  display: flex; flex-direction: column; gap: 9px;
  transition: border-color .15s, box-shadow .15s;
}
.item:hover { border-color: #33452a; }
.item__name { font-family: var(--display); font-size: 19px; line-height: 1; text-transform: uppercase; }
.item__price { font-size: 12px; display: flex; align-items: center; gap: 6px; color: var(--lime); font-variant-numeric: tabular-nums; }

/* ── парк ────────────────────────────────────────────────────────────────── */
.park {
  position: relative;
  border: 1px solid var(--line);
  height: 360px;
  overflow: hidden;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(139, 92, 246, .14), transparent 60%),
    radial-gradient(80% 40% at 50% 100%, rgba(196, 255, 62, .12), transparent 60%),
    var(--ink-800);
}
.park__moon {
  position: absolute; right: 42px; top: 30px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(233, 239, 217, .9), rgba(233, 239, 217, .25) 60%, transparent 70%);
  box-shadow: 0 0 60px rgba(233, 239, 217, .25);
}
.park__ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background: repeating-linear-gradient(90deg, rgba(196, 255, 62, .16) 0 1px, transparent 1px 30px);
  mask-image: linear-gradient(transparent, #000 45%);
}
.park__fog {
  position: absolute; inset: auto 0 0 0; height: 55%;
  background: linear-gradient(180deg, transparent, rgba(6, 8, 5, .8));
  pointer-events: none;
}
.walker {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: left 3.4s ease-in-out;
  cursor: pointer;
  background: none; border: 0; padding: 0;
}
.walker__name {
  font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase;
  background: var(--ink-900); border: 1px solid var(--line);
  padding: 1px 5px; white-space: nowrap; color: var(--bone-dim);
}
.walker--you .walker__name { border-color: var(--lime); color: var(--lime); box-shadow: 0 0 12px rgba(196, 255, 62, .4); }
.walker .sprite { filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); }
.bubble {
  max-width: 160px;
  background: var(--ink-700);
  border: 1px solid var(--lime);
  color: var(--bone);
  padding: 5px 8px;
  font-size: 11px;
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  animation: pop .18s ease-out;
  text-align: center;
  box-shadow: 0 0 18px rgba(196, 255, 62, .25);
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 5px); } }
.chat { display: flex; flex-direction: column; gap: 7px; max-height: 210px; overflow-y: auto; padding-right: 4px; }
.chat__msg { font-size: 12.5px; border-left: 1px solid var(--line); padding-left: 9px; color: var(--bone-dim); }
.chat__msg b { color: var(--bone); font-weight: 600; }
.chat__msg time { font-size: 10px; color: var(--muted); margin-left: 7px; }

/* ── модалки ─────────────────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 5, 2, .78);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 18px;
  animation: fade .16s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 640px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  background: var(--ink-700);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), var(--glow-lime);
  padding: 22px;
  animation: rise .18s ease-out;
  position: relative;
}
@keyframes rise { from { transform: translateY(12px); opacity: .5; } }
.modal--wide { max-width: 900px; }
.modal__close { position: absolute; right: 12px; top: 12px; }
.modal h3 { margin-bottom: 10px; }

.toast-wrap { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--ink-700);
  border: 1px solid var(--lime);
  color: var(--bone);
  padding: 10px 16px;
  font-size: 12.5px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .6), var(--glow-lime);
  animation: rise .16s ease-out;
  max-width: 90vw;
}
.toast--err { border-color: var(--rouge); color: #ffd9df; box-shadow: 0 10px 40px rgba(0, 0, 0, .6), 0 0 24px rgba(255, 77, 109, .35); }

/* ── колокольчик ─────────────────────────────────────────────────────────── */
.bell { position: relative; }
.bell__badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 16px; height: 16px; padding: 0 3px;
  background: var(--lime); color: #06210a;
  font-size: 9.5px; line-height: 16px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 0 14px rgba(196, 255, 62, .6);
}
.bell-panel {
  position: fixed; right: 22px; top: calc(var(--nav-h) + 10px);
  width: min(370px, calc(100vw - 24px));
  background: var(--ink-700);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .65), var(--glow-lime);
  z-index: 70;
  animation: drop .14s ease-out;
}
.bell-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.bell-item { display: flex; gap: 10px; padding: 11px 12px; text-decoration: none; border-bottom: 1px dashed var(--line-soft); transition: background .12s; }
.bell-item:hover { background: var(--ink-600); }
.bell-item__kind {
  flex: 0 0 auto; align-self: flex-start;
  font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid currentColor; padding: 1px 5px; margin-top: 2px;
}
.bell-item__kind--pet { color: var(--amber); }
.bell-item__kind--spin { color: var(--teal); }
.bell-item__kind--season { color: var(--violet); }
.bell-item__kind--challenge { color: var(--lime); }
.bell-item__body { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.bell-item__body b { font-size: 12.5px; }
.bell-item__body span { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.bell-panel__foot { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--ink-800); }

/* ── табло смены ─────────────────────────────────────────────────────────── */
.board { border: 1px solid var(--line); background: var(--ink-800); }
.board__head, .board__row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 62px 52px 70px;
  gap: 8px; align-items: center;
  padding: 9px 12px;
  font-size: 12.5px;
}
.board__head { background: rgba(196, 255, 62, .07); color: var(--muted); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.board__row { border-bottom: 1px solid var(--line-soft); }
.board__row:last-child { border-bottom: 0; }
.board__row.me { background: rgba(196, 255, 62, .09); box-shadow: inset 2px 0 0 var(--lime); }
.board .num { text-align: right; font-variant-numeric: tabular-nums; }
.board__rank { font-family: var(--display); font-size: 20px; line-height: 1; text-align: center; color: var(--muted); }
.board__rank.top { color: var(--lime); text-shadow: 0 0 16px rgba(196, 255, 62, .5); }
.board__name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.board__name a { text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board__name a:hover { color: var(--lime); }
.board__name img { width: 20px; height: 20px; border: 1px solid var(--line); object-fit: cover; flex: 0 0 auto; }
.board__ava {
  width: 20px; height: 20px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--ink-600); color: var(--lime);
  font-size: 9px; font-weight: 600;
}

/* ── служебное ───────────────────────────────────────────────────────────── */
.empty {
  border: 1px dashed var(--line);
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(196, 255, 62, .015);
}
.skeleton {
  background: repeating-linear-gradient(90deg, rgba(196, 255, 62, .06) 0 12px, transparent 12px 24px);
  animation: sk 1.1s linear infinite;
}
@keyframes sk { to { background-position: 24px 0; } }
.hidden { display: none !important; }
.center { text-align: center; }
.hint {
  border-left: 2px solid var(--lime);
  background: rgba(196, 255, 62, .07);
  padding: 9px 12px;
  font-size: 12.5px;
  color: var(--bone-dim);
}
.hint--warn { border-left-color: var(--amber); background: rgba(255, 176, 31, .08); }
.hint a { color: var(--lime); }
.only-mobile { display: none; }
.modal-art, .challenge-art {
  position: relative;
  border: 1px solid var(--line);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--ink-800);
}
.modal-art img, .challenge-art img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) contrast(1.05); }

/* ── подвал ──────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0 40px; color: var(--muted); font-size: 11.5px; }
.foot a { color: var(--bone-dim); }
.foot a:hover { color: var(--lime); }

/* ── нижняя навигация (моб.) ─────────────────────────────────────────────── */
.bottomnav { display: none; }

/* ── адаптив ─────────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 26px; }
  .game-hero { grid-template-columns: 130px minmax(0, 1fr); }
  .shots { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  :root { --nav-h: 56px; }
  .topbar__in { gap: 8px; }
  .brand__mark { width: 30px; height: 30px; font-size: 20px; }
  .brand__name { font-size: 21px; letter-spacing: .14em; }
  .ticks { padding: 5px 8px; gap: 6px; }
  .ticks b { font-size: 17px; }
  .ticks .tiny { display: none; }
  .iconbtn { width: 32px; height: 32px; }
  .avatar { width: 32px; height: 32px; font-size: 15px; }
  #themeBtn { display: none; }
  .hero__mascots .sprite { width: 78px; height: 78px; }
  .pet-scene { min-height: 240px; padding: 26px 14px; }
  .pet-scene__glow { width: 190px; height: 190px; }
  .park { height: 300px; }
  .walker .sprite { width: 46px !important; height: 46px !important; }
  .walker__name { font-size: 7.5px; }
  .board__rank { font-size: 16px; }
  .stat-strip b { font-size: 27px; }
  .modal { padding: 14px; }
  h2 { font-size: 30px; }
  body { font-size: 14.5px; }
  .wrap { padding: 0 13px; }
  .nav { display: none; }
  .page { padding-bottom: 86px; }
  .reels { grid-template-columns: 1fr; }
  .reel { aspect-ratio: 16 / 9; }
  .reel__art::after { background: linear-gradient(90deg, rgba(4, 6, 3, .82), transparent 85%); }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .modal { padding: 16px; }
  .hero { padding-top: 30px; }
  .hero__shelf { display: none; }
  .hero__mascots { gap: 12px; }
  .stat-strip > div { flex: 1 1 45%; }
  .board__head, .board__row { grid-template-columns: 26px minmax(0, 1fr) 48px 62px; }
  .board__head span:nth-child(4), .board__row > span:nth-child(4) { display: none; }
  .bell-panel { right: 8px; left: 8px; width: auto; }
  .only-mobile { display: inline-flex; }
  .bottomnav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: color-mix(in oklab, var(--ink-900) 94%, transparent);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(8px);
  }
  .bottomnav a {
    padding: 9px 2px 11px; text-align: center;
    font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase;
    text-decoration: none; color: var(--muted);
    border-right: 1px solid var(--line-soft);
  }
  .bottomnav a:last-child { border-right: 0; }
  .bottomnav a.active { color: var(--lime); background: rgba(196, 255, 62, .08); }
  .bottomnav i { display: block; font-size: 15px; font-style: normal; margin-bottom: 3px; }
  .lever { flex-direction: column; gap: 9px; }
  .lever__btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ── полка OPIK: адрес как библиотечный шифр ──────────────────────────────── */

/* шифр полки на рамке hero, в свободном верхнем углу */
.hero__shelf-code {
  position: absolute;
  right: 10px; top: 10px;
  z-index: 4;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(233, 239, 217, .55);
  background: rgba(6, 8, 5, .72);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px 1px 8px;
  text-shadow: 0 0 10px rgba(196, 255, 62, .28);
}

/* пара «объяснение + каталожная карточка» */
.shelfcard {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: 26px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(139, 92, 246, .10), transparent 60%),
    var(--ink-800);
}

.shelfcard__card {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px 18px 14px;
  border: 1px solid rgba(233, 239, 217, .28);
  border-radius: 2px;
  transform: rotate(-1.2deg);
  background:
    repeating-linear-gradient(180deg, rgba(233, 239, 217, .05) 0 1px, transparent 1px 22px),
    linear-gradient(160deg, #12170e, #0b0f09);
  box-shadow: 0 18px 34px -18px rgba(0, 0, 0, .9);
  font-family: var(--mono);
}
.shelfcard__card::before {
  content: '';
  position: absolute;
  top: 9px; right: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(6, 8, 5, .9);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .9), 0 0 0 1px var(--line);
}
.shelfcard__code {
  font-size: 26px;
  letter-spacing: .16em;
  color: var(--lime);
  text-shadow: 0 0 18px rgba(196, 255, 62, .22);
}
.shelfcard__title {
  font-size: 12px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--bone);
}
.shelfcard__meta {
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--muted);
}
.shelfcard__addr {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--bone-dim);
}

/* подвал */
.foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
  align-items: baseline;
}
.foot__code {
  color: var(--lime);
  letter-spacing: .12em;
  font-family: var(--mono);
  font-weight: 400;
}

@media (max-width: 860px) {
  .shelfcard { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .shelfcard__card { transform: rotate(-.6deg); }
  .hero__shelf-code { display: none; }
  .foot { padding-bottom: 96px; }
}

/* ── вход по ссылке на профиль прямо на главной ───────────────────────────── */
.hero__login {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
  margin-top: 18px;
  max-width: 560px;
}
.hero__login .input {
  flex: 1 1 260px;
  min-height: 52px;
  font-size: 13px;
}
.hero__login .btn { flex: 0 0 auto; }

.linklike {
  background: none;
  border: none;
  padding: 0;
  color: var(--lime);
  font: inherit;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px dashed rgba(198, 255, 62, .5);
}
@media (max-width: 620px) {
  .hero__login { flex-direction: column; }
  .hero__login .btn { width: 100%; }
}

/* предупреждение о непрочитанной библиотеке */
.libwarn {
  margin: 10px 0 4px;
  padding: 12px 14px;
  border: 1px dashed rgba(198, 255, 62, .35);
  background: rgba(198, 255, 62, .04);
}

/* ── «Сегодня»: бонус, серия, задания дня ─────────────────────────────────── */
.daily { background: linear-gradient(180deg, rgba(196,255,62,.045), transparent 70%); }
.daily-flame { color: var(--lime); font-size: 18px; line-height: 1; }
.daily-tasks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 14px; }
.daily-task { border: 1px solid var(--line); background: rgba(255,255,255,.02); padding: 10px 12px; }
.daily-bar { height: 4px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 8px; }
.daily-bar > i { display: block; height: 100%; background: var(--lime); box-shadow: 0 0 8px rgba(196,255,62,.5); transition: width .4s ease; }

/* ── достижения ──────────────────────────────────────────────────────────── */
.ach { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); background: rgba(255,255,255,.015); opacity: .78; }
.ach--got { opacity: 1; background: linear-gradient(180deg, rgba(196,255,62,.06), transparent 80%); border-color: rgba(196,255,62,.28); }
.ach__icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); font-family: var(--display); color: var(--muted); flex: 0 0 auto; }
.ach--got .ach__icon { color: var(--lime); border-color: rgba(196,255,62,.45); box-shadow: 0 0 12px rgba(196,255,62,.18); }

/* ── титул поддержавшего (косметика, ничего не даёт) ─────────────────────── */
.sup-title { font-family: var(--display); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; border: 1px solid currentColor; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.avatar--patron { box-shadow: 0 0 0 2px var(--sup, var(--lime)) inset, 0 0 14px var(--sup, var(--lime)); }
