:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-soft: #ccfbf1;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --card: #ffffff;
  --bg: #f1f5f9;
  --pos: #16a34a;
  --neg: #dc2626;
  --warn: #ea580c;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
          "Microsoft YaHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #ecfeff 0%, #f1f5f9 40%);
  min-height: 100vh;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}
button, input, select { font-family: inherit; }
input, select { font-size: 14px; }

/* ===== Screens ===== */
.screen { width: 100%; }
.screen[hidden] { display: none !important; }

/* ===== Start screen (centered traditional menu) ===== */
#start-screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.start-card {
  max-width: 720px; margin: 0 auto;
  background: var(--card); border-radius: var(--radius-lg);
  padding: 44px 36px; box-shadow: var(--shadow);
  width: 100%;
}
.start-card.centered { text-align: center; }
.start-card .game-title {
  margin: 0 0 6px; font-size: 40px;
  letter-spacing: -0.02em;
}
.start-card h1 { margin: 0 0 4px; font-size: 32px; }
.start-card .subtitle { color: var(--primary-dark); font-weight: 600; margin: 0 0 18px; font-size: 16px; }
.start-card .hint { color: var(--muted); margin: 0 auto 28px; line-height: 1.7; max-width: 500px; }
.menu-buttons {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 320px; margin: 0 auto;
}
.menu-buttons button { font-size: 16px; padding: 14px 24px; }
.airline-pick {
  display: grid; gap: 14px; margin: 6px 0 18px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 540px) { .airline-pick { grid-template-columns: 1fr; } }
.airline-card {
  appearance: none; border: 2px solid var(--border); border-radius: 14px;
  background: #fff; padding: 16px; text-align: left; cursor: pointer;
  transition: transform 0.12s, border-color 0.15s;
  border-left: 5px solid var(--c, var(--primary));
}
.airline-card:hover { transform: translateY(-2px); border-color: var(--c, var(--primary)); }
.airline-card .flag { font-size: 28px; }
.airline-card .name { font-size: 18px; font-weight: 700; margin: 2px 0; }
.airline-card .hub { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.airline-card .stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink); }

