* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #0a0c0e;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
#game, #game canvas { position: fixed; inset: 0; }

/* ===== HUD ===== */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }

#crosshair {
  position: absolute; left: 50%; top: 50%;
  width: 0; height: 0; transition: opacity .15s;
}
.ch { position: absolute; background: rgba(255,255,255,.9); box-shadow: 0 0 2px rgba(0,0,0,.8); }
.ch.t { width: 2px; height: 8px; left: -1px; top: -14px; }
.ch.b { width: 2px; height: 8px; left: -1px; top: 6px; }
.ch.l { width: 8px; height: 2px; left: -14px; top: -1px; }
.ch.r { width: 8px; height: 2px; left: 6px; top: -1px; }
.ch.dot { width: 2px; height: 2px; left: -1px; top: -1px; border-radius: 50%; }

#hitmarker {
  position: absolute; left: 50%; top: 50%;
  width: 0; height: 0; opacity: 0;
}
#hitmarker span {
  position: absolute; width: 10px; height: 2px; background: #fff;
}
#hitmarker span:nth-child(1) { transform: translate(-12px, -9px) rotate(45deg); }
#hitmarker span:nth-child(2) { transform: translate(2px, -9px) rotate(-45deg); }
#hitmarker span:nth-child(3) { transform: translate(-12px, 7px) rotate(-45deg); }
#hitmarker span:nth-child(4) { transform: translate(2px, 7px) rotate(45deg); }
#hitmarker.show { opacity: 1; }
#hitmarker.show.head span { background: #ff4a3a; }

#score-bar {
  position: absolute; top: max(10px, env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px;
  background: rgba(10,12,14,.55);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 6px 18px;
  backdrop-filter: blur(6px);
}
.score-box { display: flex; align-items: baseline; gap: 6px; color: #fff; }
.score-box .label { font-size: 11px; color: rgba(255,255,255,.55); }
.score-box span:last-child { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.score-title {
  font-size: 13px; font-weight: 800; letter-spacing: 4px;
  color: rgba(255,255,255,.35);
}

#killfeed {
  position: absolute; top: max(60px, calc(env(safe-area-inset-top) + 50px)); right: 14px;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-end;
}
.feed-item {
  background: rgba(10,12,14,.55);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  transition: opacity .5s;
}
.feed-item.mine { border-color: rgba(120,200,255,.4); color: #bfe3ff; }

#hp-bar {
  position: absolute; left: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px;
}
#hp-num {
  color: #fff; font-size: 28px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
  min-width: 56px;
}
#hp-track {
  width: 160px; height: 6px;
  background: rgba(255,255,255,.15);
  border-radius: 3px; overflow: hidden;
}
#hp-fill {
  width: 100%; height: 100%;
  background: #e8e8e8;
  border-radius: 3px;
  transition: width .15s, background .3s;
}

#ammo-bar {
  position: absolute; right: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
#ammo { font-size: 34px; font-weight: 800; }
.ammo-sep { font-size: 20px; color: rgba(255,255,255,.4); margin: 0 4px; }
#reserve { font-size: 18px; color: rgba(255,255,255,.6); }

#dmg-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(180,10,5,.55) 100%);
  opacity: 0; transition: opacity .25s;
}

#death-overlay {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(20,4,2,.55);
  backdrop-filter: blur(3px);
}
.death-title {
  color: #ff5a4a; font-size: 42px; font-weight: 900; letter-spacing: 12px;
}
.death-sub { color: rgba(255,255,255,.7); font-size: 15px; margin-top: 12px; }
#respawn-num { font-size: 22px; font-weight: 800; color: #fff; }

/* ===== 移动端触控 ===== */
#touch-ui { display: none; position: fixed; inset: 0; z-index: 20; pointer-events: none; }
#look-layer {
  position: absolute; right: 0; top: 0;
  width: 55%; height: 100%;
  pointer-events: auto;
}
#joystick {
  position: absolute; left: 26px; bottom: 90px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 1.5px solid rgba(255,255,255,.22);
  pointer-events: auto;
}
#joy-knob {
  position: absolute; left: 50%; top: 50%;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
  border: 1.5px solid rgba(255,255,255,.4);
}
#touch-ui > div[id^="btn-"] {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: rgba(255,255,255,.85);
  font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.25);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
