/* CUBE STRIKE — дизайн-токены */
:root {
  --font-display: 'Russo One', 'Chakra Petch', sans-serif;
  --font-body: 'Chakra Petch', sans-serif;
  --color-bg: #0d1016;
  --color-surface: rgba(14, 17, 23, 0.78);
  --color-surface-2: rgba(30, 36, 47, 0.88);
  --color-border: rgba(255, 255, 255, 0.12);
  --color-text: #eef1f5;
  --color-text-muted: #8f9aab;
  --color-accent: #f5a623;
  --color-red: #ff4f5e;
  --color-blue: #4fa3ff;
  --panel-radius: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-ui: 180ms var(--ease);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: var(--color-bg); }
body { font-family: var(--font-body); color: var(--color-text); -webkit-font-smoothing: antialiased; }
img { image-rendering: auto; }

#game-container, #game-container canvas { position: fixed; inset: 0; display: block; }
#game-container canvas { position: absolute; width: 100%; height: 100%; }

/* ---------- Экраны ---------- */
.screen {
  position: fixed; inset: 0; z-index: 20;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, rgba(20,26,38,.35), rgba(8,10,14,.82));
  backdrop-filter: blur(2px);
}
.screen.active { display: flex; animation: screen-in 260ms var(--ease); }
.screen.translucent { background: rgba(8, 10, 14, 0.55); backdrop-filter: blur(4px); }
.screen.hidden { display: none !important; }
@keyframes screen-in { from { opacity: 0; } to { opacity: 1; } }

.menu-panel {
  display: flex; flex-direction: column; gap: 12px; align-items: stretch;
  width: min(420px, 92vw); padding: 28px;
  background: linear-gradient(180deg, rgba(24,29,38,.86), rgba(12,15,20,.9));
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border); border-radius: var(--panel-radius);
  box-shadow: 0 24px 70px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
  max-height: 94vh; overflow-y: auto;
  animation: panel-in 320ms var(--ease);
}
.menu-panel.wide { width: min(860px, 95vw); }
@keyframes panel-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- Кнопки ---------- */
.btn {
  font-family: var(--font-body); font-weight: 700; font-size: 15px; letter-spacing: .3px;
  padding: 12px 16px; border-radius: 8px; cursor: pointer;
  background: var(--color-surface-2); color: var(--color-text);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-ui), background var(--transition-ui), border-color var(--transition-ui), box-shadow var(--transition-ui);
}
.btn:hover { background: rgba(52, 61, 76, .95); border-color: rgba(255,255,255,.3); transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(180deg, #ffbe3d, #f09a12); color: #1a1204; border-color: transparent;
  box-shadow: 0 4px 0 #9a5d00, 0 8px 24px rgba(245,166,35,.25);
}
.btn-primary:hover { background: linear-gradient(180deg, #ffcb5c, #f5a623); box-shadow: 0 4px 0 #9a5d00, 0 10px 30px rgba(245,166,35,.4); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #9a5d00; }
.btn-danger { background: rgba(255,79,94,.14); border-color: rgba(255,79,94,.5); color: #ff9aa3; }
.btn-small { font-size: 13px; padding: 8px 14px; }
.btn-ghost { background: transparent; }
.btn.disabled { filter: grayscale(.8) brightness(.7); }

/* ---------- 3D-превью ---------- */
.preview-box {
  position: relative; border-radius: 10px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, rgba(80,110,160,.35), rgba(10,12,18,.6) 70%);
  border: 1px solid var(--color-border);
}
.preview-box::after {
  content: ''; position: absolute; left: 10%; right: 10%; bottom: 18%; height: 10px;
  background: radial-gradient(ellipse, rgba(0,0,0,.5), transparent 70%);
}
.preview-host { width: 100%; aspect-ratio: 2 / 1; }
.preview-canvas { width: 100%; height: 100%; display: block; position: relative; z-index: 1; }
.preview-caption { position: absolute; left: 12px; bottom: 10px; z-index: 2; font-weight: 700; font-size: 13px; text-shadow: 0 1px 4px #000; }
.inv-preview { max-width: 520px; }

/* ---------- Снаряжение ---------- */
.loadout-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 14px; align-items: start; }
@media (max-width: 720px) { .loadout-grid { grid-template-columns: 1fr; } }
.loadout-list { display: flex; flex-direction: column; gap: 8px; }
.loadout-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--color-surface-2); border: 2px solid var(--color-border); border-radius: 10px;
  cursor: pointer; transition: border-color var(--transition-ui), transform var(--transition-ui), background var(--transition-ui);
}
.loadout-item:hover { border-color: rgba(255,255,255,.35); transform: translateX(3px); }
.loadout-item.selected { border-color: var(--color-accent); background: linear-gradient(90deg, rgba(245,166,35,.14), rgba(245,166,35,.02)); }
.loadout-item .w-icon { width: 92px; height: 46px; object-fit: contain; flex: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
.loadout-item .w-info { flex: 1; min-width: 0; }
.loadout-item .w-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-bars { display: grid; gap: 3px; margin-top: 5px; }
.w-bars .bar { display: grid; grid-template-columns: 110px 1fr; align-items: center; font-size: 11px; color: var(--color-text-muted); }
.w-bars .bar i { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); position: relative; overflow: hidden; }
.w-bars .bar i::after { content: ''; position: absolute; inset: 0; width: calc(var(--v) * 100%); background: linear-gradient(90deg, #f5a623, #ffd27a); border-radius: 3px; }
.loadout-item .w-check { font-size: 16px; color: var(--color-accent); visibility: hidden; }
.loadout-item.selected .w-check { visibility: visible; }

/* ---------- Кейсы ---------- */
.case-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 12px; }
.case-list.shake { animation: shake 300ms; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.case-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cc) 16%, transparent), var(--color-surface-2) 60%);
  border: 1px solid color-mix(in srgb, var(--cc) 45%, transparent); border-radius: 12px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease);
}
.case-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px color-mix(in srgb, var(--cc) 30%, transparent); }
.case-img-wrap { height: 120px; display: flex; align-items: center; justify-content: center; }
.case-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0,0,0,.55)); animation: float 3.2s ease-in-out infinite; }
.case-card:nth-child(2) .case-img { animation-delay: -.8s; }
.case-card:nth-child(3) .case-img { animation-delay: -1.6s; }
.case-card:nth-child(4) .case-img { animation-delay: -2.4s; }
.case-card:hover .case-img { animation: wobble 600ms var(--ease); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes wobble { 0% { transform: rotate(0); } 30% { transform: rotate(-5deg) scale(1.06); } 60% { transform: rotate(4deg) scale(1.06); } 100% { transform: rotate(0) scale(1.04); } }
.case-card .c-name { font-weight: 700; font-size: 15px; }
.case-card .c-odds { font-size: 11px; color: var(--color-text-muted); display: flex; flex-wrap: wrap; gap: 2px 10px; }

/* Открытие кейса */
.case-open-panel { position: relative; overflow: hidden; align-items: center; }
.case-open-panel > * { width: 100%; }
.case-open-img { width: 150px !important; height: 100px; object-fit: contain; align-self: center; filter: drop-shadow(0 8px 16px rgba(0,0,0,.6)); }
.case-open-img.burst { animation: case-burst 700ms var(--ease); }
@keyframes case-burst { 0% { transform: scale(.6) rotate(-8deg); opacity: 0; } 50% { transform: scale(1.15) rotate(4deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
#case-open-title { text-align: center; }
.case-reel-window {
  position: relative; height: 150px; overflow: hidden; border-radius: 10px;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.25));
  border: 1px solid var(--color-border);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.case-reel { position: absolute; top: 12px; left: 0; display: flex; gap: 10px; will-change: transform; }
.reel-item {
  flex: none; width: 140px; height: 124px; border-radius: 8px; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 6px;
  background: linear-gradient(180deg, #252d39, color-mix(in srgb, var(--rc) 22%, #1b212b));
  border-bottom: 4px solid var(--rc);
  box-shadow: inset 0 -30px 40px -20px color-mix(in srgb, var(--rc) 45%, transparent);
}
.reel-item img { position: absolute; top: 8px; left: 6px; right: 6px; width: calc(100% - 12px); height: 64px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0,0,0,.6)); }
.reel-item .r-wpn { font-size: 10px; color: rgba(255,255,255,.6); font-weight: 600; }
.reel-item .r-name { font-size: 12px; font-weight: 700; text-align: center; line-height: 1.15; }
.reel-item.winner { animation: winner 900ms var(--ease) forwards; }
@keyframes winner { 0% { transform: scale(1); } 40% { transform: scale(1.1); box-shadow: 0 0 30px var(--rc); } 100% { transform: scale(1.05); box-shadow: 0 0 22px var(--rc); } }
.reel-pointer {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px;
  background: var(--color-accent); box-shadow: 0 0 14px rgba(245,166,35,.95); z-index: 2;
}
.reel-pointer::before, .reel-pointer::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  border: 8px solid transparent;
}
.reel-pointer::before { top: 0; border-top-color: var(--color-accent); }
.reel-pointer::after { bottom: 0; border-bottom-color: var(--color-accent); }

.case-result {
  position: relative; margin-top: 4px; padding: 18px; border-radius: 12px; text-align: center;
  background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--rc) 30%, transparent), rgba(20,24,32,.9) 70%);
  border: 2px solid var(--rc); overflow: visible;
  animation: result-in 600ms var(--ease);
}
@keyframes result-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.res-rays {
  position: absolute; left: 50%; top: 45%; width: 420px; height: 420px; margin: -210px 0 0 -210px; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 35%, transparent) 0 8deg, transparent 8deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 65%);
          mask-image: radial-gradient(circle, #000 10%, transparent 65%);
  animation: rays 9s linear infinite; opacity: .7;
}
@keyframes rays { to { transform: rotate(360deg); } }
.res-icon { position: relative; width: min(340px, 80%); height: 150px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0,0,0,.7)); animation: res-float 2.6s ease-in-out infinite; }
@keyframes res-float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
.case-result .r-rarity { position: relative; color: var(--rc); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; }
.case-result .r-skin { position: relative; font-family: var(--font-display); font-size: 13px; margin-top: 8px; line-height: 1.5; }
.case-result .r-sell { position: relative; font-size: 12px; color: var(--color-text-muted); margin-top: 6px; }
.spark {
  position: absolute; left: 50%; top: 40%; width: 6px; height: 6px; pointer-events: none;
  animation: spark 1.2s var(--ease) forwards;
}
@keyframes spark { from { transform: translate(0,0) scale(1); opacity: 1; } to { transform: translate(var(--tx), var(--ty)) scale(.2); opacity: 0; } }
.case-open-panel.revealed.r7 { box-shadow: 0 0 80px rgba(255,210,63,.35), 0 24px 70px rgba(0,0,0,.55); }
.case-open-panel.revealed.r6 { box-shadow: 0 0 60px rgba(255,154,60,.3), 0 24px 70px rgba(0,0,0,.55); }

