/* ==========================================================================
   VALHALLA — личный кабинет на сайте
   Макет: docs/60 и design/site-prototype-2026-09-28. Телефон первым,
   с 900 px — боковое меню. Золото — главное действие, красное — только оплата.
   ========================================================================== */

:root {
  --bg: #060504;
  --card: #0C0906;
  --card-hi: #141009;
  --gold: #D4A017;
  --amber: #FFAA00;
  --gold-lt: #F5D98A;
  --ink: #F5EFE6;
  --ink-soft: #E8DCC6;
  --ink-mid: #B3A48C;
  --line: rgba(212, 160, 23, 0.22);
  --line-hi: rgba(212, 160, 23, 0.45);
  --fire-a: #792d27;
  --fire-b: #a84439;
  --fire-line: #bc5b4d;
  --bad: #e2917f;
  --good: #8fc98a;
  --font-display: Georgia, 'Times New Roman', serif; /* Cinzel без кириллицы: русские заголовки и так шли в Georgia, латиница в них кричала */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 14px;
  --r-lg: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--gold-lt); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--gold-lt); color: #1a1206; font-weight: 600; }
.skip-link:focus { top: 12px; }
.noscript { padding: 24px; text-align: center; }

/* ------------------------------------------------------------ каркас */
.shell { min-height: 100vh; min-height: 100dvh; }
.main { min-width: 0; }
.view { outline: none; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 760px; margin: 0 auto; }
.view.bare { padding: 0; max-width: none; }

.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.brand img { width: 34px; height: 34px; }
.brand span { font: 900 16px/1 var(--font-display); letter-spacing: .06em; color: var(--gold-lt); }

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 16px;
  background: rgba(6, 5, 4, 0.9); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.top-title { font-size: 13px; color: var(--ink-mid); letter-spacing: .04em; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(8, 6, 4, 0.96); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; border-radius: 12px;
  font-size: 12px; font-weight: 600; color: var(--ink-mid);
}
.tab img { width: 28px; height: 28px; opacity: .72; transition: opacity .2s, transform .2s var(--ease); }
.tab[aria-current="page"] { color: var(--gold-lt); background: rgba(212, 160, 23, 0.1); }
.tab[aria-current="page"] img { opacity: 1; transform: translateY(-1px); }

.side { display: none; }

.boot { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--ink-mid); }
.boot img { animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; transform: scale(.96); } }

/* ------------------------------------------------------------ элементы */
.lab { font: 700 11px/1.4 var(--font-display); letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.h1 { font: 900 26px/1.18 var(--font-display); color: var(--gold-lt); }
.h2 { font: 900 19px/1.25 var(--font-display); color: var(--gold-lt); }
.dim { color: var(--ink-mid); }
.small { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex-grow: 1; min-width: 0; }
.section-head { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 2px; }

.card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--card);
}
.card.hot { border-color: rgba(255, 170, 0, 0.5); background: linear-gradient(135deg, rgba(212, 160, 23, 0.12), var(--card) 60%); }
.card.warn { border-color: rgba(188, 91, 77, 0.6); background: linear-gradient(135deg, rgba(121, 45, 39, 0.28), var(--card) 65%); }
.card.bad { border-color: rgba(226, 145, 127, 0.45); }
.card-icon { width: 52px; height: 52px; flex-shrink: 0; }

