/* style.css —— 深海声呐猎潜：环境渐变 + 探照灯暖光 + 湿冷金属机电，桌面双栏沉浸舞台 */

:root {
  --abyss-0: #04141f;
  --abyss-1: #07293b;
  --abyss-2: #0b3a52;
  --hull: #0d2b3c;
  --hull-2: #123b52;
  --hull-line: #1d5c78;
  --sonar: #3ddad7;
  --sonar-soft: #8ff5ec;
  --amber: #ffb347;
  --coral: #ff6b5b;
  --steel: #9fc3d4;
  --ink: #eaf7fb;
  --ink-dim: #9dbccd;
  --ok: #7ff0a8;
  --radius: 16px;
  --shadow-deep: 0 18px 42px rgba(0, 12, 22, 0.55);
  --emboss: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -2px 0 rgba(0, 0, 0, 0.35);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100dvh;
  overscroll-behavior: none;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(1100px 640px at 18% -6%, rgba(61, 218, 215, 0.16), transparent 62%),
    radial-gradient(900px 620px at 88% 8%, rgba(255, 179, 71, 0.1), transparent 60%),
    radial-gradient(760px 560px at 50% 112%, rgba(28, 108, 140, 0.24), transparent 66%),
    linear-gradient(168deg, var(--abyss-1) 0%, var(--abyss-0) 58%, #03101a 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: var(--noise);
  opacity: 0.05;
  mix-blend-mode: overlay;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 52%, rgba(0, 8, 16, 0.62) 100%);
  z-index: 0;
}

#game-app {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 12px 18px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100dvh;
}

/* ---------------------------------------------------------------- 顶边一体化机台横梁 */

#stage-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(143, 245, 236, 0.18);
  background:
    linear-gradient(180deg, rgba(24, 66, 88, 0.92), rgba(9, 32, 46, 0.94)),
    var(--noise);
  background-blend-mode: overlay;
  box-shadow: var(--emboss), 0 10px 24px rgba(0, 10, 20, 0.45);
}

#stage-bar::before,
#stage-bar::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #cfe9f2, #4c7f95 60%, #16394d);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
  flex: none;
}

.bar-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

#stage-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0;
  text-shadow: 0 0 14px rgba(61, 218, 215, 0.45);
}

#stage-kicker {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--sonar-soft);
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.bar-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(143, 245, 236, 0.22);
  background: linear-gradient(180deg, #1a4b64, #0c2c3e);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: var(--emboss);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

#back-home {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.bar-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.16);
}

.bar-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------- 双栏舞台 */

#stage-core {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(272px, 0.85fr);
  gap: 14px;
  align-items: stretch;
  max-height: calc(100dvh - 116px);
}

#sonar-stage,
#hunter-cabin {
  min-height: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(143, 245, 236, 0.16);
  background: linear-gradient(180deg, rgba(11, 41, 58, 0.9), rgba(4, 20, 31, 0.94));
  box-shadow: var(--shadow-deep), var(--emboss);
}

#sonar-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
  min-width: 0;
}

/* 关卡匾额 */

#level-plaque {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 7px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(24, 74, 98, 0.7), rgba(8, 30, 43, 0.8));
  border: 1px solid rgba(143, 245, 236, 0.14);
  font-size: 12px;
  letter-spacing: 1px;
}

#plaque-chapter {
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--sonar), #1c8f8d);
  color: #04222b;
  font-weight: 700;
}

#plaque-level {
  font-size: 13px;
  font-weight: 700;
  color: var(--sonar-soft);
}

#plaque-range {
  color: var(--steel);
  font-variant-numeric: tabular-nums;
}

#plaque-mech {
  margin-left: auto;
  color: var(--amber);
  font-size: 11.5px;
}

/* 声呐扫描带 */

#sonar-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 10px 4px 4px;
}

