[hidden] { display: none !important }
main { max-width: 50rem; padding-bottom: max(2rem, env(safe-area-inset-bottom)); }
body:has(#panel) main { max-width: 42rem; }
.entry { max-width: 32rem; margin-top: clamp(.5rem, 8vh, 5rem); }
.nav { display: flex; gap: .2rem; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.nav a, .nav button { font: 650 .94rem/1.35 system-ui; min-height: 2.8rem; padding: .7rem clamp(.45rem, 1.8vw, .8rem); }
.nav a { color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.nav a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
.nav button { margin-left: auto; background: transparent; border: 0; color: var(--muted); white-space: nowrap; }
.nav a:hover, .nav button:hover { color: var(--accent); }
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.settings .primary { grid-column: 1 / -1; }
label { display: block; font-weight: 650; margin-bottom: .25rem; }
select, input { width: 100%; min-height: 2.85rem; padding: .55rem .7rem; font: inherit; border: 1px solid var(--line); border-radius: .55rem; color: var(--text); background: #172a3a; }
.settings select { display: block; margin-top: .28rem; }
input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #fbc677; outline-offset: 2px; }
.login input { margin-bottom: .85rem; }
.login p { margin-bottom: .7rem; }
.raw { background: #0b1825; border: 1px solid var(--line); border-radius: .55rem; padding: .8rem; margin: 1rem 0 1.25rem; overflow-wrap: anywhere; white-space: pre-wrap; font: 600 1rem/1.75 ui-monospace, monospace; }
mark { color: var(--ink); background: var(--accent); border-radius: .18rem; }
.notice { margin: .6rem 0 1rem; border-left: 3px solid #fbc677; background: #172a3a; border-radius: .2rem .55rem .55rem .2rem; padding: .6rem .8rem; color: var(--text); }
.notice[data-result=correct] { border-left-color: var(--accent); }
.notice[data-result=wrong] { border-left-color: #f5a8ae; }
#card .status { font-size: .79rem; }
.stations { margin-top: 1rem; color: var(--muted); }
summary { cursor: pointer; color: var(--accent); }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.history-panel { margin-top: .85rem; }
.metric { color: var(--accent); font: 700 2rem/1 ui-monospace, monospace; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line); }
td { white-space: nowrap; }
tbody th { font-weight: 500; }
.recent { padding: 0; list-style: none; }
.recent li + li { border-top: 1px solid var(--line); padding-top: .5rem; }
progress.track { appearance: none; display: block; width: 100%; border: 0; accent-color: var(--accent); }
progress.track::-webkit-progress-bar { background: #263b4d; }
progress.track::-webkit-progress-value { background: var(--accent); }
progress.track::-moz-progress-bar { background: var(--accent); }
@media (max-width: 440px) {
  #card .choices { grid-template-columns: 1fr; }
  .settings { gap: .6rem; }
  .summary-grid { grid-template-columns: 1fr; }
  .nav a, .nav button { font-size: .88rem; }
}
