/* шрифты лежат на сайте: страница открывается без сторонних серверов и без связи */
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/golos-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/golos-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sofia Sans Extra Condensed"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("fonts/sofia-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Sofia Sans Extra Condensed"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("fonts/sofia-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --paper: #EEF1F4; --surface: #FFFFFF; --sunken: #F3F5F8;
  --ink: #16202E; --ink-2: #4B5768; --ink-3: #66717F; --rule: #D9DEE5;
  --action: #1B4DD8; --on-action: #FFFFFF; --action-soft: #E6EDFD;
  --ok: #146E3C; --ok-soft: #E3F4EA; --warn: #A15C00; --warn-soft: #FCF1DC; --stop: #C62828;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a;
  --steel: #9AA4B2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0F141A; --surface: #1B222C; --sunken: #151B23;
    --ink: #F2F5F8; --ink-2: #B4BECB; --ink-3: #8592A3; --rule: #2C3644;
    --action: #6A97FF; --on-action: #0B1220; --action-soft: #1E2C4A;
    --ok: #3FB56F; --ok-soft: #163424; --warn: #E0A43A; --warn-soft: #3A2D12; --stop: #F06A6A;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70;
    --steel: #6C7888;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0F141A; --surface: #1B222C; --sunken: #151B23;
  --ink: #F2F5F8; --ink-2: #B4BECB; --ink-3: #8592A3; --rule: #2C3644;
  --action: #6A97FF; --on-action: #0B1220; --action-soft: #1E2C4A;
  --ok: #3FB56F; --ok-soft: #163424; --warn: #E0A43A; --warn-soft: #3A2D12; --stop: #F06A6A;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70;
  --steel: #6C7888;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 400 16px/1.45 "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-text-size-adjust: 100%; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--action); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }
.num { font-family: "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.unit { font: 400 15px/1 "Golos Text", system-ui, sans-serif; color: var(--ink-2); letter-spacing: 0; }

/* вход: всегда тёмный, с фотографией */
#login {
  color-scheme: dark;
  --paper: #07090C; --surface: rgba(255, 255, 255, .07); --ink: #F2F5F8; --ink-2: #C3CBD6; --ink-3: #98A3B2; --rule: rgba(255, 255, 255, .22);
  --action: #6A97FF; --on-action: #0B1220; --action-soft: rgba(106, 151, 255, .16); --stop: #FF8F8F; --ok: #6FD39A;
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 32px clamp(24px, 7vw, 112px);
  background: var(--paper); color: var(--ink);
}
#login::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("login-bg.jpg") 60% center / cover no-repeat; }
#login::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 9, 12, .9) 0%, rgba(7, 9, 12, .72) 30%, rgba(7, 9, 12, 0) 60%); }
.login-card { width: 100%; max-width: 360px; }
.login-card h1 { font-size: clamp(64px, 9vw, 128px); line-height: .85; }
.login-card .lead { color: var(--ink-2); margin-top: 14px; }
.login-card form { margin-top: 32px; display: grid; gap: 12px; }
.login-card .input { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.login-card .back { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.login-card .credit { margin-top: 28px; font-size: 12px; color: var(--ink-3); }
.login-card .credit a { color: inherit; }
.form-ok { color: var(--ok); font-size: 15px; margin-top: 24px; }
@media (max-width: 700px) {
  #login { align-items: end; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  #login::before { bottom: auto; height: 68vh; height: 68svh; background-position: 61% top; background-size: auto 100%; }
  #login::after { background: linear-gradient(180deg, rgba(7, 9, 12, 0) 34%, rgba(7, 9, 12, .88) 56%, #07090C 68%); }
  #login.tall::after { background: linear-gradient(180deg, rgba(7, 9, 12, .4) 0%, rgba(7, 9, 12, .9) 38%, #07090C 68%); }
  .login-card { max-width: none; }
}

/* элементы */
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; color: var(--ink-2); }
.input { width: 100%; min-height: 46px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; }
.panel .input { background: var(--sunken); }
textarea.input { min-height: 84px; resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--action); color: var(--on-action); font-weight: 600; text-decoration: none; text-align: center; }
.btn.ghost { background: var(--action-soft); color: var(--action); }
.btn.plain { background: none; color: var(--ink-2); border: 1px solid var(--rule); font-weight: 500; }
.hint { font-size: 14px; color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.act { background: var(--action-soft); color: var(--action); }
.seg { display: inline-flex; background: var(--sunken); border-radius: 8px; padding: 3px; }
.seg button { border: 0; background: none; min-height: 34px; padding: 0 12px; border-radius: 6px; font-size: 14px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--rule); }
.switch { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; min-height: 44px; font-size: 15px; color: var(--ink); }
.switch i { width: 42px; height: 24px; border-radius: 12px; background: var(--rule); position: relative; flex: none; transition: background .15s ease; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: transform .15s ease; }
.switch[aria-checked="true"] i { background: var(--action); }
.switch[aria-checked="true"] i::after { transform: translateX(18px); }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* каркас */
.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 22px 12px; background: var(--surface); border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.brand { padding: 0 12px 18px; font-size: 40px; line-height: .9; }
.brand small { display: block; font: 400 13px/1.3 "Golos Text", system-ui, sans-serif; color: var(--ink-3); letter-spacing: 0; margin-top: 6px; }
.nav { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); text-align: left; }
.nav svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav:hover { background: var(--sunken); }
.nav[hidden] { display: none !important; }
.nav[aria-current="page"] { background: var(--action-soft); color: var(--action); font-weight: 600; }
.side-foot { margin-top: auto; padding: 12px; font-size: 13px; color: var(--ink-3); display: grid; gap: 8px; }
.side-foot button { border: 0; background: none; padding: 0; color: var(--ink-2); text-align: left; font-size: 14px; text-decoration: underline; min-height: 28px; }