/* ---------- Инвентарь ---------- */
.inventory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.inv-item {
  background: linear-gradient(180deg, var(--color-surface-2), color-mix(in srgb, var(--rc) 14%, #161b23));
  border: 2px solid var(--color-border); border-bottom: 3px solid var(--rc); border-radius: 10px;
  padding: 10px; display: flex; flex-direction: column; gap: 4px; cursor: pointer;
  transition: transform var(--transition-ui), border-color var(--transition-ui);
}
.inv-item:hover { transform: translateY(-3px); }
.inv-item.selected { border-color: rgba(255,255,255,.45); border-bottom-color: var(--rc); }
.inv-item.equipped { box-shadow: 0 0 0 2px var(--color-accent) inset; }
.inv-item.equipped::before { content: 'НАДЕТО'; font-size: 9px; font-weight: 700; color: #1a1204; background: var(--color-accent); align-self: flex-start; padding: 1px 6px; border-radius: 3px; }
.inv-item .i-icon { width: 100%; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0,0,0,.6)); }
.inv-item .i-name { font-weight: 700; font-size: 13px; line-height: 1.25; }
.inv-item .i-weapon { font-size: 11px; color: var(--color-text-muted); }
.inv-item .i-actions { display: flex; gap: 6px; margin-top: 4px; }
.inv-item .i-actions .btn { flex: 1; font-size: 12px; padding: 6px; }
.inv-item .i-actions .btn:hover { transform: none; }


/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; font-family: var(--font-body); }
#hud.hidden { display: none; }


#hitmarker { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; opacity: 0; }
#hitmarker.show { animation: hit 160ms ease-out; }
@keyframes hit { 0% { opacity: 1; transform: scale(1.35); } 100% { opacity: 0; transform: scale(1); } }
#hitmarker::before, #hitmarker::after { content: ''; position: absolute; left: 10.5px; top: 0; width: 3px; height: 24px; background: linear-gradient(#fff 0 35%, transparent 35% 65%, #fff 65%); }
#hitmarker::before { transform: rotate(45deg); }
#hitmarker::after { transform: rotate(-45deg); }
#hitmarker.head::before, #hitmarker.head::after { background: linear-gradient(var(--color-red) 0 35%, transparent 35% 65%, var(--color-red) 65%); }


.dmg-dir {
  position: absolute; left: 50%; top: 50%; width: 260px; height: 260px;
  border-radius: 50%; border: 6px solid transparent; border-top-color: rgba(255,40,40,.85);
  filter: drop-shadow(0 0 6px rgba(255,0,0,.6));
  animation: dmg-dir 900ms ease-out forwards;
}
@keyframes dmg-dir { from { opacity: 1; } to { opacity: 0; } }

#scorebar {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.5));
}
.score {
  position: relative; min-width: 96px; padding: 6px 14px 9px; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: rgba(12,15,20,.82); text-align: center;
}
.score.red { color: var(--color-red); border-radius: 8px 0 0 8px; border-top: 3px solid var(--color-red); }
.score.blue { color: var(--color-blue); border-radius: 0 8px 8px 0; border-top: 3px solid var(--color-blue); }
.score small { font-size: 12px; color: var(--color-text-muted); margin-left: 3px; }
.sfill { position: absolute; left: 8px; right: 8px; bottom: 4px; height: 3px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.sfill i { display: block; height: 100%; width: 0; background: currentColor; transition: width 300ms var(--ease); }
.score.red .sfill i { margin-left: auto; }
#match-timer {
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--color-text);
  background: rgba(30,36,47,.95); padding: 12px 14px; align-self: stretch; display: flex; align-items: center;
}
#match-timer.alert { color: var(--color-red); animation: pulse 1s infinite; }

#killfeed { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.kf-row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(10,12,16,.72); border-radius: 5px; padding: 3px 10px; font-size: 13px; font-weight: 600;
  animation: kf-in 200ms var(--ease); transition: opacity 400ms;
}
.kf-row.me { background: rgba(10,12,16,.82); box-shadow: inset 0 0 0 1px rgba(245,166,35,.6); }
.kf-row.fade { opacity: 0; }
.kf-icon { height: 18px; width: 44px; object-fit: contain; filter: brightness(1.4) drop-shadow(0 1px 1px #000); }
.kf-row .red { color: var(--color-red); } .kf-row .blue { color: var(--color-blue); } .kf-row .me { color: var(--color-accent); } .kf-row .zombie { color: #8ae06a; } .kf-row .bomb { color: #ffb02e; }
.kf-row .hs { color: var(--color-red); font-weight: 700; }
@keyframes kf-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; } }

#hud-bl {
  position: absolute; left: 18px; bottom: 18px; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 2px 8px; align-items: center;
  background: linear-gradient(90deg, rgba(10,12,16,.75), rgba(10,12,16,0)); padding: 10px 40px 10px 12px; border-radius: 8px;
}
.hp-cross { font-size: 22px; color: #7CFC98; text-shadow: 0 0 10px rgba(124,252,152,.5); }
#hud-bl.low .hp-cross { color: var(--color-red); animation: pulse .8s infinite; }
#hp-num { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 2px 3px rgba(0,0,0,.8); }
#hp-bar { grid-column: 1 / 3; width: 200px; height: 6px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
#hp-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #3ecf6f, #7CFC98); transition: width 160ms var(--ease); }
#hud-bl.low #hp-fill { background: linear-gradient(90deg, #d3452f, #ff4f5e); }

#hud-br {
  position: absolute; right: 18px; bottom: 18px; text-align: right;
  background: linear-gradient(270deg, rgba(10,12,16,.75), rgba(10,12,16,0)); padding: 8px 12px 8px 50px; border-radius: 8px;
}
#weapon-icon { display: block; margin-left: auto; height: 46px; width: 140px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.8)); }
.wn-row { display: flex; gap: 6px; justify-content: flex-end; align-items: baseline; }
#weapon-name { font-size: 14px; color: #c8d0da; font-weight: 700; }
#weapon-skin { font-size: 12px; font-weight: 600; }
#ammo { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 2px 3px rgba(0,0,0,.8); line-height: 1.1; }
#ammo-mag.low { color: var(--color-red); }
#ammo small { font-size: 16px; color: var(--color-text-muted); }
#reload-hint { font-size: 12px; font-weight: 700; color: var(--color-accent); height: 16px; opacity: 0; }
#reload-hint.show { opacity: 1; animation: pulse .6s infinite; }

#streak {
  position: absolute; left: 50%; top: 22%; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 20px; color: #ffd23f; opacity: 0;
  text-shadow: 0 3px 0 #6a3e00, 0 0 24px rgba(255,210,63,.6); white-space: nowrap;
}
#streak.show { animation: streak 1.8s var(--ease) forwards; }
@keyframes streak { 0% { opacity: 0; transform: translateX(-50%) scale(2.4); } 15% { opacity: 1; transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-14px); } }

#scoreboard {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(720px, 94vw);
  background: rgba(10,12,16,.86); border: 1px solid var(--color-border); border-radius: 12px; padding: 16px;
  backdrop-filter: blur(8px);
}
.sb-head { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; padding: 6px 8px; border-radius: 6px; margin-bottom: 6px; }
.sb-team.blue .sb-head { background: rgba(79,163,255,.18); color: var(--color-blue); }
.sb-team.red .sb-head { background: rgba(255,79,94,.18); color: var(--color-red); }
#scoreboard table { width: 100%; border-collapse: collapse; font-size: 13px; }
#scoreboard th { text-align: left; color: var(--color-text-muted); font-weight: 600; padding: 3px 8px; }
#scoreboard td { padding: 4px 8px; border-top: 1px solid rgba(255,255,255,.05); font-variant-numeric: tabular-nums; }
#scoreboard td:not(:first-child), #scoreboard th:not(:first-child) { text-align: right; width: 40px; }
#scoreboard tr.me td { color: var(--color-accent); font-weight: 700; }
#scoreboard tr.dead td { opacity: .45; }

#dmg-vignette {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  box-shadow: inset 0 0 140px rgba(255, 20, 20, .75); transition: opacity 300ms;
}
#dmg-vignette.show { opacity: 1; transition: opacity 50ms; }

#respawn-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse, rgba(60,0,0,.15), rgba(30,0,0,.55)); }
#respawn-overlay.hidden { display: none; }
.respawn-box { text-align: center; background: rgba(12,15,20,.85); padding: 22px 40px; border-radius: 12px; border: 1px solid rgba(255,79,94,.4); animation: panel-in 400ms var(--ease); }
.respawn-box h3 { font-family: var(--font-display); font-size: 15px; color: var(--color-red); margin-bottom: 10px; }
.respawn-box p { font-size: 15px; }
.killer { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; font-weight: 700; }
.killer .red { color: var(--color-red); } .killer .blue { color: var(--color-blue); } .killer .zombie { color: #8ae06a; } .killer .me, .killer .bomb { color: var(--color-accent); }
#killer-weapon { height: 26px; width: 70px; object-fit: contain; }
#respawn-timer { font-weight: 700; color: var(--color-accent); }

#kill-banner {
  position: absolute; left: 50%; top: 64%; transform: translateX(-50%);
  font-weight: 700; font-size: 16px; color: #fff;
  background: rgba(10,12,16,.6); padding: 6px 16px; border-radius: 6px; border-left: 3px solid var(--color-red);
  text-shadow: 0 2px 4px rgba(0,0,0,.8); white-space: nowrap;
}
#kill-banner b { color: var(--color-red); }
#kill-banner .kb-x { color: var(--color-red); }
#kill-banner .kb-gold { color: var(--color-accent); margin-left: 6px; }
#kill-banner.pop { animation: kb-pop 300ms var(--ease); }
@keyframes kb-pop { from { transform: translateX(-50%) scale(1.3); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
#kill-banner.hidden { display: none; }

#click-to-play {
  position: absolute; left: 50%; top: 58%; transform: translateX(-50%);
  font-size: 16px; font-weight: 600; color: #fff; background: rgba(10,12,16,.7);
  padding: 12px 22px; border-radius: 8px; border: 1px solid var(--color-border);
  pointer-events: none; animation: pulse 1.6s infinite;
}
#click-to-play.hidden { display: none; }
@keyframes pulse { 0%,100% { opacity: .95; } 50% { opacity: .5; } }

/* Прицел AWP */
#scope-overlay { display: none; position: absolute; inset: 0; }
body.scoped #scope-overlay { display: block; }
body.scoped #crosshair, body.scoped #hud-br, body.scoped #hud-bl { opacity: 0; }
.scope-lens {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(0,0,0,.9), rgba(0,0,0,.9)) center / 100% 1px no-repeat,
    linear-gradient(rgba(0,0,0,.9), rgba(0,0,0,.9)) center / 1px 100% no-repeat,
    radial-gradient(circle at center, transparent 0, transparent 37vmin, rgba(0,0,0,.4) 39vmin, #000 40vmin);
  animation: scope-in 160ms ease-out;
}
.scope-lens::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 80vmin; height: 80vmin; transform: translate(-50%, -50%);
  border-radius: 50%; box-shadow: inset 0 0 60px rgba(0,0,0,.7);
}
@keyframes scope-in { from { transform: scale(1.3); opacity: 0; } to { transform: none; opacity: 1; } }

