/* MorseDrill：游戏站。深夜无线电台的感觉：近黑底色 + 荧光绿，浅色模式是纸张色 */
:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-2: #ebe9e1;
  --text: #121a22;
  --muted: #5f6870;
  --line: #dcd9cf;
  --accent: #0f8a52;
  --accent-ink: #ffffff;
  --accent-soft: #dcf2e6;
  --accent-3: #c2410c;
  --accent-3-soft: #fde9dd;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: "Cascadia Mono", "Consolas", ui-monospace, monospace;
}
/* 上面改了哪些浅色变量，深色模式就必须同样全部改一遍 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1117;
    --surface: #111a22;
    --surface-2: #17222c;
    --text: #e4ece8;
    --muted: #8a9ba3;
    --line: #22313c;
    --accent: #39e58c;
    --accent-ink: #0b1117;
    --accent-soft: #123323;
    --accent-3: #ff9a5c;
    --accent-3-soft: #3a2418;
    --radius: 14px;
    --radius-sm: 10px;
    --font-display: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  }
}
.site-header { background: #0f1720; border: 0; }
.site-header .logo, .site-header nav a { color: #e4ece8; }
.site-header nav a:hover { background: #1c2833; color: #fff; }
.site-header nav a[aria-current] { background: #39e58c; color: #0b1117; }
h1, h2 { letter-spacing: -.03em; }
.drill { text-align: center; }
.drill .stats { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.drill .stats p { margin: 0; background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 16px; min-width: 96px; }
.drill .stats b { display: block; font: 700 26px var(--font-display); color: var(--accent); }
.drill .stats span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.letters { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 14px 0; font-family: var(--font-display); }
.letters span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-2); color: var(--muted); opacity: .5; font-size: 14px; }
.letters span.on { opacity: 1; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.drill-msg { min-height: 56px; font-size: 20px; margin: 10px 0; }
.drill-msg code { font-family: var(--font-display); letter-spacing: .2em; }
.drill-msg .good { color: var(--accent); font-weight: 700; }
.drill-msg .bad { color: var(--accent-3); font-weight: 700; }
.drill .big-btn { font-size: 20px; padding: 14px 32px; }
#drill-input { width: 140px; margin: 0 auto; text-align: center; font: 700 28px var(--font-display); text-transform: uppercase; }
.drill .row { justify-content: center; align-items: end; }
.drill .row label { flex: 0 1 140px; }
.tr textarea { font-family: var(--font-display); font-size: 18px; }
.tr #tr-out { background: var(--surface-2); }
.dir { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; min-height: 18px; }
.chart { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 16px 0; }
.chart div { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; background: var(--surface); }
.chart b { font: 700 22px var(--font-display); }
.chart code { font: 700 20px var(--font-display); letter-spacing: .15em; color: var(--accent); background: none; }
@media print { .content { display: block !important; } .chart div { break-inside: avoid; } .content > :not(.chart):not(h2) { display: none; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