.tag {
  align-self: flex-start;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid var(--line-hi); color: var(--gold);
}
.tag.ok { color: var(--good); border-color: rgba(143, 201, 138, 0.45); }
.tag.hot { color: var(--amber); border-color: rgba(255, 170, 0, 0.55); }
.tag.bad { color: var(--bad); border-color: rgba(226, 145, 127, 0.5); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 52px; padding: 0 18px;
  border-radius: var(--r); border: 1px solid transparent;
  font: 600 16px/1.2 var(--font); text-align: center;
  cursor: pointer; transition: transform .15s var(--ease), background-color .2s, opacity .2s;
}
.btn img { width: 24px; height: 24px; flex-shrink: 0; }
.btn:active { transform: scale(.985); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: default; transform: none; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--amber)); color: #1a1206; border-color: var(--gold-lt); }
.btn-gold:hover { color: #1a1206; }
.btn-fire { background: linear-gradient(135deg, var(--fire-a), var(--fire-b)); color: #fff2dc; border-color: var(--fire-line); }
.btn-fire:hover { color: #fff2dc; }
.btn-ghost { background: transparent; color: var(--gold-lt); border-color: var(--line-hi); }
.btn-ghost:hover { background: rgba(212, 160, 23, 0.08); }
.btn-quiet { background: transparent; color: var(--ink-mid); border-color: var(--line); }
.btn-danger { background: transparent; color: var(--bad); border-color: rgba(226, 145, 127, 0.45); }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.link-btn { display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; color: var(--amber); font-weight: 600; cursor: pointer; padding: 0; }
.link-btn[disabled] { color: var(--ink-mid); cursor: default; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--ink-mid); }
.input {
  width: 100%; min-height: 52px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--line-hi);
  background: var(--bg); color: var(--ink); font-size: 17px;
}
.input:focus { border-color: var(--amber); outline: none; box-shadow: 0 0 0 3px rgba(255, 170, 0, 0.18); }
.input.code { font: 700 26px/1 var(--font); letter-spacing: .5em; text-align: center; padding-left: calc(14px + .5em); }
.err { color: var(--bad); font-size: 14px; }
.err:empty { display: none; }

.progress { height: 6px; border-radius: 3px; background: rgba(212, 160, 23, 0.12); overflow: hidden; }
.progress i { display: block; height: 100%; width: 40%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--amber)); animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

.meter { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; }
.meter i { height: 6px; border-radius: 3px; background: rgba(212, 160, 23, 0.16); }
.meter i.on { background: linear-gradient(90deg, var(--gold), var(--amber)); }

.list { display: flex; flex-direction: column; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; color: var(--ink); border-top: 1px solid rgba(212, 160, 23, 0.1); }
.item:first-child { border-top: 0; }
a.item:hover { background: var(--card-hi); color: var(--ink); }
.item img { width: 36px; height: 36px; flex-shrink: 0; }
.item b { display: block; font-weight: 600; }
.item .dim { font-size: 13px; }
.chev { width: 9px; height: 9px; flex-shrink: 0; border-right: 2px solid var(--gold); border-top: 2px solid var(--gold); transform: rotate(45deg); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-hi); background: transparent; color: var(--ink); font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: rgba(212, 160, 23, 0.16); border-color: var(--amber); color: var(--gold-lt); }

.steps-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.steps-bar i { height: 4px; border-radius: 2px; background: rgba(212, 160, 23, 0.18); }
.steps-bar i.on { background: linear-gradient(90deg, var(--gold), var(--amber)); }

.plan { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-align: left; cursor: pointer; }
.plan img { width: 46px; height: 46px; flex-shrink: 0; }
.plan[aria-checked="true"] { border: 2px solid var(--amber); padding: 15px; background: linear-gradient(135deg, rgba(212, 160, 23, 0.14), var(--card) 65%); }
.plan-name { font: 900 16px/1.25 var(--font-display); color: var(--gold-lt); }
.plan-price { font: 900 20px/1 var(--font-display); color: var(--gold-lt); white-space: nowrap; }
.plan-badge { position: absolute; top: -10px; left: 16px; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--amber); color: #1a1206; }

.note { padding: 12px 14px; border-radius: 12px; background: rgba(212, 160, 23, 0.07); font-size: 14px; color: var(--ink-soft); }
.note.test { background: rgba(226, 145, 127, 0.1); color: var(--bad); }

.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 420px); padding: 12px 16px; border-radius: 12px;
  background: #1a140c; border: 1px solid var(--line-hi); color: var(--ink);
  font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ вход */
.gate-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.gate-art { position: relative; height: 38vh; min-height: 220px; max-height: 360px; overflow: hidden; }
.gate-art > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.gate-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,5,4,.1), rgba(6,5,4,.4) 55%, var(--bg)); }
.gate-art .brand { position: absolute; left: 16px; top: 12px; z-index: 1; }
.gate-form { flex-grow: 1; display: flex; flex-direction: column; gap: 14px; padding: 0 16px 32px; margin-top: -28px; position: relative; max-width: 460px; width: 100%; align-self: center; }
.gate-foot { margin-top: auto; padding-top: 18px; font-size: 13px; color: var(--ink-mid); display: flex; flex-direction: column; gap: 4px; }

