/* ==========================================================================
   黑客科技风主题（Cyber Hacker / SOC Operations Center Tech Theme）
   100% 离线纯 CSS · 覆盖主控大厅、A/B/C 分层考核与数字证书及全部 11 关
   严格兼容 Safari file:// 离线运行与桌面端 100vh 单屏自适应
   ========================================================================== */

:root {
  color-scheme: dark !important;
  --bg: #04090f !important;
  --panel: rgba(8, 18, 30, 0.94) !important;
  --surface: rgba(11, 25, 42, 0.92) !important;
  --surface-2: rgba(7, 17, 29, 0.95) !important;
  --line: rgba(0, 240, 255, 0.32) !important;
  --cream: #e6f7ff !important;
  --muted: #84adc4 !important;
  --mint: #00ff9c !important;
  --gold: #00f0ff !important;
  --red: #ff3b5c !important;
  --blue: #38bdf8 !important;

  --cyber-cyan: #00f0ff;
  --cyber-green: #00ff9c;
  --cyber-amber: #ffb800;
  --cyber-red: #ff3b5c;
  --cyber-void: #04090f;
  --cyber-panel: #081320;
  --cyber-border: rgba(0, 240, 255, 0.34);
  --cyber-glow: 0 0 16px rgba(0, 240, 255, 0.18);
  --cyber-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;
}

/* 深空黑曜石 + 赛博战术雷达网格 + 微弱扫描光晕 */
html, body {
  background-color: #04090f !important;
  background-image:
    radial-gradient(circle at 15% 8%, rgba(0, 240, 255, 0.11) 0%, transparent 42%),
    radial-gradient(circle at 86% 88%, rgba(0, 255, 156, 0.08) 0%, transparent 40%),
    linear-gradient(rgba(0, 240, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.055) 1px, transparent 1px) !important;
  background-size: 100% 100%, 100% 100%, 30px 30px, 30px 30px !important;
  color: #e6f7ff !important;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif !important;
}

/* ================= 1. 顶部战术指挥条（HUD Topbar） ================= */
.header, .topbar {
  background: linear-gradient(180deg, rgba(10, 24, 40, 0.96), rgba(6, 15, 26, 0.96)) !important;
  border: 1px solid rgba(0, 240, 255, 0.42) !important;
  border-left: 4px solid var(--cyber-cyan) !important;
  border-radius: 8px !important;
  padding: 10px 16px !important;
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.12), inset 0 1px 0 rgba(0, 240, 255, 0.22) !important;
}
.header h1, .topbar h1 {
  color: #e6faff !important;
  font-weight: 850 !important;
  letter-spacing: 0.03em;
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.38);
}
.header p, .topbar p {
  color: #84adc4 !important;
}

.badge-stage {
  background: rgba(0, 240, 255, 0.12) !important;
  color: var(--cyber-cyan) !important;
  border: 1px solid rgba(0, 240, 255, 0.55) !important;
  border-radius: 4px !important;
  font-family: var(--cyber-mono);
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.18);
}

.stat-pill {
  background: rgba(5, 14, 24, 0.9) !important;
  border: 1px solid rgba(0, 240, 255, 0.35) !important;
  border-radius: 6px !important;
  color: #b7d7e8 !important;
  font-family: var(--cyber-mono);
  font-weight: 600 !important;
  box-shadow: inset 0 0 8px rgba(0, 240, 255, 0.07);
}
.stat-pill strong { color: var(--cyber-cyan) !important; text-shadow: 0 0 8px rgba(0, 240, 255, 0.4); }
.stat-pill.rank-pill strong { color: var(--cyber-green) !important; text-shadow: 0 0 8px rgba(0, 255, 156, 0.35); }
.stat-pill.combo-pill strong { color: var(--cyber-amber) !important; }

/* ================= 2. 加密通讯频道剧情条（SOC Comms Feed） ================= */
.story-bar {
  background: linear-gradient(90deg, rgba(6, 22, 36, 0.95), rgba(8, 17, 29, 0.92)) !important;
  border: 1px solid rgba(0, 255, 156, 0.34) !important;
  border-left: 3px solid var(--cyber-green) !important;
  border-radius: 8px !important;
  box-shadow: 0 0 16px rgba(0, 255, 156, 0.08) !important;
}
.story-avatar {
  background: rgba(0, 240, 255, 0.12) !important;
  border: 1px solid rgba(0, 240, 255, 0.5) !important;
  border-radius: 6px !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.22);
}
.story-text {
  color: #d8f3ff !important;
}
.story-text strong {
  color: var(--cyber-green) !important;
  font-weight: 800;
}
.story-tag {
  background: rgba(255, 59, 92, 0.14) !important;
  color: #ff6b81 !important;
  border: 1px solid rgba(255, 59, 92, 0.52) !important;
  border-radius: 4px !important;
  font-family: var(--cyber-mono);
  font-weight: 700 !important;
}

/* ================= 3. 赛博发光按钮系统 ================= */
.btn, .basic, .primary, .tab-btn, .lv-link, .chip, .cli-tab {
  border-radius: 6px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  transition: all 0.15s ease !important;
}

.btn, .basic, .tab-btn {
  background: rgba(9, 24, 40, 0.9) !important;
  color: #d8f3ff !important;
  border: 1px solid rgba(0, 240, 255, 0.36) !important;
  box-shadow: inset 0 1px 0 rgba(0, 240, 255, 0.12) !important;
}
.btn:hover:not(:disabled), .basic:hover:not(:disabled), .tab-btn:hover:not(:disabled) {
  background: rgba(0, 240, 255, 0.14) !important;
  border-color: var(--cyber-cyan) !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.28) !important;
}