.content { padding: 0 28px 56px; max-width: 1240px; width: 100%; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0 18px; flex-wrap: wrap; }
.top h1 { font-size: 26px; font-weight: 600; line-height: 1.15; }
.top p { color: var(--ink-2); font-size: 15px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; }
.c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.panel { background: var(--surface); border-radius: 14px; padding: 18px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel h2 { font-size: 16px; font-weight: 600; }
.panel .sub { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 14px; }

/* сегодня */
.today h3 { font-size: 46px; line-height: .95; font-weight: 700; margin-top: 4px; }
.quick { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 14px; }
.next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 12px; }
.next-lift .name { font-size: 15px; color: var(--ink-2); }
.next-lift .load { font-size: 30px; line-height: 1; display: block; margin-top: 2px; }

/* показатели */
.kpi .label { font-size: 14px; color: var(--ink-2); }
.kpi .value { font-size: 52px; line-height: 1; margin-top: 6px; }
.kpi .meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }

/* задачи */
.todo li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--rule); }
.todo li:first-child { border-top: 0; }
.todo input { width: 24px; height: 24px; margin: 0; accent-color: var(--ok); flex: none; }
.todo label { flex: 1; cursor: pointer; }
.todo small { display: block; color: var(--ink-2); font-size: 13px; }
.todo input:checked + label { color: var(--ink-3); text-decoration: line-through; }
#checks input:checked + label { color: var(--ink); text-decoration: none; }

