/* Шрифты лежат рядом (SIL OFL 1.1, см. fonts/OFL.txt). */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/onest-cyrillic.woff2?v=1) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/onest-latin-ext.woff2?v=1) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/onest-latin.woff2?v=1) 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 XC"; font-style: normal; font-weight: 1 1000; font-display: swap;
  src: url(fonts/sofia-xc-cyrillic.woff2?v=1) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Sofia XC"; font-style: normal; font-weight: 1 1000; font-display: swap;
  src: url(fonts/sofia-xc-latin-ext.woff2?v=1) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sofia XC"; font-style: normal; font-weight: 1 1000; font-display: swap;
  src: url(fonts/sofia-xc-latin.woff2?v=1) 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;
  --bg: #eef1f6; --surface: #fff; --inset: #f3f5f9; --ink: #131c2b; --muted: #596477; --line: #dce1ea;
  --field: #fff; --field-line: #c3cad7;
  --rail: #0e1f3d; --rail-ink: #eef2f9; --rail-muted: #a9b7d0; --board: #0e1f3d;
  --link: #1a5fd0; --soft: #e4ecfa; --btn: #0e1f3d; --btn-ink: #fff;
  --signal: #ffc629; --signal-ink: #1d1600; --mine: #fff4cf;
  --ok: #17804a; --bad: #c5352b; --warn: #a86400;
  --ok-bg: #e3f4ea; --bad-bg: #fbe7e4; --bad-ink: #6b1a13; --warn-bg: #fdf1d8; --warn-ink: #4d3200;
  --p: #1a5fd0; --c: #17804a; --l: #8c3fc0; --custom: #c2570c; --on-line: #fff;
  --shade: rgba(9, 18, 38, .16);
  --r-s: 7px; --r-m: 10px; --r-l: 14px;
  --display: "Sofia XC", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rail-w: 236px; --tab-h: 3.7rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1120; --surface: #121b2e; --inset: #0d1526; --ink: #e8ecf4; --muted: #96a3ba; --line: #243049;
    --field: #0d1526; --field-line: #35435f;
    --rail: #0c1830; --board: #14264d;
    --link: #82b1ff; --soft: #1a2947; --btn: #2f6ae0; --btn-ink: #fff; --mine: #2e2a17;
    --ok: #4cc38a; --bad: #ff8478; --warn: #f0b354;
    --ok-bg: #12301f; --bad-bg: #3a1c1a; --bad-ink: #f8c9c3; --warn-bg: #33270f; --warn-ink: #f6dcae;
    --p: #82b1ff; --c: #4cc38a; --l: #c79bf2; --custom: #f29a5b; --on-line: #0a1120;
    --shade: rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1120; --surface: #121b2e; --inset: #0d1526; --ink: #e8ecf4; --muted: #96a3ba; --line: #243049;
  --field: #0d1526; --field-line: #35435f;
  --rail: #0c1830; --board: #14264d;
  --link: #82b1ff; --soft: #1a2947; --btn: #2f6ae0; --btn-ink: #fff; --mine: #2e2a17;
  --ok: #4cc38a; --bad: #ff8478; --warn: #f0b354;
  --ok-bg: #12301f; --bad-bg: #3a1c1a; --bad-ink: #f8c9c3; --warn-bg: #33270f; --warn-ink: #f6dcae;
  --p: #82b1ff; --c: #4cc38a; --l: #c79bf2; --custom: #f29a5b; --on-line: #0a1120;
  --shade: rgba(0, 0, 0, .5);
}

/* ---------- основа ---------- */
* { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
h1 { font: 700 2.7rem/1 var(--display); letter-spacing: .01em; margin: .3rem 0 1rem; }
h1 small { font: 500 1rem/1.2 var(--text); letter-spacing: 0; color: var(--muted); margin-left: .3rem; white-space: nowrap; }
h2 { font-size: 1.08rem; font-weight: 650; line-height: 1.3; margin: 0 0 .75rem; }
h2 small { font-weight: 400; font-size: .85rem; }
h3 { font-size: .88rem; font-weight: 600; color: var(--muted); margin: 1.1rem 0 .35rem; }
p { margin: 0 0 .7rem; }
ul, ol { margin: 0 0 .7rem; padding-left: 1.2rem; }
li { margin-bottom: .3rem; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
.ok { color: var(--ok); } .bad { color: var(--bad); }
.neg { color: var(--ink); } .pos { color: var(--ok); }
.gone { opacity: .55; text-decoration: line-through; }
.lead { color: var(--muted); max-width: 46rem; margin-bottom: 1rem; }
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.ic.g { stroke: none; }
[hidden] { display: none !important; }

/* ---------- каркас: боковое меню (ПК), верхняя полоса, нижние вкладки (телефон) ---------- */
body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: env(safe-area-inset-top, 0px); background: var(--rail); }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--signal); color: var(--signal-ink);
  padding: .5rem .9rem; font-weight: 600; border-radius: 0 0 var(--r-m) 0; }
.skip:focus { left: 0; }
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail-w); z-index: 30; display: flex; flex-direction: column;
  padding: calc(1.1rem + env(safe-area-inset-top, 0px)) .7rem .8rem; background: var(--rail); color: var(--rail-ink); overflow-y: auto; }