.btn.primary, .primary, .lv-link {
  background: linear-gradient(135deg, #00e5ff, #00ff9c) !important;
  color: #03131d !important;
  border: 1px solid #7affea !important;
  font-weight: 850 !important;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35) !important;
}
.btn.primary:hover:not(:disabled), .primary:hover:not(:disabled), .lv-link:hover {
  background: linear-gradient(135deg, #5ef4ff, #5effbf) !important;
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.55) !important;
  transform: translateY(-1px);
}

.btn.mint, .basic.mint, .lv-link.done {
  background: rgba(0, 255, 156, 0.14) !important;
  color: var(--cyber-green) !important;
  border: 1px solid rgba(0, 255, 156, 0.6) !important;
  box-shadow: 0 0 12px rgba(0, 255, 156, 0.18) !important;
}
.btn.mint:hover:not(:disabled), .basic.mint:hover:not(:disabled), .lv-link.done:hover {
  background: rgba(0, 255, 156, 0.24) !important;
  color: #ffffff !important;
}

.basic[aria-pressed=true] {
  background: rgba(0, 240, 255, 0.2) !important;
  border-color: var(--cyber-cyan) !important;
  color: var(--cyber-cyan) !important;
}

/* ================= 4. 步骤进度条（赛博协议节点） ================= */
.step-tab, .level {
  background: rgba(7, 19, 32, 0.92) !important;
  color: #9dc3d8 !important;
  border: 1px solid rgba(0, 240, 255, 0.24) !important;
  border-radius: 6px !important;
  font-weight: 650 !important;
}
.step-tab small, .level small {
  color: #6b93ab !important;
  font-family: var(--cyber-mono);
}
.step-tab[aria-current=step], .level[aria-current=step] {
  background: rgba(0, 240, 255, 0.14) !important;
  color: var(--cyber-cyan) !important;
  border: 1px solid var(--cyber-cyan) !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25), inset 0 0 10px rgba(0, 240, 255, 0.1) !important;
}
.step-tab.done, .level.complete:not([aria-current=step]) {
  background: rgba(0, 255, 156, 0.1) !important;
  color: var(--cyber-green) !important;
  border-color: rgba(0, 255, 156, 0.5) !important;
}
.level .lv-stars { color: var(--cyber-amber) !important; }

/* ================= 5. 主控制台面板与右侧 MISSION 任务舱 ================= */
.panel {
  background: rgba(7, 17, 29, 0.94) !important;
  border: 1px solid rgba(0, 240, 255, 0.34) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(0, 240, 255, 0.08), inset 0 1px 0 rgba(0, 240, 255, 0.18) !important;
}

.stage-head {
  background: linear-gradient(90deg, rgba(8, 26, 44, 0.96), rgba(6, 17, 30, 0.96)) !important;
  color: var(--cyber-cyan) !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.28) !important;
  font-family: var(--cyber-mono);
  font-weight: 700 !important;
}

.stage-wrap {
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.06), transparent 72%),
    #03080e !important;
}

.caption {
  background: rgba(5, 13, 22, 0.96) !important;
  color: #9dc3d8 !important;
  border-top: 1px solid rgba(0, 240, 255, 0.25) !important;
  font-family: var(--cyber-mono);
}
.caption.good, .message.good { color: var(--cyber-green) !important; font-weight: 700; text-shadow: 0 0 8px rgba(0, 255, 156, 0.25); }
.caption.bad, .message.bad { color: #ff6b81 !important; font-weight: 700; }

.mission {
  background: linear-gradient(180deg, rgba(9, 21, 36, 0.96), rgba(6, 14, 24, 0.96)) !important;
  border-top: 3px solid var(--cyber-cyan) !important;
}
.eyebrow {
  color: var(--cyber-cyan) !important;
  font-family: var(--cyber-mono);
  font-weight: 800 !important;
  letter-spacing: 0.1em;
}
.mission h2 {
  color: #f0faff !important;
  font-weight: 850 !important;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.22);
}
.help, .small {
  color: #8ab4cc !important;
}

.group {
  background: rgba(4, 12, 22, 0.78) !important;
  border: 1px solid rgba(0, 240, 255, 0.26) !important;
  border-radius: 8px !important;
}
.group legend {
  color: var(--cyber-cyan) !important;
  font-family: var(--cyber-mono);
  font-weight: 750 !important;
  background: rgba(0, 240, 255, 0.1);
  padding: 1px 8px !important;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.38);
}

.field {
  color: #cfeaf8 !important;
}
.field input:not([type=checkbox]), .field select, .profile-box input, .cli-in {
  background: #030a12 !important;
  color: #e6faff !important;
  border: 1px solid rgba(0, 240, 255, 0.35) !important;
  border-radius: 6px !important;
  font-family: var(--cyber-mono);
}
.field input:focus, .field select:focus, .profile-box input:focus, .cli-in:focus {
  border-color: var(--cyber-cyan) !important;
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.22), 0 0 12px rgba(0, 240, 255, 0.25) !important;
  outline: none !important;
}

code {
  background: rgba(0, 240, 255, 0.1) !important;
  color: var(--cyber-green) !important;
  border: 1px solid rgba(0, 255, 156, 0.28);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--cyber-mono);
}