#touch-ui > div[id^="btn-"]:active { background: rgba(255,255,255,.25); }
#btn-fire {
  right: 30px; bottom: 86px;
  width: 88px; height: 88px;
  background: rgba(220,60,40,.22);
  border-color: rgba(255,110,90,.5);
  font-size: 17px;
}
#btn-aim { right: 138px; bottom: 66px; width: 62px; height: 62px; }
#btn-reload { right: 128px; bottom: 150px; width: 56px; height: 56px; }
#btn-jump { right: 36px; bottom: 196px; width: 62px; height: 62px; }

/* ===== 开始界面 ===== */
#start-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(60,90,130,.35), transparent 60%),
    linear-gradient(160deg, #0c1016 0%, #141a22 50%, #0a0d11 100%);
}
.start-inner { text-align: center; padding: 20px; }
.game-logo {
  font-size: 84px; font-weight: 900; letter-spacing: 26px;
  color: #f0f2f5;
  text-shadow: 0 0 40px rgba(120,180,255,.35);
  margin-left: 26px;
}
.game-sub {
  color: rgba(255,255,255,.5);
  font-size: 15px; letter-spacing: 6px;
  margin-top: 8px;
}
.game-desc {
  color: rgba(255,255,255,.65);
  font-size: 13px; line-height: 2;
  margin: 34px 0;
}
#start-btn {
  pointer-events: auto;
  background: linear-gradient(135deg, #d8432e, #b02a1a);
  color: #fff;
  border: none;
  font-size: 18px; font-weight: 700; letter-spacing: 6px;
  padding: 15px 64px 15px 70px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 6px 30px rgba(216,67,46,.35);
  transition: transform .15s, box-shadow .15s;
}
#start-btn:active { transform: scale(.96); box-shadow: 0 2px 12px rgba(216,67,46,.35); }

/* 横屏小屏适配 */
@media (max-height: 500px) {
  #joystick { left: 18px; bottom: 60px; width: 96px; height: 96px; }
  #btn-fire { right: 22px; bottom: 60px; width: 76px; height: 76px; }
  #btn-aim { right: 116px; bottom: 46px; width: 54px; height: 54px; }
  #btn-reload { right: 108px; bottom: 118px; width: 48px; height: 48px; }
  #btn-jump { right: 28px; bottom: 152px; width: 54px; height: 54px; }
  #hp-track { width: 110px; }
  #hp-num { font-size: 22px; }
  #ammo { font-size: 26px; }
  .game-logo { font-size: 56px; letter-spacing: 16px; }
  .game-desc { margin: 18px 0; }
}

/* ===== 开镜红点 ===== */
#reddot {
  display: none;
  position: absolute; left: 50%; top: 50%;
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #ff2a1a;
  box-shadow: 0 0 5px rgba(255,42,26,.9);
}

/* ===== 声纹方向指示 ===== */
#sound-ring {
  position: absolute; left: 50%; top: 50%;
  width: 0; height: 0;
}
.snd-ping {
  position: absolute;
  width: 18px; height: 5px;
  margin: -2.5px 0 0 -9px;
  border-radius: 3px;
  opacity: 0;
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 4px rgba(0,0,0,.6);
}
.snd-ping.shot { background: #ff5a3a; box-shadow: 0 0 6px rgba(255,90,58,.8); }

/* ===== 陀螺仪调试 ===== */
#gyro-debug {
  display: none;
  position: absolute;
  top: max(52px, calc(env(safe-area-inset-top) + 42px));
  left: 14px;
  color: rgba(120,255,150,.9);
  font-size: 11px;
  font-family: monospace;
  background: rgba(0,0,0,.4);
  padding: 3px 8px;
  border-radius: 5px;
}

