/* Гача з Гачі — веб. Без зовнішніх шрифтів і CDN (вимога Discord Activity). */
:root {
  --bg: #0d0608; --bg2: #140a0e; --panel: #1b0d13; --panel2: #24111a; --line: #3a1b28;
  --text: #f4eaed; --muted: #a8909a; --dim: #6f5862;
  --gold: #f5c542; --gold2: #b8862b; --red: #e0243f; --accent: #ff2d55; --ok: #2ecc71;
  --c-common: #9aa0a6; --c-rare: #4f7cff; --c-epic: #a45ee5; --c-legendary: #ffd23f; --c-mythic: #ff5fb2; --c-absolute: #7df9ff;
  --r: 14px; --shadow: 0 10px 30px rgba(0,0,0,.45);
  --head: Impact, Haettenschweiler, "Arial Narrow Bold", "Franklin Gothic Bold", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  --navh: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--body); }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(224,36,63,.18), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(245,197,66,.06), transparent 60%),
    var(--bg);
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--gold); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ── завантаження / вхід ───────────────────────────── */
.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 10px; color: var(--muted); }
.boot-sym { font-size: 64px; color: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.15); opacity: .7; } }
.login { min-height: 100vh; display: grid; place-content: center; padding: 24px; text-align: center; gap: 18px; }
.login .logo { width: 132px; height: 132px; border-radius: 28px; margin: 0 auto; box-shadow: 0 0 0 3px var(--gold2), 0 0 60px rgba(255,45,85,.35); object-fit: cover; }
.login h1 { font: 44px/1 var(--head); letter-spacing: 1px; text-transform: uppercase; margin: 0; }
.login h1 span { color: var(--accent); }
.login p { margin: 0; color: var(--muted); max-width: 420px; }
.err { color: #ff8a9b; background: rgba(224,36,63,.12); border: 1px solid rgba(224,36,63,.4); padding: 10px 14px; border-radius: 10px; }

/* ── кнопки і поля ─────────────────────────────────── */
.btn {
  border: 0; cursor: pointer; border-radius: 12px; padding: 11px 18px; font-weight: 700;
  background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .08s, filter .15s, background .15s; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn.primary { background: linear-gradient(180deg, #ff3b62, #c4122f); box-shadow: 0 6px 20px rgba(255,45,85,.35), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.gold { background: linear-gradient(180deg, #ffd96a, #c8901f); color: #2a1a00; box-shadow: 0 6px 20px rgba(245,197,66,.3), inset 0 1px 0 rgba(255,255,255,.4); }
.btn.discord { background: #5865f2; font-size: 17px; padding: 14px 26px; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.big { font: 22px/1 var(--head); letter-spacing: 1px; text-transform: uppercase; padding: 18px 26px; border-radius: 16px; }
.input { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none; min-width: 0; }
.input:focus { border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--bg2); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 600; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ── каркас ─────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: rgba(13,6,8,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font: 22px/1 var(--head); text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.brand span { color: var(--accent); }
.top .sp { flex: 1; }
.stat { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); padding: 6px 10px; border-radius: 10px; font-weight: 700; white-space: nowrap; }
.stat small { color: var(--muted); font-weight: 600; }
.me { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--panel2); object-fit: cover; flex: none; }
.av.lg { width: 84px; height: 84px; box-shadow: 0 0 0 3px var(--gold2); }
.nav { display: flex; gap: 4px; padding: 8px 16px 0; max-width: 1180px; margin: 0 auto; }
.nav button { border: 0; background: transparent; padding: 10px 14px; border-radius: 10px 10px 0 0; cursor: pointer; color: var(--muted); font-weight: 700; display: flex; gap: 6px; align-items: center; }
.nav button.on { color: var(--text); background: var(--panel); box-shadow: inset 0 2px 0 var(--accent); }
main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 40px; }
.panel { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.h { font: 26px/1.05 var(--head); text-transform: uppercase; letter-spacing: .5px; margin: 0 0 12px; }
.h small { font: 600 13px var(--body); color: var(--muted); text-transform: none; letter-spacing: 0; margin-left: 8px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
.stack { display: grid; gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.tile { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.tile b { display: block; font-size: 22px; }
.tile span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 99px; transition: width .6s; }
.bar.leg i { background: linear-gradient(90deg, #b8862b, var(--c-legendary)); }
.bar.myth i { background: linear-gradient(90deg, #9b2c6b, var(--c-mythic)); }
.kv { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin: 10px 0 5px; }
.kv b { color: var(--text); }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

/* ── рідкості ──────────────────────────────────────── */
.r-Common { --rc: var(--c-common); } .r-Rare { --rc: var(--c-rare); } .r-Epic { --rc: var(--c-epic); }
.r-Legendary { --rc: var(--c-legendary); } .r-Mythic { --rc: var(--c-mythic); }
.tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; color: #120709; background: var(--rc, #999); }

/* ── картка ────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.card {
  position: relative; border-radius: 14px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  background: var(--panel2); box-shadow: 0 0 0 2px var(--rc, #555), 0 8px 22px rgba(0,0,0,.5);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--rc), 0 0 26px color-mix(in srgb, var(--rc) 55%, transparent); }
.card .pic { aspect-ratio: 2 / 3; overflow: hidden; background: #000; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .cap { padding: 7px 9px 9px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.card .cap b { display: block; font-size: 13px; line-height: 1.15; }
.card .cnt { position: absolute; top: 7px; right: 7px; background: rgba(0,0,0,.75); border-radius: 8px; padding: 2px 7px; font-weight: 800; font-size: 12px; }
.card .lv { position: absolute; top: 7px; left: 7px; font-size: 12px; text-shadow: 0 1px 2px #000; }
.card.locked .pic img { filter: grayscale(1) brightness(.32); }
.card.locked { box-shadow: 0 0 0 1px var(--line); }
.card.locked .cap b { color: var(--muted); }
.card.Legendary::after, .card.Mythic::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 45%, transparent 60%);
  background-size: 250% 100%; animation: shine 3.2s linear infinite; mix-blend-mode: overlay;
}
.card.locked::after { display: none; }
@keyframes shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }

/* ── банер ─────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; }
.hero-cards { display: flex; gap: 12px; margin: 6px 0 14px; }
.hero-cards .card { width: 132px; flex: none; }
.timer { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 800; }
.pullbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.subacts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chances { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; color: var(--muted); font-size: 13px; }
.switch input { accent-color: var(--accent); width: 16px; height: 16px; }
.feed { display: grid; gap: 6px; max-height: 360px; overflow: auto; }
.feed div { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 7px 9px; background: var(--bg2); border-radius: 10px; border-left: 3px solid var(--rc, var(--line)); }
.feed img { width: 24px; height: 24px; }

/* ── списки ─────────────────────────────────────────── */
.list { display: grid; gap: 8px; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; }
.li .thumb { width: 42px; height: 60px; border-radius: 7px; object-fit: cover; box-shadow: 0 0 0 2px var(--rc, #555); flex: none; cursor: pointer; }
.li .grow { flex: 1; min-width: 0; }
.li .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .price { font-weight: 800; color: var(--gold); white-space: nowrap; }
.li.me { border-color: var(--gold2); background: rgba(245,197,66,.07); }
.rank { width: 30px; text-align: center; font: 20px var(--head); color: var(--muted); }
.rank.p1 { color: var(--c-legendary); } .rank.p2 { color: #d9dde3; } .rank.p3 { color: #d08a4a; }
.setcards { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.setcards img { width: 30px; height: 44px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px var(--rc); }
.setcards img.no { filter: grayscale(1) brightness(.3); }
.ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ach div { padding: 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); font-size: 13px; }
.ach div.no { opacity: .45; }
.ach b { display: block; }

/* ── модалка ───────────────────────────────────────── */
#modal { position: fixed; inset: 0; z-index: 60; background: rgba(5,2,3,.78); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; overflow: auto; }
.mbox { position: relative; width: min(860px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; animation: pop .18s ease-out; }
.mbox.sm { width: min(420px, 100%); }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.mclose { position: absolute; top: 10px; right: 10px; }
.cardview { display: grid; grid-template-columns: 300px 1fr; gap: 20px; }
.cardview .art { border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 3px var(--rc), 0 0 40px color-mix(in srgb, var(--rc) 45%, transparent); aspect-ratio: 2/3; background: #000; }
.cardview .art img, .cardview .art video { width: 100%; height: 100%; object-fit: cover; }
.cardview h2 { font: 32px/1 var(--head); text-transform: uppercase; margin: 6px 0 8px; }
.statl { display: grid; grid-template-columns: 60px 1fr 46px; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.ability { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-size: 14px; }
.lore { font-style: italic; color: var(--muted); margin-top: 10px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.acts .group { display: flex; gap: 6px; align-items: center; }

/* ── анімація крутки ───────────────────────────────── */
#overlay { position: fixed; inset: 0; z-index: 50; background: #050203; display: grid; place-items: center; overflow: hidden; }
#overlay canvas { position: absolute; inset: 0; pointer-events: none; }
.skip { position: absolute; top: 14px; right: 14px; z-index: 5; }
.stage { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.stage video { max-width: min(92vw, 900px); max-height: 76vh; border-radius: 16px; }
.drum { width: 220px; height: 220px; border-radius: 50%; position: relative; animation: spin 0.9s linear infinite;
  background: conic-gradient(var(--accent), var(--gold), var(--c-epic), var(--c-rare), var(--accent)); filter: blur(.3px);
  box-shadow: 0 0 80px rgba(255,45,85,.6); }
.drum::after { content: "♂"; position: absolute; inset: 18px; border-radius: 50%; background: #050203; display: grid; place-items: center; font-size: 90px; color: var(--gold); animation: spin 0.9s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.drum-txt { position: absolute; bottom: 18%; font: 28px var(--head); text-transform: uppercase; letter-spacing: 2px; color: var(--muted); }
.burst { position: absolute; inset: 0; display: grid; place-items: center; }
.burst .ring { position: absolute; width: 40px; height: 40px; border-radius: 50%; border: 6px solid var(--rc); animation: ring 1.1s ease-out forwards; }
.burst .ring:nth-child(2) { animation-delay: .18s; } .burst .ring:nth-child(3) { animation-delay: .36s; }
@keyframes ring { to { width: 140vmax; height: 140vmax; opacity: 0; border-width: 1px; } }
.burst h1 { position: relative; font: clamp(48px, 12vw, 130px)/1 var(--head); text-transform: uppercase; color: var(--rc);
  text-shadow: 0 0 30px var(--rc), 0 0 80px var(--rc); animation: slam .5s cubic-bezier(.2,1.6,.4,1) both; margin: 0; }
@keyframes slam { from { transform: scale(3); opacity: 0; } }
.shake { animation: shake .5s linear 2; }
@keyframes shake { 20% { transform: translate(-8px, 4px); } 40% { transform: translate(7px, -6px); } 60% { transform: translate(-5px, -3px); } 80% { transform: translate(4px, 6px); } }
.flash { position: absolute; inset: 0; background: var(--rc); animation: flash .6s ease-out forwards; pointer-events: none; }
@keyframes flash { from { opacity: .85; } to { opacity: 0; } }
.reveal { width: min(1000px, 96vw); max-height: 100vh; overflow: auto; padding: 60px 10px 24px; text-align: center; }
.reveal .cards { grid-template-columns: repeat(auto-fit, minmax(150px, 170px)); justify-content: center; }
.reveal.one .cards { grid-template-columns: minmax(220px, 300px); }
.flip { perspective: 1200px; aspect-ratio: 2/3; cursor: pointer; }
.flip .in { position: relative; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.3,1.4,.5,1); transform-style: preserve-3d; }
.flip.open .in { transform: rotateY(180deg); }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; overflow: hidden; }
.flip .back { display: grid; place-items: center; font-size: 64px; color: var(--gold);
  background: repeating-linear-gradient(45deg, #2a0d18 0 10px, #1c0911 10px 20px); box-shadow: 0 0 0 2px var(--gold2), 0 10px 30px rgba(0,0,0,.6); }
.flip .back img { width: 100%; height: 100%; object-fit: cover; }
.flip .front { transform: rotateY(180deg); }
.flip .front .card { height: 100%; }
.flip .front .card .pic { height: 100%; aspect-ratio: auto; }
.flip .card .cap { display: none; }
.flip.open.Legendary .front .card, .flip.open.Mythic .front .card { animation: glow 1.6s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 0 3px var(--rc), 0 0 50px var(--rc); } }
.badge { position: absolute; z-index: 2; font-size: 11px; font-weight: 900; padding: 3px 7px; border-radius: 6px; letter-spacing: .5px; }
.badge.new { top: 8px; left: 8px; background: var(--ok); color: #04170b; }
.badge.pity { bottom: 10px; left: 8px; background: var(--gold); color: #2a1a00; }
.summary { margin: 18px auto 0; max-width: 560px; display: grid; gap: 6px; font-size: 14px; }
.summary div { background: rgba(255,255,255,.05); border-radius: 10px; padding: 8px 12px; }

/* ── тости ─────────────────────────────────────────── */
#toasts { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: 20px; display: grid; gap: 8px; width: min(440px, 92vw); pointer-events: none; }
.toast { background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--rc, var(--accent)); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); animation: tin .25s ease-out; font-size: 14px; }
.toast.err { --rc: var(--red); }
.toast.ok { --rc: var(--ok); }
@keyframes tin { from { transform: translateY(14px); opacity: 0; } }

/* ── мобільна версія (і Discord Activity на телефоні) ── */
@media (max-width: 760px) {
  body { padding-bottom: calc(var(--navh) + env(safe-area-inset-bottom)); }
  .brand b { display: none; }
  .top { gap: 8px; padding: 8px 10px; }
  .stat { padding: 5px 8px; font-size: 13px; }
  .me span { display: none; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(13,6,8,.95); border-top: 1px solid var(--line); justify-content: space-around; gap: 0; }
  .nav button { flex-direction: column; gap: 2px; font-size: 10px; padding: 6px 4px; border-radius: 10px; }
  .nav button i { font-style: normal; font-size: 20px; }
  .nav button.on { box-shadow: none; background: var(--panel2); }
  .grid2, .cardview { grid-template-columns: 1fr; }
  .cardview .art { max-width: 280px; margin: 0 auto; width: 100%; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
  .hero-cards .card { width: 96px; }
  .h { font-size: 22px; }
  main { padding: 12px 10px 24px; }
  .reveal .cards { grid-template-columns: repeat(auto-fit, minmax(96px, 120px)); }
  .btn.big { font-size: 18px; padding: 15px 10px; }
  .pullbar { gap: 8px; }
}
@media (min-width: 761px) { .nav button i { font-style: normal; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ═════════ v1.1: бої, сюжет, вхідні ═════════ */
.bell { cursor: pointer; border: 1px solid var(--line); }
.bell b { min-width: 0; }
.bell b.hot { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 12px; }
.subnav { margin-bottom: 14px; }
.chip .dot { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11px; margin-left: 4px; }
.btn.danger { background: linear-gradient(180deg, #3b0b16, #1a0509); box-shadow: inset 0 0 0 1px #7a1a2e; }
.gold-edge { border-color: var(--gold2) !important; box-shadow: 0 0 0 1px rgba(245,197,66,.25), var(--shadow); }
.gifv { max-width: min(92vw, 900px); max-height: 76vh; border-radius: 16px; }

/* формація */
.fgrid { display: grid; gap: 10px; }
.frow { display: grid; grid-template-columns: 130px repeat(3, minmax(0, 122px)); gap: 10px; align-items: center; }
.flabel { display: flex; flex-direction: column; font-size: 13px; }
.flabel span { color: var(--muted); font-size: 11px; }
.fslot { aspect-ratio: 2/3.25; border: 2px dashed var(--line); border-radius: 14px; display: grid; place-items: center; cursor: pointer; color: var(--dim); font-size: 30px; background: rgba(255,255,255,.02); }
.fslot:hover { border-color: var(--accent); color: var(--accent); }
.fslot.on { border: 0; display: block; color: var(--text); }
.fslot.on .card { height: 100%; }
.fgrid.small .frow { grid-template-columns: 90px repeat(3, minmax(0, 96px)); }
.fgrid.small .fslot { cursor: default; }
.fgrid.small .card .cap { display: none; }

/* сюжет */
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.chapter { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.chapter.locked { opacity: .55; }
.chimg { width: 100%; height: 150px; object-fit: cover; border-bottom: 1px solid var(--line); }
.chbody { padding: 16px; }
.waves { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.waves span { background: var(--bg2); border: 1px solid var(--line); padding: 3px 8px; border-radius: 8px; }
.waves span.ok { border-color: var(--ok); color: var(--ok); }
.scene-layer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 30%, rgba(42,12,22,.97), rgba(5,2,3,.98) 70%); }
.scene { width: min(760px, 94vw); text-align: center; animation: pop .3s ease-out; }
.scene img, .scene video { width: 100%; max-height: 58vh; object-fit: contain; border-radius: 16px; box-shadow: 0 0 0 2px var(--gold2), 0 20px 60px rgba(0,0,0,.6); }
.scene h2 { margin: 18px 0 6px; font-size: 32px; }
.scene p { color: var(--muted); font-style: italic; margin: 0 0 18px; }

/* турнір */
.entrants { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.formgrid label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.bracket { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.bcol { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; min-width: 170px; }
.bhead { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.match { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; display: grid; gap: 4px; }
.match div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match .w { color: var(--gold); font-weight: 800; }
.match.champ { border-color: var(--gold2); display: flex; align-items: center; gap: 8px; }

/* магазин */
.shopslot { display: flex; flex-direction: column; }
.shopslot.bought .card { filter: grayscale(.8) brightness(.6); }
.shoplabel { font-size: 12px; font-weight: 800; letter-spacing: .5px; margin-bottom: 6px; text-transform: uppercase; }

/* ── плеєр бою ── */
.battle-ov { background: radial-gradient(1000px 600px at 50% 50%, #1d0a12, #050203 75%) !important; place-items: stretch !important; }
.bt { display: grid; grid-template-rows: auto 1fr auto; height: 100vh; width: 100%; max-width: 1000px; margin: 0 auto; }
.bt-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.bt-title { font: 20px/1.1 var(--head); text-transform: uppercase; }
.bt-round { color: var(--gold); font-weight: 800; }
.bt-ctl { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.arena { position: relative; isolation: isolate; display: grid; grid-template-rows: 1fr auto 1fr; align-items: center; justify-items: center; padding: 6px; min-height: 0; overflow: hidden; }
.side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.side-name { font-weight: 800; font-size: 13px; color: var(--muted); }
.grid3 { display: grid; grid-template-columns: repeat(3, var(--uw)); grid-template-rows: repeat(3, auto); gap: 4px 10px; --uw: min(74px, 8.6vh, 26vw); }
.grid3 .cell { grid-row: var(--p); grid-column: var(--c); }
.ucell { width: var(--uw); }
.unit { position: relative; width: var(--uw); transition: transform .25s, filter .4s, opacity .4s; }
.unit.spawnable { transform: scale(.2); opacity: 0; }
.unit.in { transform: none; opacity: 1; transition: transform .35s cubic-bezier(.2,1.5,.4,1), opacity .3s, filter .4s; }
.upic { aspect-ratio: 2/3; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 2px var(--rc), 0 6px 14px rgba(0,0,0,.5); background: #000; }
.upic img { width: 100%; height: 100%; object-fit: cover; }
.uhp { height: 5px; background: #000; border-radius: 99px; margin-top: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.uhp i { display: block; height: 100%; background: linear-gradient(90deg, #2ecc71, #a3e635); transition: width .5s; }
.uhp i.low { background: linear-gradient(90deg, #e0243f, #ff8a3d); }
.uname { font-size: 10px; line-height: 1.1; text-align: center; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ubadge { position: absolute; top: 3px; right: 3px; font-size: 11px; text-shadow: 0 1px 2px #000; }
.unit.dead, .unit.dying { filter: grayscale(1) brightness(.35); }
.unit.dying { transform: translateY(6px) rotate(-4deg); }
.unit.winner .upic { animation: glow 1.2s ease-in-out infinite alternate; --rc: var(--gold); }
.unit.abil .upic { box-shadow: 0 0 0 3px #fff, 0 0 30px var(--rc); }
.lunge-up { animation: lungeUp .32s ease-out; z-index: 3; }
.lunge-down { animation: lungeDown .32s ease-out; z-index: 3; }
.lunge-left { animation: lungeLeft .32s ease-out; z-index: 3; }
.lunge-right { animation: lungeRight .32s ease-out; z-index: 3; }
@keyframes lungeUp { 50% { transform: translateY(-24px) scale(1.08); } }
@keyframes lungeDown { 50% { transform: translateY(24px) scale(1.08); } }
@keyframes lungeLeft { 50% { transform: translateX(-34px) scale(1.08); } }
@keyframes lungeRight { 50% { transform: translateX(34px) scale(1.08); } }
.shake2 { animation: hit .3s linear; }
@keyframes hit { 25% { transform: translateX(-6px); filter: brightness(1.8) sepia(1) hue-rotate(-50deg) saturate(5); } 75% { transform: translateX(5px); } }
.float { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); font-weight: 900; font-size: 15px; pointer-events: none; animation: floatUp 1.1s ease-out forwards; white-space: nowrap; text-shadow: 0 2px 4px #000; z-index: 4; }
.float.dmg { color: #ff5a6e; } .float.heal { color: #4ade80; } .float.abl { color: var(--gold); font-size: 12px; }
@keyframes floatUp { to { transform: translate(-50%, -40px); opacity: 0; } }
@media (min-width: 761px) and (orientation: landscape) {
  .arena { grid-template-rows: 1fr; grid-template-columns: 1fr auto 1fr; }
  .side.ally { order: 1; } .vs { order: 2; margin: 0 8px; } .side.foe { order: 3; }
  .grid3 { --uw: min(118px, 17vh, 11vw); gap: 10px 12px; }
  .grid3 .cell { grid-row: var(--c); grid-column: var(--l); }
  .uname { font-size: 12px; }
}
.vs { font: 26px var(--head); color: var(--accent); text-shadow: 0 0 20px rgba(255,45,85,.6); margin: 4px 0; }
.fx { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(5,2,3,.72); }
.fx video, .fx img { max-width: min(80vw, 640px); max-height: 60vh; border-radius: 16px; box-shadow: 0 0 0 2px var(--gold2), 0 0 60px rgba(245,197,66,.3); }
.fx-title { position: absolute; bottom: 12%; font: 24px var(--head); text-transform: uppercase; color: var(--gold); text-shadow: 0 2px 10px #000; text-align: center; padding: 0 10px; }
.bt-log { height: 128px; overflow: auto; padding: 8px 14px; font-size: 12px; line-height: 1.5; color: var(--muted); border-top: 1px solid var(--line); background: rgba(0,0,0,.35); }
.bt-log .lr { color: var(--gold); font-weight: 800; margin-top: 4px; }
.bt-log .ld { color: #ff8a9b; } .bt-log .lc { color: #ffd23f; }
.bt-result { position: fixed; inset: 0; z-index: 70; display: grid; place-content: center; text-align: center; gap: 10px; background: rgba(5,2,3,.8); animation: pop .25s ease-out; padding: 16px; }
.bt-result h1 { font: clamp(44px, 10vw, 96px)/1 var(--head); margin: 0; text-transform: uppercase; }
.bt-result.won h1 { color: var(--gold); text-shadow: 0 0 40px rgba(245,197,66,.6); }
.bt-result.lost h1 { color: #ff5a6e; text-shadow: 0 0 40px rgba(224,36,63,.5); }
.bt-result .rw { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.bt-result .rw span { background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-weight: 700; }

@media (max-width: 760px) {
  .frow { grid-template-columns: 1fr 1fr 1fr; }
  .frow .flabel { grid-column: 1 / -1; flex-direction: row; gap: 8px; align-items: baseline; }
  .fgrid.small .frow { grid-template-columns: repeat(3, minmax(0, 90px)); }
  .chapters { grid-template-columns: 1fr; }
  .bt-ctl { margin-left: 0; width: 100%; }
  .bt-ctl .btn { flex: 1; padding: 7px 6px; font-size: 12px; }
  .bt-log { height: 84px; font-size: 11px; }
  .bt-top { padding: 8px 10px; gap: 6px 10px; }
  .bt-title { font-size: 15px; }
  .grid3 { --uw: min(50px, 6.3vh, 21vw); gap: 3px 12px; }
  .uname { display: none; }
  .uhp { height: 4px; }
  .side-name { font-size: 12px; }
  .vs { font-size: 20px; margin: 2px 0; }
  .bell { padding: 5px 7px; }
}

/* ═════════ v1.2: невідомі картки, події, арена, аукціон, профіль, ефекти ═════════ */
.card.unknown { --rc: #3a2a33; cursor: help; }
.card.unknown .pic { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #1c0c13 0 10px, #170910 10px 20px); }
.qmark { font: 64px var(--head); color: #4d3340; text-shadow: 0 0 20px rgba(0,0,0,.6); }
.qsm { display: inline-grid; place-items: center; width: 30px; height: 44px; border-radius: 4px; background: #1c0c13; color: #5a3c4a; font-weight: 900; box-shadow: 0 0 0 1px var(--line); cursor: help; }
.nav button { position: relative; }
.ndot { position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; text-align: center; display: grid; gap: 4px; font-size: 13px; }
.day b { font-size: 12px; color: var(--muted); }
.day.done { border-color: var(--ok); opacity: .7; }
.day.next { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold2), 0 0 18px rgba(245,197,66,.25); }
.day.big { background: linear-gradient(180deg, rgba(164,94,229,.25), var(--bg2)); }
.day i { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 12px; }
.pass { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; margin-top: 12px; max-height: 230px; overflow: auto; }
.plv { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 6px; font-size: 11px; display: grid; gap: 2px; text-align: center; opacity: .55; }
.plv b { font-size: 14px; }
.plv.got { opacity: 1; border-color: var(--gold2); }
.plv.claimed { opacity: .45; border-color: var(--ok); }
.plv.big { box-shadow: 0 0 0 1px var(--rc); }
.synergy { font-size: 13px; color: var(--gold); margin: -4px 0 12px; }
.impact { position: absolute; inset: 10% 15% 40%; pointer-events: none; z-index: 5; background: radial-gradient(circle, rgba(255,240,200,.95) 0 10%, rgba(255,90,60,.7) 22%, transparent 55%); animation: impact .45s ease-out forwards; }
@keyframes impact { from { transform: scale(.3) rotate(0); opacity: 1; } to { transform: scale(1.4) rotate(40deg); opacity: 0; } }
.burst2 { position: absolute; inset: -20%; pointer-events: none; z-index: 5; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.9), rgba(224,36,63,.6) 30%, transparent 60%); animation: impact .75s ease-out forwards; }
.aring { position: absolute; inset: -12%; pointer-events: none; z-index: 5; border-radius: 50%; border: 3px solid var(--gold); box-shadow: 0 0 22px var(--gold); animation: aring .9s ease-out forwards; }
@keyframes aring { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.av.fr-bronze { box-shadow: 0 0 0 3px #cd7f32; } .av.fr-silver { box-shadow: 0 0 0 3px #d9dde3; }
.av.fr-gold { box-shadow: 0 0 0 3px var(--gold), 0 0 14px rgba(245,197,66,.5); }
.av.fr-abyss { box-shadow: 0 0 0 3px #a45ee5, 0 0 18px #ff5fb2; animation: glow 2s ease-in-out infinite alternate; --rc: #a45ee5; }
.ptitle { color: var(--gold); font-weight: 800; font-size: 13px; margin-top: 2px; }
.cgroup { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 10px; background: var(--bg2); }
.cgroup summary { cursor: pointer; }
.okc { color: var(--ok); font-weight: 800; } .misc { color: #ff8a9b; font-weight: 800; }
.clist { display: grid; gap: 4px; margin-top: 8px; font-size: 12px; max-height: 320px; overflow: auto; }
.clist .ok { opacity: .55; }
.clist code { color: var(--muted); font-size: 11px; margin-left: 6px; }
@media (max-width: 760px) {
  .days { grid-template-columns: repeat(4, 1fr); }
  .nav button { font-size: 9px; padding: 6px 2px; }
  .ndot { top: 2px; right: 4px; }
}


/* ═════════ v1.3: головне меню, фони розділів, музика ═════════ */
/* фон: web/assets/bg/<розділ>.mp4|jpg (+ <розділ>_m.* для телефона вертикально) */
#bgl { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
#bgl::after, .bt-bg::after { content: ""; position: absolute; inset: 0; background: rgba(8,3,5,var(--dim, .62)); transition: background .6s; }
.bgm { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.bgm.on { opacity: 1; }
#app { position: relative; z-index: 1; }
body.has-bg { background: #050203; }
body.has-bg .panel { background: linear-gradient(180deg, rgba(27,13,19,.9), rgba(16,8,11,.93)); }
body.has-bg .top { background: rgba(10,4,7,.72); }
.home-mode #bgl::after {
  background: linear-gradient(180deg, rgba(5,2,3,.5) 0%, rgba(5,2,3,var(--dim, .05)) 26%, rgba(5,2,3,var(--dim, .05)) 58%, rgba(5,2,3,.88) 100%);
}

/* іскри */
.embers { position: absolute; inset: 0; z-index: 1; display: none; }
.home-mode .embers { display: block; }
.embers span { position: absolute; bottom: -12px; left: var(--x); width: var(--s); height: var(--s); border-radius: 2px; background: #c86bff;
  box-shadow: 0 0 6px #b14dff, 0 0 14px rgba(177,77,255,.6); opacity: 0; animation: ember var(--d) linear var(--t) infinite; }
@keyframes ember { 8% { opacity: .95; } 70% { opacity: .7; } 100% { transform: translate(var(--dx), -105vh) rotate(260deg); opacity: 0; } }

/* шапка й навігація в режимі меню */
.home-mode .top { position: fixed; left: 0; right: 0; background: linear-gradient(180deg, rgba(0,0,0,.6), transparent) !important; border: 0; backdrop-filter: none; }
.home-mode .brand { visibility: hidden; }
.home-mode .nav { display: none; }
.home-mode main { max-width: none; padding: 0; }
.home-mode body, body.home-mode { padding-bottom: 0; }
.brand { cursor: pointer; }
.snd { cursor: pointer; border: 1px solid var(--line); }

/* головний екран */
.home { --tile: clamp(84px, min(10.5vw, 19vh), 172px); --tg: clamp(8px, 1.3vw, 20px);
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  padding: calc(58px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.home-title { margin-top: clamp(4px, 2.5vh, 30px); text-align: center; max-width: 96vw; }
.home-title img { max-width: min(1100px, 92vw); max-height: 24vh; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(0,0,0,.6)); }
.fire { margin: 0; font: clamp(34px, min(7.6vw, 13.5vh), 132px)/.95 var(--head); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(180deg, #fffbe0 0%, #ffe27a 22%, #ffb12b 48%, #f2661a 70%, #b51d0b 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #4a1203) drop-shadow(0 5px 0 #2a0901) drop-shadow(0 0 18px rgba(255,120,30,.75)) drop-shadow(0 0 42px rgba(255,60,20,.45));
  animation: flick 2.6s ease-in-out infinite; }
.fire span { display: inline-block; }
@keyframes flick { 0%, 100% { filter: drop-shadow(0 2px 0 #4a1203) drop-shadow(0 5px 0 #2a0901) drop-shadow(0 0 18px rgba(255,120,30,.75)) drop-shadow(0 0 42px rgba(255,60,20,.45)); }
  45% { filter: drop-shadow(0 2px 0 #4a1203) drop-shadow(0 5px 0 #2a0901) drop-shadow(0 0 24px rgba(255,150,40,.95)) drop-shadow(0 0 60px rgba(255,70,20,.6)); }
  60% { filter: drop-shadow(0 2px 0 #4a1203) drop-shadow(0 5px 0 #2a0901) drop-shadow(0 0 14px rgba(255,110,30,.6)) drop-shadow(0 0 36px rgba(255,50,20,.35)); } }
.home-fill { flex: 1; min-height: 12px; }
.home-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: min(1280px, 100%); margin-bottom: clamp(10px, 2vh, 22px); }
.hchip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 13px;
  color: #f1e6c8; background: rgba(12,8,6,.72); border: 1px solid rgba(201,162,74,.45); backdrop-filter: blur(3px); transition: background .15s, border-color .15s; }
.hchip:hover { background: rgba(40,26,12,.85); border-color: #e7c060; }
.hchip i { font-style: normal; }
.hchip .ndot { top: 2px; right: 4px; }
.home-main { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--tg); }
.htile { position: relative; width: var(--tile); height: calc(var(--tile) * .96); padding: 0; cursor: pointer; border-radius: 4px; color: #fbf3dc;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--tile) * .07);
  background: linear-gradient(180deg, rgba(30,24,20,.93), rgba(9,7,6,.95));
  border: 1px solid #9c7a33; box-shadow: inset 0 0 0 3px rgba(0,0,0,.65), inset 0 0 0 4px rgba(214,174,82,.5), 0 12px 28px rgba(0,0,0,.65);
  transition: transform .15s, box-shadow .2s, border-color .2s; }
.htile::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(214,174,82,.18); pointer-events: none; }
.htile:hover, .htile:focus-visible { transform: translateY(-4px); border-color: #f0c860;
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.65), inset 0 0 0 4px rgba(245,197,66,.8), 0 0 26px rgba(245,197,66,.35), 0 16px 32px rgba(0,0,0,.7); }
.htile:active { transform: translateY(-1px) scale(.98); }
.htile svg, .htile img { width: 44%; height: 44%; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(245,197,66,.35)); }
.htile b { font: 800 clamp(11px, calc(var(--tile) * .125), 20px)/1 var(--body); letter-spacing: .04em; text-transform: uppercase; text-shadow: 0 2px 4px #000; }
.hb { position: absolute; top: 6px; right: 6px; min-width: 20px; padding: 1px 6px; border-radius: 99px; font: 800 11px/16px var(--body); color: #2a1a00; background: var(--gold); box-shadow: 0 0 10px rgba(245,197,66,.5); }
.hb.warn { background: var(--accent); color: #fff; box-shadow: 0 0 10px rgba(255,45,85,.6); }
.hb.dim { background: rgba(0,0,0,.55); color: #e9d9a8; box-shadow: none; border: 1px solid rgba(214,174,82,.4); }
.hchip .hb { position: static; margin-left: 2px; }

/* звук */
.rng { display: grid; gap: 4px; font-size: 13px; color: var(--muted); margin: 8px 0; }
.rng input { width: 100%; accent-color: var(--gold); }

/* бій: фон і бос */
.bt-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.battle-ov .bt { position: relative; z-index: 1; }
.bt.boss .bt-top { border-bottom-color: #7a1a2e; box-shadow: 0 1px 0 rgba(255,45,85,.25); }
.bossmark { display: inline-block; font: 13px/1 var(--head); letter-spacing: 1px; padding: 4px 7px 3px; border-radius: 6px; background: linear-gradient(180deg, #ff3b62, #a3102a); color: #fff; vertical-align: 3px; box-shadow: 0 0 14px rgba(255,45,85,.6); }

/* ── адаптив меню ── */
@media (max-width: 760px) {
  .nav button.desk { display: none; }
  body.home-mode { padding-bottom: 0; }
  .home { padding-top: calc(54px + env(safe-area-inset-top)); }
  .hchip { font-size: 12px; padding: 6px 10px; }
}
/* телефон вертикально: 3 + 2 великі кнопки, розділи — стрічкою з прокруткою */
@media (orientation: portrait) and (max-width: 640px) {
  .home { --tile: min(29vw, 132px); --tg: 8px; }
  .fire { font-size: min(11.5vw, 64px); white-space: normal; line-height: 1; }
  .fire span { display: block; }
  .home-sub { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; max-width: 100%; padding: 2px 2px 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .home-sub::-webkit-scrollbar { display: none; }
  .hchip { flex: none; }
}
/* планшет вертикально */
@media (orientation: portrait) and (min-width: 641px) {
  .home { --tile: min(16.5vw, 160px); --tg: 12px; }
}
/* низький горизонтальний екран (телефон боком, маленьке вікно Discord) */
@media (orientation: landscape) and (max-height: 520px) {
  .home { --tile: clamp(64px, 20vh, 104px); padding-top: calc(48px + env(safe-area-inset-top)); }
  .fire { font-size: clamp(28px, 11vh, 60px); }
  .home-sub { margin-bottom: 8px; }
  .hchip { padding: 5px 10px; font-size: 12px; }
}
/* великі монітори і 4K */
@media (min-width: 2200px) and (min-height: 1200px) {
  .home { --tile: clamp(150px, 8.5vw, 240px); }
  .hchip { font-size: 16px; padding: 10px 18px; }
}
@media (prefers-reduced-motion: reduce) { .embers { display: none !important; } .fire { animation: none; } }

/* ═════════ v1.4: єдина тема «Підземелля» — золоті рамки як у головному меню ═════════ */
:root {
  --g1: #f5c542; --g2: #9c7a33; --g3: #6b5224; --gl: rgba(214,174,82,.5); --gf: rgba(214,174,82,.2);
  --plate: linear-gradient(180deg, rgba(32,25,20,.95), rgba(11,8,6,.96));
  --plate-hi: linear-gradient(180deg, rgba(92,66,22,.96), rgba(32,21,8,.96));
  --frame: inset 0 0 0 1px rgba(0,0,0,.65), inset 0 0 0 2px var(--gf);
  --gold-txt: #f3d27a; --cream: #f6ecd2;
  --r: 6px;
}
body { background: radial-gradient(1200px 700px at 50% -10%, rgba(120,30,20,.28), transparent 60%), #070304; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,.4); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #8a6a2c, #5a4218); border-radius: 6px; border: 2px solid rgba(0,0,0,.4); }
* { scrollbar-color: #8a6a2c rgba(0,0,0,.4); }

/* іконки */
.ico { width: 20px; height: 20px; flex: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
svg.ico { overflow: visible; }

/* назва-вогонь маленька (шапка) і заголовок розділу */
.fire-sm, .sec-t span { font-family: var(--head); text-transform: uppercase; letter-spacing: .03em;
  background: linear-gradient(180deg, #fffbe0 0%, #ffe27a 25%, #ffb12b 55%, #e8641c 82%, #b51d0b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #3a1003) drop-shadow(0 0 12px rgba(255,120,30,.45)); }

/* ── шапка ── */
.top { background: linear-gradient(180deg, rgba(16,10,8,.97), rgba(9,6,5,.93)) !important; border-bottom: 1px solid var(--g3);
  box-shadow: 0 1px 0 rgba(214,174,82,.18), 0 6px 18px rgba(0,0,0,.45); }
.brand { font-size: 24px; gap: 10px; }
.brand img { border-radius: 6px; box-shadow: 0 0 0 1px var(--g2); }
.brand b span { color: inherit; }
.stat { background: rgba(0,0,0,.5); border: 1px solid rgba(214,174,82,.35); border-radius: 4px; box-shadow: var(--frame); color: var(--cream); }
.stat .ico { width: 18px; height: 18px; }
.stat b { color: #ffe9a8; }
.snd, .bell { cursor: pointer; }
.stat:is(button):hover { border-color: #e7c060; }
.bell b.hot { background: linear-gradient(180deg, #ff3b62, #a3102a); box-shadow: 0 0 10px rgba(255,45,85,.6); }
.me .av { box-shadow: 0 0 0 2px var(--g2); }

/* ── навігація розділів (ПК): золоті плашки з іконками ── */
.nav { justify-content: center; gap: 6px; padding: 12px 16px 2px; flex-wrap: wrap; }
.nav button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 8px 11px; border-radius: 4px; color: #e8dcbc;
  background: var(--plate); border: 1px solid rgba(214,174,82,.32); box-shadow: var(--frame), 0 4px 12px rgba(0,0,0,.4);
  font-weight: 800; letter-spacing: .02em; text-transform: uppercase; font-size: 13px; transition: border-color .15s, box-shadow .2s, transform .12s; }
.nav button:hover { border-color: #e7c060; transform: translateY(-1px); }
.nav button.on { background: var(--plate-hi); border-color: #f0c860; color: #ffe9a8;
  box-shadow: inset 0 0 0 1px rgba(255,230,150,.22), 0 0 18px rgba(245,197,66,.3), 0 4px 12px rgba(0,0,0,.4); }
.nav button .ico { width: 19px; height: 19px; }
.nav button i { display: none; }
.home-mode .nav { display: none; }

/* ── заголовок розділу ── */
.sec-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 4px 0 18px; }
.sec-t { margin: 0; display: flex; align-items: center; gap: 12px; font: clamp(26px, 3.2vw, 44px)/1 var(--head); white-space: nowrap; }
.sec-t .ico { width: clamp(28px, 3vw, 40px); height: clamp(28px, 3vw, 40px); }
.sec-t::before, .sec-t::after { content: ""; display: block; width: clamp(30px, 9vw, 160px); height: 2px;
  background: linear-gradient(90deg, transparent, var(--g2) 60%, var(--g1)); }
.sec-t::after { transform: scaleX(-1); }
.sec-back { justify-self: start; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; padding: 7px 12px 7px 9px; border-radius: 4px;
  background: var(--plate); color: #e8dcbc; border: 1px solid rgba(214,174,82,.32); box-shadow: var(--frame); font-weight: 800; font-size: 12px; text-transform: uppercase; }
.sec-back:hover { border-color: #e7c060; }
.sec-back .ico { width: 18px; height: 18px; }

/* ── панелі з золотою рамкою і кутами ── */
.panel, body.has-bg .panel { position: relative; background: var(--plate); border: 1px solid var(--g2); border-radius: var(--r);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.55), inset 0 0 0 4px var(--gf), 0 14px 34px rgba(0,0,0,.55); }
.panel::before { content: ""; position: absolute; inset: 6px; pointer-events: none; z-index: 2; opacity: .8;
  --c: linear-gradient(var(--g1), var(--g1));
  background: var(--c) top left / 14px 2px no-repeat, var(--c) top left / 2px 14px no-repeat,
    var(--c) top right / 14px 2px no-repeat, var(--c) top right / 2px 14px no-repeat,
    var(--c) bottom left / 14px 2px no-repeat, var(--c) bottom left / 2px 14px no-repeat,
    var(--c) bottom right / 14px 2px no-repeat, var(--c) bottom right / 2px 14px no-repeat; }
.panel.empty { color: #c9b98f; }
.h { color: var(--gold-txt); text-shadow: 0 2px 0 #2a1600, 0 0 16px rgba(245,180,60,.3); letter-spacing: .03em; }
.h small { text-shadow: none; }
h3.h { color: #e9cf86; }
.muted { color: #b3a184; }
a { color: var(--g1); }

/* ── кнопки ── */
.btn { border-radius: 4px; color: var(--cream); background: linear-gradient(180deg, #2c221b, #120d0a);
  box-shadow: inset 0 0 0 1px #8a6a2c, inset 0 0 0 2px rgba(0,0,0,.6), inset 0 0 0 3px rgba(214,174,82,.14), 0 4px 12px rgba(0,0,0,.4);
  text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.btn:hover { filter: none; box-shadow: inset 0 0 0 1px #f0c860, inset 0 0 0 2px rgba(0,0,0,.6), inset 0 0 0 3px rgba(214,174,82,.22), 0 0 16px rgba(245,197,66,.25), 0 4px 12px rgba(0,0,0,.4); }
.btn.primary { background: linear-gradient(180deg, #e8334f 0%, #b8152f 55%, #7e0b1e 100%);
  box-shadow: inset 0 0 0 1px #f0c860, inset 0 0 0 2px rgba(0,0,0,.4), inset 0 1px 0 3px rgba(255,255,255,.08), 0 6px 18px rgba(224,36,63,.35); }
.btn.primary:hover { box-shadow: inset 0 0 0 1px #ffe08a, inset 0 0 0 2px rgba(0,0,0,.4), 0 0 22px rgba(255,60,80,.5), 0 6px 18px rgba(224,36,63,.35); }
.btn.gold { background: linear-gradient(180deg, #ffe592 0%, #e3ad3c 50%, #a8721c 100%); color: #2a1600; text-shadow: 0 1px 0 rgba(255,240,190,.5);
  box-shadow: inset 0 0 0 1px #fff2b8, inset 0 -3px 0 rgba(0,0,0,.18), 0 0 0 1px #6b4a12, 0 6px 18px rgba(245,197,66,.3); }
.btn.gold:hover { box-shadow: inset 0 0 0 1px #fff7d6, inset 0 -3px 0 rgba(0,0,0,.18), 0 0 0 1px #6b4a12, 0 0 24px rgba(245,197,66,.55); }
.btn.ghost { background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px rgba(214,174,82,.35); }
.btn.danger { background: linear-gradient(180deg, #3e0c17, #170409); box-shadow: inset 0 0 0 1px #a8304a, inset 0 0 0 2px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.4); }
.btn.discord { background: linear-gradient(180deg, #6a76ff, #4752c4); box-shadow: inset 0 0 0 1px #c8ccff, 0 6px 18px rgba(88,101,242,.4); }
.btn.big { border-radius: 6px; letter-spacing: .06em; }
.btn:disabled { filter: grayscale(.6); }

/* ── чипи / підвкладки ── */
.chip { display: inline-flex; align-items: center; gap: 7px; border-radius: 4px; padding: 7px 12px; color: #e8dcbc; font-weight: 700;
  background: var(--plate); border: 1px solid rgba(214,174,82,.32); box-shadow: var(--frame); transition: border-color .15s, box-shadow .2s; }
.chip:hover { border-color: #e7c060; }
.chip.on { background: var(--plate-hi); color: #ffe9a8; border-color: #f0c860; box-shadow: inset 0 0 0 1px rgba(255,230,150,.22), 0 0 16px rgba(245,197,66,.3); }
.chip .ico { width: 18px; height: 18px; }
.subnav.tabs { justify-content: center; gap: 6px; }
.subnav.tabs .chip { text-transform: uppercase; font-size: 12px; letter-spacing: .03em; padding: 8px 13px 8px 10px; }

/* ── поля, списки, плитки, смуги ── */
.input { background: rgba(0,0,0,.45); border: 1px solid rgba(214,174,82,.3); border-radius: 4px; color: var(--cream); }
.input:focus { border-color: #f0c860; box-shadow: 0 0 0 2px rgba(245,197,66,.18); }
select.input option { background: #1a120d; }
.li { background: rgba(0,0,0,.38); border: 1px solid rgba(214,174,82,.18); border-radius: 4px; }
.li:hover { border-color: rgba(214,174,82,.38); }
.li.me { border-color: #c9a24a; background: rgba(245,197,66,.08); }
.tile { background: rgba(0,0,0,.4); border: 1px solid rgba(214,174,82,.25); border-radius: 4px; box-shadow: var(--frame); }
.tile b { color: #ffe9a8; text-shadow: 0 0 10px rgba(245,197,66,.25); }
.bar { background: rgba(0,0,0,.6); box-shadow: inset 0 0 0 1px rgba(214,174,82,.3); border-radius: 3px; height: 9px; }
.bar i { border-radius: 2px; background: linear-gradient(90deg, #a8721c, #f5c542 70%, #fff1b8); box-shadow: 0 0 10px rgba(245,197,66,.4); }
.kv { color: #b3a184; }
.feed div { background: rgba(0,0,0,.38); border-radius: 4px; border: 1px solid rgba(214,174,82,.15); border-left: 3px solid var(--rc, var(--g2)); }
.tag { border-radius: 3px; }
.ability, .match, .day, .plv, .cgroup, .waves span, .shopslot .card { border-radius: 4px; }
.ability, .match, .day, .plv, .cgroup { background: rgba(0,0,0,.38); border-color: rgba(214,174,82,.2); }
.waves span { background: rgba(0,0,0,.4); border-color: rgba(214,174,82,.25); }
.waves span.ok { border-color: #4ade80; color: #7bf0a4; }
.day.next { border-color: var(--g1); }
.ach div { background: rgba(0,0,0,.38); border-color: rgba(214,174,82,.18); border-radius: 4px; }
.rank { color: #8c7a5a; }
.price { color: var(--g1) !important; }

/* ── картки ── */
.card { border-radius: 6px; background: linear-gradient(180deg, #1c1410, #0c0806); }
.card .cap { background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.35)); border-top: 1px solid rgba(214,174,82,.15); }
.card .cap b { color: var(--cream); }
.card .cnt { background: rgba(0,0,0,.8); border: 1px solid rgba(214,174,82,.4); border-radius: 4px; color: #ffe9a8; }
.fslot { border-color: rgba(214,174,82,.35); border-radius: 6px; color: #8c7a5a; }
.fslot:hover { border-color: var(--g1); color: var(--g1); }
.chapter .chimg { border-bottom: 1px solid var(--g2); }
.chapter.locked { filter: grayscale(.55); opacity: .7; }

/* ── модалки, тости ── */
#modal { background: rgba(4,2,2,.8); }
.mbox { background: var(--plate); border: 1px solid var(--g2); border-radius: var(--r);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.55), inset 0 0 0 4px var(--gf), 0 30px 80px rgba(0,0,0,.7); }
.mbox::before { content: ""; position: absolute; inset: 6px; pointer-events: none; opacity: .8; --c: linear-gradient(var(--g1), var(--g1));
  background: var(--c) top left / 16px 2px no-repeat, var(--c) top left / 2px 16px no-repeat,
    var(--c) top right / 16px 2px no-repeat, var(--c) top right / 2px 16px no-repeat,
    var(--c) bottom left / 16px 2px no-repeat, var(--c) bottom left / 2px 16px no-repeat,
    var(--c) bottom right / 16px 2px no-repeat, var(--c) bottom right / 2px 16px no-repeat; }
.mclose { z-index: 3; }
.cardview h2 { color: var(--gold-txt); text-shadow: 0 2px 0 #2a1600, 0 0 16px rgba(245,180,60,.3); }
.toast { background: var(--plate); border: 1px solid rgba(214,174,82,.35); border-left: 4px solid var(--rc, var(--g1)); border-radius: 4px; color: var(--cream); }

/* ── вхід ── */
.login-mode .login { position: relative; }
.login .fire { font-size: clamp(34px, 8vw, 86px); white-space: normal; }
.login .logo { border-radius: 10px; box-shadow: 0 0 0 2px var(--g2), 0 0 40px rgba(245,120,40,.35); }
.login-mode .embers { display: block; }
.login p { color: #c9b98f; }

/* ── бій ── */
.bt-top { background: linear-gradient(180deg, rgba(14,9,7,.92), rgba(8,5,4,.85)); border-bottom: 1px solid var(--g3); box-shadow: 0 1px 0 rgba(214,174,82,.18); }
.bt-title { color: var(--gold-txt); text-shadow: 0 2px 0 #2a1600; }
.bt-round { color: #ffe08a; }
.vs { font-size: 34px; background: linear-gradient(180deg, #fffbe0, #ffb12b 50%, #c0260f); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #3a1003) drop-shadow(0 0 14px rgba(255,120,30,.6)); text-shadow: none; }
.upic { border-radius: 6px; }
.uname { color: var(--cream); text-shadow: 0 1px 2px #000; }
.side-name { color: #e9cf86; text-transform: uppercase; letter-spacing: .04em; }
.bt-log { background: linear-gradient(180deg, rgba(10,7,5,.85), rgba(4,2,2,.9)); border-top: 1px solid var(--g3); color: #b8a684; }
.bt-result { background: radial-gradient(circle at 50% 40%, rgba(40,20,10,.85), rgba(4,2,2,.9)); }
.bt-result.won h1 { background: linear-gradient(180deg, #fffbe0 0%, #ffe27a 25%, #ffb12b 55%, #e8641c 82%, #b51d0b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  filter: drop-shadow(0 3px 0 #3a1003) drop-shadow(0 0 26px rgba(255,120,30,.6)); }
.bt-result .rw span { background: rgba(0,0,0,.45); border: 1px solid rgba(214,174,82,.35); border-radius: 4px; color: #ffe9a8; }
.fx { background: rgba(4,2,2,.78); }
.fx-title { color: #ffe08a; }

/* ── головне меню: малі плитки над великими ── */
.home-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(6px, .8vw, 12px); max-width: min(1280px, 100%); margin-bottom: clamp(10px, 2vh, 22px);
  --mini: clamp(66px, min(6vw, 11vh), 100px); }
.hmini { position: relative; width: var(--mini); height: calc(var(--mini) * .9); padding: 0; cursor: pointer; border-radius: 4px; color: #f1e6c8;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--mini) * .06);
  background: linear-gradient(180deg, rgba(30,24,20,.9), rgba(9,7,6,.93)); border: 1px solid #8a6a2c;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.6), inset 0 0 0 3px rgba(214,174,82,.35), 0 8px 18px rgba(0,0,0,.6);
  transition: transform .15s, box-shadow .2s, border-color .2s; }
.hmini:hover, .hmini:focus-visible { transform: translateY(-3px); border-color: #f0c860;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.6), inset 0 0 0 3px rgba(245,197,66,.7), 0 0 18px rgba(245,197,66,.3), 0 10px 22px rgba(0,0,0,.65); }
.hmini svg, .hmini img { width: 40%; height: 40%; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(245,197,66,.3)); }
.hmini b { font: 800 clamp(9px, calc(var(--mini) * .115), 12px)/1 var(--body); letter-spacing: .03em; text-transform: uppercase; text-shadow: 0 2px 3px #000; white-space: nowrap; }
.hmini .hb { top: 3px; right: 3px; min-width: 16px; font-size: 10px; line-height: 14px; padding: 1px 5px; }
.hmini .ndot { top: 5px; right: 6px; }
.hchip { display: none; }

/* ── телефон ── */
@media (max-width: 760px) {
  .nav { background: linear-gradient(180deg, rgba(16,10,8,.97), rgba(8,5,4,.98)); border-top: 1px solid var(--g3); box-shadow: 0 -1px 0 rgba(214,174,82,.18); padding-top: 6px; }
  .nav button { flex-direction: column; gap: 3px; padding: 5px 2px; min-width: 0; flex: 1; font-size: 9px; letter-spacing: 0;
    background: transparent; border: 1px solid transparent; box-shadow: none; text-transform: none; transform: none !important; }
  .nav button .ico { width: 22px; height: 22px; opacity: .75; }
  .nav button.on { background: var(--plate-hi); border-color: rgba(240,200,96,.6); box-shadow: 0 0 12px rgba(245,197,66,.25); }
  .nav button.on .ico { opacity: 1; }
  .sec-head { grid-template-columns: auto 1fr; margin: 0 0 12px; gap: 8px; }
  .sec-head .sec-sp { display: none; }
  .sec-t { justify-self: center; font-size: 26px; gap: 8px; }
  .sec-t::before, .sec-t::after { width: 18px; }
  .sec-back span { display: none; }
  .sec-back { padding: 7px; }
  .brand b { display: none; }
  .subnav.tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; scrollbar-width: none; }
  .subnav.tabs::-webkit-scrollbar { display: none; }
  .subnav.tabs .chip { flex: none; }
  .panel::before { inset: 4px; }
}
@media (orientation: portrait) and (max-width: 640px) {
  .home-sub { --mini: min(19vw, 84px); flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 4px 2px 8px; }
  .hmini { flex: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .home-sub { --mini: clamp(52px, 15vh, 74px); }
}
@media (min-width: 2200px) and (min-height: 1200px) {
  .home-sub { --mini: clamp(100px, 5.5vw, 140px); }
  .nav button { font-size: 15px; padding: 10px 18px 10px 14px; }
}

/* v1.4 правки: вхід, вогонь */
.fire, .fire span { -webkit-text-fill-color: transparent; color: transparent; }
.login { gap: 22px; }
.login h1.fire { margin: 0; }
.login-box { display: grid; gap: 16px; justify-items: center; width: min(460px, 92vw); padding: 26px 22px; }
.login-box .logo { width: 108px; height: 108px; }
.login-box p { margin: 0; max-width: 380px; }
.sec-head { display: flex; justify-content: center; }
@media (max-width: 760px) { .sec-head { margin: 0 0 12px; } }

/* ── v1.5 інтро: «Натисни будь-яку клавішу» ── */
#intro { position: fixed; inset: 0; z-index: 60; background: #050203; cursor: pointer; transition: opacity .8s ease; user-select: none; }
#intro .intro-bg { position: absolute; inset: 0; overflow: hidden; }
#intro .intro-bg::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 42%, rgba(8,3,5,0) 35%, rgba(8,3,5,.8) 100%), rgba(8,3,5,var(--dim, .2)); }
#intro .embers { display: block; z-index: 1; }
.intro-c { position: relative; z-index: 2; height: 100%; box-sizing: border-box; display: flex; flex-direction: column;
  align-items: center; justify-content: space-between; padding: 11vh 4vw 9vh; text-align: center; }
.intro-title { animation: introIn 1.6s cubic-bezier(.2,.8,.2,1) both; transition: transform .6s ease, filter .6s ease; }
.intro-title img { max-width: min(82vw, 940px); max-height: 36vh; filter: drop-shadow(0 6px 18px rgba(0,0,0,.8)); }
#intro .fire { font-size: clamp(38px, min(8vw, 14vh), 140px); }
.intro-press { font: clamp(15px, 2.2vw, 26px)/1.2 var(--head); letter-spacing: .14em; text-transform: uppercase; color: #ffe9a8;
  padding: .55em 1.6em; border: 2px solid #b8892c; border-radius: 6px;
  background: linear-gradient(180deg, rgba(58,36,14,.85), rgba(20,11,6,.85));
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(255,220,140,.25), 0 0 28px rgba(245,166,35,.35);
  text-shadow: 0 0 12px #f5a623, 0 2px 0 #000; animation: introBlink 1.7s ease-in-out 1.2s infinite both; }
#intro.go .intro-press { animation: none; opacity: 0; transform: scale(1.15); transition: .35s ease; }
#intro.go .intro-title { transform: scale(1.07); filter: brightness(1.5) drop-shadow(0 0 30px rgba(255,190,80,.6)); }
#intro.out { opacity: 0; pointer-events: none; }
.intro-cut { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; z-index: 5; }
.intro-skip { position: absolute; right: 18px; bottom: 18px; z-index: 6; }
@keyframes introBlink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes introIn { from { opacity: 0; transform: translateY(-24px) scale(.9); } to { opacity: 1; transform: none; } }
@media (orientation: portrait) { .intro-c { padding: 16vh 6vw 12vh; } .intro-cut { object-fit: contain; } }
@media (prefers-reduced-motion: reduce) { .intro-title, .intro-press { animation: none; } }
.intro-snd { position: absolute; top: 16px; right: 16px; z-index: 7; font: 600 14px/1 var(--head, sans-serif); color: #ffe9a8; cursor: pointer;
  padding: 9px 14px; border: 1px solid #b8892c; border-radius: 6px; background: rgba(20,11,6,.85); box-shadow: 0 0 14px rgba(245,166,35,.3); }
.intro-snd:hover { background: rgba(58,36,14,.95); }

/* ── v1.6 новела «Доки-Доки Качальний Клуб» ── */
.vn-menu { display: grid; gap: 14px; }
.vn-cover { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid #8a6a2c; background: #1a0f14; aspect-ratio: 16 / 9; max-height: 62vh; margin: 0 auto; width: 100%; }
.vn-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vn-cover-ph { display: flex; justify-content: center; align-items: flex-end; gap: 2%; height: 100%; padding-top: 4%;
  background: radial-gradient(ellipse at 50% 30%, #ff9ec455, transparent 60%), linear-gradient(#2a1420, #0d0608); }
.vn-cover-ph img { height: 88%; border-radius: 8px; box-shadow: 0 8px 24px #000a; transform: rotate(var(--r, 0deg)); }
.vn-cover-ph img:nth-child(odd) { --r: -3deg; } .vn-cover-ph img:nth-child(even) { --r: 3deg; }
.vn-logo { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; text-align: center; font: clamp(22px, 4vw, 44px)/1 var(--head);
  color: #ffd6e7; text-shadow: 0 0 14px #ff6fa8, 0 3px 0 #5a1030, 0 0 2px #000; letter-spacing: .03em; }
.vn-ends { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.vn-end { padding: 8px 10px; border: 1px solid #4a3818; border-radius: 6px; background: #170e0b; display: grid; gap: 2px; }
.vn-end.good { border-color: #f0c860; box-shadow: 0 0 12px #f0c86055; } .vn-end.lock { opacity: .55; }
.vn-glitch-t { font-family: monospace; color: #c49bff; animation: vnFlick 2.4s steps(1) infinite; }

body.vn-open { overflow: hidden; }
#vnp { position: fixed; inset: 0; z-index: 55; background: #000; overflow: hidden; user-select: none; cursor: pointer; }
.vn-bg, .vn-bg img, .vn-cg, .vn-cg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vn-bg img { filter: saturate(1.05); }
.vn-bg.bg-void { background: repeating-radial-gradient(circle at 50% 50%, #f4f4f4 0 2px, #dcdcdc 2px 4px); animation: vnNoise .2s steps(2) infinite; }
.vn-cg { z-index: 3; opacity: 0; transition: opacity 1.2s; pointer-events: none; } .vn-cg.on { opacity: 1; }
.vn-chars { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.vn-chars .ch { position: absolute; bottom: 0; left: var(--x); transform: translateX(-50%); transition: left .5s ease, filter .3s, transform .3s; filter: brightness(.72); }
.vn-chars .ch.talk { filter: none; transform: translateX(-50%) translateY(-6px) scale(1.02); }
.vn-chars .ch.in { animation: vnIn .5s ease both; }
.vn-chars .ch { --h: min(86vh, 900px); }
.vn-chars .spr { display: block; height: calc(var(--h) * var(--sc, 1)); max-width: calc(46vw * var(--sc, 1)); object-fit: contain;
  margin-bottom: calc(var(--h) * (1 - var(--sc, 1))); }
.vn-chars .spr.card { height: auto; width: min(26vw, 300px); margin-bottom: 26vh; padding: 6px; background: linear-gradient(#ffe2ee, #e8b7cc);
  border-radius: 12px; box-shadow: 0 10px 30px #000b; }
.vn-chars .spr.card img { display: block; width: 100%; border-radius: 8px; }
.ch[data-e="sad"] .spr { filter: saturate(.6) brightness(.9); }
.ch[data-e="creepy"] .spr { filter: contrast(1.4) saturate(1.6) hue-rotate(-30deg); }
.ch.corrupt { animation: vnCorrupt 1.4s steps(6) forwards; }
.vn-box { position: absolute; z-index: 4; left: 50%; bottom: 3vh; transform: translateX(-50%); width: min(1040px, 94vw); min-height: 150px; box-sizing: border-box;
  padding: 26px 26px 18px; background: linear-gradient(180deg, rgba(255,240,246,.93), rgba(255,226,238,.93)); border: 3px solid #ffb6d1;
  border-radius: 14px; box-shadow: 0 0 0 2px #7a2a4a, 0 10px 30px #000a; color: #4a2433; }
.vn-name { position: absolute; top: -20px; left: 22px; padding: 4px 20px; font: 700 18px/1.2 var(--head); color: #fff; background: var(--c);
  border: 3px solid #fff; border-radius: 10px; box-shadow: 0 0 0 2px #7a2a4a; text-shadow: 0 1px 2px #0008; }
.vn-text { font: 600 clamp(15px, 1.9vw, 20px)/1.5 system-ui, Segoe UI, sans-serif; white-space: pre-wrap; min-height: 3em; }
.vn-text.narr { font-style: italic; color: #6a3a4c; }
.vn-arrow { position: absolute; right: 18px; bottom: 10px; color: #e0578f; animation: vnBob 1s ease-in-out infinite; }
.vn-choices { position: absolute; z-index: 5; inset: 0 0 auto; top: 18vh; display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; }
.vn-ch { pointer-events: auto; min-width: min(460px, 86vw); padding: 12px 22px; font: 700 17px/1.3 system-ui, sans-serif; color: #4a2433; cursor: pointer;
  background: #fff3f8; border: 3px solid #ffb6d1; border-radius: 10px; box-shadow: 0 0 0 2px #7a2a4a, 0 6px 16px #0008; transition: transform .15s, background .15s; }
.vn-ch:hover { transform: scale(1.04); background: #ffd9e8; }
.vn-ch.glitchy { color: #2a0a3a; background: #e8dcff; border-color: #b48cff; animation: vnFlick 1.8s steps(1) infinite; }
.vn-ui { position: absolute; z-index: 6; top: 12px; right: 12px; display: flex; gap: 6px; }
.vn-ui button { font: 700 13px/1 system-ui, sans-serif; padding: 8px 12px; color: #fff; background: #7a2a4acc; border: 2px solid #ffb6d1; border-radius: 8px; cursor: pointer; }
.vn-ui button.on { background: #e0578f; }
.vn-fx { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
#vnp.fx-glitch .vn-fx { background: repeating-linear-gradient(0deg, transparent 0 3px, #ff00aa22 3px 4px), linear-gradient(90deg, #0ff2, transparent 30%, #f0f2);
  animation: vnShift .15s steps(2) 6; }
#vnp.fx-glitch .vn-chars, #vnp.fx-glitch .vn-box { animation: vnShake .12s steps(2) 6; }
#vnp.fx-shake { animation: vnShake .1s steps(2) 6; }
#vnp.fx-static .vn-fx { background: repeating-radial-gradient(circle at 30% 40%, #fff3 0 1px, #0003 1px 3px); animation: vnNoise .1s steps(3) 15; }
#vnp.fx-flash .vn-fx { animation: vnFlash .9s ease; }
.vn-endcard { position: absolute; z-index: 8; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, 92vw); text-align: center; padding: 22px;
  background: rgba(16,6,10,.95); border: 2px solid #c44a7a; border-radius: 12px; box-shadow: 0 0 40px #c44a7a66; color: #f5dfe8; cursor: default; animation: vnPop .6s ease both; }
.vn-endcard.good { border-color: #f0c860; box-shadow: 0 0 50px #f0c86088; }
.vn-endcard small { letter-spacing: .3em; color: #c49bff; } .vn-endcard h2 { margin: 6px 0; font: clamp(24px, 4vw, 38px)/1.1 var(--head); color: #ffd6e7; }
.vn-endcard.good h2 { color: #ffe9a8; } .vn-endcard .hi { color: #9fffb0; font-weight: 700; }
.vn-reward { display: grid; justify-items: center; gap: 6px; margin: 10px 0; } .vn-reward img { width: 160px; border-radius: 8px; box-shadow: 0 0 24px #ffd24a99; }
@keyframes vnIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; } }
@keyframes vnPop { from { opacity: 0; } }
@keyframes vnBob { 50% { transform: translateY(4px); } }
@keyframes vnShake { 0% { transform: translate(3px, -2px); } 100% { transform: translate(-3px, 2px); } }
@keyframes vnShift { 0% { transform: translateX(8px); } 100% { transform: translateX(-8px); } }
@keyframes vnNoise { 0% { background-position: 0 0; } 50% { background-position: 7px -5px; } 100% { background-position: -4px 6px; } }
@keyframes vnFlash { 0% { background: #fff0; } 15% { background: #fff; } 100% { background: #fff0; } }
@keyframes vnFlick { 0%, 92% { opacity: 1; } 93% { opacity: .2; transform: skewX(12deg); } 96% { opacity: 1; transform: none; } }
@keyframes vnCorrupt { 0% { opacity: 1; } 30% { filter: invert(1) hue-rotate(90deg); clip-path: inset(10% 0 40% 0); } 60% { clip-path: inset(50% 0 10% 0); transform: translateX(-46%); }
  100% { opacity: 0; clip-path: inset(0 0 100% 0); } }
@media (orientation: portrait) {
  .vn-chars .ch { --h: 62vh; } .vn-chars .spr { max-width: calc(70vw * var(--sc, 1)); } .vn-chars .spr.card { width: 38vw; margin-bottom: 30vh; }
  .vn-box { bottom: 2vh; padding: 22px 16px 14px; } .vn-choices { top: 12vh; }
}
@media (prefers-reduced-motion: reduce) { #vnp *, #vnp { animation: none !important; } }
.vn-chars .spr.ph { height: min(70vh, 720px); width: min(24vw, 320px); border-radius: 50% 50% 14px 14px / 30% 30% 14px 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 55%, #000) 0%, #120608 100%); border: 3px solid var(--c);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 18%; box-sizing: border-box; box-shadow: 0 0 30px #000a; }
.vn-chars .spr.ph span { font: 700 22px/1 var(--head, sans-serif); color: #fff; text-shadow: 0 2px 4px #000; }
@media (orientation: portrait) { .vn-chars .spr.ph { height: 52vh; width: 34vw; } }
.vn-choices { top: 30vh; }
#vnp:has(.vn-ch) .vn-chars { filter: brightness(.55); transition: filter .3s; }
.vn-cover:has(> img)::after { content: ""; position: absolute; inset: auto 0 0; height: 32%; background: linear-gradient(transparent, #0d0608dd); }
.vn-logo { z-index: 1; }
@media (orientation: portrait) { .vn-choices { top: 22vh; } }

/* спалах після «натисни будь-яку клавішу» */
.intro-flash { position: fixed; inset: 0; z-index: 70; pointer-events: none;
  background: radial-gradient(circle at 50% 45%, #fff 0%, #fff6d8 35%, #ffc861 70%, #d9822b 100%); animation: introFlash 1.4s ease-out forwards; }
@keyframes introFlash { 0% { opacity: 0; } 14% { opacity: 1; } 30% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .intro-flash { animation-duration: .5s; } }

.danger-zone { border-color: #b3261e !important; box-shadow: inset 0 0 0 1px #b3261e55; }
.danger-zone .h { color: #ff8a80; }

/* ── рідкість Absolute: райдужна, переливається ── */
.r-Absolute { --rc: var(--c-absolute); }
.tag.r-Absolute, .chip.r-Absolute, b.Absolute, .Absolute > .rn { background-image: linear-gradient(90deg, #ff4d4d, #ffd23f, #5dff8f, #4fd2ff, #b06bff, #ff4d4d);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: absShift 4s linear infinite; }
.tag.r-Absolute { color: #fff; -webkit-background-clip: border-box; background-clip: border-box; text-shadow: 0 1px 2px #000; }
.card.Absolute { box-shadow: 0 0 0 2px #fff6, 0 0 22px #7df9ff88; }
.card.Absolute::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none; padding: 2px;
  background: conic-gradient(from var(--abs-a, 0deg), #ff4d4d, #ffd23f, #5dff8f, #4fd2ff, #b06bff, #ff4d4d);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: absSpin 3s linear infinite; }
.flip.open.Absolute .front .card { animation: glow 1.2s ease-in-out infinite alternate; }
@property --abs-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes absSpin { to { --abs-a: 360deg; } }
@keyframes absShift { to { background-position: 300% 0; } }

/* зачарований Фембоєм — рожеве сяйво і переворот обличчям до своїх */
.unit.charmed { filter: drop-shadow(0 0 10px #ff6fb5) saturate(1.2); }
.unit.charmed .uimg, .unit.charmed img { transform: scaleX(-1); }

.forms { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0; }
.unit.morph .upic { animation: morph .6s ease; }
@keyframes morph { 0% { filter: brightness(3) saturate(0); transform: scale(1.12); } 100% { filter: none; transform: none; } }

/* ── зала призову (крутка) ── */
.summon { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; --sc: #ffc861; }
.summon.tease { --sc: var(--rc, #ffc861); }
.sm-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--sc) 30%, #1a0a10) 0%, #0a0406 55%, #000 100%); transition: background 1s; }
.sm-bg .embers { display: block; }
.sm-rays { position: absolute; width: 180vmax; height: 180vmax; opacity: .22;
  background: repeating-conic-gradient(from 0deg, var(--sc) 0deg 4deg, transparent 4deg 18deg); animation: spin 40s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 60%); mask: radial-gradient(circle, #000 0%, transparent 60%); transition: background 1s; }
.sm-ring { position: absolute; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--sc) 80%, #fff); box-shadow: 0 0 24px color-mix(in srgb, var(--sc) 50%, transparent), inset 0 0 24px color-mix(in srgb, var(--sc) 40%, transparent); }
.sm-ring.r1 { width: min(64vmin, 560px); height: min(64vmin, 560px); animation: spin 18s linear infinite; }
.sm-ring.r2 { width: min(56vmin, 490px); height: min(56vmin, 490px); border-style: dotted; border-width: 4px; animation: spin 12s linear infinite reverse; }
.sm-ring.r3 { width: min(80vmin, 690px); height: min(80vmin, 690px); border-width: 1px; opacity: .5; animation: spin 30s linear infinite; }
.sm-orbit { position: absolute; width: min(70vmin, 600px); height: min(70vmin, 600px); animation: spin 14s linear infinite; }
.sm-card { position: absolute; left: 50%; top: 50%; width: min(9vmin, 70px); aspect-ratio: 3 / 4; margin: calc(min(9vmin, 70px) * -0.66) 0 0 calc(min(9vmin, 70px) * -0.5);
  transform: rotate(calc(360deg / var(--n) * var(--i))) translateY(calc(min(70vmin, 600px) * -0.5)); border-radius: 6px; overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--sc) 85%, #fff); box-shadow: 0 0 14px var(--sc); background: #1a0e08; display: grid; place-items: center; color: var(--gold); font-size: 22px; }
.sm-card img { width: 100%; height: 100%; object-fit: cover; }
.sm-portal { position: relative; width: min(46vmin, 400px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  border: 4px solid #e8c25a; box-shadow: 0 0 0 3px #3a2408, 0 0 60px color-mix(in srgb, var(--sc) 80%, transparent), inset 0 0 50px #000; background: #050203; animation: smPulse 1.6s ease-in-out infinite; transition: box-shadow .8s; }
.sm-portal > video, .sm-portal > img.gifv { width: 100%; height: 100%; object-fit: cover; max-width: none; max-height: none; border-radius: 0; }
.sm-portal .drum { width: 70%; height: 70%; }
.sm-glow { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, transparent 55%, color-mix(in srgb, var(--sc) 45%, transparent) 100%); }
.summon.tease .sm-portal { animation: smPulse .45s ease-in-out infinite; }
.summon.tease .sm-orbit { animation-duration: 3s; }
.sm-title { position: absolute; top: 3.5%; z-index: 2; display: flex; gap: 14px; align-items: baseline; font: clamp(28px, 5vw, 56px)/1 var(--head); text-transform: uppercase; letter-spacing: .06em;
  color: #ffe9a8; text-shadow: 0 0 18px var(--sc), 0 3px 0 #3a1a00; }
.sm-title b { color: #fff; }
.sm-pity { position: absolute; bottom: 4%; z-index: 2; display: flex; gap: 18px; font: 600 15px/1 system-ui, sans-serif; color: #f3dfb2; }
.sm-pity span { padding: 7px 12px; border: 1px solid #8a6a2c; border-radius: 6px; background: rgba(20,11,6,.75); }
@keyframes smPulse { 50% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .sm-rays, .sm-ring, .sm-orbit, .sm-portal { animation: none !important; } }
@media (orientation: portrait) { .sm-title { top: 9%; } }

/* ── анімації бою збоку ── */
.fxs { position: absolute; top: 56px; bottom: 120px; width: min(40vw, 600px); z-index: 30; pointer-events: none; display: flex; flex-direction: column; gap: 10px; }
.fxs.left { left: 10px; align-items: flex-start; } .fxs.right { right: 10px; align-items: flex-end; }
.fxc { position: relative; width: 100%; transition: opacity .45s, transform .45s, width .45s; animation: fxIn .35s ease-out both; transform-origin: top center; }
.fxs.left .fxc { transform-origin: top left; } .fxs.right .fxc { transform-origin: top right; }
.fxc video, .fxc img { display: block; width: 100%; max-height: 52vh; object-fit: contain; border-radius: 14px; background: #000;
  box-shadow: 0 0 0 2px var(--gold2), 0 0 40px rgba(245,197,66,.35); }
.fxs.right .fxc video, .fxs.right .fxc img { box-shadow: 0 0 0 2px #e0243f, 0 0 40px rgba(224,36,63,.35); }
.fxc[data-age="1"] { opacity: .55; transform: scale(.62); width: 62%; }
.fxc[data-age="2"] { opacity: .3; transform: scale(.45); width: 45%; }
.fxc.gone { opacity: 0; transform: scale(.4); }
.fxc .fx-title { position: static; margin-top: 6px; font: 18px var(--head); text-transform: uppercase; color: #ffe08a; text-shadow: 0 2px 8px #000; text-align: left; padding: 0; }
.fxs.right .fxc .fx-title { text-align: right; }
.fxc[data-age] .fx-title { display: none; }
@keyframes fxIn { from { opacity: 0; transform: translateY(-14px) scale(.9); } }
@media (orientation: portrait), (max-width: 760px) { .fxs { width: 46vw; top: 50px; bottom: auto; } .fxc video, .fxc img { max-height: 30vh; } .fxc .fx-title { font-size: 13px; } }

/* ── роздача карт у крутці ── */
.reveal.deal .flip { animation: dealIn .55s cubic-bezier(.2,.9,.3,1.2) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes dealIn { from { opacity: 0; transform: translateY(-30vh) scale(.3) rotate(calc((var(--i, 0) - 4) * 9deg)); } }
.flip .back { transition: box-shadow .3s; }
.flip.charge:not(.open) .in { animation: charge .5s ease-in-out infinite alternate; }
.flip.charge:not(.open) .back { box-shadow: 0 0 18px 4px var(--rc, #ffc861), inset 0 0 22px var(--rc, #ffc861); }
.flip.charge.r-Legendary:not(.open) .in, .flip.charge.r-Mythic:not(.open) .in, .flip.charge.r-Absolute:not(.open) .in { animation: charge .12s ease-in-out infinite alternate; }
@keyframes charge { from { transform: scale(1) rotate(-1deg); } to { transform: scale(1.06) rotate(1deg); } }
.flip { position: relative; }
.flip.open .in { transition: transform .7s cubic-bezier(.3,1.5,.5,1); }
.flip.open .front::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); background-size: 250% 100%; animation: shineOnce .9s .35s ease-out both; }
@keyframes shineOnce { from { background-position: 150% 0; } to { background-position: -60% 0; } }
.fburst { position: absolute; inset: -30%; z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, var(--rc, #fff) 0%, transparent 65%); animation: fburst .9s ease-out forwards; }
@keyframes fburst { from { opacity: .95; transform: scale(.3); } to { opacity: 0; transform: scale(1.4); } }
@media (prefers-reduced-motion: reduce) { .reveal.deal .flip, .flip.charge .in { animation: none !important; } }

/* ── сюжет: картинки розділів не обрізаються, сцени — кінематографічно ── */
.chimg { height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 30%; background: #000; }
.scene.cine { width: min(1180px, 96vw); }
.scene.cine img, .scene.cine video { max-height: 72vh; width: auto; max-width: 100%; margin: 0 auto; display: block; background: #000;
  border: 3px solid #c9a24a; box-shadow: 0 0 0 2px #2a1a06, 0 0 50px rgba(245,197,66,.25), 0 30px 80px rgba(0,0,0,.7); animation: kenburns 9s ease-out both; }
.scene.cine h2 { font-size: clamp(24px, 3.4vw, 40px); animation: pop .5s .25s ease-out both; }
.scene.cine p { animation: pop .5s .4s ease-out both; }
@keyframes kenburns { from { transform: scale(1.04); filter: brightness(.6); } 25% { filter: none; } to { transform: scale(1); } }
/* відео анімацій — за своїми пропорціями (9:16 без чорних смуг) */
.fxc { width: auto; max-width: 100%; }
.fxc video, .fxc img { width: auto; height: min(58vh, 680px); max-width: 100%; object-fit: contain; background: transparent; }
.fxc[data-age="1"] { width: auto; transform: scale(.6); }
.fxc[data-age="2"] { width: auto; transform: scale(.42); }
@media (orientation: portrait), (max-width: 760px) { .fxc video, .fxc img { height: 32vh; } }

/* анімації бою — у вільних полях екрана зліва (наші) і справа (ворог), поза полем бою */
.fxs { position: fixed; top: 9vh; bottom: 9vh; z-index: 40; justify-content: center; width: max(260px, calc((100vw - 1000px) / 2 - 24px)); }
.fxs.left { left: 12px; } .fxs.right { right: 12px; }
.fxc video, .fxc img { height: auto; max-height: 70vh; width: 100%; max-width: 100%; }
.fxc { width: 100%; }
.fxc[data-age="1"], .fxc[data-age="2"] { width: 100%; }
@media (max-width: 1520px) {          /* полів немає — показуємо поверх краю поля бою, менше */
  .fxs { width: 32vw; top: 64px; bottom: auto; justify-content: flex-start; }
  .fxc video, .fxc img { max-height: 46vh; }
}
@media (orientation: portrait), (max-width: 760px) { .fxs { width: 44vw; top: 52px; } .fxc video, .fxc img { max-height: 30vh; } }

/* ── v1.7 мобільна стабільність: без «плаваючих» блоків, тексту й кнопок ── */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, .btn, .chip, .htile, .hmini, [data-act] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@supports (height: 100dvh) {
  body, .boot, .login { min-height: 100dvh; }
  .bt { height: 100dvh; }
  .reveal { max-height: 100dvh; }
}
img, video { max-width: 100%; }
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px !important; }            /* iOS не зумить сторінку при фокусі */
  body { overflow-x: hidden; }
  /* малі кнопки меню — сіткою по 4–5 в ряд, без горизонтального скролу */
  .home-sub { --mini: min(21vw, 86px); flex-wrap: wrap !important; overflow: visible !important; justify-content: center !important;
    -webkit-mask-image: none !important; mask-image: none !important; gap: 6px; }
  /* підвкладки бою — у два ряди замість обрізаного скролу */
  .subnav.tabs { flex-wrap: wrap !important; overflow: visible !important; justify-content: center !important; gap: 6px; }
  .subnav.tabs .chip { padding: 7px 10px; font-size: 12px; }
  .subnav.tabs .chip .ico { width: 15px; height: 15px; }
  .panel { padding: 14px 12px; }
  .sec-t { font-size: clamp(22px, 7vw, 30px); }
  .h { font-size: clamp(18px, 5.6vw, 24px); }
  .row { flex-wrap: wrap; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .tile b { font-size: clamp(18px, 6vw, 26px); }
  .li { gap: 8px; }
  .li .grow { min-width: 0; }
  .li .grow b, .li .grow span { overflow-wrap: anywhere; }
  .btn { white-space: normal; }
  .mbox { width: min(560px, 96vw) !important; max-height: 92dvh; overflow: auto; }
  .bt-top { flex-wrap: wrap; gap: 6px; }
  .bt-ctl { width: 100%; display: flex; gap: 6px; }
  .bt-ctl .btn { flex: 1; font-size: 12px; padding: 7px 4px; }
  .toast { left: 8px !important; right: 8px !important; max-width: none; }
}
@media (max-width: 380px) { .home-sub { --mini: min(22vw, 76px); } .chip { font-size: 12px; } }

.alldone { margin: 10px 0; padding: 14px 16px; border: 1px solid #3fa35b; border-radius: 8px; background: linear-gradient(180deg, rgba(40,90,50,.45), rgba(20,40,25,.45));
  font: 700 16px/1.3 system-ui, sans-serif; color: #b8ffc9; text-align: center; }
.buyxp { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pickinfo { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important; }
.pk { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; padding: 8px; border: 1px solid var(--line, #4a3818); border-radius: 8px; cursor: pointer; background: rgba(20,12,8,.6); }
.pk:hover { border-color: #e8c25a; }
.pk .card .cap { display: none; }
.pkinfo { display: grid; gap: 3px; font-size: 13px; min-width: 0; }
.pkinfo b { overflow-wrap: anywhere; }
.pkst { font-weight: 700; }
.pkab { font-size: 12px; color: #d9c9a6; line-height: 1.35; }
@media (max-width: 760px) { .pickinfo { grid-template-columns: 1fr !important; } .pk { grid-template-columns: 84px 1fr; } }
