:root {
  --navy: #10203a;
  --navy-2: #192c4a;
  --paper: #f6f3ed;
  --card: #fffdf9;
  --ink: #172033;
  --muted: #677082;
  --line: #dfddd7;
  --coral: #ed6a5a;
  --coral-dark: #c84e41;
  --blue: #2e6be6;
  --blue-soft: #e8efff;
  --mint: #d9eee7;
  --green: #25745c;
  --amber: #f4c46b;
  --shadow: 0 10px 30px rgba(16, 32, 58, 0.08);
  --radius: 22px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #08111f;
  --card: #111d2f;
  --ink: #f3f6fb;
  --muted: #a9b5c7;
  --line: #2a3850;
  --navy: #0b1729;
  --navy-2: #15243a;
  --blue: #79a5ff;
  --blue-soft: #1c3155;
  --mint: #163a30;
  --green: #79d8b7;
  --amber: #e7b654;
  --shadow: 0 12px 34px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { background: var(--paper); color-scheme: light; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button, input, textarea, select { touch-action: manipulation; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(46, 107, 230, .35);
  outline-offset: 2px;
}

.app-shell { max-width: 760px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 18px 12px;
  color: white; background: rgba(16, 32, 58, .96); backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--coral); color: #fff; font: 800 18px/1 Manrope, sans-serif; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-copy strong { display: block; font: 800 17px/1.05 Manrope, sans-serif; letter-spacing: -.02em; }
.brand-copy span { display: block; margin-top: 3px; color: #c8d2e2; font-size: 11px; }
.icon-btn { border: 0; background: rgba(255,255,255,.1); color: white; min-width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; }
.topbar-actions { display: flex; gap: 8px; }

.page { padding: 22px 18px 24px; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .14em; font: 800 11px/1 Manrope, sans-serif; color: var(--coral-dark); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font: 800 clamp(29px, 8vw, 42px)/1.04 Manrope, sans-serif; letter-spacing: -.045em; }
h2 { font: 800 22px/1.12 Manrope, sans-serif; letter-spacing: -.03em; }
h3 { font: 800 17px/1.2 Manrope, sans-serif; letter-spacing: -.02em; }
.lede { color: var(--muted); line-height: 1.55; margin-bottom: 22px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 28px 0 12px; }
.section-head h2 { margin: 0; }
.small-link { color: var(--blue); font-weight: 700; font-size: 13px; border: 0; background: transparent; padding: 6px 0; }

.hero-card { position: relative; overflow: hidden; background: var(--navy); color: white; border-radius: 28px; padding: 24px; box-shadow: var(--shadow); }
.hero-card::after { content: ""; position: absolute; width: 190px; height: 190px; right: -85px; top: -105px; border: 32px solid rgba(237,106,90,.2); border-radius: 50%; }
.hero-card .eyebrow { color: #ffaca1; }
.hero-card p { color: #cbd5e4; max-width: 34rem; margin-bottom: 20px; line-height: 1.5; }
.hero-meta { display: flex; gap: 18px; margin-top: 20px; }
.hero-stat { min-width: 0; }
.hero-stat strong { display: block; font: 800 20px/1 Manrope, sans-serif; }
.hero-stat span { color: #aebcd0; font-size: 11px; }

.day-list { display: grid; gap: 12px; }
.day-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 4px 18px rgba(16,32,58,.04); }
.day-card.locked { background: #efede8; color: #737984; }
.day-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.day-index { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; background: var(--blue-soft); color: var(--blue); font: 800 13px/1 Manrope, sans-serif; }
.day-card.locked .day-index { background: #ddd9d2; color: #777; }
.day-card h3 { margin: 12px 0 4px; font-size: 20px; }
.day-card p { color: var(--muted); font-size: 13px; margin-bottom: 16px; line-height: 1.45; }
.day-card .last-session { display: flex; gap: 14px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 9px; background: #eeeae2; color: var(--muted); font-size: 11px; font-weight: 700; }
.pill.ready { background: var(--mint); color: var(--green); }
.pill.live { background: #ffe3df; color: var(--coral-dark); }

.btn { min-height: 46px; border: 0; border-radius: 14px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 14px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--coral); color: white; box-shadow: 0 7px 18px rgba(237,106,90,.24); }
.btn-primary:hover { background: var(--coral-dark); }
.btn-secondary { background: var(--blue-soft); color: var(--blue); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: #ffe6e2; color: #b83f33; }
.btn:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }
.btn-full { width: 100%; }

.schedule-strip { display: grid; grid-template-columns: repeat(7, minmax(76px, 1fr)); gap: 8px; overflow-x: auto; padding: 2px 1px 7px; scrollbar-width: thin; }
.schedule-day { min-width: 76px; min-height: 78px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.schedule-day span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.schedule-day strong { display: block; margin-top: 9px; font-size: 11px; line-height: 1.25; }
.schedule-day.today { box-shadow: inset 0 0 0 2px var(--blue); }
.schedule-day.rest { background: #e9e6df; }

.bottom-nav { position: fixed; z-index: 25; left: 50%; bottom: 0; transform: translateX(-50%); width: min(760px, 100%); display: grid; grid-template-columns: repeat(3,1fr); padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,253,249,.96); border-top: 1px solid var(--line); backdrop-filter: blur(18px); }
.nav-btn { min-height: 52px; border: 0; background: transparent; border-radius: 16px; color: var(--muted); font-size: 11px; font-weight: 700; }
.nav-btn span { display: block; font-size: 20px; line-height: 1.1; margin-bottom: 3px; }
.nav-btn.active { color: var(--blue); background: var(--blue-soft); }

.workout-head { background: var(--navy); color: #fff; margin: -22px -18px 18px; padding: 22px 18px 20px; }
.workout-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.back-btn { color: #d4ddec; border: 0; background: transparent; padding: 0 0 14px; font-weight: 700; }
.danger-link { color: #ff9d91; }
.workout-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.workout-head h1 { font-size: 30px; margin: 0; }
.workout-head p { color: #b6c3d7; margin: 5px 0 0; font-size: 12px; }
.progress-ring { flex: 0 0 auto; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--coral) var(--progress), rgba(255,255,255,.13) 0); position: relative; }
.progress-ring::before { content: ""; width: 48px; height: 48px; border-radius: 50%; background: var(--navy); position: absolute; }
.progress-ring strong { position: relative; font: 800 13px/1 Manrope, sans-serif; }

.warmup-card { display: grid; grid-template-columns: auto 1fr; gap: 13px; align-items: start; margin-bottom: 14px; padding: 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); box-shadow: 0 4px 18px rgba(16,32,58,.04); }
.warmup-image { grid-column: 1 / -1; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 15px; border: 1px solid var(--line); background: #fff8f1; }
.warmup-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; color: white; background: var(--blue); font: 800 18px/1 Manrope, sans-serif; }
.warmup-card.done .warmup-icon { background: var(--green); color: #10251f; }
.warmup-copy span { color: var(--coral-dark); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.warmup-copy h2 { margin: 3px 0 5px; font-size: 18px; }
.warmup-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.warmup-card > .btn { grid-column: 1 / -1; }

.exercise-list { display: grid; gap: 14px; }
.exercise-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: 0 5px 20px rgba(16,32,58,.05); }
.exercise-visual { aspect-ratio: 447/358; background-image: url("assets/exercise-sheet.png"); background-size: 200% auto; background-repeat: no-repeat; background-color: #faf7f1; border-bottom: 1px solid var(--line); }
.exercise-body { padding: 17px; }
.exercise-number { color: var(--coral-dark); font: 800 11px/1 Manrope, sans-serif; letter-spacing: .11em; text-transform: uppercase; }
.exercise-title-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-top: 6px; }
.exercise-title-row h2 { margin: 0; font-size: 21px; }
.edit-target { flex: 0 0 auto; color: var(--blue); background: var(--blue-soft); border: 0; border-radius: 10px; min-height: 34px; padding: 0 10px; font-size: 12px; font-weight: 800; }
.target-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 7px; margin: 15px 0; }
.target { min-width: 0; padding: 9px 7px; border-radius: 11px; background: #f1eee8; }
.target span { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 8px; font-weight: 800; }
.target strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; font-size: 11px; }
.previous-strip { padding: 11px 12px; background: #eef3ff; border-radius: 12px; color: #38537f; font-size: 12px; line-height: 1.4; }
.previous-strip strong { color: var(--blue); }
details.technique { margin-top: 13px; }
details.technique summary { cursor: pointer; color: var(--ink); font-weight: 800; font-size: 13px; list-style: none; }
details.technique summary::-webkit-details-marker { display: none; }
details.technique summary::after { content: "+"; float: right; color: var(--blue); }
details.technique[open] summary::after { content: "−"; }
.technique-copy { color: var(--muted); font-size: 13px; line-height: 1.55; padding: 9px 0 2px; }
.uncertainty { border-left: 3px solid var(--amber); padding-left: 10px; margin-top: 9px; color: #735825; font-size: 12px; }

.set-table { margin-top: 16px; }
.set-header, .set-row { display: grid; grid-template-columns: 27px 1fr 1fr .85fr 42px; gap: 7px; align-items: center; }
.set-header { padding: 0 2px 6px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; text-align: center; }
.set-row { padding: 7px 0; border-top: 1px solid #eeeae3; }
.set-num { width: 27px; height: 27px; display: grid; place-items: center; background: #f0ede7; border-radius: 9px; font-weight: 800; font-size: 11px; }
.set-row input, .settings-grid input, .settings-grid textarea, .finish-form textarea, .finish-form select { width: 100%; min-width: 0; border: 1px solid #d9d6cf; border-radius: 11px; background: white; color: var(--ink); min-height: 42px; padding: 7px 8px; text-align: center; font-size: 16px; }
.set-row input::placeholder { color: #b8b5af; font-size: 12px; }
.set-done { width: 42px; height: 42px; border-radius: 12px; border: 1px solid #d6d3cc; background: white; color: #aaa; font-size: 18px; }
.set-done.completed { background: var(--green); border-color: var(--green); color: white; }
.suggestion { margin-top: 12px; padding: 12px; border-radius: 13px; background: var(--mint); color: #225f4d; font-size: 12px; line-height: 1.45; }
.suggestion strong { display: block; margin-bottom: 2px; }
.session-notes { width: 100%; min-height: 68px; resize: vertical; margin-top: 12px; border: 1px solid #d9d6cf; background: #fff; border-radius: 13px; padding: 10px 12px; color: var(--ink); }
.finish-bar { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 15; margin: 18px 0 0; padding: 10px; border-radius: 18px; background: rgba(255,253,249,.94); border: 1px solid var(--line); backdrop-filter: blur(14px); box-shadow: var(--shadow); }

.timer { position: fixed; z-index: 40; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(430px, calc(100% - 24px)); background: var(--navy); color: white; border-radius: 20px; padding: 13px 14px; box-shadow: 0 16px 44px rgba(16,32,58,.32); }
.timer.workout-timer { bottom: calc(84px + env(safe-area-inset-bottom)); }
.timer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.timer-label { min-width: 0; }
.timer-label span { display: block; color: #9fb0c8; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.timer-label strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.timer-clock { font: 800 29px/1 Manrope, sans-serif; font-variant-numeric: tabular-nums; }
.timer-actions { display: flex; gap: 6px; }
.timer-actions button { min-width: 43px; height: 36px; padding: 0 9px; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: white; font-size: 12px; font-weight: 800; }

.history-list { display: grid; gap: 12px; }
.heatmap-head { margin-top: 0; }
.heatmap-card { margin-bottom: 18px; padding: 14px; border-radius: 19px; border: 1px solid var(--line); background: var(--card); }
.heatmap-axis { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 7px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.heatmap-scroll { overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
.heatmap { display: grid; grid-template-rows: repeat(7, 11px); grid-auto-flow: column; grid-auto-columns: 11px; gap: 3px; width: max-content; }
.heat-cell { display: inline-block; width: 11px; height: 11px; border-radius: 2px; background: #e6e4df; }
.heat-cell.trained { background: #35a968; }
.heat-cell.rest { background: transparent; box-shadow: inset 0 0 0 1px #8d96a5; }
.heat-cell.future { opacity: .45; }
.heat-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 9px; color: var(--muted); font-size: 10px; }
.heat-legend span { display: inline-flex; align-items: center; gap: 5px; }
.heat-legend .heat-cell { flex: 0 0 auto; }
.history-card { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 16px; color: var(--ink); box-shadow: 0 3px 14px rgba(16,32,58,.04); }
.history-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.history-card h3 { margin: 0 0 3px; }
.history-card p { color: var(--muted); margin: 0; font-size: 12px; }
.history-stats { display: flex; gap: 18px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.history-stats strong { font-size: 13px; }
.history-stats span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.empty { padding: 36px 22px; text-align: center; background: var(--card); border: 1px dashed #d0ccc4; border-radius: 20px; color: var(--muted); }
.empty-icon { font-size: 34px; margin-bottom: 8px; }

.settings-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 17px; margin-bottom: 12px; }
.settings-card h3 { margin-bottom: 6px; }
.settings-card p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.settings-actions { display: grid; gap: 9px; }
.data-note { padding: 13px; border-radius: 13px; background: #fff5d9; color: #69511e; font-size: 12px; line-height: 1.45; }

.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; align-items: end; background: rgba(10,18,31,.58); padding-top: env(safe-area-inset-top); }
.modal { width: min(600px, 100%); max-height: 92vh; overflow: auto; margin: 0 auto; background: var(--card); border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -18px 60px rgba(10,18,31,.2); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.modal-head h2 { margin-bottom: 5px; }
.close-btn { width: 38px; height: 38px; border: 0; border-radius: 12px; background: #efede8; color: var(--ink); font-size: 19px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.settings-grid label, .finish-form label { display: block; color: var(--muted); font-size: 11px; font-weight: 800; }
.settings-grid input, .settings-grid textarea { margin-top: 5px; text-align: left; }
.settings-grid .wide { grid-column: 1 / -1; }
.settings-grid textarea { min-height: 76px; resize: vertical; }
.schedule-form { display: grid; gap: 9px; margin: 18px 0; }
.schedule-form label { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 800; }
.schedule-form select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); color: var(--ink); padding: 0 10px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 9px; }
.history-modal-actions { grid-template-columns: 1.6fr 1fr; }
.history-delete { margin-top: 9px; }
.finish-form { display: grid; gap: 13px; margin: 18px 0; }
.finish-form textarea, .finish-form select { margin-top: 6px; text-align: left; min-height: 48px; }
.finish-form textarea { min-height: 86px; resize: vertical; }
.history-detail { display: grid; gap: 11px; margin: 18px 0; }
.detail-exercise { padding: 13px; border-radius: 14px; background: #f1eee8; }
.detail-exercise h3 { margin-bottom: 6px; font-size: 14px; }
.detail-exercise p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.history-edit-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 18px 0; }
.history-edit-meta label, .history-exercise-note { display: block; color: var(--muted); font-size: 10px; font-weight: 800; }
.history-edit-meta .wide { grid-column: 1 / -1; }
.history-edit-meta input, .history-edit-meta select, .history-edit-meta textarea, .history-edit-set-row input, .history-exercise-note textarea { width: 100%; min-width: 0; margin-top: 5px; border: 1px solid #d9d6cf; border-radius: 10px; background: white; color: var(--ink); min-height: 42px; padding: 8px; font-size: 16px; }
.history-edit-meta textarea, .history-exercise-note textarea { min-height: 74px; resize: vertical; }
.history-edit-list { display: grid; gap: 12px; margin-bottom: 18px; }
.history-edit-exercise { padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: #f6f3ed; }
.history-edit-exercise h3 { margin-bottom: 12px; }
.history-edit-set-head, .history-edit-set-row { display: grid; grid-template-columns: 27px 1fr 1fr .8fr 42px; gap: 6px; align-items: center; text-align: center; }
.history-edit-set-head { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.history-edit-set-row { padding: 6px 0; border-top: 1px solid var(--line); }
.history-edit-set-row > strong { font-size: 11px; }
.history-edit-set-row input { margin-top: 0; text-align: center; }
.history-done { position: relative; display: grid; place-items: center; width: 42px; height: 42px; }
.history-done input { position: absolute; opacity: 0; pointer-events: none; }
.history-done span { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #d6d3cc; border-radius: 11px; background: white; color: #aaa; }
.history-done input:checked + span { border-color: var(--green); background: var(--green); color: white; }
.history-exercise-note { margin-top: 9px; }
.history-save-actions { position: sticky; bottom: 0; padding-top: 10px; background: var(--card); }

.toast { position: fixed; z-index: 150; left: 50%; top: calc(18px + env(safe-area-inset-top)); transform: translate(-50%, -18px); max-width: calc(100% - 28px); padding: 11px 14px; border-radius: 12px; background: var(--navy); color: white; box-shadow: var(--shadow); font-size: 13px; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.offline-badge { display: none; position: fixed; z-index: 60; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); background: #805f19; color: white; border-radius: 99px; padding: 5px 9px; font-size: 10px; font-weight: 800; }
body.offline .offline-badge { display: block; }

html[data-theme="dark"] .day-card.locked { background: #0e1827; color: #748197; }
html[data-theme="dark"] .day-card.locked .day-index { background: #253149; color: #9ba7b9; }
html[data-theme="dark"] .schedule-day.rest,
html[data-theme="dark"] .target,
html[data-theme="dark"] .set-num,
html[data-theme="dark"] .detail-exercise { background: #182539; }
html[data-theme="dark"] .pill { background: #1a273a; }
html[data-theme="dark"] .pill.ready { background: var(--mint); color: var(--green); }
html[data-theme="dark"] .bottom-nav,
html[data-theme="dark"] .finish-bar { background: rgba(17,29,47,.96); }
html[data-theme="dark"] .set-row { border-top-color: #26354b; }
html[data-theme="dark"] .set-row input,
html[data-theme="dark"] .settings-grid input,
html[data-theme="dark"] .settings-grid textarea,
html[data-theme="dark"] .finish-form textarea,
html[data-theme="dark"] .finish-form select,
html[data-theme="dark"] .session-notes,
html[data-theme="dark"] .history-edit-meta input,
html[data-theme="dark"] .history-edit-meta select,
html[data-theme="dark"] .history-edit-meta textarea,
html[data-theme="dark"] .history-edit-set-row input,
html[data-theme="dark"] .history-exercise-note textarea,
html[data-theme="dark"] .history-done span,
html[data-theme="dark"] .set-done { background: #0c1728; color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .history-edit-exercise { background: #111d2e; }
html[data-theme="dark"] .previous-strip { background: #182c4c; color: #b6c9eb; }
html[data-theme="dark"] .uncertainty { color: #ecd594; }
html[data-theme="dark"] .data-note { background: #382f18; color: #f0d78e; }
html[data-theme="dark"] .close-btn { background: #1d2a3d; }
html[data-theme="dark"] .heat-cell { background: #202c3e; }
html[data-theme="dark"] .heat-cell.trained { background: #43bd79; }

@media (min-width: 620px) {
  .page { padding-inline: 26px; }
  .topbar { padding-inline: 26px; }
  .day-list { grid-template-columns: 1fr 1fr; }
  .day-card:last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
