* { box-sizing: border-box }
:root { color-scheme: dark; --bg: #121714; --panel: #1c241e; --line: #39463c; --text: #f1f6ed; --sub: #b0c0b2; --accent: #c6f574; --ink: #1a280d }
:root[data-theme=light] { color-scheme: light; --bg: #eff3ea; --panel: #fff; --line: #c6d1c5; --text: #18251d; --sub: #526254; --accent: #34631e; --ink: #fff }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, "Microsoft YaHei", sans-serif }
[hidden] { display: none !important }
.top, main { max-width: 1000px; margin: auto; padding: 16px clamp(14px,4vw,32px) }
.top { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line) }
.top img { border-radius: 12px }
.top .pill { margin-left: auto }
main { padding-bottom: calc(105px + env(safe-area-inset-bottom)) }
section { display: grid; gap: 14px }
h1, h2, p { margin: 0 }
h1 { font-size: clamp(32px,6vw,50px); line-height: 1.12 }
h2 { font-size: 20px; line-height: 1.2 }
.heading, .split { display: flex; align-items: center; justify-content: space-between; gap: 10px }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: clamp(14px,3vw,24px); display: grid; align-content: start; gap: 13px; min-width: 0 }
.workout h2 { font-size: clamp(27px,5vw,39px) }
.eyebrow, .muted { color: var(--sub) }
.eyebrow { font-size: .83rem; letter-spacing: .12em; margin-bottom: 4px }
.pill { border: 1px solid var(--line); border-radius: 100px; padding: 4px 10px; font-size: .8rem; white-space: nowrap }
.actions { display: flex; flex-wrap: wrap; gap: 8px }
button, input, select { font: inherit; color: inherit; min-width: 0 }
button, input:not([type=checkbox],[type=range]), select { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; min-height: 46px; padding: 8px 12px }
button { cursor: pointer; font-weight: 650 }
button:disabled { opacity: .55; cursor: default }
button.primary, nav button[aria-current], button[aria-pressed=true] { background: var(--accent); color: var(--ink); border-color: transparent }
button.primary { flex: 1 1 auto }
input[type=number] { width: 92px }
input[type=range] { width: min(40%, 180px) }
input[type=checkbox] { width: 23px; height: 23px; accent-color: var(--accent) }
select { max-width: 100% }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px }
#clock { color: var(--accent); font-size: clamp(58px,15vw,96px); line-height: 1.14; text-align: center; font-variant-numeric: tabular-nums; font-weight: 750; letter-spacing: -.065em }
#notice { margin-bottom: 12px; border: 1px solid var(--accent); padding: 10px; border-radius: 12px }
#checklist > div, #test-results > div { display: grid; gap: 6px; border-top: 1px solid var(--line); padding: 12px 0 }
summary { cursor: pointer; padding: 7px 0 }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem }
nav { position: fixed; inset: auto 0 0; z-index: 1; display: flex; justify-content: center; gap: 6px; border-top: 1px solid var(--line); background: var(--bg); padding: 9px 10px calc(9px + env(safe-area-inset-bottom)) }
nav button { flex: 1; max-width: 210px }
@media (min-width: 720px) {
  #training, #compatibility, #settings { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start }
  section > h1, section > .heading, #training > :last-child { grid-column: 1 / -1 }
}
