/* Тиммейт — панель директора. Две темы на CSS-переменных:
   светлая по умолчанию (директор работает днём за компьютером), тёмная — как в приложении
   (фон #0D0D0D, карточки #1E1F24). Оранжевый — действия, зелёный/жёлтый/красный — состояние.
   Предпросмотр табло (.tvp) всегда тёмный — он повторяет телевизор. */
:root {
  color-scheme: light;
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --card2: #EEEEF1;
  --card3: #F6F6F9;
  --line: rgba(0, 0, 0, .08);
  --line2: rgba(0, 0, 0, .14);
  --ink: #151515;
  --ink2: #3A3A3A;
  --muted: #6B6B6B;
  --muted2: #9A9A9F;
  --accent: #DF5634;
  --accent-d: #B2452A;
  --accent-l: #C94A2B;
  --accent-bg: rgba(223, 86, 52, .12);
  --blue: #4A61C1;
  --blue-l: #3B4FA8;
  --blue-bg: rgba(74, 97, 193, .12);
  --blue-ink: #2E3F8F;
  --green: #13A86C;
  --green-fill: #1AC781;
  --green-bg: rgba(26, 199, 129, .15);
  --red: #E03131;
  --red-l: #C92A2A;
  --red-bg: rgba(224, 49, 49, .1);
  --red-bg2: rgba(224, 49, 49, .2);
  --amber: #B97F00;
  --amber-fill: #F2B705;
  --amber-bg: rgba(217, 154, 0, .16);
  --grey-bg: rgba(0, 0, 0, .06);
  --badge-ink: #4A4A4A;
  --hover: rgba(0, 0, 0, .045);
  --btn-hover: #E3E3E8;
  --row-hover: #F6F6F8;
  --row-sel: #EEF1FB;
  --track: #CFCFD6;
  --knob: #FFFFFF;
  --dot-ink: #FFFFFF;
  --exc-line: #BDBDC5;
  --sk2: #F6F6F9;
  --top-bg: rgba(245, 245, 247, .88);
  --shadow: 0 20px 50px -10px rgba(0, 0, 0, .25);
  --toast-bg: #26262B;
  --toast-ink: #FFFFFF;
  --toast-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  --r: 20px;
  --r-s: 12px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --pad: 28px;
}
[data-theme="dark"], .tvp {
  color-scheme: dark;
  --bg: #0D0D0D;
  --card: #1E1F24;
  --card2: #32343A;
  --card3: #26272D;
  --line: rgba(255, 255, 255, .07);
  --line2: rgba(255, 255, 255, .12);
  --ink: #FFFFFF;
  --ink2: #DDDDDD;
  --muted: #999999;
  --muted2: #6E6E6E;
  --accent: #DF5634;
  --accent-d: #B2452A;
  --accent-l: #E5785D;
  --accent-bg: rgba(223, 86, 52, .14);
  --blue: #4A61C1;
  --blue-l: #7B8EE0;
  --blue-bg: rgba(74, 97, 193, .18);
  --blue-ink: #D7DDFF;
  --green: #1AC781;
  --green-fill: #1AC781;
  --green-bg: rgba(26, 199, 129, .13);
  --red: #FF3535;
  --red-l: #FF6B6B;
  --red-bg: rgba(255, 53, 53, .13);
  --red-bg2: rgba(255, 53, 53, .24);
  --amber: #FFC93C;
  --amber-fill: #FFC93C;
  --amber-bg: rgba(255, 201, 60, .13);
  --grey-bg: rgba(255, 255, 255, .07);
  --badge-ink: #CCCCCC;
  --hover: rgba(255, 255, 255, .06);
  --btn-hover: #3C3E45;
  --row-hover: #26272B;
  --row-sel: #262B40;
  --track: #32343A;
  --knob: #FFFFFF;
  --dot-ink: #0D0D0D;
  --exc-line: #5A5C63;
  --sk2: #26272D;
  --top-bg: rgba(13, 13, 13, .88);
  --shadow: 0 20px 50px -10px rgba(0, 0, 0, .7);
  --toast-bg: #32343A;
  --toast-ink: #FFFFFF;
  --toast-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num, .tile-v, td.n, th.n { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.noscript { padding: 40px; text-align: center; }
[hidden] { display: none !important; }

/* ─── Загрузка ─────────────────────────────────────────────── */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--card2); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.sk {
  background: linear-gradient(90deg, var(--card) 0%, var(--sk2) 50%, var(--card) 100%);
  background-size: 200% 100%;
  animation: sk 1.3s ease-in-out infinite;
  border-radius: var(--r);
}
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ─── Вход ─────────────────────────────────────────────────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--card); border-radius: 24px;
  padding: 32px 28px 28px;
}
.login-card .brand { margin-bottom: 26px; }
.login-card h1 { font-size: 22px; font-weight: 500; margin-bottom: 4px; }
.login-card p.sub { color: var(--muted); margin-bottom: 22px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r-s);
  background: var(--bg); border: 1px solid var(--line2); outline: none;
  transition: border-color .15s;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--muted2); }