/* ===== 航司品牌徽标 (IATA 二字码 + 品牌色 chip) =====
   不使用真实航空公司商标，以 IATA 代码做单色 chip 区分。
*/
.airline-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 22px; border-radius: 5px;
  font-weight: 700; font-size: 11px; color: #fff;
  letter-spacing: 0.6px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  margin-right: 5px; flex-shrink: 0;
  vertical-align: middle;
}
.airline-chip.large {
  width: 36px; height: 30px; font-size: 14px; border-radius: 6px;
}
.airline-chip.CA { background: #dc2626; }    /* 国航红 */
.airline-chip.DL { background: #1d4ed8; }    /* 达美蓝 */
.airline-chip.LH { background: #eab308; color: #1f2937; }  /* 汉莎黄 (深字) */
.airline-chip.SQ { background: #16a34a; }    /* 新航绿 */
.airline-chip.XJ { background: #7c3aed; }    /* 星途紫 */

/* ===== Hub picker (challenger-mode 基地挑选) ===== */
/* 让 hub-picker 摆脱 #start-screen 的 flex centering，占用整页宽度 */
#start-screen.picker-mode {
  display: block;
  padding: 0;
}
.hub-picker {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px;
  width: 100%;
  box-sizing: border-box;
}
.hub-picker-head {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.hub-picker-head h1 { margin: 0 0 6px; font-size: 26px; }
.hub-picker-head .hint { color: var(--muted); margin: 0; line-height: 1.6; font-size: 14px; }
.hub-picker-head .hint b { color: var(--ink); }

.hub-picker-body {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 900px) {
  .hub-picker-body { grid-template-columns: 1fr; }
}

.hub-picker-map {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  position: relative;
}
#hub-map {
  width: 100%;
  aspect-ratio: 2.2 / 1;
  display: block;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
}
.map-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 8px 12px 4px;
  font-size: 12px; color: var(--muted);
}
.map-legend .lg {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 5px;
}
.map-legend .lg-gold {
  background: #f59e0b;
  box-shadow: 0 0 0 2px #f59e0b inset;
}
.map-legend .lg-cand {
  background: #7c3aed;
  outline: 2px dashed #7c3aed;
  outline-offset: 1px;
}
.map-legend .lg-route {
  background: none;
  width: 22px; height: 0;
  border-bottom: 2.5px solid #94a3b8;
  border-radius: 0;
  margin-top: 6px;
}

.hub-picker-side {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  max-height: 480px;
  overflow-y: auto;
}
.hub-list { display: grid; gap: 8px; }
.hub-card {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.12s;
  background: #fff;
}
.hub-card:hover {
  border-color: #7c3aed;
  background: #faf5ff;
}
.hub-card.selected {
  border-color: #7c3aed;
  background: #f3e8ff;
  box-shadow: 0 0 0 2px #7c3aed inset;
}
.hub-card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 2px;
}
.hub-card .hub-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.hub-card .hub-iata {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 12px; color: var(--muted);
  background: var(--bg);
  padding: 2px 6px; border-radius: 4px;
}
.hub-card .hub-sub { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.hub-card .hub-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.hub-card .tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}
.hub-card .tag-good {
  background: #d1fae5; color: #065f46;
}
.hub-card .tag-warn {
  background: #fed7aa; color: #9a3412;
}

.hub-picker-footer {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 20px;
  box-shadow: var(--shadow);
  flex-wrap: wrap; gap: 10px;
}
.hub-picker-footer #hub-confirm-wrap {
  display: flex; gap: 12px; align-items: center;
  font-size: 13px;
}

/* Save slot cards */
.slot-list {
  display: grid; gap: 10px; margin: 6px 0 14px;
}
.slot-list.small { gap: 6px; }
.slot-card {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; background: #fff;
}
.slot-card.empty { background: #f8fafc; color: var(--muted); }
.slot-card.auto { background: #ecfeff; border-color: var(--primary); }
.slot-card .slot-num {
  font-weight: 700; color: var(--primary-dark);
  background: var(--primary-soft); padding: 4px 10px; border-radius: 6px;
  font-size: 13px; flex-shrink: 0;
}
.slot-card .slot-info { flex: 1; font-size: 14px; line-height: 1.4; }
.slot-card .slot-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ===== Game screen layout ===== */
#game-screen {
  max-width: 1320px; margin: 0 auto;
  padding: 12px 16px 32px;
}

/* Top bar with gear + HUD */
.top-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: var(--radius);
  padding: 8px 12px; box-shadow: var(--shadow);
  flex-wrap: wrap;
  position: sticky; top: 0; z-index: 10;
}
.menu-btn {
  appearance: none; background: var(--primary-soft); color: var(--primary-dark);
  border: none; width: 40px; height: 40px;
  border-radius: 10px; cursor: pointer;
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.menu-btn:hover { background: var(--primary); color: #fff; }

.end-turn-top {
  padding: 8px 16px; font-size: 14px;
  flex-shrink: 0;
}

.hud {
  display: flex; justify-content: space-between; align-items: center;
  flex: 1; flex-wrap: wrap; gap: 10px;
}
.hud-left { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.turn-actions {
  display: inline-flex; gap: 6px; font-size: 11px; align-items: baseline;
  margin-left: 4px;
}
.turn-actions .ta {
  padding: 1px 6px; border-radius: 999px;
  font-family: ui-monospace, monospace; letter-spacing: 0.3px;
}
.turn-actions .ta.free { background: #ecfeff; color: var(--primary-dark); }
.turn-actions .ta.used { background: #f1f5f9; color: var(--muted); }
.qtag {
  background: var(--primary); color: #fff;
  padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 13px;
}
.al-name { font-weight: 700; font-size: 16px; }
.hud-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.hud-stats > div { display: flex; flex-direction: column; align-items: flex-end; }
.hud-stats .lbl { font-size: 11px; color: var(--muted); }
.hud-stats .val { font-size: 15px; font-weight: 700; }

/* Map — width fills game-screen, height by aspect ratio */
.map-wrap {
  margin-top: 12px; background: var(--card); border-radius: var(--radius);
  padding: 6px; box-shadow: var(--shadow); overflow: hidden;
  aspect-ratio: 2.4 / 1;
}
#world-map { width: 100%; height: 100%; display: block; }
@media (max-width: 600px) {
  .map-wrap { aspect-ratio: 2 / 1; }
}

/* Tabs */
.tabs {
  display: flex; gap: 4px; margin: 12px 0 0;
  overflow-x: auto;
}
.tab {
  appearance: none; background: transparent; border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 16px; cursor: pointer;
  font-size: 14px; color: var(--ink); white-space: nowrap;
}
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.tab-body { margin-top: 12px; }
.panel {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.panel-head h3 { margin: 0; }

/* version tag on home */
.version-tag {
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* sell aircraft confirm */
.sell-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin: 12px 0;
}
.sell-detail > div {
  background: #f8fafc; border-radius: 6px;
  padding: 8px 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.sell-detail .lbl { font-size: 12px; color: var(--muted); }
.sell-detail b { font-size: 15px; }
.sell-detail b.pos { color: var(--pos); }

/* 排行 / 情报合并表：行可点击展开 */
.leaderboard-table tbody tr.leaderboard-row {
  cursor: pointer;
  transition: background 0.12s;
}
.leaderboard-table tbody tr.leaderboard-row:hover {
  background: var(--primary-soft);
}
.leaderboard-table tbody tr.leaderboard-row.selected {
  background: var(--primary-soft);
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.airline-detail {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 10px;
  border-left: 3px solid var(--primary);
}
.airline-detail-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.airline-detail-head h4 { margin: 0; font-size: 15px; }
.detail-sub {
  margin: 12px 0 4px; font-size: 13px; color: var(--muted);
  font-weight: 600;
}

/* route revert button styling — now a div inside the td, keeps td's vertical-align middle */
.route-actions {
  display: inline-flex; gap: 4px; align-items: center; flex-wrap: nowrap;
}
.r-revert:not(:disabled) { color: var(--primary-dark); }
.r-revert:disabled { opacity: 0.4; cursor: not-allowed; }

/* Routes tab: sort toolbar */
.route-sort-bar {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  margin: 0 0 10px;
}
.r-sort-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600;
}

/* clickable city-pair link in routes table — full-cell hit area */
.route-pair-link {
  display: block; text-decoration: none; color: inherit;
}
.route-pair-link .route-name {
  color: var(--primary-dark); font-weight: 600;
}
.route-pair-link:hover .route-name { text-decoration: underline; }

/* Event impact list inside reports/history */
.event-impact {
  list-style: none; padding: 0; margin: 6px 0 0;
}
.event-impact li {
  padding: 3px 0 3px 12px; position: relative; font-size: 13px; color: var(--ink);
  line-height: 1.5;
}
.event-impact li::before {
  content: "→"; position: absolute; left: 0; color: var(--primary);
}
.event-impact li.neutral { color: var(--muted); }


/* Tables */
.table-wrap { overflow-x: auto; }
table.game-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.game-table th, .game-table td {
  text-align: left; padding: 8px 10px;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.game-table th {
  font-weight: 600; color: var(--muted); background: #f8fafc;
  position: sticky; top: 0;
}
.game-table th.sortable {
  cursor: pointer; user-select: none;
}
.game-table th.sortable:hover { background: #e2e8f0; }
.game-table tr.me { background: #ecfeff; }
.game-table .muted { color: var(--muted); font-size: 12px; }

.game-table input[type=number] {
  width: 70px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px;
}
.game-table select { padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; }

.city-link { color: var(--primary-dark); text-decoration: none; font-weight: 600; }
.city-link:hover { text-decoration: underline; }

.stars { color: #f59e0b; letter-spacing: 1px; font-weight: 600; }

/* Routes table specific */
.routes-table .route-name { font-weight: 600; }
.routes-table .fare-cell { min-width: 200px; }
.routes-table .ac-cell { min-width: 220px; }

/* Fare slider */
.fare-slider-wrap {
  position: relative;
  height: 26px;
  border-radius: 13px;
  background: linear-gradient(to right,
    #fca5a5 0%,
    #fde68a var(--be-pos),
    #86efac 100%);
  padding: 0 2px;
  display: flex; align-items: center;
}
.fare-slider {
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 100%;
  background: transparent;
  margin: 0; padding: 0;
  cursor: pointer;
}
.fare-slider::-webkit-slider-runnable-track {
  height: 100%; background: transparent;
}
.fare-slider::-moz-range-track { background: transparent; }
.fare-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 50%;
  margin-top: 0;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.fare-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  background: #fff; border: 2px solid var(--ink);
  border-radius: 50%; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.fare-label {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 4px; font-size: 12px;
}
.fare-label .fare-val { font-weight: 700; font-size: 14px; color: var(--ink); }

/* Aircraft chips */
.ac-list { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.ac-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary-soft); border-radius: 6px;
  padding: 2px 4px 2px 8px; font-size: 12px;
}
.x-btn {
  appearance: none; border: none; background: transparent;
  cursor: pointer; padding: 0; width: 18px; height: 18px;
  border-radius: 50%; line-height: 1;
  color: var(--muted);
}
.x-btn:hover { background: rgba(0,0,0,0.1); color: var(--neg); }
.add-ac { font-size: 12px; }

/* Inline buttons */
button.mini {
  appearance: none; padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 12px;
  margin-right: 2px;
}
button.mini:hover { background: var(--primary-soft); }

.primary-btn {
  appearance: none; background: var(--primary); color: #fff;
  border: none; padding: 10px 18px; border-radius: 10px;
  font-weight: 600; cursor: pointer; font-size: 14px;
}
.primary-btn.small { padding: 6px 12px; font-size: 13px; }
.primary-btn.big { padding: 14px 28px; font-size: 16px; }
.primary-btn:hover { background: var(--primary-dark); }
.primary-btn:disabled { background: #cbd5e1; cursor: not-allowed; }

.ghost-btn {
  appearance: none; background: transparent; color: var(--ink);
  border: 1px solid var(--border); padding: 10px 18px; border-radius: 10px;
  cursor: pointer; font-size: 14px;
}
.ghost-btn.small { padding: 6px 12px; font-size: 13px; }
.ghost-btn.big { padding: 14px 28px; font-size: 16px; }
.ghost-btn:hover { background: #f1f5f9; }
.ghost-btn:disabled { color: var(--muted); cursor: not-allowed; }

/* Finance grid */
.finance-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 12px;
}
.fin-card {
  background: #f8fafc; border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.fin-card span { font-size: 12px; color: var(--muted); }
.fin-card b { font-size: 18px; }
.fin-card.pos b { color: var(--pos); }
.fin-card.neg b { color: var(--neg); }
.fin-card.big { grid-column: span 2; background: #ecfeff; }

/* Debt section */
.debt-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 12px 0;
}
.debt-card {
  background: #fff7ed; border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
  border-left: 3px solid #fb923c;
}
.debt-card .lbl { font-size: 12px; color: var(--muted); }
.debt-card b { font-size: 18px; }
.debt-actions {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-top: 8px;
}

/* status colors */
.pos { color: var(--pos); font-weight: 600; }
.neg { color: var(--neg); font-weight: 600; }
.warn { color: var(--warn); font-weight: 600; }
.bad { color: var(--neg); font-weight: 600; }

/* dots */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }

/* event list */
.event-list { list-style: none; padding: 0; margin: 0; }
.event-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }

/* action list (end-turn confirm) */
.action-list { list-style: none; padding: 0; margin: 8px 0; max-height: 280px; overflow-y: auto; }
.action-list li {
  padding: 6px 10px; font-size: 14px;
  border-left: 3px solid var(--primary); background: #f8fafc;
  margin-bottom: 4px; border-radius: 0 6px 6px 0;
}

/* intel tab */
.intel-quarter { margin-bottom: 14px; }
.intel-quarter h4 {
  margin: 0 0 6px; font-size: 14px;
  color: var(--muted); font-weight: 600;
  border-bottom: 1px dashed var(--border); padding-bottom: 4px;
}
.intel-list { list-style: none; padding: 0; margin: 0; }
.intel-list li { padding: 6px 0; font-size: 14px; line-height: 1.5; }
.intel-list li b { margin: 0 4px 0 6px; }

.rec-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rec {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 14px; line-height: 1.5;
}
.rec-info { background: #ecfeff; border-left: 3px solid var(--primary); }
.rec-warn { background: #fff7ed; border-left: 3px solid var(--warn); }
.rec-icon { font-size: 18px; flex-shrink: 0; }
.rec-body { flex: 1; min-width: 0; }
.rec-text { font-weight: 500; }
.rec-reason {
  font-size: 12px; color: var(--muted);
  margin-top: 4px; line-height: 1.5;
  padding-top: 4px; border-top: 1px dashed var(--border);
}
.rec-why { color: var(--primary-dark); font-weight: 600; margin-right: 4px; }

/* Term help button (?) — small inline tooltip trigger */
.term-help {
  appearance: none; border: 1px solid var(--border);
  background: #fff; color: var(--muted);
  width: 18px; height: 18px;
  padding: 0; margin: 0 0 0 4px;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle;
  transition: all 0.12s;
}
.term-help:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* Menu sections */
.menu-section { margin-bottom: 14px; }
.menu-section h4 { margin: 0 0 8px; font-size: 14px; color: var(--muted); }

/* Modal */
#modal-root { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
#modal-root:empty { display: none; }
.modal-mask {
  position: absolute; inset: 0; background: rgba(15,23,42,0.5);
  pointer-events: auto;
}
.modal {
  position: relative; max-width: 720px; margin: 6vh auto 0;
  background: #fff; border-radius: var(--radius-lg);
  padding: 22px 22px 16px; box-shadow: var(--shadow);
  pointer-events: auto;
  max-height: 85vh; overflow-y: auto;
}
.modal h2 { margin: 0 0 12px; font-size: 22px; }
.modal-body { font-size: 15px; line-height: 1.6; }
.modal-body p { margin: 8px 0; }
.modal-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px;
  flex-wrap: wrap;
}
.report-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 12px 0;
}
.report-summary > div { background: #f8fafc; border-radius: 8px; padding: 10px; text-align: center; }
.report-summary .lbl { font-size: 12px; color: var(--muted); display: block; }
.report-summary b { font-size: 18px; }

.form-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.form-row label { width: 60px; color: var(--muted); }
.form-row select, .form-row input {
  flex: 1; padding: 8px; border: 1px solid var(--border); border-radius: 8px;
}

/* Toast */
#toast {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
  background: rgba(15,23,42,0.92); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; opacity: 0; transition: opacity 0.2s;
  pointer-events: none; z-index: 200;
  max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; }

.muted { color: var(--muted); }
.muted.small { font-size: 12px; }

/* iPad-friendly sizing */
@media (min-width: 900px) {
  #game-screen { padding: 16px 24px 40px; }
  .hud-stats { gap: 22px; }
}
