/* Runtime fonts are vendored from the pinned @fontsource packages.
 * These files contain Latin glyphs only; Chinese text intentionally falls
 * through to the visitor's system sans-serif font.
 */
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url('./vendor/fonts/orbitron-5.2.8/orbitron-latin-800-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-display: swap;
  font-weight: 900;
  src: url('./vendor/fonts/orbitron-5.2.8/orbitron-latin-900-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Share Tech Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('./vendor/fonts/share-tech-mono-5.2.7/share-tech-mono-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('./vendor/fonts/inter-5.2.8/inter-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('./vendor/fonts/inter-5.2.8/inter-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('./vendor/fonts/inter-5.2.8/inter-latin-700-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url('./vendor/fonts/inter-5.2.8/inter-latin-800-normal.woff2') format('woff2');
}

/* -------------------------------------------------------------
 * 3D 全息扫雷 (Holo-Sweeper 3D) - 样式表
 * 使用现代科技感配色、玻璃拟态面板及霓虹发光文字
 * ------------------------------------------------------------- */

 :root {
  --bg-color: #080517;
  --bg-gradient: radial-gradient(circle at 50% 45%, #171144 0%, #09061d 52%, #04030c 100%);
  --panel-bg: rgba(13, 8, 35, 0.68);
  --panel-bg-hover: rgba(24, 13, 55, 0.78);
  --panel-border: rgba(109, 93, 252, 0.28);
  --panel-border-glow: rgba(255, 79, 216, 0.42);
  --glass-inner-bg: rgba(255, 255, 255, 0.03);
  --glass-inner-border: rgba(255, 255, 255, 0.05);
  
  /* 霓虹发光色 */
  --neon-cyan: #29e7ff;
  --neon-blue: #6d5dfc;
  --neon-orange: #ff75c8;
  --neon-red: #ff477e;
  --neon-green: #72f6c1;
  --neon-purple: #c77dff;
  --neon-magenta: #ff4fd8;
  --neon-yellow: #ffee00;
  
  /* 字体族 */
  --font-logo: 'Orbitron', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --font-sans: 'Inter', sans-serif;
  
  /* 文本颜色 */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #475569;
}

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none; /* 防止意外选择文字 */
}

button,
[role="button"],
[role="tab"],
[role="radio"] {
  touch-action: manipulation;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  font-family: var(--font-sans);
  position: relative;
}

/* 3D 渲染容器 */
#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  background: transparent;
}
body.matrix-center-unlocked #canvas-container canvas { cursor:grab; }
body.matrix-mouse-panning #canvas-container canvas,
body.matrix-touch-panning #canvas-container canvas { cursor:grabbing; }

/* 背景虚幻星光层 */
.stars-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background-image: 
    linear-gradient(90deg, transparent 49.8%, rgba(109, 93, 252, 0.035) 50%, transparent 50.2%),
    radial-gradient(rgba(41, 231, 255, 0.08) 1px, transparent 0),
    radial-gradient(rgba(255, 79, 216, 0.05) 1.5px, transparent 0);
  background-size: 44px 44px, 40px 40px, 80px 80px;
  background-position: 0 0, 0 0, 20px 20px;
  opacity: 0.8;
}

/* -------------------------------------------------------------
 * HUD 布局与玻璃拟态面板 (Glassmorphism)
 * ------------------------------------------------------------- */

.hud-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none; /* 穿透鼠标，使得能够操作3D Canvas */
  display: flex;
  justify-content: space-between;
  padding: 20px;
}

.return-lobby-button {
  position: fixed;
  z-index: 230;
  top: 18px;
  left: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 13px;
  color: #e9edff;
  border: 1px solid rgba(109, 93, 252, .58);
  border-radius: 11px;
  background: rgba(9, 6, 29, .86);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .42), 0 0 18px rgba(109, 93, 252, .16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateX(-50%);
  cursor: pointer;
  touch-action: manipulation;
}

body.in-room .return-lobby-button { display: flex; }
.return-lobby-button span { color: var(--neon-cyan); font: 700 17px var(--font-mono); }
.return-lobby-button strong { font: 700 11px var(--font-ui); letter-spacing: .4px; }
.return-lobby-button:hover { border-color: var(--neon-cyan); color: #fff; }
.return-lobby-button:disabled { opacity: .65; cursor: wait; }

/* 玻璃面板通用样式 */
.panel {
  pointer-events: auto; /* 允许面板上的交互 */
  width: 320px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.panel.glass {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.panel.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(41, 231, 255, 0.08), transparent 32%, transparent 70%, rgba(255, 79, 216, 0.08));
}

.left-panel,
.right-panel,
.top-panel { position: relative; }

.panel:hover {
  border-color: var(--panel-border-glow);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(0, 240, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  background: var(--panel-bg-hover);
}

.glass-inner {
  background: var(--glass-inner-bg);
  border: 1px solid var(--glass-inner-border);
  border-radius: 10px;
  padding: 12px;
}

/* 自定义滚动条 */
.panel::-webkit-scrollbar {
  width: 4px;
}
.panel::-webkit-scrollbar-track {
  background: transparent;
}
.panel::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.2);
  border-radius: 2px;
}
.panel::-webkit-scrollbar-thumb:hover {
  background: var(--neon-cyan);
}

/* -------------------------------------------------------------
 * 左侧控制面板元素
 * ------------------------------------------------------------- */

.panel-header {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 4px;
}

.header-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.logo {
  font-family: var(--font-logo);
  font-weight: 900;
  font-size: clamp(14px, 1.2vw, 17px);
  letter-spacing: 0.7px;
  background: linear-gradient(90deg, #fff 0%, var(--neon-cyan) 48%, var(--neon-magenta) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

#btn-language-toggle {
  position: relative;
  z-index: 4;
  flex: 0 0 auto !important;
  min-width: 34px;
  justify-content: center;
}

#btn-language-toggle-lobby {
  z-index: 4;
  min-width: 34px;
  justify-content: center;
}

.logo span {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
  color: #000;
  font-size: 13px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  -webkit-text-fill-color: initial;
  text-shadow: none;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.guide-comms {
  position: relative;
  display: grid;
  grid-template-columns: 104px 1fr;
  min-height: 178px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 79, 216, 0.24);
  background: linear-gradient(135deg, rgba(109, 93, 252, 0.18), rgba(255, 79, 216, 0.07));
}

.comms-art-wrap { position: relative; min-height: 178px; overflow: hidden; }

.comms-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% center;
  filter: saturate(1.08) contrast(1.04);
}

.comms-art-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 55%, #0c0821 100%), linear-gradient(0deg, rgba(8, 5, 23, 0.3), transparent 55%);
}

.comms-scanline {
  position: absolute;
  z-index: 2;
  inset: -100% 0 auto;
  height: 45%;
  background: linear-gradient(transparent, rgba(41, 231, 255, 0.13), transparent);
  animation: comms-scan 4.8s linear infinite;
}

@keyframes comms-scan { to { transform: translateY(620%); } }

.comms-signal {
  position: absolute;
  z-index: 3;
  left: 8px;
  bottom: 7px;
  color: var(--neon-cyan);
  font: 8px var(--font-mono);
  letter-spacing: 1px;
  text-shadow: 0 0 7px currentColor;
}

.comms-copy { padding: 13px 12px 12px 6px; min-width: 0; }
.comms-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.comms-name { color: #fff; font: 700 10px var(--font-mono); letter-spacing: .8px; }
.comms-status { color: var(--neon-green); font: 9px var(--font-mono); }
.comms-status::before { content: "● "; text-shadow: 0 0 7px currentColor; }

.comms-dialogue {
  margin: 9px 0 10px;
  color: #cbd5ff;
  font-size: 11px;
  line-height: 1.55;
}

.mission-floating-panel {
  margin: 0 12px 12px;
  padding: 13px 15px;
  border: 1px solid rgba(109, 93, 252, .3);
  border-radius: 13px;
  background: rgba(8, 5, 23, .6);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .38), inset 0 0 22px rgba(109, 93, 252, .06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mission-objective {
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: transparent;
}
.objective-label { display: block; color: var(--neon-magenta); font: 8px var(--font-mono); letter-spacing: 1px; }
.mission-objective strong { display: block; margin: 4px 0 7px; color: #fff; font-size: 10px; line-height: 1.35; }
.mission-progress-track { height: 3px; overflow: hidden; background: rgba(255,255,255,.08); }
.mission-progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--neon-blue), var(--neon-cyan), var(--neon-magenta)); box-shadow: 0 0 8px var(--neon-cyan); transition: width .45s ease; }
.mission-action-hint {
  display:grid;
  gap:4px;
  margin-top:10px;
  padding:8px 10px;
  border-left:2px solid var(--neon-cyan);
  background:rgba(41,231,255,.07);
  box-shadow:inset 0 0 16px rgba(109,93,252,.08);
  text-align:left;
}
.mission-action-hint.hidden { display:none; }
.mission-action-hint span { color:var(--neon-magenta); font:8px var(--font-mono); letter-spacing:1.4px; }
.mission-action-hint strong { margin:0; color:#eefeff; font:600 10px/1.5 var(--font-ui); }

.right-panel { width: 340px; }
.right-panel .guide-section { padding-top: 10px !important; padding-bottom: 10px !important; }
.right-panel .guide-list { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 8px; }
.right-panel .guide-list li { font-size: 10px; }
body[data-game-mode="multiplayer"] #social-panel > .mission-floating-panel,
body[data-game-mode="multiplayer"] #social-panel > .guide-section { display:none; }
body[data-game-mode="multiplayer"] #chat-section {
  flex:1 0 210px !important;
  min-height:210px;
}
body[data-game-mode="multiplayer"] #chat-messages { min-height:128px; }

