/* Оформление «ночная лавка»: чернильно-сливовый фон, свечной янтарь и сиреневый.
   Нарочно не похоже на интерфейс игры (там серо-хаки и шрифт Bender):
   это фан-проект со своим лицом. */
:root {
  --bg: #0f0c16;
  --bg2: #17121f;
  --panel: #1c1626;
  --card: rgba(34, 27, 46, .78);
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .14);
  --text: #f3edf8;
  --muted: #a697b9;
  --accent: #f2b45a;
  --accent2: #b98cf0;
  --ok: #2e9e78;
  --near: #c9992c;
  --no: #9c3b55;
  --radius: 14px;
  --cell: clamp(28px, 7.6vw, 48px);
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  color: var(--text);
  font: 15px/1.5 Manrope, system-ui, sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 85% -15%, rgba(185, 140, 240, .16), transparent 60%),
    radial-gradient(900px 520px at -10% 30%, rgba(242, 180, 90, .07), transparent 55%),
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 70% 12%, rgba(255,255,255,.25), transparent 60%),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,.2), transparent 60%),
    radial-gradient(1px 1px at 88% 60%, rgba(255,255,255,.25), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
code { background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 5px; font-size: .92em; }
h1, h2, h3 { font-family: Unbounded, Manrope, sans-serif; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); font-weight: 400; }
.kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.big { width: 40px; height: 40px; stroke-width: 1.4; color: var(--accent); }
.ico.huge { width: 72px; height: 72px; stroke-width: 1.1; color: var(--accent2); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(6px); }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; cursor: pointer; color: var(--text);
  background: rgba(255,255,255,.05); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 16px; transition: .15s; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--accent); background: rgba(242,180,90,.08); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: transparent; }
