/* Gun Duel — shared visual language (layout lives in desktop.css / mobile.css) */

:root {
  --bg: #080c12;
  --bg-2: #0d141d;
  --panel: rgba(20, 28, 39, 0.92);
  --panel-2: rgba(28, 38, 52, 0.75);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --ink: #e9f0f8;
  --muted: #8b9bb0;
  --accent: #ff5b5b;
  --accent-2: #ff8a3d;
  --gold: #ffc94d;
  --teal: #35d6c0;
  --blue: #4aa8ff;
  --violet: #a97bff;
  --ok: #3ddc84;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --neon-1: #ff2d6f;
  --neon-2: #22d3ee;
  --neon-3: #a97bff;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

button, .act, .diff-btn, .mode-card, .btn { touch-action: manipulation; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(1100px 620px at 12% -10%, rgba(255, 91, 91, 0.18), transparent 60%),
    radial-gradient(900px 700px at 100% 0%, rgba(74, 168, 255, 0.14), transparent 55%),
    radial-gradient(800px 600px at 50% 120%, rgba(169, 123, 255, 0.12), transparent 60%),
    /* 压暗层：让霓虹文字与玻璃面板在照片背景上保持对比度 */
    linear-gradient(180deg, rgba(6, 9, 14, 0.46), rgba(6, 9, 14, 0.64)),
    url("/images/bg.png") center / cover no-repeat,
    var(--bg);
}

/* ------------------------------------------------------- neon backdrop fx */
@property --fx-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

body::before {
  content: "";
  position: fixed;
  inset: -15%;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.17) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.17) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(115% 95% at 50% 106%, #000 10%, transparent 68%);
  mask-image: radial-gradient(115% 95% at 50% 106%, #000 10%, transparent 68%);
  animation: fxGrid 9s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 3px),
    radial-gradient(58% 44% at 12% 0%, rgba(255, 45, 111, 0.22), transparent 70%),
    radial-gradient(54% 44% at 92% 6%, rgba(34, 211, 238, 0.18), transparent 70%),
    radial-gradient(70% 50% at 50% 118%, rgba(169, 123, 255, 0.2), transparent 70%);
  animation: fxBreathe 7s ease-in-out infinite;
}

@keyframes fxGrid {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(44px, 44px, 0); }
}

@keyframes fxBreathe {
  0%, 100% { opacity: 0.58; }
  50% { opacity: 1; }
}

button, input { font-family: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
button:disabled { cursor: not-allowed; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sprite symbol { }

svg { width: 1em; height: 1em; display: block; }

/* !important：需要盖过 .btn / .panel 等自带 display 的规则 */
.is-hidden { display: none !important; }

.app {
  position: relative;
  z-index: 1;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

/* ---------------------------------------------------------------- screens */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.screen.is-active {
  display: grid;
  opacity: 1;
}

/* ------------------------------------------------------------------ start */
.screen--start { padding: 18px clamp(14px, 3vw, 40px); }

.start-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(255, 91, 91, 0.95), rgba(255, 138, 61, 0.85));
  color: #1a0f0f;
  font-size: 26px;
  box-shadow: 0 10px 24px rgba(255, 91, 91, 0.35);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 19px;
  border: 1px solid rgba(255, 45, 111, 0.55);
  box-shadow: 0 0 26px rgba(255, 45, 111, 0.45), inset 0 0 18px rgba(34, 211, 238, 0.25);
  pointer-events: none;
  animation: fxPulse 2.8s ease-in-out infinite;
}

@keyframes fxPulse {
  0%, 100% { transform: scale(0.94); opacity: 0.4; }
  50% { transform: scale(1.06); opacity: 0.95; }
}

.brand-text h1 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: 0.04em;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand-text h1 {
    background-image: linear-gradient(95deg, #ffffff 0%, var(--neon-1) 22%, var(--accent-2) 40%, var(--neon-2) 64%, #ffffff 100%);
    background-size: 240% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 16px rgba(255, 45, 111, 0.35));
    animation: fxTitleFlow 7s linear infinite;
  }
}