/* ===== 游戏内设置按钮 ===== */
#gear-btn {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  pointer-events: auto;
  color: rgba(255,255,255,.85);
  font-size: 14px;
  background: rgba(10,12,14,.6);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  padding: 10px 18px;
}

/* ===== 设置面板 ===== */
#settings-open {
  display: block;
  margin: 16px auto 0;
  background: transparent;
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.25);
  font-size: 14px; letter-spacing: 4px;
  padding: 10px 36px 10px 40px;
  border-radius: 10px;
  cursor: pointer;
}
#settings-panel {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5,7,9,.75);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
#settings-panel.open { display: flex; }
.set-inner {
  width: min(480px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: rgba(18,22,28,.95);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 22px 24px;
}
.set-title {
  color: #fff; font-size: 20px; font-weight: 800;
  letter-spacing: 8px; text-align: center;
  margin-bottom: 20px;
}
.set-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.set-row label {
  color: rgba(255,255,255,.8);
  font-size: 14px;
  width: 110px; flex-shrink: 0;
}
.set-row input[type="range"] {
  flex: 1;
  accent-color: #d8432e;
  height: 28px;
}
.set-row span {
  color: #fff; font-size: 13px;
  width: 34px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.set-row.toggle input {
  width: 22px; height: 22px;
  accent-color: #d8432e;
}
#settings-close {
  display: block;
  margin: 10px auto 0;
  background: linear-gradient(135deg, #d8432e, #b02a1a);
  color: #fff; border: none;
  font-size: 15px; font-weight: 700; letter-spacing: 4px;
  padding: 11px 48px 11px 52px;
  border-radius: 9px;
  cursor: pointer;
}
#layout-open {
  display: block;
  margin: 14px auto 0;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.25);
  font-size: 14px; letter-spacing: 3px;
  padding: 10px 30px;
  border-radius: 9px;
  cursor: pointer;
}
#quit-btn {
  display: block;
  margin: 14px auto 0;
  background: transparent;
  color: rgba(255,120,110,.8);
  border: 1px solid rgba(255,100,90,.35);
  font-size: 13px; letter-spacing: 3px;
  padding: 9px 30px;
  border-radius: 9px;
  cursor: pointer;
}

/* ===== 按键布局编辑 ===== */
#layout-bar {
  display: none;
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  align-items: center;
  gap: 12px;
  background: rgba(10,12,14,.85);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 8px 14px;
  white-space: nowrap;
}
#layout-bar.open { display: flex; }
.layout-tip { color: rgba(255,255,255,.75); font-size: 12px; }
#layout-size { width: 120px; accent-color: #d8432e; }
#layout-bar button {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 7px;
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
}
#layout-done { background: #d8432e !important; border-color: #d8432e !important; }
body.layout-mode .edit-el {
  outline: 2px dashed rgba(120,200,255,.7);
  outline-offset: 4px;
}
body.layout-mode .edit-el.sel {
  outline: 2px solid #ffb03a;
  outline-offset: 4px;
}

/* ===== 捏雷读秒 ===== */
#cook-num {
  display: none;
  position: fixed;
  left: 50%; top: 58%;
  transform: translateX(-50%);
  z-index: 30;
  color: #ff5a3a;
  font-size: 34px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(255,60,30,.7), 0 1px 3px rgba(0,0,0,.8);
  pointer-events: none;
}

/* ===== 治疗进度条 ===== */
#heal-bar {
  display: none;
  position: fixed;
  left: 50%; bottom: 120px;
  transform: translateX(-50%);
  z-index: 30;
  text-align: center;
  pointer-events: none;
}
.heal-text {
  color: #8affa0;
  font-size: 13px;
  margin-bottom: 5px;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
.heal-track {
  width: 180px; height: 8px;
  background: rgba(255,255,255,.15);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
}
#heal-fill {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  border-radius: 4px;
}

