/* Panium.fit  app.css  v7  2026-11-08 */
@font-face { font-family: "Panium"; src: url("/fonts/Panium-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #13161D; --ink: #FFFFFF; --ink-muted: rgba(255,255,255,.55); --accent: #00C090;
  --pill-border: rgba(255,255,255,.22); --panel: #1C2029; --card: rgba(255,255,255,.06);
  --btn: rgba(255,255,255,.08); --sep: rgba(255,255,255,.08); --tab-fg: rgba(255,255,255,.75);
  --teal: #00C090; --dark: #13161D;
}
#page.work { --bg: #00C090; --ink: #13161D; --ink-muted: rgba(19,22,29,.6); --accent: #13161D; --pill-border: rgba(19,22,29,.3); --tab-fg: #13161D; }

html, body { margin: 0; height: 100%; background: #13161D; color: #FFFFFF; font-family: "Helvetica Neue", Helvetica, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; cursor: pointer; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
input[type=range] { accent-color: #00C090; }
.hidden { display: none !important; }

#page { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); color: var(--ink); transition: background .3s; }

/* header */
#top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.brand { display: flex; flex-direction: column; gap: 5px; }
.wordmark { font-family: Panium, sans-serif; font-size: 22px; line-height: 1; text-decoration: none; color: var(--ink); }
.wordmark span { color: var(--accent); }
.tagline { font-size: 12px; letter-spacing: .04em; color: var(--ink-muted); }
.pill { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--pill-border); border-radius: 999px; background: transparent; color: var(--ink); font-size: 14px; }
#mode { padding: 0 6px 0 14px; }
.pill-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
#mode .pill-label { letter-spacing: .12em; }
.pill-value { font-weight: 600; }
.pill-chev { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* body */
#body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
#clock { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 20px; gap: 2px; }
#phase { font-size: 14px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: min(3vh, 20px); min-height: 17px; }
#left { font-family: Panium, sans-serif; font-size: min(42vw, 30vh, 240px); line-height: 1.15; color: var(--ink); }
.stats { display: flex; gap: 28px; margin-top: 4px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.stat-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.stat-value { font-family: Panium, sans-serif; font-size: 26px; line-height: 1; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: min(3vh, 22px); }
.actions { display: flex; gap: 12px; width: 100%; max-width: 420px; margin-top: min(3vh, 22px); }
.big { flex: 1; height: 64px; border: 0; border-radius: 999px; background: #00C090; color: #13161D; font-size: 18px; font-weight: 600; letter-spacing: .04em; }
.big.outline { flex: none; padding: 0 22px; border: 1px solid rgba(255,255,255,.22); background: transparent; color: #FFFFFF; font-size: 15px; font-weight: 400; white-space: nowrap; }
#page.work .big.outline { border-color: rgba(19,22,29,.3); color: #13161D; }
.big.stop { background: var(--ink); color: var(--bg); }

/* locked while running */
.lockable { transition: opacity .2s; }
#page.running .lockable { opacity: .35; pointer-events: none; }

/* bottom tabs (narrow) */
#tabs { flex: none; display: flex; gap: 4px; padding: 6px 10px calc(8px + env(safe-area-inset-bottom)); }
#tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 52px; border: 0; border-radius: 12px; background: transparent; color: var(--tab-fg); font-size: 12px; letter-spacing: .02em; }
#tabs button i { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
#tabs button.on { background: rgba(0,192,144,.14); color: #00C090; }
#tabs button.on i { background: #00C090; }

/* panel */
#scrim { position: absolute; inset: 0; background: rgba(0,0,0,.5); z-index: 10; }
#panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; background: #1C2029; color: #FFFFFF; border-radius: 22px 22px 0 0; z-index: 11; display: flex; flex-direction: column; box-shadow: 0 -12px 40px rgba(0,0,0,.4); }
#panelTabs { display: none; flex: none; gap: 4px; padding: 12px 12px 4px; }
#panelTabs button { flex: 1; height: 40px; border: 0; border-radius: 10px; background: transparent; color: rgba(255,255,255,.75); font-size: 13px; }
#panelTabs button.on { background: rgba(0,192,144,.14); color: #00C090; }
.panel-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 16px 10px 12px; }
.panel-head #panelTitle { flex: 1; font-size: 17px; font-weight: 600; padding-left: 4px; }
.round { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #FFFFFF; font-size: 20px; }
.done { height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255,255,255,.1); color: #FFFFFF; font-size: 15px; }
#panelBody { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: 0 16px 24px; display: flex; flex-direction: column; gap: 12px; }
#panelBody > * { flex: none; } /* v6: a long tab scrolls; nothing in it shrinks to fit */

/* sections */
.steppers { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
.stepper { background: var(--card); border-radius: 16px; padding: 14px 10px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.stepper .lbl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); text-align: center; line-height: 1.3; }
.stepper input { width: 100%; text-align: center; background: transparent; border: 0; outline: 0; color: #FFFFFF; font-family: Panium, sans-serif; font-size: 40px; line-height: 1; padding: 0; }
.stepper .unit { font-size: 11px; color: rgba(255,255,255,.55); min-height: 13px; }
.stepper .pm { display: flex; gap: 6px; width: 100%; }
.pm button, .sq { flex: 1; height: 44px; border: 0; border-radius: 10px; background: var(--btn); color: #FFFFFF; font-size: 22px; }
.sq { flex: none; width: 44px; }
.rows { background: var(--card); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 0 16px; border-top: 1px solid var(--sep); }
.row:first-child { border-top: 0; }
.row .lbl { font-size: 16px; }
.row.picker { min-height: 58px; padding: 0 12px 0 16px; border-left: 0; border-right: 0; border-bottom: 0; background: transparent; color: #FFFFFF; text-align: left; width: 100%; }
.row.picker .val { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #00C090; }
.row.picker .val b { font-size: 20px; line-height: 1; font-weight: 400; }
.switch { position: relative; display: inline-flex; align-items: center; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch .track { width: 52px; height: 32px; border-radius: 999px; background: rgba(255,255,255,.18); transition: background .2s; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; transition: left .2s; }
.switch input:checked ~ .track { background: #00C090; }
.switch input:checked ~ .knob { left: 23px; }
.row.text input { flex: 1; min-width: 0; max-width: 200px; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--btn); color: #FFFFFF; font: inherit; font-size: 16px; text-align: right; outline: 0; }
.row.step { min-height: 60px; padding: 0 10px 0 16px; }
.row.step .ctl { display: flex; align-items: center; gap: 6px; }
.row.step .num { font-family: Panium, sans-serif; font-size: 24px; line-height: 1; min-width: 56px; text-align: center; white-space: nowrap; }
.row.slider { flex-direction: column; align-items: stretch; gap: 6px; padding: 12px 16px; }
.row.slider .top { display: flex; justify-content: space-between; font-size: 16px; }
.row.slider .top span:last-child { color: #00C090; font-size: 15px; }
.row.slider input { width: 100%; height: 32px; margin: 0; cursor: pointer; }
.note { font-size: 13px; color: rgba(255,255,255,.55); padding: 0 2px; }
.note.warn { color: var(--ink); }
.version { font-size: 11px; letter-spacing: .1em; color: rgba(255,255,255,.4); padding: 4px 2px 0; margin-top: auto; }

/* clock: exercise and next-up lines (v6) */
#exercise { font-family: Panium, sans-serif; font-size: 28px; line-height: 1; min-height: 28px; margin-top: 6px; color: var(--ink); }
#next { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); margin-top: 8px; min-height: 16px; }

/* Intervals tab: four steppers two by two (v6) */
.steppers.two { grid-template-columns: 1fr 1fr; }

/* Segments × Rounds grid (v6) */
.grid { background: var(--card); border-radius: 16px; padding: 12px 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.grid-title { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); padding: 0 2px; }
.grid-head { display: flex; align-items: center; gap: 6px; padding: 0 0 2px; }
.grid-head .corner { flex: none; width: 28px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.grid-head .cols { flex: 1; display: flex; gap: 6px; min-width: 0; }
.grid-head .cols span { flex: 1; min-width: 0; text-align: center; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); white-space: nowrap; overflow: hidden; }
.grid-head .time { flex: none; width: 48px; text-align: right; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.seg { display: flex; align-items: center; gap: 6px; }
.seg .n { flex: none; width: 28px; padding: 0; border: 0; background: transparent; color: #FFFFFF; font-family: Panium, sans-serif; font-size: 22px; line-height: 1; text-align: center; }
.seg .cells { flex: 1; display: flex; gap: 6px; min-width: 0; }
.cell { flex: 1; min-width: 0; height: 52px; padding: 0 4px; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: #FFFFFF; font-size: 12px; line-height: 1.15; overflow: hidden; }
.cell.empty { background: transparent; border: 1px dashed rgba(255,255,255,.25); color: rgba(255,255,255,.55); font-size: 20px; }
.seg .time { flex: none; width: 48px; text-align: right; font-family: Panium, sans-serif; font-size: 18px; line-height: 1; }
.seg.totals { border-top: 1px solid rgba(255,255,255,.14); padding-top: 8px; margin-top: 2px; }
.seg.totals .n { font-size: 18px; color: rgba(255,255,255,.55); }
.seg.totals .sum { font-size: 13px; color: rgba(255,255,255,.75); }
.seg.totals .time { color: #00C090; font-size: 22px; }

/* exercise list (v6) */
.segmented { flex: none; display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--card); margin-bottom: 4px; }
.segmented button { flex: 1; height: 38px; border: 0; border-radius: 9px; background: transparent; color: rgba(255,255,255,.75); font-size: 14px; }
.segmented button.on { background: #00C090; color: #13161D; font-weight: 600; }
.count { font-size: 13px; color: rgba(255,255,255,.55); padding: 0 2px 6px; }
.assigning { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 14px; border-radius: 12px; background: rgba(0,192,144,.14); color: #00C090; font-size: 14px; margin-bottom: 8px; }
.item .box { flex: none; width: 24px; height: 24px; padding: 0; border-radius: 7px; border: 2px solid rgba(255,255,255,.4); background: transparent; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #13161D; margin-right: 6px; }
.item.on .box { background: #00C090; border-color: #00C090; }
.item .info { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: rgba(255,255,255,.75); font-size: 15px; font-family: Georgia, serif; font-style: italic; display: flex; align-items: center; justify-content: center; }
.item .info b { width: 26px; height: 26px; border: 1.5px solid rgba(255,255,255,.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 400; }

/* exercise pictures view (v7): as many tiles per row as fit at 160 px or more, which is two across on a 390 px phone and in the 440 px panel */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tiles .item.clear { grid-column: 1 / -1; }
.tile { position: relative; background: var(--card); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.tile .pic { display: block; width: 100%; aspect-ratio: 1 / 1; padding: 10px; border: 0; background: #F4F5FA; }
.tile .pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile .pic .nopic { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #6B7280; }
.tile.on .pic { box-shadow: inset 0 0 0 3px #00C090; }
.tile .mark { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid rgba(19,22,29,.35); background: #F4F5FA; color: #13161D; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.tile.on .mark { background: #00C090; border-color: #00C090; }
.tile .tname { width: 100%; min-height: 44px; padding: 8px 10px; border: 0; background: transparent; color: #FFFFFF; font-size: 14px; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.tile .tname .tag { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); }

/* exercise info sheet (v6) */
.info-sheet { display: flex; flex-direction: column; gap: 14px; }
.info-group { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #00C090; }
.info-title { font-size: 22px; font-weight: 600; }
.drawing { background: #F4F5FA; border-radius: 16px; padding: 18px; display: flex; align-items: center; justify-content: center; }
.drawing img { width: 100%; max-width: 300px; height: auto; display: block; }
.info-text { font-size: 16px; line-height: 1.45; color: rgba(255,255,255,.85); }

/* picker list */
.sheet-toggle { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; margin: 0 0 10px; padding: 0 14px; border-radius: 12px; background: var(--card); cursor: pointer; }
.sheet-toggle span:first-child { font-size: 15px; }
.langs { flex: none; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.langs button { flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255,255,255,.1); color: #FFFFFF; font-size: 14px; white-space: nowrap; }
.langs button.on { background: #00C090; color: #13161D; }
.items { display: flex; flex-direction: column; margin: 0 -8px; }
.item { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 0 4px 0 12px; border-radius: 14px; }
.item.on { background: rgba(0,192,144,.12); }
.item .pick { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; min-height: 60px; border: 0; background: transparent; color: #FFFFFF; text-align: left; padding: 0; }
.item .name { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.item.on .name { font-weight: 600; }
.item .tag { font-size: 10px; font-weight: 600; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,.14); }
.item .meta { font-size: 12px; color: rgba(255,255,255,.55); }
.item .check { font-size: 13px; color: #00C090; width: 20px; text-align: center; }
.item .play { width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #FFFFFF; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.foot { display: flex; align-items: center; justify-content: space-between; min-height: 56px; margin: 8px 4px 0; padding: 0 12px; border-top: 1px solid rgba(255,255,255,.1); cursor: pointer; }
.foot span { font-size: 16px; color: #00C090; }
.foot input { display: none; }

/* wide layout */
@media (min-width: 900px) {
  #body { flex-direction: row; }
  #tabs { display: none; }
  #scrim { display: none !important; }
  #panel { position: relative; width: 440px; height: 100%; max-height: none; border-radius: 0; border-left: 1px solid rgba(255,255,255,.08); box-shadow: none; flex: none; }
  #panel.hidden { display: flex !important; }
  #panelTabs { display: flex; }
  #done { display: none; }
}