@keyframes fxTitleFlow {
  from { background-position: 0 0; }
  to { background-position: 240% 0; }
}

.brand-text p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: clamp(11px, 1.1vw, 13px);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  backdrop-filter: blur(8px);
}

.lang-icon { font-size: 15px; color: var(--muted); margin: 0 4px 0 8px; }

.lang-btn {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  transition: all 0.16s ease;
}

.lang-btn.is-active {
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(255, 91, 91, 0.32);
}

/* 设置入口：顶栏齿轮按钮 */
.top-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 18px;
  backdrop-filter: blur(8px);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.top-btn:hover { color: var(--ink); border-color: var(--line-2); }

/* ------------------------------------------------------------- site nav */
.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  backdrop-filter: blur(8px);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-2);
  box-shadow: 0 0 10px var(--neon-2);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  background: linear-gradient(140deg, rgba(34, 211, 238, 0.18), rgba(255, 45, 111, 0.18));
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.42), 0 0 18px rgba(34, 211, 238, 0.28);
  outline: none;
}

.nav-link:hover .nav-dot,
.nav-link:focus-visible .nav-dot {
  background: var(--neon-1);
  box-shadow: 0 0 12px var(--neon-1);
}

.start-main { display: grid; gap: clamp(12px, 2vw, 26px); align-content: center; }

.mode-list { display: grid; gap: 10px; align-content: start; }

.mode-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 20, 29, 0.62);
  backdrop-filter: blur(10px) saturate(1.15);
  text-align: left;
  overflow: hidden;
  transition: all 0.18s ease;
}

.mode-card:hover { border-color: var(--line-2); transform: translateY(-1px); }

.mode-card.is-active {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.28), 0 0 26px rgba(34, 211, 238, 0.18), 0 14px 30px rgba(0, 0, 0, 0.45);
}

/* 流光描边：hover / 选中时亮起 */
.mode-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--fx-angle), transparent 0 55%, rgba(34, 211, 238, 0.9) 72%, rgba(255, 45, 111, 0.9) 86%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  animation: fxSpin 4.5s linear infinite;
}

.mode-card:hover::after,
.mode-card.is-active::after { opacity: 1; }

@keyframes fxSpin { to { --fx-angle: 360deg; } }

.mode-icon {
  width: 40px; height: 40px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--panel-2);
  font-size: 21px;
  color: var(--gold);
}

.mode-card.is-active .mode-icon { color: var(--neon-2); }

.mode-body { display: grid; gap: 2px; }
.mode-body b { font-size: 15px; }
.mode-body i { font-style: normal; font-size: 12px; color: var(--muted); }

.start-panels { position: relative; }

.name-input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.32);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.name-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(53, 214, 192, 0.15); }
.name-input::placeholder { color: var(--muted); font-weight: 400; }

.panel {
  display: none;
  padding: clamp(14px, 1.8vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 20, 29, 0.68);
  backdrop-filter: blur(10px) saturate(1.15);
  box-shadow: var(--shadow);
}

.panel.is-active { display: grid; gap: 12px; animation: rise 0.25s ease; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel h2 { margin: 0; font-size: 16px; letter-spacing: 0.03em; }

.diff-grid { display: grid; gap: 8px; }

/* 档位数为奇数时，最后一档占满整行 */
.diff-grid > .diff-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }

.diff-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  text-align: left;
  transition: all 0.16s ease;
}

.diff-btn .diff-ico { font-size: 19px; }
.diff-btn .diff-body { display: grid; gap: 1px; }
.diff-btn b { font-size: 14px; }
.diff-btn i { font-style: normal; font-size: 11.5px; color: var(--muted); }

.diff-btn.is-active {
  border-color: rgba(53, 214, 192, 0.5);
  background: linear-gradient(140deg, rgba(53, 214, 192, 0.16), rgba(74, 168, 255, 0.1));
}