/* график */
.legend { display: flex; gap: 16px; font-size: 14px; color: var(--ink-2); margin-top: 10px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend i.line { width: 16px; height: 2px; border-radius: 1px; }
.chart-wrap { position: relative; margin-top: 6px; }
.chart { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart text { font: 400 12px "Golos Text", system-ui, sans-serif; fill: var(--ink-3); }
.chart .gl { stroke: var(--rule); stroke-width: 1; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); padding: 6px 9px; border-radius: 6px; font-size: 13px; line-height: 1.35; white-space: nowrap; transform: translate(-50%, -112%); opacity: 0; z-index: 2; }

/* путь к цели */
.track-wrap { position: relative; margin: 46px 0 66px; }
.track { height: 12px; border-radius: 6px; background: var(--sunken); position: relative; }
.track .done { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--series-1); }
.track .band { position: absolute; top: -4px; bottom: -4px; border-radius: 4px; border: 2px solid var(--ok); }
.track .band.est { border-color: var(--ink-3); border-style: dashed; }
.track .tick { position: absolute; top: -7px; bottom: -7px; width: 2px; background: var(--ink); }
.track .now { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--series-1); border: 3px solid var(--surface); transform: translate(-50%, -50%); }
.mark { position: absolute; font-size: 13px; color: var(--ink-2); white-space: nowrap; line-height: 1.2; }
.mark b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.mark.up { bottom: 22px; } .mark.down { top: 22px; }
.key { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; column-gap: 10px; }
.key small { grid-column: 2; color: var(--ink-2); font-size: 13px; }
.key i { width: 16px; height: 12px; }
.key i.k-est { border: 2px dashed var(--ink-3); border-radius: 3px; }
.key i.k-goal { border: 2px solid var(--ok); border-radius: 3px; }
.key i.k-tick { width: 2px; height: 16px; background: var(--ink); margin: 0 7px; }