@media (min-width: 901px) {
  .return-lobby-button {
    left: auto;
    right: 20px;
    transform: none;
  }

  body[data-game-mode="multiplayer"] #social-panel {
    margin-top: 52px;
    height: calc(100vh - 92px);
    max-height: calc(100vh - 92px);
    overflow-y: auto;
  }

  body[data-game-mode="task"] #social-panel {
    width: 300px;
    max-height: none;
    gap: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
  }
  body[data-game-mode="task"] #social-panel::before,
  body[data-game-mode="task"] #social-panel > .guide-comms,
  body[data-game-mode="task"] #social-panel > .guide-section { display: none; }
  body[data-game-mode="task"] #social-panel:hover { border: 0; background: transparent; box-shadow: none; }
  body[data-game-mode="task"] #social-panel > .mission-floating-panel {
    margin: 68px 0 0;
    pointer-events: none;
  }
}

.logo-sm {
  font-family: var(--font-logo);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 1px;
}

.logo-sm span {
  color: var(--neon-cyan);
}

.subtitle {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* 统计卡片 */
.stats-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card.full-width {
  grid-column: span 2;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: bold;
}

.stat-value-sm {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: bold;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-cyan));
  border-radius: 3px;
  transition: width 0.3s cubic-bezier(0.1, 0.8, 0.3, 1);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

/* 设置区样式 */
.panel-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  border-left: 2px solid var(--neon-cyan);
  padding-left: 8px;
}

.preset-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-preset {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  text-align: left;
}

.btn-preset:hover {
  background: rgba(0, 240, 255, 0.05);
  border-color: rgba(0, 240, 255, 0.3);
}

.btn-preset.active {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.btn-preset span {
  font-weight: bold;
  font-size: 13px;
}

.btn-preset small {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 11px;
}

.btn-preset.active small {
  color: var(--neon-cyan);
}

.ruleset-picker { margin-top: 12px; padding-top: 11px; border-top: 1px dashed rgba(255,255,255,.08); }
.ruleset-picker-label,.freeplay-label { display:block; margin-bottom:7px; color:var(--text-muted); font:9px var(--font-mono); letter-spacing:1px; text-transform:uppercase; }
.ruleset-buttons { display:grid; gap:6px; }
.btn-ruleset {
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:7px;
  color:var(--text-secondary);
  background:rgba(255,255,255,.025);
  font:10px var(--font-ui);
  cursor:pointer;
}
.btn-ruleset:hover,.btn-ruleset.active { color:#fff; border-color:rgba(255,79,216,.6); background:rgba(255,79,216,.09); }
.feature-toggle { display:grid; grid-template-columns:18px minmax(0,1fr); align-items:center; gap:9px; text-align:left; }
.feature-toggle-check { width:14px; height:14px; border:1px solid rgba(255,255,255,.24); border-radius:4px; background:rgba(0,0,0,.28); box-shadow:inset 0 0 7px rgba(0,0,0,.6); }
.feature-toggle.active .feature-toggle-check { border-color:var(--neon-cyan); background:var(--neon-cyan); box-shadow:0 0 12px rgba(41,231,255,.72), inset 0 0 0 3px rgba(5,7,15,.72); }
.feature-toggle-copy { min-width:0; display:grid; gap:2px; }
.feature-toggle-copy strong { color:inherit; font:700 10px var(--font-ui); }
.feature-toggle-copy small { color:var(--text-muted); font:8px/1.35 var(--font-ui); }
.feature-toggle.active .feature-toggle-copy small { color:#bfefff; }
.feature-toggle:disabled { opacity:.48; cursor:not-allowed; }
.feature-toggle:disabled:hover { border-color:rgba(255,255,255,.09); background:rgba(255,255,255,.025); }
.auto-survey-launch {
  display:grid;
  gap:9px;
  margin-top:10px;
  padding:11px;
  border:1px solid rgba(255,79,216,.42);
  border-radius:10px;
  background:
    radial-gradient(circle at 12% 0, rgba(255,79,216,.14), transparent 42%),
    linear-gradient(135deg, rgba(109,93,252,.11), rgba(8,5,25,.68));
  box-shadow:inset 0 0 22px rgba(109,93,252,.08), 0 0 18px rgba(255,79,216,.06);
}
.auto-survey-launch.hidden { display:none !important; }
.auto-survey-launch-copy { min-width:0; display:grid; gap:3px; }
.auto-survey-launch-copy > span { color:var(--neon-magenta); font:7px var(--font-mono); letter-spacing:1.35px; }
.auto-survey-launch-copy > strong { color:#fff; font:800 12px var(--font-logo); letter-spacing:.7px; }
.auto-survey-launch-copy > small { color:#aaa3d2; font:8px/1.45 var(--font-ui); }
.btn-auto-survey-start {
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 12px;
  border:1px solid rgba(255,79,216,.64);
  border-radius:8px;
  color:#fff;
  background:linear-gradient(110deg, rgba(109,93,252,.32), rgba(255,79,216,.26));
  box-shadow:0 0 18px rgba(255,79,216,.12), inset 0 0 16px rgba(41,231,255,.05);
  cursor:pointer;
}
.btn-auto-survey-start > span { color:var(--neon-cyan); font:18px var(--font-mono); }
.btn-auto-survey-start > strong { font:800 10px var(--font-ui); letter-spacing:.4px; }
.btn-auto-survey-start:hover { border-color:#fff; box-shadow:0 0 24px rgba(255,79,216,.24), inset 0 0 18px rgba(41,231,255,.08); }
.btn-auto-survey-start:disabled { opacity:.48; cursor:not-allowed; }
body[data-task-flow="campaign"] .auto-survey-launch,
body[data-game-mode="multiplayer"] .auto-survey-launch { display:none !important; }
body[data-game-mode="task"][data-task-flow="campaign"] .settings-section { display:none; }

/* 自定义输入区 */
.custom-toggle-header {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease;
}

.custom-toggle-header:hover {
  color: var(--neon-cyan);
}

.custom-toggle-header .arrow {
  font-size: 8px;
  transition: transform 0.2s ease;
}

.custom-toggle-header.active .arrow {
  transform: rotate(180deg);
}

.custom-inputs-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 4px 4px 4px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
}

.custom-inputs-wrapper.hidden {
  display: none;
}

.input-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.input-row label {
  color: var(--text-muted);
}

.input-row input {
  width: 70px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 4px 8px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
}

.input-row input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
}

/* 操作模式切换 */
.mode-toggles {
  display: flex;
  gap: 10px;
}

.btn-mode {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-mode .icon {
  font-size: 18px;
}

.btn-mode:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-mode#btn-mode-dig.active {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
  color: var(--neon-cyan);
}

.btn-mode#btn-mode-flag.active {
  background: rgba(255, 153, 0, 0.08);
  border-color: var(--neon-orange);
  box-shadow: 0 0 12px rgba(255, 153, 0, 0.2);
  color: var(--neon-orange);
}

/* 控制脚部 */
.panel-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.glow-cyan-box {
  background: var(--neon-cyan);
  color: #030712;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}
.glow-cyan-box:hover {
  background: #fff;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.7);
  transform: translateY(-1px);
}
.glow-cyan-box:active {
  transform: translateY(1px);
}

.glow-red-box {
  background: var(--neon-red);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 51, 102, 0.4);
}
.glow-red-box:hover {
  background: #ff557f;
  box-shadow: 0 0 25px rgba(255, 51, 102, 0.7);
  transform: translateY(-1px);
}

.utility-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.utility-buttons #btn-reset-camera { grid-column: 1 / -1; }
.utility-buttons .audio-toggle { min-width: 0; padding-inline: 7px; white-space: nowrap; }
.utility-buttons .audio-toggle[aria-pressed="false"] {
  color: var(--text-muted);
  border-color: rgba(255,255,255,.07);
  background: rgba(255,255,255,.018);
  filter: saturate(.35);
}
.audio-volume-controls {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(109,93,252,.22);
  border-radius: 10px;
  background: linear-gradient(110deg, rgba(109,93,252,.075), rgba(41,231,255,.025));
}
.audio-volume-row {
  display: grid;
  grid-template-columns: 62px minmax(72px, 1fr) 34px;
  align-items: center;
  gap: 8px;
  color: #cfd8f8;
  font: 700 8px/1.2 var(--font-ui);
}
.audio-volume-row output {
  color: var(--neon-cyan);
  font: 700 8px var(--font-mono);
  text-align: right;
}
.audio-volume-row input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  accent-color: var(--neon-magenta);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  touch-action: pan-x;
}
.audio-volume-row input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(109,93,252,.86), rgba(41,231,255,.76));
}
.audio-volume-row input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--neon-magenta);
  box-shadow: 0 0 12px rgba(255,79,216,.55);
  -webkit-appearance: none;
}
.audio-volume-row input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(109,93,252,.86), rgba(41,231,255,.76));
}
.audio-volume-row input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--neon-magenta);
  box-shadow: 0 0 12px rgba(255,79,216,.55);
}

.control-settings-entry {
  flex: none;
  width: 100%;
  color: #dfe7ff;
  border-color: rgba(109,93,252,.38);
  background: linear-gradient(110deg, rgba(109,93,252,.11), rgba(41,231,255,.045));
}

.btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  color: var(--text-main);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary.full-width {
  flex: none;
  width: 100%;
}

.lobby-control-settings {
  position:absolute;
  z-index:4;
  top:16px;
  right:58px;
  min-width:34px;
  min-height:30px;
  padding:5px 9px;
  flex:none;
  font-size:13px;
}

