:root {
  --bg: #111418; --card: #1b2026; --card-2: #232a32; --text: #e6e8eb; --muted: #97a0aa;
  --accent: #f5b942; --accent-text: #1a1400; --ok: #4caf7d; --warn: #e0663c; --border: #2c343d;
  --radius: 14px; --tap: 52px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
#app { max-width: 560px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom)); }
.screen { display: flex; flex-direction: column; gap: 12px; }
.topbar { display: flex; align-items: center; gap: 8px; min-height: var(--tap); }
.topbar h1 { flex: 1; font-size: 1.15rem; margin: 0; text-align: center; }
h1, h2, h3 { margin: 0; }
h3 { font-size: 1rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.note { background: var(--card-2); border-left: 4px solid var(--accent); padding: 8px 12px; border-radius: 8px; color: var(--text); margin: 0; }
.error { color: var(--warn); margin: 0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; }
.card.warn { border-color: var(--warn); }
.cards { display: flex; flex-direction: column; gap: 10px; }
.card.day { min-height: 84px; justify-content: center; }
.card.day.done { border-color: var(--ok); }
.card.day.active { border-color: var(--accent); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.day-letter { font-size: 1.6rem; }
.badge { font-size: .8rem; padding: 2px 10px; border-radius: 999px; background: var(--card-2); color: var(--muted); }
.badge.done { background: var(--ok); color: #05210f; }
.badge.active { background: var(--accent); color: var(--accent-text); }
.label { margin-left: 8px; font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-weight: 700; }
.week-switch { display: flex; align-items: center; justify-content: space-between; }
.week-title { text-align: center; font-size: 1.2rem; }
.btn { min-height: var(--tap); padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card-2); color: var(--text); font-weight: 600; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.big { min-height: 64px; font-size: 1.25rem; width: 100%; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--warn); border-color: var(--warn); }
.btn.tiny { min-height: 44px; padding: 0 10px; font-size: .85rem; }
.btn.off { opacity: .5; }
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.status { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .85rem; margin-top: 12px; }
.settings { display: flex; gap: 6px; }
.login { min-height: 80vh; justify-content: center; align-items: stretch; }
.login h1 { text-align: center; font-size: 2rem; }
input.num, .login input { min-height: var(--tap); border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); padding: 0 12px; font-size: 1.4rem; text-align: center; width: 100%; }
ol.sets, ul { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
ol.sets li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--card-2); }
ol.sets li.warmup { color: var(--muted); background: transparent; }
ol.sets li.work, ol.sets li.test, ol.sets li.round { font-weight: 700; }
ol.sets li.current { outline: 2px solid var(--accent); }
ol.sets li.skipped { text-decoration: line-through; opacity: .6; }
ol.sets li .actual { margin-left: auto; color: var(--ok); }
ol.sets li button { all: unset; cursor: pointer; display: flex; flex: 1; gap: 10px; align-items: center; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.panel .target { font-size: 1.5rem; text-align: center; }
.stepper { display: grid; grid-template-columns: var(--tap) 1fr var(--tap); gap: 8px; align-items: center; }
.stepper .btn { padding: 0; font-size: 1.5rem; }
.stepper label { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; text-align: center; }
.clock { font-size: 4rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; line-height: 1; }
.clock.small { font-size: 1.4rem; color: var(--muted); }
.rest { align-items: center; padding: 28px 16px; }
.rest .next { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { min-width: 48px; min-height: 48px; border-radius: 999px; border: 1px solid var(--border); background: var(--card-2); font-weight: 700; }
.chip.selected { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.checklist .check { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-2); flex: none; font-size: 1.2rem; }
.checklist .check.on { background: var(--ok); color: #05210f; border-color: var(--ok); }
.checklist .text { flex: 1; }
.checklist .done { color: var(--ok); }
pre.summary { white-space: pre-wrap; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin: 0; font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.tabs { display: flex; gap: 8px; }
.tabs .btn { flex: 1; }
.tabs .btn.selected { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.list-item { display: flex; align-items: center; gap: 8px; }
.list-item .btn.main { flex: 1; text-align: left; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--card-2); border: 1px solid var(--border); color: var(--text); padding: 10px 16px; border-radius: 999px; font-size: .9rem; z-index: 10; }
.update-bar { position: fixed; top: 0; left: 0; right: 0; background: var(--accent); color: var(--accent-text); padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; z-index: 10; }
