@font-face{font-family:Lato;src:url('brand/Lato-Light.ttf') format('truetype');font-weight:300;font-display:swap}
@font-face{font-family:'Open Sans';src:url('brand/OpenSans-Light.ttf') format('truetype');font-weight:300;font-display:swap}
@font-face{font-family:'Open Sans';src:url('brand/OpenSans-Bold.ttf') format('truetype');font-weight:700;font-display:swap}
:root{color-scheme:dark;--accent:#ffdd00;--ink:#f3f3f3;--muted:#a0a0a0;--line:#282828;--surface:#101010;--radius:16px;--control:48px;--gutter:24px;--gap:12px;font-family:'Open Sans',system-ui,sans-serif;font-weight:300;background:#000;color:var(--ink)}
*{box-sizing:border-box}body{margin:0;min-width:280px}button,input{font:inherit}button{cursor:pointer}button,input,dialog,.training-options,.sport-tabs,.period-tabs,.rank-row.mine{border-radius:var(--radius)}[hidden]{display:none!important}
body[data-exercise=planks],#rank-dialog[data-sport=planks]{--accent:#40b877}body[data-exercise=hangs],#rank-dialog[data-sport=hangs]{--accent:#ff7f3f}body[data-exercise=squats],#rank-dialog[data-sport=squats]{--accent:#3f5bff}body[data-exercise=situps],#rank-dialog[data-sport=situps]{--accent:#cc63c7}body[data-exercise=pullups],#rank-dialog[data-sport=pullups]{--accent:#b7c151}#rank-dialog[data-sport=pushups]{--accent:#ffdd00}
main{position:relative;z-index:1;width:100%;max-width:408px;min-width:0;min-height:100svh;margin:auto;padding:max(20px,env(safe-area-inset-top)) var(--gutter) max(20px,env(safe-area-inset-bottom));display:flex;flex-direction:column}
header{display:flex;align-items:center;justify-content:space-between;gap:12px}.brand-logo{display:block;width:40px;height:40px;flex-shrink:0;background:var(--accent);mask:url('brand/teamplayer.png') center/contain no-repeat;-webkit-mask:url('brand/teamplayer.png') center/contain no-repeat}.header-tools{display:flex;align-items:center;gap:8px;min-width:0}
button{min-height:var(--control);padding:12px 16px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:14px;font-weight:700;line-height:1.3;transition:background .15s,border-color .15s,opacity .15s}
button:hover:enabled{background:#1a1a1a;border-color:#444}button:active:enabled{opacity:.8}button:disabled{opacity:.35;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:#080808}.primary:hover:enabled{background:var(--accent);filter:brightness(1.08)}button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.ranking-button{width:44px;height:44px;min-height:44px;min-width:44px;padding:10px;display:grid;place-items:center;color:var(--accent);background:transparent;flex-shrink:0}.ranking-button svg{width:22px;height:22px;display:block;flex-shrink:0}.mode-button{height:44px;min-height:44px;padding:0 12px;display:flex;align-items:center;gap:8px;min-width:0;white-space:nowrap;font-weight:300;font-size:13px;color:var(--accent);background:transparent}.mode-button svg{width:14px;height:14px;flex-shrink:0}
.profile-line{display:flex;justify-content:space-between;align-items:center;margin-top:16px;color:var(--muted);font-size:12px;letter-spacing:.02em}#timer{font-variant-numeric:tabular-nums}
.training{flex:1;display:flex;flex-direction:column;justify-content:center;padding:20px 0 0}.training-options,.sport-tabs,.period-tabs{display:grid;gap:4px;padding:4px;background:var(--surface);border:1px solid var(--line)}.training-options{align-self:center;grid-template-columns:1fr 1fr;width:208px;margin:0 0 16px}.training-options button,.sport-tabs button,.period-tabs button{min-height:40px;padding:8px;border:0;background:transparent;color:var(--muted);font-size:12px;font-weight:300}.training-options .selected,.sport-tabs .selected,.period-tabs .selected{background:var(--accent);color:#080808;font-weight:700}.training-options button:disabled{opacity:.65}
.number{position:relative;align-self:center;width:min(100%,284px);aspect-ratio:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;margin:0 auto}.count-ring{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.count-ring circle{fill:none;stroke-width:1.25}.ring-track{stroke:var(--accent);opacity:.2}.ring-fill{stroke:var(--accent);stroke-dasharray:100;stroke-dashoffset:100;transform:rotate(-90deg);transform-origin:50% 50%;stroke-linecap:round;transition:stroke-dashoffset .2s}.count-ring.free .ring-fill{opacity:0}.count-ring.over-target .ring-track,.count-ring.over-target .ring-fill{stroke:#ff4d4d}
#count{position:relative;display:block;color:var(--accent);font:300 clamp(96px,28vw,128px)/1 Lato,sans-serif;font-variant-numeric:tabular-nums;letter-spacing:-.04em;transform:translateY(-12px)}body[data-exercise=planks] #count,body[data-exercise=hangs] #count,body[data-exercise=wallsits] #count{font-size:clamp(60px,18vw,76px)}.detection-face,.hang-symbol,.sensor-symbol{position:absolute;left:50%;top:65%;transform:translateX(-50%);width:26px;height:26px;pointer-events:none;color:#707070}.detection-face svg,.hang-symbol svg,.sensor-symbol svg{display:block;width:100%;height:100%}.detection-face.detected,.sensor-symbol.detected,.hang-symbol{color:var(--accent)}.best-target{position:absolute;left:0;right:0;top:79%;color:var(--accent);text-align:center;font-size:13px;line-height:1.4;letter-spacing:.04em}
#status{align-self:center;display:flex;align-items:center;justify-content:center;text-align:center;color:var(--muted);font-size:13px;line-height:1.5;min-height:44px;width:100%;max-width:330px;margin:16px 0 20px}.goal-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;font-size:13px;color:var(--muted)}#pushup-goal{display:flex;align-items:center;gap:12px}input:not([type=checkbox]){min-height:var(--control);padding:12px 14px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:16px;line-height:1.3;min-width:0}#goal{width:68px;text-align:center;padding-inline:8px}.time-goal{display:flex;gap:8px;align-items:center}.time-goal label{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:10px}.time-goal input{width:52px;text-align:center;padding-inline:4px}.time-goal>span{font-size:13px}#progress-text{font-size:13px;color:var(--accent);font-variant-numeric:tabular-nums;white-space:nowrap}
progress{appearance:none;display:block;width:100%;height:4px;border:0;background:#222;border-radius:var(--radius);overflow:hidden;margin:16px 0 20px}progress::-webkit-progress-bar{background:#222}progress::-webkit-progress-value{background:var(--accent)}progress::-moz-progress-bar{background:var(--accent)}.actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}.actions button{padding-inline:8px}.sync-state{font-size:11px;line-height:1.5;text-align:center;color:var(--muted);margin:12px 0 0;min-height:16px}
#video{position:fixed;inset:0;width:100%;height:100%;filter:brightness(0);pointer-events:none;z-index:0;object-fit:cover}
dialog{background:#090909;color:var(--ink);border:1px solid var(--line);padding:0;width:min(calc(100vw - 24px),400px);max-height:calc(100svh - 32px);overflow:auto;box-shadow:0 24px 80px #0009}dialog::backdrop{background:#000c;backdrop-filter:blur(8px)}.dialog-content{padding:24px}.dialog-head{display:flex;flex-direction:row-reverse;align-items:center;justify-content:space-between;gap:16px}.dialog-head button{width:44px;height:44px;min-height:44px;padding:0;display:grid;place-items:center;color:var(--accent);background:transparent;flex-shrink:0}.dialog-head svg{width:22px;height:22px}h2{font:300 30px/1.2 Lato,sans-serif;margin:0;letter-spacing:-.015em}.rank-title{margin-top:24px;max-width:100%}h3{font-size:15px;font-weight:700;margin:0 0 12px}
.mode-choices{display:grid;gap:8px;margin-top:24px}.exercise-choice{text-align:left;padding:12px 16px;background:var(--surface);min-height:68px}.exercise-choice span{display:block;font:300 21px/1.2 Lato,sans-serif;color:#ffdd00}.exercise-choice small{display:block;font-weight:300;font-size:11px;color:var(--muted);margin-top:6px;line-height:1.4}.exercise-choice.selected{border-color:#ffdd00}.plank-choice span{color:#40b877}.plank-choice.selected{border-color:#40b877}.hang-choice span{color:#ff7f3f}.hang-choice.selected{border-color:#ff7f3f}.squat-choice span{color:#3f5bff}.squat-choice.selected{border-color:#3f5bff}.situp-choice span{color:#cc63c7}.situp-choice.selected{border-color:#cc63c7}.pullup-choice span{color:#b7c151}.pullup-choice.selected{border-color:#b7c151}
.sport-tabs{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:24px}.sport-tabs button{white-space:nowrap;font-size:11px;padding-inline:4px}.period-tabs{grid-template-columns:repeat(4,minmax(0,1fr));margin:12px 0 20px}.period-tabs button{padding-inline:4px}.rank-range{font-size:12px;color:var(--muted);margin:0 0 20px}.rank-columns{display:flex;justify-content:space-between;color:#777;font-size:11px;margin-bottom:8px}.rank-list{list-style:none;margin:0;padding:0}.rank-row{display:grid;grid-template-columns:28px 1fr auto;gap:12px;align-items:center;padding:14px 12px;border-bottom:1px solid #222;font-size:14px}.rank-row.mine{background:color-mix(in srgb,var(--accent) 8%,transparent);border-color:transparent}.rank-place{font-size:12px;color:#888}.rank-row.leader .rank-place,.rank-row.leader strong,.rank-row.mine .rank-name{color:var(--accent)}.rank-name{overflow-wrap:anywhere}.rank-row strong{font:300 26px/1 Lato,sans-serif;font-variant-numeric:tabular-nums}.rank-note{font-size:12px;line-height:1.5;color:var(--muted);margin:20px 0 0}.rank-note:empty{display:none}
.welcome h2{margin:28px 0 16px}.welcome>p{font-size:14px;color:var(--muted);line-height:1.6;margin:0 0 24px}.welcome label,#profile-name-form label,#admin-login label,#pullup-form label{display:block;font-size:13px;color:var(--muted);margin:0 0 8px}.welcome input{width:100%}.welcome .primary{width:100%}.privacy-note,.manual-note{font-size:12px;color:var(--muted);line-height:1.6;margin:16px 0}.form-error{color:var(--accent);font-size:13px;line-height:1.5;min-height:20px;margin:12px 0}.welcome .brand-logo{width:44px;height:44px}#team-code{letter-spacing:.12em}
.settings-name{margin-top:24px;padding-bottom:24px;border-bottom:1px solid var(--line)}.settings-name p{font-size:12px;color:var(--muted);line-height:1.5;margin:0 0 12px}.settings-name input{width:100%}.settings-name button{width:100%;margin-top:12px}.settings-name [role=status]:empty{display:none}.settings-name [role=status]{min-height:16px;margin:12px 0 0;color:var(--accent)}.settings-section{margin:24px 0;padding-bottom:24px;border-bottom:1px solid var(--line)}.settings-section p{font-size:13px;color:var(--muted);line-height:1.6;margin:0 0 16px}.settings-section button{width:100%}.settings-reset{color:var(--accent)}.confirm-actions{display:flex;gap:8px}.confirm-actions button{flex:1;min-width:0;font-size:12px;padding-inline:8px}.settings-status{min-height:16px;margin-top:12px!important;color:var(--accent)!important}
.sound-setting{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 0 24px;border-bottom:1px solid var(--line);font-size:15px}.sound-setting small{display:block;font-size:12px;line-height:1.6;color:var(--muted);margin-top:8px}.sound-setting input{appearance:none;-webkit-appearance:none;position:relative;width:44px;height:28px;min-height:28px;border:1px solid #444;border-radius:var(--radius);flex-shrink:0;background:#222;margin:0}.sound-setting input:before{content:'';position:absolute;width:18px;height:18px;top:4px;left:4px;border-radius:50%;background:#aaa;transition:transform .15s}.sound-setting input:checked{background:var(--accent);border-color:var(--accent)}.sound-setting input:checked:before{transform:translateX(16px);background:#080808}
#manual-panel{padding:24px 0;width:100%}#manual-panel h2{font-size:28px;line-height:1.3;color:var(--accent);margin-bottom:28px}#pullup-amount{width:100%;font-size:24px}#pullup-save{width:100%;margin-top:12px}#pullup-error{font-size:13px;color:var(--accent);min-height:20px;line-height:1.5;margin:12px 0}#manual-panel .manual-note{text-align:center}
#admin-login{margin-top:24px}#admin-password{width:100%}#admin-login button{width:100%;margin-top:12px}.admin-note{font-size:12px;color:var(--muted);line-height:1.6;margin:24px 0}.admin-search-label{display:block;font-size:13px;color:var(--muted);margin:16px 0 8px}#admin-search{width:100%;margin-bottom:8px}.admin-user{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.admin-user span{font-size:14px;overflow-wrap:anywhere}.admin-user button{min-height:40px;padding:8px 12px;font-size:11px;flex-shrink:0}#admin-logout{width:100%;margin-top:24px}#admin-status,#admin-confirm-text{font-size:13px;line-height:1.5;color:var(--accent)}#admin-status:empty{display:none}#admin-confirm{padding:12px 0 20px;border-bottom:1px solid var(--line)}
body[data-exercise=squats] .primary,body[data-exercise=squats] .training-options .selected,#rank-dialog[data-sport=squats] .selected{color:#fff}
#portrait-notice{position:fixed;inset:0;z-index:10000;background:#000;display:grid;place-items:center;padding:24px}.portrait-card{text-align:center;width:100%;max-width:400px;padding:24px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}.portrait-card svg{display:block;width:64px;height:64px;margin:0 auto 20px;color:var(--accent)}.portrait-card h2{font-size:28px;color:var(--accent)}.portrait-card p{font-size:14px;line-height:1.6;color:var(--muted);margin:16px 0 0}
@media(max-height:700px){.training{padding-top:12px}.training-options{margin-bottom:12px}.number{width:min(100%,260px)}#status{margin:12px 0;min-height:40px}progress{margin:12px 0 16px}.dialog-content{padding:20px}.rank-title{margin-top:20px}.mode-choices{margin-top:20px}.exercise-choice{min-height:64px;padding:10px 14px}}
@media(max-height:620px){main{padding-top:16px;padding-bottom:16px}.number{width:min(100%,224px)}#count{font-size:100px}body[data-exercise=planks] #count,body[data-exercise=hangs] #count,body[data-exercise=wallsits] #count{font-size:64px}.training-options{margin-bottom:8px}#status{font-size:12px;margin:8px 0;min-height:36px}.profile-line{margin-top:12px}progress{margin:12px 0}.actions button{min-height:44px}.sync-state{margin-top:8px}}
@media(max-width:350px){:root{--gutter:16px}.header-tools{gap:6px}.ranking-button{width:40px;min-width:40px;height:40px;min-height:40px;padding:9px}.mode-button{height:40px;min-height:40px;padding-inline:8px;font-size:12px}.brand-logo{width:36px;height:36px}.dialog-content{padding:20px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.dialog-head button{box-sizing:border-box;line-height:1}.dialog-head svg{display:block;flex:none}#admin-exercises .sound-setting{margin:0;padding:12px 0}#admin-exercises-form{margin-bottom:28px}[hidden]{display:none!important}

body[data-exercise=wallsits],#rank-dialog[data-sport=wallsits]{--accent:#52D6C7}.wallsit-choice{color:#52D6C7}

select{width:100%;min-height:48px;padding:12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--ink);font:inherit;font-size:16px;margin:8px 0 16px}#rank-dialog[data-sport=overall]{--accent:#ffdd00}.overall-genders{width:100%;margin:0 0 12px}.score-explanation{margin:0 0 20px;border:1px solid var(--line);border-radius:var(--radius);padding:12px;font-size:11px;line-height:1.6;color:var(--muted)}.score-explanation summary{cursor:pointer;color:var(--accent)}.score-explanation a{color:var(--accent)}.score-rule{display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid var(--line);padding:6px 0}.score-rule strong{white-space:nowrap;color:var(--ink)}.gender-symbol{width:13px;height:13px;margin-left:5px;vertical-align:-1px;stroke:#888;stroke-width:1.2;fill:none;stroke-linecap:round;stroke-linejoin:round}.rank-values{text-align:right}.rank-values small{display:block;color:var(--muted);font-size:9px;font-weight:300;margin-top:6px}.rank-values strong{display:block}.wallsit-choice span{color:#52D6C7}.wallsit-choice.selected{border-color:#52D6C7}
.training-options .selected:hover:enabled,.sport-tabs .selected:hover:enabled,.period-tabs .selected:hover:enabled{background:var(--accent);border-color:transparent;filter:brightness(1.04)}

.overall-feature{display:flex;align-items:center;gap:14px;width:100%;margin-top:20px;padding:14px 16px;border:1px solid #ffdd0066;background:#ffdd0009;color:#ffdd00;text-align:left}.overall-feature svg{width:26px;height:26px;flex:none}.overall-feature span:nth-child(2){flex:1}.overall-feature small{display:block;font-size:9px;letter-spacing:.15em;font-weight:700;margin-bottom:4px}.overall-feature strong{display:block;font:300 24px/1.1 Lato,sans-serif}.overall-feature-arrow{font-size:21px;font-weight:300}.overall-feature.selected{background:#ffdd00;color:#080808;border-color:#ffdd00}.overall-feature:hover:enabled{background:#ffdd0018;border-color:#ffdd00}.overall-feature.selected:hover:enabled{background:#ffdd00;filter:brightness(1.04)}.overall-feature+.sport-tabs{margin-top:10px}#rank-dialog[data-sport=overall] .rank-values strong{font-size:32px;color:#ffdd00}#rank-dialog[data-sport=overall] .rank-columns{color:#a7a7a7}

.rank-streak{display:block;font-size:10px;line-height:1.5;color:var(--muted);margin-top:5px;letter-spacing:.02em}.rank-streak.active{color:var(--accent)}.rank-values .streak-bonus{font-variant-numeric:tabular-nums;color:var(--muted)}

/* Three equally weighted modes, kept within the existing mobile content width. */
.training>.training-options{grid-template-columns:repeat(3,minmax(0,1fr));width:min(100%,300px)}
body[data-daily=true] .best-target{font-size:11px;letter-spacing:.06em}
body[data-daily=true][data-exercise=pullups] #manual-panel{padding:16px 0 0}
body[data-daily=true][data-exercise=pullups] #manual-panel h2{font-size:18px;margin:0 0 14px}
body[data-daily=true][data-exercise=pullups] #pullup-form{display:grid;grid-template-columns:1fr 1fr;gap:8px}
body[data-daily=true][data-exercise=pullups] #pullup-form>label,body[data-daily=true][data-exercise=pullups] #pullup-error,body[data-daily=true][data-exercise=pullups] .manual-note{grid-column:1/-1}
body[data-daily=true][data-exercise=pullups] #pullup-save{margin:0}

.training>.training-options.two-modes{grid-template-columns:repeat(2,minmax(0,1fr));width:208px}

body[data-daily=true][data-exercise=pullups] .number{width:min(100%,250px)}
body[data-daily=true][data-exercise=pullups] .manual-note{margin:4px 0}
body[data-daily=true][data-exercise=pullups] #pullup-error{margin:4px 0;min-height:16px}

/* More breathing room between value, icon and ring in every exercise. */
#count{font-size:clamp(80px,24vw,104px)}
body[data-exercise=planks] #count,body[data-exercise=hangs] #count,body[data-exercise=wallsits] #count{font-size:clamp(52px,15vw,64px)}
.reminder-time-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:16px 0;font-size:13px}
#reminder-time{width:130px;text-align:center;font-size:16px}
.reminder-badge{display:inline-block;color:var(--muted);border:1px solid var(--line);border-radius:var(--radius);padding:5px 9px;font-size:10px;margin:0 0 12px}
#reminder-status{margin:12px 0 0;color:var(--accent);font-size:12px}
#reminder-status:empty{display:none}