.diff-btn.is-active b { color: var(--teal); }

.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.or-line span { flex: 1; height: 1px; background: var(--line); }

.join-row { display: flex; gap: 8px; }

.code-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.32);
  color: var(--ink);
  font-size: 20px;
  letter-spacing: 0.35em;
  text-align: center;
  font-weight: 700;
}

.code-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(53, 214, 192, 0.15); }

.hint { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.error-text { margin: 0; min-height: 0; font-size: 12px; color: var(--accent); }

.start-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.dot { opacity: 0.5; }

/* ------------------------------------------------------- entrance motion */
@keyframes fxRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* 用 backwards 而非 both：动画结束后不再覆盖 hover 的 transform */
.screen--start.is-active .brand { animation: fxRise 0.5s ease backwards; }
.screen--start.is-active .top-actions { animation: fxRise 0.5s ease 0.06s backwards; }
.screen--start.is-active .mode-card { animation: fxRise 0.45s ease backwards; }
.screen--start.is-active .mode-card:nth-child(1) { animation-delay: 0.04s; }
.screen--start.is-active .mode-card:nth-child(2) { animation-delay: 0.1s; }
.screen--start.is-active .mode-card:nth-child(3) { animation-delay: 0.16s; }
.screen--start.is-active .start-panels { animation: fxRise 0.5s ease 0.14s backwards; }
.screen--start.is-active .start-foot { animation: fxRise 0.5s ease 0.2s backwards; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.12s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.btn svg { font-size: 16px; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; }

.btn--primary {
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 91, 91, 0.28);
}

.btn--ghost { background: rgba(255, 255, 255, 0.04); }
.btn--danger { background: linear-gradient(140deg, #e04141, #a51f1f); border-color: transparent; color: #fff; }
.btn--wide { width: 100%; }
.btn--big { padding: 15px 18px; font-size: 16px; }
.btn--tiny { padding: 7px 12px; font-size: 12px; border-radius: 999px; }
.btn.is-ready { background: linear-gradient(140deg, rgba(61, 220, 132, 0.95), rgba(53, 214, 192, 0.9)); color: #06210f; border-color: transparent; }

/* --------------------------------------------------------------------- hud */
.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
}

.hud-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 17px;
  transition: all 0.15s ease;
}

.hud-btn:hover { color: var(--ink); border-color: var(--line-2); }

.hud-center { flex: 1; min-width: 0; text-align: left; }
.hud-round { font-size: 14px; font-weight: 700; letter-spacing: 0.04em; }
.hud-mode { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hud-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.hud-score i { font-style: normal; color: var(--muted); font-size: 14px; }
.hud-score .score-me { color: var(--teal); }
.hud-score .score-op { color: var(--accent); }

/* ------------------------------------------------------------------ board */
.board { position: relative; min-height: 0; }

.fighter {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fighter--op { border-left: 3px solid rgba(255, 91, 91, 0.65); }
.fighter--me { border-left: 3px solid rgba(53, 214, 192, 0.65); }
.fighter.is-hit { animation: shake 0.42s ease; border-color: var(--accent); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
}

.fighter-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fighter-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chip {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  white-space: nowrap;
}

.chip.is-locked { background: rgba(53, 214, 192, 0.18); color: var(--teal); }
.chip.is-thinking { background: rgba(255, 201, 77, 0.16); color: var(--gold); }
.chip.is-offline { background: rgba(255, 91, 91, 0.18); color: var(--accent); }

.hearts { display: flex; gap: 5px; }
.hearts svg { width: 20px; height: 20px; color: var(--accent); filter: drop-shadow(0 3px 8px rgba(255, 91, 91, 0.35)); }
.hearts .heart--empty { color: rgba(255, 255, 255, 0.13); filter: none; }
.hearts.is-low svg:not(.heart--empty) { animation: pulse 0.9s infinite; }

@keyframes pulse { 50% { opacity: 0.45; } }

.res { display: flex; gap: 8px; flex-wrap: wrap; }

.res-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  font-size: 12.5px;
}

.res-icon { font-size: 15px; color: var(--gold); }
.res-item.is-cd { color: var(--muted); }
.res-item.is-cd .res-icon { color: var(--muted); }
.res-item.is-ready .res-icon { color: var(--teal); }

/* ------------------------------------------------------------------ arena */
.arena {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 10px;
  min-height: 0;
  position: relative;
}

.arena-top { display: flex; align-items: center; gap: 8px; width: 100%; justify-content: center; }

.badge {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.badge--ghost { background: none; color: var(--muted); }

.timer { position: relative; width: clamp(112px, 20vmin, 168px); aspect-ratio: 1; display: grid; place-items: center; }

.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ring-bg { stroke: rgba(255, 255, 255, 0.08); }
.ring-fg {
  stroke: var(--teal);
  stroke-dasharray: 326.7;
  stroke-dashoffset: 0;
  transition: stroke 0.2s ease;
}

.timer.is-warn .ring-fg { stroke: var(--gold); }
.timer.is-danger .ring-fg { stroke: var(--accent); }

.timer-center { position: relative; text-align: center; }
.timer-num { font-size: clamp(24px, 5vmin, 40px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.timer-label { margin-top: 4px; font-size: 11px; color: var(--muted); }

.cards { display: flex; align-items: stretch; gap: 10px; width: 100%; justify-content: center; }

.card {
  flex: 1 1 0;
  min-width: 0;
  max-width: 200px;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.26);
  transition: all 0.2s ease;
}

.card-head { font-size: 11px; color: var(--muted); letter-spacing: 0.05em; }
.card-icon { position: relative; font-size: 26px; color: var(--muted); display: grid; place-items: center; height: 32px; }
.card-svg { display: none; font-size: 26px; }
.card-q { font-weight: 800; font-size: 20px; color: rgba(255, 255, 255, 0.28); }
.card-name { font-size: 13px; font-weight: 700; color: var(--muted); }
.card-dmg { font-size: 11px; min-height: 15px; color: var(--muted); }

.card.is-revealed { border-color: var(--line-2); background: rgba(255, 255, 255, 0.05); }
.card.is-revealed .card-icon, .card.is-revealed .card-name { color: var(--ink); }
.card.is-revealed .card-svg { display: block; }
.card.is-revealed .card-q { display: none; }
.card.is-hit { border-color: rgba(255, 91, 91, 0.6); background: rgba(255, 91, 91, 0.1); }
.card.is-hit .card-dmg { color: var(--accent); font-weight: 700; }
.card.is-safe .card-dmg { color: var(--teal); }
.card.is-locked { border-color: rgba(53, 214, 192, 0.45); }
.card.is-locked .card-q { color: var(--teal); }

.vs { align-self: center; font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: 0.1em; }

/* ------------------------------------------------------------------- feed */
.feed {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}

.feed h3 { margin: 0 0 2px; font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.feed-list { display: flex; flex-direction: column; gap: 6px; overflow: hidden; }

.feed-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 2px solid var(--line-2);
}

.feed-item.is-win { border-left-color: var(--teal); }
.feed-item.is-loss { border-left-color: var(--accent); }
.feed-item .feed-round { color: var(--muted); font-size: 11px; flex: 0 0 auto; }
.feed-item .feed-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -------------------------------------------------------------------- dock */
.dock { display: grid; gap: 8px; min-height: 0; }

.act {
  position: relative;
  display: grid;
  gap: 3px;
  align-content: center;
  justify-items: center;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.22));
  color: var(--ink);
  transition: transform 0.1s ease, box-shadow 0.16s ease, border-color 0.16s ease, filter 0.16s ease;
  overflow: hidden;
}

.act:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--line-2); }
.act:active:not(:disabled) { transform: translateY(1px) scale(0.99); }

.act-icon { font-size: clamp(20px, 3.4vmin, 27px); }
.act-name { font-size: clamp(12px, 1.5vmin, 14px); font-weight: 700; }
.act-tag { font-size: 10px; color: var(--muted); }

.act-key {
  position: absolute;
  top: 5px; left: 6px;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--muted);
}

