:root {
  --bg: #0b0b0b; --fg: #ffffff; --muted: #a8a8a2; --line: #2a2a27; --btn: #1f1f1d;
  --card: #1f1f1d; --yellow: #f7b408; --ink: #0b0b0b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); font-family: "Poppins", sans-serif; }
body { min-height: 100dvh; }
::selection { background: var(--yellow); color: var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--fg); background: var(--btn); border: 0; border-radius: 10px; padding: 10px 12px; width: 100%; }
textarea { resize: vertical; }
.num { font-variant-numeric: tabular-nums; }
.hx { font-family: "Montserrat", sans-serif; font-weight: 900; font-style: italic; text-transform: uppercase; line-height: .88; letter-spacing: -.035em; }

#app { display: flex; flex-direction: column; gap: 12px; min-height: 100dvh; padding: calc(16px + env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.title { font-size: 56px; }
.title.sm { font-size: 40px; }
.meta { font-size: 14px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.note { font-size: 14px; color: var(--muted); }
.warn { font-size: 14px; background: var(--yellow); color: var(--ink); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.sub-t { font-size: 26px; margin-top: 8px; }

.pick { flex: 1; display: grid; grid-template-rows: 1fr 1fr; gap: 10px; min-height: 420px; }
.pick button { border-radius: 18px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.pick .gym { background: var(--yellow); color: var(--ink); }
.pick .run { background: var(--fg); color: var(--ink); }
.pick .word { font-size: 96px; }
.pick .line { display: flex; justify-content: space-between; align-items: end; font-size: 15px; font-weight: 500; }
.arrow { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--yellow); }
.weight { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 15px; color: var(--muted); font-weight: 500; }
.weight b { font-size: 22px; font-weight: 700; color: var(--fg); }
.warn + .weight { margin-top: 8px; }

.ex { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.ex .w { font-weight: 700; white-space: nowrap; }
.mus { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.now .mus { margin-top: -8px; }
.now { background: var(--card); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.now .name { font-size: 30px; }
.now .kg { font-size: 60px; color: var(--yellow); }
.now .kg small { font-size: 26px; }
.now .goal { font-size: 13px; color: var(--muted); text-align: right; }
.advies { gap: 10px; }
.advies .day { font-size: 16px; line-height: 1; }
.advies .name { font-size: 34px; }
.advies .kg { font-size: 88px; }
.advies .kg small { font-size: 32px; }
.advies input { background: var(--bg); }
.facts { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 17px; font-weight: 500; color: var(--muted); }
.facts b { font-size: 26px; font-weight: 700; color: var(--fg); }
.trains { font-size: 17px; font-weight: 600; }
.stats { display: flex; flex-direction: column; }
.stat { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 500; color: var(--muted); }
.stat b { font-size: 20px; font-weight: 700; color: var(--fg); white-space: pre; text-align: right; }
.prog { height: 10px; margin: 10px 0 4px; background: var(--card); border-radius: 5px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--yellow); border-radius: 5px; }
.stat:has(+ .prog) { border-bottom: 0; padding-bottom: 0; }
.stats .warn { margin-top: 10px; }
.tag { background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 13px; padding: 4px 8px; border-radius: 6px; }
.link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; margin: 0 -8px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
#app > .link { align-self: flex-start; }
.bar { position: relative; height: 48px; display: flex; justify-content: space-between; align-items: center; }
.bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; background: #8e8e88; border-radius: 2px; }
.bar .s { position: relative; display: flex; align-items: center; gap: 3px; }
.bar .s.r { flex-direction: row-reverse; }
.bar i { display: block; border-radius: 2px; background: var(--yellow); width: 10px; }
.bar i.sm { background: #b9b9b3; width: 6px; }
.bar .c { width: 5px; height: 16px; background: #8e8e88; border-radius: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 9px 14px; border-radius: 999px; background: var(--btn); font-size: 14px; font-weight: 500; color: var(--muted); }
.chips button.on { background: var(--yellow); color: var(--ink); font-weight: 700; }

.big-btn { width: 100%; border-radius: 14px; background: var(--btn); text-align: center; font-size: 18px; font-weight: 700; padding: 14px 0; }
.big-btn.yellow { background: var(--yellow); color: var(--ink); font-size: 24px; padding: 16px 0 14px; }

.plate { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plate .kg { font-size: 26px; }
.cnt { display: flex; align-items: center; gap: 12px; }
.cnt button { width: 36px; height: 36px; border-radius: 10px; background: var(--btn); text-align: center; font-size: 20px; font-weight: 700; }
.cnt b { font-size: 28px; min-width: 22px; text-align: center; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form label, .field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.form .full { grid-column: 1 / -1; }


.ex .nm { display: block; }
.ex .r { text-align: right; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tile { background: var(--card); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile b { font-size: 24px; font-weight: 700; overflow-wrap: anywhere; }
.tile span { font-size: 12px; color: var(--muted); font-weight: 500; }
.ct { font-size: 14px; font-weight: 600; margin-top: 4px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 500 11px "Poppins", sans-serif; fill: var(--muted); }
.chart .val { fill: var(--fg); font-weight: 700; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .mark { fill: var(--yellow); }
.chart .line { fill: none; stroke: var(--yellow); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--yellow); stroke: var(--bg); stroke-width: 2; }
.hbars { display: grid; grid-template-columns: auto 1fr auto; gap: 10px 10px; align-items: center; font-size: 13px; font-weight: 500; }
.hbars .track { position: relative; height: 12px; background: var(--card); border-radius: 0 4px 4px 0; }
.hbars i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--m, var(--yellow)); border-radius: 0 4px 4px 0; }
.hbars b { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--fg); }
.hbars .num { color: var(--muted); text-align: right; }

.m-quads { --m: #5eb0ff; } .m-hamstrings { --m: #b69cff; } .m-chest { --m: #ff7d6b; }
.m-back { --m: #3ecf8e; } .m-shoulders { --m: #ff8fd0; } .m-core { --m: #4fd6e0; }
.m-arms { --m: #c3e86b; }
.chip { align-self: flex-start; background: var(--m, var(--muted)); color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1; padding: 5px 10px; border-radius: 999px; }
.cards { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--card); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 12px; transition: background-color .2s ease-out; }
.card-top { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.card-main { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; min-height: 44px; }
.ex-name { font-size: 20px; font-weight: 700; line-height: 1.2; }
.target { font-size: 26px; font-weight: 700; line-height: 1.1; }
.card-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tick { width: 56px; height: 56px; border-radius: 14px; border: 2px solid #8e8e88; display: grid; place-items: center; color: transparent; }
.tick[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.help { width: 44px; height: 44px; border-radius: 50%; background: var(--bg); text-align: center; font-size: 18px; font-weight: 700; }
.card-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-bottom .link { margin-left: auto; margin-right: 0; }
.kg-in { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; }
.kg-in input { width: 150px; min-height: 48px; background: var(--bg); font-size: 20px; font-weight: 700; }
.bw { font-size: 16px; font-weight: 500; color: var(--muted); }
.card.done { background: #141412; }
.card.done .ex-name, .card.done .target { color: var(--muted); }
.more { display: grid; gap: 10px; }
.reps { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; }
.reps label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; color: var(--muted); }
.reps input { min-height: 48px; background: var(--bg); text-align: center; font-size: 20px; font-weight: 700; }
.how { display: grid; gap: 10px; padding-left: 22px; font-size: 17px; line-height: 1.4; }
.how li::marker { color: var(--yellow); font-weight: 700; }
.group { display: flex; flex-direction: column; gap: 6px; }
.group + .group { margin-top: 8px; }
.opt { min-height: 48px; padding: 12px 14px; border-radius: 12px; background: var(--bg); font-size: 17px; font-weight: 600; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs button { text-align: center; padding: 14px 0; font-family: "Montserrat", sans-serif; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 15px; color: var(--muted); }
.tabs button.on { color: var(--yellow); }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 85dvh; overflow-y: auto; overscroll-behavior: contain; max-width: 480px; margin: 0 auto; background: var(--card); border-radius: 22px 22px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.sheet .sub-t { margin-top: 0; }
.sheet .chips button { padding: 12px 14px; font-size: 16px; background: var(--bg); }
.sheet .chips button.on { background: var(--yellow); }
.sheet .big-btn:not(.yellow) { background: var(--bg); }
.sheet .big-btn { font-size: 24px; padding: 18px 0 16px; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); background: var(--fg); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 14px; }

.pr-now { font-size: 14px; font-weight: 600; color: var(--muted); }
.target .pr-now { margin-left: 12px; vertical-align: 3px; }
div.card-main { min-height: 46px; }
.pr-badge { display: inline-block; background: var(--yellow); color: var(--ink); font: italic 900 15px/1 "Montserrat", sans-serif; padding: 6px 9px; border-radius: 6px; }
.pr-badge[hidden] { display: none; }
.pop { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 40% { transform: scale(1.4); } }
.toast.pr { background: var(--yellow); font-size: 16px; font-weight: 700; animation: nudge .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes nudge { 40% { transform: scale(1.05); } }
.burst { position: absolute; left: 50%; top: 0; }
.burst i { position: absolute; width: 11px; height: 11px; margin: -5.5px; border-radius: 50%; background: var(--yellow); animation: fly .8s cubic-bezier(.2, .7, .3, 1) forwards; }
.burst i:nth-child(1) { --a: -80deg; } .burst i:nth-child(2) { --a: -58deg; } .burst i:nth-child(3) { --a: -35deg; } .burst i:nth-child(4) { --a: -12deg; }
.burst i:nth-child(5) { --a: 12deg; } .burst i:nth-child(6) { --a: 35deg; } .burst i:nth-child(7) { --a: 58deg; } .burst i:nth-child(8) { --a: 80deg; }
@keyframes fly { from { transform: rotate(var(--a)); } 70% { opacity: 1; } to { transform: rotate(var(--a)) translateY(-64px) scale(.5); opacity: 0; } }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; transition: none !important; animation: none !important; } .burst { display: none; } }