/* норматив */
.numline { position: relative; height: 96px; margin-top: 18px; }
.nl-track { position: absolute; left: 0; right: 0; top: 44px; height: 4px; border-radius: 2px; background: var(--rule); }
.nl-gap { position: absolute; top: 44px; height: 4px; background: var(--action); border-radius: 2px; }
.nl-tick { position: absolute; top: 0; transform: translateX(-50%); text-align: center; font-size: 13px; color: var(--ink-2); line-height: 1.15; }
.nl-tick b { display: block; font-size: 15px; color: var(--ink); font-weight: 600; }
.nl-tick::after { content: ""; display: block; width: 2px; height: 14px; margin: 4px auto 0; background: var(--ink-3); }
.nl-tick.target b, .nl-tick.target { color: var(--action); }
.nl-tick.target::after { background: var(--action); height: 18px; }
.nl-now { position: absolute; top: 37px; width: 18px; height: 18px; border-radius: 50%; background: var(--series-2); border: 3px solid var(--surface); transform: translateX(-50%); }
.nl-now-label { position: absolute; top: 62px; font-size: 13px; color: var(--ink-2); line-height: 1.2; white-space: nowrap; }
.nl-now-label b { display: block; color: var(--ink); font-size: 15px; }
.rank-ctl { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.lead-num { font-size: 40px; line-height: 1; margin-top: 14px; }

/* состав тела */
.stackbar { display: flex; gap: 2px; height: 22px; margin-top: 16px; }
.stackbar i { display: block; height: 100%; }
.stackbar i:first-child { border-radius: 4px 0 0 4px; } .stackbar i:last-child { border-radius: 0 4px 4px 0; }
.parts { display: grid; gap: 8px; margin-top: 14px; }
.parts li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.parts li span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.parts li i { width: 10px; height: 10px; border-radius: 2px; }

/* этап */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.step { padding-top: 14px; border-top: 4px solid var(--rule); min-width: 0; }
.step.next, .step.today { border-top-color: var(--action); }
.step.done { border-top-color: var(--ok); }
.step.part, .step.now { border-top-color: var(--warn); }
.step.miss { border-top-color: var(--stop); }
.step.opt { opacity: .75; }
.step .pct { font-size: 34px; line-height: 1; }
.step .pct.word { font-size: 24px; line-height: 1.05; overflow-wrap: anywhere; }
.step p { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.rules { list-style: disc; padding-left: 18px; margin-top: 18px; color: var(--ink-2); font-size: 14px; display: grid; gap: 6px; }

/* гриф */
.bar { display: block; width: 100%; max-width: 380px; height: 64px; margin-top: 8px; }
.next-lift .bar { max-width: 200px; height: 56px; margin-top: 6px; }
.bar-cap { display: block; font-size: 13px; color: var(--ink-2); }

/* день */
.daystrip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scrollbar-width: thin; }
.daystrip button { flex: none; width: 58px; padding: 8px 0 10px; border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2); font-size: 13px; position: relative; }
.daystrip button b { display: block; font-size: 26px; line-height: 1; color: var(--ink); }
.daystrip button.train::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--action); transform: translateX(-50%); }
.daystrip button.done::after { background: var(--ok); }
.daystrip button.miss::after { background: var(--stop); }
.daystrip button.part::after, .daystrip button.now::after { background: var(--warn); }
.daystrip button.mon { margin-left: 10px; }
.daystrip button.mon:first-child { margin-left: 0; }
.daystrip button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.daystrip button[aria-pressed="true"] b { color: var(--paper); }
.session-head h2 { font-size: 56px; line-height: .9; font-weight: 700; }
.progress { height: 6px; background: var(--sunken); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 3px; transition: width .25s ease; }
.lift { padding: 16px 0 8px; border-top: 1px solid var(--rule); }
.lift:first-child { border-top: 0; padding-top: 6px; }
.lift-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lift-head h3 { font-size: 17px; font-weight: 600; }
.lift-head .load { font-size: 32px; line-height: 1; white-space: nowrap; }
.warm { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.sets { display: grid; gap: 10px; margin-top: 12px; }
.set { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; align-items: center; }
.set > input[type=checkbox] { width: 24px; height: 24px; margin: 0; accent-color: var(--ok); }
.who { width: 24px; height: 24px; border-radius: 50%; background: var(--sunken); color: var(--ink-2); font-size: 13px; font-weight: 600; display: grid; place-items: center; }
.stepper { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--sunken); }
.stepper button { border: 0; background: none; min-height: 44px; font-size: 20px; color: var(--ink-2); }
.stepper button:active { background: var(--rule); }
.stepper input { border: 0; background: var(--surface); text-align: center; font-size: 17px; min-width: 0; width: 100%; padding: 0; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-wrap { display: grid; gap: 2px; }
.stepper-wrap small { font-size: 12px; color: var(--ink-3); text-align: center; }
.set.done .stepper { border-color: var(--ok); }
.verdict { margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-size: 15px; background: var(--sunken); color: var(--ink-2); }
.verdict.go { background: var(--ok-soft); color: var(--ink); }
.verdict.go b { color: var(--ok); }
details.stops summary { cursor: pointer; color: var(--stop); font-weight: 500; min-height: 44px; display: flex; align-items: center; }
details.stops ul { list-style: disc; padding-left: 20px; color: var(--ink-2); }
details.stops li { margin: 4px 0; }
.switches { display: flex; gap: 18px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack { display: grid; gap: 12px; margin-top: 14px; }
.side-col { display: grid; gap: 14px; align-content: start; min-width: 0; }

.actionbar { position: sticky; bottom: 14px; z-index: 15; margin-top: 14px; background: var(--ink); color: var(--paper); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.actionbar .what { font-size: 14px; line-height: 1.3; min-width: 0; }
.actionbar .what b { display: block; font-size: 16px; font-weight: 600; }
.actionbar .timer { font-size: 40px; line-height: 1; }
.actionbar .acts { display: flex; gap: 8px; }
.actionbar .btn { background: var(--paper); color: var(--ink); }
.actionbar .btn.dim { background: transparent; color: var(--paper); border: 1px solid color-mix(in srgb, var(--paper) 40%, transparent); font-weight: 500; }

/* таблицы и еда */
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 8px 4px; border-top: 1px solid var(--rule); }
th { font-weight: 500; color: var(--ink-2); font-size: 14px; border-top: 0; }
th:first-child, td:first-child { text-align: left; }
tr.sum td { font-weight: 600; }
.big { font-size: 40px; line-height: 1; }
.lift-row { margin-top: 16px; }
.lift-row .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lift-row .row span { font-size: 14px; color: var(--ink-2); }
.meter { height: 8px; border-radius: 4px; background: var(--sunken); margin-top: 6px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--series-1); transition: width .25s ease; }
.meal { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.meal:first-child { border-top: 0; }
.meal small { color: var(--ink-2); white-space: nowrap; }
.empty { color: var(--ink-2); padding: 8px 0; }

/* план */
.day { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.day:first-child { border-top: 0; }
.day .when { color: var(--ink-2); font-size: 14px; }
.day .when b { display: block; font-size: 26px; line-height: 1; color: var(--ink); }
.day .what small { display: block; color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.day .what a { font-size: 14px; display: inline-block; margin-top: 6px; }
.mini { font-size: 14px; margin-top: 6px; max-width: 420px; }
.mini td { padding: 5px 4px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 30; display: flex; gap: 14px; align-items: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; background: none; color: var(--paper); text-decoration: underline; padding: 0; font-weight: 600; }

@media (max-width: 1100px) {
  .c3 { grid-column: span 6; } .c4, .c5, .c6, .c7, .c8 { grid-column: span 12; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 20; flex-direction: row; gap: 0; padding: 0 4px env(safe-area-inset-bottom); border-right: 0; border-top: 1px solid var(--rule); }
  .brand, .side-foot { display: none; }
  .nav { flex: 1; flex-direction: column; gap: 3px; justify-content: center; min-height: 58px; padding: 0 2px; font-size: 12px; text-align: center; border-radius: 0; }
  .nav[aria-current="page"] { background: none; box-shadow: inset 0 3px 0 var(--action); }
  .content { padding: 0 16px 96px; }
  .top { padding: 16px 0 12px; }
  .top h1 { font-size: 22px; }
  .grid { gap: 12px; }
  .c3 { grid-column: span 6; } .c12 { grid-column: span 12; }
  .kpi .value { font-size: 44px; }
  .panel { padding: 16px; }
  .toast { bottom: 76px; width: max-content; max-width: calc(100vw - 32px); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .steps.words { grid-template-columns: repeat(4, 1fr); column-gap: 6px; }
  .steps.words .pct.word { font-size: 20px; }
  .steps.words .step p { font-size: 12px; }
  .next-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .side-col { display: contents; }
  .side-col > .panel { grid-column: 1 / -1; }
  .p-check { order: 1; } .p-lifts { order: 2; } .p-tasks { order: 3; } .p-feel { order: 4; }
  .actionbar { position: fixed; left: 8px; right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); margin: 0; }
  #v-day { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- дополнения для рабочего сайта ---------- */
.form-error { color: var(--stop); font-size: 15px; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--ink-2); margin: 0; padding: 24px; text-align: center; }
.only-phone { display: none; margin: 0; }
.side-foot form { margin: 0; }
.side-foot a { color: var(--ink-2); font-size: 14px; min-height: 28px; display: inline-flex; align-items: center; }
.foot-links.only-phone { margin: 28px 0 0; text-align: center; font-size: 14px; }
.foot-links a { color: var(--ink-2); display: inline-block; padding: 10px 12px; }
.meal button { border: 0; background: none; color: var(--ink-3); text-decoration: underline; font-size: 13px; padding: 0; margin-left: 10px; }
@media (max-width: 820px) { .only-phone { display: block; } }
.top-actions { flex-wrap: wrap; justify-content: flex-end; }
#sync .narrow { display: none; }
@media (max-width: 820px) { #sync .wide { display: none; } #sync .narrow { display: inline; } }

/* ---------- обновление 30.09: сегодня, недели плана, питание, кнопки-ссылки ---------- */
.link { border: 0; background: none; padding: 6px 0; color: var(--action); text-decoration: underline; font-size: 14px; min-height: 32px; }
.today-weight { margin-top: 14px; display: grid; gap: 10px; }
.today-w { font-size: 15px; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.today-w b { font-size: 30px; color: var(--ink); line-height: 1; }
.acts-cell { white-space: nowrap; }
.acts-cell a, .acts-cell .link { margin-left: 10px; }
.food-day { display: flex; gap: 8px; align-items: center; }
.food-day .input { min-height: 40px; padding: 6px 10px; width: auto; }
.food-day .btn { min-height: 40px; padding: 0 12px; }
.recent { margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips .chip { border: 0; min-height: 36px; padding: 6px 12px; white-space: normal; text-align: left; cursor: pointer; }
.chips .chip small { color: inherit; font-size: 12px; }
details.week { border-top: 1px solid var(--rule); }
details.week:first-child { border-top: 0; }
details.week > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 52px; padding: 8px 0; }
details.week > summary::-webkit-details-marker { display: none; }
details.week > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); margin: 0 4px 0 2px; transition: transform .15s ease; flex: none; }
details.week[open] > summary::before { transform: rotate(45deg); }
details.week > summary b { font-size: 22px; line-height: 1; }
details.week > summary > span { color: var(--ink-2); font-size: 14px; }
details.week > summary .chip { margin-left: auto; }
.day-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.day-links a { font-size: 14px; }
.day.today .when b { color: var(--action); }
@media (max-width: 360px) {
  .chip { white-space: normal; text-align: left; }
  .meal { flex-direction: column; gap: 4px; }
  .meal small { white-space: normal; }
  .top { gap: 8px; }
  .kpi .meta { display: grid; }
}
@media (max-width: 820px) {
  .food-day { width: 100%; }
  .food-day .input { flex: 1; }
  details.week > summary .chip { margin-left: 0; }
}

/* ---------- завершение занятия ---------- */
.finish { background: var(--ok-soft); }
.finish-head { display: flex; gap: 14px; align-items: flex-start; }
.finish-head svg { width: 44px; height: 44px; flex: none; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.finish-head h2 { font-size: 22px; }
.finish-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 16px; }
.finish-stats b { display: block; font-size: 34px; line-height: 1; }
.finish-stats span { font-size: 13px; color: var(--ink-2); }
.finish-lifts { display: grid; gap: 6px; margin-top: 16px; }
.finish-lifts li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.finish-lifts li > span:first-child { flex: 1; color: var(--ink-2); }
.finish-lifts b { font-size: 18px; }
.actionbar .acts .btn.dim { min-width: 0; }

/* ---------- обновление 01.10: обзор и прогресс, занятие с первого экрана, перенос, итог недели ---------- */
.top-actions { flex-wrap: nowrap; }
.foot-links.only-phone { display: none; }
.foot-links form { display: inline; margin: 0; }
.foot-links button { border: 0; background: none; color: var(--ink-2); text-decoration: underline; font-size: 14px; padding: 10px 12px; min-height: 44px; }
#sync b { color: var(--ink); }

/* обзор */
.today-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.today-acts .btn { flex: 1 1 auto; padding: 0 12px; white-space: nowrap; }
.today .verdict { margin-top: 10px; }
.verdict .link { padding: 0; min-height: 24px; margin-left: 4px; }
.sleep-q { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; align-items: center; }
.sleep-q span { font-size: 15px; color: var(--ink-2); }
.sleep-q .input { text-align: center; }
.today-weight .link { justify-self: start; }
.wk-list { margin-top: 10px; }
.wk-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--rule); }
.wk-list li:first-child { border-top: 0; }
.wk-list span { color: var(--ink-2); font-size: 15px; }
.wk-list b { font-size: 26px; line-height: 1; }
.wk-list small { grid-column: 1 / -1; color: var(--ink-2); font-size: 13px; }

/* прогресс */
.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 280px; }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 14px; }
.mini-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; color: var(--ink-2); }
.mini-head b { font-size: 26px; line-height: 1; color: var(--ink); }

