/* Кабинет репетитора — визуальная система в духе интерфейсов Apple.
   Системный шрифт (на устройствах Apple это SF Pro), плоские цвета, сгруппированные списки,
   тонкие разделители, полупрозрачные панели. Светлая и тёмная темы — через переменные. */

:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, Arial, sans-serif;

  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --elevated: #ffffff;
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .2);
  --label: #000000;
  --label-2: rgba(60, 60, 67, .76);
  --label-3: rgba(60, 60, 67, .3);
  --sep: rgba(60, 60, 67, .2);
  --bar: rgba(242, 242, 247, .8);
  --tabbar: rgba(249, 249, 249, .86);

  --blue: #007aff;
  --blue-fill: #0071e3;
  --link: #005fc0;
  --green: #34c759;
  --green-text: #187431;
  --red: #ff3b30;
  --red-text: #c9000f;
  --orange: #ff9500;
  --orange-text: #a84b00;
  --indigo: #5856d6;
  --teal: #30b0c7;
  --gray: #8e8e93;
  --gray-3: #c7c7cc;
  --seg-thumb: #ffffff;

  --r: 12px;
  --r-lg: 20px;
  --spring: linear(0, .009, .035 2.1%, .141, .281 6.7%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  --ease: cubic-bezier(.32, .72, 0, 1);
  --side: 272px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --elevated: #2c2c2e;
    --fill: rgba(120, 120, 128, .24);
    --fill-2: rgba(120, 120, 128, .36);
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, .62);
    --label-3: rgba(235, 235, 245, .3);
    --sep: rgba(84, 84, 88, .6);
    --bar: rgba(0, 0, 0, .72);
    --tabbar: rgba(22, 22, 24, .82);
    --blue: #0a84ff;
    --blue-fill: #0071e3;
    --link: #3d9fff;
    --green: #30d158;
    --green-text: #30d158;
    --red: #ff453a;
    --red-text: #ff6961;
    --orange: #ff9f0a;
    --orange-text: #ffb340;
    --indigo: #5e5ce6;
    --teal: #40c8e0;
    --gray: #8e8e93;
    --gray-3: #48484a;
    --seg-thumb: #636366;
  }
}

/* ——————————————————————————— переходы между экранами ——————————————————————————— */
@view-transition { navigation: auto; }
.side { view-transition-name: side; }
.bar { view-transition-name: bar; }
.tabbar { view-transition-name: tabbar; }
.main { view-transition-name: content; }
::view-transition-group(side), ::view-transition-group(tabbar) { animation: none; }
::view-transition-old(side), ::view-transition-old(tabbar) { display: none; }
::view-transition-new(side), ::view-transition-new(tabbar) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
::view-transition-old(bar) { animation: vt-fade-out .16s ease both; }
::view-transition-new(bar) { animation: vt-fade-in .26s ease both; }
::view-transition-old(content) { animation: vt-fade-out .14s ease both; }
::view-transition-new(content) { animation: vt-fade-in .24s ease both; }

/* вглубь: новый экран въезжает справа, прежний уходит влево — как в iOS */
html:active-view-transition-type(forward)::view-transition-old(content) { animation: vt-out-left .46s var(--ease) both; }
html:active-view-transition-type(forward)::view-transition-new(content) { animation: vt-in-right .46s var(--ease) both; }
html:active-view-transition-type(back)::view-transition-old(content) { animation: vt-out-right .46s var(--ease) both; z-index: 1; }
html:active-view-transition-type(back)::view-transition-new(content) { animation: vt-in-left .46s var(--ease) both; }
html:active-view-transition-type(next)::view-transition-old(content) { animation: vt-nudge-out-l .2s ease both; }
html:active-view-transition-type(next)::view-transition-new(content) { animation: vt-nudge-in-r .34s var(--ease) both; }
html:active-view-transition-type(prev)::view-transition-old(content) { animation: vt-nudge-out-r .2s ease both; }
html:active-view-transition-type(prev)::view-transition-new(content) { animation: vt-nudge-in-l .34s var(--ease) both; }
@keyframes vt-fade-in { from { opacity: 0; } }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-in-right { from { transform: translateX(100%); } }
@keyframes vt-out-left { to { transform: translateX(-30%); opacity: .35; } }
@keyframes vt-in-left { from { transform: translateX(-30%); opacity: .35; } }
@keyframes vt-out-right { to { transform: translateX(100%); } }
@keyframes vt-nudge-in-r { from { transform: translateX(36px); opacity: 0; } }
@keyframes vt-nudge-out-l { to { transform: translateX(-36px); opacity: 0; } }
@keyframes vt-nudge-in-l { from { transform: translateX(-36px); opacity: 0; } }
@keyframes vt-nudge-out-r { to { transform: translateX(36px); opacity: 0; } }
@media (min-width: 1000px) {
  @keyframes vt-in-right { from { transform: translateX(28px); opacity: 0; } }
  @keyframes vt-out-left { to { transform: translateX(-28px); opacity: 0; } }
  @keyframes vt-in-left { from { transform: translateX(-28px); opacity: 0; } }
  @keyframes vt-out-right { to { transform: translateX(28px); opacity: 0; } }
  html:active-view-transition-type(forward)::view-transition-old(content), html:active-view-transition-type(back)::view-transition-old(content) { animation-duration: .18s; }
  html:active-view-transition-type(forward)::view-transition-new(content), html:active-view-transition-type(back)::view-transition-new(content) { animation-duration: .36s; }
}

/* ——————————————————————————— основа ——————————————————————————— */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--label); font: 400 17px/1.3 var(--font); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3, p, dl, dd, ul, ol, fieldset, figure { margin: 0; padding: 0; }
h1 { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .011em; }
h2 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.012em; }
h3 { font-size: 17px; line-height: 22px; font-weight: 600; }
p { margin-bottom: 8px; }
a { color: var(--link); text-decoration: none; }
small { font-size: 13px; line-height: 18px; color: var(--label-2); }
b, strong { font-weight: 600; }
hr { border: 0; height: .5px; background: var(--sep); margin: 16px 0; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--blue) 28%, transparent); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.muted { color: var(--label-2); font-size: 15px; line-height: 20px; }
.num, .amount { font-variant-numeric: tabular-nums; }
.pos { color: var(--green-text); } .neg { color: var(--red-text); }
.cap { display: block; } .cap::first-letter { text-transform: uppercase; }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 17px; height: 17px; stroke-width: 2.2; }