.act-cost {
  position: absolute;
  top: 5px; right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: var(--gold);
}

.act-cost svg { font-size: 11px; }

.act[data-tone="neutral"] { --tone: var(--gold); }
.act[data-tone="shot"] { --tone: var(--accent); }
.act[data-tone="guard"] { --tone: var(--blue); }
.act[data-tone="special"] { --tone: var(--violet); }
.act[data-tone="heavy"] { --tone: var(--accent-2); }

.act .act-icon { color: var(--tone, var(--ink)); }
.act:hover:not(:disabled) { box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4), inset 0 0 0 1px color-mix(in srgb, var(--tone, #fff) 40%, transparent); }

.act.is-picked { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(53, 214, 192, 0.35) inset; }
.act:disabled { opacity: 0.42; }
.act.is-cd .act-cd { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6, 10, 15, 0.62); font-size: 12px; font-weight: 700; color: var(--gold); }
.act.is-cd .act-cd { display: none; }
.act.is-cd .act-cd.is-on { display: grid; }

/* -------------------------------------------------------------- wait sheet */
.sheet {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(6, 9, 14, 0.72);
  backdrop-filter: blur(9px);
  z-index: 6;
}

.sheet.is-open { display: grid; animation: fade 0.2s ease; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet-card {
  width: min(440px, 100%);
  max-height: 100%;
  display: grid;
  gap: 12px;
  justify-items: stretch;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: auto;
}

.sheet-title { margin: 0; font-size: 18px; text-align: center; }
.sheet-sub { margin: 0; font-size: 12px; color: var(--muted); text-align: center; min-height: 16px; }

.sheet-result { display: none; }
.sheet-result.is-on {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.2));
}