#debug-overlay {
  position: fixed; top: 0; left: 0; z-index: 99999; pointer-events: none;
  background: rgba(0,0,0,.6); color: #6f6; font: 10px/1.5 monospace; padding: 3px 6px; white-space: pre; opacity: .7;
}

.hidden { display: none !important; }

@media (max-width: 600px) {
  .menu-panel { padding: 18px; }
  .game-title { font-size: 24px; }
  .main-panel { margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* =====================================================================
   НОВОЕ МЕНЮ
   ===================================================================== */
button { font-family: inherit; color: inherit; }
.muted { color: var(--color-text-muted); }
.coin { display: inline-flex; width: 1em; height: 1em; vertical-align: -0.12em; }
.coin svg { width: 100%; height: 100%; fill: #ffc531; stroke: #a8650a; stroke-width: 1.6; }

/* затемнение поверх живого 3D-фона карты */
#menu-shade { position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0; transition: opacity 400ms; 
  background: linear-gradient(90deg, rgba(7,10,16,.92) 0%, rgba(7,10,16,.55) 45%, rgba(7,10,16,.2) 75%, rgba(7,10,16,.5) 100%), linear-gradient(0deg, rgba(7,10,16,.85), transparent 35%), radial-gradient(ellipse at 70% 40%, transparent 30%, rgba(0,0,0,.35)); }
body:not([data-screen="game"]) #menu-shade { opacity: 1; }
.screen { background: rgba(7,10,16,.55); backdrop-filter: blur(3px); }
#screen-main { background: none; backdrop-filter: none; flex-direction: column; align-items: stretch; justify-content: flex-start; }

/* загрузка */
#splash { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: #07090e; transition: opacity 600ms; }
#splash.done { opacity: 0; pointer-events: none; }
.splash-bg { position: absolute; inset: 0; background: url('../assets/menu-bg.jpg') center / cover; filter: brightness(.45) saturate(1.1); animation: bg-drift 20s ease-in-out infinite alternate; }
@keyframes bg-drift { from { transform: scale(1.04); } to { transform: scale(1.12) translateX(-2%); } }
.splash-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; width: min(420px, 86vw); }
.splash-bar { width: 100%; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff8a1a, #ffd23f); transition: width 300ms var(--ease); box-shadow: 0 0 12px #ffb02e; }
.splash-text { font-size: 13px; color: #c7cfda; letter-spacing: .5px; }

/* логотип */
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 22px; letter-spacing: 1px; color: #fff; text-shadow: 0 2px 0 #000; user-select: none; }
.logo b { font-weight: 400; color: var(--color-accent); text-shadow: 0 2px 0 #6a3e00, 0 0 20px rgba(255,176,46,.45); }
.logo-cube { width: 22px; height: 22px; background: var(--color-accent); border-radius: 4px; box-shadow: inset -5px -5px 0 #b06a00, inset 4px 4px 0 #ffd27a, 0 0 16px rgba(255,176,46,.5); transform: rotate(-8deg); }
.logo.big { font-size: clamp(34px, 7vw, 58px); gap: 14px; }
.logo.big .logo-cube { width: 1em; height: 1em; border-radius: 8px; box-shadow: inset -.22em -.22em 0 #b06a00, inset .16em .16em 0 #ffd27a, 0 0 40px rgba(255,176,46,.5); }

/* верхняя панель */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px clamp(14px, 3vw, 36px); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.profile-chip { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 10px; cursor: pointer; background: rgba(14,18,26,.75); border: 1px solid var(--color-border); text-align: left; transition: border-color 160ms; }
.profile-chip:hover { border-color: rgba(255,176,46,.6); }
.avatar { width: 38px; height: 38px; border-radius: 8px; background: linear-gradient(135deg, #3d78d8, #1d3f80); display: grid; place-items: center; flex: none; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
.avatar i { width: 55%; height: 55%; background: #f0c8a0; border-radius: 3px; box-shadow: inset 0 -.25em 0 #3a2a1c; }
.avatar.big { width: 76px; height: 76px; border-radius: 14px; }
.pc-text { display: flex; flex-direction: column; gap: 1px; min-width: 110px; }
.pc-text > b { font-size: 14px; }
.pc-lvl { font-size: 11px; color: var(--color-text-muted); }
.pc-lvl b { color: var(--color-accent); }
.xpbar { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 2px; }
.xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb02e, #ffe07a); transition: width 900ms var(--ease); }
.xpbar.big { height: 8px; border-radius: 4px; }
.gold-chip { display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; background: rgba(14,18,26,.75); border: 1px solid rgba(255,197,49,.35); font-weight: 700; font-size: 16px; color: #ffd76a; font-variant-numeric: tabular-nums; }

/* тело главного меню */
.mm-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(320px, 560px) 1fr; gap: 24px; padding: 4px clamp(14px, 3vw, 36px) 22px; }
.mm-left { display: flex; flex-direction: column; gap: 14px; justify-content: flex-end; min-height: 0; }
.play-card { position: relative; padding: 22px 22px 20px; border-radius: 16px; overflow: hidden; background: rgba(14,18,26,.85) center / cover; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 20px 50px rgba(0,0,0,.45); animation: panel-in 420ms var(--ease); }
.play-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,176,46,.0); transition: box-shadow 200ms; }
.play-card:hover::after { box-shadow: inset 0 0 0 1px rgba(255,176,46,.5); }
.pc-head { display: flex; align-items: center; gap: 10px; }
.mode-tag { display: inline-block; font-family: var(--font-display); font-size: 11px; letter-spacing: 1px; color: #0b0f17; padding: 3px 8px; border-radius: 5px; background: var(--mc, #555); }
.pc-label { font-size: 12px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 1px; }
.pc-mode { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 34px); margin-top: 10px; line-height: 1.1; }
.pc-map { color: #c2cad6; font-size: 14px; margin-top: 4px; }
.pc-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn-play { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font-display); font-size: 20px; letter-spacing: 1.5px; padding: 14px 34px; border: none; border-radius: 10px; color: #1a1204; cursor: pointer;
  background: linear-gradient(180deg, #ffc54a, #f39a10); box-shadow: 0 5px 0 #9a5d00, 0 12px 30px rgba(245,166,35,.35); transition: transform 120ms, box-shadow 160ms, filter 160ms; }
.btn-play svg { width: 20px; height: 20px; fill: currentColor; }
.btn-play:hover { filter: brightness(1.08); box-shadow: 0 5px 0 #9a5d00, 0 14px 40px rgba(245,166,35,.55); transform: translateY(-1px); }
.btn-play:active { transform: translateY(4px); box-shadow: 0 1px 0 #9a5d00; }
.btn-play.wide { width: 100%; margin-top: 16px; }
.btn-ghost { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); }
.btn:hover { transform: none; }

.mm-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mm-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px 10px 12px; border-radius: 12px; cursor: pointer; text-align: left; min-width: 0;
  background: rgba(14,18,26,.78); border: 1px solid var(--color-border); transition: transform 160ms var(--ease), border-color 160ms, background 160ms; animation: panel-in 500ms var(--ease) both; }
.mm-tile:nth-child(2) { animation-delay: 40ms; } .mm-tile:nth-child(3) { animation-delay: 80ms; } .mm-tile:nth-child(4) { animation-delay: 120ms; } .mm-tile:nth-child(5) { animation-delay: 160ms; }
.mm-tile svg { width: 26px; height: 26px; fill: #dfe5ee; margin-bottom: 6px; transition: fill 160ms; }
.mm-tile b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mm-tile span { font-size: 11px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mm-tile:hover { transform: translateY(-3px); border-color: rgba(255,176,46,.55); background: rgba(24,30,42,.9); }
.mm-tile:hover svg { fill: var(--color-accent); }
.mm-tile.accent { background: linear-gradient(160deg, rgba(255,176,46,.22), rgba(14,18,26,.8) 70%); border-color: rgba(255,176,46,.35); }
.mm-tip { font-size: 12px; color: #aab4c2; display: flex; gap: 8px; align-items: baseline; padding: 0 4px; }
.mm-tip b { color: var(--color-accent); text-transform: uppercase; font-size: 11px; letter-spacing: 1px; flex: none; }
.mm-right { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 0; }
.showcase { width: min(100%, 440px); flex: 1; min-height: 220px; max-height: 620px; }
.showcase-canvas { width: 100%; height: 100%; display: block; }
.showcase-cap { margin-top: 4px; font-weight: 700; font-size: 15px; padding: 6px 16px; border-radius: 8px; background: rgba(14,18,26,.75); border: 1px solid var(--color-border); }

/* страницы */
.screen:not(#screen-main):not(#case-open):not(#screen-pause) { align-items: stretch; justify-content: center; overflow-y: auto; }
.page { width: min(1120px, 100%); margin: 0 auto; padding: 20px clamp(14px, 3vw, 36px) 28px; display: flex; flex-direction: column; gap: 16px; animation: panel-in 320ms var(--ease); }
.page.narrow { width: min(860px, 100%); }
.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.page-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 26px; letter-spacing: 1px; }
.page-head .gold-chip { margin-left: auto; }
.head-note { color: var(--color-text-muted); font-size: 13px; }
.back-btn { width: 42px; height: 42px; border-radius: 10px; font-size: 26px; line-height: 1; cursor: pointer; background: rgba(14,18,26,.8); border: 1px solid var(--color-border); transition: border-color 160ms, transform 160ms; }
.back-btn:hover { border-color: var(--color-accent); transform: translateX(-2px); }
.sec-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--color-text-muted); margin-bottom: 8px; font-weight: 700; }
section { min-width: 0; }

/* выбор режима */
.play-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mode-card { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; padding: 14px 12px; border-radius: 12px; cursor: pointer; overflow: hidden;
  background: rgba(14,18,26,.82); border: 1px solid var(--color-border); transition: transform 160ms var(--ease), border-color 160ms, box-shadow 160ms; }
.mode-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--mc); opacity: .7; }
.mode-card .mode-tag { background: var(--mc); }
.mode-name { font-weight: 700; font-size: 15px; }
.mode-rules { font-size: 11px; color: var(--color-text-muted); }
.mode-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--mc) 60%, transparent); }
.mode-card.selected { border-color: var(--mc); box-shadow: 0 0 0 1px var(--mc) inset, 0 10px 30px color-mix(in srgb, var(--mc) 25%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 22%, transparent), rgba(14,18,26,.85) 70%); }
.mode-desc { margin-top: 12px; font-size: 14px; color: #c8d0db; line-height: 1.5; padding: 12px 14px; border-radius: 10px; background: rgba(14,18,26,.7); border: 1px solid var(--color-border); }
.map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.map-card { display: flex; flex-direction: column; text-align: left; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: rgba(14,18,26,.85); border: 1px solid var(--color-border); transition: transform 160ms var(--ease), border-color 160ms; }
.map-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.35); }
.map-card.selected { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent) inset; }
.map-thumb { aspect-ratio: 16 / 9; background: #1a2030 center / cover; }
.map-info { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.map-info b { font-size: 14px; }
.map-info span { font-size: 11px; color: var(--color-text-muted); line-height: 1.35; }
.play-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(14,18,26,.85); border: 1px solid var(--color-border); }
.seg-btn { padding: 7px 12px; border-radius: 7px; border: none; background: transparent; cursor: pointer; font-weight: 600; font-size: 13px; color: #b9c2cf; transition: background 140ms, color 140ms; }
.seg-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.seg-btn.on { background: var(--color-accent); color: #1a1204; }

/* снаряжение, инвентарь */
.loadout-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; cursor: pointer; background: rgba(14,18,26,.82); border: 1px solid var(--color-border); transition: border-color 160ms, transform 160ms; }
.loadout-item.fixed { opacity: .85; }
.loadout-item .w-name em { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--color-text-muted); margin-left: 8px; font-weight: 600; }
.preview-box { position: relative; border-radius: 14px; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, rgba(60,80,120,.35), rgba(10,13,20,.85)); border: 1px solid var(--color-border); }
.inv-filter { align-self: flex-start; }
.inv-layout { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 16px; align-items: start; }
.inv-layout .inv-preview { position: sticky; top: 0; }
.inv-item { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 10px; cursor: pointer; background: rgba(14,18,26,.85); border: 1px solid var(--color-border); border-bottom: 3px solid var(--rc); transition: transform 160ms; }
.inv-item.equipped::before { content: none; }
.eq-badge { position: absolute; top: 6px; left: 6px; font-size: 9px; font-weight: 700; color: #1a1204; background: var(--color-accent); padding: 1px 6px; border-radius: 3px; }
.empty-note { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--color-text-muted); border: 1px dashed var(--color-border); border-radius: 12px; }
.case-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--cc) 18%, rgba(14,18,26,.9)), rgba(14,18,26,.9)); border: 1px solid color-mix(in srgb, var(--cc) 40%, transparent); transition: transform 200ms var(--ease), box-shadow 200ms; }
.case-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.case-actions .btn { width: auto; }
#case-open { background: rgba(5,7,12,.82); }