/* занятие */
.session-head .verdict { margin-top: 10px; }
.head-links { display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.head-links a { font-size: 14px; display: inline-flex; align-items: center; min-height: 32px; }
.lift { scroll-margin-top: 10px; }
.lift.cur .lift-head h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--action); margin-right: 8px; vertical-align: 2px; }
.set.cur { background: var(--action-soft); border-radius: 10px; margin: -5px -6px; padding: 5px 6px; }
.set.cur .stepper-wrap small { color: var(--ink-2); }
.p-lifts .switches { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
details.stops { margin-top: 4px; }
details.p-check > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
details.p-check > summary::-webkit-details-marker { display: none; }
details.p-check > summary h2 { display: flex; align-items: center; gap: 10px; }
details.p-check > summary h2::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform .15s ease; flex: none; }
details.p-check[open] > summary h2::before { transform: rotate(45deg); }
details.p-check[open] > summary { margin-bottom: 4px; }

/* нижняя панель: правка подхода на месте, заметный конец отдыха */
.actionbar .resting { display: flex; gap: 14px; align-items: center; min-width: 0; }
.actionbar .over { display: block; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.bar-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1 1 280px; min-width: 0; max-width: 420px; }
.bar-steps.one { grid-template-columns: 1fr; max-width: 205px; }
.actionbar .stepper { background: color-mix(in srgb, var(--paper) 16%, transparent); border-color: color-mix(in srgb, var(--paper) 38%, transparent); }
.actionbar .stepper button { color: var(--paper); }
.actionbar .stepper button:active { background: color-mix(in srgb, var(--paper) 30%, transparent); }
.actionbar .stepper input { background: var(--paper); color: var(--ink); font-weight: 600; }
.actionbar .stepper-wrap small { color: var(--paper); }
@keyframes bar-flash { 0%, 100% { background: var(--ink); } 50% { background: var(--action); } }
.actionbar.flash { animation: bar-flash .9s ease-in-out 10; }
@media (prefers-reduced-motion: reduce) { .actionbar.flash { animation: none; outline: 4px solid var(--action); outline-offset: 2px; } }