.sheet-result .res-title { font-size: 22px; font-weight: 800; }
.sheet-result.is-win .res-title { color: var(--teal); }
.sheet-result.is-loss .res-title { color: var(--accent); }
.sheet-result .res-score { font-size: 13px; color: var(--muted); }
.sheet-result .res-score b { color: var(--ink); font-size: 18px; }

.room-label { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.room-code-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.room-code { font-size: 26px; letter-spacing: 0.28em; font-variant-numeric: tabular-nums; }

/* 「多人房间」：房主在这里换玩法，房间不用解散 */
.mode-block {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
}
.mode-block-head { display: flex; align-items: baseline; gap: 8px; }
.mode-now { font-size: 14px; }

.mode-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.mode-opt {
  flex: 1 1 0;
  min-width: 84px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.mode-opt b { font-weight: 600; }
.mode-opt.is-active {
  border-color: var(--teal);
  background: rgba(45, 212, 191, 0.14);
  color: var(--teal);
}
.mode-opt:disabled { opacity: 0.55; cursor: default; }

.seats { display: grid; gap: 8px; }

.seat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
}

.seat.is-empty { border-style: dashed; color: var(--muted); }
.seat-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-size: 15px; }
.seat.is-me .seat-avatar { background: rgba(53, 214, 192, 0.2); }
.seat.is-op .seat-avatar { background: rgba(255, 91, 91, 0.18); }
.seat-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--muted); }
.seat-tag.is-ready { background: rgba(61, 220, 132, 0.18); color: var(--ok); }
.seat-note { margin-left: 6px; font-style: normal; font-size: 11px; color: var(--muted); }
.seat.is-offline { opacity: 0.72; }

/* ------------------------------------------------- multiplayer: the board */
/* 一张牌桌只显示一套棋盘：单挑用 duel 版，混战/无间道用 multi 版 */
body[data-game="duel"] #board-multi,
body[data-game="duel"] #hud-score-multi,
body[data-game="multi"] #board-duel,
body[data-game="multi"] #hud-score { display: none; }