.control-settings-overlay {
  position:fixed;
  z-index:260;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(3,2,12,.82);
  backdrop-filter:blur(10px);
}
.control-settings-overlay.hidden { display:none; }
.control-settings-dialog {
  width:min(720px, calc(100vw - 32px));
  max-height:calc(100dvh - 32px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(109,93,252,.58);
  border-radius:18px;
  background:
    radial-gradient(circle at 8% 0, rgba(41,231,255,.09), transparent 34%),
    linear-gradient(155deg, rgba(16,10,45,.985), rgba(6,4,22,.99));
  box-shadow:0 28px 90px rgba(0,0,0,.82), 0 0 34px rgba(109,93,252,.16);
}
.control-settings-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:20px 22px 16px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.control-settings-kicker { color:var(--neon-cyan); font:8px var(--font-mono); letter-spacing:1.8px; }
.control-settings-header h2 { margin:5px 0 4px; color:#fff; font:800 20px var(--font-logo); letter-spacing:.7px; }
.control-settings-header p { color:var(--text-muted); font:10px/1.5 var(--font-ui); }
.control-settings-close {
  flex:0 0 auto;
  width:36px;
  height:36px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:10px;
  color:#d7dbff;
  background:rgba(255,255,255,.035);
  font:20px var(--font-ui);
  cursor:pointer;
}
.control-settings-close:hover { color:#fff; border-color:var(--neon-magenta); background:rgba(255,79,216,.1); }
.control-settings-scroll {
  display:grid;
  gap:14px;
  min-width:0;
  padding:16px 22px 20px;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  scrollbar-width:thin;
  scrollbar-color:rgba(123,110,224,.48) rgba(5,3,18,.18);
}
.control-settings-scroll::-webkit-scrollbar { width:8px; }
.control-settings-scroll::-webkit-scrollbar-track {
  background:rgba(5,3,18,.24);
  border-left:1px solid rgba(109,93,252,.08);
}
.control-settings-scroll::-webkit-scrollbar-thumb {
  min-height:54px;
  border:2px solid rgba(5,3,18,.7);
  border-radius:999px;
  background:linear-gradient(180deg, rgba(139,126,235,.42), rgba(92,80,185,.5));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}
.control-settings-scroll::-webkit-scrollbar-thumb:hover {
  background:linear-gradient(180deg, rgba(151,139,242,.62), rgba(109,93,252,.68));
}
.control-settings-scroll::-webkit-scrollbar-button { display:none; width:0; height:0; }
.control-settings-scroll::-webkit-scrollbar-corner { background:transparent; }
.control-settings-group {
  display:grid;
  gap:10px;
  padding:13px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:12px;
  background:rgba(255,255,255,.025);
}
.control-settings-group-title { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.control-settings-group-title strong { color:#fff; font:700 11px var(--font-ui); letter-spacing:.4px; }
#control-settings-current { color:var(--neon-cyan); font:8px var(--font-mono); letter-spacing:.8px; }
.control-center-mode-toggle {
  width:100%;
  min-height:64px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto auto;
  align-items:center;
  gap:11px;
  margin:10px 0 12px;
  padding:10px 11px;
  color:#e8ecff;
  text-align:left;
  border:1px solid rgba(41,231,255,.32);
  border-radius:11px;
  background:linear-gradient(120deg, rgba(41,231,255,.08), rgba(109,93,252,.08));
  cursor:pointer;
}
.control-center-mode-copy { min-width:0; display:grid; gap:4px; }
.control-center-mode-copy strong { color:#fff; font:700 11px var(--font-ui); }
.control-center-mode-copy small { color:var(--text-muted); font:8px/1.45 var(--font-ui); }
.control-center-mode-switch {
  position:relative;
  width:38px;
  height:22px;
  flex:none;
  border:1px solid rgba(255,255,255,.2);
  border-radius:999px;
  background:rgba(255,255,255,.08);
}
.control-center-mode-switch i {
  position:absolute;
  top:3px;
  left:3px;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#8d87ad;
  transition:transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.control-center-mode-toggle.active .control-center-mode-switch i {
  transform:translateX(16px);
  background:var(--neon-cyan);
  box-shadow:0 0 10px rgba(41,231,255,.72);
}
.control-center-mode-toggle.movable {
  border-color:rgba(255,79,216,.38);
  background:linear-gradient(120deg, rgba(255,79,216,.09), rgba(109,93,252,.1));
}
.control-center-mode-state { color:var(--neon-cyan); font:8px var(--font-mono); white-space:nowrap; }
.control-center-mode-toggle.movable .control-center-mode-state { color:var(--neon-magenta); }
.control-binding-grid select:disabled { opacity:.45; cursor:not-allowed; }
.control-preset-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.control-preset-card {
  min-width:0;
  min-height:76px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:5px;
  padding:10px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:10px;
  color:var(--text-secondary);
  background:rgba(0,0,0,.2);
  text-align:left;
  cursor:pointer;
}
.control-preset-card strong { color:#fff; font:700 10px var(--font-ui); }
.control-preset-card small { color:var(--text-muted); font:8px/1.4 var(--font-ui); }
.control-preset-card:hover { border-color:rgba(41,231,255,.42); background:rgba(41,231,255,.045); }
.control-preset-card.active { border-color:var(--neon-cyan); background:rgba(41,231,255,.09); box-shadow:0 0 16px rgba(41,231,255,.1), inset 0 0 14px rgba(109,93,252,.08); }
.control-preset-card.active small { color:#c4f5ff; }
.control-binding-grid,.control-hotkey-grid {
  display:grid;
  grid-template-columns:minmax(120px,.8fr) minmax(190px,1.2fr);
  align-items:center;
  gap:8px 12px;
}
.control-binding-grid label,.control-hotkey-grid > span { color:#c8cae8; font:9px var(--font-ui); }
.control-binding-grid select {
  width:100%;
  min-height:36px;
  padding:7px 30px 7px 9px;
  border:1px solid rgba(109,93,252,.28);
  border-radius:8px;
  color:#fff;
  background:#100b2b;
  font:9px var(--font-ui);
}
.control-binding-grid select:focus-visible,.control-key-capture:focus-visible { outline:2px solid var(--neon-cyan); outline-offset:2px; }
.control-key-capture {
  min-height:36px;
  padding:7px 12px;
  border:1px solid rgba(255,79,216,.34);
  border-radius:8px;
  color:var(--neon-magenta);
  background:rgba(255,79,216,.055);
  font:700 10px var(--font-mono);
  cursor:pointer;
}
.control-key-capture.capturing { color:#08101d; border-color:var(--neon-cyan); background:var(--neon-cyan); animation:control-key-pulse 1s ease-in-out infinite; }
@keyframes control-key-pulse { 50% { box-shadow:0 0 18px rgba(41,231,255,.55); } }
.control-fixed-note,.control-touch-note { padding:8px 9px; border-radius:8px; font:8px/1.5 var(--font-ui); }
.control-fixed-note { color:#bcb8dd; background:rgba(109,93,252,.07); }
.control-touch-note { color:#9cefff; background:rgba(41,231,255,.055); }
.control-settings-status { min-height:17px; color:#ff9bcf; font:9px/1.45 var(--font-ui); }
.control-settings-status.ok { color:#8fffd4; }
.control-settings-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-width:0;
  gap:12px;
  padding:14px 22px calc(14px + env(safe-area-inset-bottom));
  border-top:1px solid rgba(255,255,255,.08);
  background:rgba(4,3,16,.72);
}
.control-settings-footer > div {
  display:flex;
  flex:0 1 auto;
  justify-content:flex-end;
  min-width:0;
  gap:8px;
}
.control-settings-footer button {
  flex:0 1 auto;
  width:auto;
  max-width:100%;
  min-height:40px;
  padding:9px 14px;
  white-space:nowrap;
}

/* 指南列表 */
.guide-section {
  padding: 16px;
  font-size: 11px;
}

.guide-title {
  font-size: 12px;
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 8px;
}

.guide-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-list li {
  color: var(--text-muted);
  line-height: 1.4;
  position: relative;
  padding-left: 12px;
}

.guide-list li::before {
  content: "▫";
  color: var(--neon-cyan);
  position: absolute;
  left: 0;
  top: 0;
}

.guide-list strong {
  color: var(--text-main);
}

/* -------------------------------------------------------------
 * 游戏模态弹窗 (GameOver / Victory)
 * ------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 3, 8, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.game-modal {
  position: relative;
  width: 380px;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.guide-lobby {
  --story-lobby-art: none;
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 24px);
  padding: clamp(22px, 3.2dvh, 40px) 40px !important;
  overflow-x: hidden;
  overflow-y: auto;
  align-items: stretch;
  gap: clamp(6px, 1.25dvh, 12px);
  scrollbar-width: thin;
  scrollbar-color: rgba(109, 93, 252, .28) transparent;
  border-color: rgba(109, 93, 252, .55);
  background:
    linear-gradient(180deg, rgba(9, 5, 27, .75), rgba(9, 5, 27, .96)),
    var(--story-lobby-art) center 21% / cover;
  box-shadow: 0 24px 80px rgba(0,0,0,.85), 0 0 42px rgba(109, 93, 252, .18), inset 0 0 45px rgba(255,79,216,.06);
}

body[data-story-art="medium"] .comms-art,
body[data-story-art="medium"] .tutorial-portrait img { object-position: 50% 34%; }
body[data-story-art="hard"] .comms-art,
body[data-story-art="hard"] .tutorial-portrait img,
body[data-story-art="ultimate"] .comms-art,
body[data-story-art="ultimate"] .tutorial-portrait img { object-position: 46% 32%; }
body[data-story-art="squad"] .comms-art,
body[data-story-art="squad"] .tutorial-portrait img { object-position: 48% 29%; }

.guide-lobby::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(41,231,255,.025) 4px);
}
.guide-lobby::-webkit-scrollbar { width: 3px; }
.guide-lobby::-webkit-scrollbar-track { background: transparent; }
.guide-lobby::-webkit-scrollbar-thumb {
  background: linear-gradient(rgba(41,231,255,.24), rgba(255,79,216,.2));
  border-radius: 999px;
}
.guide-lobby::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(rgba(41,231,255,.44), rgba(255,79,216,.38));
}

.lobby-protocol {
  color: var(--neon-magenta);
  font: 9px var(--font-mono);
  letter-spacing: 2px;
}
.guide-lobby .lobby-icon {
  width: clamp(58px, 8dvh, 80px);
  height: clamp(58px, 8dvh, 80px);
  margin-bottom: 0;
  color: var(--neon-cyan);
  border-color: rgba(255,79,216,.32);
  font-size: clamp(36px, 5dvh, 50px);
  text-shadow: 0 0 18px var(--neon-cyan);
}
.lobby-title { color: #fff; text-shadow: 2px 0 var(--neon-magenta), -2px 0 var(--neon-cyan), 0 0 15px rgba(109,93,252,.75); letter-spacing: 2px; }

.lobby-subtitle { margin-bottom: 0; }

.lobby-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lobby-mode-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  color: var(--text-muted);
  text-align: left;
  background: rgba(5, 3, 18, .58);
  border: 1px solid rgba(109, 93, 252, .28);
  border-radius: 10px;
  cursor: pointer;
  transition: .2s ease;
}

.lobby-mode-card:hover,
.lobby-mode-card.active {
  color: #fff;
  border-color: var(--neon-cyan);
  background: linear-gradient(135deg, rgba(41, 231, 255, .12), rgba(255, 79, 216, .1));
  box-shadow: inset 0 0 18px rgba(109, 93, 252, .12), 0 0 12px rgba(41, 231, 255, .09);
}

.lobby-mode-card .mode-card-icon {
  flex: 0 0 auto;
  color: var(--neon-magenta);
  font: 18px var(--font-mono);
  text-shadow: 0 0 9px currentColor;
}

.lobby-mode-card strong,
.lobby-mode-card small { display: block; }
.lobby-mode-card strong { font-size: 12px; }
.lobby-mode-card small { margin-top: 3px; font-size: 9px; line-height: 1.3; color: var(--text-muted); }

.lobby-mode-panel.hidden,
#lobby-campaign-panel.hidden,
#lobby-freeplay-panel.hidden,
.solo-guide-section.hidden,
#player-list-section.hidden,
#chat-section.hidden { display: none !important; }

.task-brief {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  text-align: left;
  background: rgba(41, 231, 255, .055);
  border-left: 2px solid var(--neon-cyan);
}
.task-brief.squad { background: rgba(255, 79, 216, .055); border-color: var(--neon-magenta); }
.task-brief span { flex: 0 0 auto; color: var(--neon-cyan); font: 8px var(--font-mono); letter-spacing: 1px; }
.task-brief.squad span { color: var(--neon-magenta); }
.task-brief p { color: #cbd5ff; font-size: 10px; line-height: 1.45; }

.lobby-main-action { width: 100%; margin-top: clamp(10px, 2dvh, 18px); padding: 12px; font-size: 14px; }
#lobby-modal[aria-busy="true"] #btn-start-task,
#lobby-modal[aria-busy="true"] #btn-create-room,
#lobby-modal[aria-busy="true"] #btn-join-room {
  opacity: .62;
  cursor: wait;
  filter: saturate(.65);
}
#lobby-modal[aria-busy="true"] button[aria-busy="true"] {
  opacity: .9;
  cursor: pointer;
  filter: none;
}
.task-flow-switch { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:clamp(5px, 1dvh, 9px) 0; }
.task-flow-switch button {
  padding:7px 9px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:7px;
  color:var(--text-muted);
  background:rgba(255,255,255,.025);
  font:10px var(--font-ui);
  cursor:pointer;
}
.task-flow-switch button.active { color:#fff; border-color:var(--neon-magenta); background:rgba(255,79,216,.09); }
.task-mission-picker {
  display: grid;
  gap: clamp(4px, .7dvh, 6px);
  margin-top: clamp(5px, 1dvh, 9px);
}
.freeplay-level-label {
  margin-top:10px;
  color:var(--neon-cyan);
  font:8px var(--font-mono);
  letter-spacing:1.2px;
  text-transform:uppercase;
}
.freeplay-mission-picker { margin-top:6px; }
.freeplay-mission-picker .task-mission-option > span {
  min-width:27px;
  color:var(--neon-cyan);
  font-size:10px;
  text-align:center;
}
.freeplay-mission-picker .task-mission-option.active > span { color:#fff; text-shadow:0 0 10px var(--neon-cyan); }
.task-mission-option {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  color: var(--text-muted);
  text-align: left;
  background: rgba(4, 3, 14, .54);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  cursor: pointer;
  transition: .2s ease;
}
.task-mission-option:hover,.task-mission-option.active { color: #fff; border-color: rgba(41,231,255,.5); background: rgba(41,231,255,.07); }
.task-mission-option > span { color: var(--neon-magenta); font: 11px var(--font-mono); }
.task-mission-option strong,.task-mission-option small { display: block; }
.task-mission-option strong { font-size: 11px; }
.task-mission-option small { margin-top: 2px; color: var(--text-muted); font-size: 8px; }
.lobby-room-row { margin: 10px 0; }
.lobby-room-row label { display: block; margin-bottom: 6px; color: #a0c0ff; text-align: left; font-size: 11px; }
.lobby-room-row input {
  width: 100%;
  padding: 10px 12px;
  color: #fff;
  font: 14px var(--font-mono);
  text-transform: uppercase;
  background: rgba(0, 0, 0, .42);
  border: 1px solid rgba(41, 231, 255, .3);
  border-radius: 8px;
}
.lobby-room-actions { display: flex; gap: 10px; }
.lobby-room-actions button { flex: 1; padding: 11px; font-size: 13px; }
.guide-lobby > .input-row { margin-bottom: clamp(2px, .8dvh, 10px) !important; }
.guide-lobby > #lobby-status:empty { display: none; }
.guide-lobby > #lobby-status:not(:empty) { margin-top: 8px !important; }
.nickname-input-wrap { display:flex; align-items:stretch; gap:8px; }
.nickname-input-wrap #input-nickname { flex:1; width:auto; min-width:0; }
.nickname-random-button { flex:0 0 44px; width:44px; min-width:44px; padding:0; font-size:17px; }
.nickname-random-button:hover span { display:inline-block; transform:rotate(18deg) scale(1.08); }
.nickname-random-button span { display:inline-block; transition:transform .16s ease; }

.solo-guide-section {
  padding: 12px 0 0;
  border: 0;
  background: transparent;
}
.solo-guide-heading { display: flex; justify-content: space-between; color: #fff; font-size: 11px; font-weight: 700; }
.solo-guide-heading span:last-child { color: var(--neon-cyan); font: 10px var(--font-mono); }
.solo-guide-steps { display: grid; grid-template-columns: 1fr; gap: 7px; margin-top: 10px; list-style: none; }
.solo-guide-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 5px 0 7px;
  opacity: .44;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  border-radius: 0;
  background: transparent;
}
.solo-guide-steps li:last-child { border-bottom: 0; }
.solo-guide-steps li.active { opacity: 1; border-color: rgba(41, 231, 255, .24); background: transparent; }
.solo-guide-steps li.complete { opacity: .74; border-color: rgba(114,246,193,.18); }
.solo-guide-steps li > span { color: var(--neon-magenta); font: 10px var(--font-mono); }
.solo-guide-steps strong,.solo-guide-steps small { display: block; }
.solo-guide-steps strong { color: #fff; font-size: 10px; font-weight: 600; }
.solo-guide-steps small { margin-top: 3px; color: var(--text-muted); font-size: 8px; line-height: 1.35; }

.modal-overlay.hidden .game-modal {
  transform: scale(0.9);
}

.tutorial-overlay {
  position: fixed;
  z-index: 180;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 28px;
  background: linear-gradient(180deg, transparent 18%, rgba(3,2,10,.28) 52%, rgba(3,2,10,.82));
  transition: opacity .22s ease, transform .22s ease;
}
.tutorial-overlay.hidden { opacity: 0; pointer-events: none; transform: translateY(18px); }
.tutorial-dialog {
  position: relative;
  display: grid;
  grid-template-columns: 180px minmax(0, 560px);
  width: min(760px, calc(100vw - 32px));
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(109,93,252,.55);
  border-radius: 16px;
  background: rgba(11,7,30,.94);
  box-shadow: 0 22px 70px rgba(0,0,0,.75), 0 0 28px rgba(109,93,252,.15);
}
.tutorial-dialog::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(41,231,255,.018) 4px);
}
.tutorial-portrait { position: relative; min-height: 210px; overflow: hidden; }
.tutorial-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 30%; }
.tutorial-portrait::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,transparent 55%,rgba(11,7,30,.98)); }
.tutorial-portrait span { position:absolute; z-index:2; left:12px; bottom:10px; color:var(--neon-cyan); font:8px var(--font-mono); letter-spacing:1px; }
.tutorial-content { position:relative; z-index:2; display:flex; flex-direction:column; padding:24px 26px 20px 8px; }
.tutorial-kicker { color:var(--neon-magenta); font:9px var(--font-mono); letter-spacing:2px; }
.tutorial-content h2 { margin:7px 0 9px; color:#fff; font:800 18px var(--font-logo); letter-spacing:1px; }
.tutorial-content > p { color:#d8dcff; font-size:13px; line-height:1.65; white-space:pre-line; }
.tutorial-fact { margin-top:11px; padding:9px 11px; color:var(--neon-cyan); font:11px/1.55 var(--font-mono); border-left:2px solid var(--neon-magenta); background:rgba(41,231,255,.055); white-space:pre-line; }
.tutorial-fact.hidden { display:none; }
.tutorial-dismiss-hint { margin-top:10px; color:rgba(192,198,232,.55); font:9px var(--font-mono); letter-spacing:.5px; text-align:right; }
.tutorial-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:auto; padding-top:16px; }
.tutorial-actions button { flex:0 0 auto; min-width:104px; padding:9px 14px; }
.replay-entry-button {
  position:relative;
  overflow:hidden;
  min-width:132px;
  color:#fff;
  border-color:rgba(41,231,255,.9);
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.2), transparent 28%),
    linear-gradient(115deg, rgba(41,231,255,.3), rgba(109,93,252,.32) 52%, rgba(255,79,216,.3));
  box-shadow:inset 0 0 18px rgba(41,231,255,.12), 0 0 20px rgba(41,231,255,.24), 0 0 32px rgba(255,79,216,.1);
  font-weight:800;
  letter-spacing:.6px;
  text-shadow:0 0 10px rgba(255,255,255,.45);
}
.replay-entry-button::after {
  content:"";
  position:absolute;
  inset:-45% auto -45% -30%;
  width:26%;
  transform:skewX(-18deg);
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.52), transparent);
  pointer-events:none;
  opacity:0;
}
.replay-entry-button:not(.hidden) { animation:replay-entry-glow 1.8s ease-in-out infinite; }
.replay-entry-button:not(.hidden)::after { animation:replay-entry-sheen 2.6s ease-in-out infinite; }
.replay-entry-button:focus-visible { outline:2px solid #fff; outline-offset:3px; }
.replay-entry-button:active { transform:translateY(0) scale(.99); }
.replay-entry-button:disabled { animation:none; opacity:.52; cursor:not-allowed; }
.replay-entry-button:disabled::after { animation:none; }
.replay-entry-button:hover {
  color:#fff;
  border-color:#fff;
  transform:translateY(-1px) scale(1.015);
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.28), transparent 30%),
    linear-gradient(115deg, rgba(41,231,255,.42), rgba(109,93,252,.4) 52%, rgba(255,79,216,.4));
  box-shadow:0 0 26px rgba(41,231,255,.34), 0 0 40px rgba(255,79,216,.16);
}
@keyframes replay-entry-glow {
  0%,100% { box-shadow:inset 0 0 18px rgba(41,231,255,.12), 0 0 18px rgba(41,231,255,.2), 0 0 28px rgba(255,79,216,.08); }
  50% { box-shadow:inset 0 0 22px rgba(41,231,255,.2), 0 0 28px rgba(41,231,255,.38), 0 0 42px rgba(255,79,216,.18); }
}
@keyframes replay-entry-sheen {
  0%,58% { left:-30%; opacity:0; }
  67% { opacity:.72; }
  86%,100% { left:112%; opacity:0; }
}
.replay-entry-button.hidden { display:none !important; }
.tutorial-actions .replay-entry-button:not(.hidden) {
  flex:1 1 150px;
  min-width:150px;
  min-height:44px;
}
@media (prefers-reduced-motion: reduce) {
  .replay-entry-button:not(.hidden),
  .replay-entry-button:not(.hidden)::after { animation:none; }
}

.tutorial-skip-button {
  color:#ffd6f5;
  border-color:rgba(255,79,216,.72);
  background:rgba(255,79,216,.12);
  box-shadow:inset 0 0 14px rgba(255,79,216,.08), 0 0 12px rgba(255,79,216,.08);
}
.tutorial-skip-button:hover {
  color:#fff;
  border-color:var(--neon-magenta);
  background:rgba(255,79,216,.22);
  box-shadow:0 0 18px rgba(255,79,216,.22);
}
.floating-assist-stack {
  position: fixed;
  z-index: 175;
  left: 50%;
  bottom: 22px;
  width: min(720px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: none;
}
.sector-purge-banner {
  position: fixed;
  z-index: 190;
  left: 50%;
  top: 88px;
  width: min(460px, calc(100vw - 32px));
  display: grid;
  gap: 4px;
  padding: 13px 18px;
  transform: translateX(-50%);
  border: 1px solid rgba(41,231,255,.78);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(110deg, rgba(8,5,27,.97), rgba(31,10,66,.95));
  box-shadow: 0 0 34px rgba(41,231,255,.24), inset 0 0 24px rgba(255,79,216,.12);
  pointer-events: none;
  text-align: center;
  animation: sector-purge-enter .32s ease-out both;
}
.sector-purge-banner.hidden { display:none; }
.sector-purge-banner span { color:var(--neon-magenta); font:8px var(--font-mono); letter-spacing:2px; }
.sector-purge-banner strong { color:#fff; font:800 15px var(--font-logo); letter-spacing:1px; text-shadow:0 0 14px rgba(41,231,255,.72); }
.sector-purge-banner small { color:#bfefff; font:10px/1.45 var(--font-ui); }
@keyframes sector-purge-enter {
  from { opacity:0; transform:translate(-50%, -14px) scale(.94); }
  to { opacity:1; transform:translate(-50%, 0) scale(1); }
}
.replay-hud {
  position:fixed;
  z-index:210;
  top:max(16px, env(safe-area-inset-top));
  left:50%;
  width:min(640px, calc(100vw - 32px));
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto auto;
  align-items:center;
  gap:18px;
  padding:11px 12px 11px 16px;
  transform:translateX(-50%);
  border:1px solid rgba(41,231,255,.66);
  border-radius:14px;
  color:#fff;
  background:linear-gradient(112deg, rgba(7,5,24,.96), rgba(24,9,54,.94));
  box-shadow:0 14px 38px rgba(0,0,0,.48), 0 0 30px rgba(41,231,255,.16), inset 0 0 22px rgba(255,79,216,.08);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  animation:replay-hud-enter .24s ease-out both;
}
.replay-hud.hidden { display:none !important; }
.replay-hud-copy { min-width:0; display:grid; gap:2px; }
.replay-hud-copy span { overflow:hidden; color:var(--neon-magenta); font:8px var(--font-mono); letter-spacing:1.6px; text-overflow:ellipsis; white-space:nowrap; }
.replay-hud-copy strong { overflow:hidden; color:#fff; font:800 13px var(--font-logo); letter-spacing:.8px; text-overflow:ellipsis; white-space:nowrap; text-shadow:0 0 12px rgba(41,231,255,.65); }
.replay-hud-progress { min-width:72px; display:grid; justify-items:center; gap:1px; padding:5px 11px; border-left:1px solid rgba(255,255,255,.09); border-right:1px solid rgba(255,255,255,.09); }
.replay-hud-progress strong { color:var(--neon-cyan); font:700 12px var(--font-mono); text-shadow:0 0 10px rgba(41,231,255,.7); }
.replay-hud-actions { display:flex; align-items:center; gap:7px; }
.replay-control-button {
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:7px 11px;
  border:1px solid rgba(41,231,255,.52);
  border-radius:8px;
  color:#e8fdff;
  background:rgba(41,231,255,.08);
  font:10px var(--font-ui);
  cursor:pointer;
}
.replay-control-button:hover { border-color:var(--neon-cyan); background:rgba(41,231,255,.18); box-shadow:0 0 16px rgba(41,231,255,.16); }
.replay-control-button:focus-visible { outline:2px solid var(--neon-cyan); outline-offset:2px; }
.replay-control-button > span { min-width:10px; color:var(--neon-cyan); font:700 11px var(--font-mono); }
.replay-control-button > strong { font:700 10px var(--font-ui); }
.replay-exit-button { border-color:rgba(255,79,216,.52); color:#ffdff7; background:rgba(255,79,216,.08); }
.replay-exit-button:hover { border-color:var(--neon-magenta); background:rgba(255,79,216,.18); box-shadow:0 0 16px rgba(255,79,216,.16); }
@keyframes replay-hud-enter {
  from { opacity:0; transform:translate(-50%, -10px) scale(.97); }
  to { opacity:1; transform:translate(-50%, 0) scale(1); }
}
.auto-survey-hud {
  position:fixed;
  z-index:214;
  top:max(16px, env(safe-area-inset-top));
  left:50%;
  width:min(680px, calc(100vw - 32px));
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto auto;
  align-items:center;
  gap:16px;
  padding:11px 12px 11px 16px;
  transform:translateX(-50%);
  border:1px solid rgba(255,79,216,.72);
  border-radius:14px;
  color:#fff;
  background:
    radial-gradient(circle at 8% 0, rgba(255,79,216,.2), transparent 38%),
    linear-gradient(112deg, rgba(7,5,24,.97), rgba(34,8,52,.96));
  box-shadow:0 14px 38px rgba(0,0,0,.52), 0 0 34px rgba(255,79,216,.18), inset 0 0 24px rgba(41,231,255,.07);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  animation:replay-hud-enter .24s ease-out both;
}
.auto-survey-hud.hidden { display:none !important; }
.auto-survey-hud-copy { min-width:0; display:grid; gap:3px; }
.auto-survey-hud-copy > span { overflow:hidden; color:var(--neon-magenta); font:8px var(--font-mono); letter-spacing:1.55px; text-overflow:ellipsis; white-space:nowrap; }
.auto-survey-hud-copy > strong { overflow:hidden; color:#fff; font:800 13px var(--font-logo); letter-spacing:.75px; text-overflow:ellipsis; white-space:nowrap; text-shadow:0 0 12px rgba(41,231,255,.58); }
.auto-survey-hud-metrics { display:flex; align-items:stretch; border-left:1px solid rgba(255,255,255,.09); border-right:1px solid rgba(255,255,255,.09); }
.auto-survey-hud-metrics > span { min-width:82px; display:grid; justify-items:center; gap:2px; padding:3px 11px; }
.auto-survey-hud-metrics > span + span { border-left:1px solid rgba(255,255,255,.09); }
.auto-survey-hud-metrics small { color:#aaa3d2; font:7px var(--font-ui); }
.auto-survey-hud-metrics strong { color:var(--neon-cyan); font:700 11px var(--font-mono); text-shadow:0 0 10px rgba(41,231,255,.68); }
.auto-survey-cancel {
  min-height:44px;
  padding:8px 13px;
  border:1px solid rgba(255,79,216,.62);
  border-radius:9px;
  color:#ffe4f9;
  background:rgba(255,79,216,.1);
  font:700 10px var(--font-ui);
  cursor:pointer;
}
.auto-survey-cancel:hover { border-color:#fff; background:rgba(255,79,216,.2); box-shadow:0 0 18px rgba(255,79,216,.18); }
.auto-survey-cancel:disabled { opacity:.52; cursor:wait; }
body.auto-survey-active #tutorial-overlay,
body.auto-survey-active #modal-overlay,
body.auto-survey-active #ad-modal-overlay,
body.auto-survey-active .floating-assist-stack,
body.auto-survey-active #guided-cell-pointer,
body.auto-survey-active #guided-cell-leader { display:none !important; }
body.auto-survey-active #control-panel button,
body.auto-survey-active #control-panel input,
body.auto-survey-active #control-panel [role="switch"],
body.auto-survey-active #slicing-panel button,
body.auto-survey-active #slicing-panel input { pointer-events:none !important; }
body.auto-survey-active #control-panel #btn-sound-toggle,
body.auto-survey-active #control-panel #btn-music-toggle,
body.auto-survey-active #control-panel #sound-volume,
body.auto-survey-active #control-panel #music-volume,
body.replay-active #control-panel #btn-sound-toggle,
body.replay-active #control-panel #btn-music-toggle,
body.replay-active #control-panel #sound-volume,
body.replay-active #control-panel #music-volume {
  pointer-events:auto !important;
  opacity:1;
}
body.auto-survey-active #control-panel .dimension-settings,
body.auto-survey-active #control-panel .mode-controls,
body.auto-survey-active #control-panel #btn-restart,
body.auto-survey-active #slicing-panel { opacity:.42; }
body.replay-active #tutorial-overlay,
body.replay-active #modal-overlay,
body.replay-active #ad-modal-overlay,
body.replay-active .floating-assist-stack,
body.replay-active #sector-purge-banner,
body.replay-active #guided-cell-pointer,
body.replay-active #guided-cell-leader {
  display:none !important;
}
body.replay-active #control-panel button,
body.replay-active #control-panel input,
body.replay-active #control-panel [role="switch"],
body.replay-active #slicing-panel button,
body.replay-active #slicing-panel input {
  pointer-events:none !important;
}
body.replay-active #control-panel .dimension-settings,
body.replay-active #control-panel .mode-controls,
body.replay-active #control-panel #btn-restart,
body.replay-active #slicing-panel {
  opacity:.48;
}
.tutorial-action-hint {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
  padding: 12px 16px;
  border: 1px solid rgba(41,231,255,.58);
  border-radius: 10px;
  background: rgba(9,6,29,.94);
  box-shadow: 0 0 28px rgba(41,231,255,.18), inset 0 0 18px rgba(109,93,252,.08);
  pointer-events: none;
  text-align: center;
}
.tutorial-action-hint.hidden { display: none; }
.tutorial-action-hint span { display:block; margin-bottom:4px; color:var(--neon-magenta); font:8px var(--font-mono); letter-spacing:2px; }
.tutorial-action-hint strong { color:#fff; font:600 12px/1.55 var(--font-ui); }

.solver-hint-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  border: 1px solid rgba(255,215,90,.5);
  border-radius: 12px;
  background: rgba(8,5,25,.96);
  box-shadow: 0 0 28px rgba(255,215,90,.12), inset 0 0 20px rgba(109,93,252,.08);
  overflow: hidden;
  pointer-events: auto;
}
.solver-hint-panel.hidden { display:none; }
.solver-hint-button {
  width:100%;
  min-height:50px;
  display:grid;
  grid-template-columns:36px 1fr;
  grid-template-rows:auto auto;
  column-gap:8px;
  align-items:center;
  padding:9px 14px;
  border:0;
  color:#fff;
  background:linear-gradient(90deg, rgba(109,93,252,.3), rgba(255,79,216,.15));
  cursor:pointer;
  text-align:left;
}
.solver-hint-button > span { grid-row:1 / 3; color:#ffd75a; font:24px var(--font-mono); text-align:center; }
.solver-hint-button strong { font:700 13px var(--font-ui); }
.solver-hint-button small { color:#a9a1d4; font:9px var(--font-ui); }
.solver-hint-button:hover { background:linear-gradient(90deg, rgba(109,93,252,.48), rgba(255,79,216,.25)); }
.solver-hint-button[aria-pressed="true"] {
  padding-right:54px;
  background:linear-gradient(90deg, rgba(255,79,216,.34), rgba(109,93,252,.34));
  box-shadow:inset 0 0 20px rgba(255,79,216,.1);
}
.solver-hint-button[aria-pressed="true"] > span { color:#ff8bea; transform:rotate(45deg); }
.solver-hint-result { position:relative; padding:11px 54px 13px 14px; border-top:1px solid rgba(255,215,90,.22); }
.solver-hint-result.hidden { display:none; }
.solver-hint-controls {
  position:absolute;
  z-index:3;
  top:8px;
  right:9px;
  display:flex;
}
.solver-hint-close,
.solver-hint-collapse {
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid rgba(255,255,255,.22);
  border-radius:8px;
  color:#d9d3f4;
  background:rgba(255,255,255,.05);
  font:20px/1 var(--font-mono);
  cursor:pointer;
}
.solver-hint-close {
  position:absolute;
  z-index:4;
  top:10px;
  right:9px;
  display:none;
}
.solver-hint-button[aria-pressed="true"] + .solver-hint-close { display:grid; }
.solver-hint-collapse { color:#29e7ff; font-size:17px; }
.solver-hint-close:hover,
.solver-hint-collapse:hover { color:#fff; border-color:#ff8bea; background:rgba(255,79,216,.15); }
.solver-hint-collapsed-label {
  display:none;
  min-height:30px;
  align-items:center;
  color:#c8c2e8;
  font:600 10px/1.4 var(--font-ui);
}
.solver-hint-result.is-collapsed { min-height:82px; padding:8px 54px 8px 12px; overflow:hidden; }
.solver-hint-result.is-collapsed .solver-hint-body { display:none; }
.solver-hint-result.is-collapsed .solver-hint-collapsed-label { display:flex; }
.solver-hint-heading { display:flex; align-items:flex-start; gap:9px; margin-bottom:7px; }
.solver-hint-heading span { flex:none; padding:3px 7px; border:1px solid currentColor; border-radius:999px; color:#29e7ff; font:8px var(--font-mono); letter-spacing:1px; }
.solver-hint-result.mine .solver-hint-heading span { color:#ff4fd8; }
.solver-hint-result.guess .solver-hint-heading span { color:#ffb347; }
.solver-hint-result.error .solver-hint-heading span { color:#ff6b7d; }
.solver-hint-target-copy { min-width:0; display:flex; flex-direction:column; gap:2px; }
.solver-hint-heading strong { color:#29e7ff; font:800 13px/1.25 var(--font-ui); }
.solver-hint-result.mine .solver-hint-heading strong { color:#ff4fd8; }
.solver-hint-result.guess .solver-hint-heading strong { color:#ffb347; }
.solver-hint-result.error .solver-hint-heading strong { color:#fff; }
.solver-hint-target-copy small { color:#8d87ad; font:8px/1.35 var(--font-mono); letter-spacing:.2px; }
.solver-hint-result p { margin:0 0 6px; color:#e8e4ff; font:11px/1.55 var(--font-ui); }
.solver-hint-proof {
  display:grid;
  gap:6px;
  margin:8px 0 4px;
  padding:8px;
  border:1px solid rgba(255,215,90,.24);
  border-radius:9px;
  background:rgba(255,215,90,.045);
}
.solver-hint-proof.hidden { display:none; }
.solver-proof-title {
  color:#ffd75a;
  font:800 10px/1.35 var(--font-ui);
  letter-spacing:.3px;
}
.solver-proof-clue {
  display:grid;
  grid-template-columns:24px minmax(0, 1fr);
  align-items:start;
  gap:7px;
}
.solver-proof-clue-id {
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border:1px solid #ffd75a;
  border-radius:50%;
  color:#fff3ad;
  background:rgba(8,5,25,.92);
  box-shadow:0 0 10px rgba(255,215,90,.2);
  font:800 10px var(--font-mono);
}
.solver-proof-clue-text { color:#e8e4ff; font:10px/1.5 var(--font-ui); }
.solver-proof-conclusion {
  margin-top:2px;
  padding-top:7px;
  border-top:1px solid rgba(255,255,255,.09);
  color:#fff;
  font:700 10px/1.55 var(--font-ui);
}
.solver-proof-audit { color:#8d87ad; font:8px/1.4 var(--font-mono); }
.solver-hint-action {
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  align-items:center;
  gap:9px;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid rgba(255,255,255,.1);
}
.solver-hint-action strong { color:#29e7ff; font:800 15px/1.1 var(--font-ui); white-space:nowrap; }
.solver-hint-result.mine .solver-hint-action strong { color:#ff4fd8; }
.solver-hint-result.guess .solver-hint-action strong { color:#ffb347; }
.solver-hint-action span { color:#d8d2f4; font:10px/1.45 var(--font-ui); }

@media (min-width: 901px) {
  .mobile-tutorial-action-hint { display:none !important; }
  body[data-game-mode="task"] .solver-hint-result {
    max-height:42vh;
    overflow-y:auto;
  }
}

.guided-cell-pointer {
  position: fixed;
  z-index: 165;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: min(210px, calc(100vw - 24px));
  min-width: 0;
  padding: 9px 11px;
  appearance: none;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(6, 4, 22, .94);
  font-family: var(--font-mono);
  text-align: left;
  animation: guided-pointer-pulse .9s ease-in-out infinite;
}
.guided-cell-pointer.hidden { display: none; }
.guided-cell-pointer.compact { width: min(144px, calc(100vw - 20px)); padding:7px 9px; }
.guided-cell-pointer.compact small { display:none; }
.guided-cell-pointer.safe { color: var(--neon-cyan); box-shadow: 0 0 22px rgba(41,231,255,.45); }
.guided-cell-pointer.mine { color: var(--neon-magenta); box-shadow: 0 0 22px rgba(255,79,216,.5); }
.guided-cell-pointer strong { color:#fff; font-size:10px; letter-spacing:.5px; }
.guided-cell-pointer small { max-width:none; color:#ffd75a; font:8px/1.35 var(--font-ui); letter-spacing:.2px; }
.guided-cell-pointer > span { display:none; }

.guided-cell-leader {
  position: fixed;
  z-index: 164;
  height: 2px;
  pointer-events: none;
  transform-origin: 0 50%;
  opacity: .82;
}
.guided-cell-leader.hidden { display:none; }
.guided-cell-leader.safe { color:var(--neon-cyan); background:linear-gradient(90deg, currentColor, rgba(41,231,255,.22)); }
.guided-cell-leader.mine { color:var(--neon-magenta); background:linear-gradient(90deg, currentColor, rgba(255,79,216,.22)); }
.guided-cell-leader::after {
  content:"";
  position:absolute;
  right:-4px;
  top:-3px;
  width:8px;
  height:8px;
  border:1px solid currentColor;
  border-radius:50%;
  background:rgba(6,4,22,.92);
  box-shadow:0 0 10px currentColor;
}

#btn-mode-dig.tutorial-target,
#btn-mode-flag.tutorial-target {
  border-color: var(--neon-cyan);
  animation: mobile-tutorial-pulse 1.05s ease-in-out infinite;
}

@keyframes guided-pointer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .84; }
}

@media (max-width: 620px) {
  .tutorial-overlay { padding:10px; }
  .tutorial-dialog { grid-template-columns:96px 1fr; min-height:250px; }
  .tutorial-content { padding:18px 14px 16px 4px; }
  .tutorial-content h2 { font-size:15px; }
  .tutorial-content > p { font-size:11px; }
  .tutorial-actions { flex-wrap:wrap; }
  .tutorial-actions button { min-width:88px; }
}

.modal-icon {
  font-size: 50px;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.modal-title {
  font-family: var(--font-logo);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
}

.modal-message {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-stats {
  display: flex;
  width: 100%;
  gap: 10px;
  padding: 16px;
}

.modal-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.modal-stat-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: bold;
  color: var(--neon-cyan);
}

/* 霓虹特效文本 */
.text-glow-cyan {
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
  color: var(--neon-cyan);
}
.text-glow-orange {
  text-shadow: 0 0 10px rgba(255, 153, 0, 0.6);
  color: var(--neon-orange);
}
.text-glow-red {
  text-shadow: 0 0 10px rgba(255, 51, 102, 0.6);
  color: var(--neon-red);
}
.text-glow-green {
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
  color: var(--neon-green);
}
.text-orange {
  color: var(--neon-orange);
}

.slicing-panel {
  position: fixed;
  z-index: 100;
  top: 20px;
  left: 50%;
  width: clamp(300px, calc(100vw - 700px), 700px);
  min-height: 50px;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  transform: translateX(-50%);
  pointer-events: auto;
  border: 1px solid rgba(41,231,255,.36);
  border-radius: 12px;
  background: rgba(9,6,29,.9);
  box-shadow: 0 10px 30px rgba(0,0,0,.42), inset 0 0 18px rgba(109,93,252,.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}
.slice-panel-header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.slice-panel-header > div { display:flex; flex-direction:column; gap:2px; white-space:nowrap; }
.slice-panel-header strong { color:#fff; font:700 10px var(--font-logo); letter-spacing:1px; }
.slice-panel-header small { display:none; color:#9992c7; font:7px var(--font-ui); }
.slice-axis-list { min-width:0; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:7px; }
.slice-axis-row {
  min-width:0;
  display:grid;
  grid-template-columns:14px minmax(28px, 1fr) 7px minmax(28px, 1fr) 31px;
  align-items:center;
  gap:3px;
  padding:4px 5px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:7px;
  background:rgba(0,0,0,.24);
  color:#7f78aa;
  font:8px var(--font-mono);
}
.slice-axis-label { color:var(--neon-cyan); font-size:11px; font-weight:700; }
.slice-axis-row output { color:#fff; text-align:right; white-space:nowrap; }
.slice-axis-row input[type="range"] {
  width:100%;
  min-width:0;
  height:16px;
  margin:0;
  padding:0;
  accent-color:var(--neon-magenta);
  cursor:pointer;
}
.slice-reset-button,
.slice-close-button {
  min-height:30px;
  padding:5px 9px;
  border:1px solid rgba(255,79,216,.35);
  border-radius:8px;
  color:#fff;
  background:rgba(255,79,216,.09);
  font:9px var(--font-ui);
  white-space:nowrap;
  cursor:pointer;
}
.slice-reset-button:hover { border-color:var(--neon-magenta); background:rgba(255,79,216,.18); }
.slice-close-button { width:32px; padding:0; font:19px/1 var(--font-mono); }
@media (min-width: 901px) and (max-width: 1120px) {
  .slicing-panel { grid-template-columns:1fr; width:300px; }
  .slice-panel-header > div { flex-direction:row; align-items:center; gap:8px; }
}

.mobile-only { display: none; }

/* -------------------------------------------------------------
 * 响应式布局优化
 * ------------------------------------------------------------- */
@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body { position: fixed; inset: 0; }

  html,
  body,
  body * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }

  input,
  textarea {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
  }

  #canvas-container {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    touch-action: none;
  }

  #canvas-container canvas { touch-action: none; }

  .mobile-only { display: flex; }

  .return-lobby-button {
    top: calc(8px + env(safe-area-inset-top));
    left: 10px;
    width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 12px;
    transform: none;
  }

  .return-lobby-button strong { display: none; }
  body.in-room .mobile-statusbar { left: 60px; right:60px; }

  .center-camera-button {
    position:fixed;
    z-index:65;
    top:calc(8px + env(safe-area-inset-top));
    right:10px;
    display:none;
    width:42px;
    height:42px;
    align-items:center;
    justify-content:center;
    padding:0;
    color:#fff;
    border:1px solid rgba(41,231,255,.48);
    border-radius:12px;
    background:rgba(9,6,29,.82);
    box-shadow:0 8px 24px rgba(0,0,0,.4), 0 0 16px rgba(41,231,255,.12);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    touch-action:manipulation;
  }
  body.in-room .center-camera-button { display:flex; }
  .center-camera-button span { color:var(--neon-cyan); font:800 23px/1 var(--font-mono); }
  .center-camera-button strong { display:none; }
  body.in-room.mobile-panel-active .center-camera-button,
  body.replay-active .center-camera-button,
  body.auto-survey-active .center-camera-button,
  body:has(#tutorial-action-hint:not(.hidden)) .center-camera-button {
    display:none !important;
    pointer-events:none !important;
  }

  body.in-room.mobile-panel-active .return-lobby-button {
    display: none !important;
    pointer-events: none !important;
  }

  .hud-container {
    display: block;
    z-index: 80;
    overflow: visible;
    padding: 0;
    pointer-events: none;
  }

  #control-panel,
  #social-panel,
  #slicing-panel {
    position: fixed !important;
    z-index: 80 !important;
    left: 10px !important;
    right: 10px !important;
    top: calc(58px + env(safe-area-inset-top)) !important;
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 16px !important;
    opacity: 0;
    pointer-events: none !important;
    transform: translateY(112%);
    transition: transform .26s cubic-bezier(.16,1,.3,1), opacity .18s ease;
  }

  #control-panel.mobile-open,
  #social-panel.mobile-open,
  #slicing-panel.mobile-open {
    opacity: 1;
    pointer-events: auto !important;
    transform: translateY(0);
  }

  #control-panel {
    padding: 18px;
    gap: 14px;
  }

  #control-panel .action-section { display: none; }

  #social-panel { padding: 0 !important; }
  .mission-floating-panel { margin: 10px; padding: 12px 13px; }

  #slicing-panel {
    top: auto !important;
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    padding:12px;
    transform:translateY(125%);
  }

  #slicing-panel.mobile-open {
    z-index: 180 !important;
    transform: translateY(0);
  }
  .slice-panel-header strong { font-size:11px; }
  .slice-panel-header small { display:block; font-size:8px; }
  .slice-axis-list { grid-template-columns:1fr; gap:6px; }
  .slice-axis-row { grid-template-columns:18px minmax(70px,1fr) 12px minmax(70px,1fr) 38px; min-height:38px; padding:5px 8px; }
  .slice-axis-row input[type="range"] { height:28px; }
  .slice-reset-button { min-height:42px; font-size:11px; }

  .mobile-statusbar {
    position: fixed;
    z-index: 60;
    top: calc(8px + env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    height: 42px;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(109,93,252,.42);
    border-radius: 12px;
    background: rgba(9,6,29,.78);
    box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 0 18px rgba(109,93,252,.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: none;
  }

  .mobile-statusbar > div {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    border-right: 1px solid rgba(255,255,255,.06);
  }

  .mobile-statusbar > div:last-child { border-right: 0; }
  .mobile-statusbar span { color: var(--text-muted); font: 7px var(--font-mono); letter-spacing: 1px; }
  .mobile-statusbar strong { color: #fff; font: 12px var(--font-mono); text-shadow: 0 0 8px var(--neon-cyan); }

  .mobile-panel-backdrop {
    position: fixed;
    z-index: 70;
    inset: 0;
    opacity: 0;
    background: rgba(3,2,10,.56);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    pointer-events: none;
    transition: opacity .18s ease;
  }

  .mobile-panel-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-control-dock {
    position: fixed;
    z-index: 90;
    left: 8px;
    right: 8px;
    bottom: calc(6px + env(safe-area-inset-bottom));
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(109,93,252,.48);
    border-radius: 14px;
    background: rgba(9,6,29,.92);
    box-shadow: 0 12px 35px rgba(0,0,0,.5), 0 0 22px rgba(109,93,252,.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .mobile-touch-hint {
    height: 18px;
    padding: 3px 8px 0;
    overflow: hidden;
    color: rgba(205,211,255,.7);
    font: 8px var(--font-mono);
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255,255,255,.05);
  }

  .mobile-dock-buttons {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
  }

  .mobile-dock-buttons button {
    min-width: 0;
    min-height: 48px;
    padding: 4px 2px;
    color: var(--text-muted);
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    touch-action: manipulation;
  }

  .mobile-dock-buttons button span,
  .mobile-dock-buttons button small { display: block; }
  .mobile-dock-buttons button span { color: var(--neon-cyan); font: 700 16px var(--font-mono); }
  .mobile-dock-buttons button small { margin-top: 3px; font-size: 9px; }
  .mobile-dock-buttons button.active {
    color: #fff;
    border-color: rgba(41,231,255,.48);
    background: linear-gradient(135deg, rgba(41,231,255,.13), rgba(255,79,216,.1));
    box-shadow: inset 0 0 14px rgba(109,93,252,.1);
  }

  .mobile-dock-buttons button.tutorial-target {
    color: #fff;
    border-color: var(--neon-cyan);
    animation: mobile-tutorial-pulse 1.05s ease-in-out infinite;
  }

  #btn-mobile-flag.active { border-color: rgba(255,117,200,.58); }

  .panel {
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
  }

  .guide-comms { grid-template-columns: 128px 1fr; }

  .modal-overlay { padding: 8px; }

  .game-modal {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    gap: 14px;
    padding: 24px 16px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .modal-icon { width: 58px; height: 58px; margin-bottom: 0; font-size: 36px; }
  .modal-title { font-size: 19px; }
  .modal-buttons { gap: 8px !important; }
  .modal-buttons button { min-height: 46px; }
  #game-modal .modal-buttons { flex-wrap:wrap; }
  #btn-modal-replay:not(.hidden) { flex-basis:100% !important; }

  .guide-lobby {
    width: min(420px, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: clamp(14px, 2.8dvh, 24px) 14px !important;
    gap: clamp(6px, 1.25dvh, 12px);
  }

  .guide-lobby .lobby-icon {
    width: clamp(44px, 7.6dvh, 50px);
    height: clamp(44px, 7.6dvh, 50px);
    font-size: clamp(28px, 4.7dvh, 31px);
  }
  .lobby-title { padding: 0 34px; font-size: 18px; }
  .lobby-subtitle { font-size: 11px; }
  .lobby-mode-card { min-height: 58px; padding: 8px; }
  .lobby-mode-card .mode-card-icon { font-size: 15px; }
  .task-mission-option { min-height: 46px; }
  .nickname-input-wrap input,
  .lobby-room-row input,
  #input-chat { font-size: 16px !important; }

  .tutorial-overlay {
    align-items: flex-end;
    padding: 8px;
  }

  .tutorial-dialog {
    grid-template-columns: 86px minmax(0, 1fr);
    width: 100%;
    max-height: calc(100dvh - 16px);
    min-height: 228px;
  }

  .tutorial-portrait { min-height: 228px; }
  .tutorial-portrait span { left: 6px; font-size: 6px; }
  .tutorial-content { min-width: 0; padding: 16px 12px 12px 4px; overflow-y: auto; }
  .tutorial-content h2 { font-size: 14px; }
  .tutorial-content > p { font-size: 11px; line-height: 1.55; }
  .tutorial-fact { padding: 7px 8px; font-size: 9px; }
  .tutorial-dismiss-hint { font-size: 8px; }
  .tutorial-actions { gap: 6px; padding-top: 10px; }
  .tutorial-actions button { min-width: 0; min-height: 44px; padding: 8px 10px; font-size: 11px; }
  .tutorial-actions .replay-entry-button:not(.hidden) {
    flex:1 0 100%;
    width:100%;
    min-width:100%;
    min-height:48px;
  }

  .floating-assist-stack {
    display: contents;
  }

  .sector-purge-banner {
    top: calc(58px + env(safe-area-inset-top));
    width: calc(100vw - 20px);
    padding: 10px 12px;
  }
  .sector-purge-banner strong { font-size:13px; }
  .sector-purge-banner small { font-size:9px; }
  body:has(#tutorial-action-hint:not(.hidden)) .sector-purge-banner {
    top: calc(178px + env(safe-area-inset-top));
  }

  .replay-hud {
    top:calc(8px + env(safe-area-inset-top));
    width:calc(100vw - 16px);
    grid-template-columns:minmax(0, 1fr) auto;
    gap:5px 10px;
    padding:9px 9px 9px 12px;
    border-radius:12px;
  }
  .replay-hud-copy span { font-size:6px; letter-spacing:1px; }
  .replay-hud-copy strong { font-size:11px; }
  .replay-hud-progress {
    grid-column:1;
    min-width:0;
    justify-items:start;
    display:flex;
    align-items:center;
    gap:7px;
    padding:0;
    border:0;
  }
  .replay-hud-progress strong { font-size:10px; }
  .replay-hud-actions { grid-column:2; grid-row:1 / span 2; gap:5px; }
  .replay-control-button { min-height:40px; padding:7px 9px; }
  .replay-control-button > strong { font-size:9px; }
  body.replay-active .return-lobby-button {
    display:none !important;
    pointer-events:none !important;
  }
  body.replay-active .mobile-statusbar,
  body.replay-active #mobile-control-dock,
  body.replay-active #mobile-panel-backdrop,
  body.replay-active #control-panel,
  body.replay-active #social-panel,
  body.replay-active #slicing-panel {
    display:none !important;
  }

  .auto-survey-hud {
    top:calc(8px + env(safe-area-inset-top));
    width:calc(100vw - 16px);
    grid-template-columns:minmax(0, 1fr) auto;
    gap:6px 10px;
    padding:9px 9px 9px 12px;
    border-radius:12px;
  }
  .auto-survey-hud-copy > span { font-size:6px; letter-spacing:1px; }
  .auto-survey-hud-copy > strong { font-size:11px; }
  .auto-survey-hud-metrics {
    grid-column:1;
    min-width:0;
    border:0;
  }
  .auto-survey-hud-metrics > span { min-width:0; display:flex; align-items:center; gap:5px; padding:0 10px 0 0; }
  .auto-survey-hud-metrics > span + span { padding-left:10px; border-left:1px solid rgba(255,255,255,.09); }
  .auto-survey-hud-metrics small { font-size:6px; }
  .auto-survey-hud-metrics strong { font-size:9px; }
  .auto-survey-cancel { grid-column:2; grid-row:1 / span 2; min-height:44px; padding:8px 10px; font-size:9px; }
  body.auto-survey-active .return-lobby-button {
    top:auto;
    bottom:calc(10px + env(safe-area-inset-bottom));
    left:10px;
    transform:none;
    min-width:44px;
    min-height:44px;
    padding:7px 10px;
  }
  body.auto-survey-active .sector-purge-banner {
    top:calc(112px + env(safe-area-inset-top));
  }
  body.auto-survey-active .mobile-statusbar,
  body.auto-survey-active #mobile-control-dock,
  body.auto-survey-active #mobile-panel-backdrop,
  body.auto-survey-active #control-panel,
  body.auto-survey-active #social-panel,
  body.auto-survey-active #slicing-panel,
  body.auto-survey-active .solver-hint-panel {
    display:none !important;
  }

  .tutorial-action-hint {
    position: fixed;
    z-index: 175;
    left: 10px;
    right: 10px;
    top: calc(58px + env(safe-area-inset-top));
    bottom: auto;
    width: auto;
    padding: 9px 11px;
  }
  body:has(#social-panel.mobile-open) .mobile-tutorial-action-hint { display:none !important; }

  .solver-hint-panel {
    position: fixed;
    z-index: 172;
    left: 10px;
    right: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: auto;
  }
  body.mobile-panel-active .solver-hint-panel,
  body:has(#slicing-panel.mobile-open) .solver-hint-panel {
    display: none !important;
  }
  .solver-hint-button { min-height:46px; padding:7px 10px; }
  .solver-hint-result { max-height:32vh; overflow-y:auto; padding:9px 58px 10px 10px; }
  .solver-hint-controls { top:5px; right:5px; }
  .solver-hint-close { top:3px; right:5px; }
  .solver-hint-close,
  .solver-hint-collapse { width:40px; height:40px; }
  .solver-hint-result.is-collapsed { min-height:94px; max-height:none; padding:7px 58px 7px 10px; overflow:hidden; }
  .solver-hint-collapsed-label { min-height:36px; font-size:10px; }
  .solver-hint-result p { font-size:10px; }
  .solver-hint-proof { gap:5px; padding:7px; }
  .solver-proof-clue-text, .solver-proof-conclusion { font-size:9px; }
  .solver-hint-heading strong { font-size:13px; }
  .solver-hint-target-copy small { font-size:8px; }
  .solver-hint-action { grid-template-columns:1fr; gap:4px; }
  .solver-hint-action strong { font-size:14px; }
  .solver-hint-action span { font-size:10px; }

}

@keyframes mobile-tutorial-pulse {
  0%, 100% {
    box-shadow: inset 0 0 12px rgba(109,93,252,.12), 0 0 0 rgba(41,231,255,0);
  }
  50% {
    box-shadow: inset 0 0 16px rgba(109,93,252,.24), 0 0 18px rgba(41,231,255,.58);
  }
}

@media (max-width: 900px) and (max-height: 620px) {
  .guide-lobby {
    padding: 14px !important;
    gap: 6px;
  }
  .guide-lobby .lobby-icon {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }
  .guide-lobby > .input-row { margin-bottom: 2px !important; }
  .task-flow-switch { margin: 5px 0; }
  .task-mission-picker { gap: 4px; margin-top: 5px; }
  .lobby-main-action { margin-top: 10px; }
  .mobile-touch-hint { display: none; }
  .mobile-control-dock { bottom: calc(4px + env(safe-area-inset-bottom)); }
  .mobile-dock-buttons button { min-height: 44px; }
  #control-panel,
  #social-panel { top: calc(52px + env(safe-area-inset-top)) !important; bottom: calc(62px + env(safe-area-inset-bottom)) !important; }
  .auto-survey-hud-copy > strong { max-width:46vw; }
  .auto-survey-hud { gap:4px 7px; }
  .auto-survey-cancel { min-width:82px; }
}

@media (max-width: 900px) {
  .control-settings-overlay { align-items:flex-end; padding:6px; }
  .control-settings-dialog {
    width:100%;
    max-height:calc(100dvh - 8px);
    border-radius:18px 18px 12px 12px;
  }
  .control-settings-header { padding:15px 14px 12px; }
  .control-settings-header h2 { font-size:17px; }
  .control-settings-header p { font-size:9px; }
  .control-settings-scroll { gap:10px; padding:10px 12px 14px; }
  .control-settings-group { padding:10px; }
  .control-center-mode-toggle { min-height:68px; grid-template-columns:minmax(0,1fr) auto; }
  .control-center-mode-state { grid-column:2; font-size:7px; }
  .control-center-mode-switch { grid-column:2; grid-row:1; }
  .control-preset-grid { grid-template-columns:1fr; }
  .control-preset-card { min-height:58px; }
  .control-binding-grid,.control-hotkey-grid { grid-template-columns:minmax(104px,.8fr) minmax(150px,1.2fr); gap:7px 9px; }
  .control-binding-grid select,.control-key-capture { min-height:44px; font-size:10px; }
  .control-settings-footer { padding:10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .control-settings-footer button { min-height:44px; padding:9px 11px; }
}