/* ------------------------------------------------------------ широкий экран */
@media (min-width: 900px) {
  .shell.in { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
  .side {
    display: flex; flex-direction: column; gap: 22px;
    position: sticky; top: 0; height: 100vh;
    padding: 22px 16px; border-right: 1px solid var(--line); background: #080604;
  }
  .side .brand img { width: 40px; height: 40px; }
  .side .brand span { font-size: 18px; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 12px; color: var(--ink-soft); font-weight: 600; }
  .side-nav a img { width: 28px; height: 28px; opacity: .8; }
  .side-nav a:hover { background: rgba(212, 160, 23, 0.06); color: var(--gold-lt); }
  .side-nav a[aria-current="page"] { background: rgba(212, 160, 23, 0.12); color: var(--gold-lt); }
  .side-exit { margin-top: auto; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink-mid); cursor: pointer; }
  .top, .tabs { display: none !important; }
  .view { padding: 36px 40px 60px; }
  .toast { bottom: 28px; }
  .h1 { font-size: 32px; }
  .btn { width: auto; min-width: 220px; }
  .btn.wide, .card .btn.wide { width: 100%; }
  .btn-row .btn { width: 100%; min-width: 0; }
  .plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .plan { flex-direction: column; align-items: flex-start; }
  .plan-price { font-size: 26px; margin-top: 6px; }

  .gate-page { flex-direction: row; }
  .gate-art { flex: 1 1 50%; height: auto; max-height: none; min-height: 100vh; }
  .gate-art::after { background: linear-gradient(90deg, rgba(6,5,4,.05) 40%, var(--bg)); }
  .gate-art .brand { left: 32px; top: 24px; }
  .gate-form { flex: 0 1 520px; justify-content: center; margin: 0; padding: 48px 56px; }
  .gate-foot { margin-top: 24px; }
}

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

/* ==========================================================================
   Сцены, движение и свет. Арт — тот же v4, что в баннерах бота; текст живой.
   ========================================================================== */