.btn.primary { background: linear-gradient(135deg, #f6c272, #e39a3c); color: #1d1206; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, #f6c272, #e39a3c); }
.btn.big { padding: 13px 22px; font-size: 16px; }
.btn.small { padding: 5px 10px; font-size: 13px; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 12px 24px;
  background: rgba(15, 12, 22, .78); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
.logo { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 22px; letter-spacing: .1em;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.work { font-size: 11px; color: var(--muted); }
.nav { display: flex; gap: 4px; }
.nav a, .lang { padding: 7px 13px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; border: 1px solid transparent; background: none; cursor: pointer; font-family: inherit; }
.nav a:hover, .lang:hover { color: var(--text); }
.nav a.on, .lang.on { color: var(--text); background: rgba(255,255,255,.06); border-color: var(--line2); }
.langs { display: flex; gap: 2px; }
.lang { padding: 6px 10px; font-size: 13px; }

main { max-width: 1180px; margin: 0 auto; padding: 28px 20px 10px; }

/* ---------- главная ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: center; padding: 26px 0 34px; }
.hero h1 { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.08; margin: 12px 0 16px; }
.hero p { color: var(--muted); font-size: 17px; max-width: 560px; margin: 0 0 24px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; color: var(--muted); font-size: 14px; }
.hero-meta span::before { content: "✦ "; color: var(--accent2); }
.hero-art { position: relative; height: 340px; }
.hero-art::before { content: ""; position: absolute; inset: 10% 8%; border-radius: 50%;
  background: radial-gradient(circle, rgba(242,180,90,.22), rgba(185,140,240,.12) 45%, transparent 70%); filter: blur(10px); }
.float { position: absolute; width: 120px; animation: bob 7s ease-in-out infinite; filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); }
.float img { width: 100%; display: block; }
.f0 { left: 8%; top: 6%; width: 130px; animation-delay: -1s; }
.f1 { left: 52%; top: 0; width: 110px; animation-delay: -3s; }
.f2 { left: 30%; top: 34%; width: 170px; animation-delay: -2s; }
.f3 { left: 72%; top: 38%; width: 105px; animation-delay: -5s; }
.f4 { left: 2%; top: 58%; width: 95px; animation-delay: -4s; }
.f5 { left: 46%; top: 70%; width: 100px; animation-delay: -6s; }
.f6 { left: 78%; top: 6%; width: 80px; animation-delay: -2.5s; }
.f7 { left: 20%; top: 80%; width: 90px; animation-delay: -1.5s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }

.sec { font-size: 20px; margin: 30px 0 14px; display: flex; gap: 10px; align-items: baseline; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cards.two { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.mcard { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); transition: transform .18s, border-color .18s, box-shadow .18s; }
.mcard:hover { transform: translateY(-3px); border-color: rgba(242,180,90,.45); box-shadow: var(--shadow); }
.mcard.wide { flex-direction: row; }
.mcard.wide .art { width: 42%; height: auto; min-height: 170px; }
.mcard.off { opacity: .55; }
.art { position: relative; height: 150px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 60%, rgba(185,140,240,.22), transparent 65%), linear-gradient(180deg, rgba(255,255,255,.03), transparent); }
.art img { max-width: 70%; max-height: 120px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); transition: transform .3s; }
.mcard:hover .art img { transform: scale(1.06) rotate(-2deg); }
.art-silhouette img { filter: brightness(0) drop-shadow(0 0 14px rgba(242,180,90,.55)); }
.art-zoom img { transform: scale(2.6); transform-origin: 45% 50%; }
.mcard:hover .art-zoom img { transform: scale(2.3); }
.art-describe img { opacity: .35; }
.art-describe::after { content: "“ █████ ███ ██████ ”"; position: absolute; font-family: Unbounded; font-size: 15px; color: var(--text); letter-spacing: .05em; }
.mc-txt { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mc-h { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.mc-h b { color: var(--text); font-size: 16px; }
.mc-txt p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.badge { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: rgba(255,255,255,.07); color: var(--muted); }
.st-won .badge { background: rgba(46,158,120,.22); color: #7ee2bd; }
.st-play .badge { background: rgba(242,180,90,.16); color: var(--accent); }
.st-lost .badge { background: rgba(156,59,85,.25); color: #f1a0b4; }

.stream-banner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: center; padding: 22px 26px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(145,70,255,.22), rgba(242,180,90,.1)); border: 1px solid rgba(185,140,240,.35); transition: .2s; }
.stream-banner:hover { border-color: var(--accent2); box-shadow: var(--shadow); }
.sb-txt { display: flex; gap: 16px; align-items: flex-start; }
.sb-txt b { font-family: Unbounded; font-size: 20px; }
.sb-txt p { margin: 6px 0 0; color: var(--muted); }
.sb-demo { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.chatline { background: rgba(0,0,0,.3); padding: 7px 12px; border-radius: 8px; }
.chatline i { font-style: normal; font-weight: 700; margin-right: 6px; }

/* ---------- страница режима ---------- */
.mode-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.mode-title { display: flex; gap: 14px; align-items: center; }
.mode-title h1 { font-size: clamp(22px, 3vw, 32px); margin: 2px 0; }
.sub { margin: 0; color: var(--muted); }
.mode-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: thin; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 30px; font-size: 13px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--line2); color: var(--muted); background: rgba(255,255,255,.03); }
.chip:hover { color: var(--text); }
.chip.on { color: var(--text); border-color: var(--accent); background: rgba(242,180,90,.1); }
.chip.st-won { color: #7ee2bd; border-color: rgba(46,158,120,.5); }
.chip.st-won::after { content: "✓"; }

.clue { display: grid; place-items: center; margin: 4px 0 18px; }
.stage { position: relative; }
.stage.sil, .stage.zoom { width: min(380px, 86vw); aspect-ratio: 1; border-radius: 20px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 55%, rgba(242,180,90,.18), rgba(185,140,240,.1) 45%, rgba(0,0,0,.2) 75%); border: 1px solid var(--line2); }
.stage.sil img { width: 82%; height: 82%; object-fit: contain; filter: brightness(0) drop-shadow(0 0 16px rgba(242,180,90,.5)); transition: filter .9s; }
.stage.sil.reveal img { filter: drop-shadow(0 12px 20px rgba(0,0,0,.6)); }
.stage.zoom .zin, .stage.shot .zin { width: 100%; height: 100%; display: grid; place-items: center; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.stage.zoom img { width: 86%; height: 86%; object-fit: contain; }
.stage.shot { width: min(760px, 92vw); aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; border: 1px solid var(--line2); background: #000; }
.stage.shot img { width: 100%; height: 100%; object-fit: cover; }
.stage.quote { max-width: 760px; margin: 0; padding: 22px 26px; font-size: 18px; line-height: 1.7; border-left: 3px solid var(--accent2);
  background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; }
.redact { background: var(--text); color: var(--text); border-radius: 3px; padding: 0 2px; letter-spacing: -.1em; user-select: none; }

.ask { max-width: 620px; margin: 0 auto; }
.m-classic .ask, .m-ammo .ask { margin: 0; }
.search { position: relative; }
.search input { width: 100%; font: inherit; font-size: 17px; padding: 15px 18px; border-radius: 12px; color: var(--text); outline: none;
  background: var(--bg2); border: 1px solid var(--line2); transition: .15s; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(242,180,90,.13); }
.suggest { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 5px; list-style: none; max-height: 420px; overflow: auto;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); }
.suggest li { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.suggest li.on, .suggest li:hover { background: rgba(185,140,240,.14); }
.sg-img { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.05); overflow: hidden; }
.sg-img img { width: 40px; height: 40px; object-fit: contain; }
.sg-txt { display: flex; flex-direction: column; min-width: 0; }
.sg-txt b { font-weight: 600; }
.sg-txt small { color: var(--muted); font-size: 12px; }
.ask-q { text-align: center; font-weight: 600; margin: 0 0 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.choice { font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 10px; cursor: pointer; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid var(--line2); }
.choice:hover:not(:disabled) { border-color: var(--accent); }
.choice.ok { background: var(--ok); border-color: var(--ok); }
.choice.no { background: var(--no); border-color: var(--no); opacity: .8; }

.hints { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 14px 0 6px; }
.m-classic .hints, .m-ammo .hints { justify-content: flex-start; }
.hint { font-size: 13px; color: var(--muted); border: 1px dashed var(--line2); border-radius: 30px; padding: 5px 14px; display: inline-flex; align-items: center; gap: 6px; }
.hint.open { color: var(--text); border: 1px solid rgba(242,180,90,.55); background: rgba(242,180,90,.08); }
.hint.open b { color: var(--accent); font-weight: 600; }
.mini-sil img { height: 34px; vertical-align: middle; filter: brightness(0) drop-shadow(0 0 4px rgba(242,180,90,.8)); }

.res { display: flex; gap: 20px; align-items: center; padding: 18px 22px; margin: 16px auto; max-width: 860px; animation: rise .5s both; }
.res.won { background: linear-gradient(110deg, rgba(46,158,120,.28), rgba(185,140,240,.14)); border-color: rgba(46,158,120,.55); }
.res.lost { background: linear-gradient(110deg, rgba(156,59,85,.28), rgba(185,140,240,.1)); border-color: rgba(156,59,85,.5); }
.res-img { width: 120px; height: 120px; flex: none; display: grid; place-items: center; }
.res-img img { max-width: 100%; max-height: 100%; filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); }
.res h2 { font-size: 22px; margin: 4px 0 12px; }
.res-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.tablewrap { overflow-x: auto; margin-top: 14px; }
.grid { border-collapse: separate; border-spacing: 5px; min-width: 900px; width: 100%; }
.grid th { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 4px 4px; border-bottom: 1px solid var(--line2); }
.grid td { text-align: center; padding: 8px 6px; min-width: 88px; height: 62px; border-radius: 9px; font-size: 13px; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.grid td.name { text-align: left; background: var(--card); min-width: 220px; display: flex; align-items: center; gap: 10px; height: 62px; }
.grid td.name img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.grid td.name span { display: flex; flex-direction: column; min-width: 0; }
.grid td.name small { color: var(--muted); font-weight: 400; font-size: 11px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.grid td.name.ok { box-shadow: inset 0 0 0 2px var(--ok); }
.grid td.ok { background: linear-gradient(160deg, #35b088, #278a69); }
.grid td.near { background: linear-gradient(160deg, #d8a737, #b5871f); color: #1c1305; }
.grid td.no { background: linear-gradient(160deg, #a94360, #8a3049); }
tr.new td:not(.name) { animation: flip .5s both; animation-delay: calc(var(--d) * 120ms); }
@keyframes flip { from { transform: rotateX(90deg); opacity: 0; } to { transform: none; opacity: 1; } }

.tries { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 860px; margin: 14px auto 0; }
.try { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 30px; font-size: 13px; font-weight: 600; }
.try img { width: 30px; height: 30px; object-fit: contain; background: rgba(0,0,0,.2); border-radius: 50%; }
.try.no { background: rgba(156,59,85,.3); border: 1px solid rgba(156,59,85,.6); }
.try.ok { background: rgba(46,158,120,.35); border: 1px solid var(--ok); }
.try.new { animation: rise .35s both; }

.rules { margin: 26px auto 0; max-width: 860px; padding: 12px 18px; color: var(--muted); font-size: 14px; }
.rules summary { cursor: pointer; color: var(--text); font-weight: 600; }
.rules ul { padding-left: 18px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 4px; }
.sw.ok { background: var(--ok); } .sw.near { background: var(--near); } .sw.no { background: var(--no); }
.soon { max-width: 640px; margin: 20px auto; padding: 26px; text-align: center; }
.soon p { color: var(--muted); }

/* ---------- дороже/дешевле ---------- */
.score { display: flex; gap: 24px; }
.score div { display: flex; flex-direction: column; align-items: flex-end; }
.score .lbl { font-size: 12px; color: var(--muted); }
.score b { font-family: Unbounded, sans-serif; font-size: 22px; color: var(--accent); }
.hl-arena { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; margin-top: 10px; }
.hl-vs { align-self: center; font-family: Unbounded; color: var(--muted); font-size: 18px; }
.hl-card { border-radius: 20px; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; min-height: 420px;
  background: radial-gradient(circle at 50% 35%, rgba(185,140,240,.2), transparent 60%), var(--card); border: 1px solid var(--line2); transition: .3s; }
.hl-img { height: 210px; width: 100%; display: grid; place-items: center; }
.hl-img img { max-height: 200px; max-width: 85%; filter: drop-shadow(0 12px 18px rgba(0,0,0,.6)); }
.hl-name { font-weight: 700; font-size: 17px; min-height: 2.6em; }
.hl-price { font-family: Unbounded; font-size: 28px; color: var(--accent); }
.hl-btns { display: flex; gap: 10px; }
.hl-card.good { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(46,158,120,.4), var(--shadow); }
.hl-card.bad { border-color: var(--no); box-shadow: 0 0 0 3px rgba(156,59,85,.45), var(--shadow); animation: shake .4s; }
.hl-card.enter { animation: rise .4s both; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- схрон ---------- */
.stash-layout { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.board-wrap { position: relative; }
.board-st { display: grid; grid-template-columns: repeat(10, var(--cell)); grid-template-rows: repeat(10, var(--cell));
  width: calc(var(--cell) * 10 + 2px); height: calc(var(--cell) * 10 + 2px); border: 1px solid var(--line2); border-radius: 10px; cursor: crosshair;
  background-color: rgba(10, 8, 15, .7);
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: var(--cell) var(--cell); touch-action: manipulation; user-select: none; box-shadow: var(--shadow); }
.piece { --c: #4b4560; position: relative; margin: 2px; border-radius: 7px; overflow: hidden; pointer-events: none;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 55%, #000 45%), color-mix(in srgb, var(--c) 35%, #000 65%));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 70%, white 20%), 0 3px 8px rgba(0,0,0,.4); }
.piece img { position: absolute; left: 50%; top: 50%; width: calc(var(--iw) * 100% / var(--w)); height: calc(var(--ih) * 100% / var(--h));
  object-fit: contain; transform: translate(-50%, -50%); filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
/* Повёрнутая фигура: коробка картинки остаётся в исходных пропорциях, поворачиваем её саму. */
.piece img.rot { transform: translate(-50%, -50%) rotate(90deg); }
.piece b { position: absolute; right: 4px; bottom: 2px; font-size: 9px; font-weight: 800; text-shadow: 0 1px 2px #000; max-width: 92%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.piece.sold { animation: sold .55s forwards; z-index: 3; }
@keyframes sold { 0% { filter: brightness(2.2); } 100% { opacity: 0; transform: scale(.6) translateY(-20px); } }
.piece[data-k="weapons"] { --c: #8c66d6; } .piece[data-k="gear"] { --c: #4f8bbf; } .piece[data-k="medication"] { --c: #d65a7a; }
.piece[data-k="provisions"] { --c: #6fb357; } .piece[data-k="barter-items"] { --c: #c4924a; } .piece[data-k="special-equipment"] { --c: #42b3a9; }
.piece[data-k="weapon-parts-mods"] { --c: #7279b8; } .piece[data-k="ammo"] { --c: #d07a3a; } .piece[data-k="keys"] { --c: #c7b048; } .piece[data-k="money"] { --c: #5fbf7b; }
.ghost-piece { margin: 2px; border-radius: 7px; pointer-events: none; z-index: 4; }
.ghost-piece.can { background: rgba(242,180,90,.22); box-shadow: inset 0 0 0 2px var(--accent); }
.ghost-piece.cant { background: rgba(156,59,85,.3); box-shadow: inset 0 0 0 2px var(--no); }
.over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(15,12,22,.86); border-radius: 10px; font-family: Unbounded; text-align: center; padding: 20px; }
.side { flex: 1; min-width: 280px; max-width: 440px; display: flex; flex-direction: column; gap: 12px; }
.side h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.queue { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 10px; min-height: 170px; cursor: pointer;
  font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line2); border-radius: 12px; }
.slot.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,180,90,.2); }
.slot .num { position: absolute; top: 5px; left: 9px; font-size: 11px; color: var(--muted); }
.slot-fig { flex: 1; display: grid; place-items: center; }
.slot .piece { --cell: 22px; width: calc(var(--w) * 22px); height: calc(var(--h) * 22px); margin: 0; }
.slot .piece b { display: none; }
.slot .qname { font-size: 11px; color: var(--muted); line-height: 1.2; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slot .qprice { font-size: 12px; font-weight: 700; color: var(--accent); }
.sbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.log p { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.log p.fresh { color: var(--accent); font-weight: 700; animation: rise .4s both; }

/* ---------- стримерам ---------- */
.st-layout { display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 22px; align-items: start; }
.st-form { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.fld input { font: inherit; font-size: 15px; color: var(--text); background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; outline: none; }
.fld input:focus { border-color: var(--accent); }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.opts { display: grid; gap: 8px; }
.opts.four { grid-template-columns: repeat(4, 1fr); } .opts.three { grid-template-columns: repeat(3, 1fr); }
.opts.five { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbox { padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line2); cursor: pointer; font-size: 13px; color: var(--muted); }
.chipbox input { position: absolute; opacity: 0; pointer-events: none; }
.chipbox.on { color: var(--text); border-color: var(--accent); background: rgba(242,180,90,.09); }
.opt { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line2); cursor: pointer; background: rgba(255,255,255,.03); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: flex; flex-direction: column; }
.opt small { color: var(--muted); font-size: 12px; }
.opt.on { border-color: var(--accent); background: rgba(242,180,90,.09); }
.opt .ico { color: var(--accent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.url { display: flex; gap: 8px; }
.url input { flex: 1; min-width: 0; font-size: 12px; }
.cmds { color: var(--muted); font-size: 14px; }
.cmds summary { cursor: pointer; color: var(--text); font-weight: 600; }
.st-preview { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 76px; }
.st-ph { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.chk { color: var(--muted); display: flex; gap: 6px; align-items: center; cursor: pointer; }
.st-frame { border-radius: 14px; overflow: hidden; border: 1px dashed var(--line2);
  background: repeating-conic-gradient(#1a1622 0 25%, #14111b 0 50%) 0 0 / 22px 22px; height: 560px; }
.st-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.st-test { padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.st-row { display: flex; gap: 6px; }
.st-row select, .st-row input { font: inherit; font-size: 13px; color: var(--text); background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; padding: 7px 8px; }
.st-row input { flex: 1; min-width: 0; }
.st-quick { display: flex; flex-wrap: wrap; gap: 6px; }

.foot { max-width: 1180px; margin: 40px auto 0; padding: 18px 20px 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.foot p { margin: 4px 0; }

@media (max-width: 980px) {
  .st-layout { grid-template-columns: 1fr; }
  .st-preview { position: static; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { height: 220px; }
}
@media (max-width: 680px) {
  .top { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  main { padding: 18px 16px 10px; }
  .cards.two { grid-template-columns: 1fr; }
  .mcard.wide { flex-direction: column; }
  .mcard.wide .art { width: 100%; min-height: 140px; }
  .stream-banner { grid-template-columns: 1fr; }
  .hl-arena { grid-template-columns: 1fr; }
  .hl-vs { justify-self: center; }
  .hl-card { min-height: 0; }
  .opts.four { grid-template-columns: 1fr 1fr; }
  .res { flex-direction: column; text-align: center; }
  .res-btns { justify-content: center; }
}

/* ---------- баннер бесконечной ---------- */
.endless-banner { display: grid; grid-template-columns: 280px 1fr auto; gap: 24px; align-items: center; margin: 4px 0 8px; padding: 18px 24px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(242,180,90,.16), rgba(185,140,240,.18)); border: 1px solid rgba(242,180,90,.4); transition: .2s; }
.endless-banner:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.eb-art { position: relative; height: 130px; }
.eb { position: absolute; display: grid; place-items: center; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); background: rgba(0,0,0,.25); }
.eb img { width: 100%; height: 100%; object-fit: contain; }
.eb.s { left: 0; top: 10px; width: 120px; height: 110px; } .eb.s img { filter: brightness(0) drop-shadow(0 0 8px rgba(242,180,90,.7)); }
.eb.b { left: 80px; top: 0; width: 100px; height: 100px; } .eb.b img { filter: blur(6px); }
.eb.p { left: 160px; top: 22px; width: 90px; height: 108px; } .eb.p img { object-fit: cover; }
.eb.c { left: 220px; top: 4px; width: 60px; height: 60px; }
.eb-txt b { display: block; font-family: Unbounded; font-size: 22px; margin: 4px 0 6px; }
.eb-txt p { margin: 0 0 8px; color: var(--muted); }
.eb-txt .kicker { display: flex; gap: 6px; align-items: center; }

/* ---------- бесконечная викторина ---------- */
.en-lobby { max-width: 860px; margin: 0 auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.en-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.en-cat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); cursor: pointer; background: rgba(255,255,255,.03); }
.en-cat input { position: absolute; opacity: 0; pointer-events: none; }
.en-cat small { color: var(--muted); font-size: 12px; }
.en-cat.on { border-color: var(--accent); background: rgba(242,180,90,.09); }
.en-cat.on b::before { content: "✓ "; color: var(--accent); }
.en-opts { display: flex; gap: 20px; flex-wrap: wrap; }
.small { font-size: 13px; }
.en-hud { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; max-width: 900px; margin: 0 auto 12px; }
.en-h { display: flex; gap: 8px; align-items: center; color: var(--accent); }
.en-h b { color: var(--text); font-family: Unbounded; font-weight: 600; }
.en-hs { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.en-hs b { color: var(--accent); font-family: Unbounded; }
.hearts { font-size: 20px; color: #ff6f91; letter-spacing: 2px; }
.heart.lost { color: rgba(255,255,255,.15); }
.qcard { position: relative; max-width: 900px; margin: 0 auto; padding: 22px 24px 20px; display: flex; flex-direction: column; gap: 14px; align-items: center; overflow: hidden; }
.qcat { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent2); }
.qtime { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: rgba(255,255,255,.06); }
.qtime i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .1s linear; }
.qp { font-size: clamp(18px, 2.4vw, 24px); text-align: center; line-height: 1.3; }
.qm { width: min(320px, 80vw); aspect-ratio: 1; border-radius: 18px; overflow: hidden; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 55%, rgba(242,180,90,.18), rgba(185,140,240,.1) 45%, rgba(0,0,0,.2) 75%); border: 1px solid var(--line2); }
.qm img { width: 84%; height: 84%; object-fit: contain; transition: filter .7s, transform .7s; }
.qm-sil img { filter: brightness(0) drop-shadow(0 0 14px rgba(242,180,90,.55)); }
.qm-blur img { filter: blur(14px) saturate(1.2); transform: scale(1.05); }
.qm-sil.reveal img, .qm-blur.reveal img { filter: drop-shadow(0 10px 16px rgba(0,0,0,.6)); transform: none; }
.qm-zoom .zin { position: absolute; inset: 0; display: grid; place-items: center; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.qm-img { width: min(240px, 70vw); }
.qm-ach { width: min(200px, 60vw); }
.qm-ach img { width: 80%; height: 80%; filter: blur(9px); }
.qm-ach.clear img, .qm-ach.reveal img { filter: none; }
.qm-portrait { width: min(240px, 66vw); aspect-ratio: 3/4; }
.qm-portrait img { width: 100%; height: 100%; object-fit: cover; filter: blur(7px) grayscale(.4); }
.qm-portrait.clear img, .qm-portrait.reveal img { filter: none; }
.qm-quote { width: auto; max-width: 760px; aspect-ratio: auto; display: block; margin: 0; padding: 18px 22px; font-size: 17px; line-height: 1.65; text-align: left;
  background: var(--card); border: 0; border-left: 3px solid var(--accent2); border-radius: 0 var(--radius) var(--radius) 0; }
.qopts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qopts.imgs { grid-template-columns: repeat(4, 1fr); }
.qopt { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 40px; min-height: 60px; text-align: left; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 15px; color: var(--text); background: rgba(255,255,255,.04); border: 1px solid var(--line2); border-radius: 12px; transition: .15s; }
.qopt:hover:not(:disabled) { border-color: var(--accent); background: rgba(242,180,90,.08); transform: translateY(-1px); }
.qopt img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.qopt.big { flex-direction: column; justify-content: center; padding: 14px 10px 10px; text-align: center; }
.qopt.big img { width: 100%; height: 120px; }
.qk { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  font-size: 12px; color: var(--muted); border: 1px solid var(--line2); }
.qopt.big .qk { top: 14px; transform: none; }
.qopt.ok { background: linear-gradient(160deg, #35b088, #278a69); border-color: transparent; }
.qopt.no { background: linear-gradient(160deg, #a94360, #8a3049); border-color: transparent; animation: shake .35s; }
.qopt.dim { opacity: .45; }
.qopt:disabled { cursor: default; }
.ql.small { font-size: 12px; font-weight: 500; }
.qres { width: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; font-weight: 700; padding: 10px; border-radius: 10px; animation: rise .3s both; }
.qres span { font-weight: 500; color: var(--muted); }
.qres.ok { background: rgba(46,158,120,.18); color: #7ee2bd; }
.qres.no { background: rgba(156,59,85,.2); color: #f1a0b4; }
.en-over { max-width: 900px; }
.en-stat { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.en-stat b { color: var(--text); }

/* ---------- тетрис ---------- */
.m-tetris { --tc: clamp(18px, min(3.6vh, 6.2vw), 32px); }
.t-layout { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.t-wrap { position: relative; }
.t-board { display: grid; grid-template-columns: repeat(10, var(--tc)); grid-template-rows: repeat(20, var(--tc)); padding: 3px; border-radius: 10px;
  background: rgba(10,8,15,.75); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.t-board.flash { box-shadow: 0 0 0 3px rgba(242,180,90,.6), var(--shadow); }
.tc { --c: #4b4560; position: relative; width: var(--tc); height: var(--tc); overflow: hidden; box-sizing: border-box;
  background: color-mix(in srgb, var(--c) 40%, #0c0a12 60%); }
.tc i { position: absolute; inset: 0; background-repeat: no-repeat; }
.tc.e { background: none; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.04); }
.tc.e0 { background: none; }
.tc.gh { background: rgba(242,180,90,.1); box-shadow: inset 0 0 0 1px rgba(242,180,90,.35); }
/* Рамка только по краю предмета: обводка рисуется тенью внутрь, чтобы не съедать картинку. */
.tc.bt { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--c) 70%, white 30%); }
.tc.bl { box-shadow: inset 1px 0 0 color-mix(in srgb, var(--c) 70%, white 30%); }
.tc.bt.bl { box-shadow: inset 1px 1px 0 color-mix(in srgb, var(--c) 70%, white 30%); }
.tc.bb::after, .tc.br::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.tc.bb::after { border-bottom: 1px solid rgba(0,0,0,.65); }
.tc.br::after { border-right: 1px solid rgba(0,0,0,.65); }
.tc.bb.br::after { border-bottom: 1px solid rgba(0,0,0,.65); border-right: 1px solid rgba(0,0,0,.65); }
.tc.act { filter: brightness(1.15); }
.tc[data-k="weapons"] { --c: #8c66d6; } .tc[data-k="gear"] { --c: #4f8bbf; } .tc[data-k="medication"] { --c: #d65a7a; }
.tc[data-k="provisions"] { --c: #6fb357; } .tc[data-k="barter-items"] { --c: #c4924a; } .tc[data-k="special-equipment"] { --c: #42b3a9; }
.tc[data-k="weapon-parts-mods"] { --c: #7279b8; } .tc[data-k="ammo"] { --c: #d07a3a; } .tc[data-k="keys"] { --c: #c7b048; } .tc[data-k="money"] { --c: #5fbf7b; }
.t-next { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.t-mini { --tc: 18px; display: grid; padding: 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--line2); }
.t-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 320px; }
.t-pad .btn { justify-content: center; font-size: 18px; }

/* ---------- схрон: подсветка проданной линии ---------- */
.line-flash { z-index: 5; pointer-events: none; border-radius: 6px; background: rgba(242,180,90,.35); box-shadow: 0 0 18px rgba(242,180,90,.8); animation: lineflash .9s forwards; }
@keyframes lineflash { 0% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 680px) {
  .m-tetris { --tc: clamp(16px, min(2.9vh, 6.6vw), 26px); }
  .m-tetris .mode-top .sub, .m-tetris .mode-title .ico { display: none; }
  .m-tetris .mode-top { margin-bottom: 8px; }
  .t-board { touch-action: none; }
  .endless-banner { grid-template-columns: 1fr; }
  .eb-art { height: 120px; }
  .qopts, .qopts.imgs { grid-template-columns: 1fr 1fr; }
}

/* ---------- «Оружейка»: три в ряд ----------
   Фишки двигаются через transform (translate по клеткам), а «пружинки» — через отдельные
   свойства scale/rotate: они складываются с transform и не сбивают позицию. */
.m-match3 { --m3: clamp(38px, min(10.6vw, 8.2vh), 70px); }
.m3-layout { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.m3-col { display: flex; flex-direction: column; gap: 10px; }
.m3-mapbar { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); width: calc(var(--m3) * 8); }
.m3-map { font-weight: 700; color: var(--text); white-space: nowrap; }
.m3-goal { flex: 1; height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.m3-goal i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .4s; }
.m3-goaltxt { white-space: nowrap; }
.m3-wrap { position: relative; width: calc(var(--m3) * 8); height: calc(var(--m3) * 8); }
.m3-wrap.shake { animation: shake .4s; }
.m3-board { position: absolute; inset: 0; border-radius: 16px; overflow: hidden; touch-action: none; user-select: none; border: 1px solid var(--line2); box-shadow: var(--shadow);
  background-color: rgba(10,8,15,.78);
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: var(--m3) var(--m3); }
.m3t { --c: #555; position: absolute; left: 0; top: 0; width: var(--m3); height: var(--m3); cursor: pointer;
  transform: translate(calc(var(--x) * var(--m3)), calc(var(--y) * var(--m3)));
  transition: transform .27s cubic-bezier(.3, 1.3, .55, 1); }
.m3t::before { content: ""; position: absolute; inset: 4px; border-radius: 13px; transition: box-shadow .15s, scale .15s;
  background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--c) 78%, white 22%), color-mix(in srgb, var(--c) 42%, #000 58%));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), inset 0 -4px 8px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.45); }
.m3t img { position: absolute; left: 10px; top: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.75)); }
.m3t img.ov { left: auto; top: auto; right: 3px; bottom: 3px; width: 46%; height: 46%; filter: drop-shadow(0 0 4px rgba(255,120,40,.9)); }
.ty0 { --c: #e08a3c; } .ty1 { --c: #8c66d6; } .ty2 { --c: #33b0a5; } .ty3 { --c: #d65a7a; } .ty4 { --c: #6fb357; } .ty5 { --c: #4f8bbf; }
.m3t.sel::before { scale: 1.08; box-shadow: 0 0 0 3px var(--accent), 0 0 20px rgba(242,180,90,.75); }
.m3t.hint { animation: m3wiggle .7s ease-in-out infinite; }
.m3t.nope { animation: m3nope .26s; }
.m3t.pop { animation: m3pop .32s forwards; z-index: 3; }
.m3t.born { animation: m3born .45s; }
/* пулемётная лента: светящаяся полоса через фишку */
.m3t.sp-h::after, .m3t.sp-v::after { content: ""; position: absolute; border-radius: 4px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,236,170,.95), transparent); box-shadow: 0 0 10px rgba(255,220,120,.9); animation: m3glow 1s ease-in-out infinite; }
.m3t.sp-h::after { left: 2px; right: 2px; top: calc(50% - 3px); height: 6px; }
.m3t.sp-v::after { top: 2px; bottom: 2px; left: calc(50% - 3px); width: 6px; background: linear-gradient(180deg, transparent, rgba(255,236,170,.95), transparent); }
.m3t.sp-bomb::before { box-shadow: inset 0 0 0 2px rgba(255,140,60,.9), 0 0 14px rgba(255,120,40,.6); }
.m3t.sp-btc::before { background: conic-gradient(from 0deg, #f7c56b, #d9a3ff, #6fd3c8, #f7c56b); animation: m3spin 3s linear infinite; }
.m3t.sp-btc img { left: 7px; top: 7px; width: calc(100% - 14px); height: calc(100% - 14px); }
@keyframes m3pop { 40% { scale: 1.28; } 100% { scale: 0; rotate: 30deg; opacity: 0; } }
@keyframes m3born { 0% { scale: 0; } 60% { scale: 1.22; } 100% { scale: 1; } }
@keyframes m3wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -8deg; } 75% { rotate: 8deg; } }
@keyframes m3nope { 50% { scale: .86; } }
@keyframes m3glow { 50% { opacity: .55; } }
@keyframes m3spin { to { rotate: 360deg; } }

.m3-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 16px; z-index: 4; }
.m3-beam { position: absolute; animation: m3beam .55s forwards; }
.m3-beam.h { left: 0; right: 0; top: calc(var(--i) * var(--m3)); height: var(--m3); background: linear-gradient(90deg, transparent, rgba(255,236,170,.95) 30%, #fff 50%, rgba(255,236,170,.95) 70%, transparent); }
.m3-beam.v { top: 0; bottom: 0; left: calc(var(--i) * var(--m3)); width: var(--m3); background: linear-gradient(180deg, transparent, rgba(255,236,170,.95) 30%, #fff 50%, rgba(255,236,170,.95) 70%, transparent); }
@keyframes m3beam { 0% { opacity: 0; scale: 1 .2; } 30% { opacity: 1; scale: 1 1; } 100% { opacity: 0; scale: 1 .4; } }
.m3-burst { position: absolute; left: calc((var(--x) + .5) * var(--m3)); top: calc((var(--y) + .5) * var(--m3)); width: calc(var(--m3) * 3.4); height: calc(var(--m3) * 3.4);
  translate: -50% -50%; border-radius: 50%; animation: m3burst .65s forwards;
  background: radial-gradient(circle, #fff 0%, rgba(255,220,140,.95) 18%, rgba(255,120,40,.7) 42%, transparent 70%); }
.m3-burst.gold { background: radial-gradient(circle, #fff, rgba(247,197,107,.9) 25%, rgba(217,163,255,.6) 50%, transparent 72%); width: calc(var(--m3) * 6); height: calc(var(--m3) * 6); }
.m3-burst.sniper { width: var(--m3); height: var(--m3); background: radial-gradient(circle, rgba(255,60,60,.9) 0 10%, transparent 12% 40%, rgba(255,60,60,.8) 42% 46%, transparent 48%); }
@keyframes m3burst { 0% { scale: .1; opacity: 1; } 100% { scale: 1; opacity: 0; } }
.m3-pop { position: absolute; left: calc((var(--x) + .5) * var(--m3)); top: calc((var(--y) + .5) * var(--m3)); translate: -50% -50%; white-space: nowrap;
  font-family: Unbounded, sans-serif; font-weight: 700; font-size: 18px; color: var(--accent); text-shadow: 0 2px 6px #000, 0 0 12px rgba(242,180,90,.6); animation: m3float 1.1s forwards; }
@keyframes m3float { 0% { opacity: 0; scale: .6; } 15% { opacity: 1; scale: 1.15; } 100% { opacity: 0; translate: -50% -160%; } }
.m3-banner { position: absolute; left: 50%; top: 42%; translate: -50% -50%; white-space: nowrap; font-family: Unbounded, sans-serif; font-weight: 700; font-size: clamp(26px, 5vw, 44px);
  background: linear-gradient(90deg, #ffe2a6, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.9)); animation: m3banner 1.2s forwards; }
@keyframes m3banner { 0% { scale: .3; opacity: 0; rotate: -8deg; } 20% { scale: 1.15; opacity: 1; rotate: 2deg; } 70% { scale: 1; opacity: 1; } 100% { opacity: 0; translate: -50% -90%; } }
.m3-boss { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(10,8,15,.6); border-radius: 16px; overflow: hidden; transition: background .3s; }
.m3-boss.out { background: transparent; }
.m3-bc { display: flex; gap: 16px; align-items: center; max-width: 92%; padding: 16px 18px; border-radius: 16px; translate: 130% 0;
  background: linear-gradient(120deg, rgba(70,20,30,.96), rgba(40,22,64,.96)); border: 1px solid var(--accent); box-shadow: 0 0 40px rgba(255,90,60,.35), var(--shadow);
  transition: translate .5s cubic-bezier(.2, 1.25, .4, 1); }
.m3-boss.in .m3-bc { translate: 0 0; }
.m3-boss.out .m3-bc { translate: -150% 0; transition-duration: .35s; transition-timing-function: ease-in; }
.m3-bc img { width: 110px; height: 140px; object-fit: cover; border-radius: 10px; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
.m3-bc b { display: block; font-family: Unbounded, sans-serif; font-size: 22px; margin: 4px 0 6px; }
.m3-bc p { margin: 0; color: #f3d9b0; }
.m3-meter { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.m3-mh { display: flex; justify-content: space-between; font-size: 14px; }
.m3-mh span { color: var(--muted); }
.m3-mbar { height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.m3-mbar i { display: block; height: 100%; background: linear-gradient(90deg, #ff6f61, #f7c56b); transition: width .4s; box-shadow: 0 0 10px rgba(255,111,97,.7); }
.m3-meter p { margin: 0; }
.m3-legend { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.m3-legend div { display: flex; gap: 10px; align-items: center; }
.lg { --c: #8c66d6; position: relative; width: 40px; height: 40px; flex: none; border-radius: 10px;
  background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--c) 78%, white 22%), color-mix(in srgb, var(--c) 42%, #000 58%)); }
.lg img { position: absolute; inset: 5px; width: 30px; height: 30px; object-fit: contain; }
.lg img.ov { inset: auto 1px 1px auto; width: 20px; height: 20px; }
.lg.sp-h { --c: #e08a3c; } .lg.sp-h::after { content: ""; position: absolute; left: 2px; right: 2px; top: 17px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, transparent, #ffeaa8, transparent); }
.lg.sp-bomb { --c: #8c66d6; }
.lg.sp-btc { background: conic-gradient(#f7c56b, #d9a3ff, #6fd3c8, #f7c56b); }
@media (max-width: 680px) {
  .m-match3 { --m3: calc((100vw - 34px) / 8); }
  .m-match3 .mode-top .sub, .m-match3 .mode-title .ico { display: none; }
  .m3-bc img { width: 80px; height: 100px; }
  .m3-bc b { font-size: 17px; }
}