.form-err {
  background: var(--red-bg); color: var(--red-l); border-radius: var(--r-s);
  padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px;
}
.btn {
  height: 44px; padding: 0 18px; border-radius: 22px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--card2); transition: background .15s, transform .1s; white-space: nowrap;
}
.btn:hover { background: var(--btn-hover); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-l); }
.btn.primary:active { background: var(--accent-d); }
.btn.block { width: 100%; height: 48px; margin-top: 6px; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 17px; }
.btn .ic { width: 16px; height: 16px; }

/* ─── Шапка ────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--top-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1600px; margin: 0 auto; padding: 0 var(--pad); height: 64px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .01em; font-size: 17px; flex: none; }
/* Лого «Т» без подложки: читается на светлой и тёмной теме. */
.brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 30px; height: 26px; }
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: -2px; }
.nav { display: flex; gap: 4px; flex: none; }
.nav a {
  height: 36px; padding: 0 14px; border-radius: 18px; display: flex; align-items: center; gap: 7px;
  color: var(--muted); font-weight: 500; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); }
.nav a.on { background: var(--card); color: var(--ink); }
.nav .ic { width: 17px; height: 17px; }
.search { position: relative; flex: 1; max-width: 380px; margin-left: auto; }
.search .input { height: 38px; border-radius: 19px; padding-left: 38px; background: var(--card); border-color: transparent; }
.search .input:focus { border-color: var(--accent); }
.search > .ic { position: absolute; left: 13px; top: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search .spinner { position: absolute; right: 12px; top: 11px; }
.sugg {
  position: absolute; left: 0; right: 0; top: 44px; background: var(--card); border: 1px solid var(--line2);
  border-radius: 16px; padding: 6px; box-shadow: var(--shadow); max-height: 70vh; overflow-y: auto;
}
.sugg a, .sugg .empty-s { display: block; padding: 9px 12px; border-radius: 10px; }
.sugg a.on, .sugg a:hover { background: var(--card2); }
.sugg b { font-weight: 500; display: block; }
.sugg small { color: var(--muted); font-size: 12.5px; }
.sugg .empty-s { color: var(--muted); }
.sugg .all { color: var(--accent-l); font-size: 13px; }
.user { display: flex; align-items: center; gap: 12px; flex: none; }
.user-name { color: var(--muted); font-size: 13px; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── Страница ─────────────────────────────────────────────── */
.main { max-width: 1600px; margin: 0 auto; padding: 24px var(--pad) 64px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--muted2); }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 20px; }
.head-t { min-width: 0; }
.eyebrow { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 500; letter-spacing: -.01em; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); margin-top: 8px; font-size: 13.5px; }
.meta b { color: var(--ink); font-weight: 500; }
.meta a { color: var(--ink); border-bottom: 1px solid var(--line2); }
.meta a:hover { border-color: var(--accent); }

/* Период */
.period { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.seg { display: inline-flex; background: var(--card); border-radius: 20px; padding: 3px; }
.seg button {
  height: 34px; padding: 0 15px; border-radius: 17px; color: var(--muted); font-weight: 500;
  transition: background .15s, color .15s; white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--accent); color: #fff; }
.period-range { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.period-range b { color: var(--ink); font-weight: 500; }
.dates { display: flex; align-items: center; gap: 6px; }
.dates input {
  height: 36px; padding: 0 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line2);
  font-size: 13.5px; outline: none;
}
.dates input:focus { border-color: var(--accent); }
.dates input:invalid, .dates input.bad { border-color: var(--red); }

/* Фильтр по тренеру */
.filter {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--blue-bg); color: var(--blue-ink);
  border-radius: 14px; padding: 10px 12px 10px 16px; margin-bottom: 16px;
}
.filter b { font-weight: 500; color: var(--ink); }
.filter .btn { margin-left: auto; background: var(--hover); }

/* Плитки */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.tiles.t4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile {
  background: var(--card); border-radius: var(--r); padding: 16px 18px 16px; min-width: 0;
  display: flex; flex-direction: column; position: relative;
}
a.tile { transition: background .15s; }
a.tile:hover { background: var(--card3); }
.tile-l { color: var(--muted); font-size: 13px; line-height: 1.3; min-height: 17px; }
.tile-v { font-size: 38px; line-height: 1.1; font-weight: 500; letter-spacing: -.02em; margin-top: 10px; white-space: nowrap; }
.tile-v small { font-size: 18px; color: var(--muted); font-weight: 400; margin-left: 3px; letter-spacing: 0; }
.tile-s { color: var(--muted); font-size: 12.5px; margin-top: 6px; line-height: 1.35; }
.tile-bar { height: 4px; border-radius: 2px; background: var(--card2); margin-top: 12px; overflow: hidden; }
.tile-bar i { display: block; height: 100%; border-radius: 2px; background: var(--ink); }
.tile.warn .tile-v { color: var(--amber); }
.tile.bad .tile-v { color: var(--red-l); }
.tile.alert { background: linear-gradient(160deg, rgba(223,86,52,.22), rgba(223,86,52,.08) 60%), var(--card); }
.tile.alert .tile-v { color: var(--accent-l); }

