/*
 * H5 浅色主题的界面适配层。
 * 与小程序转换产物分离，重新运行 build/build.js 不会覆盖此文件。
 * 只适配界面、文字及交互状态；场景插画、照片、红旗和武器保留原色。
 * 所有规则仅在 light 模式启用，经典深色继续使用原样式。
 */

/* 页面与文字层级 */
:root[data-color-scheme="light"] {
  background: var(--theme-canvas);
}
:root[data-color-scheme="light"] :is(.home, .command-page, .victory-page, .conduct-page, .scene-page) {
  background: var(--theme-canvas);
  color: var(--theme-text);
}
:root[data-color-scheme="light"] :is(
  .command-hud, .quiz-question, .quiz-option-copy, .quiz-option-state,
  .quiz-feedback, .checkpoint-readiness-value, .progress-value,
  .ship-scene-title, .ship-btn-label, .ship-modal-title,
  .gucai-card-text, .gucai-feature-text, .gucai-popup, .gucai-finale-sub,
  .beacon-tower-short, .find-item-name, .signal-pad-icon, .dispatch-card-name,
  .buddy-speech, .speech-line, .rotate-hint, .wx-modal, .wx-toast
) { color: var(--theme-text); }

:root[data-color-scheme="light"] :is(
  .cover-body, .route-desc, .progress-copy, .setting-desc, .brief-body,
  .act-brief-body, .stage-brief-body, .instruction-copy, .stage-brief-quote,
  .operation-heading-instruction, .operation-instruction, .result-body,
  .campaign-result-body, .checkpoint-side, .quiz-feedback-copy,
  .scenario-feedback-copy, .act-result-quote-body, .match-core-copy,
  .spot-detail-copy, .failure-copy, .game-result-copy,
  .ship-scene-text, .ship-modal-desc, .ship-btn-desc,
  .relay-stage-instruction, .gucai-side-desc, .gucai-sil-note,
  .gucai-legend-item, .gucai-msg, .gucai-swipe-guide, .gucai-hold-tip,
  .daily-feedback-text, .road-event-prompt, .llk-status, .llk-toast,
  .beacon-hud-sub, .beacon-tower-name,
  .beacon-hint, .beacon-feedback, .find-count, .signal-meta-item,
  .dispatch-meta-item, .dispatch-team-name, .mine-traverse-message,
  .mine-traverse-footer, .node-label, .wx-modal-body, .rotate-copy span,
  .rotate-ios-tip, .ios-install-copy
) { color: var(--theme-secondary); }

:root[data-color-scheme="light"] :is(
  .cover-top, .cover-note, .brand-subtitle, .route-status, .mission-top,
  .mission-bottom, .local-note, .report-stat-label, .report-metrics,
  .hud-center, .hud-stat-label, .hud-metric-label, .brief-meta, .intro-index,
  .history-line, .act-index-label, .act-index-total, .stage-index-label,
  .stage-index-total, .status-label, .timer-label, .console-progress,
  .spot-count-label, .match-column-title, .match-core-label, .quote-score-label,
  .quote-placeholder, .quote-remove, .quiz-side-kicker, .quiz-stage-progress,
  .quiz-total-progress, .scenario-meta-label, .act-result-index, .stage-result-index,
  .campaign-rating-label, .rating-label, .result-stat-label,
  .act-result-quote-source, .sq-second, .sq-caret-2,
  .ship-hud-step, .ship-hud-chances-label, .ship-chance-dot.spent,
  .ship-scene-count, .relay-meta, .relay-item-type, .gucai-station,
  .gucai-track-node, .beacon-timer-label, .beacon-miss-label,
  .beacon-miss-dot, .beacon-order-score, .beacon-seal-tip,
  .beacon-tower-state, .reaction-score, .morale-hint, .road-meta,
  .find-meta, .gauge-marks, .morale-meta, .signal-wall-label,
  .signal-pad-name, .dispatch-road-label, .mine-traverse-kicker,
  .mine-traverse-stat-label, .artillery-hud-label, .artillery-range-unit,
  .artillery-shot-number, .speech-tag, .rotate-lock-tip, .boot-loading em,
  .command-stage-dot, .victory-stage-dot, .conduct-stage-dot,
  .command-node.locked .command-node-type,
  .campaign-node.locked .campaign-node-type,
  .conduct-node.locked .conduct-node-type
) { color: var(--theme-muted); }

:root[data-color-scheme="light"] :is(
  .cover-eyebrow, .route-eyebrow, .panel-kicker, .report-status, .section-kicker,
  .overview-accent, .kicker, .hud-chapter-code, .act-index-number,
  .stage-index-number, .act-brief-subtitle, .stage-brief-subtitle,
  .brief-subtitle, .game-status, .game-message, .operation-timer, .game-timer,
  .quiz-side-index, .scenario-meta, .console-option-code, .quiz-option-code,
  .scenario-option-code, .checkpoint-option-letter, .checkpoint-tag,
  .checkpoint-number, .caret, .quote-mark, .quote-status-kicker,
  .quote-typewriter, .quote-caret, .quote-token-grip, .quote-feedback,
  .spot-count-value, .spot-feedback, .match-card-index, .match-card-icon,
  .match-core-value, .ship-hud-title, .ship-scene-badge, .ship-modal-badge,
  .relay-option-code, .daily-option-code, .gucai-legend-title, .gucai-side-title,
  .gucai-card-cat, .gucai-card-empty, .gucai-feature-mark, .gucai-sil-title,
  .gucai-finale-title, .gucai-frag.on, .beacon-hud-title, .beacon-timer-value,
  .beacon-order-tag, .beacon-seal, .beacon-tower.active .beacon-tower-state,
  .find-scene-title, .mine-traverse-title, .mine-traverse-stat,
  .mine-traverse-countdown, .artillery-hit-value, .artillery-range-value,
  .feedback-emblem, .feedback-title, .llk-status b, .speech-name,
  .sq-open, .sq-close, .sq-caret, .stage-result-quote::before,
  .rotate-ios-tip strong, .ios-install-copy strong,
  .command-stage-dot.active, .victory-stage-dot.active, .conduct-stage-dot.active
) { color: var(--theme-primary); }

