/* Экран для проектора. Светлая тема – итоговая презентация 19.10, тёмная – сайт матрицы.
   Все размеры относительные (vh/vw/%/em), рассчитаны на 16:9.
   --fit – множитель шрифта, его подбирает screen.js в контейнерах data-fit. */

/* ---------- шрифты (OFL, файлы OFL-*.txt рядом) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/inter-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/inter-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/inter-tight-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/inter-tight-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/inter-tight-cyrillic-800-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/inter-tight-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- темы ---------- */
.board, .screen-page {
  --bg: #e9eef1;
  --frame: #ffffff;
  --plate: #f1f4f5;
  --plate-2: #e3eaec;
  --text: #15191a;
  --muted: #5f6d71;
  --teal: #2f6f80;
  --accent: #e9e407;
  --on-accent: #15191a;
  --coral: #e5483b;
  --c-yes: #2f6f80;
  --c-part: #8bb9c4;
  --c-no: #e5483b;
  --c-unk: #9aa6a9;
  --live-bg: rgba(233, 228, 7, 0.42);
  --veil: rgba(233, 238, 241, 0.82);
  --plaque: #15191a;
  --on-plaque: #ffffff;
  --head-case: none;
}
.board.theme-dark {
  --bg: #131819;
  --frame: #1e2324;
  --plate: #292e2f;
  --plate-2: #344144;
  --text: #f2f5f5;
  --muted: #a9b5b8;
  --teal: #8bb9c4;
  --accent: #e9e407;
  --on-accent: #131819;
  --coral: #f95d51;
  --c-yes: #abced7;
  --c-part: #5f8f9b;
  --c-no: #f95d51;
  --c-unk: #6f7b7e;
  --live-bg: rgba(233, 228, 7, 0.2);
  --veil: rgba(19, 24, 25, 0.84);
  --plaque: #e9e407;
  --on-plaque: #131819;
  --head-case: uppercase;
}

/* ---------- страница ---------- */
html, body { margin: 0; height: 100%; overflow: hidden; }
* { box-sizing: border-box; }
.screen-page {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* После входа – никакого указателя и подсветки. */
body.live, body.live * { cursor: none !important; user-select: none; }
body.mirror { background: transparent; }
.root { position: fixed; inset: 0; }

/* Вход по коду – крупно, по центру. */
.login {
  position: fixed; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4vh;
}
.login[hidden] { display: none; }
.login-label { font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; font-size: 4.4vh; }
.login-code {
  width: 30vh; padding: 1.2vh 1vh; font: 700 6vh "Inter", sans-serif; letter-spacing: 0.25em; text-align: center;
  border: 0.3vh solid var(--plate-2); border-radius: 1.6vh; background: var(--frame); color: var(--text); outline: none;
}
.login-code:focus { border-color: var(--teal); }
.login-go {
  font: 700 2.6vh "Inter", sans-serif; padding: 1.4vh 4vh; border: 0; border-radius: 1.4vh;
  background: var(--accent); color: var(--on-accent); cursor: pointer;
}
.login-error { min-height: 3vh; font-size: 2.4vh; color: var(--coral); }

.fs-hint {
  position: fixed; left: 50%; top: 0.5vh; transform: translateX(-50%); z-index: 4;
  font-size: 1.6vh; color: #7d898c; background: rgba(125, 137, 140, 0.16); padding: 0.6vh 1.4vh; border-radius: 1vh;
}
.fs-hint[hidden] { display: none; }

/* ---------- доска ---------- */
.board {
  position: absolute; inset: 0;
  background: var(--bg); color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  padding: 2.4vh 1.5vw;
  overflow: hidden;
}

.frame {
  height: 100%;
  display: flex; flex-direction: column;
  background: var(--frame);
  border-radius: 2.4vh;
  padding: 3vh 2.4vw 2vh;
  overflow: hidden;
}

/* шапка шага */
.head { flex: none; margin-bottom: 1.8vh; }
.title-line {
  margin: 0; display: flex; align-items: baseline; gap: 1.2vw;
  font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; font-size: 5vh; line-height: 1.05;
  letter-spacing: -0.01em; text-transform: var(--head-case);
}
.title-line .no { font-family: "Inter", sans-serif; font-weight: 600; font-size: 2.2vh; color: var(--teal); letter-spacing: 0.04em; }
.subtitle { margin-top: 0.8vh; font-weight: 700; font-size: 2.6vh; color: var(--teal); }
.hint { margin-top: 0.6vh; font-size: 2.1vh; color: var(--muted); }
.board.view-intro .title-line { font-size: 6.4vh; }
.board.view-intro .subtitle { font-size: 3vh; }
.board.view-overview .title-line, .board.view-focus .title-line, .board.view-final .title-line, .board.view-pairs .title-line { font-size: 4.4vh; }

.stage { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 1.2vh; }

/* «•••» */
.typing { display: inline-flex; gap: 0.3em; align-items: center; vertical-align: middle; height: 1em; }
.typing i { width: 0.42em; height: 0.42em; border-radius: 50%; background: currentColor; opacity: 0.25; animation: typing-dot 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-0.12em); } }
.entry-new { color: var(--teal); padding: 0.1em 0; font-size: 1.6em; line-height: 1; }
.cell > .entry-new:only-child { margin: auto 0; text-align: center; }