/* Цвета показателей */
.c-good { color: var(--green); }
.c-warn { color: var(--amber); }
.c-bad { color: var(--red-l); }
.bar-good { background: var(--green-fill) !important; }
.bar-warn { background: var(--amber-fill) !important; }
.bar-bad { background: var(--red-l) !important; }

/* Карточки разделов */
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.grid-hw { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.card { background: var(--card); border-radius: var(--r); padding: 20px 20px 18px; min-width: 0; margin-bottom: 16px; }
.grid2 > .card, .grid-hw > .card { margin-bottom: 0; }
.card-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.card-h h2 { font-size: 18px; font-weight: 500; letter-spacing: -.005em; }
.card-h .count {
  min-width: 26px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--card2);
  font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center;
}
.card-h .count.hot { background: var(--accent); color: #fff; }
.card-h .sp { flex: 1; }
.card-h .hint { color: var(--muted); font-size: 13px; }
.card-f { margin-top: 12px; display: flex; justify-content: center; }

/* Списки */
.list { display: flex; flex-direction: column; }
.li {
  display: flex; align-items: center; gap: 14px; padding: 11px 10px; margin: 0 -10px;
  border-radius: 12px; transition: background .12s; min-width: 0;
}
.li + .li { box-shadow: 0 -1px 0 var(--line); }
a.li:hover { background: var(--hover); box-shadow: none; }
a.li:hover + .li { box-shadow: none; }
.li-main { flex: 1; min-width: 0; }
.li-t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-s { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-time { flex: none; width: 92px; font-variant-numeric: tabular-nums; }
.li-time b { display: block; font-weight: 500; }
.li-time small { color: var(--muted); font-size: 12.5px; }
.li-end { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 55%; }
.li .chev { width: 16px; height: 16px; color: var(--muted2); flex: none; }

/* Метки */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px;
  font-size: 12.5px; font-weight: 500; white-space: nowrap; background: var(--grey-bg); color: var(--badge-ink);
}
.badge.red { background: var(--red-bg); color: var(--red-l); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.blue { background: var(--blue-bg); color: var(--blue-l); }
.badge.accent { background: var(--accent-bg); color: var(--accent-l); }
.badge.sm { height: 20px; font-size: 11.5px; padding: 0 7px; border-radius: 10px; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.app-mark { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--green); white-space: nowrap; }
.app-mark.no { color: var(--muted2); }
.app-mark .ic { width: 14px; height: 14px; }

/* ─── Таблицы ──────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th {
  text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 8px 12px 10px;
  white-space: nowrap; border-bottom: 1px solid var(--line2); vertical-align: bottom;
}
.tbl th.n, .tbl td.n { text-align: right; }
.tbl th.c, .tbl td.c { text-align: center; }
.tbl th button { color: inherit; font-weight: inherit; display: inline-flex; align-items: center; gap: 4px; padding: 2px 0; }
.tbl th button:hover { color: var(--ink); }
.tbl th.sorted { color: var(--ink); }
.tbl th .arr { width: 12px; height: 12px; opacity: .9; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child, .tbl th:first-child { padding-left: 4px; }
.tbl td:last-child, .tbl th:last-child { padding-right: 4px; }
.tbl tbody tr[data-href] { cursor: pointer; }
.tbl tbody tr[data-href]:hover td { background: var(--row-hover); }
.tbl tbody tr.sel td { background: var(--row-sel); }
.tbl td.name { font-weight: 500; min-width: 160px; }
.tbl td.name a:hover { color: var(--accent-l); }
.tbl td .sub { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.tbl td.wrap { white-space: normal; min-width: 180px; }
.tbl td.text { min-width: 240px; color: var(--ink2); }
.tbl td.n { white-space: nowrap; }
.tbl td.n .sub { text-align: right; }
.tbl .empty-row td { color: var(--muted); text-align: center; padding: 28px 12px; }
/* первый столбец прилипает при горизонтальной прокрутке */
.tbl.stick td:first-child, .tbl.stick th:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); }
.tbl.stick tbody tr[data-href]:hover td:first-child { background: var(--row-hover); }
.tbl.stick tbody tr.sel td:first-child { background: var(--row-sel); }

.mini-bar { display: inline-block; width: 64px; height: 4px; border-radius: 2px; background: var(--card2); vertical-align: middle; margin-left: 8px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--green-fill); }

/* Вкладки */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line2); margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 10px 14px 12px; color: var(--muted); font-weight: 500; white-space: nowrap; position: relative;
  display: flex; align-items: center; gap: 7px;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); }
.tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tabs .count { font-size: 12px; color: var(--muted); font-weight: 400; }