/* 分隔线、游戏画布、卡片和信息面板 */
:root[data-color-scheme="light"] :is(
  .hud, .command-hud, .victory-hud, .conduct-hud, .route-header,
  .route-status, .mission-top, .mission-bottom, .panel-head,
  .setting-row, .report-scene, .report-stats, .report-stat,
  .operation-head, .game-heading, .scenario-heading, .quiz-footer,
  .quiz-side, .console-status, .console-feedback, .quote-status,
  .quote-actions, .match-column-title, .stage-brief-instruction,
  .ship-scene-top, .gucai-side, .artillery-hudbar
) { border-color: var(--theme-line); }

:root[data-color-scheme="light"] :is(
  .game-board, .operation-board, .image-game-board,
  .match-game-board, .quote-game-board, .spot-game-board,
  .scenario-stage, .quiz-layer, .checkpoint-panel, .mine-board, .mine-traverse-board, .llk-board-wrap
),
:root[data-color-scheme="light"] .command-operation.minesweeper-game-mode .game-board.mine-game-board {
  border-color: var(--theme-line);
  border-radius: 16px;
  background-color: var(--theme-canvas);
  background-image: var(--theme-stage-image);
  box-shadow: inset 0 1px 0 rgba(var(--theme-surface-rgb), .75), 0 10px 30px rgba(var(--theme-ink-rgb), .06);
}

:root[data-color-scheme="light"] :is(
  .image-game-console, .spot-console, .ship-hud, .gucai-side, .artillery-hudbar
) {
  border-color: var(--theme-line);
  background-color: var(--theme-soft);
  background-image: var(--theme-panel-image);
  box-shadow: none;
}
:root[data-color-scheme="light"] .quiz-main { background: transparent; box-shadow: none; }

:root[data-color-scheme="light"] :is(
  .ship-scene-card, .ship-modal, .gucai-card, .beacon-order-card, .artillery-feedback-card,
  .wx-modal, .wx-toast, .ios-install-tip, .rotate-ios-tip
) {
  border-color: var(--theme-line);
  background-color: var(--theme-surface);
  background-image: var(--theme-card-image);
  box-shadow: 0 6px 22px rgba(var(--theme-ink-rgb), .06);
}

:root[data-color-scheme="light"] :is(
  .quiz-side, .quiz-footer, .checkpoint-side, .operation-head,
  .stage-brief-instruction, .act-brief-quote,
  .quiz-feedback, .scenario-feedback, .checkpoint-feedback, .console-feedback,
  .daily-feedback, .stage-result-stat, .act-result-stat, .reaction-score-item,
  .reaction-prompt, .road-event, .beacon-timer, .gucai-track-wrap,
  .gucai-silhouette, .gucai-popup, .gucai-card-swipe,
  .signal-wall, .dispatch-road, .find-scene, .mine-traverse-header
),
:root[data-color-scheme="light"] .gucai-card.back .gucai-card-body,
:root[data-color-scheme="light"] .timeline-game .game-message,
:root[data-color-scheme="light"] .command-operation.minesweeper-game-mode .game-heading {
  border-color: var(--theme-line);
  background: var(--theme-soft);
  color: var(--theme-secondary);
}

:root[data-color-scheme="light"] :is(.quote-pool, .quote-target, .quote-status, .match-core) {
  border-color: var(--theme-line);
  border-radius: 12px;
  background-color: var(--theme-canvas);
  background-image: var(--theme-panel-image);
  color: var(--theme-secondary);
}
:root[data-color-scheme="light"] .quote-target {
  border-color: rgba(var(--theme-primary-rgb), .4);
  background-color: var(--theme-surface);
  box-shadow: inset 0 2px 12px rgba(var(--theme-ink-rgb), .035);
}

:root[data-color-scheme="light"] :is(.command-node, .campaign-node, .conduct-node).unlocked {
  background: rgba(var(--theme-surface-rgb), .7);
}
:root[data-color-scheme="light"] :is(.command-node, .campaign-node, .conduct-node).unlocked:active {
  background: var(--theme-soft);
}
:root[data-color-scheme="light"] :is(.command-node-index, .campaign-node-index, .conduct-node-index, .campaign-rating-value, .rating-grade) {
  border-color: rgba(var(--theme-primary-rgb), .45);
  background: rgba(var(--theme-surface-rgb), .65);
  color: var(--theme-primary);
  box-shadow: none;
}
:root[data-color-scheme="light"] :is(.command-node, .campaign-node, .conduct-node)::before {
  background: var(--theme-line);
}
:root[data-color-scheme="light"] :is(.stage-result-quote, .act-result-quote, .transcript) {
  border-color: var(--theme-primary);
  background: linear-gradient(90deg, rgba(var(--theme-primary-rgb), .09), rgba(var(--theme-primary-rgb), .025));
  color: var(--theme-secondary);
}
:root[data-color-scheme="light"] :is(.panel-mask, .wx-modal-mask, .checkpoint-mask, .ship-overlay) {
  background: rgba(var(--theme-ink-rgb), .35);
}
:root[data-color-scheme="light"] :is(.game-result-overlay, .timed-failure, .mine-success-overlay, .memory-success-overlay, .operation-feedback, .llk-complete-banner) {
  background-color: var(--theme-canvas);
  background-image: var(--theme-stage-image);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
}