/* ------------------------------------------------------------ сцена экрана */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin: -16px -16px 0; height: 300px;
  border-radius: 0 0 26px 26px;
  display: flex; align-items: flex-end;
  background: #0a0705;
}
.hero picture, .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-img { object-fit: cover; object-position: 62% 40%; z-index: -3; transform-origin: 60% 45%; }
.hero-shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(6,5,4,.15) 0%, rgba(6,5,4,.05) 35%, rgba(6,5,4,.78) 78%, var(--bg) 100%),
    radial-gradient(120% 90% at 0% 100%, rgba(6,5,4,.75), transparent 60%);
}
.hero-text { position: relative; z-index: 1; padding: 0 20px 54px; display: flex; flex-direction: column; gap: 6px; max-width: 620px; }
.hero-text .tag { margin-bottom: 4px; background: rgba(6,5,4,.55); }
.hero-title { font: 900 30px/1.12 var(--font-display); color: var(--gold-lt); text-shadow: 0 3px 24px rgba(0,0,0,.75), 0 0 40px rgba(255,140,0,.18); }
.hero-sub { font-size: 15px; color: var(--ink-soft); text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.hero .lab { text-shadow: 0 2px 10px rgba(0,0,0,.9); }
.lift { position: relative; z-index: 2; margin-top: -34px; }

/* Арт с тёмной полосой посередине (её заказывали под текст баннеров бота):
   текст ставим в полосу, предмет внизу остаётся открытым. */
.hero-keys, .hero-gifts, .hero-expiring, .hero-expired { height: 340px; align-items: flex-start; }
.hero-keys .hero-text, .hero-gifts .hero-text, .hero-expiring .hero-text, .hero-expired .hero-text { padding-top: 70px; padding-bottom: 0; }
.hero-keys .hero-shade, .hero-gifts .hero-shade, .hero-expiring .hero-shade, .hero-expired .hero-shade {
  background: linear-gradient(180deg, rgba(6,5,4,.35) 0%, rgba(6,5,4,.1) 45%, rgba(6,5,4,0) 70%, rgba(6,5,4,.55) 90%, var(--bg) 100%),
    radial-gradient(90% 60% at 10% 35%, rgba(6,5,4,.7), transparent 70%);
}
/* у каждой сцены свой главный предмет — держим его в кадре */
.hero-keys .hero-img { object-position: 36% 100%; transform-origin: 40% 90%; }
.hero-gifts .hero-img { object-position: 50% 100%; transform-origin: 50% 95%; }
.hero-eye .hero-img { object-position: 64% 22%; transform-origin: 60% 25%; }
.hero-expiring .hero-img, .hero-expired .hero-img { object-position: 50% 58%; }
.hero-scroll .hero-img { object-position: 70% 45%; }
@keyframes kenburns { from { transform: scale(1.02) translate3d(0,0,0); } to { transform: scale(1.12) translate3d(-2%, -1.5%, 0); } }
.hero-img { animation: kenburns 22s ease-in-out infinite alternate; }

/* искры над огнём */
.embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.embers i {
  position: absolute; bottom: -12px; left: var(--x);
  width: var(--s); height: var(--s); border-radius: 50%;
  background: #ffb13b; box-shadow: 0 0 10px 3px rgba(255,120,0,.6);
  opacity: 0; animation: ember var(--t) linear var(--d) infinite;
}
@keyframes ember {
  0% { transform: translate3d(0,0,0) scale(1); opacity: 0; }
  12% { opacity: .95; }
  70% { opacity: .6; }
  100% { transform: translate3d(-40px,-340px,0) scale(.4); opacity: 0; }
}

/* заголовок собирается по словам, блоки поднимаются по очереди */
.w { display: inline-block; }
.view.enter .hero-title .w, .split .w { animation: word-in .8s var(--ease) both; animation-delay: calc(var(--i) * .12s + .12s); }
@keyframes word-in { from { opacity: 0; transform: translateY(18px) rotateX(35deg); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.view.enter .hero-sub, .view.enter .hero .lab, .view.enter .hero-text .tag { animation: fade-up .7s var(--ease) .45s both; }
.view.enter .lift > * { animation: rise .65s var(--ease) both; }
.view.enter .lift > *:nth-child(1) { animation-delay: .18s; }
.view.enter .lift > *:nth-child(2) { animation-delay: .28s; }
.view.enter .lift > *:nth-child(3) { animation-delay: .38s; }
.view.enter .lift > *:nth-child(4) { animation-delay: .48s; }
.view.enter .lift > *:nth-child(n+5) { animation-delay: .56s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ свет карточек и кнопок */
.card.glow { animation: breathe-glow 4s ease-in-out infinite; }
@keyframes breathe-glow { 0%, 100% { box-shadow: 0 0 0 rgba(255,170,0,0); } 50% { box-shadow: 0 0 34px rgba(255,150,0,.16), inset 0 0 0 1px rgba(255,170,0,.12); } }
.view.enter .lift > .card.glow { animation: rise .65s var(--ease) .18s both, breathe-glow 4s ease-in-out 1s infinite; }

.btn-gold, .btn-fire { position: relative; overflow: hidden; isolation: isolate; }
.btn-gold::after {
  content: ''; position: absolute; top: -10%; left: -70%; width: 45%; height: 120%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent);
  transform: skewX(-20deg); animation: shine 5s ease-in-out 1.2s infinite;
}
@keyframes shine { 0%, 72% { left: -70%; } 100% { left: 140%; } }
.btn-gold { box-shadow: 0 8px 26px rgba(255,170,0,.2); }
.btn-gold:hover { box-shadow: 0 10px 34px rgba(255,170,0,.34); transform: translateY(-1px); }
.btn-fire { background-size: 220% 220%; animation: fire-bg 4s ease-in-out infinite, fire-glow 2.6s ease-in-out infinite; }
.btn-fire { background-image: linear-gradient(120deg, #6d2621, #a84439 40%, #c9612f 55%, #a84439 70%, #6d2621); }
@keyframes fire-bg { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes fire-glow { 0%, 100% { box-shadow: 0 6px 22px rgba(188,91,77,.28); } 50% { box-shadow: 0 8px 34px rgba(230,110,50,.5); } }

.plan { transition: transform .25s var(--ease), box-shadow .25s, border-color .2s; }
.plan:hover { transform: translateY(-2px); }
.plan[aria-checked="true"] { animation: breathe-glow 3.2s ease-in-out infinite; transform: translateY(-2px); }
.plan img, .plan video { width: 56px; height: 56px; flex-shrink: 0; }
.plan-line { gap: 8px; }
.plan-line video, .plan-line img { width: 34px; height: 34px; }
.card-icon { width: 52px; height: 52px; }
.card video, .item video, .tab video, .side-nav video { display: block; flex-shrink: 0; }
.item video { width: 36px; height: 36px; }
.tab video { width: 30px; height: 30px; }
.side-nav a video { width: 30px; height: 30px; }

/* ------------------------------------------------------------ кольцо срока */
.gauge { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.gauge circle { fill: none; stroke-width: 8; }
.g-bg { stroke: rgba(212,160,23,.14); }
.g-fg { stroke: var(--amber); stroke-linecap: round; stroke-dasharray: var(--c); stroke-dashoffset: var(--o); filter: drop-shadow(0 0 6px rgba(255,160,0,.55)); }
.gauge.warn .g-fg { stroke: #e0673c; filter: drop-shadow(0 0 6px rgba(230,100,50,.6)); }
.gauge.bad .g-fg { stroke: #6b5a45; filter: none; }
.view.enter .g-fg { animation: gfill 1.3s var(--ease) .3s both; }
@keyframes gfill { from { stroke-dashoffset: var(--c); } }
.g-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.g-num b { font: 900 28px/1 var(--font-display); color: var(--gold-lt); }
.g-num span { font-size: 11px; color: var(--ink-mid); margin-top: 3px; }

/* ------------------------------------------------------------ места под ключи */
.slots { display: flex; flex-wrap: wrap; gap: 10px; }
.slot {
  width: 54px; height: 54px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed rgba(212,160,23,.3); background: rgba(12,9,6,.7);
}
.slot img { width: 26px; height: 26px; opacity: .22; filter: grayscale(1); }
.slot.on { border: 1px solid var(--amber); background: radial-gradient(circle, rgba(255,170,0,.24), rgba(12,9,6,.9) 70%); box-shadow: 0 0 18px rgba(255,160,0,.22); }
.slot.on img { opacity: 1; filter: drop-shadow(0 0 6px rgba(255,170,0,.7)); }
.view.enter .slot { animation: pop .5s var(--ease) both; animation-delay: calc(var(--i) * .07s + .35s); }
@keyframes pop { from { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.08); } to { opacity: 1; transform: none; } }
.item.state-pending { background: linear-gradient(90deg, rgba(255,170,0,.08), transparent 60%); }

/* ------------------------------------------------------------ карточка-баннер */
.art-card { position: relative; display: block; height: 150px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); color: var(--ink); }
.art-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; transition: transform .8s var(--ease); }
.art-card:hover img { transform: scale(1.06); }
.art-card:hover { color: var(--ink); }
.art-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,5,4,.92) 20%, rgba(6,5,4,.35) 70%, rgba(6,5,4,.1)); }
.art-text { position: absolute; left: 18px; right: 40%; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; }
.art-text b { font: 900 18px/1.2 var(--font-display); color: var(--gold-lt); }

/* ------------------------------------------------------------ кузница и победа */
.forge { align-items: center; text-align: center; }
.forge-anvil { position: relative; width: 110px; height: 100px; display: flex; align-items: center; justify-content: center; }
.forge-anvil video, .forge-anvil img { width: 88px; height: 88px; }
.sparks i {
  position: absolute; left: 50%; top: 38%; width: 4px; height: 4px; border-radius: 50%;
  background: #ffcf6b; box-shadow: 0 0 8px 2px rgba(255,150,0,.8); opacity: 0;
  animation: spark 1.1s ease-out infinite;
}
.sparks i:nth-child(1) { --dx: -44px; --dy: -34px; animation-delay: 0s; }
.sparks i:nth-child(2) { --dx: 40px; --dy: -40px; animation-delay: .18s; }
.sparks i:nth-child(3) { --dx: -28px; --dy: -56px; animation-delay: .36s; }
.sparks i:nth-child(4) { --dx: 30px; --dy: -58px; animation-delay: .54s; }
.sparks i:nth-child(5) { --dx: -54px; --dy: -12px; animation-delay: .72s; }
.sparks i:nth-child(6) { --dx: 52px; --dy: -16px; animation-delay: .9s; }
@keyframes spark { 0% { transform: translate(0,0) scale(1.2); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

.win { position: relative; align-items: center; text-align: center; overflow: hidden; }
.win-icon { position: relative; z-index: 1; animation: win-pop .9s var(--ease) .15s both; filter: drop-shadow(0 0 22px rgba(255,170,0,.55)); }
.win-icon video, .win-icon img { width: 96px; height: 96px; }
@keyframes win-pop { from { opacity: 0; transform: scale(.3) rotate(-8deg); } 60% { transform: scale(1.12); } to { opacity: 1; transform: none; } }
.burst { position: absolute; left: 50%; top: 66px; width: 0; height: 0; z-index: 0; }
.burst i {
  position: absolute; left: -2px; top: -40px; width: 4px; height: 40px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(255,210,120,0), #ffc24d);
  transform-origin: 2px 40px; transform: rotate(var(--a)) translateY(-10px) scaleY(.2); opacity: 0;
  animation: ray 1.2s var(--ease) calc(.25s + var(--d)) both;
}
@keyframes ray { 0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scaleY(.2); } 30% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-70px) scaleY(1); } }

/* ------------------------------------------------------------ вход: живой Хеймдалль */
.gate-art { height: 46vh; min-height: 260px; max-height: 440px; isolation: isolate; }
.gate-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.gate-art .embers { z-index: 1; }
.gate-art::after { z-index: 1; }
.gate-art .brand { z-index: 2; }
.back { align-self: flex-start; }

@media (min-width: 900px) {
  .hero { margin: 0; height: 340px; border-radius: 26px; border: 1px solid var(--line); }
  .hero-keys, .hero-gifts, .hero-expiring, .hero-expired { height: 400px; }
  .hero-text { padding: 0 34px 60px; }
  .hero-title { font-size: 42px; }
  .hero-sub { font-size: 17px; }
  .lift { margin-top: -40px; padding: 0 18px; }
  .gauge { width: 110px; height: 110px; }
  .art-card { height: 170px; }
  .gate-art { height: auto; max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
  .embers, .sparks, .burst { display: none; }
  .hero-img { animation: none; }
}

/* Purchase remains visible on every screen; motion uses the existing brand. */
.trial-summary { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trial-summary b { color: var(--gold-lt); }
.trial-summary strong { color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.trial-link { display: grid; gap: 8px; }
.trial-link p { text-align: center; }
.side-nav a[href="#/gifts"], .tabs a[href="#/gifts"] { background: rgba(121,45,39,.28); color: var(--gold-lt); border: 1px solid rgba(188,91,77,.45); }
.side-nav a[href="#/gifts"][aria-current="page"], .tabs a[href="#/gifts"][aria-current="page"] { background: linear-gradient(120deg,var(--fire-a),var(--fire-b)); border-color: var(--fire-line); color: var(--ink); }
.tabs a[href="#/gifts"] span { font-size: clamp(10px, 2.8vw, 12px); }
.btn video { width: 26px; height: 26px; flex-shrink: 0; }
@media (prefers-reduced-motion: no-preference) {
  .side-nav a, .tab { transition: background .2s ease, color .2s ease, transform .2s ease; }
  .side-nav a:active, .tab:active { transform: scale(.96); }
  .view.enter .trial-summary { animation: fade-up .45s var(--ease) both; }
  .view.enter .trial-link { animation: fade-up .45s var(--ease) .15s both; }
  .hero-shade::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 75% 80%, rgba(255,119,0,.18), transparent 65%); animation: hearth 7s ease-in-out infinite alternate; pointer-events: none; }
  @keyframes hearth { from { opacity: .25; } to { opacity: .9; } }
}

/* ------------------------------------------------------------ знак светится везде */
.brand img { animation: mark-glow 3.6s ease-in-out infinite; }
.boot img { animation: breathe 1.8s ease-in-out infinite, mark-glow 1.8s ease-in-out infinite; }
@keyframes mark-glow {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(255, 140, 0, .35)); }
  50% { filter: drop-shadow(0 0 11px rgba(255, 165, 0, .75)) drop-shadow(0 0 2px rgba(255, 220, 150, .6)); }
}

/* ------------------------------------------------------------ мост к Telegram */
.card.bridge {
  position: relative; overflow: hidden; isolation: isolate;
  border: 1.5px solid rgba(42, 171, 238, .55);
  background: radial-gradient(120% 90% at 100% 0%, rgba(42, 171, 238, .2), transparent 55%),
              linear-gradient(135deg, rgba(212, 160, 23, .08), var(--card) 60%);
  animation: bridge-glow 3.4s ease-in-out infinite;
}
.card.bridge::before {
  content: ''; position: absolute; top: -40%; left: -60%; width: 40%; height: 180%; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(160, 220, 255, .16), transparent);
  transform: rotate(18deg); animation: bridge-sweep 5.5s ease-in-out infinite;
}
.view.enter .lift > .card.bridge { animation: rise .65s var(--ease) .18s both, bridge-glow 3.4s ease-in-out 1s infinite; }
@keyframes bridge-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(42, 171, 238, 0); } 50% { box-shadow: 0 0 0 3px rgba(42, 171, 238, .14), 0 10px 34px rgba(42, 171, 238, .22); } }
@keyframes bridge-sweep { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.bridge-badge {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, #3cbcf7, #1b8dcf);
  box-shadow: 0 0 0 4px rgba(42, 171, 238, .16), 0 6px 20px rgba(42, 171, 238, .35);
}
.bridge-badge .tg-plane { width: 23px; height: 23px; fill: #fff; margin-left: -2px; }
.tag.tg { color: #9ad8ff; border-color: rgba(42, 171, 238, .55); }
.btn-tg {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, #3cbcf7, #1b8dcf); color: #fff; border-color: #86d0f8;
  box-shadow: 0 8px 26px rgba(42, 171, 238, .3); animation: tg-pulse 2.6s ease-in-out infinite;
}
.btn-tg:hover { color: #fff; transform: translateY(-1px); }
.btn-tg .tg-plane { width: 21px; height: 21px; fill: currentColor; flex-shrink: 0; }
.btn-tg::after {
  content: ''; position: absolute; top: -10%; left: -70%; width: 45%; height: 120%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg); animation: shine 4.5s ease-in-out .8s infinite;
}
@keyframes tg-pulse { 0%, 100% { box-shadow: 0 8px 26px rgba(42, 171, 238, .28); } 50% { box-shadow: 0 8px 36px rgba(42, 171, 238, .55), 0 0 0 4px rgba(42, 171, 238, .14); } }
.tg-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid #86d0f8; cursor: pointer;
  background: linear-gradient(135deg, #3cbcf7, #1b8dcf); color: #fff;
  font: 700 12.5px/1 var(--font); white-space: nowrap; animation: tg-pulse 2.6s ease-in-out infinite;
}
.tg-chip .tg-plane { width: 15px; height: 15px; fill: currentColor; }
.tg-chip[hidden] { display: none; }
.side .tg-chip { justify-content: center; min-height: 44px; margin: 8px 0; font-size: 14px; }
@media (prefers-reduced-motion: reduce) {
  .brand img, .card.bridge, .card.bridge::before, .btn-tg, .btn-tg::after, .tg-chip { animation: none; }
}
@media (max-width: 419px) { .top:has(.tg-chip:not([hidden])) .top-title { display: none; } }

/* ------------------------------------------------------------ perf-2909: бесконечные анимации — только transform и opacity
   Тени и фильтры перерисовывались на каждом кадре, а left двигал раскладку: на телефоне это рывки. */
.brand img.wm { width: auto; height: 22px; animation: none; filter: none; }
.side .brand img.wm { height: 25px; }
.brand { position: relative; }
.brand img:not(.wm) { animation: none; filter: drop-shadow(0 0 6px rgba(255, 140, 0, .45)); position: relative; }
.brand::before { content: ''; position: absolute; left: -9px; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 150, 0, .42), rgba(255, 120, 0, 0) 66%); animation: glow-pulse 3.6s ease-in-out infinite; }
.side .brand::before { left: -6px; }
.boot img { animation: breathe 1.8s ease-in-out infinite; filter: drop-shadow(0 0 12px rgba(255, 150, 0, .55)); }
@keyframes glow-pulse { 0%, 100% { opacity: .45; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes glow-fade { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.card.glow { position: relative; animation: none; }
.view.enter .lift > .card.glow { animation: rise .65s var(--ease) .18s both; }
.card.glow::after, .plan[aria-checked="true"]::after, .card.bridge::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; animation: glow-fade 4s ease-in-out infinite; }
.card.glow::after { box-shadow: 0 0 34px rgba(255, 150, 0, .16), inset 0 0 0 1px rgba(255, 170, 0, .12); }
.plan[aria-checked="true"] { animation: none; }
.plan[aria-checked="true"]::after { box-shadow: 0 0 30px rgba(255, 150, 0, .2); animation-duration: 3.2s; }
.card.bridge, .view.enter .lift > .card.bridge { animation: none; }
.view.enter .lift > .card.bridge { animation: rise .65s var(--ease) .18s both; }
.card.bridge::after { box-shadow: inset 0 0 30px rgba(42, 171, 238, .18), inset 0 0 0 1px rgba(42, 171, 238, .22); animation-duration: 3.4s; }
.card.bridge::before { left: -60%; animation: sweep-x 5.5s ease-in-out infinite; }
@keyframes sweep-x { 0%, 55% { transform: translateX(0) rotate(18deg); } 100% { transform: translateX(480%) rotate(18deg); } }
@keyframes shine { 0%, 72% { transform: translateX(0) skewX(-20deg); } 100% { transform: translateX(470%) skewX(-20deg); } }
.btn-fire { animation: fire-bg 4s ease-in-out infinite; box-shadow: 0 7px 28px rgba(200, 90, 50, .38); }
.btn-tg { animation: none; box-shadow: 0 8px 30px rgba(42, 171, 238, .38); }
.tg-chip { animation: chip-pulse 2.6s ease-in-out infinite; box-shadow: 0 4px 16px rgba(42, 171, 238, .35); }
@keyframes chip-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@media (prefers-reduced-motion: reduce) {
  .brand::before, .card.glow::after, .plan[aria-checked="true"]::after, .card.bridge::after, .tg-chip { animation: none; }
  .card.glow::after, .plan[aria-checked="true"]::after, .card.bridge::after { opacity: .6; }
}
.plan-price { font: 800 21px/1 var(--font); font-variant-numeric: tabular-nums; }
.g-num b { font: 800 28px/1 var(--font); font-variant-numeric: tabular-nums; }
.slots { align-items: center; }
.slots-cap { margin-left: auto; font-size: 14px; color: var(--ink-mid); white-space: nowrap; }
.slots-cap b { color: var(--gold-lt); font-variant-numeric: tabular-nums; }
.modal-back { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .72); animation: fade-up .2s var(--ease) both; }
.modal { width: min(100%, 440px); max-height: 88vh; overflow: auto; display: grid; gap: 12px; padding: 22px 20px 18px; border-radius: var(--r-lg); border: 1px solid var(--line-hi); background: linear-gradient(180deg, #15100a, var(--card)); box-shadow: 0 24px 70px rgba(0, 0, 0, .65); }
.modal p { font-size: 15px; line-height: 1.55; }
.modal-warn { color: var(--bad); font-weight: 600; }
.btn-kill { background: #8e2f27; color: #fff2ea; border-color: #bc5b4d; }
.btn-kill:hover { background: #a3362d; color: #fff; }
