@font-face { font-family: 'Wix Madefor Display'; src: url('/fonts/wix-madefor-display-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 400 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Wix Madefor Display'; src: url('/fonts/wix-madefor-display-latin-wght-normal.woff2') format('woff2'); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212; }
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212; }

:root {
  --radius: 12px;
  --num-font: 'Wix Madefor Display', 'Montserrat', sans-serif;
  --gutter: 16px;
}
[data-theme='light'] {
  color-scheme: light;
  --grad-good: linear-gradient(150deg, #178A5C, #0E6B47); --grad-bad: linear-gradient(150deg, #C4443A, #9B1C14);
  --page: #E9EEF7; --panel: #FFFFFF; --panel-2: #E3E9F4; --ink: #14233C; --ink-2: #4B5870; --ink-3: #5F6B82;
  --rule: #E2E7F0; --rule-2: #B4BECF; --accent: #0047AB; --on-accent: #FFFFFF; --accent-soft: #DCE7F7; --hero: linear-gradient(150deg, #1F3F75, #14294F);
  --c1: #2F6BD0; --c2: #0A9488; --c-soft: #9DB7DC; --bar-good: #7CC2A0; --bar-bad: #E39A92; --good: #116A3E; --good-soft: #D9F2E1; --bad: #9B1C14; --bad-soft: #FBDFDC; --nav: #FFFFFF; --panel-rule: transparent;
}
[data-theme='dark'] {
  color-scheme: dark;
  --grad-good: linear-gradient(150deg, #178A5C, #0E6B47); --grad-bad: linear-gradient(150deg, #C4443A, #9B1C14);
  --page: #0D1626; --panel: #17243B; --panel-2: #27384F; --ink: #EEF2F8; --ink-2: #B5C0D2; --ink-3: #9AA7BC;
  --rule: #27384F; --rule-2: #46597A; --accent: #6FA0F5; --on-accent: #08152E; --accent-soft: #223663; --hero: linear-gradient(150deg, #2A5294, #183564);
  --c1: #5B8DE8; --c2: #2FA79A; --c-soft: #3E5A8C; --bar-good: #3F9A76; --bar-bad: #B85C52; --good: #8EE0AE; --good-soft: #1F4034; --bad: #FF9C92; --bad-soft: #4B2A27; --nav: #17243B; --panel-rule: transparent;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 500 15px/1.45 'Montserrat', system-ui, sans-serif; }
::selection { background: var(--accent); color: var(--on-accent); }
* { scrollbar-color: var(--rule-2) transparent; scrollbar-width: thin; }
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--num-font); font-weight: 800; letter-spacing: -.015em; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Каркас */
.shell { min-height: 100dvh; }
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 32px; background: var(--page); }
.brand { background: var(--panel); border-radius: 99px; padding: 11px 18px; font: 800 15px var(--num-font); }
.pills { display: flex; gap: 2px; background: var(--panel); border-radius: 99px; padding: 4px; }
.nav button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px; background: none; border: 0; border-radius: 99px; color: var(--ink); transition: background-color .12s ease-out; }
.nav button:hover { background: var(--panel-2); }
.nav button[aria-current='page'] { background: var(--accent); color: var(--on-accent); }
.nav .pills svg { display: none; }
.nav .set { background: var(--panel); }
.nav .set svg, .icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.main { min-width: 0; padding: 12px 32px 56px; max-width: 1304px; width: 100%; margin: auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.top h1 { font: 800 30px/1.15 var(--num-font); letter-spacing: -.015em; line-height: 1.15; text-wrap: balance; }
.demo { margin-bottom: 14px; padding: 8px 12px; font-size: 14px; background: var(--panel-2); color: var(--ink); border: 1px solid var(--rule-2); border-radius: var(--radius); }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; background: var(--accent-soft); color: var(--ink); border-radius: var(--radius); }