.rail :focus-visible, .bar :focus-visible, .board :focus-visible { outline-color: var(--signal); }
.brand { display: flex; align-items: center; gap: .5rem; color: inherit; padding: 0 .5rem .8rem; }
.brand:hover { text-decoration: none; }
.brand b { font: 700 1.75rem/1 var(--display); letter-spacing: .05em; }
.brand span { font-size: .85rem; color: var(--rail-muted); align-self: flex-end; padding-bottom: .12rem; }
.brand .ic { width: 1.9rem; height: 1.9rem; }
.navt { font-size: .76rem; color: var(--rail-muted); padding: 1rem .6rem .3rem; }
.nl { display: flex; align-items: center; gap: .65rem; }
.nl:hover { text-decoration: none; }
.rail .nl { position: relative; width: 100%; min-height: 2.35rem; padding: .45rem .6rem; border: 0; border-radius: 9px;
  background: none; color: var(--rail-ink); font-size: .95rem; font-weight: 500; text-align: left; cursor: pointer; justify-content: flex-start; }
.rail .nl:hover { background: rgba(255, 255, 255, .08); filter: none; }
.rail .nl .ic { opacity: .8; }
.rail .nl.on { background: rgba(255, 255, 255, .13); font-weight: 650; }
.rail .nl.on .ic { color: var(--signal); opacity: 1; }
.rail .nl.on::before { content: ""; position: absolute; left: -.7rem; top: .45rem; bottom: .45rem; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--signal); }
.rail-foot { margin-top: auto; padding-top: .7rem; border-top: 1px solid rgba(255, 255, 255, .13); }
.page { margin-left: var(--rail-w); min-height: 100vh; }
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .8rem; padding: .7rem 1.6rem;
  background: var(--bg); }
.bar .brand { display: none; }
.search { position: relative; flex: 1; max-width: 34rem; }
.search input { width: 100%; padding-left: 2.4rem; border-radius: 99px; text-overflow: ellipsis; }
.search > .ic { position: absolute; left: .8rem; top: 50%; margin-top: -.62em; color: var(--muted); pointer-events: none; }
.bell { position: relative; margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.bell:hover { border-color: var(--link); }
.bell.on { border-color: var(--link); color: var(--link); }
.bell .cnt { position: absolute; top: -.3rem; right: -.35rem; min-width: 1.3rem; height: 1.3rem; padding: 0 .3rem;
  display: flex; align-items: center; justify-content: center; border-radius: 99px; background: var(--signal);
  color: var(--signal-ink); font-size: .72rem; font-weight: 700; box-shadow: 0 0 0 2px var(--bg); }
main { width: 100%; max-width: 1180px; margin: 0 auto; padding: .5rem 1.6rem 3rem; }
.tabbar { display: none; }
.offline-note { display: none; }
body[data-offline] .offline-note { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; margin-bottom: 1rem;
  border-radius: var(--r-m); background: var(--warn-bg); color: var(--warn-ink); font-weight: 500; }

/* гость: вход, регистрация */
.gbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem;
  padding-top: calc(1rem + env(safe-area-inset-top, 0px)); }
