/* «Везунчик» — pixel-art night hall: dark blue ground, amber light, gold prizes.
   Structure borrowed from shop-style mini-apps: header, promo, tag chips, cards,
   bottom nav with two buttons, bottom sheet for actions. */
:root {
  --bg: #0f1a33;
  --bg-2: #162447;
  --card: #1c2b52;
  --line: #2b3f75;
  --text: #f3f1ea;
  --muted: #9fb0d8;
  --amber: #ffb347;
  --gold: #ffd166;
  --green: #7ee081;
  --red: #ff7b7b;
  --pixel: "Pixelify Sans", "Rubik", sans-serif;
  --body: "Rubik", system-ui, -apple-system, sans-serif;
  --nav-h: 80px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { margin: 0; background: var(--bg); }
/* body stays transparent: the hall backdrop (body::before, z-index -2) must show through */
body { margin: 0; background: transparent; color: var(--text); font-family: var(--body); min-height: 100vh; }
#app { max-width: 480px; margin: 0 auto; padding: 12px 16px calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); }
img { image-rendering: auto; }

/* header */
.top { display: flex; align-items: center; gap: 12px; padding: 4px 0 8px; position: relative; }
.bubble { position: absolute; left: 62px; top: 58px; z-index: 30; max-width: 260px; background: var(--gold); color: #2a1a00; font-family: var(--body); font-weight: 700; font-size: 13px; line-height: 1.25; padding: 8px 12px; border-radius: 14px 14px 14px 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(6px) scale(.96); transition: .2s; pointer-events: none; }
.bubble.show { opacity: 1; transform: none; }
.bubble::before { content: ""; position: absolute; left: -6px; top: 6px; border: 6px solid transparent; border-right-color: var(--gold); border-left: 0; }
.mascot { width: 54px; height: 60px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255, 179, 71, .55)); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.top-text { flex: 1; min-width: 0; }
.brand { font-family: var(--pixel); font-weight: 700; font-size: 22px; letter-spacing: 1px; color: var(--gold); text-shadow: 2px 2px 0 #7a4a00; }
.greeting { color: var(--muted); font-size: 14px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* promo banner (dashed, like a coupon) */
.promo { border: 2px dashed var(--amber); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--gold); background: rgba(255, 179, 71, .08); margin-top: 6px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 44px; background: var(--bg-2); border: 2px solid var(--line); color: var(--muted); border-radius: 999px; padding: 8px 14px; font-family: var(--body); font-weight: 600; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--gold); border-color: var(--gold); color: #2a1a00; }
.chip-balance { background: var(--card); border-color: var(--gold); color: var(--gold); font-family: var(--body); font-weight: 800; font-size: 16px; padding: 10px 12px; }

/* cards */
.card { background: rgba(28, 43, 82, .93); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-top: 12px; box-shadow: 0 6px 0 #0b1328, 0 0 0 1px rgba(0, 0, 0, .25); position: relative; }
.card-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.card-title { font-weight: 800; font-size: 17px; color: var(--text); display: flex; justify-content: flex-start; align-items: center; gap: 4px; }
.card-title .counter { margin-left: auto; }
.tag { align-self: flex-start; font-family: var(--pixel); font-weight: 600; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); }
.tag-hit { background: var(--gold); color: #2a1a00; border-color: var(--gold); }
.tag-top { background: var(--green); color: #0f1a33; border-color: var(--green); }
.tag-sport { background: #3d6bd6; color: #fff; border-color: #3d6bd6; }
.counter { font-family: var(--body); font-weight: 800; font-size: 16px; color: var(--gold); }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.balance-total { font-family: var(--body); font-weight: 800; font-size: 40px; color: var(--gold); margin: 4px 0 10px; }
.balance-split { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; color: var(--muted); }
.pill-bonus { color: var(--green); border-color: rgba(126, 224, 129, .5); }
.hint { color: var(--muted); font-size: 13px; margin-top: 8px; }
.muted { color: var(--muted); }

.streak { text-align: center; min-width: 96px; }
.streak-num { font-family: var(--body); font-weight: 800; font-size: 30px; color: var(--amber); }
.streak-label { font-size: 11px; color: var(--muted); }
.calendar { display: flex; gap: 3px; justify-content: center; margin-top: 6px; }
.calendar span { width: 10px; height: 10px; border-radius: 2px; background: var(--bg-2); border: 1px solid var(--line); }
.calendar span.on { background: var(--gold); border-color: var(--gold); }
.calendar span.prize { border-color: var(--amber); }

/* wheel */
.wheel-card { text-align: center; }
.wheel-card .card-head { text-align: left; }
.wheel-wrap { position: relative; width: min(300px, 100%); aspect-ratio: 1; height: auto; margin: 4px auto 14px; }
.pointer { position: absolute; top: -6px; left: 50%; width: 0; height: 0; transform: translateX(-50%); border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 26px solid var(--gold); filter: drop-shadow(0 3px 0 #7a4a00); z-index: 3; }
.wheel { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 5px var(--gold), 0 0 0 9px #7a4a00, 0 0 34px rgba(255, 209, 102, .35); transition: transform 4.6s cubic-bezier(.15, .7, .1, 1); }
.wheel svg { display: block; width: 100%; height: 100%; border-radius: 50%; }
.wheel text { font-family: var(--body); font-weight: 800; font-size: 13.5px; fill: #1d1400; }
.hub { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--gold); border: 4px solid #7a4a00; display: flex; align-items: center; justify-content: center; font-size: 20px; z-index: 2; box-shadow: 0 0 0 3px rgba(0,0,0,.25); }
#more-spins-btn { margin-top: 8px; }
.more-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; font-size: 14px; }
.more-item.done { border-color: rgba(126, 224, 129, .5); }
.more-item b { color: var(--gold); white-space: nowrap; }
.more-item small { display: block; color: var(--muted); }
.guide-link { background: none; border: 0; padding: 8px 0; margin-top: 0; color: var(--gold); font-family: var(--body); font-weight: 600; font-size: 13px; cursor: pointer; text-align: left; }
.guide { display: grid; gap: 10px; }
.guide-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.guide-row span:first-child { font-size: 22px; line-height: 1.2; }
.guide-row b { display: block; }
.net-error { text-align: center; }

/* buttons */
.btn { display: inline-block; width: 100%; padding: 14px; border-radius: 12px; border: 0; font-family: var(--body); font-weight: 800; font-size: 17px; cursor: pointer; text-decoration: none; text-align: center; }
.btn-primary { background: var(--gold); color: #2a1a00; box-shadow: 0 5px 0 #7a4a00; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #7a4a00; }
.btn-primary[disabled] { background: #6d6a5e; color: #2a2a2a; box-shadow: none; }
.btn-secondary { background: var(--amber); color: #2a1a00; box-shadow: 0 5px 0 #7a4a00; margin-top: 8px; }
.btn-ghost { background: transparent; color: var(--muted); border: 2px solid var(--line); margin-top: 8px; font-size: 15px; padding: 10px; }
.gate { margin-top: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; text-align: left; }
.gate p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }

/* lists */
.quests { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.quests li { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.quests li.done { border-color: rgba(126, 224, 129, .5); color: var(--green); }
.quests .box { width: 22px; height: 22px; border: 2px solid var(--line); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: 0 0 auto; }
.quests li.done .box { background: var(--green); border-color: var(--green); color: #0f1a33; }
.chest-item { display: flex; justify-content: space-between; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.chest-item .btn, .btn.small { width: auto; padding: 8px 14px; font-size: 14px; margin: 0; }
.today { list-style: none; padding: 0; margin: 0 0 4px; display: grid; gap: 8px; font-size: 15px; }
.rules { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }
.fair-text { color: var(--muted); font-size: 13px; margin: 6px 0; }
.mono { display: block; font-size: 11px; word-break: break-all; color: var(--green); background: var(--bg-2); padding: 8px; border-radius: 8px; }
.error { border-color: rgba(255, 123, 123, .6); }
.error .card-title { color: var(--red); }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 22px; }

/* bottom nav */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); display: flex; gap: 8px; max-width: 480px; margin: 0 auto;
  background: rgba(15, 26, 51, .92); backdrop-filter: blur(8px); border-top: 2px solid var(--line); z-index: 5;
}
.nav-btn { flex: 1; border: 2px solid var(--line); background: var(--bg-2); color: var(--muted); border-radius: 14px; font-family: var(--body); font-weight: 800; font-size: 14px; cursor: pointer; }
.nav-btn.on { background: var(--gold); border-color: var(--gold); color: #2a1a00; box-shadow: 0 4px 0 #7a4a00; }

/* bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 8; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; z-index: 9;
  background: var(--card); border: 2px solid var(--gold); border-bottom: 0; border-radius: 20px 20px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); text-align: center; animation: up .3s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.sheet-handle { width: 44px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 10px; }
.sheet-mascot { width: 72px; height: 80px; object-fit: contain; }
.result-emoji { font-size: 40px; line-height: 1; margin-top: -8px; }
.result-title { font-family: var(--body); font-weight: 800; font-size: 22px; color: var(--gold); margin: 10px 0 6px; }
.result-sub { color: var(--muted); font-size: 14px; margin-bottom: 14px; }

/* ---------- screens beyond the hall ---------- */
.no-scroll { overflow: hidden; }
.loading { text-align: center; color: var(--muted); padding: 30px 0; }
.promo-green { border-color: var(--green); color: var(--green); background: rgba(126, 224, 129, .08); }
.bottom-nav .nav-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; padding: 6px 0; }
.bottom-nav .nav-btn span { font-size: 18px; line-height: 1; }
.bottom-nav .nav-btn img { width: 32px; height: 32px; object-fit: contain; }
.chip img { width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; margin-right: 5px; }
.card-title .ico { width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; margin-right: 6px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-win { background: var(--green); color: #0f1a33; border-color: var(--green); }
.tag-loss { background: var(--red); color: #2a0f0f; border-color: var(--red); }
.tag-push, .tag-void { background: var(--bg-2); color: var(--muted); }
.card.item { padding-bottom: 12px; }
.card.item .btn { margin-top: 10px; }
.card.owned { border-color: rgba(255, 209, 102, .45); }
.meta { color: var(--muted); font-size: 13px; margin: -2px 0 8px; }
.label { font-weight: 600; font-size: 14px; margin: 10px 0 6px; }
.pick-bet { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.pick-bet.locked { color: var(--muted); border-style: dashed; }
.legs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.legs li { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.edge { margin-top: 10px; font-size: 13px; color: var(--green); background: rgba(126, 224, 129, .08); border-radius: 8px; padding: 8px 10px; }
.analysis { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--text); max-height: 50vh; overflow-y: auto; }
.confirm { font-size: 15px; line-height: 1.5; margin-bottom: 12px; }
.empty { text-align: center; }
.empty img { display: block; width: 72px; height: 72px; margin: 0 auto 4px; object-fit: contain; opacity: .95; }
.empty .card-title { justify-content: center; margin-top: 6px; }
.opts { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.opt { flex: 1 0 auto; background: var(--bg-2); border: 2px solid var(--line); color: var(--text); border-radius: 10px; padding: 9px 10px; font-family: var(--body); font-weight: 600; font-size: 14px; cursor: pointer; }
.opt.small { flex: 0 0 calc(33.33% - 4px); padding: 11px 0; font-size: 13px; }
.opt.on { background: var(--gold); border-color: var(--gold); color: #2a1a00; }
.opt[disabled] { opacity: .5; cursor: default; }
.stat-row { display: flex; gap: 8px; margin: 6px 0 8px; }
.stat-row > div { flex: 1; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; text-align: center; }
.stat-num { font-family: var(--body); font-weight: 800; font-size: 22px; color: var(--gold); }
.stat-num.good { color: var(--green); } .stat-num.bad { color: var(--red); }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.board { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.board li { display: flex; justify-content: space-between; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.board li.me { border-color: var(--gold); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.feed li { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.feed li > span:first-child { flex: 1; }
.good { color: var(--green); } .bad { color: var(--red); }
.linkbox { font-family: monospace; font-size: 13px; word-break: break-all; background: var(--bg-2); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0 8px; color: var(--gold); user-select: all; }
.tier { margin: 6px 0; font-size: 14px; color: var(--gold); }
.shop { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.shop-item { background: var(--bg-2); border: 2px solid var(--line); border-radius: 12px; padding: 12px 10px; text-align: left; color: var(--text); font-family: var(--body); cursor: pointer; }
.shop-item.plan { border-color: rgba(255, 209, 102, .5); grid-column: span 1; }
.shop-name { font-weight: 800; font-size: 15px; }
.shop-price { font-family: var(--body); font-weight: 800; font-size: 18px; color: var(--gold); margin-top: 4px; }
.bar { height: 10px; border-radius: 5px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 10px; }
.bar div { height: 100%; background: var(--gold); }
.acc { border-top: 1px solid var(--line); padding: 8px 0; }
.acc summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; }
.acc summary::after { content: "›"; color: var(--muted); transform: rotate(90deg); }
.acc[open] summary::after { transform: rotate(-90deg); }
.ach { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 6px 0 0 4px; color: var(--muted); }
.ach.on { color: var(--text); }
.faq-a { font-size: 14px; color: var(--muted); line-height: 1.5; padding: 6px 0 2px; }
.switch { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; cursor: pointer; }
.switch input { display: none; }
.switch i { width: 44px; height: 26px; border-radius: 13px; background: var(--bg-2); border: 2px solid var(--line); position: relative; flex: 0 0 auto; transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: .2s; }
.switch input:checked + i { background: var(--gold); border-color: var(--gold); }
.switch input:checked + i::after { left: 20px; background: #2a1a00; }
.quests li.link { cursor: pointer; }
.sheet { max-height: 88vh; overflow-y: auto; }
.sheet-title { font-family: var(--body); font-weight: 800; font-size: 20px; color: var(--gold); margin: 4px 0 6px; text-align: left; }
.sheet-body { text-align: left; }
.sheet .btn { margin-top: 12px; }
.sheet .result-emoji, .sheet .result-title, .sheet .result-sub, .sheet .sheet-mascot { display: block; text-align: center; margin-left: auto; margin-right: auto; }

/* partner hint — a highlighted card of its own, right under the bet */
.partner { display: flex; gap: 12px; align-items: center; margin: 12px 0 4px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(255, 209, 102, .22), rgba(255, 179, 71, .10)); border: 2px solid var(--gold); box-shadow: 0 4px 0 #7a4a00; font-size: 15px; line-height: 1.45; color: var(--text); }
.partner .gico { width: 44px; height: 44px; flex: 0 0 auto; margin: 0; }
.partner-text { flex: 1; }
.partner a { display: inline-block; margin-left: 4px; padding: 3px 12px; border-radius: 8px; background: var(--gold); color: #2a1a00; font-weight: 800; text-decoration: none; box-shadow: 0 3px 0 #7a4a00; }
.gico { width: 30px; height: 30px; object-fit: contain; flex: 0 0 auto; }
.guide-row .gico { margin-top: 2px; }
.chip-help { width: 44px; min-height: 44px; padding: 0; text-align: center; font-weight: 800; font-size: 18px; color: var(--muted); }
.top { gap: 10px; }
.matchday-title { font-weight: 800; font-size: 19px; margin: 2px 0 4px; }
.jackpot-prize { font-weight: 800; font-size: 18px; color: var(--gold); margin: 2px 0 6px; }
.votes { margin: 6px 0 4px; padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.votes-title { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.vote-row { display: grid; grid-template-columns: minmax(52px, auto) 1fr 40px; gap: 8px; align-items: center; font-size: 13px; margin: 3px 0; }
.vote-row.mine { color: var(--gold); }
.vote-bar { height: 8px; border-radius: 4px; background: var(--card); overflow: hidden; }
.vote-bar div { height: 100%; background: var(--gold); }
.vote-row b { text-align: right; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); max-width: 92%; padding: 10px 16px; border-radius: 12px; background: var(--green); color: #0f1a33; font-weight: 700; font-size: 14px; opacity: 0; transition: .25s; z-index: 20; pointer-events: none; text-align: center; }
.toast.warn { background: var(--amber); color: #2a1a00; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.wheel-card.gated .wheel-wrap { opacity: .45; filter: grayscale(.4); }
.wheel-card.gated .btn-primary { background: var(--bg-2); color: var(--muted); border: 2px solid var(--line); box-shadow: none; }
.gate { text-align: center; border: 2px dashed var(--amber); background: rgba(255, 179, 71, .08); }
.gate p { color: var(--text); font-size: 15px; font-weight: 600; }
.gate.pulse { animation: pulse .4s ease-in-out 3; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.chosen { margin-top: 6px; font-size: 14px; color: var(--green); }
.tag-num { font-family: var(--body); font-weight: 800; text-transform: none; font-size: 13px; letter-spacing: 0; }
.hint a { color: var(--gold); font-weight: 700; }
#jackpot-card:empty { display: none; }
/* newcomer quests */
.newbie { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.newbie-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; }
.quests .go { margin-left: auto; color: var(--muted); }
/* day summary */
.dayrows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dayrows li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.dayrows li span:first-child { width: 22px; text-align: center; flex: 0 0 auto; }
/* victory screen */
.victory { position: fixed; inset: 0; z-index: 30; background: radial-gradient(circle at 50% 30%, rgba(255, 209, 102, .28), rgba(15, 26, 51, .97) 60%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; overflow: hidden; }
.victory-mascot { width: 160px; height: 180px; object-fit: contain; animation: bob 1.6s ease-in-out infinite; filter: drop-shadow(0 0 24px rgba(255, 209, 102, .7)); }
.victory-title { font-family: var(--body); font-weight: 800; font-size: 28px; color: var(--gold); margin: 12px 0 6px; text-shadow: 0 3px 0 #7a4a00; }
.victory-sub { color: var(--text); font-size: 16px; margin-bottom: 18px; max-width: 320px; }
.victory .btn { max-width: 320px; margin-top: 8px; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 16px; border-radius: 2px; opacity: .9; animation: fall 2.8s linear infinite; }
@keyframes fall { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(110vh) rotate(720deg); } }
.mono.inline { display: block; margin: 6px 0 4px; }

/* achievements: aligned counters, two-line items */
.acc.ach-cat summary { align-items: center; gap: 10px; }
.acc.ach-cat summary .gico { width: 26px; height: 26px; }
.acc.ach-cat .acc-name { flex: 1; }
.acc.ach-cat .acc-count { font-family: var(--body); font-weight: 800; color: var(--gold); min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.acc.ach-cat summary::after { margin-left: 6px; }
.ach { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0 0 2px; color: var(--muted); }
.ach-ico { width: 22px; height: 22px; object-fit: contain; flex: 0 0 auto; margin-top: 1px; }
.ach-body { flex: 1; min-width: 0; }
.ach-name { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.ach.on .ach-name { color: var(--green); }
.ach-reward { color: var(--gold); font-weight: 800; white-space: nowrap; }
.ach-desc { font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }

/* titles list */
.title-ico { width: 22px; height: 22px; vertical-align: -5px; margin-right: 6px; }
.card-title .title-ico { width: 26px; height: 26px; vertical-align: -6px; }
.titles { display: grid; gap: 4px; margin: 6px 0 10px; }
.title-row { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.title-row .muted { font-weight: 400; margin-left: auto; text-align: right; }
.title-row.on { color: var(--gold); }

/* brand emoji rendered inline in place of standard emoji */
img.emoji { width: 1.15em; height: 1.15em; object-fit: contain; vertical-align: -0.22em; margin: 0 0.05em; }
.btn img.emoji, .chip img.emoji, .tag img.emoji { width: 1.2em; height: 1.2em; }
.result-emoji img.emoji { width: 1em; height: 1em; }

/* ---------- atmosphere: hall backdrop, lantern light, fireflies ---------- */
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background: var(--bg) url("/static/bg_hall.jpg") center top / cover no-repeat; opacity: .6; filter: brightness(.9); pointer-events: none; }
.scene { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.lantern-glow { position: absolute; top: -120px; width: 440px; height: 440px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 179, 71, .5) 0%, rgba(255, 179, 71, .18) 35%, transparent 70%); will-change: opacity, transform; animation: flicker 3.6s ease-in-out infinite; }
.lantern-glow.left { left: -180px; }
.lantern-glow.right { right: -180px; animation-delay: -1.7s; animation-duration: 4.3s; }
@keyframes flicker { 0%, 100% { opacity: .85; transform: scale(1); } 40% { opacity: 1; transform: scale(1.04); } 70% { opacity: .78; transform: scale(.98); } }
.fireflies i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #ffd166; box-shadow: 0 0 6px 2px rgba(255, 209, 102, .55); opacity: 0; will-change: transform, opacity; animation: drift 16s ease-in-out infinite; }
.fireflies i:nth-child(1) { left: 12%; top: 70%; animation-delay: 0s; }
.fireflies i:nth-child(2) { left: 26%; top: 55%; animation-delay: -3s; animation-duration: 19s; }
.fireflies i:nth-child(3) { left: 41%; top: 80%; animation-delay: -6s; }
.fireflies i:nth-child(4) { left: 58%; top: 62%; animation-delay: -9s; animation-duration: 14s; }
.fireflies i:nth-child(5) { left: 73%; top: 76%; animation-delay: -12s; }
.fireflies i:nth-child(6) { left: 88%; top: 58%; animation-delay: -2s; animation-duration: 21s; }
.fireflies i:nth-child(7) { left: 8%; top: 35%; animation-delay: -8s; animation-duration: 18s; }
.fireflies i:nth-child(8) { left: 50%; top: 40%; animation-delay: -14s; }
.fireflies i:nth-child(9) { left: 80%; top: 30%; animation-delay: -5s; animation-duration: 15s; }
@keyframes drift { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 50% { transform: translate(18px, -60px); opacity: .6; } 90% { opacity: .8; } 100% { transform: translate(-12px, -130px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lantern-glow, .fireflies i, .mascot { animation: none !important; } }

/* wooden sign planks for section tags (pure CSS: readable at any size) */
.tag { border: 2px solid #3a2410; border-radius: 6px; padding: 6px 11px 5px; color: #f6e7c1; text-shadow: 0 1px 0 #1a0f05;
  background: linear-gradient(180deg, #8a5a2b 0%, #6b4220 45%, #5a3518 100%); box-shadow: inset 0 1px 0 rgba(255, 220, 160, .35), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 2px 0 #241608; }
.tag-hit { color: #2a1a00; text-shadow: 0 1px 0 rgba(255, 255, 255, .45); border-color: #8a5a00; background: linear-gradient(180deg, #ffe08a 0%, #f2b93b 55%, #d99a1e 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(120, 70, 0, .35), 0 2px 0 #7a4a00; }
.tag-top { color: #0e2a12; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); border-color: #1f5a2a; background: linear-gradient(180deg, #a6f0a8 0%, #6fd67a 55%, #4fb85e 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 0 rgba(0, 60, 10, .35), 0 2px 0 #1f5a2a; }
.tag-sport { color: #f6e7c1; }
.tag-win, .tag-loss, .tag-push, .tag-void, .tag-num { border-radius: 6px; text-shadow: none; padding: 5px 8px; box-shadow: none; border: 1px solid transparent; }
.tag-win { background: var(--green); color: #0f1a33; } .tag-loss { background: var(--red); color: #2a0f0f; }
.tag-push, .tag-void { background: var(--bg-2); color: var(--muted); border-color: var(--line); }
.tag-num.tag-hit { background: var(--gold); color: #2a1a00; } .tag-num.tag-win { background: var(--green); }

/* mascot swaps */
.mascot { transition: opacity .2s; }
.mascot.swap { opacity: 0; }
.empty img { width: 96px; height: 96px; }

/* chest opening */
.chest-item .chest-anim { width: 44px; height: 44px; object-fit: contain; margin-right: 8px; vertical-align: middle; }
.chest-item.shaking .chest-anim { animation: shake .4s ease-in-out 1; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(6deg); } }
.chest-item.opened .chest-anim { animation: pop .35s ease-out 1; filter: drop-shadow(0 0 14px rgba(255, 209, 102, .9)); }

/* coins flying to the balance chip */
.fly-coin { position: fixed; z-index: 40; width: 22px; height: 22px; pointer-events: none; transition: transform .9s cubic-bezier(.2, .7, .3, 1), opacity .9s; will-change: transform; }
.chip-balance.pulse { animation: chippulse .6s ease-out 1; }
@keyframes chippulse { 0% { transform: scale(1); } 40% { transform: scale(1.18); box-shadow: 0 0 18px rgba(255, 209, 102, .8); } 100% { transform: scale(1); } }
.btn-primary:active { box-shadow: 0 2px 0 #7a4a00, 0 0 18px rgba(255, 209, 102, .55); }
.victory { background: radial-gradient(circle at 50% 30%, rgba(255, 209, 102, .35), rgba(15, 26, 51, .96) 62%), url("/static/bg_hall.jpg") center top / cover no-repeat; }
/* header stays readable over the lit backdrop */
.top { position: relative; }
.top::before { content: ""; position: absolute; inset: -12px -16px -6px; z-index: -1; background: linear-gradient(180deg, rgba(15, 26, 51, .85), rgba(15, 26, 51, 0)); }
.greeting, .guide-link { text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.chips .chip, .promo { box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }

/* ---------- glass accents (floating chrome only; content cards stay solid) ---------- */
.bottom-nav { background: rgba(20, 32, 64, .55); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-top: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 -6px 24px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08); }
.bottom-nav .nav-btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.bottom-nav .nav-btn.on { background: var(--gold); border-color: var(--gold); }
.top::before { background: rgba(20, 32, 64, .45); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); border-bottom: 1px solid rgba(255, 255, 255, .12); border-radius: 0 0 18px 18px; inset: -12px -16px -8px; }
.chip-help, .chip-balance { background: rgba(255, 255, 255, .08); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: rgba(255, 209, 102, .7); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.sheet { background: rgba(28, 43, 82, .78); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border-color: rgba(255, 209, 102, .8); box-shadow: 0 -10px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12); }
.sheet-backdrop { background: rgba(6, 10, 24, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.promo { background: rgba(255, 179, 71, .10); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* payment method sheet */
.shop-alt { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pay-list { display: grid; gap: 8px; margin: 4px 0 10px; }
.pay-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--bg-2); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--text); font-family: var(--body); cursor: pointer; }
.pay-row:active { border-color: var(--gold); }
.pay-row .gico { width: 34px; height: 34px; }
.pay-body { flex: 1; min-width: 0; }
.pay-title { font-weight: 800; font-size: 15px; }
.pay-hint { font-size: 12px; color: var(--muted); }
.pay-amount { font-weight: 800; font-size: 16px; color: var(--gold); white-space: nowrap; }
.pay-row.soon { opacity: .55; }
.pay-row.soon .pay-amount { color: var(--muted); }
.weekly-split { border-top: 1px dashed var(--line); margin: 14px 0 10px; }

/* headline event card — a rope-framed tavern notice board */
.event { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 22px 22px 20px 24px; cursor: pointer; overflow: visible;
  color: #f6e7c1; border: 0; background: transparent; border-image: url("/static/ui/board.png") 44 48 fill / 40px 44px stretch;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .45)) drop-shadow(0 0 22px rgba(255, 179, 71, .22)); }
.event:active { transform: translateY(2px); }
.event-ico { width: 36px; height: 36px; object-fit: contain; flex: 0 0 auto; margin-left: 2px; filter: drop-shadow(0 0 8px rgba(255, 209, 102, .8)); }
.event-body { flex: 1; min-width: 0; padding-right: 92px; }
.event-kicker { display: inline-block; font-family: var(--pixel); font-weight: 700; font-size: 15px; letter-spacing: 1px; text-transform: uppercase; color: #ffd166; text-shadow: 0 1px 0 #2b1607, 1px 0 0 #2b1607, -1px 0 0 #2b1607, 0 -1px 0 #2b1607, 0 2px 0 #1a0f05; margin-bottom: 3px; }
.event-name { font-weight: 800; font-size: 15px; line-height: 1.25; color: #fff3d6; text-shadow: 0 1px 0 #1a0f05, 1px 0 0 #1a0f05, -1px 0 0 #1a0f05, 0 -1px 0 #1a0f05, 0 2px 4px rgba(0, 0, 0, .6); }
.event-sub { font-size: 13px; margin-top: 4px; color: #ffe0a8; text-shadow: 0 1px 0 #1a0f05, 0 0 6px rgba(0, 0, 0, .8); }
.event-right { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); text-align: right; width: 84px; }
.event-timer { font-family: var(--body); font-weight: 800; font-size: 12px; color: #ffd166; line-height: 1.15; font-variant-numeric: tabular-nums; text-shadow: 0 1px 0 #1a0f05, 0 0 6px rgba(0, 0, 0, .8); }
.event-arrow { font-weight: 800; font-size: 20px; line-height: 1; color: #ffd166; text-shadow: 0 1px 0 #1a0f05; animation: nudge 1.6s ease-in-out infinite; }
.event-mascot { position: absolute; right: 2px; top: -38px; width: 46px; height: 52px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .35)); }
.event.muted-event { filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .45)) saturate(.55) brightness(.85); }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
.event-mascot { position: absolute; right: -6px; top: -36px; width: 46px; height: 52px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .35)); }
.event.muted-event { filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .45)) saturate(.6); }
.event.muted-event .event-title { color: var(--text); text-shadow: 0 1px 0 #1a0f05; }
.event.muted-event .event-sub, .event.muted-event .event-timer { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .event-arrow { animation: none; } }

.dayrows.todo li { align-items: center; }
.dayrows.todo li > span:nth-child(2) { flex: 1; }
.dayrows.todo .btn.small { margin: 0; padding: 6px 12px; font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 6px; }
.stack .btn.small { padding: 6px 10px; font-size: 13px; }
#more-chests-btn { margin-top: 8px; }

/* Расписание матчей */
.card.sched { padding: 12px 14px; }
.card.sched.dim { opacity: .62; }
.sched-time { font-family: var(--body); font-weight: 800; color: var(--gold); font-size: 15px; white-space: nowrap; }
.sched-time small { color: var(--muted); font-weight: 600; font-size: 12px; }
.odds-row { display: flex; gap: 6px; margin: 8px 0 2px; flex-wrap: wrap; }
.odd { background: var(--bg-2); border: 2px solid var(--line); border-radius: 10px; padding: 4px 10px; font-family: var(--body); font-size: 13px; color: var(--muted); }
.odd b { color: var(--text); font-weight: 800; margin-left: 3px; }
.sched-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btn-mini { flex: 1 1 auto; margin: 0; min-height: 40px; padding: 8px 10px; font-size: 13px; background: var(--bg-2); color: var(--text); border: 2px solid var(--line); }
.btn-mini.on { border-color: var(--gold); color: var(--gold); }
.btn-mini.gold { background: var(--gold); color: #2a1a00; border-color: var(--gold); }
.btn-mini[disabled] { opacity: .6; }
a.tag { text-decoration: none; }

/* Витрина «Спорт» */
.card.group { padding-bottom: 12px; }
.card.group:first-child { margin-top: 12px; }
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 10px; }
.tile { text-align: left; background: var(--bg-2); border: 2px solid var(--line); border-radius: 14px; padding: 10px 10px 9px; box-shadow: 0 3px 0 #0b1328; color: var(--text); font-family: var(--body); cursor: pointer; min-height: 96px; display: flex; flex-direction: column; gap: 5px; }
.tile.wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 12px; min-height: 0; }
.tile.wide .tile-ico { width: 38px; height: 38px; }
.tile.wide .tile-body { flex: 1; min-width: 0; }
.tile:active { transform: translateY(2px); box-shadow: 0 1px 0 #0b1328; }
.tile-ico { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(255, 209, 102, .55)); }
.tile-body { display: flex; flex-direction: column; gap: 4px; }
.tile-title { font-weight: 800; font-size: 15px; line-height: 1.2; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tile-num { background: var(--gold); color: #2a1a00; border-radius: 999px; padding: 1px 8px; font-size: 13px; font-weight: 800; }
.tile-sub { font-size: 12px; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sport-head { display: flex; align-items: center; gap: 10px; padding: 12px 0 0; }
.back-link { background: transparent; border: 0; color: var(--gold); font-family: var(--body); font-weight: 800; font-size: 15px; padding: 6px 0; cursor: pointer; }
.sport-head-title { font-family: var(--pixel); font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
/* Приглашения в Зале */
.teasers { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.teaser { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: rgba(28, 43, 82, .93); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; color: var(--text); font-family: var(--body); cursor: pointer; box-shadow: 0 4px 0 #0b1328; }
.teaser:active { transform: translateY(2px); box-shadow: 0 2px 0 #0b1328; }
.teaser .gico { width: 30px; height: 30px; }
.teaser-body { flex: 1; min-width: 0; }
.teaser-title { font-weight: 800; font-size: 15px; }
.teaser-sub { font-size: 12px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }   /* two lines, never «выпадае…» */
.teaser-arrow { color: var(--gold); font-weight: 800; font-size: 18px; }
/* Ставка Везунчика по запросу */
.bet-yes { border-color: var(--gold); }
.bet-no { border-style: dashed; }
.bet-why { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.bet-line { font-size: 14px; font-weight: 700; color: var(--gold); margin: 6px 0 0; }
.bet-line.muted { color: var(--muted); font-weight: 600; }
.pay-split { display: flex; gap: 8px; margin-top: 8px; }
.pay-split .btn { flex: 1; margin: 0; padding: 12px 8px; font-size: 15px; }
.fav-score { font-family: var(--body); font-weight: 800; font-size: 18px; color: var(--gold); white-space: nowrap; }
.fav-score.muted { color: var(--muted); font-size: 14px; font-weight: 700; }
.btn-mini.bell { flex: 0 0 48px; padding: 8px 0; font-size: 16px; }
.sched-follow { display: flex; gap: 8px; flex: 1 1 100%; }
.sched-actions .btn-mini.gold { flex: 1 1 100%; }
.share-row { display: flex; gap: 8px; margin-top: 10px; }
.share-row .btn { flex: 1; margin: 0; padding: 12px 8px; font-size: 15px; }
.badge-ico { width: 16px; height: 16px; vertical-align: -3px; margin-left: 2px; }
.input { width: 100%; box-sizing: border-box; background: var(--bg-2); border: 2px solid var(--line); border-radius: 12px; color: var(--text); font-family: var(--body); font-size: 16px; padding: 12px; margin: 10px 0; }
.acc.league .board { margin-top: 6px; }
.switch.ins { border-top: 0; margin-top: 4px; }
.switch.ins small { display: block; font-size: 12px; }
select.input { appearance: none; }
.svc-list { max-height: 40vh; overflow-y: auto; margin: 6px 0; }
.svc-list .switch span small { display: block; font-size: 12px; }
.board a[data-tme] { color: var(--text); text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }

/* Дуэли: две стороны комнаты */
.duel-sides { display: flex; gap: 8px; margin-top: 8px; }
.duel-side { flex: 1; min-width: 0; text-align: left; background: var(--bg-2); border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; color: var(--text); font-family: var(--body); cursor: pointer; }
.duel-side:disabled { cursor: default; opacity: .85; }
.duel-side.mine { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 209, 102, .25) inset; }
.duel-side.won { border-color: var(--green); }
.duel-side.static { cursor: default; }
.duel-label { font-weight: 800; font-size: 14px; line-height: 1.2; }
.duel-pot { font-size: 13px; color: var(--gold); margin-top: 3px; }
.duel-ratio { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chip-chest { background: var(--card); border-color: var(--green); color: var(--green); font-weight: 800; font-size: 15px; padding: 10px 12px; }
.chest-card.pulse { animation: chippulse .6s ease-out 2; }
.duel-tabs { margin-top: 10px; }
#balance-chests a { color: var(--gold); }
.mascot.jump { animation: mjump .45s ease-out 1; }
@keyframes mjump { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-14px) scale(1.12) rotate(-6deg); } 70% { transform: translateY(2px) scale(.96) rotate(4deg); } 100% { transform: translateY(0) scale(1); } }
.league-row { margin-top: 8px; }
