/* ═══════════════════════════════════════════════════════════════
   星际 · 文字航行模拟 — 驾驶舱风格
   ═══════════════════════════════════════════════════════════════ */

.game-shell {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: var(--font-mono);
}

/* ── 状态栏 ────────────────────────────────────────────────── */
.ship-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 14px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  box-shadow: var(--card-shadow);
  animation: card-in 0.4s ease both;
}

/* 状态标签容器：桌面保持内联，移动端独立横滑 */
.status-chips { display: contents; }

.meter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  flex: 1;
}
.meter-label {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.meter-label i { color: var(--accent-3); font-size: 11px; }
.meter-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border);
}
[data-theme='light'] .meter-bar { background: rgba(15, 23, 42, 0.06); }
.meter-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 5px;
  background: var(--grad);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
  transition: width 0.5s ease, background 0.3s;
}
#meterFuel { background: linear-gradient(90deg, #22d3ee, #6366f1); }
#meterOxy { background: linear-gradient(90deg, #34d399, #22d3ee); }
#meterHull { background: linear-gradient(90deg, #fbbf24, #f87171); }
.meter-fill.critical {
  background: linear-gradient(90deg, #f87171, #ef4444) !important;
  animation: meter-blink 0.9s ease-in-out infinite;
}
@keyframes meter-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.meter-item b {
  font-size: 14px;
  min-width: 34px;
  text-align: right;
  color: var(--text);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-dim);
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
[data-theme='light'] .status-chip { background: rgba(15, 23, 42, 0.03); }
.status-chip i { color: var(--accent-3); font-size: 11px; }
.status-chip b { color: var(--text); font-weight: 600; }
.chip-credits b { color: var(--warning); }
.chip-loc b { color: var(--accent-2); }

/* ── 主区：星图 + 日志 ─────────────────────────────────────── */
.game-main {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.star-map-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  box-shadow: var(--card-shadow);
  padding: 14px;
  display: flex;
  flex-direction: column;
}
.star-map-title {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.star-map-title i { color: var(--accent-2); }
.star-map {
  width: 100%;
  flex: 1;
  min-height: 280px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(99, 102, 241, 0.08), transparent 60%),
    rgba(10, 12, 22, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
[data-theme='light'] .star-map { background: rgba(255, 255, 255, 0.5); }

.star-map .route-line {
  stroke: rgba(99, 102, 241, 0.28);
  stroke-width: 0.35;
  stroke-dasharray: 1.4 1.4;
}
.star-map .node-circle {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 0.3;
}
.star-map .node-visit {
  fill: #22d3ee;
  filter: drop-shadow(0 0 3px rgba(34, 211, 238, 0.9));
}
.star-map .node-unvisit { fill: #626b80; }
.star-map .node-danger {
  fill: #f87171;
  filter: drop-shadow(0 0 3px rgba(248, 113, 113, 0.9));
}
.star-map .node-cur {
  fill: #ffffff;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.95));
}
.star-map .node-pulse {
  fill: none;
  stroke: rgba(34, 211, 238, 0.6);
  stroke-width: 0.5;
  animation: node-pulse 1.8s ease-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes node-pulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}
.star-map .node-label {
  font-size: 3.1px;
  fill: var(--text-dim);
  letter-spacing: 0.3px;
}
.star-map .node-dist {
  font-size: 2.4px;
  fill: var(--text-faint);
}
.star-map .node-label.cur { fill: #ffffff; }
.star-map .node-hit { cursor: pointer; }
.star-map .node-selected {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 0.6;
  stroke-dasharray: 1 0.8;
  animation: node-pulse 1.4s ease-out infinite;
  transform-box: fill-box;
}

/* 悬浮高亮：节点与文字随悬停增强 */
.star-map .node-g { cursor: pointer; }
.star-map .node-g:hover .node-circle {
  stroke: rgba(34, 211, 238, 0.75);
  stroke-width: 0.6;
}
.star-map .node-g:hover .node-unvisit { fill: #8b95ab; }
.star-map .node-g:hover .node-visit { fill: #67e8f9; }
.star-map .node-g:hover .node-danger { fill: #fca5a5; }
.star-map .node-g:hover .node-label { fill: var(--text); }
.star-map .node-g:hover .node-dist { fill: var(--text-dim); }

/* 锁定目标的导航线：流光虚线 */
.star-map .sel-line {
  stroke: var(--accent-2);
  stroke-width: 0.5;
  stroke-dasharray: 1.2 1.2;
  animation: route-dash 1s linear infinite;
  filter: drop-shadow(0 0 2px rgba(34, 211, 238, 0.6));
}
@keyframes route-dash {
  to { stroke-dashoffset: -2.4; }
}

/* ── 航行日志 ──────────────────────────────────────────────── */
.flight-log {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  box-shadow: var(--card-shadow);
  padding: 16px 18px;
  height: 440px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
  line-height: 1.85;
  scrollbar-width: thin;
}
.log-line {
  color: var(--text-dim);
  animation: log-in 0.3s ease both;
  word-break: break-word;
}
@keyframes log-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.log-line .t {
  color: var(--text-faint);
  font-size: 11.5px;
  margin-right: 8px;
  flex-shrink: 0;
}
.log-sys { color: var(--accent-2); }
.log-info { color: var(--text-dim); }
.log-event { color: var(--warning); }
.log-good { color: var(--success); }
.log-bad { color: var(--danger); }
.log-title {
  color: #fff;
  font-weight: 600;
  margin-top: 8px;
  font-size: 14px;
}
[data-theme='light'] .log-title { color: var(--text); }
.log-divider {
  border: none;
  border-top: 1px dashed var(--border-strong);
  margin: 8px 0;
}

/* 打字机光标 */
.log-body.typing::after {
  content: '▍';
  margin-left: 1px;
  color: var(--text-faint);
  animation: caret-blink 0.7s steps(2) infinite;
}
@keyframes caret-blink {
  50% { opacity: 0; }
}

/* ── 行动区 ────────────────────────────────────────────────── */
.action-bar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  box-shadow: var(--card-shadow);
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  animation: card-in 0.4s ease both;
  min-height: 62px;
}
.action-bar .act-hint {
  width: 100%;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 1px;
}
.action-bar .act-group {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.game-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.22s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.game-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.96);
}
[data-theme='light'] .game-btn { background: rgba(15, 23, 42, 0.04); }
.game-btn:hover:not(:disabled) {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}
.game-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.game-btn.primary {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.3);
}
.game-btn.primary:hover:not(:disabled) { filter: brightness(1.12); }
.game-btn.ghost { border-color: transparent; color: var(--text-faint); background: transparent; }
.game-btn.ghost:hover { color: var(--danger); box-shadow: none; }
.game-btn.danger { border-color: rgba(248, 113, 113, 0.4); color: var(--danger); }
.game-btn.danger:hover:not(:disabled) { background: rgba(248, 113, 113, 0.12); }

.game-select {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--font-mono);
  outline: none;
  cursor: pointer;
  max-width: 300px;
}
.game-select:focus { border-color: var(--accent); }

/* ── 结算面板 ──────────────────────────────────────────────── */
.result-panel[hidden] { display: none !important; }

.result-panel {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  animation: flash-in 0.35s ease;
}
.result-card {
  width: min(460px, 92vw);
  background: var(--card-bg-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: center;
  box-shadow: var(--card-shadow), var(--glow);
  animation: card-in 0.35s ease both;
}
.result-icon {
  width: 72px; height: 72px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  font-size: 28px;
  color: #fff;
  background: var(--grad);
  box-shadow: var(--glow);
}
.result-card h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.result-card > p { font-size: 14px; color: var(--text-dim); line-height: 2; }
.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0;
}
.result-stat {
  padding: 12px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}
[data-theme='light'] .result-stat { background: rgba(15, 23, 42, 0.03); }
.result-stat b {
  display: block;
  font-size: 19px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.result-stat span { font-size: 12px; color: var(--text-faint); }
.result-card .game-btn { margin-top: 6px; }

.game-toast {
  width: 100%;
  font-size: 12.5px;
  color: var(--danger);
  padding: 2px 4px;
  opacity: 0;
  transition: opacity 0.3s;
}

.game-shell-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text-faint);
  padding: 0 4px;
  font-family: var(--font-mono);
}
.game-shell-foot i { color: var(--accent-3); }

/* ── 底部按钮组 ────────────────────────────────────────────── */
.foot-btns {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.foot-btns .game-btn { padding: 6px 12px; font-size: 12px; }
#btnAch b { color: var(--warning); font-weight: 600; margin-left: 2px; }
#btnSound { min-width: 40px; justify-content: center; }

/* ── 成就面板 ──────────────────────────────────────────────── */
.ach-panel {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  animation: flash-in 0.3s ease;
}
.ach-panel[hidden] { display: none !important; }

/* 面板出场渐隐 */
.ach-panel.out, .result-panel.out { animation: flash-out 0.24s ease forwards; }
@keyframes flash-out { to { opacity: 0; } }

/* 面板打开时锁定背景滚动 */
body.no-scroll { overflow: hidden; }

.ach-card {
  width: min(520px, 92vw);
  max-height: 82vh;
  overflow-y: auto;
  background: var(--card-bg-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--card-shadow), var(--glow);
  animation: card-in 0.3s ease both;
}
.ach-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
}
.ach-head i { color: var(--warning); }
.ach-head span {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.ach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.ach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
[data-theme='light'] .ach-item { background: rgba(15, 23, 42, 0.03); }
.ach-item > i {
  font-size: 18px;
  color: var(--text-faint);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.ach-item.on { border-color: rgba(251, 191, 36, 0.35); }
.ach-item.on > i {
  color: var(--warning);
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}
.ach-item b { display: block; font-size: 13.5px; color: var(--text); }
.ach-item span { font-size: 11.5px; color: var(--text-faint); line-height: 1.5; }
.ach-item em { margin-left: auto; font-style: normal; font-size: 11px; flex-shrink: 0; }
.ach-done { color: var(--success); }
.ach-lock { color: var(--text-faint); }
.ach-card .game-btn { width: 100%; justify-content: center; }

/* ── 成就解锁提示 ──────────────────────────────────────────── */
.ach-toast {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 1080;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--card-bg-solid);
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: var(--card-shadow), 0 0 24px rgba(251, 191, 36, 0.25);
  animation: ach-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.ach-toast i { font-size: 22px; color: var(--warning); }
.ach-toast b {
  display: block;
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 1px;
}
.ach-toast span { font-size: 15px; font-weight: 700; color: var(--text); }
.ach-toast.out { opacity: 0; transform: translateY(8px); transition: all 0.4s; }
@keyframes ach-in {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

/* ── 账号与云同步 ──────────────────────────────────────────── */
.cloud-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 11px;
  border: 1px solid var(--border-strong);
  color: var(--text-faint);
  white-space: nowrap;
}
.cloud-chip i { color: var(--accent-3); font-size: 10px; }
.cloud-chip.sync i { animation: meter-blink 0.9s ease-in-out infinite; }
.cloud-chip.warn { border-color: rgba(248, 113, 113, 0.4); color: var(--danger); }
.cloud-chip.warn i { color: var(--danger); }

#btnAccount.acc-on { border-color: rgba(52, 211, 153, 0.45); color: var(--success); }

.account-card { width: min(420px, 92vw); }
.acc-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.acc-tab {
  flex: 1;
  padding: 10px 0;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s;
}
[data-theme='light'] .acc-tab { background: rgba(15, 23, 42, 0.03); }
.acc-tab.on {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.3);
}
.acc-input {
  width: 100%;
  max-width: 100%;
  margin-bottom: 10px;
  background: var(--bg-elev);
}
.acc-error {
  min-height: 18px;
  font-size: 12.5px;
  color: var(--danger);
  margin: 2px 0 6px;
}
.acc-tip {
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.7;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed var(--border-strong);
  margin-bottom: 14px;
}
.acc-tip i { color: var(--accent-2); }
.acc-actions { display: flex; gap: 10px; }
.acc-actions .game-btn { flex: 1; justify-content: center; }

/* ── 星系档案 ──────────────────────────────────────────────── */
.dossier-card { width: min(560px, 94vw); text-align: left; }
.dossier-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.dossier-head h2 {
  font-size: 22px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}
.dossier-head span { font-size: 12px; color: var(--text-faint); }
.dos-badge {
  font-style: normal;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}
.dos-type {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent-2);
  margin-bottom: 14px;
}
.dos-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.dos-stat {
  padding: 10px 6px;
  text-align: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}
[data-theme='light'] .dos-stat { background: rgba(15, 23, 42, 0.03); }
.dos-stat b { display: block; font-size: 13.5px; color: var(--text); }
.dos-stat span { font-size: 10.5px; color: var(--text-faint); }
.dos-section { margin-bottom: 14px; }
.dos-section-title {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.dos-fact {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 12.5px;
}
.dos-fact:last-child { border-bottom: none; }
.dos-fact b {
  color: var(--text-dim);
  flex-shrink: 0;
  min-width: 84px;
  font-weight: 500;
}
.dos-fact span { color: var(--text); }
.dos-note { margin-bottom: 10px; }
.dos-note b {
  display: block;
  font-size: 12.5px;
  color: var(--accent-3);
  margin-bottom: 3px;
}
.dos-note p {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.9;
  margin: 0;
}
.dos-flavor {
  font-size: 12px;
  color: var(--text-faint);
  font-style: italic;
  padding: 10px 14px;
  border-left: 3px solid var(--border-strong);
  margin-bottom: 16px;
  line-height: 1.7;
}

/* ── 飞船选择 ──────────────────────────────────────────────── */
.chip-ship b { color: var(--accent-3); }
.ship-card { width: min(680px, 94vw); }
.ship-name-input { margin-bottom: 14px; }
.ship-intro {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.8;
}
.ship-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.ship-card-item {
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s;
  text-align: left;
}
[data-theme='light'] .ship-card-item { background: rgba(15, 23, 42, 0.03); }
.ship-card-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}
.ship-card-item.sel {
  border-color: var(--accent-2);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.06);
}
.ship-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ship-card-top > i {
  font-size: 26px;
  color: var(--accent-2);
  width: 34px;
  text-align: center;
  flex-shrink: 0;
}
.ship-card-top b { display: block; font-size: 16px; color: var(--text); }
.ship-card-top span { font-size: 11px; color: var(--text-faint); }
.ship-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 10px;
}
.ship-stats span {
  font-size: 11.5px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ship-stats i { color: var(--accent-3); font-size: 10px; }
.ship-perk { font-size: 12px; color: var(--success); margin-bottom: 6px; line-height: 1.6; }
.ship-flavor { font-size: 11.5px; color: var(--text-faint); line-height: 1.7; }

/* 离线入口 */
.acc-offline {
  display: block;
  font-size: 12px;
  color: var(--text-faint);
  text-decoration: underline;
  cursor: pointer;
  margin-bottom: 10px;
}
.acc-offline:hover { color: var(--accent-2); }
.acc-offline i { font-size: 10px; }

/* ── 船员办公室 ────────────────────────────────────────────── */
.chip-crew b { color: var(--accent-2); }
.crew-card { width: min(640px, 94vw); }
.crew-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  margin: 16px 0 10px;
}
.crew-section-title i { color: var(--accent-3); }
.crew-section-title span { font-weight: 400; color: var(--text-faint); font-size: 12px; }
.crew-section-title .crew-refresh {
  margin-left: auto;
  width: auto;
  padding: 5px 12px;
  font-size: 12px;
}
.crew-current, .crew-offer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.crew-item, .crew-offer-item {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}
[data-theme='light'] .crew-item, [data-theme='light'] .crew-offer-item { background: rgba(15, 23, 42, 0.03); }
[data-theme='light'] .morale-bar { background: rgba(15, 23, 42, 0.08); }
.crew-item-head, .crew-offer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.crew-item-head > i, .crew-offer-head > i {
  font-size: 18px;
  color: var(--accent-2);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.crew-who { min-width: 0; }
.crew-who b { display: block; font-size: 14px; color: var(--text); }
.crew-who span { font-size: 11.5px; color: var(--text-faint); }
.q-badge {
  font-style: normal;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-faint);
}
.q-good { color: var(--accent-2); border-color: rgba(34, 211, 238, 0.4); }
.q-elite { color: var(--warning); border-color: rgba(251, 191, 36, 0.45); }
.lv-badge {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 600;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 238, 0.35);
  vertical-align: 1px;
  white-space: nowrap;
}
.lv-badge.lv-max {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
  border-color: rgba(251, 191, 36, 0.45);
}
.crew-desc { font-size: 11.5px; color: var(--text-dim); line-height: 1.6; margin-bottom: 8px; }
.exp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.exp-label { flex-shrink: 0; }
.exp-bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
[data-theme='light'] .exp-bar { background: rgba(15, 23, 42, 0.08); }
.exp-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent-2);
  transition: width 0.3s;
}
.exp-fill.exp-max { background: var(--warning); }
.crew-fire {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
  flex-shrink: 0;
}
.crew-fire:hover { color: var(--danger); }
.morale-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-faint);
}
.morale-label { flex-shrink: 0; }
.morale-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.morale-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--success);
  transition: width 0.3s;
}
.morale-fill.morale-mid { background: var(--warning); }
.morale-fill.morale-low { background: var(--danger); }
.crew-warn {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--danger);
  margin-top: 8px;
}
.crew-warn i { font-size: 10px; }
.hire-cost { font-style: normal; font-size: 11px; color: var(--warning); margin-left: auto; flex-shrink: 0; }
.hire-btn {
  width: 100%;
  justify-content: center;
  padding: 7px 10px;
  font-size: 12.5px;
}
.crew-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 22px 10px;
  color: var(--text-faint);
  font-size: 12.5px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
}
.crew-empty i { display: block; font-size: 22px; margin-bottom: 8px; color: var(--accent-3); }

