/* =====================================================================
   Тотемный путь: вкладки, страницы, боевой пропуск, задания, админка,
   викторина / Золотой трек поверх всего, оформление сезона
   ===================================================================== */
:root {
  --gold: #ffd75e;
  --t0: #e2583e; --t1: #4f8dff; --t2: #e8b04b; --t3: #2fb98a;
  --glass: rgba(11, 20, 18, 0.86);
}

/* ---------- вкладки и стрелки ---------- */
.tabs {
  position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 10;
  display: flex; gap: 1px; padding: 2px; border-radius: 999px;
  background: rgba(11, 20, 18, 0.72); border: 1px solid var(--line); backdrop-filter: blur(10px);
}
.tabs button {
  position: relative; border: 0; background: transparent; padding: 4px 10px; border-radius: 999px;
  font-weight: 800; font-size: 11px; color: var(--bone-dim); transition: background 0.2s, color 0.2s;
}
.tabs button:hover { color: var(--bone); }
.tabs button[aria-selected="true"] { background: var(--bone); color: var(--ink); }
.tabs .dot { position: absolute; top: 2px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); }
.tabs .dot[hidden] { display: none; }
.admin-only { display: none; }
body.admin .admin-only { display: inline-block; }
.stage { padding-bottom: max(52px, 4vh); }   /* место под вкладками внизу */

.pg-arrow {
  position: fixed; top: 50%; z-index: 10; transform: translateY(-50%);
  width: 34px; height: 76px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(11, 20, 18, 0.55); backdrop-filter: blur(8px);
  display: grid; place-items: center; opacity: 0.55; transition: opacity 0.2s, background 0.2s;
}
.pg-arrow:hover { opacity: 1; background: rgba(11, 20, 18, 0.85); }
.pg-arrow svg { width: 20px; height: 20px; fill: none; stroke: var(--bone); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pg-arrow.left { left: 6px; }
.pg-arrow.right { right: 6px; }

/* правый верхний угол: уровень и настроение */
.corner { position: fixed; top: 10px; right: 14px; z-index: 11; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
/* значок уровня */
.xp-chip {
  position: relative;
  display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px;
  border-radius: 999px; border: 1px solid rgba(232, 176, 75, 0.45);
  background: rgba(11, 20, 18, 0.72); backdrop-filter: blur(10px); text-align: left;
}
.xp-chip[hidden] { display: none; }
.xp-chip > b {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ochre); color: var(--ink); font: 700 13px "Unbounded", sans-serif;
}
.xp-chip span { display: flex; flex-direction: column; gap: 3px; }
.xp-chip small { font-weight: 800; font-size: 11px; color: var(--bone-dim); white-space: nowrap; }
.xp-chip em { font-style: normal; font-weight: 800; font-size: 12px; }
.xp-chip .bar { display: block; width: 90px; height: 4px; border-radius: 2px; background: rgba(237, 230, 214, 0.15); overflow: hidden; }
.xp-chip .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ochre), var(--gold)); }