/* 演示进度条与状态徽章 */
.demo-badge {
  background: rgba(255, 184, 0, 0.12) !important;
  color: var(--cyber-amber) !important;
  border: 1px solid rgba(255, 184, 0, 0.5) !important;
  font-family: var(--cyber-mono);
  font-weight: 700 !important;
}
.demo-badge.ready {
  background: rgba(0, 255, 156, 0.14) !important;
  border-color: rgba(0, 255, 156, 0.6) !important;
  color: var(--cyber-green) !important;
}
.demo-progress-wrap {
  background: #030a12 !important;
  border: 1px solid rgba(0, 240, 255, 0.32) !important;
}
.demo-progress-bar {
  background: linear-gradient(90deg, #00f0ff, #00ff9c) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.45);
}

/* 全息提示卡片 */
.hint, .hint-anim-card {
  background: rgba(0, 240, 255, 0.08) !important;
  color: #d8f6ff !important;
  border: 1px solid rgba(0, 240, 255, 0.45) !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.12);
}
.hint-coach-icon {
  background: rgba(0, 240, 255, 0.16) !important;
  border: 1px solid var(--cyber-cyan) !important;
}

/* 模式切换开关 */
.mode-switch {
  background: #030a12 !important;
  border: 1px solid rgba(0, 240, 255, 0.34) !important;
  border-radius: 6px !important;
}
.mode-switch button { color: #84adc4 !important; font-family: var(--cyber-mono); }
.mode-switch button.active {
  background: rgba(0, 240, 255, 0.2) !important;
  color: var(--cyber-cyan) !important;
}

/* 终端与命令行区（黑客矩阵终端） */
.log-screen, .cli-screen {
  background: #02070c !important;
  color: #00ff9c !important;
  border-top: 1px solid rgba(0, 240, 255, 0.26);
  font-family: var(--cyber-mono) !important;
  text-shadow: 0 0 4px rgba(0, 255, 156, 0.2);
}
.cli-bar {
  background: #061320 !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.28) !important;
}
.cli-tab {
  background: #040d17 !important;
  color: #7ea8bf !important;
  border: 1px solid rgba(0, 240, 255, 0.24) !important;
  font-family: var(--cyber-mono);
}
.cli-tab.active {
  background: rgba(0, 240, 255, 0.16) !important;
  color: var(--cyber-cyan) !important;
  border-color: var(--cyber-cyan) !important;
}
.cli-input-row {
  background: #030910 !important;
  border-top: 1px solid rgba(0, 240, 255, 0.26) !important;
}
.cli-input { color: #e6faff !important; font-family: var(--cyber-mono); }
.cli-quick {
  background: #05101b !important;
  border-top: 1px solid rgba(0, 240, 255, 0.22) !important;
}
.chip {
  background: rgba(0, 240, 255, 0.08) !important;
  color: #b7e9ff !important;
  border: 1px solid rgba(0, 240, 255, 0.32) !important;
  font-family: var(--cyber-mono);
}
.chip:hover {
  background: rgba(0, 240, 255, 0.2) !important;
  border-color: var(--cyber-cyan) !important;
  color: #ffffff !important;
}

/* 3-1 关专属组件适配 */
.map {
  background: #040c16 !important;
  border-top: 1px solid rgba(0, 240, 255, 0.26);
}
.map::before { background: rgba(0, 240, 255, 0.35) !important; }
.device strong {
  background: #071726 !important;
  color: var(--cyber-cyan) !important;
  border: 1px solid rgba(0, 240, 255, 0.45) !important;
}
.device small { color: #8ab4cc !important; }
.chassis, .wic-tray, .cli-guide, .fault-banner, .cert-box, .cable-pill {
  background: rgba(5, 14, 24, 0.92) !important;
  border: 1px solid rgba(0, 240, 255, 0.32) !important;
  color: #d8f3ff !important;
}
.chassis-head strong { color: var(--cyber-cyan) !important; }
.wic-card {
  background: rgba(0, 240, 255, 0.16) !important;
  color: var(--cyber-cyan) !important;
  border: 1px solid var(--cyber-cyan) !important;
}
.inspector {
  background: rgba(6, 16, 28, 0.98) !important;
  border: 1.5px solid var(--cyber-cyan) !important;
  box-shadow: 0 0 32px rgba(0, 240, 255, 0.25), 0 18px 48px rgba(0, 0, 0, 0.7) !important;
  color: #e6f7ff !important;
}
.inspector-head h3 { color: var(--cyber-cyan) !important; }
.inspector-item {
  background: #040c16 !important;
  border: 1px solid rgba(0, 240, 255, 0.25) !important;
  color: #e6f7ff !important;
}
.inspector-item span { color: #7ea8bf !important; }

/* ================= 6. 通关庆典弹窗（赛博认证弹窗） ================= */
.victory-toast {
  background: linear-gradient(160deg, rgba(8, 24, 40, 0.98), rgba(4, 12, 22, 0.98)) !important;
  border: 2px solid var(--cyber-cyan) !important;
  box-shadow: 0 0 38px rgba(0, 240, 255, 0.32), 0 24px 60px rgba(0, 0, 0, 0.75) !important;
  color: #e6f7ff !important;
}
.victory-toast h2, .victory-title {
  color: var(--cyber-cyan) !important;
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.45) !important;
}
.victory-subtitle { color: var(--cyber-green) !important; }
.victory-toast p, .victory-finale-box p {
  background: rgba(3, 10, 18, 0.85) !important;
  color: #b7d7e8 !important;
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
}
.victory-toast p strong, .victory-finale-box p strong { color: var(--cyber-amber) !important; }

/* ================= 7. 主控大厅 index.html 赛博指挥中心 ================= */
.hero {
  background: linear-gradient(135deg, rgba(8, 22, 38, 0.96) 0%, rgba(4, 12, 22, 0.96) 100%) !important;
  border: 1px solid rgba(0, 240, 255, 0.45) !important;
  border-top: 3px solid var(--cyber-cyan) !important;
  border-radius: 10px !important;
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.14), inset 0 1px 0 rgba(0, 240, 255, 0.25) !important;
}
.hero h1 {
  color: #e6faff !important;
  font-weight: 900 !important;
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
}
.hero .eyebrow { color: var(--cyber-green) !important; font-family: var(--cyber-mono); }
.hero .sub { color: #8ab4cc !important; }
.cast-pill {
  background: rgba(0, 240, 255, 0.08) !important;
  border: 1px solid rgba(0, 240, 255, 0.34) !important;
  color: #cfeaf8 !important;
  border-radius: 6px !important;
}
.cast-pill b { color: var(--cyber-cyan) !important; }

.hud-card {
  background: rgba(6, 16, 28, 0.94) !important;
  border: 1px solid rgba(0, 240, 255, 0.32) !important;
  border-radius: 8px !important;
  box-shadow: inset 0 1px 0 rgba(0, 240, 255, 0.15) !important;
}
.hud-card span { color: #7ea8bf !important; font-family: var(--cyber-mono); }
.hud-card strong { color: var(--cyber-cyan) !important; font-family: var(--cyber-mono); text-shadow: 0 0 10px rgba(0, 240, 255, 0.3); }
.hud-card.mint strong { color: var(--cyber-green) !important; text-shadow: 0 0 10px rgba(0, 255, 156, 0.3); }
.progress-track {
  background: #030a12 !important;
  border: 1px solid rgba(0, 240, 255, 0.35) !important;
}
.progress-fill {
  background: linear-gradient(90deg, #00f0ff, #00ff9c) !important;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.chapter {
  background: rgba(7, 17, 29, 0.94) !important;
  border: 1px solid rgba(0, 240, 255, 0.32) !important;
  border-radius: 10px !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45) !important;
}
.chapter-head {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.12), rgba(6, 16, 28, 0.95)) !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.28) !important;
}
.chapter.s2 .chapter-head { background: linear-gradient(90deg, rgba(255, 184, 0, 0.12), rgba(6, 16, 28, 0.95)) !important; }
.chapter.s3 .chapter-head { background: linear-gradient(90deg, rgba(255, 59, 92, 0.14), rgba(6, 16, 28, 0.95)) !important; }
.chapter-head h2 { color: #e6faff !important; font-weight: 850 !important; }
.chapter-head p { color: #8ab4cc !important; }
.stage-chip {
  background: rgba(0, 240, 255, 0.15) !important;
  color: var(--cyber-cyan) !important;
  border: 1px solid rgba(0, 240, 255, 0.5) !important;
  font-family: var(--cyber-mono);
}
.chapter.s2 .stage-chip { color: var(--cyber-amber) !important; border-color: rgba(255, 184, 0, 0.55) !important; background: rgba(255, 184, 0, 0.12) !important; }
.chapter.s3 .stage-chip { color: #ff6b81 !important; border-color: rgba(255, 59, 92, 0.55) !important; background: rgba(255, 59, 92, 0.14) !important; }
.chapter-badge {
  background: #040c16 !important;
  color: var(--cyber-green) !important;
  border: 1px solid rgba(0, 255, 156, 0.42) !important;
  font-family: var(--cyber-mono);
}

.lv-card {
  background: rgba(5, 14, 24, 0.92) !important;
  border: 1px solid rgba(0, 240, 255, 0.26) !important;
  border-radius: 8px !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}
.lv-card.ready:hover {
  transform: translateY(-2px) !important;
  border-color: var(--cyber-cyan) !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.22) !important;
}
.lv-card.cleared {
  background: rgba(4, 24, 24, 0.92) !important;
  border-color: rgba(0, 255, 156, 0.52) !important;
}
.lv-code {
  background: rgba(0, 240, 255, 0.14) !important;
  color: var(--cyber-cyan) !important;
  border: 1px solid rgba(0, 240, 255, 0.45);
  font-family: var(--cyber-mono);
}
.lv-stars { color: var(--cyber-amber) !important; }
.lv-card h3 { color: #f0faff !important; font-weight: 800 !important; }
.lv-tag { color: var(--cyber-green) !important; font-family: var(--cyber-mono); }
.lv-desc { color: #84adc4 !important; }
.lv-foot { border-top: 1px dashed rgba(0, 240, 255, 0.24) !important; }

.exam-banner {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(0, 255, 156, 0.08), rgba(6, 16, 28, 0.96)) !important;
  border: 1.5px solid var(--cyber-cyan) !important;
  border-radius: 10px !important;
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.16) !important;
}
.exam-banner h2 { color: var(--cyber-cyan) !important; text-shadow: 0 0 12px rgba(0, 240, 255, 0.35); }
.exam-banner p { color: #b7d7e8 !important; }

/* ================= 8. A/B/C 分层考核与数字证书 exam.html ================= */
.tier-card {
  background: rgba(5, 14, 24, 0.94) !important;
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
  border-radius: 8px !important;
  transition: all 0.15s ease !important;
}
.tier-card:hover {
  border-color: var(--cyber-cyan) !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.18) !important;
}
.tier-card.active {
  background: linear-gradient(145deg, rgba(0, 240, 255, 0.16), rgba(6, 18, 32, 0.96)) !important;
  border: 1.5px solid var(--cyber-cyan) !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.28), inset 0 0 12px rgba(0, 240, 255, 0.1) !important;
}
.tier-card strong { color: var(--cyber-cyan) !important; font-family: var(--cyber-mono); }
.tier-card span { color: #9dc3d8 !important; }

.timer-bar {
  background: rgba(5, 14, 24, 0.96) !important;
  border: 1px solid var(--cyber-cyan) !important;
  border-left: 4px solid var(--cyber-green) !important;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.16) !important;
  color: #e6f7ff !important;
  font-family: var(--cyber-mono);
}
.timer-clock { color: var(--cyber-amber) !important; text-shadow: 0 0 10px rgba(255, 184, 0, 0.4); }
.sec-title {
  color: var(--cyber-cyan) !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.3) !important;
  font-family: var(--cyber-mono);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}
.q-card {
  background: rgba(5, 13, 23, 0.92) !important;
  border: 1px solid rgba(0, 240, 255, 0.25) !important;
  border-radius: 8px !important;
}
.q-tag {
  background: rgba(0, 240, 255, 0.12) !important;
  color: var(--cyber-cyan) !important;
  border: 1px solid rgba(0, 240, 255, 0.42);
  font-family: var(--cyber-mono);
}
.opt {
  background: rgba(8, 20, 34, 0.85) !important;
  border: 1px solid rgba(0, 240, 255, 0.22) !important;
  border-radius: 6px !important;
  color: #d8f3ff !important;
}
.opt:hover {
  border-color: var(--cyber-cyan) !important;
  background: rgba(0, 240, 255, 0.1) !important;
}
.cli-box {
  background: #02070c !important;
  color: #00ff9c !important;
  border: 1px solid rgba(0, 255, 156, 0.38) !important;
  font-family: var(--cyber-mono) !important;
}
.r-stat {
  background: rgba(5, 14, 24, 0.94) !important;
  border: 1px solid rgba(0, 240, 255, 0.32) !important;
  border-radius: 8px !important;
}
.r-stat strong { color: var(--cyber-cyan) !important; font-family: var(--cyber-mono); }
.r-stat.mint strong { color: var(--cyber-green) !important; }
.review-item {
  background: rgba(0, 255, 156, 0.06) !important;
  border: 1px solid rgba(0, 255, 156, 0.28) !important;
  border-left: 4px solid var(--cyber-green) !important;
  color: #e6f7ff !important;
}
.review-item.wrong {
  background: rgba(255, 59, 92, 0.08) !important;
  border-color: rgba(255, 59, 92, 0.32) !important;
  border-left-color: var(--cyber-red) !important;
}
.review-item .ans { color: var(--cyber-green) !important; font-family: var(--cyber-mono); }
.review-item.wrong .ans { color: var(--cyber-amber) !important; }
#res-title { color: var(--cyber-cyan) !important; font-weight: 900 !important; text-shadow: 0 0 14px rgba(0, 240, 255, 0.38); }
#cert-canvas {
  border: 1.5px solid var(--cyber-cyan) !important;
  border-radius: 8px !important;
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.25) !important;
}
.footer { color: #6b93ab !important; font-family: var(--cyber-mono); }

/* ================= 9. 特殊关卡专属组件适配（0-0 / 1-1 / 1-2） ================= */
.wire-card {
  background: rgba(6, 16, 28, 0.94) !important;
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
  color: #e6f7ff !important;
}
.wire-card.selected {
  background: rgba(0, 240, 255, 0.16) !important;
  border-color: var(--cyber-cyan) !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35) !important;
}
.choice-btn {
  background: rgba(6, 16, 28, 0.92) !important;
  border: 1px solid rgba(0, 240, 255, 0.28) !important;
  color: #d8f3ff !important;
}
.choice-btn:hover {
  border-color: var(--cyber-cyan) !important;
  background: rgba(0, 240, 255, 0.1) !important;
}
.choice-btn.active {
  background: rgba(0, 255, 156, 0.14) !important;
  border-color: var(--cyber-green) !important;
  color: var(--cyber-green) !important;
}
.router-gui {
  background: rgba(5, 14, 24, 0.95) !important;
  border: 1px solid rgba(0, 240, 255, 0.38) !important;
  color: #d8f3ff !important;
}
.router-gui-bar {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.22), rgba(6, 20, 36, 0.96)) !important;
  color: var(--cyber-cyan) !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.32);
  font-family: var(--cyber-mono);
}
.laptop-chassis {
  background: rgba(4, 12, 22, 0.94) !important;
  border: 1px solid rgba(0, 240, 255, 0.32) !important;
  color: #d8f3ff !important;
}
.nic-slot {
  background: #030a12 !important;
  border: 1.5px dashed rgba(0, 240, 255, 0.35) !important;
  color: #9dc3d8 !important;
}
.nic-slot.wired {
  border-style: solid !important;
  border-color: var(--cyber-cyan) !important;
  background: rgba(0, 240, 255, 0.1) !important;
  color: var(--cyber-cyan) !important;
}
.nic-slot.wireless {
  border-style: solid !important;
  border-color: var(--cyber-green) !important;
  background: rgba(0, 255, 156, 0.12) !important;
  color: var(--cyber-green) !important;
}
#web-preview {
  background: rgba(0, 255, 156, 0.08) !important;
  border: 1px solid var(--cyber-green) !important;
  color: #d8f3ff !important;
}
.f-pill {
  background: rgba(255, 59, 92, 0.1) !important;
  border: 1px solid rgba(255, 59, 92, 0.45) !important;
  color: #e6f7ff !important;
}
.f-pill strong { color: #ff6b81 !important; }
.f-pill.cured {
  background: rgba(0, 255, 156, 0.1) !important;
  border-color: rgba(0, 255, 156, 0.55) !important;
}
.f-pill.cured strong { color: var(--cyber-green) !important; }
.f-pill.active-target {
  border-color: var(--cyber-cyan) !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.3) !important;
}