/* ——————————————————————————— каркас ——————————————————————————— */
.side { display: none; }
.bar { position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr); align-items: center; height: calc(44px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 6px 0 8px; }
.bar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--sep); opacity: 0; transition: opacity .22s ease; }
.bar.is-scrolled::before { opacity: 1; }
.bar-start { justify-self: start; display: flex; align-items: center; min-width: 0; }
.bar-end { justify-self: end; display: flex; align-items: center; gap: 2px; }
.bar-title { min-width: 0; max-width: 46vw; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(5px); transition: opacity .2s ease, transform .3s var(--ease); }
.bar.is-scrolled .bar-title { opacity: 1; transform: none; }
.bar-back { display: inline-flex; align-items: center; gap: 2px; height: 44px; padding-right: 10px; color: var(--link); font-size: 17px; max-width: 44vw; transition: opacity .12s; }
.bar-back .ico { width: 24px; height: 24px; stroke-width: 2.5; margin-right: -2px; }
.bar-back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-back:active, .bar-btn:active { opacity: .35; }
.bar-btn { position: relative; display: grid; place-items: center; width: 40px; height: 44px; color: var(--link); transition: opacity .12s; }
.bar-btn .ico { width: 24px; height: 24px; }
.dot { position: absolute; top: 5px; right: 1px; min-width: 17px; height: 17px; padding: 0 4.500px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; line-height: 17px; text-align: center; }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--label); font-weight: 600; font-size: 15px; line-height: 18px; }
.logo-mark { width: 30px; height: 30px; flex: none; border-radius: 7.500px; display: grid; place-items: center; color: #fff; background: var(--blue-fill); }
.logo-mark svg { width: 18px; height: 18px; stroke-width: 2.6; }

.main { padding: 0 16px 110px; max-width: 720px; margin: 0 auto; }
.main.narrow { max-width: 600px; }
.page-head { margin: 2px 0 16px; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.page-head-row > * { min-width: 0; } /* длинное имя без пробелов в заголовке переносится, а не раздвигает страницу */
.kicker { display: block; margin-bottom: 1px; font-size: 13px; line-height: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--label-2); }
.page-sub { color: var(--label-2); margin: 4px 0 0; font-size: 15px; line-height: 20px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; padding: 0 2px env(safe-area-inset-bottom); background: var(--tabbar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--sep); }
.tab-item { flex: 1; min-width: 0; height: 49px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--label-2); font-size: 10px; font-weight: 500; line-height: 12px; }
.tab-item .ico { width: 25px; height: 25px; stroke-width: 1.8; transition: transform .45s var(--spring); }
.tab-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab-item:active .ico { transform: scale(.86); }
.tab-item[aria-current="page"] { color: var(--link); }
.tab-item[aria-current="page"] .ico { stroke-width: 2.2; }

/* уведомление-баннер сверху */
.toast { position: fixed; top: calc(52px + env(safe-area-inset-top)); left: 8px; right: 8px; z-index: 70; margin: 0 auto; max-width: 420px; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 22px; background: color-mix(in srgb, var(--elevated) 86%, transparent); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); box-shadow: 0 10px 36px rgba(0, 0, 0, .16), 0 0 0 .500px var(--sep); font-size: 15px; line-height: 20px; cursor: pointer; animation: banner-in .7s var(--spring) both; }
.toast > .ico { width: 30px; height: 30px; padding: 6px; border-radius: 50%; color: #fff; background: var(--green); stroke-width: 2.6; }
.toast-warn > .ico { background: var(--orange); } .toast-error > .ico { background: var(--red); }
.toast.is-leaving { transform: translateY(-140%); opacity: 0; pointer-events: none; transition: transform .4s var(--ease), opacity .3s; }
.toast.is-sticky { padding-right: 4px; }
.toast.is-sticky > div { flex: 1; min-width: 0; }
.toast-close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -10px 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--label-2); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s; }
.toast-close .ico { width: 18px; height: 18px; stroke-width: 2.4; }
.toast-close:active { background: var(--fill); }
@keyframes banner-in { from { transform: translateY(-140%); } }

/* шторка снизу и диалог подтверждения */
dialog { color: var(--label); font: inherit; }
dialog::backdrop { background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity .3s ease, overlay .3s allow-discrete, display .3s allow-discrete; }
dialog[open]::backdrop { opacity: 1; }
@starting-style { dialog[open]::backdrop { opacity: 0; } }
.sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 560px; margin: 0 auto; padding: 6px 16px calc(16px + env(safe-area-inset-bottom)); border: 0; border-radius: 16px 16px 0 0; background: var(--bg); transform: translateY(100%); transition: transform .5s var(--ease), overlay .5s allow-discrete, display .5s allow-discrete; }
.sheet[open] { transform: none; }
@starting-style { .sheet[open] { transform: translateY(100%); } }
.sheet::before { content: ""; display: block; width: 36px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: var(--gray-3); }
.sheet h2 { margin: 0 4px 12px; outline: none; }
.sheet .btn { margin-top: 8px; }
.alert { width: 272px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--elevated) 88%, transparent); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); text-align: center; opacity: 0; transform: scale(1.12); transition: opacity .2s ease, transform .3s var(--ease), overlay .2s allow-discrete, display .2s allow-discrete; }
.alert[open] { opacity: 1; transform: none; }
@starting-style { .alert[open] { opacity: 0; transform: scale(1.12); } }
.alert-body { padding: 19px 16px 18px; }
.alert-body b { display: block; font-size: 17px; line-height: 22px; }
.alert-body p { margin: 3px 0 0; font-size: 13px; line-height: 18px; }
.alert-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: .5px solid var(--sep); }
.alert-actions button { height: 44px; border: 0; background: none; color: var(--link); font: 400 17px var(--font); cursor: pointer; }
.alert-actions button + button { border-left: .5px solid var(--sep); font-weight: 600; }
.alert-actions button.danger { color: var(--red-text); }
.alert-actions button:active { background: var(--fill); }

@media (min-width: 1000px) {
  body.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 12px 12px; border-right: .5px solid var(--sep); background: color-mix(in srgb, var(--bg) 70%, var(--surface)); }
  .side .logo { padding: 0 8px 18px; }
  .side-cab { margin: 0 8px 14px; font-size: 13px; line-height: 18px; color: var(--label-2); }
  .side-cab small { display: none; }
  .side-nav { display: flex; flex-direction: column; gap: 1px; }
  .side-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--label); font-size: 15px; transition: background .12s; }
  .side-item .ico { width: 20px; height: 20px; color: var(--blue); }
  .side-item:hover { background: var(--fill); }
  .side-item:active { background: var(--fill-2); }
  .side-item[aria-current="page"] { background: var(--fill-2); font-weight: 600; }
  .side-item .count { margin-left: auto; font-size: 13px; color: var(--label-2); font-weight: 400; font-variant-numeric: tabular-nums; }
  .side-sep { height: 16px; }
  .side-new { margin: 0 0 14px; }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 1px; }
  .side-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--label); }
  .side-user:hover { background: var(--fill); }
  .side-user b { display: block; font-size: 15px; line-height: 20px; font-weight: 500; }
  /* длинное имя или почта (у семьи имя бывает пустым) — в одну строку с многоточием, а не за край панели */
  .side-user > div { min-width: 0; }
  .side-user b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-user small { display: block; }
  .shell { min-width: 0; }
  .tabbar { display: none; }
  .bar { height: 52px; padding: 0 20px 0 24px; }
  .bar-title { max-width: 40vw; }
  .main { padding: 4px 40px 72px; max-width: 900px; }
  .main.narrow { max-width: 640px; }
  .page-head { margin: 0 0 22px; }
  .toast { left: auto; right: 20px; top: 20px; margin: 0; }
  .toast.is-sticky { top: 64px; } /* висит, пока не закроют, — под шапкой, не поверх её кнопок */
  .sheet { inset: 0; margin: auto; height: fit-content; max-width: 380px; border-radius: 14px; padding: 20px; transform: scale(.94); opacity: 0; transition: transform .3s var(--ease), opacity .2s, overlay .3s allow-discrete, display .3s allow-discrete; }
  .sheet[open] { transform: none; opacity: 1; }
  @starting-style { .sheet[open] { transform: scale(.94); opacity: 0; } }
  .sheet::before { display: none; }
  .only-mobile { display: none !important; }
}
@media (max-width: 999.98px) { .only-desktop { display: none !important; } }
/* ширина содержимого на компьютере — по странице: главной с двумя колонками и недельной сетке нужно больше места,
   формам и спискам — нет. «Назад» в шапке стоит над краем содержимого, а не у боковой панели */