/* 控件：实体主按钮、浅色次按钮，以及可辨识的选中状态 */
:root[data-color-scheme="light"] :is(
  .hud-icon-button, .hud-back, .brand-button, .route-action-button, .panel-close,
  .ghost-command, .ghost-button, .skip-button, .wx-modal-btn, .ios-install-close,
  .llk-hint-btn, .llk-shuffle-btn, .game-retry-btn,
  .timeline-slot, .timeline-event, .timeline-drag-card,
  .console-option, .quiz-option, .scenario-option, .checkpoint-option,
  .match-card, .quote-token, .quote-selected-token, .relay-item, .relay-option,
  .daily-option, .reaction-button, .road-event-button,
  .ship-btn-correct, .ship-btn-wrong, .gucai-feature, .gucai-station,
  .gucai-track-node, .beacon-tower-ring, .signal-pad, .dispatch-team,
  .dispatch-card, .find-item, .road-segment, .llk-cell, .badge,
  .signal-source, .signal-target, .signal-core
) {
  border-color: var(--theme-line);
  background-color: var(--theme-surface);
  background-image: var(--theme-card-image);
  color: var(--theme-text);
  box-shadow: none;
}
:root[data-color-scheme="light"] :is(
  .start-button, .continue-button, .primary-command, .compact-command,
  .metal-button, .checkpoint-continue, .quiz-next-btn, .console-next-btn,
  .match-submit, .ship-modal-btn, .relay-confirm, .gucai-confirm,
  .daily-next, .morale-button, .road-button, .beacon-btn-transmit
) {
  border-color: var(--theme-primary);
  background-color: var(--theme-primary);
  background-image: var(--theme-button-image);
  color: var(--theme-on-primary);
}
:root[data-color-scheme="light"] :is(
  .compact-command-hover, .quiz-next-btn-hover, .console-next-btn-hover, .match-submit-hover
) { background: var(--theme-primary-hover); }
:root[data-color-scheme="light"] :is(
  .quiz-next-btn.is-disabled, .primary-command:disabled, .compact-command:disabled,
  .reaction-button:disabled, .metal-button:disabled, .match-submit:disabled
) {
  background: var(--theme-soft);
  border-color: var(--theme-line);
  color: var(--theme-muted);
}

:root[data-color-scheme="light"] :is(
  .timeline-event.selected, .timeline-drag-card, .match-card.selected,
  .quiz-option-hover, .scenario-option-hover, .checkpoint-option-hover,
  .relay-item.flash-in, .relay-option.selected, .quote-selected-token,
  .quote-selected-token.dragging, .gucai-station.active, .gucai-track-node.lit,
  .gucai-track-node.reached, .gucai-chip, .gucai-frag.on, .badge.earned,
  .find-item-hover, .dispatch-team-hover, .road-segment.current,
  .llk-cell.selected, .beacon-tower.active .beacon-tower-ring
) {
  border-color: var(--theme-primary);
  background: linear-gradient(rgba(var(--theme-primary-rgb), .1), rgba(var(--theme-primary-rgb), .1)), var(--theme-surface);
  color: var(--theme-primary);
  box-shadow: 0 0 0 1px rgba(var(--theme-primary-rgb), .12);
}
:root[data-color-scheme="light"] :is(
  .console-option-code, .quiz-option-code, .scenario-option-code,
  .checkpoint-option-letter, .relay-option-code, .daily-option-code,
  .match-card-icon, .beacon-seal, .ship-scene-badge
) { border-color: rgba(var(--theme-primary-rgb), .4); }
:root[data-color-scheme="light"] .quote-selected-token .quote-remove {
  border-color: var(--theme-line);
  color: var(--theme-muted);
}
:root[data-color-scheme="light"] .quote-selected-token .quote-remove:hover { color: var(--theme-danger); }
:root[data-color-scheme="light"] .llk-cell.empty { border-color: transparent; background: transparent; box-shadow: none; }
:root[data-color-scheme="light"] .llk-cell:hover:not(.empty) { border-color: var(--theme-primary); }
:root[data-color-scheme="light"] :is(.quote-token, .llk-cell:not(.empty), .timeline-event) {
  box-shadow: 0 3px 9px rgba(var(--theme-ink-rgb), .07);
}