/* ================= 10. 双模式系统 UI（教学模式 / 限时挑战计分模式） ================= */
.mode-console {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px 15px;
  border-radius: 8px;
  background: rgba(4, 13, 24, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.42);
  box-shadow: inset 0 0 14px rgba(0, 240, 255, 0.08);
}
.mode-console.challenge-active {
  border-color: rgba(255, 184, 0, 0.65);
  box-shadow: 0 0 18px rgba(255, 184, 0, 0.14), inset 0 0 14px rgba(255, 184, 0, 0.08);
}
.mode-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 7px;
  background: #020810;
  border: 1px solid rgba(0, 240, 255, 0.3);
}
.mode-tab-btn {
  padding: 7px 14px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: #84adc4;
  font-weight: 750;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}
.mode-tab-btn:hover { color: #e6faff; }
.mode-tab-btn.active.teaching {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--cyber-cyan);
  color: var(--cyber-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.22);
}
.mode-tab-btn.active.challenge {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.25), rgba(255, 59, 92, 0.22));
  border-color: var(--cyber-amber);
  color: #ffd166;
  box-shadow: 0 0 14px rgba(255, 184, 0, 0.28);
}
.mode-console-desc {
  flex: 1;
  min-width: 240px;
  font-size: 0.83rem;
  color: #b7d7e8;
}
.mode-console-desc strong { color: var(--cyber-cyan); }
.mode-console.challenge-active .mode-console-desc strong { color: var(--cyber-amber); }