/* ── 贸易情报 ──────────────────────────────────────────────── */
.intel-card { width: min(560px, 94vw); }
.intel-note {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-bottom: 12px;
  line-height: 1.7;
  padding: 8px 10px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
}
.intel-note i { color: var(--accent-3); }
.intel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
}
[data-theme='light'] .intel-row { background: rgba(15, 23, 42, 0.03); }
.intel-row.cur { border-color: rgba(34, 211, 238, 0.4); }
.intel-sys { width: 118px; flex-shrink: 0; }
.intel-sys b { display: block; font-size: 13.5px; color: var(--text); }
.intel-sys span { font-size: 10.5px; color: var(--text-faint); line-height: 1.5; display: block; }
.intel-cur {
  font-style: normal;
  font-size: 9.5px;
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 8px;
  padding: 0 5px;
  vertical-align: 1px;
}
.intel-cols {
  display: flex;
  gap: 10px;
  flex: 1;
  font-size: 10.5px;
  color: var(--text-faint);
}
.intel-cols span { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.intel-cols b { font-size: 13px; color: var(--text); font-weight: 600; }
.intel-cols .intel-mineral b { color: var(--warning); }
.intel-tags { display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; }
.intel-tag {
  font-style: normal;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 8px;
  text-align: center;
}
.tag-high { color: var(--warning); border: 1px solid rgba(251, 191, 36, 0.45); }
.tag-cheap { color: var(--success); border: 1px solid rgba(52, 211, 153, 0.4); }

/* ── 模块网格与改装车间 ────────────────────────────────────── */
.shop-grid-wrap {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ship-grid-view {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
[data-theme='light'] .ship-grid-view { background: rgba(15, 23, 42, 0.06); }
.grid-cell {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
}
.grid-cell.used {
  border: 1px solid rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent-2);
  box-shadow: inset 0 0 8px rgba(34, 211, 238, 0.1);
}
.shop-installed { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 6px; }
.mod-installed {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.mod-installed > i { color: var(--accent-2); font-size: 13px; flex-shrink: 0; }
.mod-installed b { color: var(--text); font-size: 12.5px; }
.mod-installed span { color: var(--text-faint); font-size: 11px; }
.mod-installed em { font-style: normal; color: var(--text-faint); font-size: 10.5px; margin-left: auto; flex-shrink: 0; }
.mod-uninstall {
  border: none;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 13px;
  padding: 3px;
  flex-shrink: 0;
}
.mod-uninstall:hover { color: var(--danger); }
.shop-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  margin: 12px 0 8px;
}
.shop-group-title i { color: var(--accent-3); }
.shop-group-title span { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--text-faint); }
.shape-tag {
  font-style: normal;
  font-size: 10px;
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 6px;
  padding: 0 5px;
  vertical-align: 1px;
}

/* ── 造船厂 ────────────────────────────────────────────────── */
.yard-card { width: min(560px, 94vw); }
.yard-note {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-bottom: 12px;
  line-height: 1.7;
  padding: 8px 10px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
}
.yard-note i { color: var(--accent-3); }
.yard-note b { color: var(--accent-2); }
.yard-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
}
[data-theme='light'] .yard-item { background: rgba(15, 23, 42, 0.03); }
.yard-item.done { border-color: rgba(52, 211, 153, 0.35); }
.yard-head { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.yard-head > i { font-size: 18px; color: var(--warning); width: 22px; text-align: center; flex-shrink: 0; }
.yard-head b { display: block; font-size: 13.5px; color: var(--text); }
.yard-head span { font-size: 11px; color: var(--text-faint); line-height: 1.5; display: block; }
.yard-cost { font-style: normal; font-size: 11px; color: var(--warning); flex-shrink: 0; }
.yard-item.done .yard-cost { color: var(--success); }
.yard-item .game-btn { width: 92px; flex-shrink: 0; padding: 7px 10px; font-size: 12px; }

/* ── 响应式 ────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .game-main { grid-template-columns: 1fr; }
  .star-map { min-height: 240px; }
  .flight-log { height: 360px; }
}
@media (max-width: 640px) {
  .game-shell { gap: 12px; }

  /* 状态栏：三个仪表整行堆叠，状态标签独立横滑 */
  .ship-status { gap: 12px; padding: 12px 14px; }
  .meter-item { min-width: 100%; flex-basis: 100%; }
  .status-chips {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    order: 99;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .status-chips::-webkit-scrollbar { display: none; }
  .status-chips .status-chip { flex-shrink: 0; }
  .status-chip { font-size: 11.5px; padding: 4px 9px; }

  /* 行动区按钮：两列大点击区 */
  .action-bar { padding: 14px; }
  .action-bar .game-btn {
    flex: 1 1 calc(50% - 5px);
    justify-content: center;
    padding: 12px 8px;
    font-size: 13px;
  }

  /* 面板：全屏抽屉式 */
  .ach-panel, .result-panel { align-items: stretch; }
  .ach-card, .result-card {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    padding: 20px 16px 24px;
    overflow-y: auto;
  }

  .game-shell-foot { flex-direction: column; align-items: stretch; }
  .foot-btns { justify-content: flex-start; }

  .game-select { max-width: 100%; }
  .ach-grid { grid-template-columns: 1fr; }
  .ship-grid { grid-template-columns: 1fr; }
  .crew-current, .crew-offer { grid-template-columns: 1fr; }
}