/* точки оценок */
.dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 0.78em; height: 0.78em; border-radius: 50%; flex: none;
  border: 0.13em solid transparent; vertical-align: -0.06em;
}
.dot.d-yes { background: var(--c-yes); border-color: var(--c-yes); }
.dot.d-part { border-color: var(--c-yes); background: linear-gradient(90deg, var(--c-yes) 50%, transparent 50%); }
.dot.d-no { border-color: var(--c-no); }
.dot.d-unk { border: 0; width: auto; height: auto; border-radius: 0; color: var(--c-unk); font-weight: 800; line-height: 1; padding: 0 0.08em; }
.dot.d-none { border-color: var(--c-unk); border-style: dashed; }

/* запись */
/* Точки первыми, текст после них; вторая строка текста – под текст, а не под точки. */
.entry { display: flex; align-items: baseline; justify-content: flex-start; gap: 0.5em; line-height: 1.16; }
.entry .etext { min-width: 0; flex: 1 1 auto; }
.marks { display: inline-flex; align-items: center; gap: 0.18em; flex: none; white-space: nowrap; }
.people { margin-left: 0.25em; font-weight: 700; color: var(--muted); font-size: 0.9em; }
/* зачёркнутая: бледная и перечёркнутая (линия – фоном, чтобы её можно было «провести») */
.entry.struck { opacity: 0.45; }
.strike {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 100% 0.09em;
}
.empty { color: var(--muted); font-style: normal; opacity: 0.85; }

/* ---------- заставка ---------- */
.intro { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.6vh; overflow: hidden; }
.step-row {
  flex: 1 1 0; min-height: 0; overflow: hidden;
  display: grid; grid-template-columns: 5vw 27vw 1fr; align-items: center; gap: 1.6vw;
  background: var(--plate); border-radius: 1.8vh; padding: 0 2vw;
  font-size: calc(2.6vh * var(--fit, 1));
}
.step-row .no { color: var(--teal); font-weight: 600; font-size: 1.1em; }
.st-title { font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; font-size: 1.25em; }
.st-text { line-height: 1.35; }
.theme-dark .st-title { text-transform: uppercase; font-size: 1.1em; }
/* легенда и «Напомним» под шагами */
.intro-foot {
  flex: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4vw;
  font-size: calc(2.2vh * var(--fit, 1)); line-height: 1.3;
}
.intro-foot.has-reminder { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.intro-legend, .intro-reminder { border-radius: 1.8vh; padding: 1.4vh 2vw; }
.intro-legend { background: var(--plate); }
.il-title { font-weight: 700; color: var(--teal); margin-bottom: 0.8vh; }
.il-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5vh 2vw; }
.il-item { display: flex; align-items: baseline; gap: 0.5em; }
.il-item .dot { align-self: center; }
.il-item b { font-weight: 700; }
.intro-reminder { background: var(--accent); color: var(--on-accent); }
.ir-title { font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; margin-bottom: 0.5vh; text-transform: var(--head-case); }
.ir-line { overflow-wrap: anywhere; }

