/* =========================================================
   Autumn Drop — вёрстка Telegram Mini App
   ========================================================= */

:root {
  --bg: #0a0705;
  --bg-2: #120b07;
  --surface: #17100b;
  --surface-2: #1f160f;
  --surface-3: #2a1e14;
  --line: rgba(255, 168, 82, .12);
  --line-strong: rgba(255, 168, 82, .3);

  --text: #fff4e6;
  --muted: #a8917e;
  --dim: #6e5a4a;

  --accent: #ff8a1f;
  --accent-2: #ffb547;
  --accent-deep: #d9560b;
  --accent-glow: rgba(255, 138, 31, .45);

  --green: #4fd17a;
  --blue: #49a8ff;
  --violet: #a46bff;
  --danger: #ff6a5a;

  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-logo: "Cinzel", Georgia, serif;

  --gutter: 16px;
  --safe-top: max(10px, env(safe-area-inset-top));
  --frame-w: 390px;
  --frame-h: 844px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.35;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(255, 120, 20, .14), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(255, 90, 0, .10), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
svg { width: 1em; height: 1em; flex: none; overflow: visible; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.scene { display: block; width: 100%; height: 100%; }
.scene, .winter-scene, .map__terrain, .podium__bg { overflow: hidden; }
.float { animation: float 4s ease-in-out infinite; }

/* 3D-лис (js/fox3d.js): canvas поверх постера */
.fox3d { position: relative; }
.fox3d > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fox3d > canvas, .chest3d > canvas { opacity: 0; transition: opacity .35s ease; }
.fox3d__fallback { display: block; width: 100%; height: 100%; object-fit: contain; transition: opacity .35s ease; }
/* Постер сундука занимает ту же область, что и canvas */
.chest3d > .fox3d__fallback { position: absolute; inset: -4% -12% -6%; width: 124%; height: 110%; max-width: none; }
.is-3d > canvas { opacity: 1; }
.is-3d > .fox3d__fallback { opacity: 0; }
.avatar__img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.18) translateY(4%); }

@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes appear { from { opacity: 0; transform: scale(.92); } }

/* ---------- Сцена и «телефон» ---------- */

.stage { min-height: 100%; display: flex; justify-content: center; }
.device { width: 100%; height: 100vh; height: 100dvh; position: relative; } /* vh — для WebView без dvh */
.app { height: 100%; position: relative; }

@media (min-width: 720px) {
  body:not(.in-telegram) { --safe-top: 48px; }
  body:not(.in-telegram) .stage { align-items: center; padding: 32px 24px 32px 300px; }
  body:not(.in-telegram) .device {
    width: var(--frame-w);
    height: min(var(--frame-h), calc(100dvh - 64px));
    border-radius: 54px;
    padding: 9px;
    background: linear-gradient(160deg, #2e2219, #0e0906 40%, #241911);
    box-shadow: 0 0 0 1px rgba(255,170,90,.2), 0 40px 120px rgba(0,0,0,.7), 0 0 120px rgba(255,120,20,.12);
  }
  body:not(.in-telegram) .app { border-radius: 46px; overflow: hidden; }
  body:not(.in-telegram) .statusbar { display: flex !important; }
  body:not(.in-telegram) .home-indicator { display: block; }
}

/* ---------- Экран ---------- */

.screen { display: none; height: 100%; position: relative; }
.screen.is-active { display: block; }

.screen__frame {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 40% at 50% 0%, rgba(255, 128, 30, .1), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}

.screen__scroll {
  flex: 1;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--safe-top) var(--gutter) 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: none;
}
.screen__scroll::-webkit-scrollbar { display: none; }
.screen__scroll > * { flex-shrink: 0; }

.screen__footer {
  position: relative; z-index: 2;
  padding: 8px var(--gutter) max(10px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.home-indicator { display: none; width: 120px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); margin-top: 6px; }

.statusbar {
  display: none;
  position: absolute; z-index: 20; top: 0; left: 0; right: 0;
  height: 46px; padding: 6px 30px 0 34px;
  align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 15px; color: #fff;
  pointer-events: none;
}
.statusbar__icons { display: flex; align-items: center; gap: 6px; }
.sb-signal { width: 18px; height: 12px; }
.sb-wifi { width: 16px; height: 12px; }
.sb-battery { width: 27px; height: 12px; }

/* Падающие листья и угольки (заполняются из JS) */
.leaves-bg, .embers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.leaves-bg svg {
  position: absolute; top: -50px; width: var(--s, 22px); height: var(--s, 22px);
  left: var(--x); opacity: .8; filter: blur(var(--b, 0px)) brightness(.85);
  animation: fall var(--t, 9s) linear var(--d, 0s) infinite;
}
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  10% { opacity: .85; }
  100% { transform: translate(50px, 110vh) rotate(420deg); opacity: .3; }
}
.embers i {
  position: absolute; bottom: -10px; left: var(--x); width: var(--s, 3px); height: var(--s, 3px); border-radius: 50%;
  background: #ffcf6a; box-shadow: 0 0 6px 2px rgba(255, 150, 40, .8);
  animation: rise var(--t, 6s) linear var(--d, 0s) infinite;
}
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(var(--dx, 20px), -90vh); opacity: 0; }
}

/* Галерея всех экранов (#all) */
body.gallery { --safe-top: 48px; }
body.gallery .statusbar { display: flex; }
body.gallery .stage { padding: 32px 24px 72px; }
@media (min-width: 720px) { body.gallery .stage { padding-left: 300px; } }
body.gallery .device { width: 100%; height: auto; padding: 0; background: none; box-shadow: none; border-radius: 0; }
body.gallery .app {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 56px 22px;
  overflow: visible;
  border-radius: 0;
  max-width: 1840px;
  margin: 0 auto;
}
body.gallery .screen { display: block; height: 720px; }
body.gallery .screen__frame {
  border-radius: 40px;
  border: 1px solid rgba(255, 168, 82, .22);
  box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 6px #0e0906, 0 0 0 7px rgba(255,170,90,.15);
}
body.gallery .screen::after {
  content: attr(data-title);
  position: absolute; left: 0; right: 0; top: calc(100% + 16px);
  text-align: center; color: var(--muted); font-weight: 600; font-size: 14px;
}

/* ---------- Служебная навигация по экранам ---------- */