/* профиль */
.pf-card { display: flex; gap: 18px; align-items: center; padding: 18px; border-radius: 14px; background: rgba(14,18,26,.85); border: 1px solid var(--color-border); }
.pf-main { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.pf-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--color-text-muted); }
.text-input { font: inherit; font-size: 18px; font-weight: 700; color: #fff; background: rgba(0,0,0,.35); border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 12px; max-width: 320px; outline: none; }
.text-input:focus { border-color: var(--color-accent); }
.pf-level { font-size: 14px; margin-top: 4px; }
.pf-level b { color: var(--color-accent); font-size: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.stat-grid.six { grid-template-columns: repeat(6, 1fr); }
.stat-card { padding: 12px; border-radius: 10px; background: rgba(14,18,26,.85); border: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 2px; }
.stat-card b { font-size: 22px; font-variant-numeric: tabular-nums; }
.stat-card span { font-size: 11px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .8px; }
.pf-modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.pf-mode { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(14,18,26,.85); border: 1px solid var(--color-border); font-size: 14px; }
.pf-mode b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* настройки */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--color-border); }
.tabs button { padding: 10px 16px; border: none; background: none; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--color-text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 140ms, border-color 140ms; }
.tabs button:hover { color: #fff; }
.tabs button.on { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.set-body { display: flex; flex-direction: column; gap: 8px; max-width: 820px; }
/* explicit Save button in Settings (moderation remark: settings must not be
   written on every change — only on Save / leaving the screen) */
.set-save-row { display: flex; justify-content: flex-end; margin-top: 10px; max-width: 820px; }
.set-save-row .btn-primary:disabled { opacity: .8; cursor: default; }
.set-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(160px, 1.3fr) 56px; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 10px; background: rgba(14,18,26,.82); border: 1px solid var(--color-border); font-size: 14px; }
.set-row:has(.seg), .set-row:has(.toggle), .set-row:has(.swatches) { grid-template-columns: minmax(180px, 1fr) auto; }
.set-row input[type=range] { width: 100%; accent-color: var(--color-accent); }
.set-val { text-align: right; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.set-note { font-size: 13px; color: var(--color-text-muted); line-height: 1.5; padding: 2px 4px; }
.set-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.set-body > .btn, .set-actions .btn { align-self: flex-start; }
.toggle { justify-self: end; width: 48px; height: 26px; border-radius: 13px; border: none; cursor: pointer; background: rgba(255,255,255,.15); position: relative; transition: background 160ms; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 160ms var(--ease); }
.toggle.on { background: var(--color-accent); }
.toggle.on i { transform: translateX(22px); }
.subtabs { display: flex; gap: 6px; margin-top: 6px; }
.subtabs button { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--color-border); background: rgba(14,18,26,.8); cursor: pointer; font-weight: 700; font-size: 13px; color: #b9c2cf; }
.subtabs button.on { border-color: var(--color-accent); color: var(--color-accent); }
.binds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bind-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 9px; background: rgba(14,18,26,.82); border: 1px solid var(--color-border); font-size: 14px; }
.key-btn { min-width: 92px; padding: 6px 10px; border-radius: 7px; cursor: pointer; font-weight: 700; font-size: 13px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-bottom-width: 3px; }
.key-btn:hover { border-color: var(--color-accent); }
.key-btn.wait { color: var(--color-accent); border-color: var(--color-accent); animation: pulse 1s infinite; }
.key-fixed { font-size: 13px; color: var(--color-text-muted); font-weight: 600; }
.bind-row.fixed { opacity: .75; }
.touch-mini { position: relative; width: 100%; max-width: 560px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #6d8fb8, #c9b48c 60%, #8a7656); border: 1px solid var(--color-border); }
.swatches { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.sw { width: 26px; height: 26px; border-radius: 6px; cursor: pointer; border: 2px solid rgba(0,0,0,.4); }
.sw.on { outline: 2px solid #fff; outline-offset: 2px; }
.swatches input[type=color] { width: 34px; height: 28px; border: none; background: none; cursor: pointer; padding: 0; }
.ch-settings { display: grid; grid-template-columns: 260px 1fr; gap: 14px; align-items: start; }
.ch-preview { position: sticky; top: 0; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--color-border); }
.ch-prev-bg { position: absolute; inset: 0; background: linear-gradient(180deg, #7fa3cc 0 45%, #c8a676 45% 70%, #8b6a45 70%); }
.ch-prev-bg::after { content: ''; position: absolute; left: 30%; top: 30%; width: 40%; height: 40%; background: repeating-linear-gradient(90deg, #a07a4a 0 12px, #8f6c40 12px 24px); box-shadow: 0 0 0 3px #6b4f2c; }
.ch-controls { display: flex; flex-direction: column; gap: 8px; }
.ch-controls .btn { align-self: flex-start; }
.crosshair-el { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: scale(2.2); }

/* =====================================================================
   ПРИЦЕЛ (настраиваемый)
   ===================================================================== */
#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.ch-dot, .ch-line, .ch-circle { position: absolute; display: none; background: var(--ch-color, #3dff7a); }
.ch-line { transition: top 60ms, left 60ms, width 60ms, height 60ms; }
.ch-line.t, .ch-line.b { width: var(--ch-th); height: var(--ch-len); left: calc(var(--ch-th) / -2); }
.ch-line.l, .ch-line.r { height: var(--ch-th); width: var(--ch-len); top: calc(var(--ch-th) / -2); }
.ch-line.t { top: calc(-1 * var(--gap) - var(--ch-len)); }
.ch-line.b { top: var(--gap); }
.ch-line.l { left: calc(-1 * var(--gap) - var(--ch-len)); }
.ch-line.r { left: var(--gap); }
.ch-dot { width: calc(var(--ch-th) + 1px); height: calc(var(--ch-th) + 1px); left: calc((var(--ch-th) + 1px) / -2); top: calc((var(--ch-th) + 1px) / -2); border-radius: 50%; }
.ch-circle { background: none; border: var(--ch-th) solid var(--ch-color); border-radius: 50%; width: calc(var(--gap) * 2 + var(--ch-len)); height: calc(var(--gap) * 2 + var(--ch-len)); left: 50%; top: 50%; transform: translate(-50%, -50%); transition: width 60ms, height 60ms; }
.cs-cross .ch-line, .cs-crossdot .ch-line, .cs-crossdot .ch-dot, .cs-circle .ch-circle, .cs-circle .ch-dot, .cs-tshape .ch-line.b, .cs-tshape .ch-line.l, .cs-tshape .ch-line.r, .cs-tshape .ch-dot { display: block; }
.cs-dot .ch-dot { display: block; width: calc(var(--ch-th) * 2 + 1px); height: calc(var(--ch-th) * 2 + 1px); left: calc((var(--ch-th) * 2 + 1px) / -2); top: calc((var(--ch-th) * 2 + 1px) / -2); }
.ch-outline .ch-line, .ch-outline .ch-dot { box-shadow: 0 0 0 1px rgba(0,0,0,.85); }
.ch-outline .ch-circle { box-shadow: 0 0 0 1px rgba(0,0,0,.7), inset 0 0 0 1px rgba(0,0,0,.7); }

/* =====================================================================
   HUD — режимы
   ===================================================================== */
.score { color: #e6ebf2; border-top: 3px solid #8a96a8; }
.score.l { border-radius: 8px 0 0 8px; } .score.r { border-radius: 0 8px 8px 0; }
.score.l .sfill i { margin-left: auto; }
.score.red { color: var(--color-red); border-top-color: var(--color-red); }
.score.blue { color: var(--color-blue); border-top-color: var(--color-blue); }
.score.me { color: var(--color-accent); border-top-color: var(--color-accent); }
.score.enemy { color: #ff8a8a; border-top-color: #ff6a6a; }
.score.zombie { color: #8ae06a; border-top-color: #6ac04a; }
.score .sv { display: block; line-height: 1.1; }
.score small { display: block; font-size: 10px; letter-spacing: .5px; margin: 0; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#match-timer { min-width: 72px; justify-content: center; }
#match-timer.alert { color: #ff4a3a; animation: pulse .8s infinite; font-size: 22px; }
#score-note { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 600; color: #dfe5ee; background: rgba(10,12,16,.65); padding: 4px 12px; border-radius: 6px; white-space: nowrap; }
#round-banner { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; pointer-events: none; }
/* touch: the banner sits fully below the score bar and never collides with the
   spawn-protection pill (which moves to the free bottom-center area) */
body.touch-mode #round-banner { top: 24%; }
body.touch-mode #spawn-prot { top: auto; bottom: 96px; }
/* the weapon picker overlay is open: transient banners must not show through it */
body.buy-open #round-banner, body.buy-open #spawn-prot { display: none; }
#round-banner.show { display: flex; animation: banner 3.2s var(--ease) forwards; }
#round-banner b { font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 4vw, 38px); letter-spacing: 2px; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.6), 0 0 24px rgba(255,255,255,.25); }
#round-banner span { font-size: 15px; font-weight: 600; color: #dfe5ee; background: rgba(10,12,16,.6); padding: 4px 14px; border-radius: 6px; }
#round-banner.win b { color: #ffd23f; text-shadow: 0 3px 0 #6a3e00, 0 0 30px rgba(255,210,63,.5); }
#round-banner.lose b { color: #ff5a5a; text-shadow: 0 3px 0 #4a0000, 0 0 30px rgba(255,60,60,.45); }
@keyframes banner { 0% { opacity: 0; transform: translateX(-50%) scale(1.6); } 10% { opacity: 1; transform: translateX(-50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-12px); } }
#hud-prompt { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); font-size: 15px; font-weight: 700; color: #fff; background: rgba(10,12,16,.7); padding: 7px 16px; border-radius: 8px; border: 1px solid rgba(255,176,46,.5); white-space: nowrap; }
#hud-progress { position: absolute; left: 50%; top: 56%; transform: translateX(-50%); width: 260px; text-align: center; }
#hud-progress span { font-size: 13px; font-weight: 700; color: var(--color-accent); text-shadow: 0 1px 2px #000; }
#hud-progress div { height: 8px; border-radius: 4px; background: rgba(0,0,0,.55); overflow: hidden; margin-top: 4px; border: 1px solid rgba(255,255,255,.2); }
#hud-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb02e, #ffe07a); }
#bomb-carrier { grid-column: 1 / 3; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #ffb02e; animation: pulse 1.4s infinite; }
#bomb-carrier img { width: 40px; height: 20px; }
#weapon-slots { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 4px; }
.slot { position: relative; width: 64px; height: 30px; border-radius: 6px; background: rgba(10,12,16,.55); border: 1px solid rgba(255,255,255,.1); opacity: .55; }
.slot.on { opacity: 1; border-color: var(--color-accent); }
.slot img { width: 100%; height: 100%; object-fit: contain; padding: 2px 4px; }
.slot kbd { position: absolute; left: 3px; top: 1px; font: 700 9px var(--font-body); color: #b9c2cf; }
#spectate-label { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); font-size: 14px; font-weight: 600; background: rgba(10,12,16,.75); padding: 6px 16px; border-radius: 8px; border: 1px solid var(--color-border); white-space: nowrap; }
#spectate-label b { color: var(--color-accent); }
.sp-hp { color: #7CFC98; font-weight: 700; margin-left: 6px; }
/* moved lower (moderation remark): the death panel used to cover the
   ROUND WON banner text behind it; now it sits in the empty space above the HUD */
#respawn-overlay { background: radial-gradient(ellipse, transparent 40%, rgba(40,0,0,.45)); align-items: flex-start; padding-top: min(34vh, calc(100% - 220px)); pointer-events: auto; }
.respawn-box { padding: 14px 30px; }
.killer-hp { font-size: 13px; color: #ffb3b3; margin-bottom: 6px; }
#killer-weapon.hidden { display: none; }
body.low-hp #dmg-vignette { opacity: .45; animation: pulse 1.2s infinite; }
.sb-team.ffa { grid-column: 1 / -1; }
.sb-team.ffa .sb-head { background: rgba(255,176,46,.15); color: var(--color-accent); }
#scoreboard td.n { width: 22px !important; color: var(--color-text-muted); text-align: left !important; }
#scoreboard td:nth-child(2), #scoreboard th:nth-child(2) { text-align: left !important; width: auto !important; }
#click-to-play { top: 60%; text-align: center; }
#click-to-play div { display: flex; flex-direction: column; gap: 4px; }
#click-to-play span { font-size: 12px; color: var(--color-text-muted); font-weight: 500; max-width: 440px; white-space: normal; }

/* всплывающий урон над противником */
#dmg-layer { position: absolute; inset: 0; overflow: hidden; }
.dmg-pop { position: absolute; left: 0; top: 0; font-family: var(--font-display); font-size: 20px; color: #fff; text-shadow: 0 2px 0 #000, 0 0 6px rgba(0,0,0,.8); white-space: nowrap; will-change: transform; animation: dmg-pop 260ms var(--ease); }
.dmg-pop.head { color: #ffd23f; font-size: 24px; }
.dmg-pop.kill { color: #ff4a3a; font-size: 26px; }
.dmg-pop.kill::after { content: ' ✕'; font-size: .8em; }
@keyframes dmg-pop { 0% { font-size: 34px; } 100% { } }

/* =====================================================================
   СЕНСОРНОЕ УПРАВЛЕНИЕ
   ===================================================================== */
#touch-ui { position: absolute; inset: 0; pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.touch-host { position: relative; }
.tbtn { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(20,24,32,.55); border: 2px solid rgba(255,255,255,.55); box-shadow: 0 2px 10px rgba(0,0,0,.35); touch-action: none; }
.tbtn svg { width: 46%; height: 46%; }
.tbtn span { font-weight: 700; font-size: 14px; }
/* tablets: icon + text label stacked inside a bigger button (moderation remark) */
.tbtn.labeled { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tbtn.labeled svg { width: 38%; height: 38%; }
.tbtn .tb-lbl { font-style: normal; font-weight: 700; font-size: 9px; line-height: 1; letter-spacing: .2px; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.tbtn .tb-txt { font-weight: 700; font-size: 12px; }
.tbtn.down { background: rgba(255,176,46,.55); border-color: #ffd27a; transform: translate(-50%, -50%) scale(.94); }
.tb-fire, .tb-fireL { background: rgba(200,40,40,.45); border-color: rgba(255,140,140,.8); }
.tbtn.stick { background: rgba(20,24,32,.3); border-style: dashed; }
.stick-knob { position: absolute; left: 50%; top: 50%; width: 44%; height: 44%; border-radius: 50%; background: rgba(255,255,255,.65); transform: translate(-50%, -50%); box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.touch-mini .tbtn { border-width: 1px; }
.touch-mini .tbtn span { font-size: 9px; }
#touch-editor { position: fixed; inset: 0; z-index: 60; background: linear-gradient(180deg, rgba(60,80,110,.95), rgba(120,100,70,.95)); }
#te-area { position: absolute; inset: 0; 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: 40px 40px; touch-action: none; }
.tbtn.edit { cursor: grab; }
.tbtn.edit em { position: absolute; top: 100%; margin-top: 4px; font-style: normal; font-size: 11px; font-weight: 700; white-space: nowrap; text-shadow: 0 1px 2px #000; }
.tbtn.sel { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(255,176,46,.5); }
.te-bar { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(10,12,16,.88); border: 1px solid var(--color-border); flex-wrap: wrap; justify-content: center; max-width: 94vw; }
.te-title { font-weight: 700; font-size: 13px; }
#te-size-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
#te-size-row input { accent-color: var(--color-accent); width: 120px; }
.te-bar .btn { width: auto; }
body.touch-mode #hud-bl { left: 50%; transform: translateX(-50%); bottom: 8px; padding: 6px 12px; background: rgba(10,12,16,.55); }
body.touch-mode #hp-bar { width: 140px; }
body.touch-mode #hud-br { top: 50px; bottom: auto; right: 10px; padding: 4px 8px; transform: scale(.68); transform-origin: top right; }
body.touch-mode #weapon-slots { display: none; }
body.touch-mode #killfeed { top: 56px; right: auto; left: 10px; align-items: flex-start; transform: scale(.85); transform-origin: top left; }

/* конец матча */
.end-page { align-items: stretch; }
.page.end-page { gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.end-page .end-title { font-size: clamp(30px, 5vw, 44px); }
.end-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 6vw, 56px); text-align: center; letter-spacing: 3px; }
.end-title.draw { color: #dfe5ee; }
.end-sub { text-align: center; color: #c2cad6; font-size: 15px; margin-top: -6px; }
.end-cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; }
.end-rewards-box, .end-board-box { padding: 14px; border-radius: 14px; background: rgba(14,18,26,.85); border: 1px solid var(--color-border); }
.reward { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 14px; animation: panel-in 400ms var(--ease) both; }
.reward:nth-child(2) { animation-delay: 120ms; } .reward:nth-child(3) { animation-delay: 240ms; }
.reward b { font-size: 16px; color: #ffd76a; }
.reward.lvl b { color: var(--color-accent); }
.end-lvl { margin-top: 12px; font-size: 14px; }
.end-lvl b { color: var(--color-accent); }
.end-lvl .xpbar { margin-top: 6px; }
.end-board { width: 100%; border-collapse: collapse; font-size: 13px; }
.end-board th { text-align: left; color: var(--color-text-muted); font-weight: 600; padding: 3px 6px; }
.end-board td { padding: 5px 6px; border-top: 1px solid rgba(255,255,255,.05); font-variant-numeric: tabular-nums; }
.end-board td:nth-child(n+3), .end-board th:nth-child(n+3) { text-align: right; width: 44px; }
.end-board td.n { color: var(--color-text-muted); width: 22px; }
.end-board tr.me td { color: var(--color-accent); font-weight: 700; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; }
.dot.blue { background: var(--color-blue); } .dot.ffa { background: #8a96a8; } .dot.me { background: var(--color-accent); } .dot.red { background: var(--color-red); }
.end-actions { display: flex; gap: 10px; justify-content: center; }
.end-actions .btn { min-width: 160px; }
/* мобильный: кнопки в столбец на всю ширину, чтобы длинная рекламная надпись помещалась */
@media (max-width: 560px) {
  .end-actions { flex-direction: column; }
  .end-actions .btn { min-width: 0; width: 100%; font-size: 16px; padding: 13px 14px; white-space: normal; }
}

/* пауза */
.pause-box { display: flex; flex-direction: column; gap: 10px; width: min(340px, 90vw); padding: 26px; border-radius: 16px; background: rgba(14,18,26,.9); border: 1px solid var(--color-border); box-shadow: 0 24px 60px rgba(0,0,0,.5); animation: panel-in 300ms var(--ease); text-align: center; }
.pause-box h2 { font-family: var(--font-display); font-weight: 400; font-size: 26px; letter-spacing: 2px; }

/* адаптив */
@media (max-width: 980px) {
  .mm-body { grid-template-columns: 1fr; }
  .mm-right { display: none; }
  .play-grid { grid-template-columns: 1fr; }
  .inv-layout { grid-template-columns: 1fr; }
  .inv-layout .inv-preview { position: relative; }
  .stat-grid.six { grid-template-columns: repeat(3, 1fr); }
  .end-cols { grid-template-columns: 1fr; }
  .ch-settings { grid-template-columns: 1fr; }
  .ch-preview { position: relative; max-width: 220px; }
}
@media (max-width: 640px) {
  .mm-tiles { grid-template-columns: repeat(3, 1fr); }
  .pc-text { min-width: 0; }
  .pc-text .pc-lvl, .pc-text .xpbar { display: none; }
  .logo { font-size: 17px; }
  .set-row { grid-template-columns: 1fr; gap: 6px; }
  .set-row:has(.seg), .set-row:has(.toggle), .set-row:has(.swatches) { grid-template-columns: 1fr auto; }
  .binds { grid-template-columns: 1fr; }
  .map-grid { grid-template-columns: 1fr 1fr; }
  .page-head h2 { font-size: 20px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .topbar { padding: 8px 16px; }
  .mm-body { grid-template-columns: 1fr 0.7fr; gap: 12px; padding-bottom: 10px; }
  .mm-right { display: flex; }
  .showcase { min-height: 0; }
  .play-card { padding: 14px 16px; }
  .pc-mode { font-size: 22px; margin-top: 4px; }
  .pc-actions { margin-top: 10px; }
  .btn-play { font-size: 16px; padding: 10px 22px; }
  .mm-tiles { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .mm-tile { padding: 8px 6px; } .mm-tile b { font-size: 11px; } .mm-tile svg { width: 20px; height: 20px; margin-bottom: 2px; } .mm-tile span { display: none; }
  .mm-tip { display: none; }
}

body.dead #crosshair, body.dead #hitmarker { display: none; }

/* ===== v5: matchmaking, weapon picker, chat, spawn protection, ping ===== */
#screen-search { display: none; align-items: center; justify-content: center; }
#screen-search.active { display: flex; }
.search-card { width: min(520px, 92vw); padding: 28px 28px 20px; border-radius: 16px; background: var(--color-surface); border: 1px solid var(--color-border); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.search-card h2 { font-family: var(--font-display); font-size: 26px; letter-spacing: .02em; margin: 12px 0 6px; }
.search-card.found h2 { color: #6dff9a; }
.search-radar { position: relative; width: 84px; height: 84px; margin: 0 auto; }
.search-radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--color-accent); opacity: 0; animation: radar 1.8s infinite; }
.search-radar i:nth-child(2) { animation-delay: .6s; } .search-radar i:nth-child(3) { animation-delay: 1.2s; }
.search-card.found .search-radar i { border-color: #6dff9a; animation-duration: .7s; }
@keyframes radar { 0% { transform: scale(.2); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
.search-mode { color: var(--color-text-muted); font-size: 15px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.search-count { margin-top: 16px; font-size: 15px; display: flex; gap: 6px; align-items: baseline; justify-content: center; }
.search-count b { font-family: var(--font-display); font-size: 22px; color: var(--color-accent); }
.search-time { margin-left: 14px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.search-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); margin: 10px 0 14px; overflow: hidden; }
.search-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f5a623, #ffd36a); transition: width .25s var(--ease); }
.search-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 64px; align-content: flex-start; }
.search-list .chip { padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 13px; animation: chipIn .3s var(--ease); }
.search-list .chip.me { background: rgba(245,166,35,.22); color: #ffd36a; }
@keyframes chipIn { from { transform: scale(.6); opacity: 0; } }
.search-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 13px; }

#buy-menu { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(5,8,14,.55); backdrop-filter: blur(2px); pointer-events: auto; }
.buy-panel { width: min(1040px, 96vw); max-height: 92vh; overflow: auto; padding: 18px; border-radius: 14px; background: var(--color-surface); border: 1px solid var(--color-border); }
.buy-head { display: flex; gap: 14px; align-items: baseline; margin-bottom: 12px; flex-wrap: wrap; }
.buy-head h3 { font-family: var(--font-display); font-size: 22px; }
.buy-note { color: #6dff9a; font-size: 14px; }
.buy-head .muted { margin-left: auto; font-size: 13px; color: var(--color-text-muted); }
.buy-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.buy-cat h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--color-text-muted); margin-bottom: 6px; }
.buy-item { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; margin-bottom: 8px; border-radius: 10px; background: rgba(255,255,255,.05); border: 2px solid transparent; color: inherit; font: inherit; cursor: pointer; transition: background var(--transition-ui), border-color var(--transition-ui); }
.buy-item:hover { background: rgba(255,255,255,.1); }
.buy-item.on { border-color: var(--color-accent); background: rgba(245,166,35,.12); }
.buy-item img { width: 100%; max-width: 140px; aspect-ratio: 2 / 1; object-fit: contain; }
.buy-item b { font-size: 14px; }
.buy-item span { font-size: 11px; color: var(--color-text-muted); }
.buy-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 12px; }
.buy-knife { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--color-text-muted); }
.buy-knife img { width: 90px; aspect-ratio: 2 / 1; object-fit: contain; }
.buy-knife b { color: var(--color-text); }
@media (max-width: 760px), (max-height: 480px) {
  .buy-panel { padding: 10px; }
  .buy-cats { gap: 6px; }
  .buy-item { padding: 4px; margin-bottom: 5px; }
  .buy-item img { max-width: 90px; }
  .buy-item span { display: none; }
  .buy-head h3 { font-size: 17px; }
}

#chat { position: absolute; left: 14px; bottom: 150px; width: min(360px, 40vw); display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.chat-row { align-self: flex-start; max-width: 100%; font-size: 13px; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.35); color: #e6e9ee; text-shadow: 0 1px 2px #000; transition: opacity .6s; }
.chat-row.fade { opacity: 0; }
.chat-row .blue { color: var(--color-blue); font-weight: 600; } .chat-row .red { color: var(--color-red); font-weight: 600; }
.chat-row .me { color: #ffd36a; font-weight: 600; }
.chat-row em { font-style: normal; color: var(--color-text-muted); font-size: 11px; }
.chat-row .sys { color: #b9c2cf; font-style: normal; }
body.touch-mode #chat { bottom: auto; top: 140px; left: 10px; transform: scale(.85); transform-origin: top left; }

#spawn-prot { position: absolute; top: 33%; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: rgba(8,24,48,.72); border: 1px solid rgba(110,190,255,.6); color: #d6ecff; font-size: 13px; pointer-events: none; }
#spawn-prot i { width: 9px; height: 9px; border-radius: 50%; background: #6cc0ff; animation: blink 0.5s infinite alternate; }
@keyframes blink { to { opacity: .2; } }

#respawn-buy { margin-top: 10px; pointer-events: auto; }
#scoreboard td.ping { font-variant-numeric: tabular-nums; text-align: right; }
#scoreboard td.ping.good { color: #6dff9a; } #scoreboard td.ping.mid { color: #ffd36a; } #scoreboard td.ping.bad { color: #ff6b6b; }
#scoreboard .rank { display: inline-block; min-width: 24px; margin-right: 6px; padding: 0 4px; border-radius: 4px; background: rgba(255,255,255,.1); font-size: 11px; text-align: center; color: var(--color-text-muted); }

.pc-online { margin-left: auto; font-size: 12px; color: #6dff9a; display: flex; align-items: center; gap: 6px; }
.pc-online::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #6dff9a; box-shadow: 0 0 8px #6dff9a; }
.map-card.any .any-thumb { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.map-card.any .any-thumb i { background: #1a2030 center / cover; }
.c-contains { font-size: 12px; color: var(--color-text-muted); text-align: center; margin: 2px 0 6px; min-height: 16px; }
.c-contains b { color: #c9a8ff; font-weight: 600; }
.knife-note { color: #c9a8ff; }
.pf-reset { margin-top: 18px; }
.inv-item.knife { background-image: linear-gradient(160deg, rgba(160,106,255,.12), transparent 60%); }
.set-note.device { padding: 10px 12px; border-radius: 8px; background: rgba(79,163,255,.1); border: 1px solid rgba(79,163,255,.3); }
body.is-touch .kbd-only { display: none !important; }

/* ===== meta: missions / pass / rank ===== */
.mm-tile { position: relative; }
.mm-tile.accent2 { background: linear-gradient(160deg, rgba(61,255,122,.18), rgba(14,18,26,.8) 70%); border-color: rgba(61,255,122,.32); }
.mm-tile.accent3 { background: linear-gradient(160deg, rgba(160,106,255,.24), rgba(14,18,26,.8) 70%); border-color: rgba(160,106,255,.4); }
.tile-dot { position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: #ff4f5e; box-shadow: 0 0 0 3px rgba(255,79,94,.25); animation: pulse 1.4s infinite; }
.ms-body { display: flex; flex-direction: column; gap: 14px; }
.ms-sec { display: flex; flex-direction: column; gap: 8px; }
.ms-sec .sec-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ms-reset { font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.ms-note { font-size: 12px; }
.mission { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--color-surface-2); border: 1px solid var(--color-border); }
.mission.done { border-color: rgba(61,255,122,.55); background: linear-gradient(90deg, rgba(61,255,122,.12), var(--color-surface-2)); }
.mission.claimed { opacity: .55; }
.mi-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mi-main b { font-size: 14px; }
.mi-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.mi-bar.big { height: 10px; border-radius: 5px; margin: 6px 0; }
.mi-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f5a623, #ffd76a); border-radius: inherit; transition: width 400ms var(--ease); }
.mission.done .mi-bar i { background: linear-gradient(90deg, #3ecf6f, #7CFC98); }
.mi-p { font-size: 12px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.mi-rew { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; color: #ffd76a; white-space: nowrap; }
.mi-rew small { font-size: 11px; color: #b89aff; font-weight: 600; }
.mi-act { min-width: 74px; display: flex; justify-content: flex-end; }
.pass-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 16px; border-radius: 14px; background: linear-gradient(120deg, rgba(160,106,255,.25), rgba(14,18,26,.85)); border: 1px solid rgba(160,106,255,.4); }
.ph-tier { display: flex; align-items: baseline; gap: 4px; font-family: var(--font-display); }
.ph-tier b { font-size: 44px; color: #fff; } .ph-tier span { color: var(--color-text-muted); }
.ph-main b { font-size: 16px; }
.ph-main .muted { font-size: 12px; }
.prem-on { color: #ffd23f; font-weight: 700; }
.pass-rows { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: stretch; }
.pr-label { display: grid; grid-template-rows: 1fr 22px 1fr; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--color-text-muted); }
.pr-label span { display: flex; align-items: center; } .pr-label .prem { grid-row: 3; color: #ffd23f; }
.pass-track { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scroll-behavior: smooth; }
.pass-col { display: grid; grid-template-rows: 1fr 22px 1fr; gap: 0; flex: 0 0 116px; }
.pc-n { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--color-text-muted); border-top: 2px solid rgba(255,255,255,.12); }
.pass-col.reached .pc-n { color: #fff; border-top-color: #a06aff; }
.pass-col.current .pc-n { color: #ffd23f; }
.pass-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 104px; padding: 8px 6px; border-radius: 10px; cursor: pointer; color: inherit; font: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 16%, rgba(20,24,32,.9)), rgba(14,18,26,.9)); border: 1px solid color-mix(in srgb, var(--rc) 40%, transparent); transition: transform 160ms var(--ease); }
.pass-cell span { font-size: 11px; line-height: 1.2; text-align: center; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.pass-cell.prem { background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 22%, rgba(40,30,8,.9)), rgba(14,18,26,.9)); }
.pass-cell.can { box-shadow: 0 0 0 2px #3dff7a, 0 0 18px rgba(61,255,122,.35); animation: pulse 1.6s infinite; }
.pass-cell.claimed { opacity: .45; }
.pass-cell.locked img, .pass-cell.locked .rw-ico { filter: grayscale(.7) brightness(.7); }
.pass-cell:hover { transform: translateY(-2px); }
.pass-cell .ok, .pass-cell .lock { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 12px; }
.pass-cell .ok { color: #3dff7a; }
.rw-ico { width: 48px; height: 48px; object-fit: contain; }
.rw-ico.wide { width: 96px; height: 48px; }
.rw-ico.gold { display: flex; align-items: center; justify-content: center; font-size: 26px; }
.rw-ico.gold .coin, .rw-ico.gold svg { width: 34px; height: 34px; }
.rank-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 18px; border-radius: 14px; background: linear-gradient(120deg, color-mix(in srgb, var(--rk) 22%, transparent), rgba(14,18,26,.85)); border: 1px solid color-mix(in srgb, var(--rk) 45%, transparent); }
.rk-name { font-family: var(--font-display); font-size: 26px; color: var(--rk); font-weight: 400; }
.rank-card .mi-bar i { background: var(--rk); }
.rk-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 13px; color: var(--color-text-muted); }
.rk-stats b { color: #fff; }
/* rank ladder: wrap-safe so long rank names never overlap the RP numbers on
   narrow phone screens (moderation remark: overlapping text on iPhone) */
.rank-ladder { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.rl-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px; border-radius: 10px; background: var(--color-surface-2); border: 1px solid var(--color-border); font-size: 12px; opacity: .55; }
.rl-item span { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.rl-item small { margin-left: auto; color: var(--color-text-muted); flex-shrink: 0; }
@media (max-width: 420px) {
  .rank-ladder { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .rl-item { font-size: 11px; }
  .rl-item span { flex-basis: 100%; order: 3; }
  .rl-item small { margin-left: 0; }
}
.rl-item.past { opacity: .85; } .rl-item.on { opacity: 1; border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent) inset; }
.ms-actions { display: flex; justify-content: center; }
.rank-badge { flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); vertical-align: middle; }
.pf-rank, .acc-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--color-surface-2); border: 1px solid var(--color-border); }
.pf-rank > div, .acc-row > div { display: flex; flex-direction: column; gap: 2px; }
.pf-rank .muted, .acc-row .muted { font-size: 12px; }
.acc-row { justify-content: space-between; margin-bottom: 8px; }
.acc-row img { width: 40px; height: 40px; border-radius: 50%; }
.acc-row.on { justify-content: flex-start; border-color: rgba(61,255,122,.4); }
.pf-account { margin-bottom: 4px; }
.mode-card.locked { opacity: .5; filter: grayscale(.6); }
.mode-card .mode-rules .rank-badge { margin-right: 2px; }
@media (max-width: 640px) {
  .mission { grid-template-columns: 1fr auto; } .mi-rew { grid-column: 1; grid-row: 2; flex-direction: row; gap: 8px; align-items: baseline; } .mi-act { grid-row: 1 / 3; grid-column: 2; }
  .pass-head { grid-template-columns: auto 1fr; } .ph-prem { grid-column: 1 / -1; }
  .pass-rows { grid-template-columns: 1fr; } .pr-label { display: none; }
  .rank-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

/* ===== end screen extras ===== */
#end-extra .reward.pass b { color: #b89aff; }
#end-extra .reward.rank.up b { color: #3dff7a; } #end-extra .reward.rank.down b { color: #ff4f5e; }
#end-extra .reward.mission span { color: #7CFC98; } #end-extra .reward.mission b { font-size: 12px; color: var(--color-text-muted); }
#end-extra .reward span { display: flex; align-items: center; gap: 6px; }
.ad-badge { display: inline-block; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; background: #ffb02e; color: #111; vertical-align: middle; }
.case-img-wrap .ad-badge { position: absolute; top: 8px; right: 8px; }
.case-img-wrap { position: relative; }
.ad-card .btn.disabled, .btn.disabled { opacity: .5; pointer-events: none; }
#ad-demo { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.85); }
#ad-demo.hidden { display: none; }
.ad-box { position: relative; width: min(420px, 90vw); padding: 28px; border-radius: 14px; background: #1a1f2a; border: 1px solid var(--color-border); text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.ad-box .ad-tag { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: #ffb02e; color: #111; }
.ad-count { font-family: var(--font-display); font-size: 48px; color: var(--color-accent); }
#toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 210; padding: 10px 18px; border-radius: 10px; background: rgba(14,18,26,.95); border: 1px solid var(--color-border); font-weight: 700; font-size: 14px; display: flex; gap: 6px; align-items: center; animation: panel-in 260ms var(--ease); pointer-events: none; }
#toast.hidden { display: none; }
#toast.win { border-color: rgba(61,255,122,.55); } #toast.lose { border-color: rgba(255,79,94,.55); }
#toast .coin, #toast svg { width: 16px; height: 16px; }

/* ===== items: outfits & stickers ===== */
img.sq, .i-icon.sq, .res-icon.sq { aspect-ratio: 1 / 1 !important; object-fit: contain; max-height: 110px; }
.inv-stickers { position: absolute; right: 10px; bottom: 8px; z-index: 3; display: flex; align-items: center; gap: 6px; font-size: 12px; }
.st-slot { width: 38px; height: 38px; border-radius: 8px; border: 1px dashed rgba(255,255,255,.35); background: rgba(0,0,0,.4); color: #fff; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.st-slot img { width: 32px; height: 32px; }
.st-pick { position: absolute; right: 0; bottom: 46px; display: flex; flex-wrap: wrap; gap: 4px; max-width: 260px; padding: 8px; border-radius: 10px; background: rgba(14,18,26,.96); border: 1px solid var(--color-border); }
.st-pick.hidden { display: none; }
.st-opt { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--color-border); background: rgba(255,255,255,.05); cursor: pointer; color: #fff; display: flex; align-items: center; justify-content: center; }
.st-opt img { width: 34px; height: 34px; }

/* ===== HUD: economy, grenades, flash, hide & seek ===== */
#hud-armor { display: flex; align-items: center; gap: 4px; font-size: 18px; font-weight: 700; color: #9ad0ff; text-shadow: 0 1px 3px #000; }
#hud-armor svg { width: 18px; height: 18px; fill: #9ad0ff; }
#hud-armor.helmet svg { fill: #ffd76a; }
#hud-money { font-size: 20px; font-weight: 700; color: #7CFC98; text-shadow: 0 1px 3px #000; font-variant-numeric: tabular-nums; }
#hud-money.canbuy::after { content: ' · B'; font-size: 12px; color: var(--color-text-muted); }
body.touch-mode #hud-money.canbuy::after { content: ''; }
#hud-nades { display: flex; gap: 6px; justify-content: flex-end; align-items: center; margin-bottom: 4px; }
#hud-nades .nade { display: flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; opacity: .55; }
#hud-nades .nade.on { opacity: 1; }
#hud-nades .nade i { display: block; width: 14px; height: 18px; border-radius: 4px 4px 6px 6px; border: 2px solid rgba(255,255,255,.7); }
#hud-nades .nade.he i { background: #4a6a2a; } #hud-nades .nade.flash i { background: #ddd; } #hud-nades .nade.smoke i { background: #5a5e66; }
#hud-nades .nade.on i { border-color: var(--color-accent); box-shadow: 0 0 8px rgba(245,166,35,.6); }
#hud-nades kbd { font-size: 10px; }
#flash-overlay { position: fixed; inset: 0; z-index: 9; background: #fff; opacity: 0; pointer-events: none; }
/* WebGL context recovery overlay (screen turns black when the GPU context is lost) */
#ctx-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(5, 6, 10, .82); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; pointer-events: none; }
#ctx-overlay.hidden { display: none; }
#ctx-overlay b { font-family: var(--font-display); font-size: 26px; font-weight: 400; color: var(--color-text-muted); animation: ctx-pulse 1.6s ease-in-out infinite; }
#ctx-overlay span { font-family: var(--font-display); font-size: 15px; color: var(--color-accent); }
@keyframes ctx-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
#blind-overlay { position: fixed; inset: 0; z-index: 9; background: #05060a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; pointer-events: none; }
#blind-overlay.hidden { display: none; }
#blind-overlay b { font-family: var(--font-display); font-size: 28px; font-weight: 400; color: var(--color-text-muted); }
#blind-overlay span { font-family: var(--font-display); font-size: 64px; color: var(--color-accent); }
body.fell #game-container { filter: brightness(1.8) saturate(.4); transition: filter 0s; }
body.no-nades .tb-grenade, body.no-nades .tb-nade { display: none; }
.buy-cats.eco { grid-template-columns: repeat(6, 1fr); }
.buy-item .price { font-size: 13px; font-weight: 700; color: #7CFC98; }
.buy-item.owned { cursor: default; }
.buy-item.owned:hover { background: rgba(245,166,35,.12); }
.buy-item.owned .price { color: var(--color-accent); }
.buy-item.poor { opacity: .45; }
.buy-item.poor .price { color: #ff4f5e; }
.gear-ico { display: block; width: 46px; height: 46px; margin: 6px auto; border-radius: 8px; background: rgba(255,255,255,.08) center / 70% no-repeat; }
.gear-ico.kevlar { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l8 3v6c0 5-3.5 9.5-8 11-4.5-1.5-8-6-8-11V5z' fill='%239ad0ff'/%3E%3C/svg%3E"); }
.gear-ico.helmet { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 15a9 9 0 0118 0v2H3z' fill='%23ffd76a'/%3E%3Cpath d='M2 17h20v3H2z' fill='%239ad0ff'/%3E%3C/svg%3E"); }
.gear-ico.he, .gear-ico.flash, .gear-ico.smoke { background-image: none; position: relative; }
.gear-ico.he::after, .gear-ico.flash::after, .gear-ico.smoke::after { content: ''; position: absolute; left: 30%; top: 22%; width: 40%; height: 62%; border-radius: 6px 6px 10px 10px; border: 2px solid rgba(255,255,255,.7); }
.gear-ico.he::after { background: #4a6a2a; } .gear-ico.flash::after { background: #ddd; } .gear-ico.smoke::after { background: #5a5e66; }
.eco-money { font-size: 22px; font-weight: 700; color: #7CFC98; margin-right: 10px; }
@media (max-width: 900px) { .buy-cats.eco { grid-template-columns: repeat(3, 1fr); } }
.buy-cats.eco .buy-cat:last-child { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; }
.buy-cats.eco .buy-cat:last-child h4 { grid-column: 1 / -1; margin-bottom: 0; }
.buy-cats.eco .buy-cat:last-child .buy-item { margin-bottom: 0; padding: 6px 4px; }
.buy-cats.eco .buy-cat:last-child .buy-item b { font-size: 11px; text-align: center; line-height: 1.15; }
.buy-cats.eco .gear-ico { width: 34px; height: 34px; margin: 2px auto; }
.buy-cats.eco { grid-template-columns: repeat(5, 1fr) 1.4fr; }
.mm-tile .tile-ico { width: 46px; height: 46px; object-fit: contain; margin: -6px 0 2px -4px; filter: drop-shadow(0 3px 5px rgba(0,0,0,.55)); transition: transform 180ms var(--ease); }
.mm-tile:hover .tile-ico { transform: scale(1.1) rotate(-4deg); }
.rank-badge { object-fit: contain; }
@media (max-height: 520px) and (orientation: landscape) { .mm-tile .tile-ico { width: 30px; height: 30px; margin: -2px 0 0; } }

/* ============ daily reward / free case chips ============ */
.reward-chip { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 10px; cursor: pointer; text-align: left; background: rgba(14,18,26,.75); border: 1px solid var(--color-border); color: inherit; font: inherit; transition: border-color 160ms, transform 160ms; }
.reward-chip:hover { border-color: rgba(255,176,46,.6); transform: translateY(-1px); }
.reward-chip.ready { border-color: rgba(255,176,46,.55); box-shadow: 0 0 0 1px rgba(255,176,46,.15), 0 6px 18px rgba(245,166,35,.15); }
.reward-chip .rc-text { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.reward-chip .rc-text b { font-size: 13px; }
.reward-chip .rc-text > span { font-size: 11px; color: var(--color-text-muted); display: flex; align-items: center; gap: 4px; }
.reward-chip.ready .rc-text > span { color: #ffd36a; }
.reward-chip .tile-dot { top: -3px; right: -3px; }
.gift-ico { width: 30px; height: 30px; fill: #ffb02e; flex: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.rc-img { width: 34px; height: 30px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
#daily-modal { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; background: rgba(5,7,12,.78); padding: 16px; }
#daily-modal.hidden { display: none; }
.dm-box { position: relative; width: min(640px, 96vw); padding: 22px; border-radius: 16px; background: #171c26; border: 1px solid var(--color-border); box-shadow: 0 20px 60px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 16px; }
.dm-head { display: flex; align-items: center; gap: 14px; }
.dm-head .gift-ico { width: 46px; height: 46px; }
.dm-head h3 { font-size: 22px; margin: 0 0 2px; }
.dm-head p { margin: 0; font-size: 13px; }
.dm-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 8px; border: 0; background: rgba(255,255,255,.06); color: #cfd6e0; font-size: 20px; cursor: pointer; }
.dm-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.dm-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 4px; min-height: 86px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--color-border); text-align: center; }
.dm-day span { font-size: 11px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .5px; }
.dm-day b { font-size: 14px; color: #ffd76a; display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.dm-day img { width: 52px; height: 44px; object-fit: contain; }
.dm-day.big { background: linear-gradient(180deg, rgba(143,208,255,.14), rgba(143,208,255,.03)); }
.dm-day.today { border-color: var(--color-accent); background: rgba(245,166,35,.12); box-shadow: 0 0 0 2px rgba(245,166,35,.25); }
.dm-day.today span { color: var(--color-accent); font-weight: 700; }
.dm-day.done { opacity: .5; }
.dm-check { position: absolute; top: 4px; right: 6px; font-style: normal; color: #4ade80; font-size: 12px; }
.dm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dm-actions .btn.disabled { opacity: .5; pointer-events: none; }
/* compact chips: icon only, with an AD corner badge on the free case */
.rc-ad { display: none; position: absolute; bottom: -4px; right: -4px; font-style: normal; font-size: 9px; font-weight: 800; padding: 1px 4px; border-radius: 4px; background: #ffb02e; color: #111; }
@media (max-width: 1100px) { .reward-chip .rc-text { display: none; } .reward-chip { padding: 6px 8px; } .reward-chip.ready .rc-ad { display: block; } }
@media (max-width: 560px) { .dm-days { grid-template-columns: repeat(4, 1fr); } }
@media (max-height: 520px) and (orientation: landscape) {
  .reward-chip .rc-text { display: none; } .reward-chip { padding: 5px 7px; } .reward-chip.ready .rc-ad { display: block; }
  .dm-box { padding: 14px; gap: 10px; } .dm-day { min-height: 66px; padding: 6px 2px; } .dm-day img { width: 40px; height: 32px; }
}

/* ================= Playgama build additions ================= */
/* no text selection / callouts on long press (inputs keep normal behaviour) */
html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { touch-action: none; }
.screen, .screen *, .dm-box, .dm-box * { touch-action: pan-x pan-y; }
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img { -webkit-user-drag: none; user-drag: none; }

/* desktop: game field no wider than 2:1 (or taller than 1:2) — margins instead of a stretched strip.
   transform makes body the containing block for all fixed-position layers (canvas, screens, HUD). */
html { background: #000; }
body.boxed {
  position: fixed; left: 50%; top: 50%;
  width: var(--fit-w); height: var(--fit-h);
  transform: translate(-50%, -50%);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04);
}
body.boxed .menu-panel.wide { max-width: 96%; }

/* quick sound / language buttons in the main menu */
.quick-btns { display: flex; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 40px; height: 40px; padding: 0 9px; border-radius: 10px; cursor: pointer; background: rgba(14,18,26,.75); border: 1px solid var(--color-border); color: var(--color-text); font: 700 12px var(--font-body); letter-spacing: .5px; transition: border-color 160ms, transform 160ms; }
.icon-btn:hover { border-color: rgba(255,255,255,.35); transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.icon-btn.off { color: var(--color-red); border-color: rgba(255,79,94,.45); }
.sound-toggle-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.sound-toggle-row svg { width: 18px; height: 18px; fill: currentColor; }
.sound-toggle-row.off { color: var(--color-red); }
@media (max-height: 520px) and (orientation: landscape) { .icon-btn { height: 34px; min-width: 34px; padding: 0 7px; } }
/* narrow portrait screens: the top bar becomes two rows so nothing is cut off:
   logo on top; sound/language on the left and reward/profile/gold chips on the right below it */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topbar-right { width: 100%; gap: 8px; }
  .quick-btns { margin-right: auto; }
  .icon-btn { height: 38px; min-width: 38px; padding: 0 7px; }
  #mm-profile-chip .pc-text { display: none; }
}