@media (min-width: 1000px) {
  body.app .shell { --main-w: 900px; }
  body.app .shell:has(> .main.narrow) { --main-w: 640px; }
  body.app .shell:has(.cols) { --main-w: 1120px; }
  body.app .shell:has(.cgrid) { --main-w: 1400px; }
  body.app .main { max-width: var(--main-w); }
  body.app .bar { padding-left: max(24px, calc((100% - var(--main-w)) / 2 + 30px)); padding-right: max(20px, calc((100% - var(--main-w)) / 2 + 34px)); }
}
/* две колонки главной — только когда правой хватает места: уже 1240 px заявки ломаются на 6–7 строк */
@media (min-width: 1000px) and (max-width: 1239.98px) { .main .cols { grid-template-columns: minmax(0, 1fr); } }

/* страницы без разделов: аккаунт, уведомления, выбор кабинета */
body.solo .main { max-width: 600px; }
.side-new { width: 100%; min-height: 34px; border-radius: 9px; }
.sheet .row-ico.back { background: var(--red); }

/* страницы входа */
body.plain { min-height: 100vh; background: var(--surface); }
.plain .bar { position: static; height: 64px; padding: 0 20px; grid-template-columns: 1fr; }
.plain .bar-title, .plain .bar-end { display: none; }
.plain .main { max-width: 400px; padding: 7vh 20px 48px; }
.plain .page-head { text-align: center; margin-bottom: 26px; }
.plain .page-head-row { justify-content: center; }
.plain .page-sub { font-size: 17px; line-height: 24px; margin-top: 8px; }
.plain .card { padding: 0; background: none; }
.plain .card + .muted, .plain .main > .muted { text-align: center; }
.plain input:not([type="checkbox"]):not([type="radio"]) { background: var(--surface); box-shadow: inset 0 0 0 1px var(--gray-3); min-height: 54px; border-radius: 12px; padding-left: 16px; }
.plain input:not([type="checkbox"]):not([type="radio"]):focus { box-shadow: inset 0 0 0 2px var(--blue-fill); outline: 4px solid color-mix(in srgb, var(--blue) 22%, transparent); }

/* ——————————————————————————— монограммы ——————————————————————————— */
.ava { width: 40px; height: 40px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; background: #8e939e; font: 600 16px var(--font-round); text-transform: uppercase; }
.ava-sm { width: 30px; height: 30px; font-size: 12px; }
.ava-lg { width: 76px; height: 76px; font-size: 30px; }

/* ——————————————————————————— группы и списки ——————————————————————————— */
.card { background: var(--surface); border-radius: var(--r); padding: 16px; margin: 0 0 16px; }
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: 20px; line-height: 25px; font-weight: 600; margin-bottom: 12px; }
.card h3 { margin-bottom: 6px; }
a.card { display: block; color: inherit; transition: background .15s, transform .25s var(--ease); }
a.card:active { background: var(--fill-2); transform: scale(.985); }
.card.list-card { padding: 0; overflow: hidden; }
.card.row { padding: 11px 16px; }
.card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title h2 { margin: 0; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 4px 10px; }
.section-title h2 { margin: 0; }
.section-title a { font-size: 17px; }
/* ссылка-действие у заголовка группы: зона нажатия 44 px по высоте, раскладка та же */
.section-title a, .card-title a { display: inline-block; padding: 11px 0 11px 16px; margin: -11px 0 -11px -16px; text-align: right; }
.count-pill { color: var(--label-2); font-size: 17px; font-variant-numeric: tabular-nums; }
/* подзаголовок группы в длинном списке: месяц в истории занятий */
.list-month { margin: 22px 4px 8px; font-size: 13px; line-height: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--label-2); }
.tabs + .list-month, .search + .list-month { margin-top: 4px; }

.list { list-style: none; }
.list > li { position: relative; }
.list > li + li::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; height: .5px; background: var(--sep); }
.list > li + li:has(> .row > .ava, > .row > .row-ico)::before { left: 68px; }
.list > li + li:has(> .row > .row-ico)::before { left: 60px; }
.card:not(.list-card) > .list > li + li::before { left: 0; }
.card:not(.list-card) > .list > li > .row, .card:not(.list-card) > .list > li.row { padding-left: 0; padding-right: 0; }
.row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 16px; color: inherit; transition: background .15s; }
a.row:active { background: var(--fill-2); }
.row > .ico:last-child, .row-side > .ico { color: var(--label-3); width: 16px; height: 16px; stroke-width: 2.6; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 17px; line-height: 22px; overflow-wrap: anywhere; }
.row-sub { color: var(--label-2); font-size: 15px; line-height: 20px; overflow-wrap: anywhere; }
.row-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; color: var(--label-2); font-size: 17px; font-variant-numeric: tabular-nums; }
.row-side small { font-size: 13px; }
.row-side.neg { color: var(--red-text); } .row-side.pos { color: var(--green-text); }
/* пометка под строкой (возможный повтор оплаты): без разделителя, вровень с текстом строки */
.list > li.row-note { padding: 0 16px 10px 58px; margin-top: -4px; }
.list > li.row-note::before { display: none; }
.row-note .chip { white-space: normal; }
.row-ico { width: 30px; height: 30px; flex: none; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--gray); }
.row-ico .ico { width: 19px; height: 19px; stroke-width: 2.1; }
.row-ico.in { background: var(--green); } .row-ico.out { background: var(--blue); } .row-ico.fix { background: var(--orange); } .row-ico.back { background: var(--red); }
/* строка с двумя действиями: вся она ведёт по ссылке в названии, действие справа нажимается отдельно */
.row-stretch { display: block; color: inherit; }
.row-stretch::after { content: ""; position: absolute; inset: 0; }
.row:has(> .row-main > .row-stretch:active) { background: var(--fill-2); }
.row-action { position: relative; z-index: 1; padding: 12px 8px; margin: -12px -8px; font-size: 15px; line-height: 20px; transition: opacity .12s; }
.row-action:active { opacity: .4; }
@media (hover: hover) { .row:has(> .row-main > .row-stretch:hover) { background: color-mix(in srgb, var(--surface) 92%, var(--label)); } }

.kv { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 0; }
.kv dt, .kv dd { padding: 9px 0; border-top: .5px solid var(--sep); }
.kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; padding-top: 0; }
.kv dt:last-of-type, .kv dd:last-of-type { padding-bottom: 0; }
.kv dt { color: var(--label-2); font-size: 15px; line-height: 22px; }
.kv dd { overflow-wrap: anywhere; text-align: right; padding-left: 14px; }

