[hidden] { display: none !important; }
:root {
  --bg: #07070c; --card: #13131b; --card2: #1b1b25; --line: #2a2a36;
  --text: #f3f3ef; --mute: #8b8b9b; --go: #19e39a; --link: #6b93ff; --warn: #ffcf3f; --bad: #ff5d6c;
  --cond: "Barlow Condensed", system-ui, sans-serif; --body: "Barlow", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 500 16px/1.4 var(--body); }
body { padding: calc(var(--safe-t) + 8px) 0 calc(84px + var(--safe-b)); min-height: 100vh; }
#app { max-width: 560px; margin: 0 auto; padding: 0 16px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--cond); font-weight: 800; letter-spacing: .01em; margin: 0; }
h1 { font-size: 40px; font-style: italic; text-transform: uppercase; line-height: 1; }
h2 { font-size: 26px; text-transform: uppercase; }
h3 { font-size: 21px; }
.mute { color: var(--mute); }
.small { font-size: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.sp { flex: 1; }
.top { display: flex; align-items: flex-end; justify-content: space-between; padding: 14px 0 18px; }
.top .date { font-family: var(--cond); font-weight: 700; font-size: 18px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }

.card { background: var(--card); border-radius: 18px; padding: 18px; margin-bottom: 14px; }
.day-letter { width: 46px; height: 46px; border-radius: 50%; background: var(--go); color: #04120c; display: grid; place-items: center; font: 800 24px var(--cond); flex: none; }
.day-letter.sm { width: 34px; height: 34px; font-size: 17px; }
.day-letter.ghost { background: var(--card2); color: var(--text); }
.coach { margin: 12px 0 4px; color: #cfcfd8; font-size: 15px; }
.exlist { list-style: none; margin: 14px 0 0; padding: 0; }
.exlist li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline; }
.exlist .slot { font: 700 15px var(--cond); color: var(--go); width: 24px; flex: none; }
.exlist .nm { flex: 1; font-weight: 600; }
.exlist .tg { font-family: var(--cond); font-weight: 700; font-size: 17px; color: var(--mute); white-space: nowrap; }
.big-btn { display: block; width: 100%; background: var(--link); color: #fff; font: 800 22px var(--cond); text-transform: uppercase; letter-spacing: .04em; padding: 16px; border-radius: 14px; margin-top: 16px; }
.big-btn.go { background: var(--go); color: #04120c; }
.ghost-btn { display: block; width: 100%; border: 1.5px solid var(--line); padding: 13px; border-radius: 14px; font-weight: 600; margin-top: 10px; }
.pick { display: flex; gap: 8px; margin-top: 4px; }
.pick button { flex: 1; background: var(--card); border-radius: 12px; padding: 10px 0; font: 700 18px var(--cond); }
.pick button.on { outline: 2px solid var(--go); }
.label { font: 700 13px var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--mute); margin: 22px 0 10px; }

/* workout */
.wk-head { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0 12px; margin: 0 -16px 10px; padding-left: 16px; padding-right: 16px; border-bottom: 2px solid var(--go); }
.wk-stats { display: flex; gap: 22px; align-items: baseline; font-family: var(--cond); }
.wk-stats b { font-size: 34px; font-weight: 800; font-style: italic; }
.wk-stats span { font-size: 15px; font-weight: 700; color: var(--mute); margin-left: 4px; }
.wk-stats .clock { margin-left: auto; color: var(--link); font-size: 26px; font-weight: 700; }
.ex { background: var(--card); border-radius: 18px; padding: 16px 14px 12px; margin-bottom: 14px; }
.ex-head { display: flex; gap: 12px; align-items: center; }
.ex-head h3 { flex: 1; line-height: 1.1; }
.ex-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 12px 0 10px; font-size: 14px; }
.ex-meta dt { color: var(--mute); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 700; padding-top: 2px; }
.ex-meta dd { margin: 0; font-family: var(--cond); font-weight: 700; font-size: 17px; color: var(--link); }
.ex-meta dd.up { color: var(--go); }
.ex-note { font-size: 14px; color: #cfcfd8; margin: 0 0 10px; }
.sets-head, .set { display: grid; grid-template-columns: 28px 1fr 1fr 52px; gap: 10px; align-items: center; }
.sets-head { font: 700 14px var(--cond); color: var(--mute); text-transform: uppercase; letter-spacing: .08em; text-align: center; margin-bottom: 6px; }
.set { margin-bottom: 8px; }
.set .n { font: 700 22px var(--cond); text-align: center; }
.set input { width: 100%; height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); text-align: center; font: 600 26px var(--cond); -moz-appearance: textfield; }
.set input:focus { outline: none; border-color: var(--link); }
.set input::placeholder { color: #4a4a5a; }
.chk { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.chk svg { width: 24px; height: 24px; stroke: var(--mute); stroke-width: 3; fill: none; }
.set.done .chk { background: var(--go); border-color: var(--go); }
.set.done .chk svg { stroke: #04120c; }
.set.done input { border-color: #1f3b30; color: #c8f5e2; }
.pr { font: 800 11px var(--cond); color: var(--warn); text-align: center; letter-spacing: .06em; grid-column: 2 / 4; margin-top: -4px; }
.setctl { display: flex; justify-content: center; gap: 26px; align-items: center; margin-top: 6px; font: 700 16px var(--cond); color: var(--mute); }
.round { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--link); color: var(--link); font-size: 24px; line-height: 1; display: grid; place-items: center; }
.ex-x { color: var(--mute); font-size: 13px; }

#timer { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + var(--safe-b)); z-index: 20; background: var(--link); color: #fff; border-radius: 30px; padding: 10px 18px; font: 800 24px var(--cond); display: flex; gap: 14px; align-items: center; box-shadow: 0 8px 30px #000a; }
#timer.zero { background: var(--go); color: #04120c; }
#timer button { font: 700 15px var(--cond); opacity: .9; }

nav#tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; background: #0c0c13f2; border-top: 1px solid var(--line); padding: 8px 0 calc(8px + var(--safe-b)); backdrop-filter: blur(10px); }
nav#tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 13px; color: var(--mute); font-weight: 600; }
nav#tabs button.on { color: var(--text); }
nav#tabs svg { width: 25px; height: 25px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* lists */
.search { width: 100%; height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); padding: 0 16px; font-size: 17px; }
.search:focus { outline: none; border-color: var(--link); }
.list { list-style: none; padding: 0; margin: 12px 0 0; }
.list li { border-bottom: 1px solid var(--line); }
.list li > button { width: 100%; text-align: left; padding: 14px 2px; display: flex; gap: 12px; align-items: center; }
.list .t { font-weight: 600; flex: 1; }
.list .r { font-family: var(--cond); font-weight: 700; color: var(--mute); font-size: 16px; white-space: nowrap; }
.hist-date { font: 800 19px var(--cond); text-transform: uppercase; width: 64px; flex: none; line-height: 1.05; }
.hist-date small { display: block; color: var(--mute); font-size: 13px; }
.hist-sub { display: block; color: var(--mute); font-size: 14px; font-weight: 500; margin-top: 2px; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.stat3 div { background: var(--card); border-radius: 14px; padding: 12px; }
.stat3 b { display: block; font: 800 28px var(--cond); font-style: italic; }
.stat3 span { font-size: 12px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.chart { width: 100%; height: 170px; display: block; }
.chart text { fill: var(--mute); font: 600 11px var(--body); }
.entry { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.entry .d { color: var(--mute); width: 92px; flex: none; font-size: 14px; padding-top: 2px; }
.entry .s { font-family: var(--cond); font-weight: 700; font-size: 17px; }
.back { color: var(--link); font-weight: 600; padding: 12px 0 4px; display: inline-block; }
.rules { margin: 0; padding-left: 18px; color: #d6d6de; }
.rules li { margin: 8px 0; }
.bw { display: flex; gap: 8px; }
.bw input { flex: 1; height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); padding: 0 14px; font: 600 22px var(--cond); }
.bw button { background: var(--card2); border-radius: 12px; padding: 0 18px; font-weight: 700; }
.sync { font-size: 12px; color: var(--mute); text-align: center; margin: 22px 0 0; }
.sync.off { color: var(--warn); }

#sheet { position: fixed; inset: 0; z-index: 30; background: #000b; display: flex; align-items: flex-end; }
#sheet .panel { background: var(--card); width: 100%; max-width: 560px; margin: 0 auto; border-radius: 22px 22px 0 0; padding: 16px 16px calc(16px + var(--safe-b)); height: 82vh; display: flex; flex-direction: column; }
#sheet .panel .list { overflow-y: auto; flex: 1; }
.lock { text-align: center; padding-top: 30vh; }