.gbar .brand { padding: 0; color: var(--ink); }
.gbar .brand span { color: var(--muted); }
.gbar .brand img { width: 2.2rem; height: 2.2rem; border-radius: 9px; }
main.narrow { max-width: 27rem; padding-top: 6vh; }
.auth { max-width: 27rem; }
.auth h1 { margin-bottom: .4rem; }
.auth .card { margin-top: 1.2rem; }
.auth .form > button, .auth a.gbtn { width: 100%; }
.or { display: flex; align-items: center; gap: .8rem; margin: 1rem 0; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
a.btn.gbtn { width: 100%; background: var(--surface); color: var(--ink); border-color: var(--field-line); }
a.btn.gbtn:hover { filter: none; border-color: var(--link); }
a.btn.gbtn .ic { width: 1.2rem; height: 1.2rem; }
.lang select { min-height: 2.2rem; padding: .25rem .5rem; font-size: .9rem; }

/* ---------- карточки и сетки ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.card > :last-child, .card > form:last-child > :last-child { margin-bottom: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 1rem; align-items: start; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; }
.row-between > h1, .row-between > h2, .row-between > h1 ~ *, .row-between > h2 ~ * { margin-bottom: .6rem; }
table.list + .row-between { margin-top: .9rem; }
h2.sub { margin-top: 1.3rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: .85rem 1.1rem; }
.kpi .k { color: var(--muted); font-size: .84rem; }
.kpi .v { font: 600 2.4rem/1.05 var(--display); letter-spacing: .01em; font-variant-numeric: tabular-nums; margin: .25rem 0 .2rem; white-space: nowrap; }
.kpi .s { color: var(--muted); font-size: .8rem; }

/* ---------- формы и кнопки ---------- */
input, select, button, textarea { font: inherit; color: inherit; }
input, select, textarea { background: var(--field); border: 1px solid var(--field-line); border-radius: var(--r-m);
  padding: .45rem .7rem; min-height: 2.5rem; max-width: 100%; }
input:focus-visible, select:focus-visible { outline: 2px solid var(--link); outline-offset: 0; border-color: var(--link); }
input::placeholder { color: var(--muted); opacity: .85; }
form { margin: 0; }
.form label { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; font-size: .9rem; font-weight: 500; }
.form label small { color: var(--muted); font-weight: 400; }
.form label input, .form label select { font-weight: 400; }
.inline { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.inline label { flex: 1; min-width: 90px; }
.inline > input { flex: 1 1 12rem; min-width: 0; }
.form .inline, .card .inline:last-child, .maphead .inline { margin-bottom: 0; }
button, a.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.5rem;
  padding: .45rem 1rem; border: 1px solid transparent; border-radius: var(--r-m); background: var(--btn); color: var(--btn-ink);
  font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; }
button:hover, a.btn:hover { filter: brightness(1.15); text-decoration: none; }
button.ghost, a.btn.ghost { background: var(--soft); color: var(--link); }
button.ghost:hover, a.btn.ghost:hover { filter: brightness(.97); }
button.quiet { background: transparent; color: var(--muted); }
button.quiet:hover { filter: none; background: var(--inset); color: var(--ink); }
button.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
button.link, summary.link { min-height: 0; padding: .15rem .35rem; border: 0; border-radius: 6px; background: none;
  color: var(--muted); font-size: .8rem; font-weight: 500; cursor: pointer; }
button.link:hover, summary.link:hover { color: var(--link); text-decoration: underline; filter: none; }
button.small, a.btn.small { min-height: 2rem; padding: .25rem .7rem; font-size: .85rem; border-radius: var(--r-s); }
button:disabled { opacity: .5; cursor: not-allowed; filter: none; }
input.copy { width: 100%; margin-bottom: .7rem; font-size: .82rem; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--inset); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button, .seg a { min-height: 2.1rem; padding: .3rem .8rem; border-radius: 8px; background: transparent; color: var(--ink);
  font-weight: 500; display: inline-flex; align-items: center; gap: .4rem; }
.seg button:hover, .seg a:hover { filter: none; background: var(--soft); text-decoration: none; }
.seg .on, .seg .on:hover { background: var(--btn); color: var(--btn-ink); font-weight: 650; }
details summary { cursor: pointer; }
details > summary.muted { margin-top: .7rem; }

.flash, .banner { padding: .7rem .95rem; border-radius: var(--r-m); margin-bottom: 1rem; background: var(--soft); }
.flash.err, .banner.err { background: var(--bad-bg); color: var(--bad-ink); }
.banner.ok { background: var(--ok-bg); }
.flash.err a, .banner.err a { color: inherit; text-decoration: underline; }

/* ---------- таблицы ---------- */
table.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.list th { text-align: left; color: var(--muted); font-weight: 500; font-size: .78rem; padding: .3rem .6rem .45rem;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child > td { border-bottom: 0; }
table.list tr > :first-child { padding-left: 0; }
table.list tr > :last-child { padding-right: 0; }
table.list td.r, table.list th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.list td form { display: inline-flex; margin: 0; }
@media (min-width: 721px) {   /* термины: одинаковые колонки во всех предметах */
  table.terms { table-layout: fixed; }
  table.terms th:nth-child(1) { width: 17%; }
  table.terms th:nth-child(2) { width: 14%; }
  table.terms th:nth-child(3) { width: 12%; }
  table.terms th:nth-child(4) { width: 19%; }
  table.terms th:nth-child(5) { width: 9%; }
}
table.list tr.info > td { color: var(--muted); }
table.list tr.gone > td { opacity: .55; text-decoration: line-through; }
table.list tr.mine > td { background: var(--mine); }
table.list tr.mine > td:first-child { padding-left: .7rem; box-shadow: inset 3px 0 0 var(--signal); }
table.list tr.mine > td:last-child { padding-right: .6rem; }
table.list td.bad { color: var(--bad); font-weight: 600; }
.wk { margin-bottom: .3rem; font-size: .88rem; }
.wk > div { display: flex; gap: .7rem; padding: .05rem 0; }
.wk > div > span:first-child { flex: none; min-width: 3.5rem; color: var(--muted); }
.wk > div.today { font-weight: 650; }
.wk > div.today > span:first-child { color: var(--ink); }
table.kv th { width: 11rem; border-bottom: 1px solid var(--line); font-size: .85rem; vertical-align: top; padding-top: .6rem; }
table.kv tr:last-child > th { border-bottom: 0; }
.scroll { overflow-x: auto; }
.scroll table.list { min-width: 34rem; }
ul.plain { padding-left: 1.1rem; margin: 0; } ul.plain li { margin-bottom: .45rem; }

.tag { display: inline-block; font-size: .72rem; font-weight: 600; line-height: 1.5; padding: 0 .45rem; border-radius: 5px;
  background: var(--soft); color: var(--link); vertical-align: middle; white-space: nowrap; }
.tag.t-P { background: var(--p); color: var(--on-line); }
.tag.t-C { background: var(--c); color: var(--on-line); }
.tag.t-L { background: var(--l); color: var(--on-line); }
.tag.okt, .tag.map { background: var(--ok-bg); color: var(--ok); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.state { display: inline-block; font-size: .78rem; font-weight: 600; padding: 0 .5rem; border-radius: 99px; background: var(--inset); color: var(--muted); }
.state.s-ok { background: var(--ok-bg); color: var(--ok); }
.state.s-error, .state.s-paused_bad_password, .state.s-blocked { background: var(--bad-bg); color: var(--bad); }
.open-now { color: var(--ok); font-weight: 650; }
.closed-now { color: var(--bad); font-weight: 650; }

/* ---------- табло «сейчас / следующая пара» ---------- */
/* ---------- кредиты: список шкал (название, шкала, число) ---------- */
.meters { display: grid; grid-template-columns: minmax(11rem, 1.2fr) minmax(7rem, 2fr) minmax(6.5rem, auto); gap: 1rem 1.2rem;
  align-items: center; margin: .2rem 0 1.1rem; }
.meter-row { display: contents; }
.meter-name b { display: block; font-weight: 600; }
.meter-name span, .meter-fig span { display: block; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.meter-fig { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-fig .reached { color: var(--ok); font-weight: 600; }
.meter-fig .reached .ic { width: 1em; height: 1em; margin-right: .2rem; stroke-width: 2.4; vertical-align: -.12em; }
progress.meter { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 99px;
  overflow: hidden; --fill: var(--link); background: color-mix(in srgb, var(--fill) 16%, var(--surface)); color: var(--fill); }
progress.meter.done { --fill: var(--ok); }
progress.meter::-webkit-progress-bar { background: transparent; }
progress.meter::-webkit-progress-value { background: var(--fill); border-radius: 99px; }
progress.meter::-moz-progress-bar { background: var(--fill); border-radius: 99px; }
table.results .s-sub { display: none; }
@media (min-width: 721px) {  /* одинаковые колонки у обоих семестров */
  table.results { table-layout: fixed; }
  table.results th:nth-child(1) { width: 34%; }
  table.results th:nth-child(2) { width: 15%; }
  table.results th:nth-child(3) { width: 15%; }
  table.results th:nth-child(4) { width: 8%; }
  table.results th:nth-child(5) { width: 7%; }
}
@media (max-width: 720px) {
  .meters { grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; }
  .meter-row { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: end; padding: .55rem 0; }
  .meter-row + .meter-row { border-top: 1px solid var(--line); }
  .meter-row progress.meter { grid-column: 1 / -1; grid-row: 2; margin-top: .25rem; }
}

.dash-top { display: grid; grid-template-columns: minmax(0, 1fr) 17.5rem; gap: 1rem; margin-bottom: 1rem; align-items: stretch; }
.dash-top .kpis { grid-template-columns: 1fr; margin: 0; align-content: stretch; }
.board { display: flex; flex-direction: column; background: var(--board); color: #eef2f9; border-radius: 18px; padding: 1.15rem 1.35rem 1.2rem; }
.board a { color: inherit; }
.board > p > a { text-decoration: underline; text-underline-offset: 3px; }
.board-label { display: flex; align-items: center; gap: .55rem; font-size: .9rem; color: #b7c4dc; }
.board-label .eta { margin-left: auto; color: #fff; font-weight: 650; white-space: nowrap; }
.live { width: .6rem; height: .6rem; border-radius: 50%; background: var(--signal); flex: none; animation: live 1.8s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 .4rem rgba(255, 198, 41, 0); } 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 198, 41, .55); } }
.board-row { display: flex; align-items: center; gap: .9rem 1.4rem; flex-wrap: wrap; margin: auto 0; padding-top: .9rem; }
.board-time { font: 700 5.4rem/.8 var(--display); letter-spacing: .01em; color: var(--signal); font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-time small { font-size: 1.9rem; font-weight: 500; color: #b7c4dc; margin-left: .15rem; }
.board-what { flex: 1 1 13rem; min-width: 0; }
.board-name { font-size: 1.3rem; font-weight: 650; line-height: 1.2; }
.board-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin-top: .35rem; font-size: .9rem; color: #b7c4dc; }
.board-meta a.teacher { text-decoration-color: rgba(255, 255, 255, .4); }
.board-meta a.teacher:hover { color: #fff; }
a.platform { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 5.6rem; padding: .5rem .9rem .45rem;
  border: 1.5px solid rgba(255, 255, 255, .3); border-radius: 12px; text-decoration: none; }
a.platform:hover { border-color: var(--signal); text-decoration: none; }
a.platform b { font: 700 2.1rem/1 var(--display); letter-spacing: .04em; color: #fff; }
a.platform span { font-size: .72rem; color: #b7c4dc; margin-top: .15rem; }
.board-after { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; margin-top: 1.1rem; padding-top: .8rem;
  border-top: 1px dashed rgba(255, 255, 255, .22); font-size: .9rem; color: #cfd9eb; }
.board-after b { font: 600 1.25rem/1 var(--display); letter-spacing: .02em; color: #fff; font-variant-numeric: tabular-nums; }
.board-empty { font-size: 1.15rem; font-weight: 600; margin: .9rem 0 .3rem; }

/* ---------- пары ---------- */
.slot { display: flex; gap: .8rem; padding: .6rem .75rem; border-radius: var(--r-m); background: var(--inset); margin-bottom: .45rem; }
.slot .time { flex: none; min-width: 3.1rem; font: 600 1.45rem/1 var(--display); letter-spacing: .01em; font-variant-numeric: tabular-nums; padding-top: .1rem; }
.slot .time span { display: block; margin-top: .25rem; font: 500 .76rem/1 var(--text); letter-spacing: 0; color: var(--muted); }
.slot .what { position: relative; min-width: 0; padding-left: .85rem; }
.slot .what::before { content: ""; position: absolute; left: 0; top: .1rem; bottom: .1rem; width: 4px; border-radius: 4px; background: var(--muted); }
.slot.t-P .what::before { background: var(--p); }
.slot.t-C .what::before { background: var(--c); }
.slot.t-L .what::before { background: var(--l); }
.slot.custom .what::before { background: repeating-linear-gradient(to bottom, var(--custom) 0 5px, transparent 5px 9px); }
.slot .name { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.slot .meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .55rem; margin-top: .3rem; font-size: .83rem; color: var(--muted); }
.slot.past { opacity: .55; }
.slot.now { background: var(--mine); box-shadow: inset 0 0 0 1.5px var(--signal); }
a.room { display: inline-block; font: 650 1.02rem/1.35 var(--display); letter-spacing: .05em; padding: 0 .4rem; border-radius: 5px;
  background: var(--soft); color: var(--link); white-space: nowrap; }
a.room:hover { text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--link); }
a.teacher { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
a.teacher:hover { color: var(--link); text-decoration-style: solid; }
.week { display: grid; gap: .6rem; margin-bottom: 1rem; }
.day { display: grid; grid-template-columns: 7.6rem minmax(0, 1fr); gap: 0 .7rem; align-items: start; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-l); padding: .7rem .8rem .25rem; }
.day > h3 { margin: .55rem 0 .6rem; color: var(--ink); font: 650 1.4rem/1.1 var(--display); letter-spacing: .02em; display: flex; align-items: center; gap: .45rem; }
.day-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr)); gap: 0 .5rem; align-items: start; min-width: 0; }
.day-slots > p { margin: .55rem 0 .6rem; }
@media (min-width: 721px) {   /* в строке дня карточка пары узкая: время сверху, название во всю ширину */
  .day-slots .slot { position: relative; flex-direction: column; gap: .35rem; padding-left: 1.2rem; }
  .day-slots .slot-wrap.acted .slot { padding-right: .75rem; }
  .day-slots .slot .time { display: flex; align-items: baseline; gap: .3rem; padding: 0 2rem 0 0; }
  .day-slots .slot .time span { display: inline; margin: 0; font-size: .82rem; }
  .day-slots .slot .time span::before { content: "– "; }
  .day-slots .slot .what { position: static; padding-left: 0; }
  .day-slots .slot .what::before { left: .5rem; top: .65rem; bottom: .65rem; }
}
.day.today { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.day.today > h3::after { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--signal); }
.slot-wrap { position: relative; margin-bottom: .45rem; }
.slot-wrap .slot { margin-bottom: 0; }
.slot-wrap.acted .slot { padding-right: 2.5rem; }
.slot-wrap.was .slot { opacity: .6; }
.acts > summary { position: absolute; top: .3rem; right: .3rem; width: 2rem; height: 2rem; display: flex; align-items: center;
  justify-content: center; border-radius: 8px; color: var(--muted); list-style: none; }
.acts > summary::-webkit-details-marker { display: none; }
.acts > summary:hover, .acts[open] > summary { background: var(--surface); color: var(--ink); }
.slot-wrap .actions { display: flex; gap: .2rem; justify-content: flex-end; align-items: center; flex-wrap: wrap; min-height: 1.2rem; padding-top: .15rem; }
/* меню пары — поверх страницы, строки не раздвигает */
.acts .actions { position: absolute; top: 2.45rem; right: .3rem; z-index: 6; display: block; min-width: 11.5rem; min-height: 0; padding: .3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 10px 26px var(--shade); }
.acts .actions form { display: block; }
.acts .actions button.link { display: block; width: 100%; padding: .55rem .7rem; border-radius: var(--r-s); color: var(--ink); font-size: .9rem; text-align: left; }
.acts .actions button.link::first-letter { text-transform: uppercase; }
.acts .actions button.link:hover { background: var(--inset); color: var(--ink); text-decoration: none; }

/* ---------- списки ---------- */
.due { display: flex; gap: .9rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.due:last-child { border-bottom: 0; padding-bottom: 0; }
.due:first-child { padding-top: 0; }
.due .when { flex: none; width: 3.9rem; padding: .4rem .2rem .35rem; border-radius: 9px; background: var(--inset); text-align: center;
  font: 600 1.4rem/1 var(--display); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.due .when span { display: block; margin-top: .25rem; font: 500 .7rem/1.1 var(--text); letter-spacing: 0; color: var(--muted); }
.due .body { min-width: 0; flex: 1; }
.due.was { opacity: .6; }
.due.was .body > span:first-child { text-decoration: line-through; }
.op { display: grid; grid-template-columns: 7.6rem minmax(0, 1fr) auto; gap: .1rem 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.op:last-child { border-bottom: 0; padding-bottom: 0; }
.op .when { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.op .amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.op.info { color: var(--muted); }
.op.info .amt { font-weight: 400; }
.change { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.change:last-child { border-bottom: 0; padding-bottom: 0; }
.change::before { content: "•"; flex: none; width: 1.45rem; height: 1.45rem; border-radius: 7px; display: flex; align-items: center;
  justify-content: center; font-weight: 700; background: var(--inset); color: var(--muted); }
.change.c-removed::before { content: "−"; background: var(--bad-bg); color: var(--bad); }
.change.c-added::before, .change.c-returned::before { content: "+"; background: var(--ok-bg); color: var(--ok); }
.change.c-changed::before { content: "~"; background: var(--warn-bg); color: var(--warn); }
.change .body { flex: 1; min-width: 0; }
.change.new { font-weight: 600; }
.change .muted { font-weight: 400; }
.hit, .ghit, .fact { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.hit:last-child, .ghit:last-child, .fact:last-child { border-bottom: 0; padding-bottom: 0; }
.hit:first-child, .ghit:first-child, .fact:first-child { padding-top: 0; }
.chain { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.chain:last-of-type { border-bottom: 0; }
.chain > summary { font-weight: 600; }
.chain ol { margin: .4rem 0; padding-left: 1.3rem; word-break: break-all; }
.chain > table.list { margin-top: .4rem; }
details.confirm { display: inline-block; }
details.confirm[open] { display: block; margin-top: .3rem; }
.inline-btns { display: inline-flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.acts-cell > * { vertical-align: middle; margin: .1rem 0 .1rem .3rem; }

/* меню столовой */
.dish { display: flex; align-items: center; gap: .3rem 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.dish:last-child { border-bottom: 0; padding-bottom: 0; }
.dish .dname { flex: 1; min-width: 0; }
.dish .price { flex: none; min-width: 4.2rem; text-align: right; font: 600 1.35rem/1 var(--display); letter-spacing: .01em;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.dish .price:empty { display: none; }
.dish .act { flex: none; display: flex; gap: .4rem; align-items: center; justify-content: flex-end; }
.dishes.can .act { min-width: 7.2rem; }
.dish.mine { padding-left: .8rem; padding-right: .6rem; border-radius: var(--r-s); background: var(--mine); box-shadow: inset 3px 0 0 var(--signal); }

/* столбики трат (высота — классами: CSP запрещает inline-стили) */
.bars { display: flex; gap: .5rem; align-items: flex-end; height: 172px; padding-top: .5rem; margin-bottom: .8rem; }
.bar-m { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; color: var(--muted); }
.bar-m:hover { text-decoration: none; color: var(--ink); }
.bar-m .fill { width: 100%; max-width: 52px; min-height: 2px; border-radius: 6px 6px 0 0; background: color-mix(in srgb, var(--link) 30%, transparent); }
.bar-m.on .fill { background: var(--link); }
.bar-m .val { font-size: .72rem; margin-bottom: .25rem; white-space: nowrap; }
.bar-m .lab { font-size: .8rem; margin-top: .3rem; }
.bar-m.on .lab, .bar-m.on .val { color: var(--ink); font-weight: 650; }
.fill.h0{height:2px}.fill.h1{height:6px}.fill.h2{height:12px}.fill.h3{height:18px}.fill.h4{height:24px}.fill.h5{height:30px}
.fill.h6{height:36px}.fill.h7{height:42px}.fill.h8{height:48px}.fill.h9{height:54px}.fill.h10{height:60px}.fill.h11{height:66px}
.fill.h12{height:72px}.fill.h13{height:78px}.fill.h14{height:84px}.fill.h15{height:90px}.fill.h16{height:96px}.fill.h17{height:102px}
.fill.h18{height:108px}.fill.h19{height:114px}.fill.h20{height:120px}

/* подсказки поиска */
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 25; min-width: 260px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: 0 14px 34px var(--shade); }
.suggest a { display: block; padding: .55rem .8rem; color: var(--ink); border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a.on { background: var(--soft); text-decoration: none; }

/* карта */
.maphead { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin-bottom: .7rem; }
.maphead h1 { margin: 0; }
.campusmap { display: block; width: 100%; height: calc(100vh - 11rem); height: calc(100dvh - 11rem); min-height: 380px;
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }

/* справочник */
.guide-search, .teachers-search { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.guide-search input, .teachers-search input { flex: 1 1 14rem; min-width: 0; }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .7rem; margin-bottom: 1rem; }
.topic { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: .85rem 1rem; color: var(--ink); }
.topic:hover { border-color: var(--link); text-decoration: none; }
.topic b { display: block; margin-bottom: .2rem; }
.topic span { color: var(--muted); font-size: .86rem; line-height: 1.4; display: block; }
.card .topic { background: var(--inset); }
.backlink { display: inline-flex; align-items: center; gap: .3rem; font-size: .9rem; margin-bottom: .2rem; }
.topic.qa { box-shadow: inset 4px 0 0 var(--signal); }
.count { display: inline-block; min-width: 1.5rem; padding: 0 .4rem; border-radius: 99px; background: var(--inset); color: var(--muted);
  font-size: .75rem; font-weight: 600; line-height: 1.5; text-align: center; vertical-align: middle; }
.toc { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.toc a { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); color: var(--ink); font-size: .88rem; }
.toc a:hover { border-color: var(--link); text-decoration: none; }
/* готовый ответ: главное коротко, жёлтая полоса — как у важных уведомлений */
.answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: .8rem; margin-bottom: 1rem; }
.answer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1rem 1.1rem;
  box-shadow: inset 4px 0 0 var(--signal); }
.answer h2 { font-size: 1.05rem; margin: 0 0 .4rem; line-height: 1.35; }
.answer h2 a { color: var(--ink); }
.answer p { margin: 0 0 .6rem; }
.answer-more { font-size: .88rem; font-weight: 600; }
.qf { margin: 0 0 .7rem; }
.qf > div { display: flex; gap: .3rem .8rem; flex-wrap: wrap; padding: .3rem 0; border-top: 1px solid var(--line); }
.qf dt { flex: 0 0 9.5rem; color: var(--muted); font-size: .85rem; }
.qf dd { flex: 1 1 12rem; margin: 0; min-width: 0; }
ol.todo { padding-left: 1.3rem; margin: 0; }
ol.todo li { margin-bottom: .5rem; padding-left: .2rem; }
ol.todo li::marker { font-weight: 700; color: var(--link); }
/* подразделы темы: свёрнуты, в заголовке — сколько записей */
details.sec { border-top: 1px solid var(--line); }
details.sec:first-of-type { border-top: 0; }
details.sec > summary { display: flex; align-items: center; gap: .5rem; padding: .7rem 0; list-style: none; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::before { content: "+"; flex: none; width: 1.3rem; height: 1.3rem; border-radius: 6px; background: var(--inset);
  color: var(--muted); font-weight: 700; line-height: 1.3rem; text-align: center; }
details.sec[open] > summary::before { content: "−"; }
details.sec > summary b { flex: 1; min-width: 0; }
details.sec > summary:hover b { color: var(--link); }
details.sec[open] { padding-bottom: .7rem; }
.card > h2 + details.sec { border-top: 0; }
.card > table + details.sec { border-top: 1px solid var(--line); margin-top: .3rem; }
.sec-more { margin: .6rem 0 0; }
.fact-row { padding-top: .25rem; }
.fact-row + .fact-row { margin-top: .35rem; padding-top: .45rem; border-top: 1px dashed var(--line); }
.ghit:target, .fact-row:target { background: var(--mine); box-shadow: -.6rem 0 0 var(--mine), .6rem 0 0 var(--mine), inset 0 0 0 0 transparent;
  border-radius: 4px; }

/* уведомления: список с кнопками (главная, «Уведомления») и тонкая полоска на остальных страницах */
.notices { margin-bottom: 1rem; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.notice { display: flex; gap: .45rem 1rem; align-items: center; flex-wrap: wrap; padding: .65rem .9rem .65rem 1.15rem;
  border-bottom: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--signal); }
.notice:last-child { border-bottom: 0; }
.notice.payment, .notice.overdue { box-shadow: inset 4px 0 0 var(--bad); }
.notice .ntext { flex: 1 1 19rem; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.notice .ntext b { font-weight: 600; line-height: 1.3; }
.notice .ntext span { font-size: .85rem; line-height: 1.4; color: var(--muted); }
.notice.overdue .ntext b { color: var(--bad); }
.notice .nact, .notice .nact form { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.notices a.more { display: block; padding: .5rem .9rem .55rem 1.15rem; background: var(--inset); font-size: .88rem; font-weight: 600; }
a.nstrip { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; padding: .5rem .7rem .5rem 1.05rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: inset 4px 0 0 var(--signal); color: var(--ink); font-size: .92rem; line-height: 1.35; }
a.nstrip:hover { text-decoration: none; border-color: var(--link); }
a.nstrip.payment, a.nstrip.overdue { box-shadow: inset 4px 0 0 var(--bad); }
.nstrip .t { flex: 1; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.nstrip .t b { font-weight: 600; }
.nstrip .t span { color: var(--muted); }
.nstrip .n { flex: none; min-width: 1.9rem; padding: .1rem .45rem; border-radius: 99px; background: var(--signal); color: var(--signal-ink);
  font-size: .78rem; font-weight: 700; text-align: center; }

/* настройки: приложение, Google */
.steps { display: grid; gap: .6rem; margin: .2rem 0 .8rem; }
.step { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; }
.step .ic { color: var(--link); margin-top: .1rem; }
[data-install] { display: none; }
.can-install [data-install] { display: inline-flex; }

/* ---------- телефон и планшет ---------- */
@media (max-width: 999px) {
  input, select, textarea { font-size: 16px; }
  .rail { display: none; }
  .page { margin-left: 0; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); }
  .bar { gap: .55rem; padding: .5rem .8rem; padding-top: calc(.5rem + env(safe-area-inset-top, 0px)); background: var(--rail); color: var(--rail-ink); }
  .bar .brand { display: flex; padding: 0; }
  .bar .brand b, .bar .brand span { display: none; }
  .bar .search { max-width: none; }
  .bar .search input { background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; }
  .bar .search input::placeholder { color: var(--rail-muted); opacity: 1; }
  .bar .search input:focus-visible { outline-color: var(--signal); border-color: transparent; }
  .bar .search > .ic { color: var(--rail-muted); }
  .bar .bell { background: transparent; border-color: transparent; color: var(--rail-ink); }
  .bar .bell.on { color: var(--signal); }
  .bar .bell .cnt { box-shadow: 0 0 0 2px var(--rail); }
  main { padding: .9rem max(.9rem, env(safe-area-inset-right, 0px)) 2rem max(.9rem, env(safe-area-inset-left, 0px)); }
  h1 { font-size: 2.3rem; }
  .dash-top { grid-template-columns: 1fr; }
  .dash-top .kpis, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis > :nth-child(3):last-child { grid-column: 1 / -1; }
  .kpi { padding: .75rem .9rem; }
  .kpi .v { font-size: 2.1rem; }
  .campusmap { height: calc(100vh - 15.7rem); height: calc(100dvh - 15.7rem); }

  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--surface); border-top: 1px solid var(--line); }
  .tabbar > .nl, .more > summary { position: relative; flex-direction: column; justify-content: center; gap: .15rem; height: var(--tab-h);
    padding: 0 .1rem; font-size: .7rem; font-weight: 500; color: var(--muted); cursor: pointer; }
  .tabbar > .nl span, .more > summary span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar > .nl .ic, .more > summary .ic { width: 1.55rem; height: 1.55rem; }
  .tabbar > .nl.on, .more[open] > summary, .more.on > summary { color: var(--ink); font-weight: 650; }
  .tabbar > .nl.on::before, .more.on > summary::before { content: ""; position: absolute; top: -1px; left: 26%; right: 26%; height: 3px;
    border-radius: 0 0 3px 3px; background: var(--signal); }
  .more > summary { display: flex; align-items: center; list-style: none; }
  .more > summary::-webkit-details-marker { display: none; }
  .more[open] > summary::after { content: ""; position: fixed; inset: 0 0 calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)) 0;
    background: rgba(6, 12, 26, .55); cursor: default; }
  .sheet { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); z-index: 1;
    max-height: min(76vh, 36rem); overflow-y: auto; padding: 1rem .9rem .9rem; border-radius: 18px 18px 0 0;
    background: var(--surface); box-shadow: 0 -14px 40px var(--shade); animation: sheet-in .18s ease-out; }
  @keyframes sheet-in { from { transform: translateY(10%); opacity: 0; } }
  .sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .sheet .nl { position: relative; flex-direction: column; justify-content: center; gap: .35rem; min-height: 4.6rem; padding: .6rem .3rem;
    border: 0; border-radius: 12px; background: var(--inset); color: var(--ink); font-size: .8rem; font-weight: 500; line-height: 1.2; text-align: center; }
  .sheet .nl .ic { width: 1.5rem; height: 1.5rem; color: var(--link); }
  .sheet .nl.on { box-shadow: inset 0 0 0 1.5px var(--link); }
  .sheet .nl .cnt { position: absolute; top: .4rem; right: .5rem; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 99px;
    display: flex; align-items: center; justify-content: center; background: var(--signal); color: var(--signal-ink); font-size: .72rem; font-weight: 700; }
  .sheet-foot { display: flex; gap: .5rem; margin-top: .7rem; flex-wrap: wrap; }
  .sheet-foot > * { flex: 1 1 8rem; }
  .sheet-foot button { width: 100%; }
}
@media (max-width: 720px) {
  table.stack, table.stack > tbody, table.stack > tbody > tr, table.stack > tbody > tr > td { display: block; }
  table.stack > tbody > tr.head { display: none; }
  table.stack > tbody > tr { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  table.stack > tbody > tr:first-child, table.stack > tbody > tr.head + tr { padding-top: 0; }
  table.stack > tbody > tr:last-child { border-bottom: 0; padding-bottom: 0; }
  table.stack > tbody > tr > td, table.stack > tbody > tr.mine > td:first-child, table.stack > tbody > tr.mine > td:last-child {
    padding: 0; border: 0; text-align: left; box-shadow: none; background: none; }
  table.stack > tbody > tr > td + td { margin-top: .35rem; }
  table.stack > tbody > tr > td:empty { display: none; }
  table.stack > tbody > tr > td[data-l]::before { content: attr(data-l); display: inline-block; min-width: 7rem; margin-right: .5rem;
    color: var(--muted); font-size: .8rem; }
  table.stack > tbody > tr.mine { background: var(--mine); box-shadow: inset 3px 0 0 var(--signal); padding: .7rem .7rem; border-radius: var(--r-s); }
  table.kv th { width: 7.5rem; white-space: normal; }
  .op { grid-template-columns: minmax(0, 1fr) auto; }
  .op .when { grid-column: 1; grid-row: 2; }
  .op .amt { grid-column: 2; grid-row: 1; }
  .board { padding: 1rem 1.05rem 1.05rem; border-radius: 16px; }
  .board-time { font-size: 4.6rem; }
  .board-name { font-size: 1.15rem; }
  .week .day.today { order: -1; }
  .day { grid-template-columns: minmax(0, 1fr); padding-top: .75rem; }
  .day > h3 { margin-top: 0; }
  .day-slots > p { margin-top: 0; }
  .notice { padding: .7rem .8rem .7rem 1.05rem; }
  .notice .nact .small { min-height: 2.3rem; }
  .dish { flex-wrap: wrap; }
  .dish .dname { flex: 1 1 100%; }
  .dish .price { min-width: 0; text-align: left; }
  .dish .act, .dishes.can .act { min-width: 0; margin-left: auto; }
  .acts-cell > * { margin: .1rem .3rem .1rem 0; }
  .inline-btns { justify-content: flex-start; }
  table.stack .nowrap { white-space: normal; }
  table.results.stack > tbody > tr:not(.head) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem 1rem; align-items: start; }
  table.results.stack > tbody > tr > td { margin-top: 0; }
  table.results.stack .s-kind, table.results.stack .s-end { display: none; }
  table.results.stack .s-sub { display: block; color: var(--muted); font-size: .82rem; }
  table.results.stack .s-name { grid-area: 1 / 1; }
  table.results.stack .s-cr { grid-area: 1 / 2; }
  table.results.stack .s-state { grid-area: 2 / 1; }
  table.results.stack .s-grade { grid-area: 2 / 2; }
  table.results.stack .s-cr, table.results.stack .s-grade { text-align: right; white-space: nowrap; }
  table.results.stack > tbody > tr > td[data-l]::before { min-width: 0; margin-right: .4rem; }
  .bars { gap: .25rem; }
  .bar-m .val { font-size: .62rem; }
  .card { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .live, .sheet { animation: none; }
}