/* 黑暗森林：除了自己的分数，存活人数一律不可见 */
body.is-dark #hud-m-alive,
body.is-dark #hud-score-multi > i { display: none; }

.plist { display: grid; gap: 8px; align-content: start; }

.pcard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  text-align: left;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  border-left: 3px solid rgba(255, 91, 91, 0.5);
  background: var(--panel);
  transition: transform 0.12s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.pcard.is-you { border-left-color: rgba(53, 214, 192, 0.65); }
.pcard.is-dead, .pcard.is-gone { opacity: 0.5; filter: grayscale(0.65); }
.pcard:disabled { cursor: default; }

.pcard.is-targetable {
  cursor: crosshair;
  border-color: rgba(255, 91, 91, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 91, 91, 0.35), 0 10px 24px rgba(0, 0, 0, 0.36);
  animation: targetPulse 1.15s ease-in-out infinite;
}

.pcard.is-targetable:hover { transform: translateY(-2px); border-color: var(--accent); }
.pcard.is-hit { animation: shake 0.42s ease; border-color: var(--accent); }

@keyframes targetPulse {
  50% { box-shadow: 0 0 0 4px rgba(255, 91, 91, 0.16), 0 10px 24px rgba(0, 0, 0, 0.36); }
}

.pcard-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-size: 15px; }
.pcard.is-you .pcard-avatar { background: rgba(53, 214, 192, 0.2); }
.pcard-body { display: grid; gap: 4px; min-width: 0; }
.pcard-name { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-you, .pcard-host, .pcard-role { flex: 0 0 auto; font-style: normal; font-size: 10px; padding: 1px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.pcard-host { background: rgba(255, 201, 77, 0.14); color: var(--gold); }
.pcard-role.role-spy { background: rgba(255, 91, 91, 0.16); color: var(--accent); }
.pcard-role.role-cop { background: rgba(74, 168, 255, 0.16); color: var(--blue); }

.pcard-stats { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }
.pcard-stats .hearts { gap: 3px; }
.pcard-stats .hearts svg { width: 15px; height: 15px; filter: none; }
.pcard-res { display: inline-flex; align-items: center; gap: 3px; }
.pcard-res svg { font-size: 12px; color: var(--gold); }
.pcard-res.is-cd svg { color: var(--muted); }
.pcard-score { color: var(--gold); }
.pcard .chip { flex: 0 0 auto; }

/* ---------------------------------------------------- multiplayer: arena */
.mstatus { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; width: 100%; }
.mprompt { display: grid; gap: 8px; align-content: center; min-width: 0; }
.mprompt-text { font-size: 14px; font-weight: 600; line-height: 1.45; }
.mprompt-text.is-targeting { color: var(--accent); animation: pulse 1.1s ease-in-out infinite; }

.role-banner { display: none; }
.role-banner.is-on {
  display: block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(74, 168, 255, 0.16);
  border: 1px solid rgba(74, 168, 255, 0.35);
  color: var(--blue);
}
.role-banner.is-on.is-spy { background: rgba(255, 91, 91, 0.16); border-color: rgba(255, 91, 91, 0.4); color: var(--accent); }

.msum { display: none; }
.msum.is-on { display: grid; gap: 6px; width: 100%; }
.msum h3 { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.msum-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  border-left: 2px solid var(--line-2);
  background: rgba(0, 0, 0, 0.24);
  font-size: 12px;
}
.msum-line.is-hurt { border-left-color: var(--accent); }
.msum-line.is-out { opacity: 0.55; }
.msum-who { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msum-act { color: var(--muted); white-space: nowrap; }
.msum-auto { margin-left: 5px; font-style: normal; color: var(--gold); }
.msum-dmg { font-weight: 700; color: var(--accent); }

/* --------------------------------------------------- multiplayer: the dock */
/* 攻击类动作在多人模式下自带“先选人”的提示角标 */
.act-target { display: none; position: absolute; bottom: 5px; right: 6px; font-size: 11px; line-height: 1; opacity: 0.85; }
body[data-game="multi"] .act.is-target .act-target { display: block; }
.act.is-pending { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255, 91, 91, 0.32) inset; }
.act.is-pending .act-target { opacity: 1; animation: pulse 0.9s ease-in-out infinite; }

.sheet-result .res-sub { font-size: 12.5px; color: var(--muted); text-align: center; }

/* ----------------------------------------------------------------- modals */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(4, 7, 11, 0.72);
  backdrop-filter: blur(6px);
  z-index: 20;
}

.modal.is-open { display: grid; }

.modal-card {
  width: min(720px, 100%);
  max-height: min(88dvh, 760px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-card--small { width: min(400px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 16px; overflow: auto; display: grid; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* -------------------------------------------------------------- settings */
.set-field { display: grid; gap: 8px; }
.set-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.set-label { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.set-value { font-size: 12px; font-weight: 600; color: var(--teal); font-variant-numeric: tabular-nums; }

.set-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
}

.set-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }

.set-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  margin-top: -5px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 2px 8px rgba(255, 91, 91, 0.4);
}

.set-range::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }

.set-range::-moz-range-thumb {
  width: 16px; height: 16px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
}

.set-range:focus { outline: none; }
.set-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(53, 214, 192, 0.22); }
.set-range:focus::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(53, 214, 192, 0.22); }