/* ===== 竖屏提示 ===== */
#rotate-tip {
  display: none;
  position: fixed; inset: 0; z-index: 300;
  background: #0a0d11;
  align-items: center; justify-content: center;
  text-align: center;
  color: rgba(255,255,255,.85);
  font-size: 20px; letter-spacing: 4px; line-height: 2.2;
}
@media (orientation: portrait) {
  body.is-mobile #rotate-tip { display: flex; }
}

/* ===== 狙击镜遮罩 ===== */
#scope-overlay {
  display: none;
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, transparent 26vmin, rgba(0,0,0,.97) 27vmin);
}
.scope-h, .scope-v { position: absolute; background: rgba(0,0,0,.85); }
.scope-h { left: 50%; top: 50%; width: 40vmin; height: 1.5px; transform: translate(-50%,-50%); }
.scope-v { left: 50%; top: 50%; width: 1.5px; height: 40vmin; transform: translate(-50%,-50%); }

/* ===== 物品栏（三组布局：左药品 / 中刀枪 / 右投掷） ===== */
#item-bar, #item-left, #item-right, #pickup-btn, #pickup-hint {
  position: fixed;
  z-index: 30;
  pointer-events: auto;
}
#item-bar {
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
#item-left {
  left: max(16px, env(safe-area-inset-left));
  bottom: 62px;
  display: flex;
  gap: 6px;
}
#item-right {
  right: 110px;
  bottom: 250px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.slot {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-width: 62px;
  padding: 5px 8px 4px;
  background: rgba(10,12,14,.55);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  color: rgba(255,255,255,.75);
  pointer-events: auto;
  position: relative;
}
.slot.active {
  border-color: rgba(255,180,80,.8);
  background: rgba(60,40,15,.6);
  color: #ffd28a;
}
.slot-key {
  position: absolute; top: 1px; left: 5px;
  font-size: 9px; color: rgba(255,255,255,.35);
}
.slot-name { font-size: 12px; margin-top: 6px; white-space: nowrap; }
.slot-count { font-size: 11px; color: rgba(255,255,255,.5); font-variant-numeric: tabular-nums; }
.slot.active .slot-count { color: rgba(255,210,138,.8); }

/* ===== 拾取 ===== */
#pickup-btn {
  display: none;
  position: absolute;
  right: 130px; bottom: 240px;
  padding: 12px 22px;
  background: rgba(20,60,30,.75);
  border: 1.5px solid rgba(120,255,150,.6);
  border-radius: 10px;
  color: #bfffce;
  font-size: 15px; font-weight: 700;
  pointer-events: auto;
}
#pickup-hint {
  display: none;
  position: absolute;
  bottom: 90px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.85);
  font-size: 14px;
  background: rgba(0,0,0,.5);
  padding: 5px 14px;
  border-radius: 7px;
}
@media (max-height: 500px) {
  #item-bar { bottom: 6px; }
  #item-left { bottom: 56px; }
  #item-right { right: 96px; bottom: 220px; }
  .slot { min-width: 52px; padding: 3px 6px 3px; }
  .slot-name { font-size: 11px; }
  #pickup-btn { bottom: 170px; right: 110px; padding: 9px 16px; }
}

/* ===== 联机入口 ===== */
.online-box {
  margin: 0 auto 18px;
  max-width: 320px;
}
.online-box input {
  width: 100%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  padding: 11px 14px;
  outline: none;
  text-align: center;
}
.online-box input:focus { border-color: rgba(120,180,255,.6); }
.online-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.online-row input { flex: 1; }
.online-or { color: rgba(255,255,255,.4); font-size: 12px; flex-shrink: 0; }
#create-btn, #join-btn {
  background: linear-gradient(135deg, #2a6ad8, #1a4a9a);
  color: #fff;
  border: none;
  font-size: 14px; font-weight: 700;
  padding: 11px 18px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
#join-btn { padding: 11px 16px; }
#online-status {
  color: rgba(255,200,100,.85);
  font-size: 12px;
  margin-top: 8px;
  min-height: 16px;
}
#room-info {
  display: none;
  position: absolute;
  top: max(52px, calc(env(safe-area-inset-top) + 42px));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.55);
  font-size: 12px;
  background: rgba(10,12,14,.4);
  padding: 3px 12px;
  border-radius: 6px;
}