/* ---------- страницы ---------- */
.pages { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.page {
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 24px 52px 56px;
  background: radial-gradient(ellipse at 50% 0%, rgba(20, 38, 33, 0.96), rgba(8, 14, 13, 0.97) 70%);
  opacity: 0; visibility: hidden; transform: translateX(24px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0.28s;
  user-select: text;
}
.page.on { opacity: 1; visibility: visible; transform: none; pointer-events: auto;
           transition: opacity 0.28s ease, transform 0.28s ease; }
.page-in { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
body:not([data-page="air"]) .camp, body:not([data-page="air"]) .order-open,
body:not([data-page="air"]) .orc-scene { opacity: 0; pointer-events: none; }
.camp, .order-open, .orc-scene { transition: opacity 0.25s; }

.sec { display: flex; align-items: baseline; gap: 8px; font: 700 14px "Unbounded", sans-serif; color: var(--ochre); }
.sec small { font: 600 11.5px "Manrope", sans-serif; color: var(--bone-dim); }
.dim { color: var(--bone-dim); font-size: 12.5px; }
.empty { text-align: center; padding: 8vh 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .big { font-size: 54px; filter: drop-shadow(0 0 24px rgba(232, 176, 75, 0.5)); }
.empty h2 { font: 700 20px "Unbounded", sans-serif; }
.empty p { max-width: 460px; color: var(--bone-dim); line-height: 1.5; }
.empty .hall { width: min(560px, 100%); text-align: left; margin-top: 18px; }

.btn {
  border: 1.5px solid var(--line); background: rgba(237, 230, 214, 0.07); color: var(--bone);
  padding: 8px 14px; border-radius: 10px; font-weight: 800; font-size: 12.5px; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover:not(:disabled) { background: rgba(237, 230, 214, 0.14); border-color: rgba(237, 230, 214, 0.4); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.gold { background: var(--ochre); border-color: var(--ochre); color: var(--ink); }
.btn.gold:hover:not(:disabled) { background: var(--gold); border-color: var(--gold); }
.btn.danger { border-color: rgba(226, 88, 62, 0.6); color: #ff9c87; }
.btn.danger:hover { background: rgba(226, 88, 62, 0.16); }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row input, .row textarea { flex: 1; min-width: 0; }
.page input[type="text"], .page input[type="number"], .page select, .page textarea {
  padding: 8px 11px; border-radius: 9px; border: 1.5px solid var(--line);
  background: rgba(237, 230, 214, 0.06); color: var(--bone); font: 600 13px "Manrope", sans-serif;
}
.page select option { background: #14231f; }
.page input:focus, .page select:focus, .page textarea:focus { border-color: var(--ochre); outline: none; }
.page textarea { resize: vertical; }

/* шапка сезона */
.season-head { display: flex; align-items: center; gap: 14px; }
.emblem {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 28px;
  background: radial-gradient(circle at 40% 30%, rgba(95, 224, 200, 0.35), rgba(95, 224, 200, 0.05));
  border: 1px solid rgba(95, 224, 200, 0.35); box-shadow: 0 0 30px rgba(95, 224, 200, 0.18);
}
.season-head small { font-weight: 800; font-size: 12px; color: var(--spirit); letter-spacing: 0.02em; }
.season-head h2 { font: 700 clamp(20px, 3vw, 28px) "Unbounded", sans-serif; }
.banner { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: #0c1614; }

/* карточка игрока */
.me-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 16px 18px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line);
}
.lvl-ring {
  --p: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background:
    radial-gradient(closest-side, #12201c 82%, transparent 83%),
    conic-gradient(var(--ochre) calc(var(--p) * 1%), rgba(237, 230, 214, 0.12) 0);
}
.lvl-ring b { font: 700 28px "Unbounded", sans-serif; line-height: 1; }
.lvl-ring small { font-weight: 800; font-size: 10px; color: var(--bone-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.me-info { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.me-name { font-weight: 800; font-size: 17px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.me-name em { font-style: normal; font-weight: 800; font-size: 12px; color: var(--spirit); }
.xpbar { height: 10px; border-radius: 6px; background: rgba(237, 230, 214, 0.1); overflow: hidden; }
.xpbar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--ochre), var(--gold));
           box-shadow: 0 0 14px rgba(255, 215, 94, 0.5); transition: width 0.6s cubic-bezier(0.2, 0.9, 0.3, 1); }
.me-sub { font-weight: 600; font-size: 12.5px; color: var(--bone-dim); display: flex; gap: 12px; }
.streak { color: #ffb38a; font-weight: 800; }
.money { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.money b { font: 700 24px "Unbounded", sans-serif; color: var(--gold); }
.money small { font-weight: 700; font-size: 11.5px; color: var(--bone-dim); }

/* дорожка уровней */
.track-wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; }
.tr-nav { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: rgba(237, 230, 214, 0.06); font-size: 20px; line-height: 1; }
.track {
  list-style: none; display: flex; gap: 8px; overflow-x: auto; padding: 14px 4px 12px;
  scroll-snap-type: x proximity; scrollbar-width: thin;
}
.tier {
  position: relative; flex: 0 0 104px; height: 128px; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 9px 7px; border-radius: 14px; text-align: center;
  background: rgba(237, 230, 214, 0.04); border: 1.5px solid var(--line);
  filter: saturate(0.4); opacity: 0.72;
}
.tier .n { font: 700 12px "Unbounded", sans-serif; color: var(--bone-dim); }
.tier .ico { font-size: 26px; line-height: 1; }
.tier .lbl { font-weight: 800; font-size: 11px; line-height: 1.25; color: var(--bone-dim);
             display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tier.got { filter: none; opacity: 1; border-color: rgba(95, 224, 200, 0.5); background: rgba(95, 224, 200, 0.08); }
.tier.got .lbl { color: var(--bone); }
.tier .ok { position: absolute; top: -8px; right: -6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
            background: var(--spirit); color: var(--ink); font-style: normal; font-weight: 800; font-size: 12px; }
.tier.cash { background: linear-gradient(170deg, rgba(255, 215, 94, 0.2), rgba(232, 176, 75, 0.05)); border-color: rgba(255, 215, 94, 0.55); }
.tier.cash .ico { font: 700 26px "Unbounded", sans-serif; color: var(--gold); text-shadow: 0 0 16px rgba(255, 215, 94, 0.6); }
.tier.cash .lbl { color: var(--gold); font-size: 13px; }
.tier.cur { opacity: 1; filter: none; border-color: var(--ochre); box-shadow: 0 0 0 3px rgba(232, 176, 75, 0.25), 0 10px 30px rgba(0, 0, 0, 0.4);
            transform: translateY(-4px); animation: cur-pulse 2s ease-in-out infinite; }
@keyframes cur-pulse { 50% { box-shadow: 0 0 0 6px rgba(232, 176, 75, 0.12), 0 10px 30px rgba(0, 0, 0, 0.4); } }

.wear { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wear label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 12px; color: var(--bone-dim); }
.wear .wide { grid-column: 1 / -1; }
.perks { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.perk { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.perk b { font: 700 18px "Unbounded", sans-serif; color: var(--ochre); }
.perk small { font-weight: 700; font-size: 11.5px; }

/* задания */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.cols.two { grid-template-columns: 1.3fr 1fr; }
.col { display: flex; flex-direction: column; gap: 10px; }
.quests { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.quest { padding: 11px 12px; border-radius: 13px; background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.q-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.q-text { font-weight: 800; font-size: 13.5px; line-height: 1.3; }
.xp { font: 700 12px "Unbounded", sans-serif; color: var(--ochre); white-space: nowrap; }
.q-bar { height: 6px; border-radius: 4px; background: rgba(237, 230, 214, 0.1); overflow: hidden; }
.q-bar i { display: block; height: 100%; background: var(--spirit); border-radius: 4px; transition: width 0.5s ease; }
.q-bot { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 22px; }
.q-bot small { font-weight: 700; font-size: 11.5px; color: var(--bone-dim); }
.q-bot select { max-width: 70%; padding: 4px 8px !important; font-size: 12px !important; }
.q-bot .row input { padding: 5px 9px; font-size: 12.5px; }
.quest.done { border-color: rgba(95, 224, 200, 0.4); }
.quest.done .q-text { color: var(--bone-dim); text-decoration: line-through; text-decoration-color: rgba(95, 224, 200, 0.6); }
.quest.done small { color: var(--spirit); }
.reroll { border: 0; background: transparent; color: var(--bone-dim); font-weight: 800; font-size: 11.5px; }
.reroll:hover { color: var(--ochre); }
.bonus { padding: 10px 12px; border-radius: 12px; border: 1.5px dashed rgba(232, 176, 75, 0.45); font-weight: 800; font-size: 12.5px; color: var(--ochre); text-align: center; }
.bonus.done { border-style: solid; border-color: rgba(95, 224, 200, 0.5); color: var(--spirit); }
.hint-line { text-align: center; font-weight: 600; font-size: 12.5px; color: var(--bone-dim); }

/* таблица и Зал славы */
.board { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.board li { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center;
            padding: 9px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.board li.me { border-color: var(--ochre); }
.board li.none { display: block; color: var(--bone-dim); font-weight: 600; font-size: 13px; }
.board .pos { font: 700 14px "Unbounded", sans-serif; text-align: center; }
.board .nm { font-weight: 800; font-size: 14px; display: flex; flex-direction: column; min-width: 0; }
.board .nm em { font-style: normal; font-size: 11px; color: var(--spirit); }
.board b { font: 700 13px "Unbounded", sans-serif; color: var(--ochre); }
.board small { font-weight: 700; font-size: 11.5px; color: var(--bone-dim); }
.rules { list-style: none; display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: 13px; line-height: 1.4; }
.hall { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.hall ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.hall li { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 215, 94, 0.06); border: 1px solid rgba(255, 215, 94, 0.25); }
.hall li b { font-weight: 800; font-size: 13px; color: var(--gold); }
.hall li span { font-weight: 600; font-size: 12.5px; }

/* админка */
.admin-grid { columns: 3 320px; column-gap: 14px; }
.admin-grid .card { break-inside: avoid; margin-bottom: 14px; }
.card { padding: 14px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 11px; }
.card h3 { font: 700 14px "Unbounded", sans-serif; color: var(--ochre); }
.card p { font-size: 13px; line-height: 1.45; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form label, .vol { display: flex; flex-direction: column; gap: 5px; font-weight: 800; font-size: 12px; color: var(--bone-dim); }
.vol { flex-direction: row; align-items: center; gap: 10px; }
.vol input { flex: 1; accent-color: var(--ochre); }
.list { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 10px; background: rgba(237, 230, 214, 0.04); font-weight: 800; font-size: 13px; }
.list li b { font: 700 13px "Unbounded", sans-serif; color: var(--gold); margin-left: auto; }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.switch { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 12.5px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: relative; flex: none; width: 36px; height: 20px; border-radius: 999px; background: rgba(237, 230, 214, 0.18); transition: background 0.2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--bone); transition: transform 0.2s; }
.switch input:checked + span { background: var(--spirit); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--spirit); outline-offset: 2px; }

/* у костра: уровень, рамка, «заглушён» */
.camp li { --fr: transparent; }
.camp li .lv {
  position: absolute; left: 20px; top: 18px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  display: grid; place-items: center; font: 700 9px "Unbounded", sans-serif; font-style: normal;
  background: var(--ochre); color: var(--ink); border: 1.5px solid #10201b;
}
.camp li[data-frame="spark"] { --fr: #e8b04b; }
.camp li[data-frame="flame"] { --fr: #ff7a3d; }
.camp li[data-frame="ghost"] { --fr: #a7fff0; }
.camp li[data-frame="moon"] { --fr: #c9d4ff; }
.camp li[data-frame="blood"] { --fr: #ff3b3b; }
.camp li[data-frame="gold"] { --fr: #ffd75e; }
.camp li[data-frame="eternal"] { --fr: #5fe0c8; }
.camp li:not([data-frame=""]) img { box-shadow: 0 0 0 2px #10201b, 0 0 0 4px var(--fr), 0 0 14px var(--fr); }
.camp li[data-frame="eternal"] img { animation: eternal 3s linear infinite; }
@keyframes eternal { 50% { box-shadow: 0 0 0 2px #10201b, 0 0 0 4px var(--ochre), 0 0 18px var(--ember); } }
.camp li.deaf { opacity: 0.5; }
.camp li.deaf::after { content: "🔇"; position: absolute; left: 22px; top: -4px; font-size: 11px; }
.lvl-ring[data-frame="gold"], .lvl-ring[data-frame="eternal"] { box-shadow: 0 0 24px rgba(255, 215, 94, 0.35); }
.board li[data-frame="gold"], .board li[data-frame="eternal"] { border-color: rgba(255, 215, 94, 0.5); }

/* заказ вне очереди */
.prio { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 12.5px; color: var(--gold); cursor: pointer; }
.prio[hidden] { display: none; }
.prio input { accent-color: var(--gold); width: 16px; height: 16px; }
.prio small { color: var(--bone-dim); font-weight: 700; }

/* ================= событие поверх всего ================= */
.ev {
  --left: 1;
  position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at 50% 50%, rgba(5, 10, 9, 0.55), rgba(5, 10, 9, 0.82));
  animation: ev-in 0.35s ease both;
}
.ev[hidden] { display: none; }
.ev.out { animation: ev-out 0.35s ease both; }
@keyframes ev-in { from { opacity: 0; } }
@keyframes ev-out { to { opacity: 0; } }

.quiz-card {
  width: min(820px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 18px 20px 16px;
  border-radius: 22px; background: linear-gradient(180deg, rgba(20, 34, 30, 0.97), rgba(11, 19, 17, 0.97));
  border: 1px solid rgba(237, 230, 214, 0.16); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  animation: card-pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes card-pop { from { transform: translateY(30px) scale(0.9); opacity: 0; } }
.q-head { display: flex; justify-content: space-between; align-items: center; }
.kind {
  display: inline-flex; gap: 8px; align-items: center; padding: 6px 13px; border-radius: 999px;
  background: var(--ochre); color: var(--ink); font: 700 12px "Unbounded", sans-serif; text-transform: uppercase; letter-spacing: 0.04em;
}
.fact .kind { background: var(--spirit); }
.clock { position: relative; width: 52px; height: 52px; display: grid; place-items: center; }
.clock svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.clock circle { fill: rgba(237, 230, 214, 0.06); stroke: var(--ochre); stroke-width: 4; stroke-linecap: round;
                stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--left) * 100); transition: stroke-dashoffset 0.25s linear; }
.clock b { font: 700 17px "Unbounded", sans-serif; }
.hurry .clock circle { stroke: var(--ember); }
.hurry .clock b { color: #ff9c87; animation: tick-beat 1s ease infinite; }
@keyframes tick-beat { 10% { transform: scale(1.25); } 30% { transform: none; } }
.q { font: 700 clamp(19px, 3.2vw, 30px) "Unbounded", sans-serif; text-align: center; line-height: 1.25; padding: 4px 8px 6px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  position: relative; display: grid; grid-template-columns: 38px 1fr 28px; align-items: center; gap: 10px;
  min-height: 74px; padding: 10px 14px; border: 0; border-radius: 14px; text-align: left; color: #fff;
  background: var(--c); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.22), 0 6px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.12s ease, filter 0.25s ease, opacity 0.25s ease, box-shadow 0.2s;
  animation: tile-in 0.45s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
.tile.t0 { --c: var(--t0); animation-delay: 0.05s; }
.tile.t1 { --c: var(--t1); animation-delay: 0.12s; }
.tile.t2 { --c: var(--t2); color: var(--ink); animation-delay: 0.19s; }
.tile.t3 { --c: var(--t3); animation-delay: 0.26s; }
@keyframes tile-in { from { transform: translateY(16px) scale(0.92); opacity: 0; } }
.tile:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
.tile:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22); }
.tile:disabled { cursor: default; }
.tile .shape { font-size: 22px; opacity: 0.85; text-align: center; }
.tile .opt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .opt b { font-weight: 800; font-size: 15.5px; line-height: 1.25; overflow-wrap: anywhere; }
.tile .opt small { font-weight: 700; font-size: 12.5px; opacity: 0.82; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .mark { font: 700 20px "Unbounded", sans-serif; text-align: center; }
.tile.picked { box-shadow: 0 0 0 3px #fff, inset 0 -5px 0 rgba(0, 0, 0, 0.22), 0 6px 22px rgba(0, 0, 0, 0.4); }
.tiles:has(.picked) .tile:not(.picked):not(.right) { opacity: 0.55; }
.revealed .tile.wrong { opacity: 0.32; filter: saturate(0.3); }
.revealed .tile.right { animation: right-pop 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) both; box-shadow: 0 0 0 3px #fff, 0 0 34px var(--c); opacity: 1; }
@keyframes right-pop { 40% { transform: scale(1.05); } }

.q-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 30px; }
.who { display: flex; align-items: center; }
.who img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid #12201c; margin-left: -7px; animation: tile-in 0.3s both; }
.who img:first-child { margin-left: 0; }
.who span { margin-left: 8px; font-weight: 800; font-size: 12px; color: var(--bone-dim); }
.ev-note { font-weight: 800; font-size: 13px; color: var(--spirit); text-align: right; }
.winners { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 0; }
.winners:empty { display: none; }
.winners .w { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 4px; border-radius: 999px;
              background: rgba(95, 224, 200, 0.12); border: 1px solid rgba(95, 224, 200, 0.4); font-weight: 800; font-size: 13px;
              animation: tile-in 0.4s both; }
.winners .w img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.winners .w b { color: var(--ochre); font-size: 12px; }
.winners .w.first { background: rgba(255, 215, 94, 0.16); border-color: var(--gold); }
.winners .w.first::before { content: "👑"; margin-left: 4px; }
.winners .none { font-weight: 800; font-size: 13px; color: var(--bone-dim); }

/* Золотой трек: монета по центру */
.ev.golden { background: radial-gradient(circle at 50% 50%, rgba(255, 215, 94, 0.16), rgba(5, 10, 9, 0.6) 55%); pointer-events: none; }
.gold-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; pointer-events: auto; }
.coin-box { position: relative; animation: coin-bob 1.6s ease-in-out 0.6s infinite; }
.gold-wrap .ring { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); transform: rotate(-90deg); pointer-events: none; overflow: visible; }
.gold-wrap .ring circle { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 100;
                          stroke-dashoffset: calc(100 - var(--left) * 100); transition: stroke-dashoffset 0.25s linear; }
.coin {
  position: relative; width: 200px; height: 200px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 0; color: #5a3a06;
  background: radial-gradient(circle at 35% 30%, #fff3b8, #ffd75e 35%, #e8a92a 70%, #b8770f);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.25), inset 0 -10px 24px rgba(120, 70, 0, 0.45), 0 0 60px rgba(255, 215, 94, 0.55);
  animation: coin-in 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
.coin b { font: 700 30px "Unbounded", sans-serif; letter-spacing: 0.03em; }
.coin small { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.coin .shine { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.6) 50%, transparent 60%) 0 0 / 300% 100%;
               animation: shine 2.2s ease-in-out infinite; }
.coin:hover:not(:disabled) { filter: brightness(1.08); }
.coin:active:not(:disabled) { transform: scale(0.94); }
.coin:disabled { cursor: default; }
.coin.caught { animation: coin-caught 0.7s cubic-bezier(0.2, 1.5, 0.4, 1) both; filter: saturate(1.2); }
.coin.caught b::after { content: " ✓"; }
@keyframes coin-in { from { transform: scale(0.2) rotate(-40deg); opacity: 0; } }
@keyframes coin-bob { 50% { transform: translateY(-6px); } }
@keyframes shine { 0% { background-position: 100% 0; } 60%, 100% { background-position: 0 0; } }
@keyframes coin-caught { 40% { transform: scale(1.15) rotate(8deg); } 100% { transform: scale(0.9); } }
.golden .ev-note { text-align: center; color: var(--gold); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }
.golden .who { justify-content: center; }

.confetti { position: fixed; inset: 0; z-index: 13; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: confetti 2.2s cubic-bezier(0.3, 0.5, 0.5, 1) both; }
@keyframes confetti { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); opacity: 0.6; } }

/* ================= тема сезона «Ночь Духов» ================= */
.bats { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.bats i { position: absolute; left: -80px; width: calc(60px * var(--s)); animation: bat-fly linear infinite; opacity: 0.55; }
.bats svg { width: 100%; fill: #0a0f0e; filter: drop-shadow(0 0 6px rgba(95, 224, 200, 0.35)); animation: flap 0.28s ease-in-out infinite alternate; transform-origin: center; }
@keyframes bat-fly { 0% { transform: translate(0, 0); } 50% { transform: translate(55vw, 6vh); } 100% { transform: translate(calc(100vw + 160px), -4vh); } }
@keyframes flap { to { transform: scaleY(0.45); } }
body[data-theme="spirits"] .bg::after {
  background:
    radial-gradient(ellipse at 50% 38%, transparent 0%, rgba(20, 12, 30, 0.35) 45%, rgba(10, 8, 18, 0.92) 100%),
    linear-gradient(to bottom, transparent 55%, rgba(30, 14, 8, 0.7));
}
body[data-theme="frost"] .bg::after {
  background:
    radial-gradient(ellipse at 50% 38%, transparent 0%, rgba(14, 24, 40, 0.35) 45%, rgba(8, 14, 26, 0.92) 100%),
    linear-gradient(to bottom, transparent 55%, rgba(200, 225, 255, 0.12));
}

/* ---------- узкий экран ---------- */
@media (max-width: 900px) {
  .cols, .cols.two { grid-template-columns: 1fr; }
  .page { padding: 20px 44px 56px; }
}
@media (max-width: 640px) {
  .tabs button { padding: 4px 8px; font-size: 10.5px; }
  .page { padding: 52px 14px 56px; }
  .pg-arrow { width: 26px; height: 56px; opacity: 0.4; }
  .me-card { grid-template-columns: auto 1fr; }
  .money { grid-column: 1 / -1; text-align: left; }
  .wear, .form, .toggles { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 58px; }
  .coin { width: 160px; height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .page, .tile, .coin, .quiz-card, .ev, .tier.cur, .coin .shine { animation: none !important; transition: none !important; }
}
.form input, .form select { width: 100%; min-width: 0; }

/* ---------- настроение костра ---------- */
.mood-btn {
  display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 5px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--mc) 55%, transparent);
  background: rgba(11, 20, 18, 0.72); backdrop-filter: blur(10px); text-align: left;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.mood-btn[hidden] { display: none; }
.mood-btn:hover { box-shadow: 0 0 18px color-mix(in srgb, var(--mc) 35%, transparent); }
.mood-btn .m-emo { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 16px;
                   background: color-mix(in srgb, var(--mc) 22%, transparent); }
.mood-btn .m-txt { display: flex; flex-direction: column; line-height: 1.1; }
.mood-btn small { font-weight: 800; font-size: 10px; color: var(--bone-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.mood-btn b { font-weight: 800; font-size: 13px; }
.mood-btn em { font-style: normal; font-weight: 800; font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
               display: grid; place-items: center; background: var(--mc); color: var(--ink); }
[data-mood="active"] { --mc: #ff8a3d; }
[data-mood="fun"] { --mc: #ffd75e; }
[data-mood="calm"] { --mc: #7fb8ff; }
[data-mood="sad"] { --mc: #c08cff; }
[data-mood="any"] { --mc: #5fe0c8; }

.mood-pop {
  width: min(320px, calc(100vw - 28px)); padding: 12px; border-radius: 16px;
  background: rgba(11, 20, 18, 0.95); border: 1px solid var(--line); backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 10px;
  animation: pop-in 0.25s cubic-bezier(0.2, 1.3, 0.4, 1) both; transform-origin: top right;
}
.mood-pop[hidden] { display: none; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.92) translateY(-6px); } }
.m-head { display: flex; flex-direction: column; gap: 4px; }
.m-head b { font: 700 13px "Unbounded", sans-serif; color: var(--ochre); }
.m-head small { font-weight: 600; font-size: 11.5px; line-height: 1.4; color: var(--bone-dim); }
.m-list { display: flex; flex-direction: column; gap: 5px; }
.m-opt {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 11px;
  border: 1.5px solid transparent; background: rgba(237, 230, 214, 0.05); text-align: left; transition: background 0.15s, border-color 0.15s;
}
.m-opt:hover { background: color-mix(in srgb, var(--mc) 14%, transparent); }
.m-opt .m-emo { font-size: 18px; text-align: center; }
.m-opt .m-name { font-weight: 800; font-size: 13.5px; }
.m-opt.on { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 16%, transparent); }
.m-opt.on .m-name::after { content: " · сейчас"; font-weight: 700; font-size: 11px; color: var(--mc); }
.m-opt.mine { box-shadow: inset 3px 0 0 var(--mc); }
.m-who { display: flex; align-items: center; }
.m-who img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 1.5px solid #10201b; margin-left: -6px; }
.m-who img:first-child { margin-left: 0; }
.m-who i { font-style: normal; font-weight: 800; font-size: 11px; margin-left: 5px; color: var(--mc); }
.m-note { font-weight: 600; font-size: 11px; color: var(--bone-dim); }
body:not([data-page="air"]) .mood-btn, body:not([data-page="air"]) .mood-pop { display: none; }