#sonar-band {
  position: relative;
  height: clamp(78px, 15vh, 116px);
  border-radius: 999px;
  overflow: hidden;
  touch-action: none;
  border: 1px solid rgba(143, 245, 236, 0.22);
  background: linear-gradient(180deg, #062231, #03131d);
  box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.55), 0 0 26px rgba(61, 218, 215, 0.12);
}

.band-water {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(143, 245, 236, 0.07) 0 1px, transparent 1px 5%),
    linear-gradient(180deg, rgba(20, 74, 96, 0.5), rgba(3, 18, 27, 0.9));
}

.band-sweep {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16%;
  background: linear-gradient(90deg, transparent, rgba(143, 245, 236, 0.16), transparent);
  animation: sweep 5.5s linear infinite;
}

@keyframes sweep {
  0% { left: -16%; }
  100% { left: 100%; }
}

#band-fog {
  position: absolute;
  inset: 0;
}

.fog-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  background:
    repeating-linear-gradient(115deg, rgba(180, 205, 215, 0.16) 0 6px, rgba(120, 155, 170, 0.07) 6px 12px);
  box-shadow: inset 0 0 22px rgba(150, 190, 205, 0.28);
  border-left: 1px solid rgba(190, 220, 230, 0.22);
  border-right: 1px solid rgba(190, 220, 230, 0.22);
}

.band-live {
  position: absolute;
  top: 8%;
  bottom: 8%;
  min-width: 2px;
  border-radius: 999px;
  /* Keep the whole candidate interval visible; radial-only fill made its ends fade away and looked shifted. */
  background: linear-gradient(90deg, rgba(61, 218, 215, 0.2), rgba(143, 245, 236, 0.42) 50%, rgba(61, 218, 215, 0.2));
  box-shadow: inset 0 0 0 1px rgba(143, 245, 236, 0.3), 0 0 22px rgba(61, 218, 215, 0.35);
  transition: left 0.42s cubic-bezier(0.22, 0.8, 0.24, 1), width 0.42s cubic-bezier(0.22, 0.8, 0.24, 1);
}

#sonar-band[data-temp="hot"] .band-live {
  background: linear-gradient(90deg, rgba(255, 107, 91, 0.2), rgba(255, 150, 130, 0.48) 50%, rgba(255, 107, 91, 0.2));
  box-shadow: 0 0 26px rgba(255, 107, 91, 0.55);
  animation: pulse-hot 1.05s ease-in-out infinite;
}

#sonar-band[data-temp="warm"] .band-live {
  background: linear-gradient(90deg, rgba(255, 179, 71, 0.2), rgba(255, 205, 130, 0.44) 50%, rgba(255, 179, 71, 0.2));
  box-shadow: 0 0 22px rgba(255, 179, 71, 0.45);
}

@keyframes pulse-hot {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.32); }
}

.band-live.is-conflict {
  background: repeating-linear-gradient(45deg, rgba(255, 107, 91, 0.4) 0 8px, rgba(120, 40, 40, 0.22) 8px 16px);
  box-shadow: 0 0 18px rgba(255, 107, 91, 0.4);
}

#sonar-band.is-pressure {
  border-color: rgba(255, 107, 91, 0.55);
  animation: pressure 1.4s ease-in-out infinite;
}

@keyframes pressure {
  0%, 100% { box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.55), 0 0 20px rgba(255, 107, 91, 0.18); }
  50% { box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.55), 0 0 34px rgba(255, 107, 91, 0.46); }
}

#band-buoys {
  position: absolute;
  inset: 0;
}

.buoy {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.buoy i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffffff, var(--sonar) 55%, #0d6f74);
  box-shadow: 0 0 10px rgba(143, 245, 236, 0.7);
}

.buoy b {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--sonar-soft);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  font-variant-numeric: tabular-nums;
}