/* ===== 联机大厅 ===== */
#lobby {
  display: none;
  position: fixed; inset: 0; z-index: 150;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(60,90,130,.3), transparent 60%),
    linear-gradient(160deg, #0c1016 0%, #141a22 50%, #0a0d11 100%);
  align-items: center; justify-content: center;
}
#lobby.open { display: flex; }
.lobby-inner {
  width: min(520px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  text-align: center;
  padding: 16px;
}
.lobby-title {
  color: #fff; font-size: 26px; font-weight: 800; letter-spacing: 4px;
}
#lobby-code { color: #ffb03a; letter-spacing: 8px; }
#copy-code {
  margin-top: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.75);
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.lobby-teams {
  display: flex;
  gap: 10px;
  margin: 18px 0;
  align-items: stretch;
}
.team-col { flex: 1; }
.team-vs {
  align-self: center;
  color: rgba(255,255,255,.3);
  font-weight: 900; font-size: 18px;
}
.team-name { font-size: 15px; font-weight: 800; margin-bottom: 8px; letter-spacing: 3px; }
.team-name.red { color: #ff5a4a; }
.team-name.blue { color: #5aa8ff; }
.team-list {
  display: flex; flex-direction: column; gap: 6px;
  min-height: 180px;
}
.team-slot {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: rgba(255,255,255,.85);
  font-size: 14px;
  padding: 9px 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.team-slot.empty {
  border-style: dashed;
  color: rgba(255,255,255,.2);
}
.team-slot.me { border-color: #ffb03a; color: #ffd28a; }
.team-slot.host::after { content: ' ★'; color: #ffb03a; }
#switch-team {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.85);
  font-size: 14px; letter-spacing: 3px;
  padding: 10px 32px;
  border-radius: 9px;
  cursor: pointer;
}
#host-start {
  display: none;
  margin-top: 14px;
  background: linear-gradient(135deg, #d8432e, #b02a1a);
  color: #fff; border: none;
  font-size: 17px; font-weight: 700; letter-spacing: 6px;
  padding: 13px 60px 13px 66px;
  border-radius: 10px;
  cursor: pointer;
}
#lobby-wait {
  display: none;
  margin-top: 14px;
  color: rgba(255,255,255,.5);
  font-size: 14px;
}
#lobby-leave {
  display: block;
  margin: 14px auto 0;
  background: transparent;
  color: rgba(255,120,110,.7);
  border: 1px solid rgba(255,100,90,.3);
  font-size: 13px;
  padding: 8px 26px;
  border-radius: 8px;
  cursor: pointer;
}

/* ===== 比赛顶部信息 ===== */
#match-top {
  display: none;
  position: absolute;
  top: max(52px, calc(env(safe-area-inset-top) + 42px));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.85);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(10,12,14,.5);
  padding: 4px 16px;
  border-radius: 7px;
  white-space: nowrap;
}
#match-top .r { color: #ff5a4a; }
#match-top .b { color: #5aa8ff; }
#match-top .t { color: rgba(255,255,255,.55); margin-left: 10px; font-weight: 400; }

/* ===== 比赛结束 ===== */
#end-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 160;
  background: rgba(5,7,10,.85);
  backdrop-filter: blur(6px);
  flex-direction: column;
  align-items: center; justify-content: center;
}
#end-overlay.open { display: flex; }
.end-title {
  font-size: 44px; font-weight: 900; letter-spacing: 10px;
  color: #ffd28a;
}
.end-score {
  color: rgba(255,255,255,.75);
  font-size: 20px;
  margin: 16px 0 30px;
  font-variant-numeric: tabular-nums;
}
#end-back {
  background: linear-gradient(135deg, #d8432e, #b02a1a);
  color: #fff; border: none;
  font-size: 16px; font-weight: 700; letter-spacing: 4px;
  padding: 12px 46px 12px 50px;
  border-radius: 10px;
  cursor: pointer;
}
