:root {
  color-scheme: light;
  font: 16px/1.55 system-ui, -apple-system, sans-serif;
  color: #192e25;
  background: #eef2ee;
  --ink: #162c24;
  --accent: #217455;
  --border: #cddad1;
}
* { box-sizing: border-box; }
body { margin: 0; padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
.layout { max-width: 52rem; margin: auto; padding: 0 1rem; }
.top { background: var(--ink); color: white; }
.banner { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .35rem 1rem; padding-block: 1.2rem; }
.banner span { font-size: .875rem; color: #bfe7d1; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.55rem, 6vw, 2rem); letter-spacing: .01em; }
h2 { font-size: 1.25rem; }
p { max-width: 66ch; }
.toolbar, .heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; }
.toolbar { margin: 1rem 0; }
.toolbar label { display: flex; align-items: center; gap: .6rem; }
nav { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0; }
nav a, .toolbar a { padding: .6rem .8rem; background: #d7eadf; color: #163d2e; border-radius: .5rem; text-decoration: none; }
.sheet { background: #fff; border: 1px solid var(--border); border-radius: .85rem; padding: 1rem; margin-block: .75rem; display: grid; gap: .75rem; scroll-margin-top: .5rem; }
form, .details-body { display: grid; gap: .8rem; }
.details-body, #review-form { margin-top: .75rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem .85rem; }
label { display: grid; gap: .2rem; min-width: 0; font-weight: 550; }
input, select, textarea, button, .button { font: inherit; }
input:not([type=checkbox]), select, textarea { width: 100%; color: inherit; background: #f8faf8; padding: .55rem .6rem; border: 1px solid #9eafa4; border-radius: .45rem; min-height: 2.75rem; }
input[type=date] { width: auto; }
.check { display: flex; align-items: flex-start; gap: .55rem; font-weight: 450; min-height: 2rem; }
input[type=checkbox] { width: 1.15rem; height: 1.15rem; margin-top: .22rem; flex-shrink: 0; accent-color: var(--accent); }
button, .button { min-height: 2.75rem; padding: .55rem .8rem; border: 1px solid var(--accent); border-radius: .48rem; background: var(--accent); color: white; font-weight: 600; cursor: pointer; text-align: center; width: fit-content; }
button:disabled { opacity: .6; cursor: default; }
.button input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.button:focus-within, :focus-visible { outline: 3px solid #cf6e16; outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.actions button:not(:first-child), [data-coach] { background: #e6f3eb; color: #18462f; }
summary { cursor: pointer; font-weight: 650; padding: .35rem 0; }
details .grid { margin-top: .55rem; }
.notice { display: block; background: #e8f2ed; padding: .65rem .75rem; border-radius: .5rem; }
.notice[data-urgent="true"] { background: #ffe8df; color: #752b1c; font-weight: 650; }
.list { max-height: 16rem; overflow: auto; }
#training-list, #queue { display: grid; gap: .45rem; margin: 0; padding: 0; }
#queue li, .training-row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding: .55rem 0; }
.training-note { flex-basis: 100%; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#exercise-card { width: min(90vw, 34rem); max-height: 85dvh; border: 1px solid var(--border); border-radius: 12px; padding: 1rem; }
.feedback { position: fixed; z-index: 2; max-width: 48rem; bottom: calc(.7rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: calc(100% - 2rem); padding: .7rem .9rem; border-radius: .6rem; background: var(--ink); color: white; box-shadow: 0 .4rem 1.25rem #19392c32; }
[hidden] { display: none !important; }
@media(max-width: 350px) { .grid { grid-template-columns: 1fr; } }