/* ─── Ученик ───────────────────────────────────────────────── */
.visits { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.visit { flex: none; width: 52px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.visit-dot {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 600; font-size: 14px; color: var(--dot-ink);
}
.visit-dot.ok { background: var(--green-fill); }
.visit-dot.late { background: var(--amber-fill); }
.visit-dot.no { background: var(--red); color: #fff; }
.visit-dot.exc { background: var(--card2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--exc-line); }
.legend i.exc { background: var(--card2); box-shadow: inset 0 0 0 1px var(--exc-line); }
.visit-d { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.25; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.hw { padding: 14px 0; border-top: 1px solid var(--line); }
.hw:first-child { border-top: 0; padding-top: 2px; }
.hw-top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; justify-content: space-between; }
.hw-due { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hw-text { margin-top: 4px; font-weight: 500; }
.hw-res { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.hw details { margin-top: 10px; }
.hw summary {
  cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; display: inline-flex; align-items: center; gap: 6px;
  user-select: none;
}
.hw summary::-webkit-details-marker { display: none; }
.hw summary .ic { width: 14px; height: 14px; transition: transform .15s; }
.hw details[open] summary .ic { transform: rotate(90deg); }
.hw summary:hover { color: var(--ink); }
.sets { margin-top: 8px; background: var(--bg); border-radius: 14px; padding: 4px 14px; }
.sets .tbl td, .sets .tbl th { padding-top: 8px; padding-bottom: 8px; }
.sets .tbl.stick td:first-child, .sets .tbl.stick th:first-child { background: var(--bg); }
.sets .tbl-wrap { margin: 0 -14px; padding: 0 14px; }
.remark { color: var(--amber); }

.ledger .li { align-items: flex-start; }
.pts { font-weight: 500; color: var(--green); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pts.neg { color: var(--red-l); }

/* ─── Подключённые ─────────────────────────────────────────── */
.month { display: flex; align-items: center; gap: 6px; }
.month .ibtn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--card); display: grid; place-items: center;
  transition: background .15s;
}
.month .ibtn:hover { background: var(--card2); }
.month .ibtn[disabled] { opacity: .35; pointer-events: none; }
.month .ibtn .ic { width: 16px; height: 16px; }
.month-l { min-width: 140px; text-align: center; font-weight: 500; font-size: 15px; }
.grp-h { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line2); }
.grp-h:first-child { margin-top: 0; }
.grp-h h3 { font-size: 15px; font-weight: 500; }
.grp-h a:hover { color: var(--accent-l); }
.grp-h .muted { font-size: 13px; }
.grp-h .sp { flex: 1; }

/* ─── Пустые состояния и ошибки ────────────────────────────── */
.empty { color: var(--muted); text-align: center; padding: 28px 12px; }
.empty b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 4px; }
.err-card { max-width: 520px; margin: 60px auto; text-align: center; background: var(--card); border-radius: var(--r); padding: 32px 28px; }
.err-card h2 { font-size: 20px; font-weight: 500; margin-bottom: 8px; }
.err-card p { color: var(--muted); margin-bottom: 20px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--toast-bg); color: var(--toast-ink); padding: 12px 18px; border-radius: 14px; box-shadow: var(--toast-shadow);
  max-width: calc(100vw - 32px);
}
.note { color: var(--muted2); font-size: 12.5px; margin-top: 10px; }

.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ─── Ширина экрана ────────────────────────────────────────── */
@media (max-width: 1360px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  :root { --pad: 20px; }
  .grid2, .grid-hw { grid-template-columns: minmax(0, 1fr); }
  .user-name { display: none; }
}
@media (max-width: 900px) {
  .tiles.t4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .top-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px 12px; }
  .brand small { display: none; }
  .search { order: 5; flex-basis: 100%; max-width: none; margin-left: 0; }
  .user { margin-left: auto; }
  .nav a { padding: 0 11px; }
}
@media (max-width: 640px) {
  :root { --pad: 16px; }
  body { font-size: 14px; }
  .main { padding-top: 16px; }
  h1 { font-size: 24px; }
  .tiles, .tiles.t4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px 14px; border-radius: 18px; }
  .tile-v { font-size: 30px; margin-top: 8px; }
  .tile-v small { font-size: 15px; }
  .card { padding: 16px 16px 14px; border-radius: 18px; }
  .tbl-wrap { margin: 0 -16px; padding: 0 16px; }
  .head { align-items: flex-start; }
  .period { width: 100%; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 0 8px; }
  .li-time { width: 76px; }
  .li-end { max-width: 48%; }
  .li.att { flex-wrap: wrap; row-gap: 6px; }
  .li.att .li-main { flex-basis: calc(100% - 40px); }
  .li.att .li-end { order: 3; max-width: none; flex-basis: 100%; justify-content: flex-start; }
  .nav a span { display: none; }
  .nav a { width: 38px; padding: 0; justify-content: center; }
  .brand > span:not(.brand-mark) { display: none; }
  .month-l { min-width: 0; flex: 1; }
  .month { width: 100%; }
  .btn.sm { padding: 0 12px; }
}
@media (max-width: 380px) {
  .tile-v { font-size: 26px; }
  .li-end { max-width: 42%; }
}
@media print {
  .top, .period, .btn, .tabs { display: none !important; }
  body, .card, .tile { background: #fff !important; color: #000 !important; }
}

/* Длинные списки (подключённые) — в несколько колонок на широком экране */
.list.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 28px; }
.list.cols .li { margin: 0 -10px; box-shadow: 0 1px 0 var(--line); }
.list.cols a.li:hover { box-shadow: 0 1px 0 var(--line); }