/* плитки-счётчики */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 10px; padding: 12px 14px 12px; border-radius: var(--r); background: var(--surface); color: inherit; transition: background .15s, transform .25s var(--ease); }
a.stat:active { background: var(--fill-2); transform: scale(.97); }
.stat-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--blue); }
.stat-ico .ico { width: 18px; height: 18px; stroke-width: 2.3; }
.stat-ico.ok { background: var(--green); } .stat-ico.warn { background: var(--orange); } .stat-ico.danger { background: var(--red); } .stat-ico.gray { background: var(--gray); }
.stat b { justify-self: end; font: 700 26px/30px var(--font-round); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat span:not(.stat-ico) { grid-column: 1 / -1; color: var(--label-2); font-size: 15px; line-height: 20px; font-weight: 600; }
.stat:not(:has(.stat-ico)) b { justify-self: start; grid-column: 1 / -1; }
/* плитка со значком: число — отдельной строкой под значком, чтобы сумма с копейками и миллионами помещалась */
.stat:has(.stat-ico) { align-content: start; }
.stat:has(.stat-ico) .stat-ico { grid-column: 1 / -1; }
.stat:has(.stat-ico) b { grid-column: 1 / -1; justify-self: start; max-width: 100%; font-size: 22px; line-height: 28px; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* плитки без значков (расчёты и успехи семьи): плитка не уже своего числа; не помещаются две в ряд — каждая во всю ширину */
.stats:not(:has(.stat-ico)) { display: flex; flex-wrap: wrap; }
.stats:not(:has(.stat-ico)) > .stat { flex: 1 1 calc(50% - 6px); grid-template-columns: auto; }
@media (min-width: 760px) { .stats:not(:has(.stat-ico)) > .stat { flex-basis: calc(25% - 9px); } }

.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 34px 24px; color: var(--label-2); margin-bottom: 16px; }
.empty > .ico { width: 44px; height: 44px; stroke-width: 1.4; color: var(--gray-3); margin-bottom: 4px; }
.empty p { margin: 0; max-width: 30ch; font-size: 15px; line-height: 20px; }
.empty .btn { margin-top: 10px; }

/* ——————————————————————————— метки и сообщения ——————————————————————————— */
.chip { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 13px; font-weight: 600; line-height: 18px; white-space: nowrap; background: var(--fill); color: var(--label-2); }
.chip-ok { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green-text); }
.chip-warn { background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange-text); }
.chip-danger { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red-text); }
.chip-info { background: color-mix(in srgb, var(--blue) 13%, transparent); color: var(--link); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.flash, .notice { border-radius: var(--r); padding: 12px 16px; margin: 0 0 16px; font-size: 15px; line-height: 20px; background: var(--surface); }
.flash-ok { color: var(--green-text); background: color-mix(in srgb, var(--green) 12%, var(--surface)); }
.flash-error { color: var(--red-text); background: color-mix(in srgb, var(--red) 10%, var(--surface)); }
.flash-warn, .notice { color: var(--label); background: color-mix(in srgb, var(--orange) 14%, var(--surface)); }
.notice-info { background: color-mix(in srgb, var(--blue) 10%, var(--surface)); }
/* сообщение в самой форме: ошибка сервера остаётся рядом с введённым */
.form-msg { animation: rise .45s var(--ease) both; }
/* отмена за период: урок глазами семьи — с той причиной, которую сейчас вводят */
.family-view { margin: -4px 0 18px; }
.family-view-cap { margin: 0 2px 6px; font-size: 13px; line-height: 18px; color: var(--label-2); }
.family-view-card { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); }
.family-view-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.family-view-note { margin: 8px 0 0; overflow-wrap: anywhere; animation: rise .35s var(--ease) both; }

/* ——————————————————————————— кнопки ——————————————————————————— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 50px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--blue-fill); color: #fff; font: 600 17px/22px var(--font); cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent; transition: transform .35s var(--spring), opacity .12s ease, background .15s; }
.btn:active { transform: scale(.965); opacity: .78; }
.btn .ico { width: 20px; height: 20px; stroke-width: 2.2; }
.btn-secondary { background: var(--fill); color: var(--link); }
.btn-danger { background: color-mix(in srgb, var(--red) 13%, transparent); color: var(--red-text); }
.btn-ghost { background: none; color: var(--link); font-weight: 400; }
.btn-small { min-height: 32px; padding: 0 14px; border-radius: 16px; font-size: 15px; line-height: 20px; }
.btn-small .ico { width: 16px; height: 16px; }
.btn-big { width: 100%; }
/* на компьютере главная кнопка — по своей подписи, а не полосой во всю колонку; в шторке и на страницах входа — как была */
@media (min-width: 1000px) { body.app .main .btn-big:not(.btn-ghost) { width: auto; min-width: 280px; } body.app .main .sheet .btn-big { width: 100%; min-width: 0; } }
/* кнопка сразу после подсказки или выключателя не прилипает к ним */
.hint + .btn, .switch + .btn { margin-top: 16px; }
.btn[disabled] { opacity: .4; cursor: default; transform: none; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--link); font: inherit; cursor: pointer; }
.btn-link:active { opacity: .4; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.inline-form { display: inline; }
@media (hover: hover) {
  .btn:hover { opacity: .88; }
  .btn-ghost:hover, .btn-link:hover, .section-title a:hover, .bar-back:hover { opacity: .7; }
  a.row:hover, a.card:hover, a.stat:hover, a.tile:hover { background: color-mix(in srgb, var(--surface) 92%, var(--label)); }
}

/* действия плитками, как в карточке контакта */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin: 0 0 16px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; border: 0; border-radius: var(--r); background: var(--surface); color: var(--link); font: 400 12px/16px var(--font); text-align: center; cursor: pointer; transition: background .15s, transform .35s var(--spring); }
.tile:active { transform: scale(.94); background: var(--fill-2); }
.tile-ico { display: grid; place-items: center; height: 26px; }
.tile-ico .ico { width: 23px; height: 23px; stroke-width: 2; }
.tile.danger { color: var(--red-text); }

/* ——————————————————————————— формы ——————————————————————————— */
.field { margin: 0 0 16px; }
.field label, .field-label, legend { display: block; margin: 0 0 6px 2px; padding: 0; font-size: 13px; line-height: 18px; color: var(--label-2); }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], input[type="time"], input[type="url"], input[type="search"], input[type="tel"], input:not([type]), select, textarea {
  width: 100%; min-width: 0; max-width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--fill); color: var(--label);
  font: 400 17px/22px var(--font); -webkit-appearance: none; appearance: none; transition: box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: var(--label-3); }