.buoy-higher i {
  background: radial-gradient(circle at 34% 30%, #fff2d8, var(--amber) 55%, #8a5416);
  box-shadow: 0 0 10px rgba(255, 179, 71, 0.6);
}

.buoy-lower i {
  background: radial-gradient(circle at 34% 30%, #d8fbff, var(--sonar) 55%, #0d6f74);
  box-shadow: 0 0 10px rgba(61, 218, 215, 0.6);
}

.buoy-silent i {
  background: radial-gradient(circle at 34% 30%, #d9e6ec, #75909c 60%, #33474f);
  box-shadow: none;
  opacity: 0.75;
}

.buoy-hit i {
  width: 13px;
  height: 13px;
  background: radial-gradient(circle at 34% 30%, #ffffff, #ffe08a 50%, #ff9c3d);
  box-shadow: 0 0 20px rgba(255, 208, 127, 0.9);
}

.buoy.is-liar b::after {
  content: " ~";
  color: var(--coral);
}

#band-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
  padding: 0 6px;
}

#band-note {
  min-height: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: 1px;
}

#band-note.is-warn {
  color: var(--coral);
  animation: pulse-hot 1.3s ease-in-out infinite;
}

#sonar-band.flash-echo {
  animation: flash-echo 0.5s ease-out;
}

#sonar-band.flash-hit {
  animation: flash-hit 0.75s ease-out;
}

@keyframes flash-echo {
  0% { filter: brightness(1.5); }
  100% { filter: brightness(1); }
}

@keyframes flash-hit {
  0% { filter: brightness(2.1) saturate(1.4); box-shadow: 0 0 60px rgba(255, 208, 127, 0.8); }
  100% { filter: brightness(1); }
}

/* ---------------------------------------------------------------- 机台：拨盘 + 键盘 + 挂件 */

#console-deck {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
}

#dial {
  flex: 1 1 190px;
  min-width: 168px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #0a2534, #04141f);
  border: 1px solid rgba(143, 245, 236, 0.2);
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

#dial-screen {
  border-radius: 10px;
  padding: 6px 12px;
  background: radial-gradient(80% 120% at 50% 20%, #0d3d3f, #041a1c);
  border: 1px solid rgba(61, 218, 215, 0.35);
  text-align: right;
}

#dial-value {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 700;
  letter-spacing: 4px;
  color: #8dffe9;
  text-shadow: 0 0 16px rgba(61, 218, 215, 0.85), 0 0 42px rgba(61, 218, 215, 0.4);
  font-variant-numeric: tabular-nums;
}

#dial-sub {
  font-size: 11px;
  color: var(--ink-dim);
  text-align: right;
  letter-spacing: 1px;
}

#keypad {
  flex: 2 1 260px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.key {
  min-height: 42px;
  border-radius: 11px;
  border: 1px solid rgba(159, 195, 212, 0.24);
  background: linear-gradient(180deg, #1b4a61, #0a2534);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--emboss);
  transition: transform 0.1s ease, filter 0.1s ease;
}

.key:hover {
  transform: translateY(-2px);
  filter: brightness(1.18);
}

.key:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55);
}

.key-fire {
  grid-column: span 1;
  background: linear-gradient(180deg, #ff9d6b, #d1562f);
  border-color: rgba(255, 208, 127, 0.5);
  color: #23100a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  font-size: 15px;
}

.key-wide {
  font-size: 13px;
}

#gear-tray {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.gear {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(143, 245, 236, 0.24);
  background: linear-gradient(180deg, #1a4b64, #0b2b3c);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--emboss);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.gear .gear-name {
  font-size: 12.5px;
  letter-spacing: 1px;
}

.gear .gear-cost {
  font-size: 10.5px;
  color: var(--sonar-soft);
  font-variant-numeric: tabular-nums;
}

.gear:hover {
  transform: translateY(-2px);
  filter: brightness(1.16);
}

.gear:active {
  transform: translateY(2px);
}

.gear.is-spent {
  opacity: 0.38;
  filter: grayscale(0.6);
  cursor: default;
}

/* ---------------------------------------------------------------- 猎手舱（右舷窗） */

#hunter-cabin {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  min-width: 0;
}