.screens-nav {
  position: fixed; inset: 0 auto 0 0; z-index: 50;
  width: 270px; padding: 24px 16px;
  display: flex; flex-direction: column; gap: 14px;
  background: rgba(18, 12, 8, .94);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform .3s ease, visibility .3s;
  overflow-y: auto;
}
.screens-nav.is-open { transform: none; visibility: visible; }
@media (min-width: 720px) {
  body:not(.in-telegram) .screens-nav { transform: none; visibility: visible; transition: none; }
  body:not(.in-telegram) .screens-toggle { display: none !important; }
}
.screens-nav__head { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.screens-nav__head b { display: block; font-weight: 800; font-size: 16px; }
.screens-nav__head small { color: var(--muted); }
.screens-nav__logo { width: 36px; height: 36px; filter: drop-shadow(0 4px 12px var(--accent-glow)); }
.screens-nav__list { display: flex; flex-direction: column; gap: 1px; }
.screens-nav__list a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; }
.screens-nav__list a:hover { background: var(--surface-2); color: var(--text); }
.screens-nav__list a.is-active { background: rgba(255, 138, 31, .14); color: var(--accent-2); }
.screens-nav__list a i { font-style: normal; font-size: 11px; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.screens-nav__all { margin-top: auto; display: flex; align-items: center; gap: 8px; justify-content: center; padding: 12px; border-radius: 12px; border: 1px dashed var(--line-strong); color: var(--accent-2); font-weight: 700; }
.screens-nav__all.is-active { background: rgba(255, 138, 31, .14); border-style: solid; }
.screens-toggle {
  position: fixed; z-index: 60; right: 10px; top: 50%;
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(36, 24, 17, .85); border: 1px solid var(--line-strong); color: var(--accent-2);
  font-size: 17px; backdrop-filter: blur(10px); opacity: .6;
}
body.in-telegram .screens-toggle, body.in-telegram .screens-nav { display: none; }

/* ---------- Общие элементы ---------- */

.topbar { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; min-height: 44px; position: relative; z-index: 2; }
.topbar--left { grid-template-columns: 1fr auto; }
.topbar--left .topbar__title { text-align: left; }
.topbar__title { font-weight: 800; font-size: 20px; letter-spacing: -.01em; text-align: center; white-space: nowrap; }
.topbar__title--lg { font-size: 24px; }
.topbar__title--gold {
  background: linear-gradient(180deg, #fff0c2 5%, #ffc04a 55%, #ff8a1f 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.topbar__stack { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.topbar__sub { color: var(--muted); font-size: 13px; text-align: center; }
.topbar__spacer { width: 40px; }
.topbar > :last-child:not(.topbar__title) { justify-self: end; }

/* Модальная шапка: крестик справа сверху, заголовок по центру ниже */
.topbar--modal { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 30px; }
.topbar--modal > .icon-btn { position: absolute; right: -6px; top: 0; }
.topbar--modal .topbar__title { font-size: 22px; color: #fff3df; text-shadow: 0 2px 12px rgba(255, 140, 30, .35); }
.topbar__crown { width: 22px; height: 22px; filter: drop-shadow(0 0 8px var(--accent-glow)); }

.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-size: 20px; color: var(--text);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  transition: background .2s, transform .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.icon-btn:active { transform: scale(.94); }
.icon-btn--clear { background: none; border-color: transparent; }
.icon-btn--clear:hover { background: rgba(255, 255, 255, .06); }
.icon-btn--glass { background: rgba(0, 0, 0, .35); border-color: rgba(255, 255, 255, .12); backdrop-filter: blur(8px); }
.icon-btn--round { border-radius: 50%; width: 40px; height: 40px; background: #1a1410; border-color: rgba(255, 255, 255, .08); font-size: 18px; color: #d8c8b8; }
.icon-btn--gold { font-size: 26px; background: radial-gradient(circle, #3a2410, #1a1008); border-color: rgba(255, 180, 80, .35); box-shadow: 0 0 14px rgba(255, 150, 40, .3); }
.icon-btn--accent { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 16px; border-radius: 10px;
  font-weight: 700; font-size: 13.5px; white-space: nowrap;
  color: #3a1a04;
  background: linear-gradient(180deg, #ffd27a, #f3a43a);
  box-shadow: 0 3px 10px rgba(255, 160, 40, .25), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(150, 70, 0, .25);
  transition: transform .15s, filter .2s, opacity .2s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn:disabled { cursor: default; }
.btn--sm { height: 32px; padding: 0 14px; font-size: 12.5px; border-radius: 9px; min-width: 82px; }
.btn--pill {
  height: 34px; min-width: 96px; border-radius: 10px; color: #fff3e2;
  background: linear-gradient(180deg, #ff9a4a, #e0601a);
  box-shadow: 0 4px 14px rgba(255, 110, 20, .35), inset 0 1px 0 rgba(255, 220, 170, .55);
}
.btn--primary {
  width: min(72%, 290px); height: 50px; border-radius: 16px; font-size: 17px; font-weight: 700;
  color: #fff5e8; text-shadow: 0 1px 2px rgba(120, 40, 0, .5);
  background: linear-gradient(180deg, #ffb54a, #ff8a24 50%, #e8640e);
  box-shadow: 0 0 0 1px rgba(255, 200, 120, .55) inset, 0 8px 28px rgba(255, 110, 20, .55), 0 0 40px rgba(255, 120, 20, .25), inset 0 -3px 0 rgba(140, 50, 0, .3);
}
.btn--ghost { color: var(--muted); background: rgba(255, 255, 255, .05); box-shadow: none; border: 1px solid var(--line); }
.btn--text { align-self: center; height: 48px; padding: 0 24px; background: none; box-shadow: none; color: #f4e6d6; font-weight: 700; font-size: 16px; margin-top: auto; }
.btn--text:hover { color: var(--danger); }
.btn.is-loading { opacity: .7; pointer-events: none; }

.card { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.list { display: flex; flex-direction: column; gap: 10px; }
.lead { text-align: center; color: var(--muted); font-size: 14px; }
#checkinLead { white-space: pre-line; }
.note { display: flex; align-items: center; justify-content: center; gap: 7px; color: #cdb8a4; font-size: 14px; }
.note svg { width: 18px; height: 18px; }
.section-title { font-size: 20px; font-weight: 800; }

.bar { height: 4px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.bar--lg { height: 9px; }
.bar > i {
  display: block; height: 100%; width: var(--p, 0%); border-radius: inherit;
  background: linear-gradient(90deg, #e2560a, var(--accent-2));
  box-shadow: 0 0 8px var(--accent-glow);
  transition: width .5s ease;
}
.tag { padding: 5px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 800; white-space: nowrap; color: var(--accent-2); background: rgba(255, 138, 31, .1); border: 1px solid rgba(255, 138, 31, .22); }

.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: block; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #ffcf86, #e2701c 70%);
  border: 2px solid rgba(255, 210, 130, .75);
  box-shadow: 0 0 14px rgba(255, 138, 31, .35);
}
.avatar svg { display: block; width: 100%; height: 100%; transform: translateY(10%) scale(1.08); }
.avatar--sm { width: 32px; height: 32px; border-width: 1.5px; }
.avatar--xl { width: 76px; height: 76px; border: 3px solid #ffc04a; box-shadow: 0 0 24px rgba(255, 150, 40, .5); }

/* ---------- Нижнее меню ---------- */

.tabbar {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  padding: 8px 10px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(14, 9, 6, .9), #0c0805);
  border-top: 1px solid rgba(255, 168, 82, .08);
}
.tabbar__item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0 5px; border-radius: 14px;
  font-size: 10px; font-weight: 700; color: #6e5a4a; transition: color .2s, background .2s;
}
.tabbar__item svg { font-size: 22px; color: #9a6a3a; }
.tabbar__item:hover { color: var(--muted); }
.tabbar__item.is-active { color: #ffb547; background: linear-gradient(180deg, rgba(255, 150, 50, .2), rgba(255, 120, 20, .06)); box-shadow: inset 0 0 0 1px rgba(255, 170, 80, .2); }
.tabbar__item.is-active svg { color: #ffb547; filter: drop-shadow(0 0 8px var(--accent-glow)); }

/* =========================================================
   1. Главная
   ========================================================= */

.home-hero {
  position: relative;
  margin: calc(-1 * var(--safe-top)) calc(-1 * var(--gutter)) 0;
  aspect-ratio: 375 / 470;
  background: #120602;
}
.home-hero > .scene { position: absolute; inset: 0; }
.home-hero__fox { position: absolute !important; z-index: 1; left: 15%; top: 19.5%; width: 74%; height: 63.5%; }
.home-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, var(--bg-2)); pointer-events: none; }

.home-top {
  position: absolute; z-index: 2; top: var(--safe-top); left: 0; right: 0;
  display: grid; grid-template-columns: 70px 1fr 70px; align-items: start;
  padding: 0 14px;
}
.home-top__back { width: 36px; height: 36px; display: grid; place-items: center; font-size: 22px; color: #f4e2cc; margin-top: 18px; }
.logo { display: flex; flex-direction: column; align-items: center; }
.logo small { font-size: 10px; color: rgba(255, 230, 200, .45); font-weight: 600; letter-spacing: .02em; }
.logo-title {
  margin-top: 2px; text-align: center;
  font-family: var(--font-logo); font-weight: 700; font-size: 35px; line-height: .98;
  text-transform: uppercase; letter-spacing: .015em;
  background: linear-gradient(180deg, #fff3cf 10%, #ffd27a 45%, #f59a2a 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #4a1a02) drop-shadow(0 0 14px rgba(255, 150, 40, .45));
}
.rank-pill {
  justify-self: end; margin-top: 14px;
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px 0 4px; border-radius: 99px;
  background: rgba(20, 10, 4, .65); border: 1px solid rgba(255, 190, 110, .3);
  font-size: 12px; font-weight: 800; color: #f4e2cc; backdrop-filter: blur(6px);
}
.rank-pill svg { width: 26px; height: 26px; }
.user-chip {
  position: absolute; z-index: 2; left: 14px; top: calc(var(--safe-top) + 74px);
  display: inline-flex; align-items: center; gap: 8px;
}
.user-chip .avatar { border-color: #ffc04a; }
.user-chip__text { display: flex; flex-direction: column; line-height: 1.15; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.user-chip__text b { font-size: 13px; }
.user-chip__text small { font-size: 10.5px; color: #e6b47a; font-weight: 700; }

.balances { display: grid; grid-template-columns: 1fr 1.45fr 1fr; gap: 8px; margin-top: -34px; position: relative; z-index: 2; }
.balance {
  --tint: 255, 170, 60;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; border-radius: 13px; font-size: 15px;
  background: linear-gradient(180deg, rgba(var(--tint), .16), rgba(16, 10, 6, .92) 70%);
  border: 1px solid rgba(var(--tint), .38);
  box-shadow: inset 0 0 12px rgba(var(--tint), .12), 0 4px 14px rgba(0, 0, 0, .4);
}
.balance b { font-weight: 800; }
.balance__icon { width: 24px; height: 24px; }
.balance--green { --tint: 70, 210, 120; }
.balance--blue { --tint: 80, 150, 255; }

.cta-card {
  display: flex; align-items: center; gap: 12px;
  min-height: 66px; padding: 10px 14px; border-radius: 18px;
  background: radial-gradient(120% 140% at 30% 0%, #ff9a2e, #e8600e 55%, #a83a06);
  border: 1.5px solid #ffb35a;
  box-shadow: 0 0 22px rgba(255, 120, 20, .55), 0 0 2px #ffcf8a, inset 0 0 22px rgba(255, 200, 120, .35);
  color: #fff4e6; position: relative; overflow: hidden;
}
.cta-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 45%, transparent 60%);
  transform: translateX(-100%); animation: shine 4s ease-in-out infinite;
}
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.cta-card__icon { width: 46px; height: 46px; filter: drop-shadow(0 3px 6px rgba(90, 30, 0, .55)); }
.cta-card__text { flex: 1; display: flex; flex-direction: column; text-shadow: 0 1px 2px rgba(90, 30, 0, .45); }
.cta-card__text b { font-weight: 800; font-size: 17px; }
.cta-card__text small { font-size: 13px; font-weight: 600; color: rgba(255, 236, 214, .78); }
.cta-card__arrow { font-size: 18px; opacity: .8; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 2px; }
.quick__item { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #cdb8a4; }
.quick__item:hover { color: var(--text); }
.quick__icon {
  --ring: 255, 180, 70;
  width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(var(--ring), .28), #160d08 70%);
  border: 2px solid rgba(var(--ring), .85);
  box-shadow: 0 0 16px rgba(var(--ring), .55), inset 0 0 14px rgba(var(--ring), .35);
  transition: transform .2s;
}
.quick__icon svg { width: 44px; height: 44px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); }
.quick__item:hover .quick__icon { transform: translateY(-2px); }
.quick__icon--violet { --ring: 170, 110, 255; }

/* =========================================================
   2. Ежедневный чек-ин
   ========================================================= */

.screen--checkin .screen__frame,
.screen--wheel .screen__frame,
.screen--event .screen__frame {
  background:
    radial-gradient(70% 38% at 50% 40%, rgba(255, 110, 15, .3), transparent 70%),
    linear-gradient(180deg, #160a04, #0a0604 85%);
}

.chest { position: relative; flex: 1 0 300px !important; margin-top: 8px; display: grid; place-items: center; }
.chest__glow { position: absolute; left: 50%; top: 52%; width: 320px; height: 220px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(255, 150, 40, .55), transparent); filter: blur(8px); }
.chest__art { position: relative; z-index: 2; width: 292px; height: 231px; filter: drop-shadow(0 0 22px rgba(255, 150, 40, .55)); }
.chest__fire { position: absolute; z-index: 1; left: 50%; top: calc(50% - 150px); width: 200px; height: 150px; transform: translateX(-34%); }
.chest__fire i {
  position: absolute; bottom: 0; width: 64px; height: 120px;
  border-radius: 50% 50% 45% 45% / 70% 70% 30% 30%;
  background: radial-gradient(ellipse at 50% 85%, #fff6c0, #ffc23a 30%, #ff7a12 60%, transparent 72%);
  filter: blur(2px);
  transform-origin: 50% 100%;
  animation: flame 1.1s ease-in-out infinite alternate;
}
.chest__fire i:nth-child(1) { left: 0; height: 80px; animation-delay: -.3s; }
.chest__fire i:nth-child(2) { left: 30px; height: 118px; animation-delay: -.7s; }
.chest__fire i:nth-child(3) { left: 62px; height: 150px; width: 70px; }
.chest__fire i:nth-child(4) { left: 96px; height: 128px; animation-delay: -.5s; }
.chest__fire i:nth-child(5) { left: 124px; height: 96px; animation-delay: -.9s; }
.chest__fire i:nth-child(6) { left: 146px; height: 70px; animation-delay: -.2s; }
@keyframes flame { to { transform: scaleY(1.12) scaleX(.9) skewX(5deg); opacity: .85; } }
.chest__pile { position: absolute; z-index: 3; left: 50%; top: calc(50% + 70px); width: 340px; height: 80px; transform: translateX(-50%); }
.chest.is-shaking .chest__art { animation: shake .5s ease-in-out 2; }
.chest.is-open .chest__art { animation: pop .6s ease-out forwards; }
@keyframes shake { 20% { transform: rotate(-6deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(3deg); } }
@keyframes pop { 40% { transform: scale(1.12); } 100% { transform: scale(1.03); filter: drop-shadow(0 0 50px rgba(255, 220, 100, .95)); } }

.rewards { display: flex; justify-content: center; gap: 20px; margin-top: 4px; }
.reward { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.reward__tile {
  width: 76px; height: 76px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(180deg, #1f150e, #130c08);
  border: 1px solid rgba(255, 168, 82, .14);
  transition: transform .3s, box-shadow .3s;
}
.reward__tile svg { width: 48px; height: 48px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.reward--hot .reward__tile { background: radial-gradient(circle at 50% 40%, #e2741e, #9a3a08); border: 1.5px solid #ffb35a; box-shadow: 0 0 18px rgba(255, 130, 30, .55); }
.reward b { font-size: 13px; font-weight: 700; color: #cdb8a4; }
.rewards.is-claimed .reward__tile { transform: translateY(-4px); box-shadow: 0 0 22px var(--accent-glow); border-color: var(--accent); }

/* =========================================================
   3. Колесо удачи
   ========================================================= */

.wheel-actions { display: flex; gap: 10px; width: 100%; }
.wheel-actions .btn { flex: 1; min-width: 0; }
.wheel-actions #spin5Btn { flex: 1.2; font-size: 14px; color: #ffcf7a; border: 1px solid rgba(255, 170, 60, .55); background: rgba(255, 140, 30, .12); }
.note--hint { opacity: .8; font-size: 12.5px; }
.spin-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; width: 100%; margin: 6px 0 4px; }
.spin-results li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; text-align: center; animation: spinPop .35s both; }
.spin-results li:nth-child(2) { animation-delay: .06s; } .spin-results li:nth-child(3) { animation-delay: .12s; }
.spin-results li:nth-child(4) { animation-delay: .18s; } .spin-results li:nth-child(5) { animation-delay: .24s; }
.spin-results svg { width: 40px; height: 40px; }
@keyframes spinPop { from { opacity: 0; transform: scale(.7); } }
.wheel { position: relative; width: min(100%, 346px); aspect-ratio: 1; margin: 64px auto 18px; }
.wheel__lantern { position: absolute; z-index: 4; left: -6px; top: -56px; width: 34px; height: 72px; filter: drop-shadow(0 0 12px rgba(255, 190, 80, .8)); }
.wheel__fox { position: absolute; z-index: 5; left: 50%; top: -52px; width: 74px; height: 72px; transform: translateX(-50%); }
.wheel__fox-head { width: 74px; height: 72px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .6)); }
.wheel__paw { position: absolute; bottom: -4px; width: 18px; height: 12px; border-radius: 50%; background: linear-gradient(#fff6ea, #e8cba8); border: 1px solid #a0784e; }
.wheel__paw--l { left: 14px; }
.wheel__paw--r { right: 14px; }
.wheel__pointer { position: absolute; z-index: 6; left: 50%; top: 10px; width: 26px; height: 34px; transform: translateX(-50%); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .6)); }
.wheel__rim {
  position: absolute; inset: 0; z-index: 2; border-radius: 50%; padding: 15px;
  background: radial-gradient(circle, #8a4a14 60%, #c98a3a 66%, #6a3008 70%), conic-gradient(from 0deg, #a85a14, #ffd986, #a85a14, #ffcf6b, #a85a14);
  background: conic-gradient(from 20deg, #7a3a0c, #e8a84a, #8a4a12, #ffd27a, #7a3a0c, #e8a84a, #8a4a12, #ffd27a, #7a3a0c);
  box-shadow: 0 0 0 3px #3a1604, 0 0 50px rgba(255, 130, 30, .45), inset 0 0 0 2px #ffe0a0, inset 0 0 0 5px #5a2a06, inset 0 0 18px rgba(0, 0, 0, .55);
}
.wheel__rivet { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff4c8, #b8761e); box-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.wheel__disc { position: relative; width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: 0 0 0 2px #2a1004; transition: transform 4.6s cubic-bezier(.17, .67, .12, 1); }
.wheel__hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #ffe2a0, #e8901f 55%, #8a4a0c);
  border: 4px solid #6a3008; box-shadow: 0 0 0 2px #ffd27a, 0 4px 14px rgba(0, 0, 0, .55);
}
.wheel__hub svg { width: 40px; height: 40px; filter: hue-rotate(10deg) brightness(1.15) drop-shadow(0 1px 1px rgba(90, 30, 0, .6)); }

/* =========================================================
   4. Квесты
   ========================================================= */

.banner { position: relative; overflow: hidden; margin: calc(-1 * var(--safe-top)) calc(-1 * var(--gutter)) 0; padding: var(--safe-top) var(--gutter) 0; }
.banner > .scene { position: absolute; inset: 0; }
.banner--quests { min-height: calc(var(--safe-top) + 120px); }
.banner--quests::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, var(--bg-2)); }
.banner__title { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: -2px; }
.banner__title h2 { font-size: 26px; font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.banner__title a { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.banner__title a svg { width: 15px; height: 15px; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.segmented__btn { height: 46px; border-radius: 14px; font-weight: 700; font-size: 14px; color: var(--muted); text-align: center; border: 1px solid transparent; transition: all .2s; }
.segmented__btn.is-active {
  color: #fff0dc;
  background: linear-gradient(180deg, #5a3618, #2e1a0c);
  border-color: #e8963a;
  box-shadow: 0 0 16px rgba(255, 140, 40, .35), inset 0 0 12px rgba(255, 170, 80, .2);
}

.progress-row { display: flex; justify-content: space-between; align-items: center; height: 46px; padding: 0 14px; border-radius: 14px; background: #150e0a; font-size: 14px; font-weight: 600; color: #cdb8a4; }
.progress-row b { color: var(--text); font-weight: 800; }

.quest { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: #150e0a; transition: opacity .3s; }
.quest.is-done { opacity: .6; }
.quest__icon {
  width: 52px; height: 52px; flex: none; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(160deg, #3a7ae0, #142f80);
  border: 1.5px solid rgba(160, 200, 255, .55);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, .25), 0 0 12px rgba(60, 130, 255, .25);
}
.quest__icon svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.quest__icon--violet { background: linear-gradient(160deg, #8a4ae8, #3a1a8a); border-color: rgba(210, 170, 255, .55); box-shadow: inset 0 2px 6px rgba(255, 255, 255, .25), 0 0 12px rgba(150, 90, 255, .3); }
.quest__icon--amber { background: linear-gradient(160deg, #c86a1a, #5a2406); border-color: rgba(255, 200, 120, .55); }
.quest__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.quest__text b { font-size: 14px; font-weight: 700; }
.quest__text small { font-size: 11px; color: var(--dim); font-weight: 600; }
.quest__text em { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-style: normal; font-size: 12px; font-weight: 600; color: #9fb89a; }
.quest__text em svg { width: 14px; height: 14px; }

/* =========================================================
   5. Карта квестов
   ========================================================= */

.map { position: relative; height: 100%; overflow: hidden; }
.map__terrain { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__top { position: absolute; top: 0; left: 0; right: 0; padding: var(--safe-top) var(--gutter) 0; z-index: 3; background: linear-gradient(rgba(0, 0, 0, .55), transparent); padding-bottom: 20px; }
.map-node {
  position: absolute; z-index: 2; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 5px 12px; border-radius: 12px; text-align: center;
  background: rgba(20, 12, 6, .82); border: 1px solid rgba(255, 200, 120, .45);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 14px rgba(255, 150, 40, .25);
  backdrop-filter: blur(4px);
  transition: transform .2s;
}
.map-node:hover { transform: translate(-50%, -50%) scale(1.05); }
.map-node b { font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.map-node small { font-size: 11px; font-weight: 700; color: var(--accent-2); }
.map-node--locked { border-color: rgba(255, 255, 255, .15); box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }
.map-node--locked small { color: var(--dim); }
.map__fox { position: absolute; z-index: 2; right: 8px; bottom: 82px; width: 92px; height: 100px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .6)); animation: float 4s ease-in-out infinite; }
.map__footer { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 24px var(--gutter) max(18px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(10, 6, 3, .9) 45%); }


/* =========================================================
   6. Друзья
   ========================================================= */

.banner--friends { aspect-ratio: 375 / 250; min-height: 0; }
.banner__fox3d { position: absolute !important; z-index: 1; left: 50.9%; top: 14.4%; width: 45.3%; height: 74.8%; }
.banner__gift { position: absolute; z-index: 2; left: 50.5%; top: 58%; width: 19%; height: 28.5%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.banner__heading { display: flex; flex-direction: column; gap: 6px; }
.banner__heading h2 { font-size: 24px; font-weight: 800; color: #ffd38a; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.banner__heading p { font-size: 13px; color: #cdb8a4; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }

.invite {
  position: relative; z-index: 2; margin-top: -30px;
  display: flex; flex-direction: column; gap: 12px; padding: 14px;
  border-radius: 18px; background: linear-gradient(180deg, #1a1218, #110b0c);
  border: 1px solid rgba(170, 120, 255, .16);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.invite__top { display: flex; align-items: center; gap: 12px; }
.invite__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.invite__label { font-weight: 800; font-size: 17px; }
.invite__link {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; width: 100%; min-width: 0;
  background: #241b1a; font-size: 13px; color: #cdb8a4; text-align: left;
}
.invite__link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite__link svg { flex: none; font-size: 16px; color: var(--accent-2); }
.invite__link:hover { background: #2c2120; }
.invite__share { width: 100%; height: 44px; font-size: 15px; }
.invite__share svg { font-size: 18px; }
.qr { flex: none; width: 76px; height: 76px; padding: 5px; border-radius: 10px; background: #f2ebe2; display: grid; gap: 0; overflow: hidden; }
.qr i { background: #1a1210; }
.qr span { background: transparent; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { min-width: 0; padding: 8px 6px; border-radius: 12px; text-align: center; background: #221918; display: flex; flex-direction: column; gap: 2px; }
.stat small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.stat b { font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bonuses { display: flex; flex-direction: column; gap: 8px; }
.bonus { display: grid; grid-template-columns: 26px 1fr 48%; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.bonus__icon { width: 22px; height: 22px; }
.bonus b { display: flex; align-items: center; justify-content: flex-end; min-height: 40px; padding: 0 14px; border-radius: 11px; background: #1b1310; font-weight: 800; font-size: 14px; text-align: right; }
.bonus .bonus__small { font-size: 11px; line-height: 1.2; color: #e6c79e; }

/* ---------- Чипы-фильтры и сетка подарков ---------- */

.chips { display: flex; gap: 8px; }
.chips--scroll { overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.chips--scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 16px; border-radius: 99px; font-weight: 700; font-size: 13.5px; color: var(--muted); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: all .2s; }
.chip.is-active { color: #2a1203; background: linear-gradient(180deg, #ffc565, var(--accent)); border-color: transparent; box-shadow: 0 4px 14px rgba(255, 138, 31, .3); }

.gift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* =========================================================
   8. Профиль
   ========================================================= */

.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head__name { display: block; font-size: 22px; font-weight: 800; }
.profile-head__nick { color: var(--muted); font-weight: 600; }

.level-card { padding: 12px 14px 14px; border-radius: var(--radius); background: linear-gradient(180deg, #2a1a0c, var(--surface)); border: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 6px; }
.level-card__row { display: flex; justify-content: space-between; align-items: center; }
.level-card__lvl { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--accent-2); }
.level-card__lvl svg { width: 20px; height: 20px; }
.level-card__xp { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.level-card__rank { color: var(--muted); font-size: 12.5px; font-weight: 600; }

.pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.pstat { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; padding: 10px 4px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.pstat svg { width: 22px; height: 22px; margin-bottom: 2px; }
.pstat b { font-size: 15px; font-weight: 800; }
.pstat small { font-size: 11px; color: var(--muted); font-weight: 600; }

.block { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); }
.block__head { display: flex; justify-content: space-between; align-items: center; }
.block__head b { font-weight: 800; }
.block__head span { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-weight: 700; font-size: 13px; }
.medals { display: flex; justify-content: space-between; }
.medal { position: relative; width: 50px; height: 50px; }
.medal > svg:first-child { width: 100%; height: 100%; filter: drop-shadow(0 0 8px rgba(255, 170, 60, .4)); }
.medal__in { position: absolute; left: 25%; top: 25%; width: 50%; height: 50%; }
.medal--locked { filter: grayscale(1) brightness(.55); }
.mini-gifts { display: flex; justify-content: space-between; }
.mini-gifts span { width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #3a2412, #1a110a); border: 1px solid var(--line-strong); }
.mini-gifts svg { width: 34px; height: 34px; }

.links-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link-tile { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.link-tile svg { width: 28px; height: 28px; }
.link-tile:hover { border-color: var(--line-strong); }

/* =========================================================
   9. Коллекция подарков
   ========================================================= */

.gift-card {
  --rarity: #9aa4b4;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 8px 12px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line);
  text-align: center; animation: appear .3s ease both;
}
.gift-card__art {
  width: 100%; aspect-ratio: 1 / .82; border-radius: 14px; display: grid; place-items: center; margin-bottom: 6px;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--rarity) 35%, #1a110a), #160e08 75%);
  border: 1px solid color-mix(in srgb, var(--rarity) 45%, transparent);
}
.gift-card__art svg { width: 60%; height: 60%; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); }
.gift-card b { font-size: 13.5px; font-weight: 800; }
.gift-card small { font-size: 12px; font-weight: 700; color: var(--rarity); }
.gift-card--common { --rarity: #9aa4b4; }
.gift-card--rare { --rarity: #49a8ff; }
.gift-card--epic { --rarity: #b47cff; }
.gift-card--legend { --rarity: #ffb547; }
.gift-card--legend .gift-card__art { box-shadow: 0 0 20px rgba(255, 170, 60, .3); }


/* =========================================================
   10. Мини-игры
   ========================================================= */

.game-hero {
  position: relative; height: 236px; border-radius: 20px; overflow: hidden;
  border: 1.5px solid rgba(160, 120, 255, .55);
  box-shadow: 0 0 26px rgba(120, 80, 255, .35);
}
.game-hero > .scene { position: absolute; inset: 0; }
.game-hero__text { position: absolute; top: 16px; left: 16px; right: 16px; }
.game-hero__text h3 { font-size: 22px; font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.game-hero__text p { margin-top: 4px; font-size: 13px; color: #e6dcff; max-width: 210px; }
.game-hero__play {
  position: absolute; z-index: 2; left: 50%; top: 100px; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 150px; height: 64px; border-radius: 50% / 48%;
  font-weight: 800; font-size: 19px; color: #3a3404; text-shadow: 0 1px 0 rgba(255, 255, 220, .5);
  background: radial-gradient(120% 90% at 40% 25%, #fbf7a8, #d9d42a 45%, #8e8a0c);
  border: 2px solid #f8f0a0;
  box-shadow: 0 0 30px rgba(220, 230, 60, .55), inset 0 -6px 12px rgba(80, 70, 0, .35);
  transition: transform .15s, box-shadow .2s;
}
.game-hero__play::before { content: ""; position: absolute; left: 22%; top: 9px; width: 40%; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.game-hero__play:hover { box-shadow: 0 0 40px rgba(230, 240, 80, .75), inset 0 -6px 12px rgba(80, 70, 0, .35); }
.game-hero__play:active { transform: translateX(-50%) scale(.95); }
.game__leaf { position: absolute; top: -30px; left: var(--x); width: 24px; height: 24px; animation: drop 3.6s linear var(--d) infinite; }
.game__leaf svg { width: 100%; height: 100%; }
@keyframes drop { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(260px) rotate(260deg); opacity: .4; } }

.game { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: stretch; padding: 10px; border-radius: 20px; background: #120c09; }
.game__thumb { position: relative; height: 132px; border-radius: 16px; display: grid; place-items: center; overflow: hidden; }
.game__thumb-art { width: 92px; height: 92px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .55)); position: relative; z-index: 1; }
.game__thumb--orange { background: radial-gradient(circle at 50% 50%, #c25a10, #3a1406 72%); box-shadow: inset 0 0 0 1px rgba(255, 160, 60, .3); }
.game__thumb--blue { background: radial-gradient(circle at 50% 45%, #2a62c8, #0a1838 72%); box-shadow: inset 0 0 0 1px rgba(90, 160, 255, .35); }
.game__thumb-leaf { position: absolute; width: 34px; height: 34px; bottom: 6px; z-index: 2; }
.game__thumb-leaf--l { left: 6px; transform: rotate(-30deg); }
.game__thumb-leaf--r { right: 8px; transform: rotate(40deg); }
.game__thumb-coin { position: absolute; z-index: 2; width: 26px; height: 26px; right: 12px; bottom: 12px; }
.game__body { display: flex; flex-direction: column; gap: 4px; padding: 10px 2px 2px 0; }
.game__body h3 { font-size: 18px; font-weight: 800; }
.game__body p { color: var(--muted); font-size: 13px; }
.game__body .btn { margin-top: auto; align-self: flex-end; }

/* =========================================================
   11. Осеннее событие
   ========================================================= */

.collect-card { padding: 6px 14px; border-radius: 18px; background: rgba(24, 16, 11, .9); border: 1px solid rgba(255, 168, 82, .1); }
.collect { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.collect__icon { width: 32px; height: 32px; }
.collect__body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.collect__row { display: flex; justify-content: space-between; font-size: 14px; }
.collect__row b { font-weight: 700; }
.collect__row span { color: var(--muted); font-weight: 600; font-size: 13px; }

.prize { position: relative; display: grid; place-items: center; height: 240px; }
.prize__glow { position: absolute; width: 260px; height: 220px; background: radial-gradient(closest-side, rgba(255, 150, 40, .6), transparent); filter: blur(6px); }
.prize__art { position: relative; width: 190px; height: 190px; filter: drop-shadow(0 0 24px rgba(255, 140, 40, .55)); animation: float 3s ease-in-out infinite; }
.footer-gem { width: 18px; height: 18px; opacity: .8; }

/* =========================================================
   12. Настройки
   ========================================================= */

.screen--settings .screen__frame { background: radial-gradient(60% 30% at 0% 20%, rgba(255, 120, 20, .1), transparent 70%), linear-gradient(180deg, #0f0907, #090605); }
.settings-group { display: flex; flex-direction: column; }
.settings-group--card { border-radius: 16px; background: rgba(255, 255, 255, .025); margin-top: 6px; }
.setting { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 0 10px; text-align: left; border-radius: 12px; }
button.setting:hover { background: rgba(255, 255, 255, .03); }
.setting__icon { width: 20px; height: 20px; color: #f0b25a; }
.setting__label { flex: 1; font-weight: 600; font-size: 15px; }
.setting__value { color: var(--muted); font-size: 14px; }
.setting__chev { color: var(--dim); font-size: 16px; }
.switch { width: 46px; height: 26px; border-radius: 99px; position: relative; flex: none; background: rgba(255, 255, 255, .14); transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff2dc, #f0b25a); box-shadow: 0 2px 6px rgba(0, 0, 0, .45); transition: transform .25s; }
.switch[aria-checked="true"] { background: linear-gradient(90deg, #3e7a2a, #6aa84a); box-shadow: inset 0 0 6px rgba(0, 0, 0, .35); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* =========================================================
   13. Инвентарь
   ========================================================= */

.chips--fill { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chips--fill .chip { height: 42px; border-radius: 14px; font-size: 14px; text-align: center; background: #1a1210; border-color: transparent; color: var(--muted); }
.chips--fill .chip.is-active { color: #fff3e2; background: linear-gradient(180deg, #ffa443, #e0661a); box-shadow: 0 0 16px rgba(255, 130, 30, .45), inset 0 1px 0 rgba(255, 220, 170, .5); }

.inv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.inv {
  aspect-ratio: 1 / 1.1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 38%, #3a2412, #1a110a 72%);
  border: 1px solid rgba(255, 168, 82, .14);
  box-shadow: inset 0 0 18px rgba(255, 140, 40, .08);
  animation: appear .3s ease both;
}
.inv--blue { background: radial-gradient(circle at 50% 38%, #1f3866, #10141e 72%); }
.inv__icon { width: 60px; height: 60px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55)); }
.inv b { font-size: 13px; font-weight: 700; color: #e6d6c4; }

/* =========================================================
   14. Турниры
   ========================================================= */

.podium-head { display: grid; grid-template-columns: 40px 1fr 60px; align-items: center; }
.podium-head svg { width: 26px; height: 26px; }
.podium-head b { text-align: center; font-weight: 800; font-size: 16px; }
.podium-head span { text-align: right; color: var(--muted); font-size: 13px; font-weight: 600; }

.podium { position: relative; height: 232px; display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 6px; }
.podium__bg { position: absolute; inset: -20px -16px 0; width: calc(100% + 32px); height: calc(100% + 20px); }
.podium__flames path { animation: flick 1.4s ease-in-out infinite alternate; transform-origin: 50% 100%; transform-box: fill-box; }
.podium__flames path:nth-child(2n) { animation-delay: -.6s; }
@keyframes flick { to { transform: scaleY(1.12) skewX(4deg); } }
.podium__place { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.podium__fox { width: 92px; height: 101px; margin-bottom: -16px; position: relative; z-index: 1; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); }
.podium__place--1 .podium__fox { width: 112px; height: 123px; }
.crate {
  width: 100%; display: grid; place-items: center;
  border-radius: 6px;
  background:
    repeating-linear-gradient(180deg, transparent 0 22px, rgba(0, 0, 0, .3) 22px 24px),
    linear-gradient(180deg, #b0682a, #6a3410);
  border: 2px solid #3a1a06;
  box-shadow: inset 0 0 0 3px rgba(255, 190, 110, .2), inset 0 3px 0 rgba(255, 210, 150, .35), 0 10px 20px rgba(0, 0, 0, .5);
}
.crate i {
  font-style: normal; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 20px; color: #5a2a04;
  background: radial-gradient(circle at 40% 35%, #fff2b0, #f0a83a 60%, #a8600c);
  border: 2px solid #6a3a08; box-shadow: 0 0 12px rgba(255, 190, 80, .6);
}
.podium__place--1 .crate { height: 92px; }
.podium__place--2 .crate { height: 66px; }
.podium__place--3 .crate { height: 56px; }
.podium-names { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 6px; text-align: center; margin-top: -4px; }
.podium-names b { display: block; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; color: #e6d6c4; }
.podium-names small { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--muted); }
.podium-names small svg { width: 12px; height: 12px; }

.leaderboard { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.leader { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; height: 50px; padding: 0 16px; border-radius: 14px; background: #150e0a; }
.leader__pos { color: var(--muted); font-weight: 800; }
.leader b { font-size: 14.5px; font-weight: 700; }
.leader__pts { font-weight: 700; color: #e6d6c4; }

/* =========================================================
   15. Сезонное событие (зима)
   ========================================================= */

.screen--winter .screen__frame { background: linear-gradient(180deg, #0a1238, #0d1640 50%, #0a1030); }
.screen--winter .topbar { position: relative; z-index: 3; }
.winter-wrap { position: relative; width: calc(100% + 2 * var(--gutter)); margin: -58px calc(-1 * var(--gutter)) 0; }
.winter-scene { display: block; width: 100%; height: auto; aspect-ratio: 375 / 400; }
.winter-wrap__fox { position: absolute !important; z-index: 1; left: 30.1%; top: 22.5%; width: 45.9%; height: 47.5%; }
.snowfall { position: absolute; inset: 0 0 auto; height: 60%; z-index: 2; pointer-events: none; overflow: hidden; }
.snowfall i { position: absolute; top: -10px; left: var(--x); width: 4px; height: 4px; border-radius: 50%; background: #e6f1ff; box-shadow: 0 0 6px #fff; animation: snow 7s linear var(--d) infinite; }
@keyframes snow { to { transform: translate(24px, 520px); opacity: .2; } }
.winter-title { text-align: center; font-weight: 800; font-size: 30px; margin-top: -40px; position: relative; z-index: 2; color: #fff; text-shadow: 0 2px 16px rgba(80, 140, 255, .5); }
.screen--winter .lead { color: #b8c6e0; margin-top: -6px; }
.countdown { display: flex; justify-content: center; align-items: flex-start; gap: 10px; margin-top: 6px; }
.countdown__cell { min-width: 70px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.countdown__cell b { font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.countdown__cell small { font-size: 11.5px; color: #8c9cbc; font-weight: 600; }
.countdown__sep { font-size: 38px; font-weight: 800; line-height: 1; color: #fff; }

/* ---------- Тост ---------- */

.toast {
  position: fixed; left: 50%; bottom: 110px; z-index: 100; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 14px;
  background: rgba(40, 26, 16, .97); border: 1px solid var(--line-strong); box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
  font-weight: 700; font-size: 14px; text-align: center;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .3s, opacity .3s;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
@media (min-width: 720px) { body:not(.in-telegram) .toast { left: calc(50% + 135px); } }

/* ---------- Узкие экраны ---------- */

@media (max-width: 360px) {
  :root { --gutter: 12px; }
  .logo-title { font-size: 30px; }
  .quick__icon { width: 60px; height: 60px; }
  .quick__icon svg { width: 38px; height: 38px; }
  .countdown__cell b { font-size: 38px; }
  .topbar__title { font-size: 19px; }
  .game { grid-template-columns: 112px 1fr; }
  .game__thumb { height: 112px; }
}

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

/* =========================================================
   Живые данные: состояния, шторка, мини-игры
   ========================================================= */

body.is-loading [data-bind],
body.is-loading [data-user] { color: transparent; background: rgba(255, 255, 255, .08); border-radius: 6px; }

/* Мои рефералы */
.ref-count { margin-left: 4px; font-size: 14px; font-weight: 700; color: var(--dim); }
.ref-list { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.ref-friend { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #1b1310; border: 1px solid var(--line); }
.ref-friend__ava { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-weight: 800; font-size: 16px; color: #3a2200; background: linear-gradient(180deg, #ffd27a, #f29a2e); }
.ref-friend.is-pending .ref-friend__ava { color: var(--muted); background: rgba(255, 255, 255, .08); }
.ref-friend__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ref-friend__text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.ref-friend__text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--dim); }
.ref-friend__income { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-style: normal; text-align: right; white-space: nowrap; }
.ref-friend__income b { font-weight: 800; font-size: 13.5px; color: #9fd89a; }
.ref-friend__income small { font-size: 11px; color: var(--dim); }
.ref-friend__income.is-zero b { color: var(--dim); }
.ref-more { width: 100%; margin-top: 10px; }
.empty { padding: 18px 12px; text-align: center; color: var(--muted); font-size: 13.5px; list-style: none; }
.empty--wide { grid-column: 1 / -1; }

.btn--claim {
  color: #fff4e6;
  background: linear-gradient(180deg, #ff9a4a, #e0601a);
  box-shadow: 0 0 14px rgba(255, 120, 20, .45), inset 0 1px 0 rgba(255, 220, 170, .55);
  animation: claimPulse 1.6s ease-in-out infinite;
}
@keyframes claimPulse { 50% { box-shadow: 0 0 22px rgba(255, 140, 40, .75), inset 0 1px 0 rgba(255, 220, 170, .55); } }
.btn:disabled { opacity: .55; }
.btn.is-loading { opacity: .65; pointer-events: none; }
.btn--primary:disabled { filter: grayscale(.45); box-shadow: none; }

/* Тост с кнопкой «Повторить» */
.toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: 12px; }
.toast__action { padding: 6px 12px; border-radius: 9px; font-weight: 800; color: #2a1203; background: linear-gradient(180deg, #ffd27a, #f3a43a); }

/* Друзья */
.invite__share { grid-column: 1 / -1; justify-self: start; }
.bonus span small { color: var(--dim); font-weight: 600; }
.bonus .bonus__done { color: #9fd89a; }
.bonus .btn { justify-self: end; }

/* Карта */
.map-node--done { border-color: #9fd89a; }
.map-node--done small { color: #9fd89a; }
#mapCollect:disabled { font-size: 14px; }

/* Инвентарь */
.inv { cursor: pointer; position: relative; }
.inv__badge { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.gift-card--missing .gift-card__art svg { filter: grayscale(1) brightness(.45); }
.gift-card--missing small { color: var(--dim) !important; }
.mini-gifts .is-empty { border-style: dashed; opacity: .5; }

/* Турниры */
.podium-names .is-me b { color: var(--accent-2); }
.leader--self { border: 1px solid rgba(255, 168, 82, .45); }
.leader.leader--me { display: grid; grid-template-columns: 26px 1fr auto; margin-top: 2px; background: rgba(255, 138, 31, .12); border: 1px solid rgba(255, 168, 82, .4); }
.leader.leader--me[hidden] { display: none; }
.leader--me > b:only-child { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }

/* Мини-игры: подписи лимитов */
.game__rounds, .game-hero__rounds { font-size: 11px; color: var(--muted); font-weight: 600; }
.game-hero__rounds {
  position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap;
  padding: 4px 12px; border-radius: 99px; text-align: center; color: #efe8ff; background: rgba(30, 14, 60, .55); backdrop-filter: blur(4px);
}

/* Вне Telegram: вместо игры — переход в бота */
body.no-tg > :not(.tg-gate):not(script) { display: none !important; }
.tg-gate {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px 16px; text-align: center; background: radial-gradient(circle at 50% 35%, #2a1a0e, #0a0705 70%);
}
.tg-gate[hidden] { display: none; }
.tg-gate__fox { width: 220px; height: 220px; max-width: 60vw; max-height: 60vw; object-fit: contain; }
.tg-gate__title { margin: 0; font-size: 34px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; }
.tg-gate__text { margin: 0 0 8px; color: var(--muted, #b9a58f); font-size: 15px; }
.tg-gate__btn { min-width: 240px; text-decoration: none; }

/* ---------- Нижняя шторка ---------- */

.sheet { position: fixed; inset: 0; z-index: 80; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .25s; }
.sheet__body {
  position: absolute; left: 50%; bottom: 0; width: min(100%, 430px); max-height: 80vh; overflow-y: auto;
  transform: translate(-50%, 100%); transition: transform .25s ease;
  padding: 10px 20px max(24px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0; background: linear-gradient(180deg, #241811, #120b07);
  border: 1px solid var(--line-strong); border-bottom: 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; gap: 10px; text-align: center;
}
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet.is-open .sheet__body { transform: translate(-50%, 0); }
@media (min-width: 720px) { body:not(.in-telegram) .sheet__body { left: calc(50% + 135px); } }
.sheet__grip { align-self: center; width: 40px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); }
.sheet__item svg { width: 88px; height: 88px; filter: drop-shadow(0 8px 18px rgba(255, 140, 40, .45)); }
.sheet__title { font-size: 20px; font-weight: 800; }
.sheet__sub { color: var(--accent-2); font-weight: 700; font-size: 14px; }
.sheet__text { color: #cdb8a4; font-size: 14px; }
.sheet__text--muted { color: var(--muted); font-size: 13px; }
.sheet .btn--primary { align-self: center; }
.sheet__tasks { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.sheet__tasks li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); font-size: 14px; }
.sheet__tasks i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--dim); }
.sheet__tasks .is-done i { border-color: #6aa84a; background: #6aa84a; box-shadow: 0 0 8px rgba(106, 168, 74, .6); }
.sheet__tasks small { color: var(--muted); font-weight: 700; }
.sheet__reward { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--accent-2); font-weight: 700; font-size: 14px; }
.sheet__reward svg { width: 22px; height: 22px; }

/* ---------- Окно мини-игры ---------- */

.game-modal { position: fixed; inset: 0; z-index: 70; display: flex; justify-content: center; background: rgba(5, 3, 2, .7); }
.game-modal__frame {
  position: relative; width: min(100%, 430px); height: 100%; display: flex; flex-direction: column;
  background: radial-gradient(80% 40% at 50% 30%, rgba(255, 120, 20, .25), transparent 70%), linear-gradient(180deg, #160a04, #0a0604);
}
@media (min-width: 720px) {
  body:not(.in-telegram) .game-modal { padding-left: 270px; align-items: center; }
  body:not(.in-telegram) .game-modal__frame { width: var(--frame-w); height: min(var(--frame-h), calc(100dvh - 64px)); border-radius: 46px; overflow: hidden; border: 1px solid var(--line-strong); }
}
.game-modal[data-game="leaves"] .game-modal__frame { background: linear-gradient(180deg, #1a2a8a, #3a2a9a 55%, #6a2a8a); }
.game-modal[data-game="chests"] .game-modal__frame { background: radial-gradient(80% 50% at 50% 40%, rgba(60, 120, 255, .25), transparent 70%), linear-gradient(180deg, #0c1230, #070a18); }
.game-modal__top { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: max(14px, env(safe-area-inset-top)) 12px 6px; }
@media (min-width: 720px) { body:not(.in-telegram) .game-modal__top { padding-top: 48px; } }
.game-modal__top h2 { text-align: center; font-size: 20px; font-weight: 800; }
.game-hud { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 16px 8px; }
.game-hud span { display: flex; flex-direction: column; align-items: center; padding: 8px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .08); }
.game-hud small { font-size: 11px; color: rgba(255, 240, 220, .7); font-weight: 700; }
.game-hud b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.game-field { position: relative; flex: 1; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.game-panel { position: absolute; inset: 0; top: 70px; display: grid; place-items: center; padding: 24px; z-index: 3; }
.game-panel[hidden] { display: none; }
.game-intro, .game-result { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 300px; }
.game-intro > svg { width: 110px; height: 110px; filter: drop-shadow(0 10px 22px rgba(255, 150, 40, .5)); }
.game-intro p { color: #f0e2d2; font-size: 15px; }
.game-intro small, .game-result small { color: var(--muted); font-size: 12.5px; }
.game-intro .btn--primary, .game-result .btn--primary { width: 220px; }
.game-result { padding: 22px; border-radius: 22px; background: rgba(16, 10, 6, .88); border: 1px solid var(--line-strong); }
.game-result__score { font-size: 54px; font-weight: 800; line-height: 1; color: var(--accent-2); text-shadow: 0 0 22px var(--accent-glow); }
.game-result p { color: #f0e2d2; font-weight: 700; }
.game-result .game-result__points { color: var(--muted); font-size: 13px; font-weight: 600; }
.game-result__actions { display: flex; gap: 10px; }
.game-result__actions .btn { width: auto; height: 46px; padding: 0 18px; }

/* Лови листья */
.leaf-target {
  position: absolute; top: -60px; width: 58px; height: 58px; padding: 0; z-index: 1;
  animation: leafFall var(--t, 3s) linear forwards;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4));
}
.leaf-target svg { width: 100%; height: 100%; transform: rotate(var(--r, 0deg)); }
/* Высота падения задаётся из JS в пикселях (--fall): единицу dvh понимают не все WebView */
@keyframes leafFall { to { transform: translate(30px, var(--fall, 900px)) rotate(240deg); } }
/* Пойманный лист останавливается на месте и «лопается», а не прыгает вверх */
.leaf-target.is-hit { animation-play-state: paused; opacity: 0; transition: opacity .25s; pointer-events: none; }
.leaf-target.is-hit svg { transform: scale(1.6); transition: transform .25s; }

/* Pumpkin Smash */
.game-field--pumpkin { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 14px; padding: 20px 18px 40px; }
.hole { position: relative; display: grid; place-items: end center; border-radius: 50%; }
.hole__dirt { position: absolute; left: 8%; right: 8%; bottom: 10%; height: 34%; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #1a0c04, #3a1c08 60%, #5a2c10); box-shadow: inset 0 6px 10px rgba(0, 0, 0, .7); }
.pumpkin-target { position: absolute; left: 12%; right: 12%; bottom: 22%; aspect-ratio: 1; animation: popUp .18s ease-out; cursor: pointer; }
.pumpkin-target svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(255, 120, 20, .5)); }
.pumpkin-target.is-hit { transform: scale(1.3) rotate(-12deg); opacity: 0; transition: transform .22s, opacity .22s; }
@keyframes popUp { from { transform: translateY(40%) scale(.6); opacity: 0; } }

/* Поиск сундуков */
.game-field--chests { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 18px 16px 30px; align-content: center; }
.cell {
  position: relative; min-width: 0; aspect-ratio: 1; border-radius: 12px;
  background: linear-gradient(160deg, #2a4a8a, #12224a); border: 1px solid rgba(140, 190, 255, .35);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, .15); transition: transform .15s;
}
.cell svg { position: absolute; left: 22%; top: 22%; width: 56%; height: 56%; opacity: .35; }
.cell:active { transform: scale(.94); }
.cell.is-loading { animation: claimPulse .6s infinite; }
.cell.is-empty { background: rgba(255, 255, 255, .04); border-color: transparent; box-shadow: none; }
.cell.is-chest { background: radial-gradient(circle, #ffcf6a, #b8600c 70%); border-color: #ffe08a; box-shadow: 0 0 18px rgba(255, 190, 80, .6); }
.cell.is-chest svg, .cell.is-missed svg { left: 10%; top: 10%; width: 80%; height: 80%; opacity: 1; }
.cell.is-missed { opacity: .5; }

/* =========================================================
   Лисёнок (доход и прокачка), USDT, кошелёк, 3D-сундук
   ========================================================= */

.balance { color: inherit; }
.balance small { font-size: 10.5px; font-weight: 800; opacity: .7; }
.balance--green { --tint: 38, 196, 150; }

.fox-card {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px 10px 10px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(38, 161, 123, .18), rgba(16, 12, 8, .95) 75%);
  border: 1px solid rgba(80, 220, 170, .35);
  box-shadow: inset 0 0 18px rgba(40, 200, 150, .12), 0 6px 18px rgba(0, 0, 0, .35);
}
.fox-card__lvl {
  width: 44px; height: 44px; flex: none; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  background: radial-gradient(circle at 50% 30%, #ffb54a, #d9560b 70%); box-shadow: 0 0 14px var(--accent-glow), inset 0 1px 0 rgba(255, 230, 190, .7);
  color: #fff5e8; text-shadow: 0 1px 2px rgba(120, 40, 0, .5);
}
.fox-card__lvl b { font-size: 19px; font-weight: 800; }
.fox-card__lvl small { font-size: 9.5px; font-weight: 800; opacity: .85; }
.fox-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fox-card__text b { font-size: 14.5px; font-weight: 800; }
.fox-card__text small { font-size: 11.5px; color: #9fd8c0; font-weight: 600; }
.fox-card__bar > i, .fox-income .bar > i { background: linear-gradient(90deg, #138a64, #5fe0b8); box-shadow: 0 0 8px rgba(60, 220, 160, .5); }
.fox-card__btn { min-width: 0; padding: 0 10px; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #7ef0c8, #26a17b); color: #052a1e; box-shadow: 0 3px 12px rgba(40, 200, 150, .35), inset 0 1px 0 rgba(255, 255, 255, .6); }
.fox-card__btn.is-full { animation: pulse-green 1.6s ease-in-out infinite; }
@keyframes pulse-green { 50% { box-shadow: 0 0 0 4px rgba(80, 230, 170, .25), 0 0 22px rgba(80, 230, 170, .6); } }

.screen--fox .screen__frame { background: radial-gradient(90% 45% at 50% 28%, rgba(255, 120, 20, .28), transparent 70%), linear-gradient(180deg, #1a0b04, #0a0604 60%); }
.fox-stage { position: relative; height: 330px; margin-top: -8px; }
.fox-stage__glow { position: absolute; left: 50%; bottom: 14px; width: 260px; height: 60px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 150, 40, .55), transparent); filter: blur(6px); }
.fox-stage__fox { position: absolute !important; inset: 0 4% 34px; }
.fox-stage__badge {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: inline-flex; align-items: baseline; gap: 6px;
  padding: 7px 16px; border-radius: 99px; font-size: 13px; font-weight: 700; color: #ffe2bc;
  background: rgba(20, 10, 4, .8); border: 1px solid var(--line-strong); backdrop-filter: blur(6px);
}
.fox-stage__badge b { font-size: 18px; font-weight: 800; color: #fff4e6; }
.fox-stage__badge small { color: var(--muted); font-weight: 700; }

.fox-income { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.fox-income > small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.fox-income__amount { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; color: #e6fff6; }
.fox-income__amount svg { width: 30px; height: 30px; }
.fox-income__amount small { font-size: 14px; color: #9fd8c0; }
.fox-income__meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fox-income__meta b { color: #9fd8c0; }
.fox-claim { align-self: center; }
.fox-claim:disabled { filter: grayscale(.6) brightness(.8); }

.fox-upgrade { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.fox-upgrade__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.fox-upgrade__text b { font-size: 15px; font-weight: 800; }
.fox-upgrade__text small { font-size: 12px; color: var(--muted); font-weight: 600; }
.fox-upgrade__btn.is-unaffordable { filter: grayscale(.7) brightness(.8); }

.fox-levels { display: flex; flex-direction: column; gap: 6px; }
.fox-levels li { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: #150e0a; font-size: 13px; color: #cdb8a4; }
.fox-levels li b { color: var(--text); font-weight: 800; }
.fox-levels li small { color: var(--muted); font-weight: 700; }
.fox-levels li.is-current { background: linear-gradient(90deg, rgba(255, 138, 31, .2), #150e0a); border: 1px solid rgba(255, 160, 60, .45); }
.fox-levels li.is-done { opacity: .55; }
.fox-levels li .btn { height: 30px; padding: 0 12px; font-size: 12.5px; }
.fox-levels li .btn.is-unaffordable { opacity: .55; }

.segmented--3 { grid-template-columns: 1fr 1fr 1fr; }
.segmented__btn--usdt { display: inline-flex; align-items: center; justify-content: center; gap: 6px; position: relative; }
.segmented__btn--usdt svg { width: 18px; height: 18px; }
.segmented__dot { position: absolute; top: 8px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #5fe0b8; box-shadow: 0 0 8px #5fe0b8; }
[data-panel="quests:usdt"]:not([hidden]) { display: flex; flex-direction: column; gap: 10px; }
.quest__icon--usdt { background: linear-gradient(160deg, #2ab88c, #0b5a44); border-color: rgba(140, 255, 210, .55); box-shadow: inset 0 2px 6px rgba(255, 255, 255, .25), 0 0 12px rgba(40, 200, 150, .3); }
.quest__text em.is-usdt { color: #7ee8c4; }

.wallet-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 16px; text-align: left; background: linear-gradient(90deg, rgba(38, 161, 123, .16), #150e0a); border: 1px solid rgba(80, 220, 170, .3); }
.wallet-row__icon { width: 36px; height: 36px; flex: none; }
.wallet-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wallet-row__text b { font-size: 14px; font-weight: 800; }
.wallet-row__text small { font-size: 12px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-row.is-linked .wallet-row__text small { color: #7ee8c4; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.wallet-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.wallet-form label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.wallet-form input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; font: 600 14px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text);
  background: #0f0a07; border: 1px solid var(--line-strong); outline: none;
}
.wallet-form input:focus { border-color: #5fe0b8; box-shadow: 0 0 0 3px rgba(95, 224, 184, .18); }
.wallet-form .sheet__text--muted { font-size: 12px; }
.sheet__warn { padding: 10px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 600; color: #ffd9a8; background: rgba(255, 138, 31, .1); border: 1px solid rgba(255, 138, 31, .25); text-align: left; }

.pstat svg[class] { width: 22px; height: 22px; }

/* 3D-сундук чек-ина (js/fox3d.js): canvas поверх постера */
.chest3d { position: relative; }
.chest3d > canvas { position: absolute; inset: -4% -12% -6%; width: 124%; height: 110%; display: block; }
.chest3d.is-3d { filter: none; }
.chest.is-shaking .chest3d.is-3d, .chest.is-open .chest3d.is-3d { animation: none; }

/* =========================================================
   Админка (js/admin.js)
   ========================================================= */

.screen--admin .screen__frame { background: linear-gradient(180deg, #120c08, #0a0705); }
.screen--admin .screen__scroll { padding-bottom: 90px; }
.ad-tabs { position: sticky; top: -1px; z-index: 5; padding-top: 6px; padding-bottom: 8px; background: #110b08; }
.ad-body { display: flex; flex-direction: column; gap: 10px; }
.ad-h { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; font-size: 16px; font-weight: 800; }
.ad-h small { color: var(--muted); font-size: 12px; font-weight: 700; }
.ad-note { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.ad-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.ad-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: #150e0a; border: 1px solid var(--line); }
.ad-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.ad-field { flex: 1 1 90px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ad-field--wide { flex: 1 1 100%; }
.ad-field > span { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ad-field em { font-style: normal; height: 40px; display: flex; align-items: center; color: var(--dim); font-weight: 700; }
.ad-field input, .ad-field select, .ad-field textarea, .ad-search input, .ad-json {
  width: 100%; min-height: 40px; padding: 8px 10px; border-radius: 10px; font: 600 14px var(--font); color: var(--text);
  background: #0c0806; border: 1px solid var(--line-strong); outline: none;
}
.ad-field textarea { resize: vertical; line-height: 1.4; }
.ad-field input:focus, .ad-field select:focus, .ad-field textarea:focus, .ad-search input:focus, .ad-json:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 31, .15); }
.ad-check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 13.5px; font-weight: 700; }
.ad-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.ad-reward { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .025); border: 1px dashed var(--line); }
.ad-reward__title { font-size: 12.5px; color: var(--accent-2); }
.ad-row--item { flex-wrap: nowrap; }
.ad-row--item .ad-field--wide { flex: 1 1 auto; }
.ad-x { flex: none; width: 36px; height: 40px; border-radius: 10px; font-size: 20px; color: var(--danger); background: rgba(255, 106, 90, .08); }
.ad-link { align-self: flex-start; padding: 6px 2px; font-size: 13px; font-weight: 700; color: var(--accent-2); }
.ad-link--danger { color: var(--danger); }
.ad-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.ad-add { align-self: flex-start; }
.ad-chance { flex: none; min-width: 52px; height: 40px; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #9fd8c0; }
.ad-lvl { flex: none; align-self: center; width: 44px; font-size: 13px; }
.ad-badge { flex: none; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; color: var(--muted); background: rgba(255, 255, 255, .06); }
.ad-badge.is-on { color: #052a1e; background: #5fe0b8; }
.ad-badge.is-off { color: #fff; background: var(--danger); }
.ad-list { display: flex; flex-direction: column; gap: 8px; }
.ad-quest { border-radius: 14px; background: #150e0a; border: 1px solid var(--line); overflow: hidden; }
.ad-quest.is-open { border-color: var(--line-strong); }
.ad-quest__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.ad-quest__icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.ad-quest__icon svg { width: 24px; height: 24px; }
.ad-quest__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ad-quest__text b { font-size: 14px; }
.ad-quest__text small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-quest__body { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
.ad-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ad-stat { padding: 10px; border-radius: 12px; background: #150e0a; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.ad-stat small { font-size: 11px; color: var(--muted); font-weight: 700; }
.ad-stat b { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.ad-search { display: flex; gap: 8px; }
.ad-search .btn { height: 40px; }
.ad-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #150e0a; cursor: pointer; }
.ad-user__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ad-user__text b { font-size: 14px; }
.ad-user__text small { font-size: 11.5px; color: var(--muted); }
.ad-kv { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.ad-kv b { color: var(--text); }
.ad-kv--wrap span { white-space: nowrap; }
.ad-log { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: #150e0a; font-size: 13px; }
.ad-log small { color: var(--muted); font-size: 11.5px; }
.ad-log code, .ad-sub code { font-size: 11px; color: #cdb8a4; overflow-wrap: anywhere; }
.ad-json { min-height: 60vh; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.ad-broadcast { display: flex; flex-direction: column; gap: 10px; }
.ad-broadcast .btn--primary { align-self: center; }
.ad-danger { color: var(--danger) !important; }
.ad-give .btn { align-self: flex-start; }
.ad-savebar {
  position: absolute; z-index: 30; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 16px;
  background: rgba(30, 20, 12, .96); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
  font-size: 13px; font-weight: 700;
}
.ad-savebar span { flex: 1; }
.ad-savebar[hidden] { display: none; }

/* Звёзды за тап по лисёнку */
.home-hero__fox { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.home-hero__fox.is-tapped { animation: foxTap .22s ease-out; }
@keyframes foxTap { 40% { transform: scale(.95) translateY(4px); } }
.tap-hint {
  position: absolute; z-index: 3; left: 50%; top: calc(19.5% + 63.5% - 2px); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 99px; white-space: nowrap;
  font-size: 12px; font-weight: 800; color: #dbe8ff; background: rgba(10, 16, 40, .72); border: 1px solid rgba(110, 160, 255, .35);
  backdrop-filter: blur(6px); pointer-events: none;
}
.tap-hint svg { font-size: 16px; }
.tap-hint.is-done { color: var(--muted); border-color: var(--line); background: rgba(16, 10, 6, .75); }
.tap-plus {
  position: fixed; z-index: 60; pointer-events: none; display: inline-flex; align-items: center; gap: 3px;
  font-weight: 800; font-size: 18px; color: #bcd6ff; text-shadow: 0 2px 8px rgba(40, 90, 255, .6);
  animation: tapPlus .8s ease-out forwards;
}
.tap-plus svg { font-size: 18px; }
@keyframes tapPlus { to { transform: translateY(-70px) scale(1.15); opacity: 0; } }

/* Вывод USDT */
.withdraw-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 16px; text-align: left; background: linear-gradient(90deg, rgba(38, 161, 123, .16), #150e0a); border: 1px solid rgba(80, 220, 170, .3); }
.withdraw-row .btn { flex: none; background: linear-gradient(180deg, #7ef0c8, #26a17b); color: #052a1e; }
.stars-dep { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 18px; text-align: left; background: linear-gradient(100deg, rgba(255, 196, 60, .2), rgba(120, 70, 220, .14) 70%, #150e0a); border: 1px solid rgba(255, 200, 80, .4); box-shadow: 0 6px 22px rgba(255, 170, 40, .12); }
.stars-dep__icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; font-size: 24px; background: radial-gradient(circle, rgba(255, 215, 90, .35), rgba(255, 215, 90, .05)); }
.stars-dep__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stars-dep__text b { font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.stars-dep__text .hot-badge { margin-left: 0; }
.stars-dep__text small { font-size: 12px; color: var(--muted); }
.stars-dep .btn { flex: none; background: linear-gradient(180deg, #ffe08a, #f5a623); color: #3a2200; }
.sheet__item--emoji { font-size: 64px; line-height: 1; }
.hot-badge { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .3px; vertical-align: 2px; color: #fff; background: linear-gradient(90deg, #ff3d2e, #ff8a1f); box-shadow: 0 0 10px rgba(255, 80, 30, .55); animation: hot-pulse 1.6s ease-in-out infinite; }
.hot-badge[hidden] { display: none; }
@keyframes hot-pulse { 50% { box-shadow: 0 0 16px rgba(255, 110, 30, .9); transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .hot-badge { animation: none; } }
.stars-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.stars-preset { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; background: rgba(255, 200, 80, .08); border: 1px solid rgba(255, 200, 80, .3); }
.stars-preset b { font-size: 15px; }
.stars-preset small { font-size: 12px; color: #7ee8c4; font-weight: 700; }
.stars-preset[aria-busy] { opacity: .6; }
.withdraw-row--bonus { background: linear-gradient(90deg, rgba(255, 170, 50, .14), #150e0a); border-color: rgba(255, 180, 70, .3); }
.withdraw-row--bonus .btn { background: rgba(255, 255, 255, .06); color: #ffcf7a; border: 1px solid rgba(255, 180, 70, .35); }
.withdraw-hist { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.withdraw-hist li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); font-size: 13px; }
.withdraw-hist small { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; }
.wd-status { font-weight: 800; font-size: 12px; }
.wd-status--pending { color: var(--accent-2); }
.wd-status--paid { color: #5fe0b8; }
.wd-status--rejected { color: var(--danger); }
.wallet-form .wd-amount { display: flex; gap: 8px; }
.wallet-form .wd-amount input { flex: 1; }
.wallet-form .wd-amount .btn { height: 48px; }

/* Турниры: вкладки */
#tourTabs { margin-bottom: 2px; }
.ad-wd { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; background: #150e0a; border: 1px solid var(--line); }
.ad-wd.is-pending { border-color: rgba(255, 181, 71, .5); }
.ad-wd__top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.ad-wd code { font-size: 12px; color: #cdb8a4; overflow-wrap: anywhere; }
.ad-wd .ad-row .btn { flex: 1; }

/* Отсчёт до следующего сезона на главной */
.season-card {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: 18px;
  background: radial-gradient(120% 160% at 0% 0%, rgba(120, 170, 255, .28), transparent 60%), linear-gradient(180deg, #16203a, #0d1224);
  border: 1px solid rgba(140, 180, 255, .35); box-shadow: inset 0 0 18px rgba(110, 160, 255, .12), 0 6px 18px rgba(0, 0, 0, .35);
  color: #e6efff;
}
.season-card__icon { width: 34px; height: 34px; flex: none; color: #bcd6ff; filter: drop-shadow(0 0 8px rgba(140, 190, 255, .7)); }
.season-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.season-card__text b { font-size: 16px; font-weight: 800; }
.season-card__text small { font-size: 12px; color: #9fb4dc; font-weight: 600; }
.season-card__cd { display: flex; flex-direction: column; align-items: flex-end; }
.season-card__cd small { font-size: 10.5px; color: #8c9cbc; font-weight: 700; }
.season-card__cd b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.season-card.is-live .season-card__cd small { color: #7ee8c4; }

/* Пополнение */
.chips--wrap { flex-wrap: wrap; justify-content: center; }
.dep-box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dep-qr { width: 168px; height: 168px; padding: 10px; border-radius: 14px; }
.dep-addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.dep-box .sheet__warn { width: 100%; }
.withdraw-row + .withdraw-row { margin-top: -2px; }

#tourTabs[hidden], #tourPrizes[hidden] { display: none !important; }

/* Вход в мини-игры с главной */
.games-card {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px 10px 10px; border-radius: 18px;
  background: radial-gradient(120% 160% at 100% 0%, rgba(190, 120, 255, .32), transparent 60%), linear-gradient(180deg, #2a1a6a, #1a1040);
  border: 1px solid rgba(170, 130, 255, .5); box-shadow: 0 0 20px rgba(120, 80, 255, .3), inset 0 0 16px rgba(160, 120, 255, .15);
  color: #f1ebff;
}
.games-card__art { position: relative; width: 58px; height: 44px; flex: none; }
.games-card__art svg { position: absolute; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .45)); }
.games-card__leaf { width: 30px; height: 30px; left: 0; top: 0; transform: rotate(-20deg); }
.games-card__pumpkin { width: 32px; height: 32px; left: 14px; top: 12px; }
.games-card__chest { width: 30px; height: 26px; right: -2px; top: 2px; }
.games-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.games-card__text b { font-size: 16px; font-weight: 800; }
.games-card__text small { font-size: 12px; color: #c9bdf0; font-weight: 600; }

.ad-epic-test { align-self: flex-end; height: 40px; }
.ad-src { display: flex; flex-direction: column; }
.ad-src__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ad-src__row span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.ad-src__row small { color: var(--muted); font-size: 11.5px; }
.ad-src__row .ad-link { padding: 0; }
.ad-src__row b { flex: none; font-weight: 800; }
.ad-src__total { border-bottom: 0; font-weight: 800; }
.ad-ok { color: #7ee8c4 !important; }
.ad-bad { color: var(--danger) !important; }

/* Комбо дня */
.combo-card {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px 14px; border-radius: 18px; text-align: left;
  background: radial-gradient(120% 160% at 0% 0%, rgba(255, 200, 80, .3), transparent 60%), linear-gradient(180deg, #3a2608, #1c1205);
  border: 1px solid rgba(255, 200, 90, .55); box-shadow: 0 0 20px rgba(255, 170, 40, .25), inset 0 0 16px rgba(255, 200, 90, .12);
  color: #fff4dc;
}
.combo-card[hidden] { display: none; }
.combo-card.is-done { opacity: .75; }
.combo-card__icons { flex: none; font-size: 22px; letter-spacing: 2px; }
.combo-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.combo-card__text b { font-size: 16px; font-weight: 800; }
.combo-card__text small { font-size: 12px; color: #e8cf9a; font-weight: 600; }
.combo-slots { display: flex; justify-content: center; gap: 10px; margin: 4px 0 6px; }
.combo-slots.is-wrong { animation: shake .4s ease-in-out; }
.combo-slot {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: var(--dim);
  background: rgba(255, 255, 255, .04); border: 2px dashed rgba(255, 200, 90, .35);
}
.combo-slot.is-filled { color: inherit; border-style: solid; border-color: var(--accent-2); background: rgba(255, 180, 70, .1); }
.combo-slot.is-right { border-color: #5fe0b8; background: rgba(95, 224, 184, .12); box-shadow: 0 0 16px rgba(95, 224, 184, .35); }
.combo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.combo-tile {
  position: relative; height: 72px; border-radius: 16px; font-size: 34px; display: grid; place-items: center;
  background: linear-gradient(180deg, #2a1d14, #17100b); border: 1px solid var(--line-strong); transition: transform .12s, border-color .2s;
}
.combo-tile:active { transform: scale(.95); }
.combo-tile.is-picked { border-color: var(--accent-2); box-shadow: 0 0 14px var(--accent-glow); }
.combo-tile i { position: absolute; top: 6px; right: 8px; width: 20px; height: 20px; border-radius: 50%; font: 800 12px/20px var(--font); font-style: normal; color: #2a1203; background: var(--accent-2); }
.combo-tile:disabled { opacity: .55; }

.ad-row--icons .ad-field { flex: 1 1 44px; }
.ad-row--icons input { text-align: center; font-size: 20px; padding: 6px 4px; }

/* ---------- Тыква и ведро: раз в сутки на случайной странице ---------- */
.drop {
  position: absolute; z-index: 40; width: 78px; height: 78px; padding: 0; border: 0; background: none;
  transform: translate(-50%, -50%); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  animation: dropFloat 2.6s ease-in-out infinite;
}
.drop::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 190, 80, .7), rgba(255, 120, 20, .22) 50%, transparent 70%);
  animation: dropGlow 1.8s ease-in-out infinite;
}
.drop__art { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 0 10px rgba(255, 170, 70, .75)) drop-shadow(0 8px 14px rgba(0, 0, 0, .55)); }
.drop.is-hit .drop__art { animation: dropHit .22s ease-out; }
.drop__pips { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px 6px; border-radius: 99px; background: rgba(10, 6, 4, .72); box-shadow: 0 0 0 1px rgba(255, 180, 80, .35); }
.drop__pips i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .28); }
.drop__pips i.is-on { background: #ffb547; box-shadow: 0 0 8px #ff9a2a; }
.drop.is-burst { animation: dropBurst .45s ease-in forwards; pointer-events: none; }
@keyframes dropFloat { 50% { transform: translate(-50%, calc(-50% - 7px)) rotate(-4deg); } }
@keyframes dropGlow { 50% { transform: scale(1.12); opacity: .7; } }
@keyframes dropHit { 40% { transform: scale(.8) rotate(10deg); } 70% { transform: scale(1.08) rotate(-6deg); } }
@keyframes dropBurst { to { transform: translate(-50%, -50%) scale(1.9); opacity: 0; filter: brightness(2.2); } }
.drop-coin {
  position: fixed; z-index: 95; width: 30px; height: 30px; pointer-events: none; transform: translate(-50%, -50%);
  animation: dropCoin .9s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes dropCoin { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.6) rotate(220deg); opacity: 0; } }
.drop-reward__amount { font-size: 34px; font-weight: 900; color: #7ee8c4; text-shadow: 0 0 18px rgba(80, 230, 170, .45); }

/* Потолок прибыли лисёнка */
.fox-profit { display: block; margin-top: 10px; font-size: 12px; line-height: 1.4; color: var(--muted, #a8917e); }
.fox-profit b { color: #7ee8c4; }
.fox-profit.is-max { color: #ffb547; font-weight: 700; }

/* ---------- Хэллоуин: фон главной и экрана лисёнка ---------- */
.theme-halloween .home-hero > .scene { filter: hue-rotate(-12deg) saturate(1.15) brightness(.85); }
.theme-halloween .home-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(70% 45% at 78% 12%, rgba(150, 80, 255, .35), transparent 70%), linear-gradient(180deg, rgba(40, 10, 70, .55), rgba(60, 15, 40, .25) 55%, transparent);
  mix-blend-mode: screen;
}
.theme-halloween .screen--fox .screen__frame {
  background: radial-gradient(70% 35% at 80% 8%, rgba(160, 90, 255, .35), transparent 70%),
    radial-gradient(90% 45% at 50% 30%, rgba(255, 110, 20, .3), transparent 70%), linear-gradient(180deg, #1a0a2a, #0e0612 55%, #0a0604);
}
.theme-halloween .fox-stage__glow { background: radial-gradient(closest-side, rgba(255, 120, 30, .7), rgba(140, 60, 255, .25) 70%, transparent); }
.hw-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.home-hero .hw-deco { z-index: 1; }
.fox-stage .hw-deco { overflow: visible; } /* иначе свечение луны обрезается краем блока */
.hw-moon {
  position: absolute; right: 8%; top: 9%; width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fff8d8, #ffe6a0 55%, #f0c060);
  box-shadow: 0 0 40px 12px rgba(255, 220, 140, .35), 0 0 90px 30px rgba(170, 100, 255, .25);
}
.hw-moon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 65% 60%, rgba(180, 130, 60, .35) 0 9%, transparent 10%), radial-gradient(circle at 35% 70%, rgba(180, 130, 60, .3) 0 6%, transparent 7%), radial-gradient(circle at 55% 30%, rgba(180, 130, 60, .25) 0 5%, transparent 6%);
}
.hw-fog { position: absolute; left: -10%; right: -10%; bottom: 0; height: 30%; background: radial-gradient(60% 60% at 30% 100%, rgba(170, 120, 255, .22), transparent 70%), radial-gradient(60% 60% at 75% 100%, rgba(255, 140, 60, .18), transparent 70%); animation: hwFog 9s ease-in-out infinite alternate; }
.hw-bat { position: absolute; height: auto; aspect-ratio: 2; animation: hwBat 6s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(170, 110, 255, .5)); }
.hw-pumpkin { position: absolute; bottom: 6%; width: 52px; height: 52px; filter: drop-shadow(0 0 14px rgba(255, 140, 30, .85)); animation: hwFlicker 2.4s ease-in-out infinite alternate; }
.hw-pumpkin--l { left: 4%; }
.hw-pumpkin--r { right: 5%; width: 40px; height: 40px; animation-delay: -1.2s; }
.home-hero .hw-pumpkin { bottom: 16%; }
@keyframes hwBat { 0%, 100% { transform: translate(0, 0) scaleY(1); } 25% { transform: translate(14px, -8px) scaleY(.55); } 50% { transform: translate(26px, 2px) scaleY(1); } 75% { transform: translate(10px, 6px) scaleY(.6); } }
@keyframes hwFog { to { transform: translateX(6%); opacity: .7; } }
@keyframes hwFlicker { 50% { filter: drop-shadow(0 0 22px rgba(255, 150, 40, 1)); } }
@media (prefers-reduced-motion: reduce) { .hw-bat, .hw-fog, .hw-pumpkin { animation: none; } }

.ad-wd__user { align-self: flex-start; text-align: left; padding: 0; }

/* ---------- Тыква часа на главной ---------- */
.hourly {
  position: absolute; z-index: 3; left: 6%; top: 44%; width: 58px; height: 58px; padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; animation: hourlyBob 2.2s ease-in-out infinite;
}
.hourly[hidden] { display: none; }
.hourly::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 180, 60, .65), transparent 68%); animation: dropGlow 1.6s ease-in-out infinite; pointer-events: none; }
.hourly__art { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 0 8px rgba(255, 160, 40, .8)) drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.hourly__tag {
  position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); padding: 2px 7px; border-radius: 99px; white-space: nowrap;
  font-size: 10px; font-weight: 900; color: #06281d; background: linear-gradient(180deg, #8ff0cc, #3fcf98); box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.hourly.is-burst { animation: dropBurst .45s ease-in forwards; pointer-events: none; }
@keyframes hourlyBob { 50% { transform: translateY(-6px) rotate(5deg); } }