/* список, в котором ещё ничего не выбрано («Выберите ученика»), — приглушённым цветом, как подсказка в поле */
select:required:invalid { color: var(--label-2); }
select:required:invalid option { color: var(--label); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 3.500px color-mix(in srgb, var(--blue) 45%, transparent); }
textarea { resize: vertical; min-height: 88px; }
select { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='18' viewBox='0 0 14 18' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7l4-4 4 4M3 11l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
/* поле-ссылка: значение показано, а меняется на другом экране; длинное слово («America/Argentina/Buenos_Aires») переносится, а не выталкивает стрелку из поля */
.field-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 10px; background: var(--fill); color: var(--label); font: 400 17px/22px var(--font); overflow-wrap: anywhere; transition: background .15s; }
.field-link .ico { flex: none; width: 16px; height: 16px; color: var(--label-3); stroke-width: 2.6; }
.field-link:active { background: var(--fill-2); }
@media (hover: hover) { .field-link:hover { background: var(--fill-2); } }
input[type="file"] { width: 100%; padding: 10px; border-radius: 10px; background: var(--fill); font: inherit; font-size: 15px; color: var(--label-2); }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 6px 12px; border: 0; border-radius: 14px; background: var(--surface); color: var(--link); font: 600 15px var(--font); cursor: pointer; }
.hint { color: var(--label-2); font-size: 13px; line-height: 18px; margin: 6px 2px 0; }
.field-error { color: var(--red-text); font-size: 13px; line-height: 18px; margin: 6px 2px 0; }
.has-error input, .has-error textarea, .has-error select { box-shadow: 0 0 0 1.500px var(--red); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
@media (max-width: 420px) { .grid-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
fieldset { border: 0; min-width: 0; margin: 0 0 16px; }
/* вопрос теста: текст — заголовком внутри карточки, а не серым на её верхней кромке */
fieldset.card > legend { float: left; width: 100%; margin: 0 0 10px; padding: 0; color: var(--label); font-size: 17px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
fieldset.card > legend + * { clear: both; }
fieldset[data-q] > legend + .hint { margin: -4px 2px 4px; }
/* несколько верных вариантов — квадратная отметка, один — круглая: видно до того, как начнёшь отмечать */
fieldset[data-q] .check input[type="checkbox"] { border-radius: 6px; }

/* отметка-кружок, как в «Напоминаниях» */
.check { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; min-height: 44px; cursor: pointer; }
.check input[type="checkbox"], .check input[type="radio"] { -webkit-appearance: none; appearance: none; flex: none; width: 23px; height: 23px; min-height: 0; margin: 0; padding: 0; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.500px var(--gray-3); cursor: pointer; display: grid; place-content: center; transition: background .2s, box-shadow .2s, transform .4s var(--spring); }
.check input:active { transform: scale(.86); }
/* фокус с клавиатуры: общее «input:focus { outline: none }» здесь не годится — у отметки нет другого признака фокуса */
.check input:focus-visible, .switch input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.check input:checked { background: var(--blue); box-shadow: none; }
.check input::after { content: ""; width: 11px; height: 6px; border: 2.200px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1.5px) rotate(-45deg) scale(0); transition: transform .35s var(--spring); }
.check input:checked::after { transform: translateY(-1.5px) rotate(-45deg) scale(1); }
.check > span { min-width: 0; line-height: 22px; padding-top: .500px; }
.check small { display: block; }
/* список отметок (кому выдать задание или тест): на широком экране — в две колонки */
.check-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; }
.check-grid .check > span { overflow-wrap: anywhere; }
@media (min-width: 760px) { .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* выключатель */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; cursor: pointer; }
.switch > span { min-width: 0; }
.switch small { display: block; }
.switch input { -webkit-appearance: none; appearance: none; flex: none; width: 51px; height: 31px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 16px; background: var(--fill-2); position: relative; cursor: pointer; transition: background .25s ease; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 3px 1px rgba(0, 0, 0, .06); transition: transform .5s var(--spring), width .2s ease; }
.switch input:active::after { width: 33px; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:checked:active::after { transform: translateX(14px); }
.switch input:focus { box-shadow: none; }

/* сегментированный переключатель со скользящим ползунком */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 2px; border-radius: 9px; background: var(--fill); --n: 2; --i: 0; }
.seg::before { content: ""; position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / var(--n)); border-radius: 7px; background: var(--seg-thumb); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); transform: translateX(calc(var(--i) * 100%)); transition: transform .4s var(--ease); }
.seg:has(> label:nth-child(3):last-child) { --n: 3; } .seg:has(> label:nth-child(4):last-child) { --n: 4; } .seg:has(> label:nth-child(5):last-child) { --n: 5; } .seg:has(> label:nth-child(6):last-child) { --n: 6; }
.seg:has(> label:nth-child(2) input:checked) { --i: 1; } .seg:has(> label:nth-child(3) input:checked) { --i: 2; } .seg:has(> label:nth-child(4) input:checked) { --i: 3; } .seg:has(> label:nth-child(5) input:checked) { --i: 4; } .seg:has(> label:nth-child(6) input:checked) { --i: 5; }
.seg label { position: relative; min-width: 0; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; align-content: center; min-height: 32px; padding: 6px; font-size: 15px; line-height: 20px; color: var(--label); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .12s; }
.seg label:active span { opacity: .5; }
.seg input:checked + span { font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--blue); border-radius: 7px; }
/* срок задания: дата и время видны при варианте «Дата», пояснение — при варианте «К уроку» */
.field:has(input[name="due"][value="date"]:not(:checked)) + .due-date,
.field:has(input[name="due"][value="next"]:not(:checked)) ~ .due-next { display: none; }
.due-next, .due-date > .hint { grid-column: 1 / -1; margin: -8px 2px 16px; }

/* выбор одного варианта: строка с галочкой */
.opt { display: block; cursor: pointer; }
.opt + .opt { border-top: .5px solid var(--sep); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt > span { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; transition: opacity .12s; }
.opt:active > span { opacity: .5; }
.opt > span > span { flex: 1; min-width: 0; }
.opt b { display: block; font-weight: 400; }
.opt small { display: block; }
.opt > span::after { content: ""; flex: none; width: 15px; height: 9px; margin-right: 4px; border: 2.400px solid var(--link); border-top: 0; border-right: 0; transform: translateY(-2px) rotate(-45deg) scale(0); opacity: 0; transition: transform .4s var(--spring), opacity .12s; }
.opt input:checked + span::after { transform: translateY(-2px) rotate(-45deg) scale(1); opacity: 1; }
.opt input:focus-visible + span { outline: 3px solid var(--blue); border-radius: 6px; }
.opt[hidden] { display: none; }

.code-input { font: 600 28px/34px var(--font-round) !important; letter-spacing: .38em; text-align: center; padding-left: .38em !important; font-variant-numeric: tabular-nums; min-height: 60px !important; }
.copy-box { display: flex; gap: 8px; align-items: stretch; }
.copy-box input { font-size: 15px; color: var(--label-2); }
.copy-box .btn { min-height: 44px; border-radius: 10px; }
.qr { display: block; width: 216px; height: 216px; margin: 16px auto 4px; padding: 12px; border-radius: 16px; background: #fff; }
.search { position: relative; margin-bottom: 14px; }
.search .ico { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--label-2); pointer-events: none; }
.search input { padding-left: 34px; min-height: 36px; padding-top: 7px; padding-bottom: 7px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.preset { padding: 5px 12px; border: 0; border-radius: 14px; background: var(--fill); color: var(--link); font: 400 15px/20px var(--font); cursor: pointer; transition: transform .35s var(--spring), background .15s; }
.preset:active { transform: scale(.92); background: var(--fill-2); }

.tabs { display: flex; gap: 0; padding: 2px; margin: 0 0 16px; border-radius: 9px; background: var(--fill); }
.tab { flex: 1; min-width: 0; min-height: 32px; display: block; line-height: 32px; text-align: center; padding: 0 8px; border-radius: 7px; color: var(--label); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .12s; }
.tab:active { opacity: .5; }
.tab.active, .tab[aria-current="page"] { background: var(--seg-thumb); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }

.table-wrap { overflow-x: auto; padding: 4px 16px; }
table.table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 20px; }
.table th { text-align: left; color: var(--label-2); font-weight: 400; font-size: 13px; padding: 10px 12px 8px 0; border-bottom: .5px solid var(--sep); white-space: nowrap; }
.table td { padding: 11px 12px 11px 0; border-bottom: .5px solid var(--sep); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; padding-left: 12px; }
/* таблица на телефоне: пять столбцов не помещаются — имя строкой сверху, под ним цифры в две колонки, подпись над числом */
@media (max-width: 599.98px) {
  .table-wrap:has(> .table-stack) { overflow: visible; padding: 0 16px; }
  .table-stack, .table-stack tbody { display: block; }
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-stack tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; padding: 11px 0 12px; border-bottom: .5px solid var(--sep); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td { padding: 0; border: 0; }
  .table-stack td:first-child { grid-column: 1 / -1; font-size: 17px; line-height: 22px; overflow-wrap: anywhere; }
  .table-stack td.num { padding: 0; text-align: left; }
  .table-stack td[data-label]::before { content: attr(data-label); display: block; color: var(--label-2); font-size: 13px; line-height: 18px; }
}

details > summary { cursor: pointer; }
details.card { interpolate-size: allow-keywords; padding: 0; }
details.card > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 17px; padding: 16px; }
/* нажимается вся шапка карточки, а не только строка текста: поля карточки перенесены в шапку и содержимое */
details.card > :not(summary) { margin-left: 16px; margin-right: 16px; }
details.card[open] { padding-bottom: 16px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: ""; width: 8px; height: 8px; margin-right: 4px; border: 2.200px solid var(--label-3); border-top: 0; border-left: 0; transform: rotate(45deg) translate(-2px, -2px); transition: transform .3s var(--ease); }
details.card[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
details.card[open] > summary { padding-bottom: 0; margin-bottom: 12px; }
details.card::details-content { block-size: 0; overflow: clip; transition: block-size .4s var(--ease), content-visibility .4s allow-discrete; }
details.card[open]::details-content { block-size: auto; }

/* ——————————————————————————— экран «Сегодня» ——————————————————————————— */
.hero { display: block; padding: 20px; margin: 0 0 16px; border-radius: var(--r-lg); background: var(--surface); color: var(--label); }
a.hero { transition: background .15s, transform .25s var(--ease); }
a.hero:active { transform: scale(.98); background: var(--fill-2); }
.hero-kicker { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--label-2); }
.hero-kicker .ico { width: 15px; height: 15px; }
.hero-title { margin: 4px 0 2px; font-size: 28px; line-height: 34px; font-weight: 700; }
.hero-sub { margin: 0 0 16px; color: var(--label-2); font-size: 17px; line-height: 22px; }
.hero-more { display: block; margin-top: 14px; text-align: center; font-size: 17px; }
.hero.accent .hero-kicker { color: var(--orange-text); }
.hero-live { flex: none; width: 8px; height: 8px; margin: 0 2px 0 3px; border-radius: 50%; background: var(--green); animation: hero-live 1.8s ease-in-out infinite; }
@keyframes hero-live { 50% { opacity: .4; } }