.lv-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--cyber-mono);
  font-size: 0.74rem;
  font-weight: 750;
  background: rgba(0, 255, 156, 0.12);
  border: 1px solid rgba(0, 255, 156, 0.5);
  color: var(--cyber-green);
}
.lv-score-badge.empty {
  background: rgba(255, 184, 0, 0.08);
  border-color: rgba(255, 184, 0, 0.35);
  color: var(--cyber-amber);
}
.lv-link.challenge-btn {
  background: linear-gradient(135deg, #ffb800, #ff5e3a) !important;
  color: #0b0f14 !important;
  border-color: #ffd166 !important;
  box-shadow: 0 0 14px rgba(255, 184, 0, 0.35) !important;
}
.lv-link.challenge-btn:hover {
  background: linear-gradient(135deg, #ffd166, #ff7b5c) !important;
  box-shadow: 0 0 20px rgba(255, 184, 0, 0.55) !important;
}

.ng-mode-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.ng-mode-pill {
  padding: 4px 10px;
  border-radius: 5px;
  font-family: var(--cyber-mono);
  font-size: 0.76rem;
  font-weight: 750;
}
.ng-mode-pill.teaching {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.45);
  color: var(--cyber-cyan);
}
.ng-mode-pill.challenge {
  background: rgba(255, 184, 0, 0.14);
  border: 1px solid rgba(255, 184, 0, 0.6);
  color: #ffd166;
}
.ng-timer-pill {
  padding: 4px 11px;
  border-radius: 5px;
  font-family: var(--cyber-mono);
  font-size: 0.84rem;
  font-weight: 850;
  background: #020810;
  border: 1px solid var(--cyber-cyan);
  color: var(--cyber-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}
.ng-timer-pill.warn {
  border-color: var(--cyber-amber);
  color: var(--cyber-amber);
  box-shadow: 0 0 12px rgba(255, 184, 0, 0.35);
}
.ng-timer-pill.danger {
  border-color: var(--cyber-red);
  color: #ff6b81;
  box-shadow: 0 0 16px rgba(255, 59, 92, 0.55);
  animation: ngPulseDanger 0.8s ease-in-out infinite;
}
.ng-timer-pill.done {
  border-color: var(--cyber-green);
  color: var(--cyber-green);
  box-shadow: 0 0 12px rgba(0, 255, 156, 0.35);
}
.ng-mistake-pill {
  padding: 4px 9px;
  border-radius: 5px;
  font-family: var(--cyber-mono);
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 59, 92, 0.12);
  border: 1px solid rgba(255, 59, 92, 0.45);
  color: #ff8fa3;
}
.ng-switch-btn {
  padding: 4px 10px !important;
  font-size: 0.76rem !important;
}
.ng-hint-locked {
  opacity: 0.48 !important;
  cursor: not-allowed !important;
  border-color: rgba(255, 59, 92, 0.45) !important;
  color: #ff8fa3 !important;
}
@keyframes ngPulseDanger {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.ng-score-card {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(0, 255, 156, 0.08));
  border: 1.5px solid var(--cyber-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.18);
  text-align: left;
}
.ng-score-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ng-score-badge {
  font-family: var(--cyber-mono);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--cyber-amber);
}
.ng-score-new {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 184, 0, 0.18);
  border: 1px solid var(--cyber-amber);
  color: #ffd166;
}
.ng-score-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.ng-score-num {
  font-family: var(--cyber-mono);
  font-size: 2rem;
  font-weight: 900;
  color: var(--cyber-green);
  text-shadow: 0 0 14px rgba(0, 255, 156, 0.4);
  line-height: 1;
}
.ng-score-num small { font-size: 0.9rem; margin-left: 3px; color: #b7d7e8; }
.ng-score-grade {
  font-family: var(--cyber-mono);
  font-size: 0.9rem;
  font-weight: 850;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid var(--cyber-cyan);
  color: var(--cyber-cyan);
  background: rgba(0, 240, 255, 0.12);
}
.ng-score-grade.grade-s { border-color: #ffd166; color: #ffd166; background: rgba(255, 184, 0, 0.18); }
.ng-score-grade.grade-a { border-color: #00ff9c; color: #00ff9c; background: rgba(0, 255, 156, 0.14); }
.ng-score-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.76rem;
  color: #9dc3d8;
  font-family: var(--cyber-mono);
}
.ng-score-breakdown b { color: #e6faff; }

.ng-timeout-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 7, 14, 0.86);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
}
.ng-timeout-card {
  max-width: 520px;
  width: 100%;
  padding: 24px 26px;
  border-radius: 10px;
  background: linear-gradient(160deg, #0b1929, #050c15);
  border: 2px solid var(--cyber-red);
  box-shadow: 0 0 36px rgba(255, 59, 92, 0.35);
  text-align: center;
}
.ng-timeout-tag {
  font-family: var(--cyber-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  color: #ff6b81;
  margin-bottom: 6px;
}
.ng-timeout-card h2 {
  margin: 0 0 10px;
  color: #fff0f3;
  font-size: 1.35rem;
}
.ng-timeout-card p {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: #b7d7e8;
  line-height: 1.6;
}
.ng-timeout-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ================= 11. 移动端深度适配（横屏左右分屏为主 + 竖屏练习 + 一键全屏看图） ================= */
button, a, input, select, .lv-card, .wire-card, .choice-btn, .opt, .chip {
  touch-action: manipulation;
}

/* 默认隐藏竖屏提示条，仅在手机竖屏下显示 */
.ng-landscape-tip {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 11px;
  margin-bottom: 8px;
  border-radius: 7px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.45);
  color: #d8f6ff;
  font-size: 0.78rem;
}
.ng-landscape-tip strong { color: var(--cyber-amber); }
.ng-tip-close {
  background: transparent;
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 4px;
  color: var(--cyber-cyan);
  padding: 2px 7px;
  font-size: 0.76rem;
}

/* 全屏看图按钮与全屏覆盖层（保留原始 SVG 节点与交互事件） */
.ng-zoom-btn {
  padding: 3px 9px !important;
  font-size: 0.75rem !important;
  background: rgba(0, 240, 255, 0.14) !important;
  border-color: rgba(0, 240, 255, 0.55) !important;
  color: var(--cyber-cyan) !important;
}
body.ng-fs-lock {
  overflow: hidden !important;
}
.stage-wrap.ng-stage-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9500 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-height: none !important;
  background: #03080e !important;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}
.stage-wrap.ng-stage-fullscreen #stage-svg-wrap,
.stage-wrap.ng-stage-fullscreen .world {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
}
.ng-zoom-close {
  position: fixed !important;
  top: max(12px, env(safe-area-inset-top)) !important;
  right: max(14px, env(safe-area-inset-right)) !important;
  z-index: 9600 !important;
  padding: 7px 14px !important;
  font-size: 0.84rem !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.45) !important;
}

/* -------- A. 手机 / 小平板横屏模式：紧凑左右双栏分屏（主力实训模式） -------- */
@media (max-width: 1020px) and (orientation: landscape) and (max-height: 620px) {
  html, body {
    height: 100dvh !important;
    overflow: hidden !important;
  }
  .shell {
    height: 100dvh !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 5px max(10px, env(safe-area-inset-right)) 5px max(10px, env(safe-area-inset-left)) !important;
    gap: 5px !important;
    overflow: hidden !important;
  }
  .header, .topbar {
    padding: 5px 10px !important;
    margin-bottom: 0 !important;
    gap: 6px !important;
    border-radius: 6px !important;
  }
  .header h1, .topbar h1 {
    font-size: 14.5px !important;
    line-height: 1.2 !important;
  }
  .header p, .topbar p { display: none !important; }
  .btn, .basic, .primary {
    padding: 3px 8px !important;
    font-size: 0.73rem !important;
  }
  .ng-mode-bar { gap: 5px !important; }
  .ng-mode-pill, .ng-timer-pill, .ng-mistake-pill {
    padding: 2px 7px !important;
    font-size: 0.72rem !important;
  }
  .story-bar {
    padding: 4px 9px !important;
    margin-bottom: 0 !important;
    gap: 8px !important;
  }
  .story-avatar { width: 24px !important; height: 24px !important; font-size: 14px !important; }
  .story-text {
    font-size: 0.74rem !important;
    line-height: 1.28 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .story-tag { font-size: 0.68rem !important; padding: 1px 6px !important; }
  .steps-nav, .levels {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 5px !important;
    margin-bottom: 0 !important;
    flex: none !important;
  }
  .step-tab, .level {
    flex: 0 0 auto !important;
    padding: 3px 9px !important;
    font-size: 0.73rem !important;
    white-space: nowrap !important;
  }
  .step-tab small, .level small { display: none !important; }
  .layout {
    flex: 1 !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr) !important;
    gap: 8px !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }
  .layout > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    gap: 5px !important;
    overflow: hidden !important;
  }
  #stage-panel {
    flex: 1 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .stage-head { padding: 3px 8px !important; font-size: 0.72rem !important; }
  .stage-wrap {
    flex: 1 !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }
  .stage-wrap .world, .stage-wrap #stage-svg-wrap {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
  }
  .caption { padding: 3px 8px !important; min-height: 24px !important; font-size: 0.72rem !important; }
  .log-box { margin-top: 0 !important; flex: none !important; }
  .log-screen, .cli-screen { height: 58px !important; font-size: 0.7rem !important; padding: 4px 8px !important; }
  .mission {
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 8px 10px !important;
  }
  .mission h2 { font-size: 15px !important; margin-bottom: 3px !important; }
  .mission .help, .small { font-size: 0.75rem !important; line-height: 1.35 !important; }
  .group { padding: 6px 8px !important; margin-bottom: 6px !important; }
  .wire-grid { gap: 4px !important; }
  .wire-card { padding: 4px 3px !important; }
  .chip { padding: 4px 8px !important; font-size: 0.73rem !important; }
  .victory-toast {
    top: 6% !important;
    max-height: 88dvh !important;
    overflow-y: auto !important;
    padding: 14px 20px !important;
  }
}