/* ---------- матрица ---------- */
.matrix {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: 10.5vw repeat(3, minmax(0, 1fr));
  grid-template-rows: auto repeat(4, minmax(0, 1fr));
  gap: 0.8vh 0.6vw;
  overflow: hidden;
}
.mh { font-weight: 700; font-size: 2vh; color: var(--teal); padding: 0 0.6vw 0.2vh; text-transform: var(--head-case); letter-spacing: 0.01em; }
.ml {
  display: flex; align-items: center;
  font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; font-size: 2.1vh; line-height: 1.1;
  padding: 0 0.4vw 0 0.2vw; text-transform: var(--head-case);
}
.theme-dark .ml { font-size: 1.8vh; }
.cell {
  position: relative; min-height: 0; overflow: hidden;
  background: var(--plate); border-radius: 1.5vh;
  padding: 0.9vh 0.8vw 0.7vh;
  display: flex; flex-direction: column; gap: 0.45vh;
  font-size: calc(1.8vh * var(--fit, 1));
}
.matrix > .mcol { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; min-height: 0; min-width: 0; }
.cell-head { display: flex; align-items: center; gap: 0.6vw; flex: none; }
.count { font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; font-size: 1.45em; line-height: 1; min-width: 1.2em; }
.entries { display: flex; flex-direction: column; gap: 0.22em; }
.more { color: var(--muted); font-size: 0.9em; font-weight: 600; }
.cell > .empty { margin: auto 0; text-align: center; font-size: 0.95em; }