.timeline { list-style: none; margin-bottom: 16px; }
.tl { display: flex; gap: 12px; align-items: stretch; }
.tl + .tl { margin-top: 8px; }
.tl-time { flex: none; width: 50px; padding-top: 12px; text-align: right; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 22px; }
.tl-time small { display: block; font-size: 13px; line-height: 18px; }
.tl-card { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px 10px 20px; border-radius: var(--r); background: var(--surface); color: inherit; transition: background .15s; }
.tl-card::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 4px; border-radius: 2px; background: var(--blue); }
.tl-card.done::before { background: var(--green); } .tl-card.warn::before { background: var(--orange); } .tl-card.off::before { background: var(--gray-3); }
.tl-card.off { opacity: .6; }
.tl-card .row-title { font-weight: 600; }
.tl-card .row-sub, .tl-card .row-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-card > .ava { display: none; }
/* стрелка «Открыть занятие»: нажимается по всей высоте карточки */
.tl-go { align-self: stretch; display: grid; place-items: center; padding: 0 14px 0 13px; margin: -10px -14px -10px 0; color: var(--label-3); }

.steps { list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.steps li + li { border-top: .5px solid var(--sep); }
.steps li::before { content: counter(step); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.500px var(--gray-3); color: var(--label-2); font: 600 14px var(--font-round); }
.steps li.done::before { content: ""; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.500l4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat; box-shadow: none; }
.steps li.done .row-title { color: var(--label-2); }
.meter { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; margin: 4px 0 8px; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--green); transform-origin: left; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

/* ——————————————————————————— ученик, занятие ——————————————————————————— */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; margin: 6px 0 16px; }
.profile h1 { font-size: 28px; line-height: 34px; margin-top: 8px; }
.profile-sub { color: var(--label-2); margin: 0; font-size: 15px; line-height: 20px; }
.profile .chips { justify-content: center; margin-top: 8px; }

.lesson-head { padding: 20px; border-radius: var(--r-lg); background: var(--surface); margin-bottom: 16px; }
.lesson-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lesson-when { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: normal; }
.lesson-when::first-letter { text-transform: uppercase; }
.lesson-when small { display: block; margin-top: 2px; font-size: 15px; line-height: 20px; font-weight: 400; }
.lesson-who { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: .5px solid var(--sep); color: inherit; }
.lesson-who:active { opacity: .5; }
.lesson-who > .ico { color: var(--label-3); width: 16px; height: 16px; stroke-width: 2.6; }