.cabin-window {
  padding: 10px 12px;
  border-radius: 14px;
  background: radial-gradient(90% 70% at 50% 0%, rgba(24, 82, 104, 0.7), rgba(4, 20, 31, 0.9));
  border: 1px solid rgba(143, 245, 236, 0.18);
  box-shadow: inset 0 3px 16px rgba(0, 0, 0, 0.5);
}

.cabin-title {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--sonar-soft);
  opacity: 0.8;
  margin-bottom: 6px;
}

#tube-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

#tube-slots i {
  width: 12px;
  height: 20px;
  border-radius: 4px 4px 5px 5px;
  display: block;
}

.tube-on {
  background: linear-gradient(180deg, #ffd68a, #d98a2b);
  box-shadow: 0 0 8px rgba(255, 179, 71, 0.55);
}

.tube-off {
  background: linear-gradient(180deg, #16404f, #0a2230);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

#tube-count {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

#hunter-stats {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 9px;
  background: rgba(6, 30, 44, 0.6);
  border: 1px solid rgba(143, 245, 236, 0.12);
  text-align: center;
}

.stat span {
  font-size: 10px;
  color: var(--ink-dim);
  letter-spacing: 1px;
}

.stat b {
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

#echo-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(143, 245, 236, 0.14);
  background: linear-gradient(180deg, rgba(8, 34, 48, 0.8), rgba(3, 16, 25, 0.9));
  overflow: hidden;
}

.panel-head {
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--sonar-soft);
  opacity: 0.78;
  border-bottom: 1px solid rgba(143, 245, 236, 0.12);
}

#echo-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
  padding: 6px 8px 10px;
  list-style: none;
  scrollbar-width: thin;
}

.echo {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 8px;
  font-size: 12px;
  background: rgba(9, 36, 51, 0.5);
  margin-bottom: 4px;
  border-left: 3px solid rgba(61, 218, 215, 0.4);
}

.echo-higher {
  border-left-color: var(--amber);
}

.echo-lower {
  border-left-color: var(--sonar);
}

.echo-silent {
  border-left-color: #6d8794;
  opacity: 0.85;
}

.echo-hit {
  border-left-color: #ffd68a;
  background: rgba(60, 40, 10, 0.35);
}

.echo-turn {
  width: 18px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.echo-arrow {
  width: 14px;
  text-align: center;
  color: var(--sonar-soft);
}

.echo-value {
  flex: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chip {
  font-style: normal;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.chip-hot {
  background: rgba(255, 107, 91, 0.24);
  color: #ffb2a6;
}

.chip-warm {
  background: rgba(255, 179, 71, 0.22);
  color: #ffd7a3;
}

.chip-cold {
  background: rgba(61, 218, 215, 0.18);
  color: #a9f3ef;
}

.chip-off,
.chip-tool,
.chip-silent {
  background: rgba(159, 195, 212, 0.14);
  color: var(--ink-dim);
}

.chip-hit {
  background: rgba(255, 208, 127, 0.28);
  color: #ffe3ad;
}

/* ---------------------------------------------------------------- 浮层 */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: radial-gradient(120% 90% at 50% 40%, rgba(4, 24, 36, 0.82), rgba(2, 10, 16, 0.94));
  backdrop-filter: blur(3px);
}

.overlay.hidden {
  display: none;
}

.sheet {
  width: min(560px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid rgba(143, 245, 236, 0.24);
  background: linear-gradient(180deg, rgba(14, 52, 72, 0.96), rgba(4, 20, 31, 0.98));
  box-shadow: var(--shadow-deep);
}

.sheet-wide {
  width: min(720px, 100%);
}

.sheet-kicker {
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--sonar-soft);
  opacity: 0.8;
}

.sheet-title {
  margin: 6px 0 10px;
  font-size: 28px;
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(61, 218, 215, 0.4);
}

.sheet-desc {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-dim);
  margin: 0 0 8px;
}

.sheet-hint {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--amber);
  margin: 0 0 14px;
}