/* ─── Табло: настройки ─────────────────────────────────────── */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; position: relative; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.switch i { width: 40px; height: 24px; border-radius: 12px; background: var(--track); position: relative; transition: background .15s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--knob); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + i { background: var(--green-fill); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input[disabled] + i { opacity: .5; }
.switch.big { background: var(--card); border-radius: 22px; padding: 0 16px 0 10px; height: 44px; font-weight: 500; }
.switch.sm { gap: 8px; font-size: 12.5px; }
.switch.sm i { width: 32px; height: 20px; }
.switch.sm i::after { width: 14px; height: 14px; }
.switch.sm input:checked + i::after { transform: translateX(12px); }
.chk { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.chk input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin: 0; cursor: pointer; }
.chk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; padding: 4px 0; }
.tb-form .field { margin-bottom: 14px; }
.field.inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.field.inline > span { margin: 0; }
.input.num { width: 90px; height: 38px; text-align: center; }
.input.ta { height: auto; min-height: 84px; padding: 10px 14px; resize: vertical; line-height: 1.4; display: block; }
.input.sm { height: 36px; font-size: 13px; }
.input.code { width: 130px; text-transform: uppercase; letter-spacing: .2em; font-weight: 600; font-size: 18px; text-align: center; font-variant-numeric: tabular-nums; }
select.input { padding-right: 32px; cursor: pointer; }
.seg.sm button { height: 30px; padding: 0 12px; font-size: 13px; }
.sl-list { display: flex; flex-direction: column; margin-bottom: 14px; }
.sl-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; min-height: 46px; }
.sl-row + .sl-row { border-top: 1px solid var(--line); }
.sl-row.off .chk span { color: var(--muted); }
.sl-row .chk { flex: 1; min-width: 0; }
.sl-hint { color: var(--muted2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.sl-ctl { display: flex; gap: 4px; flex: none; }
.ibtn { width: 34px; height: 34px; border-radius: 50%; background: var(--card2); display: inline-grid; place-items: center; transition: background .15s; flex: none; }
.ibtn:hover { background: var(--btn-hover); }
.ibtn[disabled] { opacity: .3; pointer-events: none; }
.ibtn .ic { width: 16px; height: 16px; }
.tb-actions { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-top: 12px; }
.tb-actions .sp { flex: 1; }
.tb-unsaved { color: var(--amber); font-size: 13px; }
.tb-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tb-row .field { margin-bottom: 0; }
.tb-row .field.grow { flex: 1; min-width: 180px; }
.tb-row .btn { height: 46px; }
.hintbox { background: var(--blue-bg); color: var(--blue-ink); border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; line-height: 1.45; }
.hintbox b { color: var(--ink); font-weight: 600; user-select: all; }
.tb-add { margin-top: 6px; }
.tb-add h3 { font-size: 15px; font-weight: 500; margin: 16px 0 10px; }
.note.warn { color: var(--amber); }
.btn.disabled { opacity: .5; pointer-events: none; }
.btn.danger { background: var(--red-bg); color: var(--red-l); }
.btn.danger:hover { background: var(--red-bg2); }

/* Экраны и пульт */
.scr { background: var(--bg); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; }
.scr.all { background: transparent; border: 1px dashed var(--line2); }
.scr-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
.scr-name { font-weight: 500; font-size: 16px; }
.scr-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; min-width: 0; }
.scr-showing b { font-weight: 500; }
.pult { display: flex; flex-wrap: wrap; gap: 6px; }
.dd { position: relative; }
.dd summary { list-style: none; cursor: pointer; }
.dd summary::-webkit-details-marker { display: none; }
.dd .dd-arr { width: 14px; height: 14px; margin-left: -2px; }
.dd-menu {
  position: absolute; left: 0; top: 40px; z-index: 10; min-width: 220px; background: var(--card2);
  border: 1px solid var(--line2); border-radius: 14px; padding: 6px; box-shadow: var(--shadow);
}
.dd-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; }
.dd-menu button:hover { background: var(--hover); }
.dd-empty { color: var(--muted); padding: 9px 12px; font-size: 13px; }
.scr-set { margin-top: 12px; }
.scr-set summary {
  cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; display: inline-flex; align-items: center; gap: 6px; user-select: none;
}
.scr-set summary::-webkit-details-marker { display: none; }
.scr-set summary .ic { width: 14px; height: 14px; transition: transform .15s; }
.scr-set[open] summary .ic { transform: rotate(90deg); }
.scr-set summary:hover { color: var(--ink); }
.scr-set .tb-form { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.scr-unbind { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

/* Фото */
.tb-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.tb-upload .field { margin: 0; }
.upl-status { margin-top: 10px; background: var(--bg); border-radius: 12px; padding: 10px 14px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 1.5; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.ph { background: var(--bg); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ph.off .ph-img { opacity: .35; }
.ph-img { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--card2); display: grid; place-items: center; }
.ph-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-img img:not([src]) { display: none; }
.ph-ctl { display: flex; align-items: center; gap: 4px; }
.ph-ctl .sp { flex: 1; }
.ph .ibtn { width: 30px; height: 30px; }
.ph .ibtn .ic { width: 14px; height: 14px; }

/* QR */
.qr-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.qr-row + .qr-row { border-top: 1px solid var(--line); }
.qr-prev { width: 84px; height: 84px; flex: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: grid; place-items: center; color: #999; font-size: 12px; font-weight: 600; }
.qr-prev svg { width: 100%; height: 100%; display: block; }
.qr-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.qr-fields .input { height: 40px; }
.qr-fields .input.bad { border-color: var(--red); }

@media (max-width: 640px) {
  .tb-row .btn { width: 100%; }
  .tb-row .field, .tb-row .field.grow { flex-basis: 100%; }
  .period .switch.big { width: 100%; justify-content: flex-start; }
  .period > .btn { width: 100%; }
  .sl-hint { display: none; }
  .ph-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ph { padding: 6px; }
  .ph .switch span { display: none; }
  .ph .ibtn { width: 28px; height: 28px; }
  .qr-row { flex-wrap: wrap; }
  .qr-prev { width: 64px; height: 64px; }
  .scr { padding: 12px; }
  /* на телефоне список слайдов пульта раскрывается под всем пультом, во всю его ширину */
  .pult { position: relative; }
  .pult .dd { position: static; }
  .pult .dd-menu { left: 0; right: 0; top: 100%; margin-top: 4px; min-width: 0; }
}

/* ─── Шапка: логотип школы и переключатель темы ─────────────── */
.school-logo { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; flex: none; background: var(--card2); }
.school-logo[hidden] { display: none !important; }
.ibtn.theme { background: var(--card); color: var(--muted); }
.ibtn.theme:hover { background: var(--card2); color: var(--ink); }
.ibtn.theme .ic { width: 18px; height: 18px; }
.login-card .brand { display: flex; align-items: center; }
.login-card .brand .ibtn.theme { margin-left: auto; background: var(--bg); }

/* ─── Настройки школы ──────────────────────────────────────── */
.st-form .field { margin-bottom: 14px; }
.st-form .field:last-child { margin-bottom: 0; }
.field .f-err { display: block; color: var(--red-l); font-size: 12.5px; margin-top: 6px; }
.input.bad { border-color: var(--red); }
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.opt {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  background: var(--bg); border: 1.5px solid transparent; transition: border-color .15s, background .15s; min-width: 0;
}
.opt:hover { border-color: var(--line2); }
.opt.on { border-color: var(--accent); background: var(--accent-bg); }
.opt input { width: 18px; height: 18px; accent-color: var(--accent); margin: 2px 0 0; flex: none; cursor: pointer; }
.opt b { display: block; font-weight: 500; }
.opt span { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.logo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo-box {
  width: 96px; height: 96px; border-radius: 22px; background: var(--bg); border: 1px dashed var(--line2);
  display: grid; place-items: center; overflow: hidden; flex: none; color: var(--muted2);
}
.logo-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-box .ic { width: 30px; height: 30px; stroke-width: 1.5; }
.logo-box.has { border-style: solid; border-color: var(--line); }
.logo-ctl { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.logo-ctl .row { display: flex; gap: 8px; flex-wrap: wrap; }
.logo-ctl .note { margin-top: 0; }
.lvls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; }
.lvl { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lvl-n {
  width: 34px; height: 34px; border-radius: 50%; background: var(--card2); display: grid; place-items: center;
  font-weight: 600; font-size: 14px; flex: none; font-variant-numeric: tabular-nums;
}
.lvl-f { flex: 1; min-width: 0; }
.lvl-f .input { height: 40px; }
.lvl-t { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; white-space: nowrap; }
.st-actions {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding: 12px 0 14px; margin-top: -4px; background: var(--bg);
  box-shadow: 0 -12px 12px -8px var(--bg);
}
.st-actions .sp { flex: 1; }
.st-actions .form-err { margin: 0; flex-basis: 100%; }
.tz-now { color: var(--muted); font-size: 13px; }
.tz-now b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) {
  .opts { grid-template-columns: minmax(0, 1fr); }
  .lvls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .user .btn.sm span { display: none; }
  .user .btn.sm { width: 38px; padding: 0; }
  .lvls { grid-template-columns: minmax(0, 1fr); }
  .logo-ctl .row .btn { flex: 1; }
  .st-actions .btn { width: 100%; }
}

/* ─── Табло: предпросмотр (как tv.css, но внутри .tvp) ──────── */
.tvp { position: fixed; inset: 0; background: var(--bg); color: var(--ink); overflow: hidden; z-index: 30; }
.tvp-boot, .tvp-msg { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6vmin; gap: 2vmin; }
.tvp-msg { color: var(--muted); font-size: 3vmin; max-width: 80vw; margin: 0 auto; }
.tvp-msg b { color: var(--ink); font-weight: 500; font-size: 4.5vmin; }
.tvp-msg .btn { font-size: 14px; }
.tvp-stage { position: absolute; left: 0; top: 0; right: 0; bottom: 9vmin; overflow: hidden; }
.tslide { position: absolute; left: 0; top: 0; width: 100%; height: 100%; padding: 5vmin 6vmin 3vmin; opacity: 0; transition: opacity .5s ease; display: flex; flex-direction: column; }
.tslide.on { opacity: 1; }
.ts-title { font-size: 3vmin; color: var(--accent-l); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.ts-head { font-size: 6.4vmin; font-weight: 500; line-height: 1.1; margin-top: 1vmin; }
.ts-sub { font-size: 3.2vmin; color: var(--muted); margin-top: .6vmin; }
.ts-body { flex: 1; margin-top: 3.5vmin; min-height: 0; }
.ts-empty { font-size: 4.5vmin; color: var(--muted); margin-top: 6vmin; }
.tlessons { display: flex; flex-direction: column; gap: 1.6vmin; }
.tlesson { display: flex; align-items: center; background: var(--card); border-radius: 3vmin; padding: 2.2vmin 3.2vmin; font-size: 4vmin; }
.tlesson.now { background: var(--accent); }
.tlesson.past { opacity: .45; }
.tlesson .lt { width: 28vmin; font-weight: 600; font-variant-numeric: tabular-nums; }
.tlesson .lg { flex: 1; font-weight: 500; }
.tlesson .lc { color: rgba(255, 255, 255, .75); font-size: 3.2vmin; }
.tlesson.now .lc { color: rgba(255, 255, 255, .9); }
.tlesson .ls { margin-left: 2vmin; font-size: 2.6vmin; padding: .6vmin 1.6vmin; border-radius: 2vmin; background: rgba(255, 255, 255, .18); }
.tpeople { display: flex; flex-wrap: wrap; gap: 1.6vmin 2.4vmin; align-content: flex-start; }
.tperson { display: flex; align-items: center; gap: 1.4vmin; background: var(--card); border-radius: 3vmin; padding: 1.4vmin 2.4vmin 1.4vmin 1.4vmin; font-size: 3.4vmin; }
.tava { width: 6vmin; height: 6vmin; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 2.4vmin; font-weight: 600; overflow: hidden; flex-shrink: 0; }
.tava img { width: 100%; height: 100%; object-fit: cover; }
.trating { display: flex; gap: 3vmin; height: 100%; }
.trating .rcol { flex: 1; min-width: 0; background: var(--card); border-radius: 3vmin; padding: 2.4vmin 2.8vmin; display: flex; flex-direction: column; overflow: hidden; }
.trating h3 { font-size: 3.6vmin; font-weight: 500; margin-bottom: 1.6vmin; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trating .rrow { display: flex; align-items: center; gap: 1.4vmin; padding: 1vmin 0; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 2.9vmin; }
.trating .rrow:first-of-type { border-top: 0; }
.trating .rn { width: 3.6vmin; color: var(--muted); font-variant-numeric: tabular-nums; }
.trating .top1 .rn { color: var(--amber); font-weight: 600; }
.trating .rname { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trating .rp { font-weight: 600; font-variant-numeric: tabular-nums; }
.trating .tava { width: 5vmin; height: 5vmin; font-size: 2vmin; }
.trating .top1 .tava { background: var(--accent); }
.thw { display: flex; flex-direction: column; gap: 1.8vmin; }
.thw .hwrow { background: var(--card); border-radius: 3vmin; padding: 2.2vmin 3.2vmin; }
.thw .hwt { display: flex; align-items: baseline; font-size: 4vmin; }
.thw .hwt .g { flex: 1; font-weight: 500; }
.thw .hwt .n { font-weight: 600; font-variant-numeric: tabular-nums; }
.thw .hwt .n small { color: var(--muted); font-size: 3vmin; font-weight: 400; }
.tbar-line { height: 1.6vmin; background: var(--card2); border-radius: 1vmin; margin-top: 1.4vmin; overflow: hidden; }
.tbar-line i { display: block; height: 100%; background: var(--green-fill); border-radius: 1vmin; }
.thw .hwd { color: var(--muted); font-size: 2.8vmin; margin-top: 1vmin; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnotice { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.tnotice .nt { font-size: 7vmin; font-weight: 500; line-height: 1.25; max-width: 90vw; overflow-wrap: anywhere; }
.tnotice .na { margin-top: 3vmin; font-size: 3vmin; color: var(--muted); }
.tslide.t-photo { padding: 0; }
/* Фото — во весь экран, как на табло: логотип справа сверху, часы справа снизу. */
.tvp.photo-mode .tvp-stage { bottom: 0; }
.tvp.photo-mode .tvp-bar { display: none; }
.tph { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #000; overflow: hidden; }
.tph img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.tph-img.cover { object-fit: cover; }
.tph-img.contain { object-fit: contain; }
.tph-bg { object-fit: cover; filter: blur(40px) brightness(.55); transform: scale(1.15); }
.tph-logo { position: absolute; right: 4vmin; top: 4vmin; display: flex; align-items: center; gap: 1.6vmin; padding: 1.2vmin 2vmin; border-radius: 2.4vmin; background: rgba(0, 0, 0, .35); }
.tph-logo img { width: 9vmin; height: 9vmin; border-radius: 2vmin; object-fit: cover; display: block; }
.tph-name { font-size: 3.2vmin; font-weight: 600; color: #fff; text-shadow: 0 .3vmin 1.2vmin rgba(0, 0, 0, .6); }
.tph-clock { position: absolute; right: 4vmin; bottom: 3vmin; font-size: 7vmin; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 .4vmin 2vmin rgba(0, 0, 0, .7); }
.tpc { position: absolute; left: 0; right: 0; bottom: 0; padding: 4vmin 30vmin 4vmin 5vmin; font-size: 3.8vmin; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.tqr { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8vmin; }
.tqr .qrbox { width: 46vmin; height: 46vmin; background: #fff; border-radius: 3vmin; padding: 2.5vmin; flex-shrink: 0; }
.tqr .qrbox svg { width: 100%; height: 100%; display: block; }
.tqr .qt { font-size: 5.6vmin; font-weight: 500; max-width: 40vw; line-height: 1.2; }
.tqr .qu { font-size: 2.8vmin; color: var(--muted); margin-top: 2vmin; word-break: break-all; }
.ttiles { display: flex; gap: 3vmin; }
.ttile { flex: 1; background: var(--card); border-radius: 3vmin; padding: 3.2vmin; }
.ttile.blue { background: var(--blue); }
.ttile .tv-v { font-size: 9vmin; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.ttile .tv-l { font-size: 3vmin; color: rgba(255, 255, 255, .8); margin-top: 1.2vmin; }
.tlogo { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.tlogo img { max-width: 40vmin; max-height: 40vmin; border-radius: 4vmin; }
.tlogo .ln { font-size: 7vmin; font-weight: 500; margin-top: 3vmin; }
.tlogo .lt { font-size: 14vmin; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 2vmin; }
.tvp-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 9vmin; padding: 0 6vmin; display: flex; align-items: center; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 2.8vmin; color: var(--muted); }
.tvp-school { display: flex; align-items: center; gap: 1.4vmin; flex: 1; min-width: 0; }
.tvp-school img { width: 5vmin; height: 5vmin; border-radius: 1.2vmin; object-fit: cover; }
.tvp-dots { display: flex; gap: 1vmin; }
.tvp-dots i { width: 1.4vmin; height: 1.4vmin; border-radius: 50%; background: var(--card2); transition: width .2s; }
.tvp-dots i.on { background: var(--accent); width: 4vmin; border-radius: 1vmin; }
.tvp-clock { flex: 1; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; font-size: 3.4vmin; }
.tvp-tag { position: absolute; left: 50%; top: 2vmin; transform: translateX(-50%); padding: .8vmin 2vmin; border-radius: 2vmin; background: rgba(255, 255, 255, .1); color: var(--muted); font-size: 2vmin; white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.tvp-tag.warn { background: rgba(255, 201, 60, .18); color: var(--amber); }
.tvp-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 7vmin; height: 7vmin; min-width: 44px; min-height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); display: grid; place-items: center; opacity: .55; transition: opacity .15s, background .15s; z-index: 2;
}
.tvp-nav.prev { left: 1.5vmin; }
.tvp-nav.next { right: 1.5vmin; }
.tvp-nav:hover { opacity: 1; background: rgba(255, 255, 255, .2); }
.tvp-nav .ic { width: 50%; height: 50%; }
.tvp-close {
  position: absolute; right: 2vmin; top: 2vmin; height: 36px; padding: 0 14px 0 10px; border-radius: 18px; background: rgba(255, 255, 255, .1);
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; opacity: .7; transition: opacity .15s; z-index: 2;
}
.tvp-close:hover { opacity: 1; }
.tvp-close .ic { width: 16px; height: 16px; }
/* Ученик школы: похожие ученики и другие группы того же человека */
.li.sim { align-items: center; gap: 12px; }
.li.sim .li-main { display: flex; flex-direction: column; gap: 4px; }
.sim-act, .split-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
.also { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 14px; }
.also .split-act { margin-left: 4px; }
@media (max-width: 640px) {
  .li.sim { flex-direction: column; align-items: stretch; }
  .sim-act { justify-content: flex-start; }
}