.success { text-align: center; padding: 28px 20px 22px; border-radius: var(--r-lg); background: var(--surface); margin-bottom: 16px; }
.success-ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; animation: pop .7s var(--spring) both; }
.success-ico .ico { width: 34px; height: 34px; stroke-width: 3; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .45s .3s ease-out forwards; }
.success h2 { margin-bottom: 4px; }
.success ul { list-style: none; display: inline-flex; flex-direction: column; gap: 4px; margin: 10px 0 2px; text-align: left; color: var(--label-2); font-size: 15px; line-height: 20px; }
.success li { display: flex; gap: 8px; align-items: flex-start; animation: rise .5s var(--ease) both; }
.success li:nth-child(1) { animation-delay: .45s; } .success li:nth-child(2) { animation-delay: .52s; } .success li:nth-child(3) { animation-delay: .59s; } .success li:nth-child(4) { animation-delay: .66s; } .success li:nth-child(n + 5) { animation-delay: .73s; }
.success li .ico { width: 16px; height: 16px; margin-top: 2px; color: var(--green-text); stroke-width: 2.8; }
.success li > span { min-width: 0; overflow-wrap: anywhere; }
.success .actions { justify-content: center; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* ——————————————————————————— календарь ——————————————————————————— */
.cal-nav { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.cal-nav strong { flex: 1; font-size: 20px; line-height: 25px; font-weight: 600; margin-left: 6px; }
.cal-nav .btn { min-width: 44px; min-height: 44px; padding: 0 8px; background: none; color: var(--link); }
.cal-nav .btn .ico { width: 22px; height: 22px; stroke-width: 2.4; }
/* название недели — оно же переход к дате: поле даты лежит поверх невидимым и открывает системный календарь */
.cal-jump { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.cal-jump label { position: relative; display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 10px 0; margin: -10px 0; border-radius: 8px; cursor: pointer; transition: opacity .12s; }
.cal-jump label:active { opacity: .45; }
.cal-jump label::after { content: ""; flex: none; width: 7px; height: 7px; margin: -5px 3px 0 0; border: 2.200px solid var(--link); border-top: 0; border-left: 0; transform: rotate(45deg); }
.cal-jump label:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.cal-jump strong { flex: 0 1 auto; }
.cal-jump input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; }
.cal-jump input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.weekstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 0 -4px 6px; padding-bottom: 10px; border-bottom: .5px solid var(--sep); }
.wday { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-bottom: 9px; color: var(--label); }
.wday small { font-size: 11px; line-height: 13px; font-weight: 600; text-transform: uppercase; color: var(--label-2); }
.wday b { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; font-weight: 400; font-variant-numeric: tabular-nums; transition: background .2s, transform .4s var(--spring); }
.wday:active b { transform: scale(.88); }
.wday.today b { color: var(--red); font-weight: 600; }
.wday.active b { background: var(--label); color: var(--bg); font-weight: 600; }
.wday.active.today b { background: var(--red); color: #fff; }
.wday i { position: absolute; bottom: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--gray-3); }
.cal-day { margin-bottom: 18px; }
.free { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 4px 0; color: var(--label-2); font-size: 13px; line-height: 18px; }
.free a, .free span { padding: 9px 12px; border-radius: 19px; background: var(--fill); color: var(--link); font-size: 15px; font-variant-numeric: tabular-nums; }
/* окно записи: зона нажатия 44 px по высоте за счёт невидимого поля, ряды окон не раздвигаются */
.free a { position: relative; }
.free a::after { content: ""; position: absolute; inset: -4px -3px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slot { display: block; }
.slot input { position: absolute; opacity: 0; }
.slot span { display: block; text-align: center; padding: 11px 4px; border-radius: 10px; background: var(--surface); font-size: 17px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .2s, color .2s, transform .4s var(--spring); }
.slot:active span { transform: scale(.93); }
.slot input:checked + span { background: var(--blue-fill); color: #fff; font-weight: 600; }
.slot input:focus-visible + span { outline: 3px solid var(--blue); }

.cgrid { display: none; }
@media (min-width: 1000px) {
  .cal-mobile { display: none; }
  .cgrid { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); border-radius: var(--r); background: var(--surface); overflow: hidden; margin-bottom: 16px; }
  .cgrid-corner { border-bottom: .5px solid var(--sep); }
  .cgrid-head { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 10px 4px; border-bottom: .5px solid var(--sep); color: var(--label-2); font-size: 13px; text-transform: capitalize; }
  .cgrid-head b { min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; display: inline-grid; place-items: center; font-size: 17px; font-weight: 400; color: var(--label); }
  .cgrid-head.today b { background: var(--red); color: #fff; font-weight: 600; }
  .cgrid-head:hover b { background: var(--fill); }
  .cgrid-head.today:hover b { background: var(--red); }
  .cgrid-times { position: relative; }
  .cgrid-times span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--label-2); font-variant-numeric: tabular-nums; }
  .cgrid-times span:first-child { transform: translateY(2px); }
  /* линия каждого часа: на обычном мониторе полпикселя не рисуется — там она в пиксель, на «ретине» — в полпикселя */
  .cgrid-col { position: relative; border-left: .5px solid var(--sep); background-image: linear-gradient(to bottom, var(--sep) 1px, transparent 1px); background-size: 100% var(--hour); }
  .cgrid-ev { position: absolute; left: 2px; right: 3px; z-index: 2; overflow: hidden; padding: 3px 6px 3px 9px; border-radius: 5px; background: color-mix(in srgb, var(--blue) 16%, var(--surface)); color: var(--link); font-size: 12px; line-height: 15px; transition: filter .15s, transform .3s var(--ease); }
  .cgrid-ev::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue); }
  .cgrid-ev:hover { filter: brightness(.95); z-index: 3; }
  .cgrid-ev:active { transform: scale(.97); }
  .cgrid-ev b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cgrid-ev.short { display: flex; align-items: center; gap: 4px; padding-top: 0; padding-bottom: 0; }
  .cgrid-ev.short b { flex: 0 1 auto; min-width: 0; }
  .cgrid-ev.short span { flex: none; font-variant-numeric: tabular-nums; }
  .cgrid-ev.done { background: color-mix(in srgb, var(--green) 18%, var(--surface)); color: var(--green-text); } .cgrid-ev.done::before { background: var(--green); }
  .cgrid-ev.warn { background: color-mix(in srgb, var(--orange) 20%, var(--surface)); color: var(--orange-text); } .cgrid-ev.warn::before { background: var(--orange); }
  .cgrid-ev.off { background: var(--fill); color: var(--label-2); text-decoration: line-through; } .cgrid-ev.off::before { background: var(--gray-3); }
  /* свободное окно для записи: видно всегда, при наведении — плюс «назначить сюда» */
  .cgrid-free { position: absolute; left: 2px; right: 3px; z-index: 1; display: grid; place-items: center; border-radius: 5px; background: color-mix(in srgb, var(--blue) 4%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 16%, transparent); transition: background .15s; }
  .cgrid-free::after { content: "+"; color: var(--link); font-size: 20px; font-weight: 300; line-height: 1; opacity: 0; transition: opacity .15s; }
  .cgrid-free:hover, .cgrid-free:focus-visible { background: color-mix(in srgb, var(--blue) 10%, transparent); }
  .cgrid-free:hover::after, .cgrid-free:focus-visible::after { opacity: 1; }
  .cgrid-now { position: absolute; left: 0; right: 0; z-index: 4; height: 1px; background: var(--red); pointer-events: none; }
  .cgrid-now::before { content: ""; position: absolute; left: -4px; top: -3.500px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
}
@media (min-width: 1000px) and (min-resolution: 2dppx) {
  .cgrid-col { background-image: linear-gradient(to bottom, var(--sep) .5px, transparent .5px); }
}