/* шаг 02: фокус и крест */
.cell.focus { background: var(--accent); color: var(--on-accent); }
.cell.focus .people, .cell.focus .more { color: rgba(19, 24, 25, 0.68); }
.cell.focus, .layer-row.highlight { --c-unk: #4f5c60; }
.theme-dark .cell.focus { --c-yes: #2f6f80; --c-part: #6f9eaa; --c-unk: #5f6d71; }
.cell.crossed > :not(.cross) { opacity: 0.28; }
.cross {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(to top right, transparent calc(50% - 0.2vh), var(--muted) calc(50% - 0.2vh), var(--muted) calc(50% + 0.2vh), transparent calc(50% + 0.2vh)),
    linear-gradient(to bottom right, transparent calc(50% - 0.2vh), var(--muted) calc(50% - 0.2vh), var(--muted) calc(50% + 0.2vh), transparent calc(50% + 0.2vh));
}
.reason {
  font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; font-size: 2.8vh; line-height: 1.1; text-align: center;
  background: var(--frame); color: var(--text); border: 0.3vh solid var(--coral);
  padding: 1vh 1.2vw; border-radius: 1.2vh; max-width: 90%;
}

/* полоса «Замечания» */
.notes-strip {
  flex: none; max-height: 7.5vh;
  display: flex; align-items: center; gap: 1.2vw;
  background: var(--plate); border-radius: 1.5vh; padding: 1vh 1.2vw;
  font-size: 2vh; white-space: nowrap; overflow: hidden;
}
.ns-title { flex: none; font-weight: 700; color: var(--teal); }
.ns-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.ns-sep { color: var(--c-unk); }

/* строка легенды */
.legend-line {
  flex: none; margin-top: 1vh; min-height: 2.4vh;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4vh 1.2vw;
  font-size: 1.8vh; color: var(--muted);
}
.lg-title { font-weight: 600; color: var(--text); }
.lg-items { display: inline-flex; flex-wrap: wrap; gap: 0 0.5vw; align-items: baseline; }
.lg-item { white-space: nowrap; display: inline-flex; align-items: baseline; gap: 0.35em; }
.lg-item b { font-weight: 700; color: var(--text); }
.lg-item .dot { align-self: center; }
/* замечание вместо легенды: до 2 строк, шрифт подгоняется */
.legend-line.is-remark {
  display: block; max-height: 16vh; overflow: hidden;
  background: var(--plate); border-left: 0.6vh solid var(--accent); border-radius: 1.2vh;
  padding: 0.8vh 1.2vw; margin-top: 0.8vh;
  font-size: calc(2.2vh * var(--fit, 1)); line-height: 1.3; font-weight: 600; color: var(--text);
}

/* ---------- контур крупно ---------- */
.contour { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 0.9vh; overflow: hidden; }
.layer-row {
  flex: 1 0 auto;
  display: grid; grid-template-columns: 13.5vw minmax(0, 1fr); gap: 1.4vw; align-items: start;
  background: var(--plate); border-radius: 1.6vh; padding: 1.3vh 1.4vw;
  font-size: calc(2.1vh * var(--fit, 1));
  position: relative; isolation: isolate;
}
.layer-row.empty-row { flex-grow: 0; }
.lr-name {
  font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; font-size: 1.05em; line-height: 1.1;
  text-transform: var(--head-case); padding-top: 0.1em; overflow-wrap: anywhere; hyphens: auto;
}
.theme-dark .lr-name { font-size: 0.98em; }
.lr-entries { display: grid; gap: 0.45em 2vw; align-content: start; }
.lr-entries.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lr-entries.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layer-row.dim { opacity: 0.25; }
/* подсветка – отдельный слой под строкой (при смене слоя перетекает) */
.layer-row.highlight { background: transparent; color: var(--on-accent); }
.hl-bg { position: absolute; inset: 0; z-index: -1; border-radius: 1.6vh; background: var(--accent); }
.layer-row.highlight .people { color: rgba(19, 24, 25, 0.68); }
.theme-dark .layer-row.highlight { --c-yes: #2f6f80; --c-unk: #5f6d71; }

/* ---------- вид «Замечания» ---------- */
.notes-view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 2.4vh; overflow: hidden; font-size: calc(2.4vh * var(--fit, 1)); }
.nv-block { display: flex; flex-direction: column; gap: 0.9vh; }
.nv-item {
  background: var(--plate); border-radius: 1.5vh; padding: 0.8em 1.1em; line-height: 1.3;
  display: flex; justify-content: flex-start; align-items: baseline; gap: 0.5em;
}
.nv-none { color: var(--muted); }
.nv-head { font-weight: 700; color: var(--teal); font-size: 0.92em; margin-bottom: 0.2vh; }

/* ---------- пары ---------- */
.pair {
  background: var(--plate); border-radius: 1.6vh; padding: 1.3vh 1.2vw;
  display: flex; flex-direction: column; gap: 0.5em; min-height: 0; overflow: hidden;
}
.pair-top { display: flex; align-items: center; gap: 0.6em; flex-wrap: wrap; }
.pair-names { font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; font-size: 1.3em; line-height: 1.1; }
.dcd {
  display: inline-block; font-family: "Inter", sans-serif; font-weight: 700; font-size: 0.72em; letter-spacing: 0.06em;
  padding: 0.15em 0.5em; border-radius: 0.5em; border: 0.12em solid currentColor; color: var(--teal); vertical-align: 0.1em;
}
.count-badge {
  align-self: flex-start; font-weight: 700; font-size: 0.85em; padding: 0.2em 0.65em; border-radius: 1em;
  border: 0.12em solid var(--teal); color: var(--teal); white-space: nowrap;
}
.count-badge.two { background: var(--teal); color: var(--frame); }
.count-badge.one { border-style: dashed; }
.count-badge.none { border-color: var(--coral); color: var(--coral); border-style: dashed; }
.count-badge.over { background: var(--coral); border-color: var(--coral); color: #ffffff; }
.pair-areas { display: flex; flex-direction: column; gap: 0.3em; }
.area { line-height: 1.2; }
.area b { font-weight: 700; }
.area .x { color: var(--muted); }
.pairs-none { color: var(--muted); font-size: 1.2em; }

/* 03, вид A: пары списком слева, матрица фокуса справа */
/* Матрица крупнее, пары и люди без пары – узкой колонкой слева (23.10). */
.pairs-a { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 27% minmax(0, 1fr); gap: 1.4vw; }
.pa-side { min-height: 0; display: flex; flex-direction: column; gap: 1.2vh; }
.pa-side .pair-list { flex: 1 1 auto; }
.free-people { flex: none; background: var(--plate); border-radius: 1.6vh; padding: 1vh 1vw; font-size: calc(1.7vh * var(--fit, 1)); display: flex; flex-direction: column; gap: 0.5vh; }
.fp-title { font-weight: 700; color: var(--teal); }
.fp-item { display: flex; flex-wrap: wrap; gap: 0 0.6em; line-height: 1.25; }
.fp-name { font-weight: 700; }
.fp-areas { color: var(--muted); }
.m-pairs .chip.person { font-weight: 500; opacity: 0.85; }
.pair-list {
  min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 0.9vh;
  font-size: calc(1.6vh * var(--fit, 1));
}
.pair-list .pair { flex: 1 1 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; align-content: safe center; column-gap: 1em; row-gap: 0.35em; padding: 1vh 1.2vw; }
.pair-list .pair-top { grid-column: 1; }
.pair-list .count-badge { grid-column: 2; grid-row: 1; align-self: center; }
.pair-list .pair-areas { grid-column: 1 / -1; }
.pa-matrix { min-height: 0; display: flex; flex-direction: column; }

/* матрица на шагах пар и итога */
.m-pairs .cell, .m-final .cell { justify-content: safe center; }
.m-pairs .cell.off, .m-final .cell.off { background: transparent; border: 0.2vh dashed var(--plate-2); }
.m-pairs .cell.focus, .m-final .cell.focus { background: var(--plate); color: var(--text); box-shadow: inset 0.7vh 0 0 var(--accent); padding-left: 1.4vw; }
.m-pairs .cell.unpaired-cell, .m-final .cell.unpaired-cell { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 0.35vh var(--coral); }
.m-pairs .cross.small, .m-final .cross.small { opacity: 0.5; }
.chips { display: flex; flex-direction: column; gap: 0.35em; }
.chip { font-weight: 700; line-height: 1.15; }
.chip .dcd { font-size: 0.7em; }
.no-pair { font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; font-size: 1.2em; text-align: center; }
.m-pairs .cell { font-size: calc(2.1vh * var(--fit, 1)); }
.m-final .cell { font-size: calc(2.3vh * var(--fit, 1)); }
.m-final { grid-template-columns: 12vw repeat(3, minmax(0, 1fr)); }

/* «Кто куда идёт»: фамилии и пары в ячейках */
.m-assign .cell { font-size: calc(2vh * var(--fit, 1)); justify-content: safe center; }
.m-assign .chips { flex-direction: row; flex-wrap: wrap; gap: 0.4em 0.45em; }
.m-assign .chip, .m-assign .person { line-height: 1.15; padding: 0.2em 0.55em; border-radius: 0.55em; white-space: nowrap; }
.m-assign .chip { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.m-assign .person { background: var(--frame); font-weight: 600; }
.m-assign .cell.focus-mark { box-shadow: inset 0.5vh 0 0 var(--accent); }
.m-assign .cell.crossed { background: transparent; border: 0.2vh dashed var(--plate-2); }
.m-assign .cross.small { opacity: 0.35; }

/* карточки пар крупно (вид B) */
.pair-grid {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 1.4vh 1vw;
  font-size: calc(2.3vh * var(--fit, 1));
}
.pair-grid.n-1, .pair-grid.n-2, .pair-grid.n-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pair-grid .pair { padding: 2vh 1.4vw; justify-content: safe center; }
.pair-grid .pair-names { font-size: 1.45em; }

.pairs-b { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 1.4vh; }
.final-a { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 1.4vh; }
.final-b { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 26%; gap: 1.4vw; }
.final-b .pair-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.final-b .pair-grid .pair-names { font-size: 1.2em; }
.final-b .unpaired.big { font-size: 3.4vh; }

/* полоса / блок «Фокусные области без пары» */
.unpaired {
  flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 0.8vh 1.6vw;
  background: var(--accent); color: var(--on-accent); border-radius: 1.6vh; padding: 1.4vh 1.6vw;
  font-size: 2.2vh;
}
.unpaired .up-title { font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; text-transform: var(--head-case); }
.unpaired .up-list { display: flex; flex-wrap: wrap; gap: 0.4vh 2vw; }
.unpaired .area .x { color: inherit; opacity: 0.6; }
.unpaired.big { font-size: 3.2vh; padding: 2vh 1.8vw; }
.unpaired.done { background: var(--plate); color: var(--teal); }
.final-b .unpaired { flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 3vh 1.6vw; }
.final-b .unpaired .up-list { flex-direction: column; gap: 1.6vh; }
.final-b .unpaired.done { justify-content: center; }

/* ---------- поверх доски ---------- */
.note-plaque {
  position: absolute; left: 50%; bottom: 13.5vh; transform: translateX(-50%); z-index: 2;
  max-width: 72vw; padding: 1.6vh 2.4vw; border-radius: 1.8vh;
  background: var(--plaque); color: var(--on-plaque);
  font-weight: 600; font-size: 2.6vh; line-height: 1.3; text-align: center;
  box-shadow: 0 1vh 3vh rgba(0, 0, 0, 0.18);
}
/* ---------- эффекты (только при fx-on; screen.js включает View Transitions) ---------- */
/* проявление новой записи */
.fx-on .entry.is-new { animation: entry-in 0.5s ease-out both; }
@keyframes entry-in { from { opacity: 0; transform: translateY(0.35em); } to { opacity: 1; transform: none; } }
/* линия зачёркивания слева направо */
.fx-on .entry.is-new-struck { animation: struck-fade 0.6s ease-out both; }
.fx-on .entry.is-new-struck .strike { animation: strike-draw 0.6s ease-out both; }
@keyframes struck-fade { from { opacity: 1; } to { opacity: 0.45; } }
@keyframes strike-draw { from { background-size: 0% 0.09em; } to { background-size: 100% 0.09em; } }

/* View Transitions: спокойная смена шагов ~0,4 с */
::view-transition-group(*) { animation-duration: 0.4s; animation-timing-function: cubic-bezier(0.25, 0.7, 0.25, 1); z-index: 1; }
::view-transition-group(root), ::view-transition-group(vt-hl) { z-index: 0; }
::view-transition-old(*), ::view-transition-new(*) { animation-duration: 0.4s; }
/* снимки ячеек и столбцов не растягиваются: коробка плавно растёт, содержимое – своего размера */
::view-transition-old(*):only-child, ::view-transition-new(*):only-child { animation-duration: 0.3s; }
html.vt-zoom::view-transition-group(*) { animation-duration: 0.6s; }
html.vt-zoom::view-transition-old(*), html.vt-zoom::view-transition-new(*) {
  height: 100%; object-fit: none; object-position: 0 0; animation-duration: 0.6s;
}
html.vt-zoom::view-transition-old(root), html.vt-zoom::view-transition-new(root) { animation-duration: 0.4s; }
/* подсветка слоя перетекает ~0,35 с */
html.vt-hl::view-transition-group(*), html.vt-hl::view-transition-old(*), html.vt-hl::view-transition-new(*) { animation-duration: 0.35s; }
/* нижняя строка: легенда уходит вниз, замечание выезжает (и наоборот) */
html.vt-bottom-swap::view-transition-group(vt-bottom) { overflow: hidden; }
html.vt-bottom-swap::view-transition-old(vt-bottom) { animation: vt-slide-out 0.4s ease-in both; height: 100%; object-fit: none; object-position: 0 0; }
html.vt-bottom-swap::view-transition-new(vt-bottom) { animation: vt-slide-in 0.4s ease-out both; height: 100%; object-fit: none; object-position: 0 0; }
@keyframes vt-slide-out { to { opacity: 0; transform: translateY(70%); } }
@keyframes vt-slide-in { from { opacity: 0; transform: translateY(70%); } }


/* Завершающий слайд «Профессиональные позиции» – в стиле заставки. */
.view-positions .intro-foot { grid-template-columns: minmax(0, 1fr); }
.view-positions .intro-reminder { background: var(--accent); color: var(--on-accent); }
.view-positions .intro-reminder .ir-title { color: inherit; }

/* Число объединённых тезисов – справа от текста записи. */
.merged { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35em; height: 1.35em; padding: 0 0.3em; margin-left: 0.45em; border-radius: 0.7em; background: var(--teal); color: var(--frame); font-size: 0.72em; font-weight: 700; vertical-align: 0.12em; }

/* Запись «вживую»: без заливки – маленький значок в конце; только что добавленная коротко подсвечивается. */
.live-mark { margin-left: 0.35em; color: var(--teal); font-size: 0.8em; font-weight: 400; }
.fx-on .entry.live.is-new { animation: entry-in 0.5s ease-out both, live-flash 3s ease-out both; border-radius: 0.4em; }
@keyframes live-flash { from { background: var(--live-bg); } to { background: transparent; } }
/* Уход записи при скрытии и объединении. */
.fx-on .entry.is-leaving { animation: entry-out 0.28s ease-in both; }
@keyframes entry-out { to { opacity: 0; transform: translateX(-0.4em); } }

/* ---------- рекомендации по слоям ---------- */
.recs { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.4vh; overflow: hidden; }
.rc-grid {
  flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 0.9em;
  font-size: calc(2.1vh * var(--fit, 1)); line-height: 1.25;
}
.rc-row { display: grid; column-gap: 1.6vw; }
.rc-heads { align-items: end; }
.rc-cols { align-items: start; }
.n-4 > .rc-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.n-3 > .rc-row { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2.4vw; }
.rc-grid.n-3 { font-size: calc(2.6vh * var(--fit, 1)); }
.rc-grid.n-2 { font-size: calc(2.9vh * var(--fit, 1)); }
.n-2 > .rc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3vw; }
.rc-col { display: flex; flex-direction: column; gap: 0.75em; min-width: 0; }
.rc-head {
  font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; font-size: 1.2em;
  text-transform: var(--head-case); padding-bottom: 0.35em; border-bottom: 0.25vh solid currentColor;
}
.rc-item { display: flex; align-items: flex-start; gap: 0.5em; }
.rc-ic {
  flex: none; width: 1.1em; height: 1.1em; margin-top: 0.05em;
  fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.rc-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rc-text { font-weight: 600; overflow-wrap: break-word; hyphens: auto; }
.rc-who { color: var(--muted); font-size: 0.86em; }
.rc-when { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; }
.rc-time { color: var(--teal); font-weight: 700; }
.rc-place { color: var(--muted); font-size: 0.86em; }
.rc-dcd { display: flex; align-items: center; gap: 0.5em; color: var(--muted); font-weight: 700; font-size: 0.85em; margin-top: 0.2em; }
.rc-dcd::after { content: ""; flex: 1; border-top: 0.2vh dashed currentColor; }
.rc-legend { flex: none; display: flex; gap: 2.4vw; font-size: 1.8vh; color: var(--muted); }
.rc-legend span { display: inline-flex; align-items: center; gap: 0.4em; }

/* причина фокуса – плашка внизу жёлтой ячейки */
.focus-reason {
  margin-top: auto; align-self: flex-start; font-weight: 700; font-size: 0.9em; line-height: 1.15;
  background: var(--on-accent); color: var(--accent); padding: 0.2em 0.55em; border-radius: 0.5em;
}

/* ---------- программа: площадки строками и QR (вариант C1) ---------- */
/* Общие столбцы для всех строк: название | день 1 | день 2 | QR приложения. */
.program {
  flex: 1; min-height: 0; overflow: hidden;
  display: flex; gap: 2vw; align-items: stretch;
  font-size: calc(2.15vh * var(--fit, 1));
}
.vrow {
  grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center;
  background: var(--plate); border-radius: 1.8vh; padding: 1.6vh 1.6vw;
}
.vn-head { grid-column: 1; align-self: start; }
.vn-col.c1, .tg-item.c1 { grid-column: 2; }
.vn-col.c2, .tg-item.c2 { grid-column: 3; }
.vn-col { align-self: start; }
.vn-qr { grid-column: 4; display: flex; flex-direction: column; align-items: center; gap: 0.6vh; }
.vn-name { font-family: "Inter Tight", "Inter", sans-serif; font-weight: 800; font-size: 1.45em; line-height: 1.1; }
.vn-sub { color: var(--teal); font-weight: 700; font-size: 1.1em; margin-top: 0.3em; }
.vn-text { margin-top: 0.5em; line-height: 1.3; color: var(--muted); font-size: 0.92em; }
.vn-day + .vn-day { margin-top: 0.8em; }
.vn-date { font-weight: 800; font-size: 1.08em; margin-bottom: 0.25em; }
.vn-slot { line-height: 1.45; }
.vn-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.vn-what { color: var(--muted); }
.qr-code { width: 21vh; height: 21vh; border-radius: 0.8vh; }
.qr-label { font-weight: 700; font-size: 1.7vh; }
.vrow.tg { padding-top: 1.2vh; padding-bottom: 1.2vh; }
.tg-item { display: flex; align-items: center; gap: 1.2vw; }
.tg-code { width: 13vh; height: 13vh; flex: none; border-radius: 0.6vh; }
.tg-label { font-weight: 800; font-size: 1.15em; }
.qr-empty { display: flex; align-items: center; justify-content: center; border: 0.3vh dashed var(--muted); color: var(--muted); font-weight: 800; font-size: 2.4vh; }

/* 25.10: площадки – общей сеткой слева, QR группы – плашкой справа на всю высоту. */
.pv-rows { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: auto; align-content: start; row-gap: 1.6vh; column-gap: 2vw; }
.tg-side { flex: none; width: 34vh; background: var(--plate); border-radius: 1.8vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6vh; padding: 2vh; }
.tg-big { width: 28vh; height: 28vh; border-radius: 0.8vh; }
.tg-side .tg-label { text-align: center; font-size: 1.4em; }

/* ---------- статистика стендов DAF ---------- */
.stats { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 4vw; align-items: start; font-size: calc(2.6vh * var(--fit, 1)); }
.st-layers { display: flex; flex-direction: column; gap: 1.6em; }
.st-total { color: var(--muted); }
.st-total b { color: var(--teal); font-size: 1.6em; }
.st-row { display: grid; grid-template-columns: 9em minmax(0, 1fr) 3em 3.2em; column-gap: 0.8em; row-gap: 0.25em; align-items: center; }
.st-name { font-weight: 700; }
.st-bar { height: 1.1em; background: color-mix(in srgb, var(--teal) 12%, transparent); border-radius: 0.2em; overflow: hidden; }
.st-bar span { display: block; height: 100%; background: var(--teal); }
.st-count { font-weight: 800; font-size: 1.5em; text-align: right; }
.st-share { color: var(--muted); text-align: right; }
.st-meta { grid-column: 2 / -1; color: var(--muted); font-size: 0.8em; }
.st-side { display: flex; flex-direction: column; gap: 1.1em; }
.st-side-title { font-weight: 700; border-bottom: 0.25vh solid currentColor; padding-bottom: 0.3em; }
.st-seg { display: grid; grid-template-columns: auto 1fr; column-gap: 0.6em; align-items: baseline; }
.st-seg-n { font-size: 2em; font-weight: 800; color: var(--teal); grid-row: span 2; min-width: 2.6em; }
.st-seg-name { font-weight: 700; }
.st-seg-sub, .st-note { color: var(--muted); font-size: 0.8em; }

/* Номер команды (пара или тройка) – 25.10. */
.team-no { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 1.5em; height: 1.5em; padding: 0 0.3em; border-radius: 0.75em; background: var(--teal); color: #fff; font-weight: 800; font-size: 0.9em; line-height: 1; font-variant-numeric: tabular-nums; }
.chip .team-no { min-width: 1.35em; height: 1.35em; font-size: 0.8em; margin-right: 0.35em; vertical-align: 0.05em; }