/* 状态色与主题色分离，所有配色都保持「绿=成功、红=错误」。 */
:root[data-color-scheme="light"] :is(
  .quiz-option.correct, .scenario-option.correct, .checkpoint-option.correct,
  .console-option.correct, .match-card.matched, .timeline-slot.filled,
  .relay-item.correct, .relay-item.selected, .relay-option.correct,
  .relay-obstacle.resolved, .daily-option.correct, .gucai-feature.selected,
  .ship-feedback.correct, .find-item.found, .road-segment.done,
  .reaction-button.reaction-a, .road-event-button.road-event-correct,
  .signal-pad.hit, .llk-cell.hinted, .beacon-order-card.ok-card,
  .beacon-tower.lit .beacon-tower-ring,
  .signal-source.completed, .signal-target.completed
) {
  border-color: var(--theme-success);
  background: linear-gradient(rgba(var(--theme-success-rgb), .1), rgba(var(--theme-success-rgb), .1)), var(--theme-surface);
  color: var(--theme-success);
  box-shadow: none;
}
:root[data-color-scheme="light"] :is(
  .quiz-option.wrong, .scenario-option.wrong, .checkpoint-option.wrong,
  .console-option.wrong, .match-card.wrong-select, .relay-item.wrong,
  .relay-item.miss, .relay-option.wrong, .relay-obstacle, .daily-option.wrong,
  .ship-feedback.wrong, .reaction-button.reaction-b,
  .road-event-button.road-event-wrong, .signal-pad.noise, .signal-pad.miss,
  .beacon-order-card.bad-card, .beacon-order-card.suspect, .beacon-seal.bad,
  .beacon-timer.urgent, .beacon-btn-intercept
) {
  border-color: var(--theme-danger);
  background: linear-gradient(rgba(var(--theme-danger-rgb), .08), rgba(var(--theme-danger-rgb), .08)), var(--theme-surface);
  color: var(--theme-danger);
  box-shadow: none;
}
:root[data-color-scheme="light"] :is(
  .command-stage-dot.completed, .victory-stage-dot.completed, .conduct-stage-dot.completed,
  .command-node-type, .campaign-node-type, .conduct-node-type, .instruction-code,
  .quote-score-value, .quote-feedback.success, .console-feedback-label,
  .quiz-feedback-state, .checkpoint-feedback-state, .scenario-feedback-label,
  .daily-feedback-title, .game-result-symbol.pass, .act-result-number,
  .stage-result-number, .operation-feedback.success, .ship-chance-dot.active,
  .relay-item-check, .relay-item.selected .relay-item-type, .relay-obstacle-action,
  .gucai-swipe-right, .gucai-card-tag.keep, .gucai-popup.good,
  .gucai-station.completed, .beacon-miss-dot.active,
  .beacon-tower.lit .beacon-tower-state, .beacon-feedback.good, .find-fb.ok,
  .signal-pad.hit .signal-pad-icon, .signal-core.online,
  .artillery-feedback-card.hit .feedback-emblem,
  .artillery-feedback-card.hit .feedback-title,
  .mine-traverse-board.won .mine-traverse-footer
) { color: var(--theme-success); }
:root[data-color-scheme="light"] :is(
  .hud-metric-value.danger, .hud-right .danger, .operation-timer.urgent,
  .game-timer.urgent, .game-status.failed .status-value,
  .console-feedback.wrong .console-feedback-label,
  .quiz-feedback.wrong .quiz-feedback-state,
  .checkpoint-feedback.wrong .checkpoint-feedback-state,
  .scenario-feedback.wrong .scenario-feedback-label,
  .daily-feedback.bad .daily-feedback-title, .operation-feedback.warning,
  .game-result-symbol.fail, .failure-symbol, .ship-modal.failed .ship-modal-badge,
  .gucai-swipe-left, .gucai-card-tag.drop, .gucai-popup.bad,
  .beacon-timer.urgent .beacon-timer-value, .beacon-miss-dot.spent,
  .beacon-feedback.bad, .beacon-seal.bad, .find-fb.bad, .signal-meta-item.noise,
  .signal-pad.noise .signal-pad-icon, .signal-pad.miss .signal-pad-icon,
  .artillery-feedback-card.miss .feedback-emblem,
  .artillery-feedback-card.miss .feedback-title,
  .mine-traverse-board.failed .mine-traverse-footer,
  .mine-traverse-board.preview .mine-traverse-countdown
) { color: var(--theme-danger); }
:root[data-color-scheme="light"] :is(.command-node, .campaign-node, .conduct-node).completed :is(.command-node-index, .campaign-node-index, .conduct-node-index) {
  color: var(--theme-success);
  border-color: var(--theme-success);
}
:root[data-color-scheme="light"] :is(.command-node, .campaign-node, .conduct-node).locked :is(.command-node-type, .campaign-node-type, .conduct-node-type) { color: var(--theme-muted); }
:root[data-color-scheme="light"] :is(.pass-command, .morale-button.done, .road-button.done) {
  background: var(--theme-success);
  color: #fff;
}
:root[data-color-scheme="light"] :is(.failure-symbol, .game-result-symbol.fail) { border-color: var(--theme-danger); }
:root[data-color-scheme="light"] .game-result-symbol.pass { border-color: var(--theme-success); }
:root[data-color-scheme="light"] .quiz-option.correct :is(.quiz-option-code, .quiz-option-state) { color: var(--theme-success); border-color: var(--theme-success); }
:root[data-color-scheme="light"] .quiz-option.wrong :is(.quiz-option-code, .quiz-option-state) { color: var(--theme-danger); border-color: var(--theme-danger); }
:root[data-color-scheme="light"] :is(.conduct-page .morale-meta-item.cold, .conduct-page .game-message.cold-msg, .ship-btn-correct .ship-btn-arrow) { color: var(--theme-info); }
:root[data-color-scheme="light"] .find-item.viol:not(.found) { border-color: rgba(var(--theme-danger-rgb), .55); }