.help-section { display: grid; gap: 8px; }
.help-section h3 { margin: 0; font-size: 13px; color: var(--teal); letter-spacing: 0.05em; }
.help-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--ink); line-height: 1.55; }
.help-actions { display: grid; gap: 8px; }
.help-action { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(0, 0, 0, 0.24); border: 1px solid var(--line); }
.help-action .ha-icon { font-size: 20px; color: var(--gold); flex: 0 0 auto; }
.help-action .ha-body { display: grid; gap: 2px; }
.help-action b { font-size: 13.5px; }
.help-action span { font-size: 12px; color: var(--muted); line-height: 1.5; }

.matrix-wrap { overflow: auto; }
table.matrix { border-collapse: collapse; font-size: 11.5px; width: 100%; }
table.matrix th, table.matrix td { border: 1px solid var(--line); padding: 6px 7px; text-align: center; white-space: nowrap; }
table.matrix th { background: rgba(255, 255, 255, 0.05); color: var(--muted); font-weight: 600; }
table.matrix td.self { color: var(--accent); }
table.matrix td.opp { color: var(--teal); }
table.matrix td.none { color: var(--muted); }

/* -------------------------------------------------------------- replay */
.replay-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
}

.replay-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  transition: all 0.16s ease;
}

.replay-tab.is-active {
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(255, 91, 91, 0.32);
}

.replay-view { display: grid; gap: 12px; }

.replay-frame {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.26);
}

.replay-ctrl { display: flex; justify-content: center; gap: 8px; }