/* -------- B. 手机竖屏模式：单栏顺滑练习 + 触控加大 + 倒计时吸顶 -------- */
@media (max-width: 767px) {
  .shell {
    padding: 10px max(10px, env(safe-area-inset-right)) 24px max(10px, env(safe-area-inset-left)) !important;
  }
  .header, .topbar {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .header h1, .topbar h1 { font-size: 18px !important; line-height: 1.3 !important; }
  .buttons { gap: 6px !important; }
  .btn, .basic, .primary {
    min-height: 36px;
    padding: 6px 10px !important;
    font-size: 0.8rem !important;
  }
  /* 挑战模式顶栏吸顶，竖屏滚动时随时可见倒计时 */
  body.ng-mode-challenge .ng-mode-bar {
    position: sticky;
    top: 4px;
    z-index: 45;
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(4, 12, 22, 0.96);
    border: 1px solid rgba(255, 184, 0, 0.55);
  }
  .steps-nav, .levels {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 6px !important;
    padding-bottom: 4px;
  }
  .step-tab, .level {
    flex: 0 0 auto !important;
    min-width: 86px !important;
    padding: 7px 9px !important;
    white-space: nowrap !important;
  }
  .story-bar { padding: 8px 10px !important; gap: 8px !important; }
  .story-avatar { width: 32px !important; height: 32px !important; font-size: 16px !important; }
  .story-text { font-size: 0.8rem !important; }
  .layout { grid-template-columns: 1fr !important; gap: 10px !important; }
  .stage-wrap { min-height: 190px; }
  /* 防止 iOS Safari 聚焦输入框时自动缩放页面 */
  input:not([type=range]):not([type=checkbox]):not([type=radio]), select, .cli-input, .cli-in, .profile-box input {
    font-size: 16px !important;
    min-height: 40px;
  }
  input[type=range] { height: 34px; }
  .choice-btn, .opt {
    min-height: 44px;
    padding: 10px 12px !important;
    font-size: 0.86rem !important;
  }
  .chip {
    min-height: 36px;
    padding: 6px 11px !important;
    font-size: 0.8rem !important;
  }
  .wire-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 6px !important; }
  .wire-card { padding: 8px 4px !important; min-height: 64px; }
  .cli-screen, .log-screen { height: 150px !important; font-size: 0.78rem !important; }

  /* 大厅 index.html 竖屏优化 */
  .hero { padding: 14px 14px !important; }
  .hero h1 { font-size: 22px !important; }
  .profile-box { flex-direction: column; align-items: stretch !important; }
  .profile-box input { width: 100% !important; }
  .mode-tabs { width: 100%; display: grid !important; grid-template-columns: 1fr 1fr; }
  .mode-tab-btn { text-align: center; padding: 9px 6px !important; font-size: 0.82rem !important; }
  .hud { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .level-grid { grid-template-columns: 1fr !important; padding: 12px !important; }

  /* 考核页 exam.html 竖屏优化 */
  .tier-grid, .r-grid { grid-template-columns: 1fr !important; }
  .timer-bar { flex-wrap: wrap; gap: 8px; padding: 8px 12px !important; }

  /* 弹窗防溢出 */
  .victory-toast {
    top: 6% !important;
    width: 94vw !important;
    max-width: 94vw !important;
    max-height: 86dvh !important;
    overflow-y: auto !important;
    padding: 16px 16px !important;
  }
  .ng-timeout-card { padding: 18px 16px !important; }
}

@media (max-width: 767px) and (orientation: portrait) {
  .ng-landscape-tip { display: flex !important; }
}
