@font-face { font-family: "Kollektif"; src: url("/Kollektif-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --blue: #005EB8; --accent: #3F95F0; --lblue: #7DB8FF; --pink: #EC008C; --green: #22C55E; --tickg: #9FD3A0; --amber: #F59E0B; --grey: #7C7F87; --red: #FF7A6E;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --mottle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='4' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .3 -.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  --veins: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='v'%3E%3CfeTurbulence type='turbulence' baseFrequency='.006 .02' numOctaves='3' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .46 0 0 0 0 .48 -2.2 0 0 0 1.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23v)'/%3E%3C/svg%3E");
}
html[data-theme=dark] {
  --bg: #232428; --bg2: #1c1d20; --card: rgba(255,255,255,.04); --line: rgba(255,255,255,.11); --text: #fff; --muted: #b9bcc2; --dim: #8d9097;
  --page: var(--grain), var(--mottle), linear-gradient(170deg, #27282c, #202124 60%, #25262a);
  --tile: var(--veins), linear-gradient(160deg, #f7f7f4, #ecece8);
  --sheet: #2b2c30; --input: rgba(0,0,0,.32);
}
html[data-theme=light] {
  --bg: #F7F7F4; --bg2: #ececea; --card: rgba(255,255,255,.75); --line: rgba(0,0,0,.12); --text: #111; --muted: #4b4d52; --dim: #6a6d73;
  --page: var(--veins), linear-gradient(160deg, #f9f9f6, #efefeb);
  --tile: var(--grain), var(--mottle), linear-gradient(170deg, #5f6167, #55575d);
  --sheet: #fafaf8; --input: rgba(0,0,0,.05); --accent: #1f7ae0;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); background-image: var(--page); background-attachment: fixed; color: var(--text); font: 16px/1.55 Poppins, -apple-system, system-ui, sans-serif; overscroll-behavior-y: none; overflow: hidden; }
/* The shell. Fixed height, so the tab bar sits on the real bottom edge whether or not the page
   scrolls. It used to be position:fixed against the document, which on iPhone sat a home-indicator
   height up the screen on the two tabs short enough not to scroll (profile and train). */
#app { height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, label:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
input, select, textarea { font: inherit; color: var(--text); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.h { font-family: Kollektif, Montserrat, sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: .95; }
.mono { font-family: Montserrat, sans-serif; font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
main { flex: 1 1 auto; min-height: 0; width: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top) + 8px) 0 28px; max-width: 640px; margin: 0 auto; }
main.log { padding-bottom: calc(env(safe-area-inset-bottom) + 84px); }
.pad { padding: 0 20px; }
.btn { background: var(--accent); color: #fff; border-radius: 999px; min-height: 52px; padding: 14px 24px; font-family: Montserrat; font-weight: 700; font-size: 16px; }
.btn.wide { display: block; width: 100%; margin: 18px 0; }
.btn:disabled { opacity: .5; }
.ghost { border: 1px solid var(--line); border-radius: 999px; min-height: 46px; padding: 12px 20px; margin: 14px 0; font-family: Montserrat; font-weight: 600; }
.pill { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; min-height: 38px; padding: 8px 16px; font-family: Montserrat; font-weight: 600; font-size: 14px; background: var(--card); }
.pill.chk { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.pill.chk input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.pill.chk.on { border-color: var(--accent); color: var(--accent); }

/* tabs */
.tabs { flex: none; display: flex; justify-content: space-around; padding: 10px 0 calc(env(safe-area-inset-bottom) + 8px); background: rgba(22,23,26,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); z-index: 20; }
html[data-theme=light] .tabs { background: rgba(250,250,248,.92); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--dim); font: 600 11px/1 Montserrat; letter-spacing: .06em; min-width: 76px; padding: 4px 0; }
.tab.on { color: var(--text); } .tab.on svg { stroke: var(--accent); }

/* login */
.login { padding: calc(env(safe-area-inset-top) + 60px) 24px 40px; }
.login .brand { font: 700 13px Montserrat; letter-spacing: .3em; color: var(--accent); margin-bottom: 26px; }
.login h1 { font-size: 46px; margin: 0 0 14px; }
.login input { display: block; width: 100%; margin: 10px 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--input); font-size: 16px; }
.login .btn { width: 100%; margin-top: 12px; }
.login .link { display: block; margin: 18px auto 0; color: var(--muted); font: 600 14px Montserrat; }
.login .muted + .btn { width: 100%; }
.err { color: var(--red); min-height: 1.4em; }

/* train */
.trainhead, .calhead { padding: 0 16px; }
.picker { position: relative; display: inline-flex; gap: 6px; align-items: center; font: 700 15px Montserrat; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); margin: 4px 0 10px; }
.picker select { position: absolute; inset: 0; opacity: 0; width: 100%; }
.strip { display: grid; grid-template-columns: 18px repeat(7, 1fr) 18px; gap: 4px; align-items: center; margin: 6px 0 14px; }
.wkarrow { color: var(--dim); font-size: 22px; }
.wd, .cd { display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; border-radius: 12px; font-family: Montserrat; }
.wd span, .cd span { font-size: 10px; font-weight: 600; color: var(--dim); }
.wd b, .cd b { font-size: 17px; font-weight: 700; }
.wd i, .cd i { height: 14px; display: flex; align-items: center; }
.wd.now { background: var(--accent); color: #fff; } .wd.now span { color: #fff; }
.wd.sel:not(.now) { outline: 1.5px solid var(--accent); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: block; }
.wd.now .dot { background: #fff; }
.dot.grey { background: var(--grey); } .dot.hollow { background: none; border: 1.5px solid var(--accent); }
.tk svg { width: 14px; height: 14px; stroke: var(--green); stroke-width: 3; }
.tk.late svg { stroke: var(--amber); }
.lbl { color: var(--lblue); margin-top: 4px; }
html[data-theme=light] .lbl { color: var(--blue); }
.title { font-size: 46px; margin: 6px 0 6px; }
.pill-late, .pill-missed { display: inline-block; font: 600 12px Montserrat; padding: 4px 12px; border-radius: 999px; margin: 0 0 6px; }
.pill-late { background: rgba(245,158,11,.2); color: #ffd28a; } .pill-missed { background: rgba(124,127,135,.3); }
html[data-theme=light] .pill-late { color: #8a5300; }
.mq { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border: 1.5px solid var(--accent); border-radius: 16px; margin: 12px 0; background: var(--card); }
.mq span { display: flex; flex-direction: column; } .mq small { color: var(--muted); font-size: 12px; }
.mq.done { border-color: var(--line); padding: 9px 14px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 6px 0; margin: 16px 0; backdrop-filter: blur(4px); }
.boxlbl { padding: 13px 18px 4px; color: var(--muted); }
.prow { display: grid; grid-template-columns: 34px 1fr auto 18px; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 11px 14px; }
.prow .code { font: 700 13px Montserrat; color: var(--muted); }
.prow .code.next { color: var(--accent); }
.prow .nm { font-weight: 600; } .prow .nm i { font-style: normal; color: var(--muted); font-size: 12px; } .prow .nm .sw { color: var(--amber); }
.prow .sr { color: var(--muted); letter-spacing: .04em; font-size: 12px; }
.prow.fin { opacity: .5; }
.gsep { height: 1px; background: var(--line); margin: 2px 14px; }
.note { width: 100%; min-height: 70px; border-radius: 16px; border: 1px solid var(--line); background: var(--input); padding: 12px 14px; resize: vertical; margin: 8px 0; }
.note.big { min-height: 140px; }
.dashed { width: 100%; border: 1.5px dashed var(--line); border-radius: 16px; min-height: 52px; padding: 15px; font-family: Montserrat; font-weight: 600; color: var(--muted); margin: 10px 0; }

/* logging */
.loghead { display: flex; justify-content: space-between; align-items: center; padding: 4px 16px 0; }
.back { display: flex; align-items: center; gap: 2px; font: 600 14px Montserrat; color: var(--accent); }
.loghead .mono { color: var(--lblue); }
.glet { display: flex; align-items: center; gap: 14px; padding: 4px 16px 6px; }
.glet .h { font-size: 64px; }
.dots { display: flex; gap: 6px; } .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); } .dots i.on { background: var(--accent); }
.panes { display: flex; flex-direction: column; gap: 14px; padding: 0 14px; }
.pane { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.ph { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.phtools { display: flex; gap: 8px; margin-left: auto; }
/* On a phone the exercise name gets the whole line instead of wrapping around the buttons. */
@media (max-width: 480px) { .ph .exname { flex: 1 1 auto; min-width: 0; } .phtools { width: 100%; justify-content: flex-end; margin: 2px 0 0; } }
.badge { background: var(--blue); color: #fff; font: 700 12px Montserrat; padding: 4px 8px; border-radius: 8px; }
.exname { font: 700 19px Montserrat; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); text-align: left; flex: 1; }
.es { color: var(--muted); font-style: normal; font-size: 12px; }
.sq { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; color: var(--dim); }
.sq svg { width: 18px; height: 18px; } .sq.has { color: var(--accent); border-color: var(--accent); }
.upd { color: var(--amber); margin: 6px 0 0; }
.cnote { font-size: 14px; background: rgba(63,149,240,.14); border-left: 3px solid var(--accent); padding: 6px 10px; border-radius: 6px; margin: 8px 0 0; }
.target { color: var(--lblue); margin: 6px 0 0; letter-spacing: .06em; }
html[data-theme=light] .target { color: var(--blue); }
.sets { margin-top: 12px; }
.shead, .srow { display: grid; align-items: center; gap: 8px; }
.sets.c3 .shead, .sets.c3 .srow { grid-template-columns: 30px 1fr 1fr 1fr 46px; }
.sets.c2 .shead, .sets.c2 .srow { grid-template-columns: 30px 1fr 1fr 46px; }
.sets.c1 .shead, .sets.c1 .srow { grid-template-columns: 30px 1fr 46px; }
.shead { color: var(--muted); padding: 0 0 7px; font-size: 11px; }
.srow { padding: 5px 0; transition: opacity .2s; }
.srow .sn { color: var(--muted); display: flex; align-items: center; gap: 4px; }
.srow input, .srow select { width: 100%; min-width: 0; height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--input); text-align: center; font: 700 17px Montserrat; -webkit-appearance: none; appearance: none; }
.srow input::placeholder { color: var(--dim); opacity: .55; font-weight: 600; }
.srow select.hint { color: rgba(255,255,255,.45); font-weight: 600; }
html[data-theme=light] .srow select.hint { color: rgba(0,0,0,.35); }
.tick { width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent; }
.tick svg { stroke-width: 3; }
.tick.on { background: var(--green); border-color: var(--green); color: #fff; }
.srow.done input, .srow.done select { border-color: rgba(34,197,94,.55); }
.srow.skipped { opacity: .45; }
.skipundo { grid-column: span 1; font-size: 10px; color: var(--muted); }
.addset { width: 100%; margin-top: 12px; padding: 13px; border: 1px dashed var(--line); border-radius: 12px; font: 600 14px Montserrat; color: var(--muted); }
.tbtn { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: var(--accent); font: 700 10px Montserrat; }
.tbtn svg { width: 12px; height: 12px; fill: currentColor; }
.tbtn.run { background: var(--accent); color: #fff; }
.logfoot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px calc(env(safe-area-inset-bottom) + 12px); background: linear-gradient(transparent, rgba(24,25,28,.96) 40%); z-index: 15; }
html[data-theme=light] .logfoot { background: linear-gradient(transparent, rgba(250,250,248,.95) 40%); }
.hint { color: var(--muted); font-size: 11px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rest { background: var(--accent); color: #fff; border-radius: 999px; padding: 12px 20px; font: 700 16px Montserrat; min-width: 120px; }
.rest.run { background: #fff; color: var(--blue); }

/* sheets + alerts */
.scrim { position: absolute; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 78vh; overflow: auto; background: var(--sheet); border-radius: 22px 22px 0 0; padding: 18px 16px calc(env(safe-area-inset-bottom) + 20px); z-index: 41; animation: up .22s ease-out; }
.sheet.center { left: 12px; right: 12px; bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 22px; max-height: 88vh; animation: none; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheett { font-size: 28px; margin: 0 0 14px; padding-right: 44px; }
.sheet .grab { width: 44px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 14px; flex: none; }
.sheetx { position: absolute; right: 12px; top: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 15px; display: grid; place-items: center; z-index: 2; }
.list { display: flex; flex-direction: column; }
.li { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 14px 6px; border-bottom: 1px solid var(--line); font-weight: 600; }
.li small { color: var(--muted); font-weight: 400; font-size: 13px; margin-top: 2px; }
.li.static { flex-direction: row; justify-content: space-between; align-items: center; }
.search { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--input); font-size: 16px; margin-bottom: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin: 0 0 12px; }
.seg button { padding: 7px 16px; border-radius: 999px; font: 600 13px Montserrat; color: var(--muted); }
.seg button.on { background: var(--accent); color: #fff; }
.mqrow { margin: 12px 0; } .mqh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; } .mqh small { color: var(--muted); font-size: 11px; }
.scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.scale button { height: 36px; border-radius: 9px; border: 1px solid var(--line); font: 700 14px Montserrat; }
.scale button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper { display: flex; align-items: center; gap: 18px; } .stepper button { width: 44px; height: 40px; border-radius: 10px; border: 1px solid var(--line); font-size: 22px; } .stepper span { font-size: 18px; min-width: 60px; text-align: center; }
.alertwrap { position: absolute; inset: 0; background: rgba(0,0,0,.4); display: grid; place-items: center; z-index: 60; }
.alert { width: 272px; background: rgba(60,62,66,.97); color: #fff; border-radius: 16px; text-align: center; overflow: hidden; backdrop-filter: blur(20px); }
html[data-theme=light] .alert { background: rgba(248,248,248,.97); color: #000; }
.at { font-weight: 600; font-size: 17px; padding: 18px 16px 2px; } .ax { font-size: 13px; padding: 0 16px 16px; opacity: .85; }
.ab { display: flex; flex-direction: column; } .ab button { padding: 12px; border-top: 1px solid rgba(128,128,128,.35); color: #4aa3ff; font-size: 17px; }
.ab button.bold { font-weight: 600; } .ab button.danger { color: #ff6b5e; }
.banner { position: fixed; top: calc(env(safe-area-inset-top) + 8px); left: 12px; right: 12px; background: var(--accent); color: #fff; border-radius: 14px; padding: 14px 16px; font: 600 15px Montserrat; z-index: 70; transform: translateY(-140%); transition: transform .3s; }
.banner.in { transform: none; } .banner b { background: #fff; color: var(--accent); padding: 2px 8px; border-radius: 6px; margin-right: 8px; font-size: 12px; }
.flash::after { content: ''; position: fixed; inset: 0; background: var(--accent); animation: fl .45s 4; pointer-events: none; z-index: 80; opacity: 0; }
@keyframes fl { 50% { opacity: .55; } }
.hrow { padding: 13px 0; border-bottom: 1px solid var(--line); } .hrow .mono { color: var(--muted); margin-bottom: 3px; }
.hn { font-size: 13px; color: var(--muted); margin: 4px 0 0; } .hn.coach { color: var(--lblue); }
.demo { padding: 30px 0; text-align: center; }

/* profile */
.phead { position: relative; height: 150px; margin-top: calc(-1 * (env(safe-area-inset-top) + 8px)); padding-top: env(safe-area-inset-top); }
.gear { position: absolute; right: 16px; top: calc(env(safe-area-inset-top) + 12px); width: 38px; height: 38px; display: grid; place-items: center; }
.pinfo { text-align: center; padding: 0 16px; margin-top: -60px; }
.avatar { width: 104px; height: 104px; border-radius: 50%; margin: 0 auto 10px; border: 3px solid var(--accent); background: var(--tile); display: grid; place-items: center; font: 700 36px Kollektif; color: var(--blue); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.name { font-size: 44px; margin: 0; }
.bio { margin: 6px 0 0; }
.statsrow { margin: 12px 0 10px; letter-spacing: .06em; font-size: 12px; }
.pills { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.tile { position: relative; aspect-ratio: 4 / 5; background: var(--tile); background-position: calc(var(--seed) * 7px) calc(var(--seed) * 3px); overflow: hidden; text-align: left; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 35%, transparent 55%, rgba(0,0,0,.6)); }
.td, .tn { position: absolute; z-index: 1; color: #fff; }
.td { top: 7px; left: 8px; font-size: 10px; } .tn { bottom: 8px; left: 8px; right: 8px; font: 700 13px/1.05 Kollektif; text-transform: uppercase; }
.bend { position: absolute; z-index: 1; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.bend svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3; }
.empty { text-align: center; padding: 40px 16px; }

/* military (finish + stats) */
.mil { padding: 0 16px; background-image: linear-gradient(rgba(63,149,240,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(63,149,240,.07) 1px, transparent 1px); background-size: 22px 22px; min-height: 100%; }
.milhead { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.milhead .mono { color: var(--lblue); }
.sqbtn { border: 1px solid var(--lblue); border-radius: 10px; min-height: 42px; padding: 10px 16px; font: 700 13px Montserrat; letter-spacing: .1em; color: var(--lblue); display: inline-flex; align-items: center; }
.big { font-size: 52px; margin: 8px 0 18px; }
.datarow { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); margin-bottom: 14px; }
.datarow div { padding: 12px; border-right: 1px solid var(--line); } .datarow div:last-child { border: 0; }
.datarow .mono { color: var(--lblue); font-size: 9px; display: block; } .datarow b { font: 700 28px Kollektif; }
.sub { color: var(--lblue); margin: 20px 0 8px; }
.prline, .lline { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.lline span:first-child { width: 30px; color: var(--muted); } .lline span:nth-child(2) { flex: 1; } .lline .mono { letter-spacing: .02em; font-size: 11px; text-align: right; }
.clip.ph { height: 140px; margin: 0 -16px; background: var(--tile); position: relative; display: flex; align-items: flex-start; padding: 10px 16px; }
.clip .rec { position: absolute; left: 16px; bottom: 10px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.clip .sqbtn { background: rgba(0,0,0,.35); color: #fff; border-color: #fff; padding: 6px; }
.navs button { color: var(--lblue); margin-left: 12px; font: inherit; letter-spacing: inherit; }
.e1 { display: flex; align-items: baseline; gap: 8px; } .e1 b { font-size: 64px; } .e1 span { font: 700 14px Montserrat; } .e1 em { font: 700 14px Montserrat; font-style: normal; color: var(--accent); } .e1 em.down { color: var(--grey); }
.chart { width: 100%; height: auto; margin-top: 6px; } .ct { font: 600 10px Montserrat; fill: var(--muted); }
.ci { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; letter-spacing: .08em; } .ci i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.stickers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stile { background: #1c1d20; border: 1px solid rgba(255,255,255,.08); padding: 6px; display: flex; flex-direction: column; gap: 4px; transition: background .2s; }
.stile.copied { background: var(--accent); } .stile.copied .slab::after { content: ' · COPIED'; }
.stile.grey { opacity: .35; }
.sface { aspect-ratio: 1; display: grid; place-items: center; } .sface img { max-width: 100%; max-height: 100%; }
.slab { color: #cfd1d5; font-size: 8px; letter-spacing: .08em; }
.ways { display: flex; gap: 4px; } .ways button { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); }
.ways button.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.sdots { display: flex; gap: 3px; justify-content: center; min-height: 0; } .sdots i { width: 4px; height: 4px; border-radius: 50%; background: #555; } .sdots i.on { background: var(--accent); }

/* calendar */
.calhead h1 { font-size: 40px; margin: 6px 0; }
.yr { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; } .yr button:not(.pill) { font-size: 22px; color: var(--dim); }
.wcard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px 10px 6px; margin: 10px 0; }
.wcard.this { border: 1.5px solid var(--accent); }
.wch { display: flex; justify-content: space-between; color: var(--muted); padding: 0 4px 6px; font-size: 10px; }
.wdays { display: grid; grid-template-columns: repeat(7, 1fr); }
.cd.now b { background: var(--accent); color: #fff; border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; }
.bdiv { color: var(--accent); text-align: center; border-top: 1px solid var(--accent); padding-top: 6px; margin: 18px 0 4px; }

/* settings */
.grp { color: var(--muted); margin: 22px 0 8px; }
.fld { display: block; margin: 8px 0; font-size: 13px; color: var(--muted); } .fld input { display: block; width: 100%; margin-top: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); font-size: 16px; }
.srow2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); } .srow2 .seg { margin: 0; }
a.srow2 { color: inherit; text-decoration: none; padding: 14px 0; }
.logout { color: var(--red); font-weight: 600; margin: 26px 0 10px; display: block; }
.keep { text-transform: none; letter-spacing: .04em; }

/* ---------------- coach builder ---------------- */
main.builder { max-width: none; padding-left: 0; padding-right: 0; }
div.builder { display: flex; align-items: flex-start; min-height: 100%; }
.bside { width: 230px; flex: none; padding: 10px 12px; border-right: 1px solid var(--line); position: sticky; top: 0; max-height: 100%; overflow: auto; }
.bside .bw { color: var(--accent); margin-bottom: 14px; font-size: 12px; letter-spacing: .3em; }
.bl { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px; border-radius: 12px; margin: 4px 0; position: relative; }
.bl.on { background: var(--card); outline: 1px solid var(--line); }
.bl .av { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; font: 700 12px Montserrat; flex: none; }
.bl b { display: block; font-size: 14px; } .bl small { color: var(--muted); font-size: 11px; }
.al { position: absolute; right: 8px; width: 9px; height: 9px; border-radius: 50%; } .al.red { background: #ff5f57; } .al.amber { background: var(--amber); }
.bmain { flex: 1; min-width: 0; padding: 4px 16px 20px; }
.bhead .brow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.bname { font-size: 28px; }
.bpick { display: none; }
.lead select { background: var(--input); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; margin-left: 4px; font: 600 12px Montserrat; }
.btop { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.wtabs { display: flex; gap: 2px; overflow-x: auto; } .wtabs button { padding: 6px 10px; border-radius: 8px; font: 700 12px Montserrat; color: var(--muted); }
.wtabs button.on { background: var(--accent); color: #fff; }
.catbadge.warn { border-color: var(--amber); }
.bdays { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; align-items: flex-start; }
.bday { flex: 0 0 340px; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px; }
.bday.empty { flex-basis: 160px; opacity: .8; }
.bday .dl { color: var(--muted); display: flex; justify-content: space-between; align-items: center; } .bday .dl .ok { color: var(--green); }
.xday { color: var(--muted); font-size: 18px; padding: 0 4px; }
.dtitle { width: 100%; background: transparent; border: 0; border-bottom: 1px solid transparent; font-size: 24px; padding: 4px 0; margin-bottom: 6px; color: var(--text); }
.dtitle:focus { outline: none; border-bottom-color: var(--accent); }
.brow2 { display: grid; grid-template-columns: 30px 1fr auto 38px 12px; gap: 6px; align-items: start; width: 100%; text-align: left; padding: 8px 6px 8px 8px; border-radius: 10px; margin: 2px 0; border-left: 3px solid transparent; }
.brow2.lt { background: rgba(255,255,255,.07); } .brow2.dk { background: rgba(0,0,0,.18); }
html[data-theme=light] .brow2.lt { background: rgba(0,0,0,.03); } html[data-theme=light] .brow2.dk { background: rgba(0,0,0,.08); }
.brow2.bar-green { border-left-color: var(--green); } .brow2.bar-amber { border-left-color: var(--amber); } .brow2.bar-blue { border-left-color: var(--accent); }
.brow2 .code { color: var(--lblue); padding-top: 2px; }
.bn b { display: block; font-size: 14px; } .bn small { display: block; color: var(--muted); font-size: 11px; }
.bn .lnote { color: var(--lblue); font-style: italic; }
.did { color: var(--text); font-size: 10px; letter-spacing: .02em; margin-top: 3px; text-transform: none; }
.bs { text-align: right; letter-spacing: .02em; font-size: 12px; } .bs small { display: block; color: var(--muted); font-size: 10px; }
.br { color: var(--muted); font-size: 11px; text-align: right; } .cn { color: var(--accent); font-size: 12px; }
.bed { background: var(--sheet); border: 1.5px solid var(--accent); border-radius: 12px; padding: 10px; margin: 4px 0; }
.bedh { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.bedh .code { width: 52px; text-align: center; font: 700 14px Montserrat; border: 1px solid var(--line); border-radius: 8px; padding: 7px 4px; background: var(--input); text-transform: uppercase; }
.exn { flex: 1; text-align: left; font: 700 14px Montserrat; } .xdel { color: var(--red); font-size: 12px; font-weight: 600; }
.bst .sh, .bsr { display: grid; grid-template-columns: 22px 1fr 64px 1fr 22px; gap: 6px; align-items: center; }
.bst .sh { color: var(--muted); font-size: 9px; margin-bottom: 4px; }
.bsr { margin-bottom: 4px; } .bsr input, .bsr select, .bopts input, .bopts select { width: 100%; min-width: 0; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--input); text-align: center; font: 600 14px Montserrat; }
.xs { color: var(--muted); font-size: 16px; }
.bopts { display: flex; gap: 10px; margin: 8px 0 4px; } .bopts label { flex: 1; font-size: 12px; color: var(--muted); }
.bed .btn { padding: 9px 18px; font-size: 13px; }
.addwrap { position: relative; margin-top: 8px; } .addwrap .search { font-size: 14px; padding: 9px 12px; }
.slist { display: flex; flex-direction: column; background: var(--sheet); border-radius: 10px; max-height: 300px; overflow: auto; }
.slist:empty { display: none; } .slist .li { padding: 8px 10px; font-size: 13px; } .li.new { color: var(--accent); }
.bcats { width: 210px; flex: none; padding: 10px 12px; border-left: 1px solid var(--line); position: sticky; top: 0; max-height: 100%; overflow: auto; font-size: 13px; }
.bcats small { color: var(--muted); text-transform: none; letter-spacing: 0; }
.cg { margin: 10px 0 2px; font-size: 9px; } .cl { display: flex; align-items: center; gap: 8px; padding: 2px 0; } .cl span { margin-left: auto; color: var(--muted); font-size: 10px; }
.cl i { width: 9px; height: 9px; border-radius: 50%; } .cl i.g { background: var(--green); } .cl i.a { background: var(--amber); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; } .chips label input { display: none; }
.chips label span { display: inline-block; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font: 600 12px Montserrat; }
.chips label input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chk { display: block; margin: 8px 0; font-size: 14px; }
.fld select { display: block; width: 100%; margin-top: 4px; padding: 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); font-size: 15px; }
@media (max-width: 899px) {
  .bside { display: none; } .bpick { display: inline-flex; }
  .bcats { display: none; position: absolute; left: 12px; right: 12px; top: 80px; bottom: 12px; width: auto; max-height: none; background: var(--sheet); border-radius: 18px; border: 1px solid var(--line); z-index: 30; }
  .bcats.open { display: block; }
  .bday { flex-basis: calc(100vw - 44px); }
}
@media (max-width: 899px) and (orientation: landscape) { .bday { flex-basis: calc((100vw - 60px) / 3); } }
.adddays { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; } .adddays .dl { width: 100%; }
.seg.tgl { margin: 0; } .seg.tgl button { padding: 5px 12px; font-size: 12px; }
.bmain { overflow: hidden; }
main.builder { display: block; }
.builder > .bmain { flex: 1 1 0; min-width: 0; width: 0; }
.ssbtns { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; } .ssbtns .pill { font-size: 11px; padding: 5px 10px; }
.phoneonly { display: none; }
.sheet.full { top: 8px; bottom: 0; max-height: none; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; }
.sheet.full .list { overflow: auto; flex: 1; }
@media (max-width: 899px) { .deskonly { display: none; } .phoneonly { display: block; } }
.login .brand, .bside .bw { color: #fff; } .login .brand span, .bside .bw span { color: var(--accent); }
/* coach side panel */
.bcats { width: 320px; }
.ptabs { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.ptabs button { padding: 6px 9px; border-radius: 8px; font: 700 11px Montserrat; color: var(--muted); }
.ptabs button.on { background: var(--accent); color: #fff; }
.pclose { margin-left: auto; font-size: 18px !important; display: none; }
.pbody .small { font-size: 11px; }
.dna { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-size: 13px; }
.dna b { display: block; font: 700 15px Montserrat; margin: 2px 0; } .dna span { color: var(--muted); font-size: 10px; }
.dna.flag { border-color: var(--amber); background: rgba(245,158,11,.1); }
.fi { border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 13px; }
.fi .fh { display: flex; gap: 4px; align-items: baseline; } .fi .fh span { margin-left: auto; color: var(--muted); font-size: 11px; }
.fi p { margin: 4px 0 0; } .fi .mono { letter-spacing: .02em; text-transform: none; font-size: 11px; color: var(--muted); }
.fi.pr .fh b:first-child { background: var(--accent); color: #fff; padding: 1px 6px; border-radius: 5px; font-size: 10px; }
.fi.missed { color: var(--grey); } .late { color: var(--amber); font-style: normal; font-size: 11px; }
.fi .reply { color: var(--lblue); } .ghost.small { padding: 5px 12px; margin: 6px 0 0; font-size: 12px; }
.rbox textarea { width: 100%; min-height: 60px; border-radius: 10px; border: 1px solid var(--line); background: var(--input); padding: 8px; margin: 6px 0; }
.rbox .btn { padding: 8px 16px; font-size: 13px; }
.sub2 { color: var(--lblue); margin: 16px 0 6px; font-size: 10px; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 9px; color: var(--muted); } .legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
.ch { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; } .ch .mono { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
@media (max-width: 899px) { .pclose { display: block; } .bcats.open { overflow: auto; } }
.pushcard { margin: 22px 0; padding: 14px; border: 1px solid var(--accent); border-radius: 14px; background: rgba(63,149,240,.08); }
.pushcard p { margin: 4px 0 8px; font-size: 13px; color: var(--muted); } .pushcard .btn { padding: 9px 18px; font-size: 14px; margin-right: 8px; }
.trk .trow { display: grid; grid-template-columns: 1fr 110px 24px; align-items: center; gap: 8px; padding: 6px 14px; }
.trk input { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--input); text-align: center; font: 700 16px Montserrat; }
.trk i { color: var(--muted); font-style: normal; font-size: 12px; } .trk .missed span { color: var(--grey); }
/* Coach | Train */
.ctpill { position: absolute; right: 62px; top: calc(env(safe-area-inset-top) + 15px); display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: rgba(0,0,0,.25); }
.ctpill button { padding: 5px 12px; border-radius: 999px; font: 700 12px Montserrat; color: var(--muted); }
.ctpill button.on { background: var(--accent); color: #fff; }
.editprog { float: right; margin-top: 4px; }
html[data-mode=train] { --accent: #EC008C; --lblue: #ff7ac8; }
html[data-mode=train][data-theme=dark] { --bg: #1a1a1d; --page: var(--grain), var(--mottle), linear-gradient(170deg, #1d1d20, #161618 60%, #1b1b1e); }
html[data-mode=train] .phead { background: radial-gradient(ellipse at 50% 120%, rgba(236,0,140,.35), transparent 70%); }
html[data-mode=train] .avatar { border-color: var(--pink); box-shadow: 0 0 22px rgba(236,0,140,.6); }
html[data-mode=train] .pinfo .keep, html[data-mode=train] .statsrow { color: #ff7ac8; }
html[data-mode=train] .pill { border-color: rgba(236,0,140,.6); }
html[data-mode=train] .gear, html[data-mode=train] .tab.on svg { color: var(--pink); stroke: var(--pink); }
html[data-mode=train] .badge { background: var(--pink); }
.modefx { position: fixed; inset: 0; z-index: 90; pointer-events: none; background: rgba(0,0,0,.55); animation: fxdim .9s ease forwards; }
.modefx.train::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(236,0,140,.75) 50%, transparent 70%); background-size: 250% 100%; animation: fxsweep .8s ease forwards; }
.modefx.coach::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(63,149,240,.7) 50%, transparent 70%); background-size: 250% 100%; animation: fxsweep .8s ease forwards; }
@keyframes fxdim { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fxsweep { from { background-position: 120% 0; } to { background-position: -30% 0; } }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; } .photos .pill { cursor: pointer; }
/* clips */
.clipbox { margin: 18px 0 4px; text-align: center; }
.clipbox video { width: 56%; max-width: 260px; aspect-ratio: 9 / 16; object-fit: cover; display: block; margin: 0 auto 10px; border: 1px solid var(--lblue); background: #000; }
.clipbox progress { width: 100%; } .clipbox label { cursor: pointer; }
.clipbox .warn { color: var(--amber); }
.lnk { text-decoration: underline; color: var(--accent); font: inherit; }
.clip.ph.has { height: 62vh; padding: 0; }
.clip.ph video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip.ph .scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); pointer-events: none; }
.clip.ph > .sqbtn { position: relative; margin: 10px 16px; z-index: 1; }
.clip .cbtns { position: absolute; right: 16px; top: 10px; display: flex; gap: 6px; z-index: 1; } .clip .cbtns .sqbtn { background: rgba(0,0,0,.35); color: #fff; border-color: #fff; padding: 6px 10px; text-decoration: none; }
.clip .addclip { position: absolute; right: 16px; top: 10px; background: rgba(0,0,0,.35); color: #fff; border-color: #fff; cursor: pointer; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tplay { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: .8; } .tplay svg { fill: #fff; stroke: none; width: 20px; height: 20px; }

/* form checks */
.sq input[type=file] { display: none; }
.sq.busy { color: var(--accent); border-color: var(--accent); }
.srow .fcdot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; padding: 0; }
.srow .fcdot svg { width: 9px; height: 9px; fill: currentColor; stroke: none; }
.fcline { display: block; width: 100%; text-align: left; margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.fcline span { display: block; font-size: 11px; color: var(--dim); margin-bottom: 3px; }
.fcline b { font-weight: 600; font-size: 14px; } .fcline i { font-style: normal; color: var(--muted); font-size: 14px; }
.fcprog { color: var(--muted); margin: 8px 0 0; } .fcprog progress { width: 90px; vertical-align: middle; }
.fcvid { width: 100%; max-height: 60vh; border-radius: 14px; background: #000; margin: 6px 0 10px; }
.fi .fcvid { max-height: 340px; margin: 8px 0; }
.bl .fcn { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font: 700 11px Montserrat; display: grid; place-items: center; margin-left: auto; }
.fi.fcwait { border-left: 3px solid var(--accent); }