/* Поверхности */
.panel { background: var(--panel); border-radius: 20px; padding: 16px 18px; border: 1px solid var(--panel-rule); min-width: 0; }
.panel > h2, .sec { font: 800 18px/1.2 var(--num-font); margin: 0 0 12px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.t-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.rowx { display: grid; gap: 14px; align-items: stretch; }
.r4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col { display: flex; flex-direction: column; }
.col > :last-child { flex: 1; }
.wk, .wk > .panel { display: flex; flex-direction: column; flex: 1; }
.grownotes { display: flex; flex-direction: column; }
.grownotes .notes { flex: 1; grid-auto-rows: 1fr; }
.grownotes .field { margin-bottom: 0; grid-template-rows: auto 1fr; }
.kpi { margin-bottom: 8px; }
.hero h2 { color: #fff; }
.r4 .hero { display: flex; flex-direction: column; }
.r4 .hero p { margin-bottom: 14px; }
.r4 .hero .meter { margin-top: auto; }
.gapt { margin-top: 14px; }
.chg-good { color: var(--good); }
.chg-bad { color: var(--bad); }
.stat .d.chg-good, .stat .d.chg-bad { font-weight: 600; }
.stat .v { font-size: 32px; }
.stat .v.chg-good, .stat .v.chg-bad, .row .val.chg-good, .row .val.chg-bad { display: inline-block; padding: 5px 12px; border-radius: 12px; }
.stat .v.chg-good small, .stat .v.chg-bad small { color: #fff; }
.v.chg-good, .val.chg-good, input.chg-good, td.chg-good { background: var(--grad-good); color: #fff; }
.v.chg-bad, .val.chg-bad, input.chg-bad, td.chg-bad { background: var(--grad-bad); color: #fff; }
.track, .stm, .tbl { border-collapse: separate !important; border-spacing: 0; }
.track td.pct.chg-good, .track td.pct.chg-bad, .track td.dayp.chg-good, .track td.dayp.chg-bad { color: #fff; }
.even .k { min-height: 2.7em; }
.hint { margin: -6px 0 8px; }
.track td.chg-good, .track td.chg-bad, .stm td.chg-good, .stm td.chg-bad, .tbl td.chg-good, .tbl td.chg-bad { border-radius: 7px; font-weight: 700; }
.tbl td.chg-good, .tbl td.chg-bad { padding-inline: 8px; text-align: center; }
.inputs > .panel { display: flex; flex-direction: column; }
.inputs > .panel > .row { flex: 1; align-content: center; }
.wlist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 18px; align-items: end; }
.wlist .wtask { border-top: 0; align-content: end; }
.wtask { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--rule); }
.wtask:first-of-type { border-top: 0; }
.wctl { display: flex; gap: 6px; align-items: stretch; }
.wctl .tag { flex: 1; justify-content: center; min-height: 44px; }
.wctl .btn { flex: none; width: 52px; padding: 0; }
.mark { width: 100%; min-height: 44px; border: 1px solid var(--rule-2); border-radius: 10px; background: var(--panel); color: var(--ink); font: 600 15px 'Montserrat', sans-serif; cursor: pointer; }
.mark:hover { background: var(--panel-2); }
.mark[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.stat .v { display: inline-flex; align-items: center; gap: 4px; min-height: 46px; }
.stats3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.total { grid-template-columns: minmax(0, 1fr) auto; }
.totalin { display: grid; grid-template-columns: 110px 42px; gap: 8px; align-items: center; }
.totalin input { text-align: right; font-weight: 700; }
.totalin input.chg-good, .totalin input.chg-bad { border-color: transparent; }
.hero.fill { display: flex; flex-direction: column; gap: 10px; }
.hero.fill p { margin-top: 0; }
.wk-rows { display: grid; gap: 8px; flex: 1; align-content: center; }
.wk-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.wk-row .meter { margin: 0; }
.wk-row b { text-align: right; }
.grade { font: 800 22px/1.1 var(--num-font); }
.hero p { margin-top: 8px; }
.more { margin-top: 8px; }
.notes { display: grid; gap: 4px; margin-top: 10px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calh { text-align: center; font-size: 14px; color: var(--ink-2); }
.cald { min-height: 56px; border-radius: 10px; padding: 5px 2px; display: grid; justify-items: center; align-content: center; gap: 1px; background: var(--panel-2); color: var(--ink-2); }
.cald i { font-style: normal; font-size: 14px; }
.cald b { font-size: 14px; font-weight: 700; color: var(--ink); }
.cald.none { background: none; }
.cald.mid { background: var(--panel-2); color: var(--ink); }
.cald.hi { background: var(--grad-good); color: #fff; }
.cald.hi b { color: #fff; }
.cald.lo { background: var(--grad-bad); color: #fff; }
.cald.lo b { color: #fff; }

/* Кнопки */
.btn { min-height: 44px; padding: 8px 14px; background: var(--panel); border: 1px solid var(--rule-2); border-radius: var(--radius); transition: background-color .12s ease-out, transform .12s ease-out; }
.btn:hover { background: var(--panel-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 500; }
.btn.primary:hover { filter: brightness(1.08); }
.linkbtn { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.nowrap { white-space: nowrap; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--rule-2); border-radius: var(--radius); padding: 2px; }
.seg button { min-height: 38px; padding: 4px 12px; background: none; border: 0; border-radius: 6px; color: var(--ink-2); }
.seg button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); font-weight: 500; }
input[type='number'], input[type='text'], input[type='password'], input[type='time'], textarea { width: 100%; min-height: 44px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--rule-2); border-radius: var(--radius); font-size: 16px; }
textarea { min-height: 72px; resize: vertical; }

/* День */
.daybar { display: flex; align-items: center; gap: 6px; }
.daybar .btn { min-width: 44px; padding: 0; display: inline-grid; place-items: center; }
.daylabel { font-weight: 500; min-width: 128px; text-align: center; color: var(--ink); }
.panel.hero { background: var(--hero); color: #fff; }
.hero .muted { color: #fff; }
.hero .meter { background: rgb(255 255 255 / .22); }
.hero .meter i { background: #fff; }
.score { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.score b { font-size: 56px; line-height: 1; letter-spacing: -.02em; }
.meter { height: 8px; margin-top: 12px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* Быстрый ввод */
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.row:first-of-type { border-top: 0; padding-top: 0; }
.row .val { font-size: 20px; text-align: right; white-space: nowrap; }
.row .unit { font-size: 14px; color: var(--ink-2); margin-left: 3px; font-family: 'Montserrat', sans-serif; font-weight: 400; }
.chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 44px; min-width: 56px; padding: 6px 10px; background: var(--panel-2); border: 1px solid transparent; border-radius: var(--radius); font-variant-numeric: tabular-nums; transition: background-color .12s ease-out, transform .12s ease-out; }
.chip:hover { border-color: var(--rule-2); }
.chip:active { transform: scale(.95); }
.chip.custom { display: inline-flex; flex: 1 1 90px; padding: 0; background: none; }
.chip.custom input { min-width: 0; }
.yn button { min-width: 50px; }
.rating { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.rating button { min-height: 44px; padding: 0; background: var(--panel-2); border: 0; border-radius: 6px; font-variant-numeric: tabular-nums; }
.rating button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.bpform { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; grid-column: 1 / -1; }
details.fold { border-top: 1px solid var(--rule); padding-top: 10px; margin-top: 4px; }
details.fold summary { cursor: pointer; min-height: 32px; color: var(--ink-2); }
.log { display: grid; gap: 2px; margin-top: 6px; }
.log div { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.x { width: 40px; height: 40px; background: none; border: 0; border-radius: 6px; color: var(--ink-2); display: grid; place-items: center; }
.x:hover { background: var(--panel-2); color: var(--bad); }

/* Трекер */
.track-wrap { overflow-x: auto; }
.track { border-collapse: collapse; width: 100%; font: inherit; font-size: 15px; color: inherit; }
.track th { font-weight: 500; color: var(--ink-2); padding: 3px 1px; font-variant-numeric: tabular-nums; }
.track thead button { width: 100%; min-height: 36px; padding: 0; background: none; border: 0; border-radius: 6px; color: inherit; font: inherit; }
.track thead th.sel button { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.track tbody th, .track tfoot th { text-align: left; color: var(--ink); padding: 4px 12px 4px 0; line-height: 1.25; min-width: 230px; }
.track tfoot th, .track tfoot td, .stm tfoot th, .stm tfoot td { border-top: 2px solid var(--rule-2); font-weight: 700; }
.dayp { text-align: center; white-space: nowrap; }
.track tbody tr + tr th, .track tbody tr + tr td { border-top: 1px solid var(--rule); }
.track td { padding: 3px 1px; text-align: center; }
.track td.pct, .track th.pct { min-width: 46px; padding: 3px 6px; text-align: center; color: var(--ink-2); white-space: nowrap; }
.cell { width: 100%; min-width: 26px; height: 30px; display: grid; place-items: center; border-radius: 4px; }
.cell svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cell.done { background: var(--accent); color: var(--on-accent); }
.cell.miss { background: var(--panel-2); color: var(--ink-2); }
.cell.empty { color: var(--ink-3); }
.key { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.key > span { display: inline-flex; align-items: center; gap: 8px; }
.key .cell { width: 24px; min-width: 24px; height: 24px; flex: none; }

/* Задачи */
.task { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 6px 0; border-top: 1px solid var(--rule); }
.task:first-of-type { border-top: 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; white-space: nowrap; padding: 2px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.tag svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tag.done { background: var(--grad-good); color: #fff; }
.tag.miss { background: var(--panel-2); color: var(--ink-2); }
.tag.bad { background: var(--grad-bad); color: #fff; }

/* Показатели и графики */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px 18px; }
.stat .k { font-size: 14px; color: var(--ink-2); }
.stat .v { font-size: 26px; line-height: 1.15; white-space: nowrap; }
.stat .v small { font-size: 14px; color: var(--ink-2); margin-left: 3px; font-weight: 400; font-family: 'Montserrat', sans-serif; }
.stat .d { font-size: 14px; color: var(--ink-2); }
.chart { position: relative; touch-action: pan-y; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font: 500 14px 'Montserrat', sans-serif; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .goal { stroke: var(--ink-2); stroke-width: 1; }
.chart .cross { stroke: var(--rule-2); stroke-width: 1; }
.chart .l1 { fill: none; stroke: var(--c1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .l2 { fill: none; stroke: var(--c2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .raw { fill: var(--c-soft); }
.chart .bar { fill: var(--c-soft); }
.chart .bar.good { fill: var(--bar-good); }
.chart .bar.bad { fill: var(--bar-bad); }
.chart .d1 { fill: var(--c1); stroke: var(--panel); stroke-width: 2; }
.chart .d2 { fill: var(--c2); stroke: var(--panel); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -4px 0 8px; font-size: 14px; color: var(--ink-2); }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend .k1 { background: var(--c1); } .legend .k2 { background: var(--c2); } .legend .k3 { background: var(--c-soft); height: 8px; }
.legend .k5 { background: var(--bar-good); height: 8px; } .legend .k6 { background: var(--bar-bad); height: 8px; }
.legend .k4 { background: var(--ink-2); height: 1px; }
.tip { position: fixed; z-index: 30; pointer-events: none; padding: 7px 10px; background: var(--ink); color: var(--page); font-size: 14px; line-height: 1.35; border-radius: 6px; max-width: 240px; box-shadow: 0 6px 20px rgb(0 0 0 / .2); }
.empty-note { padding: 28px 8px; text-align: center; color: var(--ink-2); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 7px 8px 7px 0; border-top: 1px solid var(--rule); text-align: right; font-variant-numeric: tabular-nums; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th { border-top: 0; font-weight: 400; color: var(--ink-2); font-size: 14px; }
.scroll-x, .track-wrap { position: relative; overflow-x: auto; }
details.tv { margin-top: 8px; }
details.tv summary { cursor: pointer; font-size: 14px; color: var(--ink-2); min-height: 28px; }
details.tv .scroll-x { max-height: 240px; overflow-y: auto; }

/* Записи */
.note { padding: 8px 0; border-top: 1px solid var(--rule); }
.note:first-of-type { border-top: 0; }
.note time { display: block; font-size: 14px; color: var(--ink-2); }

/* Выписка */
.stm { font: inherit; font-size: 14px; color: inherit; border-collapse: collapse; width: 100%; }
.stm th, .stm td { padding: 3px 1px; text-align: center; border-top: 1px solid var(--rule); font-weight: 500; }
.stm th:first-child { text-align: left; min-width: 250px; padding-right: 8px; position: sticky; left: 0; background: var(--panel); z-index: 1; }
.stm td.t, .stm thead th:last-child { min-width: 52px; padding: 3px 6px; text-align: center; white-space: nowrap; font-weight: 700; }
.stm .cell { min-width: 26px; height: 26px; }
.stm .cell svg { width: 14px; height: 14px; }

/* Настройки */
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field > span { font-size: 14px; color: var(--ink-2); }
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.theme { min-height: 92px; padding: 10px; border: 2px solid var(--rule); border-radius: var(--radius); text-align: left; display: flex; flex-direction: column; justify-content: space-between; }
.theme[aria-pressed='true'] { border-color: var(--accent); }
.theme.light { background: #E9EEF7; color: #14233C; }
.theme.dark { background: #0D1626; color: #EEF2F8; }
.switch { display: inline-flex; gap: 2px; }
.code { font-size: 14px; overflow-wrap: anywhere; background: var(--panel-2); padding: 8px 10px; border-radius: 6px; }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* Вход */
.login { min-height: 100dvh; display: grid; place-items: center; padding: var(--gutter); }
.login form { width: min(360px, 100%); background: var(--panel); padding: 24px; border-radius: var(--radius); border: 1px solid var(--rule); display: grid; gap: 12px; }
.login h1 { font-size: 22px; font-weight: 600; }
.err { color: var(--bad); font-size: 14px; min-height: 20px; }

.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 9px 14px; background: var(--ink); color: var(--page); border-radius: var(--radius); font-size: 14px; display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); }
.toast[hidden], .tip[hidden] { display: none; }
.toast button { background: none; border: 0; color: inherit; text-decoration: underline; text-underline-offset: 2px; min-height: 28px; padding: 0; }

@media (max-width: 1100px) { .wlist { grid-template-columns: repeat(2, minmax(0, 1fr)); } .r4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .r3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .r3 > :last-child:nth-child(odd) { grid-column: 1 / -1; } .main { padding: 12px 20px 48px; } .nav { padding-inline: 20px; } }
@media (max-width: 760px) {
  .main { padding: 12px var(--gutter) calc(92px + env(safe-area-inset-bottom)); padding-top: calc(12px + env(safe-area-inset-top)); }
  .nav { position: fixed; inset: auto 10px calc(10px + env(safe-area-inset-bottom)) 10px; padding: 0; background: none; gap: 6px; }
  .brand { display: none; }
  .pills { flex: 1; min-width: 0; justify-content: space-between; box-shadow: 0 6px 20px rgb(13 22 38 / .18); }
  .nav button { padding: 8px 5px; min-height: 44px; font-size: 14px; }
  .nav button[aria-current='page'] { padding-inline: 10px; }
  .stats3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wlist { grid-template-columns: minmax(0, 1fr); }
  .t-grid { display: flex; flex-direction: column; }
  .rowx, .col, .wk { display: contents; }
  .o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; } .o4 { order: 4; } .o4b { order: 5; } .o5 { order: 6; } .o6 { order: 7; } .o7 { order: 8; } .o8 { order: 9; } .o9 { order: 10; } .o10 { order: 11; } .wk > .panel { order: 15; } .o12 { order: 12; } .o13 { order: 13; } .o14 { order: 14; } .o15 { order: 16; }
  .track tbody th, .track tfoot th { min-width: 104px; font-size: 14px; padding-right: 6px; }
  .track .cell { min-width: 24px; }
  .track thead th { font-size: 14px; letter-spacing: -.03em; padding-inline: 2px; }
  .stm th:first-child { min-width: 150px; }
  .cald { min-height: 50px; }
  .nav .set { flex: none; width: 52px; height: 52px; padding: 0; box-shadow: 0 6px 20px rgb(13 22 38 / .18); }
  .nav .set span { display: none; }
  .top { margin-bottom: 12px; gap: 10px; }
  .top h1 { font-size: 22px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 14px; }
  .score b { font-size: 48px; }
  .daybar { width: 100%; justify-content: space-between; }
  .track tbody th { min-width: 96px; font-size: 14px; padding-right: 4px; }
  .track .cell { min-width: 18px; }
  .track td.pct { padding-left: 4px; font-size: 14px; }
  .themes .theme { min-height: 80px; }
  .hide-m { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  :root, [data-theme] { --page: #fff; --panel: #fff; --panel-2: #eee; --ink: #000; --ink-2: #333; --rule: #bbb; --panel-rule: transparent; --good-soft: #fff; --bad-soft: #fff; --good: #000; --bad: #000; }
  body { background: #fff; }
  .nav, .no-print, .toast, .tip, .demo.no-print { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .panel { padding: 8px 0; break-inside: avoid; }
  .top h1 { background: none !important; padding: 0 !important; }
}