/* итог занятия: что дальше */
.finish-next { margin-top: 16px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.finish-next h3 { font-size: 15px; font-weight: 600; }
.finish-next p { font-size: 15px; margin-top: 6px; }
.finish-next ul { display: grid; gap: 6px; margin-top: 8px; }
.finish-next li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; font-size: 15px; }
.finish-next li > span:first-child { color: var(--ink-2); flex: 1 1 150px; }
.finish-next .hint { color: var(--ink-2); }

/* окно переноса */
dialog.sheet { border: 0; border-radius: 14px; padding: 20px; width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; background: var(--surface); color: var(--ink); }
dialog.sheet::backdrop { background: rgba(7, 9, 12, .55); }
dialog.sheet h2 { font-size: 18px; font-weight: 600; }
dialog.sheet .sub { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
dialog.sheet fieldset { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
dialog.sheet legend { font-size: 14px; color: var(--ink-2); padding: 0; margin-bottom: 8px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick label { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); border: 1px solid var(--rule); font-size: 15px; cursor: pointer; }
.pick input:checked + label { background: var(--action-soft); color: var(--action); border-color: var(--action); font-weight: 600; }
.pick input:focus-visible + label { outline: 3px solid var(--action); outline-offset: 2px; }
.pick.col { flex-direction: column; flex-wrap: nowrap; }
.pick.col label { border-radius: 10px; padding: 8px 14px; }
.pick label small { display: block; font-size: 13px; font-weight: 400; color: var(--ink-2); }

@media (max-width: 1100px) { .minis { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) {
  .top { flex-wrap: nowrap; align-items: flex-start; }
  .foot-links.only-phone { display: block; }
  .o-today { order: 1; } .o-next { order: 2; } .o-todo { order: 3; } .o-week { order: 4; } .o-stage { order: 5; }
  #next-panel.dup { display: none; }
  .session-head h2 { font-size: 44px; }
  .p-check { order: 1; } .finish { order: 0; }
  .actionbar { padding: 10px 12px; gap: 10px; }
  .actionbar .what { flex: 1 1 100%; }
  .actionbar .what b { display: inline; margin-right: 8px; }
  .actionbar .resting .what b { display: block; }
  .bar-steps { flex: 1 1 100%; max-width: none; }
  .actionbar .acts { flex: 1 1 100%; }
  .actionbar .acts .btn { flex: 1 1 auto; }
  .actionbar .acts .btn.dim { flex: 0 0 auto; }
  #v-day { padding-bottom: 0; }
  #v-day.with-bar { padding-bottom: 230px; }
  dialog.sheet { margin: auto auto 12px; }
  /* сообщения сверху: внизу они закрывали бы кнопку подхода */
  .toast { bottom: auto; top: calc(10px + env(safe-area-inset-top)); transform: translate(-50%, -20px); }
  .toast.on { transform: translate(-50%, 0); }
}
@media (max-width: 360px) { .top-actions { flex-wrap: wrap; } .sleep-q { grid-template-columns: minmax(0, 1fr) 80px; } }

/* обновление 01.10, версия 4: запас повторов в последнем подходе */
.rir { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.rir > span { flex: 1 1 150px; min-width: 0; }
.rir-btns { display: grid; grid-template-columns: repeat(4, 46px); gap: 6px; }
.rir-btns button { min-height: 40px; padding: 0; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 600; }
.rir-btns button[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: var(--on-action); }
.rir-btns button:disabled { color: var(--ink-3); background: var(--sunken); font-weight: 400; }
.nw { white-space: nowrap; }
.actionbar .bar-rir { flex: 1 1 100%; margin: 0; padding-bottom: 10px; border-bottom: 1px solid color-mix(in srgb, var(--paper) 30%, transparent); color: var(--paper); }
.actionbar .bar-rir > span { flex: 1 1 250px; }
.actionbar .bar-rir .rir-btns { flex: 1 1 200px; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 320px; }
.actionbar .rir-btns button { background: transparent; border-color: color-mix(in srgb, var(--paper) 45%, transparent); color: var(--paper); }
.actionbar .rir-btns button[aria-pressed="true"] { background: var(--paper); border-color: var(--paper); color: var(--ink); }
/* на экранах уже 300 px вес упражнения уходит под название, а не за край */
.lift-head { flex-wrap: wrap; gap: 4px 12px; }
.lift-head h3 { flex: 1 1 90px; min-width: 0; }

/* ---------- добавки ---------- */
.supp li.out label { color: var(--ink-3); }
.supp li.skip { opacity: .7; }
.supp .chip { margin-left: 8px; vertical-align: middle; }
.supp-stock { display: grid; gap: 0; margin-top: 8px; }
.supp-stock li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.supp-stock li:first-child { border-top: 0; }
.supp-stock li > span { min-width: 0; }
.supp-stock small { display: block; color: var(--ink-2); font-size: 13px; }
.supp-stock .seg { flex: none; }
.supp-stock .seg button { min-height: 32px; padding: 0 10px; font-size: 13px; }
.supp-stock .seg button[data-v="1"][aria-pressed="true"] { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.table-wrap { overflow-x: auto; margin-top: 6px; }
#supp-week td, #supp-week th { text-align: center; padding: 6px 4px; }
#supp-week td:first-child, #supp-week th:first-child { text-align: left; white-space: nowrap; }
#supp-week td.y { color: var(--ok); font-weight: 600; }
#supp-week td.n { color: var(--ink-3); }
@media (max-width: 360px) { .nav { font-size: 11px; padding: 0 1px; } .supp-stock li { flex-direction: column; align-items: flex-start; gap: 6px; } }
/* страница паролей: две формы */
.login-card .form-h { font-size: 17px; margin-top: 4px; }
.login-card .form-second { margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); }
.login-card .hint { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
/* вкладка «Упражнения» */
.ex-pick { min-width: 220px; }
.ex-pick select { width: 100%; }
.ex-controls { gap: 8px 14px; flex-wrap: wrap; }
.ex-h3 { font-size: 15px; margin-top: 18px; }
#ex-best td:last-child, #ex-last td:last-child { text-align: right; white-space: nowrap; }
@media (max-width: 720px) { .ex-pick { min-width: 0; width: 100%; } }