.sheet-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.big-btn {
  min-height: 48px;
  padding: 0 26px;
  border-radius: 13px;
  border: 1px solid rgba(255, 208, 127, 0.45);
  background: linear-gradient(180deg, #ffb066, #cf6a2c);
  color: #24120a;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: var(--emboss);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.ghost-btn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 13px;
  border: 1px solid rgba(143, 245, 236, 0.28);
  background: linear-gradient(180deg, #164a62, #0a2534);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--emboss);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.big-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.14);
}

.big-btn:active,
.ghost-btn:active {
  transform: translateY(2px);
}

.sheet-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-dim);
}

.help-list {
  margin: 6px 0 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-dim);
}

.help-list li {
  margin-bottom: 4px;
}

/* 猎场图 */

.chapter-block {
  margin-bottom: 14px;
}

.chapter-block h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--sonar-soft);
}

.chapter-block h3 em {
  font-style: normal;
  color: var(--amber);
  font-size: 11px;
}

.level-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.level-btn {
  min-height: 62px;
  border-radius: 12px;
  border: 1px solid rgba(143, 245, 236, 0.22);
  background: linear-gradient(180deg, #17475e, #0a2333);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: var(--emboss);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.level-btn b {
  font-size: 16px;
}

.level-btn .lv-range {
  font-size: 10px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.level-btn .lv-stars {
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 1px;
}

.level-btn:hover:not(.is-locked) {
  transform: translateY(-2px);
  filter: brightness(1.16);
}

.level-btn.is-cleared {
  border-color: rgba(255, 179, 71, 0.45);
}

.level-btn.is-locked {
  opacity: 0.4;
  filter: grayscale(0.7);
  cursor: default;
}

/* 结算 */

.result-target {
  font-size: 22px;
  font-weight: 700;
  color: #ffd68a;
  letter-spacing: 2px;
  margin: 4px 0 10px;
  font-variant-numeric: tabular-nums;
}

.stars {
  display: flex;
  gap: 10px;
  font-size: 34px;
  margin-bottom: 12px;
}

.star {
  color: #2c5566;
  text-shadow: none;
}

.star.is-on {
  color: #ffd074;
  text-shadow: 0 0 18px rgba(255, 208, 116, 0.75);
  animation: star-pop 0.42s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}

@keyframes star-pop {
  0% { transform: scale(0.3) rotate(-18deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.result-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.result-rows div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  padding: 8px 4px;
  border-radius: 10px;
  background: rgba(6, 30, 44, 0.6);
  border: 1px solid rgba(143, 245, 236, 0.12);
}

.result-rows span {
  font-size: 10.5px;
  color: var(--ink-dim);
}

.result-rows b {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

/* toast */

#toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translate(-50%, 12px);
  z-index: 30;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(8, 34, 48, 0.94);
  border: 1px solid rgba(255, 107, 91, 0.4);
  color: #ffc9c0;
  font-size: 13px;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

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

#toast.hidden {
  display: none;
}

.button-hidden,
.hidden-force {
  display: none !important;
}

/* ---------------------------------------------------------------- 移动端 */

@media (max-width: 899px) {
  #game-app {
    padding: 10px 12px calc(max(68px, calc(16px + env(safe-area-inset-bottom))) + 12px);
    width: 100%;
  }

  #stage-core {
    grid-template-columns: minmax(0, 1fr);
    max-height: none;
  }

  #sonar-shell {
    padding-top: 4px;
  }

  #sonar-band {
    height: 76px;
  }

  #console-deck {
    flex-direction: column;
  }

  #dial {
    flex: none;
  }

  #keypad {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .key {
    min-height: 46px;
  }

  #echo-panel {
    max-height: 210px;
  }

  #stage-bar {
    flex-wrap: wrap;
  }

  .bar-brand {
    order: -1;
    flex: 1 1 100%;
  }
}

@media (max-width: 420px) {
  .level-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #stage-title {
    font-size: 17px;
  }

  .sheet {
    padding: 18px 16px;
  }
}

/* ---------------------------------------------------------------- 动效降级 */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }

  .band-sweep {
    display: none;
  }
}