/* ——————————————————————————— итог урока ——————————————————————————— */
.sum-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r); background: var(--surface); margin-bottom: 16px; }
.sum-head .row-title { font-weight: 600; }
.rec { text-align: center; padding: 26px 16px 22px; border-radius: var(--r-lg); background: var(--surface); margin-bottom: 16px; }
.rec-wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 54px; margin-bottom: 6px; }
.rec-wave i { width: 3px; height: 4px; border-radius: 1.500px; background: var(--gray-3); transition: height .3s var(--ease), background .3s; }
.rec.is-live .rec-wave i { background: var(--red); animation: wave 1s ease-in-out infinite; }
.rec.is-live .rec-wave i:nth-child(3n) { animation-duration: .7s; } .rec.is-live .rec-wave i:nth-child(3n + 1) { animation-duration: 1.150s; animation-delay: -.3s; }
.rec.is-live .rec-wave i:nth-child(4n) { animation-delay: -.55s; } .rec.is-live .rec-wave i:nth-child(5n) { animation-duration: .85s; animation-delay: -.15s; } .rec.is-live .rec-wave i:nth-child(7n) { animation-delay: -.8s; }
@keyframes wave { 0%, 100% { height: 5px; } 50% { height: var(--h, 34px); } }
.rec-time { font: 300 46px/52px var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.01em; margin-bottom: 14px; }
.rec-btn { width: 74px; height: 74px; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 3.500px var(--gray-3); display: inline-grid; place-items: center; cursor: pointer; transition: transform .4s var(--spring); -webkit-tap-highlight-color: transparent; }
.rec-btn::before { content: ""; width: 58px; height: 58px; border-radius: 29px; background: var(--red); transition: width .4s var(--ease), height .4s var(--ease), border-radius .4s var(--ease); }
.rec-btn:active { transform: scale(.94); }
.rec-btn.is-recording::before { width: 28px; height: 28px; border-radius: 7px; }
.rec-btn[disabled] { opacity: .35; cursor: default; }
.rec-status { margin: 16px auto 0; max-width: 34ch; color: var(--label-2); font-size: 15px; line-height: 20px; }
.rec .actions { justify-content: center; }
.rec-hints { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.rec-hints span { padding: 4px 10px; border-radius: 13px; background: var(--fill); color: var(--label-2); font-size: 13px; line-height: 18px; }
.rec.is-live .rec-hints { display: none; }
.or { display: flex; align-items: center; gap: 12px; margin: 6px 4px 14px; color: var(--label-2); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: .5px; background: var(--sep); }

.row.row-wrap { flex-wrap: wrap; align-items: flex-start; row-gap: 12px; }
.row-wrap .row-main { flex: 1 1 240px; }
.row-actions { display: flex; gap: 8px; flex: none; }
.player { display: flex; align-items: center; gap: 12px; margin: 0 16px 14px; }
.player audio { display: block; width: 100%; height: 40px; }
.player.is-ready audio { display: none; }
.player-btn { flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--blue); cursor: pointer; transition: transform .3s var(--spring), background .15s; }
.player-btn:active { transform: scale(.88); background: var(--fill-2); }
.player-btn::before { content: ""; width: 12px; height: 14px; margin-left: 3px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.player.is-playing .player-btn::before { margin-left: 0; clip-path: polygon(0 0, 34% 0, 34% 100%, 0 100%, 0 0, 66% 0, 100% 0, 100% 100%, 66% 100%, 66% 0); }
.player-track { position: relative; flex: 1; min-width: 0; height: 36px; }
.player-track::before { content: ""; position: absolute; left: 0; right: 0; top: 16px; height: 4px; border-radius: 2px; background: var(--fill); }
.player-fill { position: absolute; left: 0; top: 16px; width: var(--p, 0%); height: 4px; border-radius: 2px; background: var(--blue); }
.player-fill::after { content: ""; position: absolute; right: -7px; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 1px 4px rgba(0, 0, 0, .28); transition: transform .25s var(--spring); }
.player-track:active .player-fill::after { transform: scale(1.25); }
.player-track input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.player-track:has(input:focus-visible)::before { outline: 2px solid var(--blue); outline-offset: 4px; }
.player-time { flex: none; min-width: 38px; text-align: right; color: var(--label-2); font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.player.is-failed .player-btn { color: var(--label-3); pointer-events: none; }
.progress { height: 4px; background: var(--fill); border-radius: 2px; overflow: hidden; margin: 14px 0 12px; }
.progress i { display: block; width: 40%; height: 100%; border-radius: 2px; background: var(--blue); animation: slide 1.200s infinite var(--ease); }
@keyframes slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
/* ход отправки файлов: полоса заполняется по мере загрузки, под ней — «Отменить» */
.progress.is-exact i { width: var(--p, 0%); animation: none; transition: width .3s ease; }
.upload-status { animation: vt-fade-in .3s ease both; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; font-variant-numeric: tabular-nums; }
.upload-status .progress { margin-bottom: 4px; }

#review { overflow-wrap: break-word; } /* длинное слово из заметки или название пакета без пробелов не растягивает экран */
.rs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rs-head h2 { margin: 0; }
.rs-head small { display: block; }
.rs-ico { width: 30px; height: 30px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--blue); color: #fff; }
.rs-ico .ico { width: 19px; height: 19px; stroke-width: 2.1; }
.review-section.private .rs-ico { background: var(--gray); }
.review-section.money .rs-ico { background: var(--green); }
.source { margin: -8px 0 16px; padding: 0 2px; color: var(--label-2); font-size: 13px; line-height: 18px; }
/* урок без цены: пояснение под вариантами «Чем оплачивается этот урок» и поле цены, которое открывается по нажатию */
.price-note { padding-top: 10px; border-top: .5px solid var(--sep); }
.price-note > .hint { margin: 0 2px; }
.price-note summary { display: inline-block; list-style: none; padding: 8px 2px 2px; color: var(--link); font-size: 15px; line-height: 20px; }
.price-note summary::-webkit-details-marker { display: none; }
.price-note summary:active { opacity: .4; }
.price-note details[open] > summary { display: none; }
.price-note .field { margin: 14px 0 6px; }
.price-note .btn { margin-top: 10px; }
.preview { border-radius: 10px; background: var(--surface-2); padding: 2px 12px; font-size: 15px; line-height: 20px; margin-top: 14px; }
.preview div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 9px 0; animation: vt-fade-in .3s ease both; }
.preview div + div { border-top: .5px solid var(--sep); }
.preview div span:first-child { min-width: 0; color: var(--label-2); }
.preview div span:last-child { flex: none; max-width: 60%; text-align: right; font-variant-numeric: tabular-nums; }
.preview div:last-child span:last-child { font-weight: 600; }
.preview small { font-size: 13px; }
/* расчёт не совпадает с полями формы: пока обновляется — приглушён (с задержкой, чтобы быстрый ответ не мигал), без связи — с подписью */
.preview, .plan-brief { transition: opacity .2s ease; }
.preview-stale { margin: 14px 2px -6px; color: var(--orange-text); font-size: 13px; line-height: 18px; }
.is-recalc .preview, .is-recalc .plan-brief, .is-recalc .sticky-submit .btn { opacity: .45; transition-delay: .3s; }
.is-outdated .preview { opacity: .45; }
.sticky-submit { position: sticky; bottom: calc(49px + env(safe-area-inset-bottom)); z-index: 20; margin: 16px -16px 0; padding: 12px 16px; background: var(--bar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--sep); }
@media (min-width: 1000px) { .sticky-submit { bottom: 0; margin: 16px 0 0; padding: 12px 0; background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 0; } }
/* над закреплённой кнопкой: сообщение и строка «что запишется в расчёты» — видны при любой прокрутке */
.sticky-submit .flash { margin-bottom: 10px; }
.sticky-submit .btn[disabled] { opacity: .4; }
.sticky-submit .flash a { font-weight: 600; white-space: nowrap; }
.plan-brief { margin: 0 2px 8px; text-align: center; color: var(--label-2); font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.plan-brief.is-warn { color: var(--orange-text); }

/* ——————————————————————————— работы, файлы ——————————————————————————— */
.attempt { border-radius: var(--r); padding: 16px; margin-bottom: 12px; background: var(--surface); }
.attempt-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; line-height: 18px; color: var(--label-2); }
.attempt-head b { color: var(--label); font-size: 15px; }
.files { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.files a { display: inline-block; padding: 7px 12px; border-radius: 16px; background: var(--fill); font-size: 15px; line-height: 20px; overflow-wrap: anywhere; transition: opacity .12s; }
.files a:active { opacity: .5; }
.compare { display: grid; gap: 12px; }
@media (min-width: 760px) { .compare { grid-template-columns: 1fr 1fr; } }
.quote { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 22px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 28px; }
@media (min-width: 1100px) { .cols { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } }

/* плавное появление числа и содержимого после подсчёта */
[data-count] { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .success-ico .ico { stroke-dashoffset: 0; } /* галочка «успеха» видна сразу, без прорисовки */
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@media print {
  .side, .bar, .tabbar, .toast, .actions { display: none !important; } body { background: #fff; display: block !important; }
  /* на бумаге — только содержимое: из вкладок остаётся выбранная (период, ребёнок); стрелок, кнопок, форм и свёрнутых блоков нет */
  .tabs { padding: 0; background: none; } .tab { justify-content: flex-start; padding: 0; box-shadow: none !important; } .tab:not(.active):not([aria-current="page"]) { display: none; }
  .seg, .cal-nav a, .cal-nav .btn, .tiles, .player, .btn, .btn-link, .row-action, main form:not(.cal-jump), details:not([open]), dialog, .sticky-submit { display: none !important; }
  :root { color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #f2f2f7; --label: #000; --label-2: rgba(60, 60, 67, .75); --label-3: rgba(60, 60, 67, .4); --sep: rgba(60, 60, 67, .3); --link: #0066cc; --red-text: #d70015; --green-text: #1f8a3b; --orange-text: #b25000; }
  body { min-height: 0 !important; }
  .main { max-width: none !important; padding: 0 !important; }
  .card, .hero, .lesson-head, .stat, .attempt, .row, .table tr { break-inside: avoid; }
  h1, h2, .section-title, .list-month { break-after: avoid; }
  .row-ico, .stat-ico, .rs-ico, .ava, .chip, .meter i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