/* 进度条、连线与灯语；灯语中的金灯保持金色，避免改变玩法提示。 */
:root[data-color-scheme="light"] :is(
  .progress-track, .command-progress-track, .victory-progress-track,
  .conduct-progress-track, .beacon-time-bar, .morale-bar, .road-progress,
  .road-segment-strip, .relay-obstacle-progress, .daily-progress,
  .gauge-track, .ship-track-progress, .gucai-track-line
) { border-color: var(--theme-line); background: var(--theme-soft); }
:root[data-color-scheme="light"] :is(
  .progress-fill, .command-progress-fill, .victory-progress-fill,
  .conduct-progress-fill, .beacon-time-fill, .morale-fill, .road-progress-fill,
  .daily-progress-fill, .gucai-track-fill, .ship-track-progress-fill,
  .relay-obstacle-progress-fill, .act-brief-rule, .stage-brief-rule,
  .brief-rule, .match-core-line, .rotate-phone::after
) { background: var(--theme-primary); }
:root[data-color-scheme="light"] .beacon-time-fill.urgent { background: var(--theme-danger); }
:root[data-color-scheme="light"] .beacon-tower-fill { background: rgba(var(--theme-primary-rgb), .2); }
:root[data-color-scheme="light"] :is(.timeline-rail, .beacon-chain-line) { background: rgba(var(--theme-primary-rgb), .35); }
:root[data-color-scheme="light"] :is(.objective-dot, .console-progress-dot) { border-color: var(--theme-line); }
:root[data-color-scheme="light"] :is(.objective-dot.done, .console-progress-dot.active) { background: var(--theme-primary); border-color: var(--theme-primary); box-shadow: none; }
:root[data-color-scheme="light"] .console-progress-dot.completed { background: var(--theme-success); border-color: var(--theme-success); }
:root[data-color-scheme="light"] .rotate-phone { border-color: var(--theme-primary); }
:root[data-color-scheme="light"] :is(.signal-pad.lit, .signal-beacon.on) {
  border-color: #b48221;
  background: #f5d57f;
  box-shadow: 0 0 12px rgba(var(--theme-warning-rgb), .2);
}
:root[data-color-scheme="light"] .signal-pad.lit :is(.signal-pad-icon, .signal-pad-name) { color: #69480c; }
:root[data-color-scheme="light"] .signal-beacon:not(.on) { background: var(--theme-soft); border-color: var(--theme-line); }
:root[data-color-scheme="light"] .gauge-sweet { background: rgba(var(--theme-success-rgb), .18); }
:root[data-color-scheme="light"] .gauge-cursor { background: var(--theme-primary); box-shadow: none; }
:root[data-color-scheme="light"] .gauge-mark.mark-center { color: var(--theme-success); }

/* 翻牌和扫雷：保留卡面差异、翻面及标记的状态辨识度。 */
:root[data-color-scheme="light"] :is(.memory-card-front, .memory-card-open) {
  border-color: var(--theme-line);
  background: linear-gradient(145deg, var(--theme-surface), var(--theme-soft));
  color: var(--theme-text);
  box-shadow: 0 3px 10px rgba(var(--theme-ink-rgb), .08);
}
:root[data-color-scheme="light"] .memory-card-front {
  border-color: var(--theme-primary);
  background-color: var(--theme-primary);
  background-image: radial-gradient(ellipse at 0% 0%, rgba(255, 255, 255, .18), transparent 70%), var(--theme-button-image);
  color: var(--theme-on-primary);
}
:root[data-color-scheme="light"] .memory-card-front::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  pointer-events: none;
}
:root[data-color-scheme="light"] .memory-card-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: var(--theme-on-primary);
  font-size: 26px;
  text-shadow: none;
}
:root[data-color-scheme="light"] .memory-card-open.hero-face { border-color: var(--theme-primary); }
:root[data-color-scheme="light"] .memory-card-open.deed-face { border-color: var(--theme-warning); }
:root[data-color-scheme="light"] .memory-card.matched .memory-card-open { border-color: var(--theme-success); background: var(--theme-soft); color: var(--theme-success); }
:root[data-color-scheme="light"] .memory-card.wrong .memory-card-open { border-color: var(--theme-danger); background: #fbe9e5; color: var(--theme-danger); }

:root[data-color-scheme="light"] :is(.minesweeper-board, .mine-grid) { background: var(--theme-soft); border-color: var(--theme-line); }
:root[data-color-scheme="light"] :is(.mine-cell, .mine-cell.closed, .mine-route-cell) {
  background: linear-gradient(145deg, var(--theme-surface), var(--theme-soft));
  border-color: var(--theme-line);
  color: var(--theme-text);
  box-shadow: 0 2px 4px rgba(var(--theme-ink-rgb), .1);
}
:root[data-color-scheme="light"] .mine-cell.closed:active { background: var(--theme-soft); }
:root[data-color-scheme="light"] :is(.mine-cell.revealed, .mine-cell.revealed.empty) { background: var(--theme-soft); border-color: var(--theme-line); box-shadow: none; }
:root[data-color-scheme="light"] :is(.mine-cell.flagged, .mine-cell.mine, .mine-cell.exploded) {
  background: #f8ddd6;
  border-color: var(--theme-danger);
  color: var(--theme-danger);
  box-shadow: none;
}
:root[data-color-scheme="light"] :is(.mine-cell.flagged .mine-cell-text, .mine-glyph-symbol) { color: var(--theme-danger); }
:root[data-color-scheme="light"] :is(.mine-route-cell.start, .mine-route-cell.visited) { background: #e0eee4; border-color: var(--theme-success); }
:root[data-color-scheme="light"] :is(.mine-route-cell.end, .mine-route-cell.available, .mine-route-cell.current) { border-color: var(--theme-primary); box-shadow: inset 0 0 0 1px var(--theme-primary); }
:root[data-color-scheme="light"] :is(.mine-route-cell.end, .mine-route-cell.available)::after { border-color: transparent; }
:root[data-color-scheme="light"] :is(.mine-route-cell.obstacle-visible, .mine-route-cell.blocked) {
  background: #f3e8d6;
  border-color: #a47b47;
  color: #76532e;
  box-shadow: none;
}
:root[data-color-scheme="light"] .mine-route-cell.blocked {
  background: repeating-linear-gradient(135deg, rgba(177, 111, 51, .1) 0 7px, transparent 7px 14px), #f3e3cd;
  border-color: #b26739;
}
:root[data-color-scheme="light"] .start-symbol { color: var(--theme-success); }
:root[data-color-scheme="light"] .end-symbol { color: var(--theme-primary); }
:root[data-color-scheme="light"] .mine-cell.number-1 { color: #245ea5; }
:root[data-color-scheme="light"] .mine-cell.number-2 { color: #236b44; }
:root[data-color-scheme="light"] .mine-cell.number-3 { color: #ae3429; }
:root[data-color-scheme="light"] .mine-cell.number-4 { color: #6e4692; }
:root[data-color-scheme="light"] .mine-cell.number-5 { color: #7b5713; }
:root[data-color-scheme="light"] .mine-cell.number-6 { color: #a32c62; }
:root[data-color-scheme="light"] .mine-cell.number-7 { color: #24343c; }
:root[data-color-scheme="light"] .mine-cell.number-8 { color: #555761; }
:root[data-color-scheme="light"] :is(.mine-cell-text, .mine-glyph-symbol, .mine-route-symbol, .end-symbol, .dispatch-card-name, .artillery-hit-value, .ship-chance-dot.active) { text-shadow: none; }

/* 浮于插画上的说明单独设置底色；不对图片、SVG 或 CSS 插画整体反色。 */
:root[data-color-scheme="light"] :is(.image-caption, .spot-scene-tag) {
  background: rgba(var(--theme-surface-rgb), .94);
  color: var(--theme-secondary);
}
:root[data-color-scheme="light"] :is(.image-caption-code, .spot-scene-tag .spot-tag-title) { color: var(--theme-primary); }
:root[data-color-scheme="light"] .daily-scene-text { color: var(--theme-secondary); }
:root[data-color-scheme="light"] .daily-scene .daily-scene-text { color: rgba(255, 255, 255, .9); }
:root[data-color-scheme="light"] .ship-overlay .ship-modal.passed { border-color: var(--theme-success); }
:root[data-color-scheme="light"] .ship-overlay .ship-modal.failed { border-color: var(--theme-danger); }
:root[data-color-scheme="light"] .ship-btn-correct .ship-btn-arrow { background: rgba(var(--theme-info-rgb), .1); }
:root[data-color-scheme="light"] .ship-btn-wrong .ship-btn-arrow { background: var(--theme-soft); color: var(--theme-muted); }
:root[data-color-scheme="light"] .artillery-game .artillery-feedback-card.hit { background: var(--theme-surface); border-color: var(--theme-success); }
:root[data-color-scheme="light"] .artillery-game .artillery-feedback-card.miss { border-color: var(--theme-danger); }
:root[data-color-scheme="light"] .artillery-hit-target { color: var(--theme-secondary); }
:root[data-color-scheme="light"] .buddy-speech::before { border-right-color: var(--theme-line); }
:root[data-color-scheme="light"] .buddy-speech::after { border-right-color: var(--theme-surface); }

/* 炮火校射：天空、远山和地面也属于主题环境；火炮、靶面与爆炸保留原色。 */
:root[data-color-scheme="light"] .artillery-game { background: var(--theme-canvas); }
:root[data-color-scheme="light"] .artillery-field {
  background-color: var(--theme-canvas);
  background-image: radial-gradient(circle at 72% 24%, rgba(var(--theme-surface-rgb), .8), transparent 36%), var(--theme-sky);
}
:root[data-color-scheme="light"] .artillery-field::before {
  background: linear-gradient(90deg, rgba(var(--theme-canvas-rgb), .18), transparent 30%, transparent 70%, rgba(var(--theme-canvas-rgb), .12));
}
:root[data-color-scheme="light"] .artillery-field::after {
  box-shadow: inset 0 0 48px rgba(var(--theme-ink-rgb), .07);
}
:root[data-color-scheme="light"] .artillery-sky-glow { background: var(--theme-sun); opacity: .22; }
:root[data-color-scheme="light"] .artillery-cloud { background: var(--theme-surface); opacity: .65; }
:root[data-color-scheme="light"] .artillery-mountain.mountain-far {
  background: linear-gradient(180deg, var(--theme-mountain-back), var(--theme-soft));
  opacity: .8;
}
:root[data-color-scheme="light"] .artillery-mountain.mountain-near {
  background: linear-gradient(180deg, var(--theme-mountain-front), var(--theme-mountain-back));
  opacity: .8;
}
:root[data-color-scheme="light"] .artillery-tree-line {
  background:
    linear-gradient(61deg, transparent 48%, var(--theme-mountain-front) 49% 57%, transparent 58%) 0 100% / 37px 60px repeat-x,
    linear-gradient(-61deg, transparent 48%, var(--theme-mountain-front) 49% 57%, transparent 58%) 17px 100% / 43px 70px repeat-x;
  opacity: .5;
}
:root[data-color-scheme="light"] .artillery-ground {
  border-top-color: rgba(var(--theme-primary-rgb), .18);
  background-color: var(--theme-soft);
  background-image:
    radial-gradient(ellipse at 18% 12%, rgba(var(--theme-primary-rgb), .07) 0 3%, transparent 4%),
    radial-gradient(ellipse at 76% 20%, rgba(var(--theme-primary-rgb), .06) 0 2.5%, transparent 3.5%),
    linear-gradient(180deg, rgba(var(--theme-primary-rgb), .1), rgba(var(--theme-canvas-rgb), .6));
  box-shadow: 0 -6px 24px rgba(var(--theme-ink-rgb), .05);
}
:root[data-color-scheme="light"] .artillery-ground .ground-rut { border-color: rgba(var(--theme-primary-rgb), .15); }
:root[data-color-scheme="light"] .artillery-range-scale { border-top-color: rgba(var(--theme-primary-rgb), .25); }
:root[data-color-scheme="light"] .range-tick { background: rgba(var(--theme-primary-rgb), .4); }
:root[data-color-scheme="light"] .range-tick > span { color: var(--theme-secondary); }
:root[data-color-scheme="light"] .target-distance-tag {
  border-color: var(--theme-line);
  border-radius: 5px;
  background: rgba(var(--theme-surface-rgb), .96);
  color: var(--theme-primary);
  box-shadow: 0 2px 8px rgba(var(--theme-ink-rgb), .08);
}
:root[data-color-scheme="light"] .power-rail-track {
  border-color: rgba(var(--theme-primary-rgb), .3);
  background: var(--theme-soft);
  box-shadow: inset 0 2px 5px rgba(var(--theme-ink-rgb), .08);
}
:root[data-color-scheme="light"] .power-rail-track::before {
  background: repeating-linear-gradient(0deg, transparent 0, transparent calc(10% - 1px), rgba(var(--theme-ink-rgb), .2) calc(10% - 1px), rgba(var(--theme-ink-rgb), .2) 10%);
}
:root[data-color-scheme="light"] .power-rail-value { color: var(--theme-primary); text-shadow: none; }
:root[data-color-scheme="light"] .artillery-trail-dot {
  background: var(--theme-primary);
  box-shadow: 0 0 0 1px rgba(var(--theme-surface-rgb), .8), 0 0 6px rgba(var(--theme-primary-rgb), .2);
}

/* 游戏表面：画布留出呼吸空间，卡片、图片区和操作区保持同一组圆角。 */
:root[data-color-scheme="light"] :is(
  .timeline-slot, .timeline-event, .timeline-drag-card, .memory-card-face,
  .console-option, .quiz-option, .scenario-option, .checkpoint-option,
  .match-card, .relay-item, .relay-option, .daily-option,
  .signal-pad, .dispatch-team, .find-item, .ship-scene-card, .ship-hud,
  .gucai-side, .beacon-order-card, .road-segment
) { border-radius: 12px; }
:root[data-color-scheme="light"] :is(
  .quote-token, .quote-selected-token, .console-feedback, .scenario-feedback,
  .quiz-feedback, .daily-feedback, .image-caption, .spot-scene-tag,
  .compact-command, .ghost-command, .quiz-next-btn, .morale-button, .road-button
) { border-radius: 8px; }

:root[data-color-scheme="light"] :is(.console-option, .quiz-option, .scenario-option, .checkpoint-option) {
  box-shadow: 0 3px 10px rgba(var(--theme-ink-rgb), .035);
}
:root[data-color-scheme="light"] :is(.console-option-code, .scenario-option-code, .checkpoint-option-letter) {
  background: rgba(var(--theme-primary-rgb), .07);
}
:root[data-color-scheme="light"] .timeline-slot:not(.filled) {
  border-style: dashed;
  border-color: rgba(var(--theme-primary-rgb), .4);
  background-color: var(--theme-canvas);
  color: var(--theme-muted);
}
:root[data-color-scheme="light"] .timeline-slot:not(.filled) .slot-year { color: var(--theme-primary); }
:root[data-color-scheme="light"] .timeline-rail::after { border-left-color: rgba(var(--theme-primary-rgb), .45); }
:root[data-color-scheme="light"] .timeline-event { border-left: 3px solid rgba(var(--theme-primary-rgb), .5); }

:root[data-color-scheme="light"] .image-game-board { padding: 6px; gap: 6px; }
:root[data-color-scheme="light"] :is(.image-game-visual, .image-game-console, .spot-scene, .daily-scene) { border-radius: 11px; }
:root[data-color-scheme="light"] .image-scanline { background: linear-gradient(0deg, rgba(5, 9, 7, .12), transparent 30%); }
:root[data-color-scheme="light"] .image-game-console .console-next-btn {
  width: auto;
  box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb), .18);
}

:root[data-color-scheme="light"] .quiz-side {
  border-right: 1px solid var(--theme-line);
  background-image: var(--theme-panel-image);
}
:root[data-color-scheme="light"] .quiz-footer { background: rgba(var(--theme-surface-rgb), .5); }
:root[data-color-scheme="light"] :is(.signal-wall, .dispatch-road, .find-scene) {
  border-radius: 12px;
  background-color: var(--theme-soft);
  background-image: var(--theme-panel-image);
}
/* 旧版 signal-game 的绝对定位只适用于旧场景，灯语页应遵循画布的内边距。 */
:root[data-color-scheme="light"] .conduct-page .signal-game { position: relative; inset: auto; }
:root[data-color-scheme="light"] .dispatch-road::after { border-top-color: rgba(var(--theme-primary-rgb), .2); }
:root[data-color-scheme="light"] :is(.signal-pad-icon, .dispatch-team-icon) {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(var(--theme-primary-rgb), .08);
}
:root[data-color-scheme="light"] :is(.signal-pad, .dispatch-team, .find-item) {
  box-shadow: 0 4px 12px rgba(var(--theme-ink-rgb), .05);
}
:root[data-color-scheme="light"] :is(.morale-game, .road-game, .reaction-game) {
  width: min(100%, 920px);
  justify-self: center;
}
:root[data-color-scheme="light"] :is(.morale-bar, .road-progress, .gauge-track) {
  border-radius: 8px;
  box-shadow: inset 0 2px 6px rgba(var(--theme-ink-rgb), .06);
}
:root[data-color-scheme="light"] :is(.minesweeper-board, .mine-grid) { border-radius: 12px; }
:root[data-color-scheme="light"] :is(.mine-cell, .mine-route-cell) { border-radius: 6px; }

@media (hover: hover) {
  :root[data-color-scheme="light"] :is(.console-option, .quiz-option, .scenario-option, .checkpoint-option):not(.correct):not(.wrong):hover,
  :root[data-color-scheme="light"] :is(.timeline-event, .dispatch-team):hover {
    border-color: var(--theme-primary);
    box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb), .12);
  }
}

/* 大屏增加内容密度与字号，避免少量文字堆在大画布顶端。手机仍优先保留操作空间。 */
@media (min-width: 1000px) and (min-height: 600px) {
  :root[data-color-scheme="light"] :is(.game-board, .match-game-board, .quote-game-board) { padding: 24px; }
  :root[data-color-scheme="light"] :is(.game-heading-title, .operation-heading-title) { font-size: 19px; line-height: 24px; }
  :root[data-color-scheme="light"] .operation-heading-instruction { font-size: 13px; }

  :root[data-color-scheme="light"] .timeline-game {
    width: min(100%, 1200px);
    height: 100%;
    max-height: 570px;
    place-self: center;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
  }
  :root[data-color-scheme="light"] .timeline-game.timeline-complete { grid-template-rows: minmax(0, 1fr); }
  :root[data-color-scheme="light"] .timeline-lane { align-items: center; gap: 10px; }
  :root[data-color-scheme="light"] .timeline-slot { height: 100%; max-height: 160px; gap: 12px; padding: 16px 8px; }
  :root[data-color-scheme="light"] .slot-year { font-size: 25px; line-height: 30px; }
  :root[data-color-scheme="light"] .slot-event { font-size: 12px; line-height: 18px; }
  :root[data-color-scheme="light"] .timeline-events { gap: 12px; align-content: center; grid-auto-rows: minmax(0, 100px); }
  :root[data-color-scheme="light"] .timeline-event { padding: 12px; font-size: 16px; line-height: 1.5; }
  :root[data-color-scheme="light"] .memory-game { max-width: 1120px; max-height: 640px; place-self: center; }
  :root[data-color-scheme="light"] .memory-grid { gap: 16px; }
  :root[data-color-scheme="light"] .memory-card-front::before { inset: 12px; }
  :root[data-color-scheme="light"] .memory-card-mark { width: 68px; height: 68px; font-size: 32px; }

  :root[data-color-scheme="light"] .image-game-board { padding: 12px; gap: 12px; }
  :root[data-color-scheme="light"] .image-game-console { padding: 28px 30px 80px; justify-content: center; }
  :root[data-color-scheme="light"] .image-game-console:not(.answered) { padding-bottom: 28px; }
  :root[data-color-scheme="light"] .console-progress { font-size: 12px; line-height: 18px; margin-bottom: 14px; }
  :root[data-color-scheme="light"] .console-progress-dot { width: 8px; height: 8px; }
  :root[data-color-scheme="light"] .console-question { margin-top: 0; font-size: 21px; line-height: 1.6; font-weight: 700; }
  :root[data-color-scheme="light"] .console-options { flex: 0 1 auto; gap: 12px; margin-top: 24px; }
  :root[data-color-scheme="light"] :is(.console-option, .quiz-option, .scenario-option) {
    grid-template-columns: 30px minmax(0, 1fr) 20px;
    gap: 12px;
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    min-height: 56px;
    padding: 12px 16px;
    overflow: visible;
  }
  :root[data-color-scheme="light"] :is(.console-option-code, .quiz-option-code, .scenario-option-code) { width: 28px; height: 28px; font-size: 12px; }
  :root[data-color-scheme="light"] :is(.console-option-copy, .quiz-option-copy, .scenario-option-copy) { font-size: 16px; line-height: 1.5; }
  :root[data-color-scheme="light"] .console-feedback { max-height: none; margin-top: 18px; padding: 12px; font-size: 13px; line-height: 1.6; grid-template-columns: 64px minmax(0, 1fr); }
  :root[data-color-scheme="light"] .image-game-console .console-next-btn { left: 30px; right: 30px; bottom: 24px; height: 42px; font-size: 14px; }
  :root[data-color-scheme="light"] .image-caption { padding: 10px 12px; }
  :root[data-color-scheme="light"] :is(.image-caption-code, .image-caption-label) { font-size: 12px; }

  :root[data-color-scheme="light"] .quiz-side { width: 148px; min-width: 148px; max-width: 148px; flex-basis: 148px; padding: 24px 20px; }
  :root[data-color-scheme="light"] .quiz-side-index { font-size: 52px; margin-top: 12px; }
  :root[data-color-scheme="light"] :is(.quiz-side-kicker, .quiz-stage-progress, .quiz-total-progress) { font-size: 12px; line-height: 20px; }
  :root[data-color-scheme="light"] .quiz-content { width: min(100%, 1040px); margin: 0 auto; padding: 32px 40px; justify-content: center; }
  :root[data-color-scheme="light"] :is(.quiz-question, .scenario-text) { font-size: 21px; line-height: 1.6; font-weight: 600; }
  :root[data-color-scheme="light"] .quiz-options { flex: 0 1 auto; gap: 12px; margin-top: 24px; }
  :root[data-color-scheme="light"] .quiz-feedback { max-height: none; padding: 12px 16px; font-size: 13px; line-height: 1.6; }
  :root[data-color-scheme="light"] .quiz-footer { height: 68px; min-height: 68px; max-height: 68px; flex-basis: 68px; padding: 0 28px; }
  :root[data-color-scheme="light"] .quiz-next-btn { height: 40px; font-size: 14px; }
  :root[data-color-scheme="light"] .scenario-stage {
    grid-template-rows: auto minmax(0, auto) auto auto;
    align-content: center;
    gap: 18px;
    padding: 28px clamp(28px, 6vw, 100px);
  }
  :root[data-color-scheme="light"] .scenario-options { gap: 12px; }
  :root[data-color-scheme="light"] .scenario-feedback { padding: 12px 16px; font-size: 13px; line-height: 1.6; }

  :root[data-color-scheme="light"] .quote-game-board { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
  :root[data-color-scheme="light"] .quote-status { padding: 24px; }
  :root[data-color-scheme="light"] .quote-status-title { font-size: 17px; line-height: 1.7; margin-top: 12px; }
  :root[data-color-scheme="light"] .quote-score { margin-top: 24px; }
  :root[data-color-scheme="light"] :is(.quote-target, .quote-pool) { padding: 24px; gap: 12px; }
  :root[data-color-scheme="light"] :is(.quote-token, .quote-selected-token) { min-height: 46px; padding: 10px 14px; font-size: 15px; }
  :root[data-color-scheme="light"] :is(.quote-placeholder, .quote-feedback) { font-size: 13px; line-height: 1.6; }

  :root[data-color-scheme="light"] .conduct-page :is(.signal-game, .dispatch-game, .find-game) { max-width: 1080px; width: 100%; place-self: center; max-height: 640px; }
  :root[data-color-scheme="light"] :is(.signal-pads, .dispatch-teams) { gap: 16px; }
  :root[data-color-scheme="light"] :is(.signal-pad-icon, .dispatch-team-icon) { width: 64px; height: 64px; font-size: 30px; }
  :root[data-color-scheme="light"] :is(.signal-pad-name, .dispatch-team-name) { font-size: 15px; margin-top: 6px; }
  :root[data-color-scheme="light"] :is(.signal-meta-item, .dispatch-meta-item, .game-message, .find-count) { font-size: 13px; }
  :root[data-color-scheme="light"] .signal-wall { padding: 18px; }
  :root[data-color-scheme="light"] .signal-wall-label { font-size: 12px; }
  :root[data-color-scheme="light"] .dispatch-road { height: 116px; }
  :root[data-color-scheme="light"] :is(.morale-game, .road-game, .reaction-game) {
    align-self: center;
    height: auto;
    padding: 48px 32px;
    border: 1px solid var(--theme-line);
    border-radius: 20px;
    background-color: var(--theme-canvas);
    background-image: var(--theme-panel-image);
    box-shadow: 0 10px 32px rgba(var(--theme-ink-rgb), .05);
    gap: 20px;
  }
  :root[data-color-scheme="light"] .llk-board-wrap { padding-top: 16px; padding-bottom: 24px; }
  :root[data-color-scheme="light"] .llk-board { max-width: 920px; gap: 8px; }
}

@media (max-height: 500px) {
  :root[data-color-scheme="light"] :is(.game-board, .image-game-board, .scenario-stage, .quiz-layer, .quote-game-board, .mine-traverse-board) { border-radius: 12px; }
  :root[data-color-scheme="light"] :is(.memory-card-face, .timeline-slot, .timeline-event, .console-option, .quiz-option, .scenario-option) { border-radius: 8px; }
  :root[data-color-scheme="light"] .memory-card-front::before { inset: 5px; border-radius: 5px; }
  :root[data-color-scheme="light"] .memory-card-mark { width: 32px; height: 32px; font-size: 18px; }
  :root[data-color-scheme="light"] :is(.signal-pad, .dispatch-team) { gap: 3px; }
  :root[data-color-scheme="light"] :is(.signal-pad-icon, .dispatch-team-icon) { width: 30px; height: 30px; font-size: 18px; }

}

@media (max-height: 340px) {
  :root[data-color-scheme="light"] .image-game-board { padding: 4px; gap: 4px; }
}