.rv-block {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.rv-round { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

.rv-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  border-left: 2px solid var(--line-2);
  background: rgba(0, 0, 0, 0.24);
  font-size: 12px;
}

.rv-line.is-hurt { border-left-color: var(--accent); }
.rv-line.is-out { opacity: 0.55; }

.rv-who { flex: 0 0 auto; font-weight: 700; }
.rv-act { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-note { flex: 0 0 auto; font-style: normal; color: var(--gold); }
.rv-dmg { flex: 0 0 auto; margin-left: auto; font-weight: 700; color: var(--accent); }
.rv-out { flex: 0 0 auto; font-style: normal; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 91, 91, 0.18); color: var(--accent); }
.rv-pos { margin: 0; text-align: center; font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------- toast/banner */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(20, 28, 39, 0.96);
  border: 1px solid var(--line-2);
  font-size: 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: all 0.24s ease;
  z-index: 40;
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 8px;
  text-align: center;
  font-size: 12.5px;
  background: rgba(255, 201, 77, 0.94);
  color: #22190a;
  font-weight: 600;
  transform: translateY(-100%);
  transition: transform 0.25s ease;
  z-index: 30;
}

.banner.is-on { transform: none; }
.banner.is-error { background: rgba(255, 91, 91, 0.95); color: #fff; }

/* --------------------------------------------------------- music widget */
/* 右下角随机音乐：容器不吃点击，圆钮可交互，歌名提示悬停/换歌时露出；
   点圆钮展开面板 —— 当前曲目、播放/暂停、上一首/下一首、音乐自己的音量。 */
.music {
  position: fixed;
  right: calc(12px + env(safe-area-inset-right));
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: none;
  z-index: 18;
}

.music-meta {
  max-width: min(46vw, 210px);
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  font-size: 11.5px;
  line-height: 1.3;
  text-align: right;
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.music.is-open .music-meta,
.music:hover .music-meta { opacity: 1; transform: none; }

.music-name,
.music-artist { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-name { font-weight: 700; }
.music-artist { color: var(--muted); }

/* 展开后的面板：默认隐藏，`.is-panel` 时出现；面板一开就不再重复显示歌名提示条。 */
.music-panel {
  display: none;
  width: min(74vw, 228px);
  padding: 10px 11px;
  gap: 9px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.music.is-panel .music-panel { display: grid; }
.music.is-panel .music-meta { display: none; }

.music-now { min-width: 0; text-align: right; }
.music-now-name,
.music-now-artist { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-now-name { font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.music-now-artist { font-size: 11px; color: var(--muted); }

.music-controls { display: flex; align-items: center; justify-content: center; gap: 8px; }

.music-ctl {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 15px;
  border-radius: 50%;
  color: var(--ink);
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.3);
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.music-ctl:hover { color: var(--teal); border-color: rgba(53, 214, 192, 0.45); }
.music-ctl:disabled { opacity: 0.32; cursor: default; }
.music-ctl:disabled:hover { color: var(--ink); border-color: var(--line-2); }
.music-ctl--main { width: 42px; height: 42px; font-size: 18px; }

/* 播放/暂停：两个图标按状态二选一 */
.music-ico-pause,
.music.is-playing .music-ico-play { display: none; }
.music.is-playing .music-ico-pause { display: block; }

.music-vol { display: flex; align-items: center; gap: 7px; }
.music-vol-icon { flex: 0 0 auto; font-size: 14px; color: var(--muted); }
.music-range { flex: 1 1 auto; height: 18px; }
.music-vol .set-value { flex: 0 0 auto; min-width: 32px; font-size: 11px; text-align: right; }

.music-btn {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 20px;
  border-radius: 50%;
  color: var(--ink);
  border: 1px solid var(--line-2);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.34));
  box-shadow: var(--shadow);
  opacity: 0.72;
  transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.music-btn:hover { opacity: 1; }
.music.is-playing .music-btn { opacity: 0.95; color: var(--neon-2); border-color: rgba(34, 211, 238, 0.5); }
.music.is-error .music-btn { opacity: 0.95; color: var(--accent); border-color: rgba(255, 91, 91, 0.55); }
.music.is-loading .music-btn { opacity: 0.95; animation: musicSpin 1.1s linear infinite; }

@keyframes musicSpin { to { transform: rotate(360deg); } }

/* damage floaters */
.floater {
  position: absolute;
  font-size: 30px;
  font-weight: 900;
  color: var(--accent);
  text-shadow: 0 6px 18px rgba(255, 91, 91, 0.5);
  pointer-events: none;
  animation: floatUp 1s ease forwards;
  z-index: 5;
}

@keyframes floatUp {
  from { opacity: 0; transform: translateY(8px) scale(0.8); }
  30% { opacity: 1; transform: translateY(-6px) scale(1.08); }
  to { opacity: 0; transform: translateY(-40px) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.06s !important; }
}
