/* Лабораторія Числовиків. Дві теми: «Нічна лабораторія» (типова) і «Денна». Рух — лише transform і opacity. */
/* Атрибут hidden завжди ховає, навіть якщо клас задає display (інакше підтвердження видно одразу). */
[hidden] { display: none !important; }
:root, :root[data-theme="dark"] {
  /* Напрям Б «Полиці з банками»: нічна лабораторія — скло, дерево, паперові етикетки, дошка. */
  --bg: #131f2a; --bg2: #0d161e; --panel: #1c2d3b; --panel2: #24384a; --line: #2f4659;
  --ink: #eef3f6; --muted: #a9bccb; --faint: #8299ad; --on-teal: #0d1a22;
  --yellow: #f2b544; --yellow-sh: #c0861f; --teal: #47d3e0; --wood: #7a4f2c; --wood-sh: #4a2f1b; --wood-hi: #8a5a33;
  --glass-line: #9fc3d6; --paper: #efe3c8; --paper-ink: #2a1d10; --board: #22343f; --board-frame: #6b4627; --chalk: #f2f5f0;
  --ok-bg: #173a2c; --ok: #7fdcaa; --warn-bg: #3a2c17; --warn: #f0b066; --bad-bg: #3a1c22; --bad: #ff9aab;
  --rare: #8fb2ff; --epic: #c7a6ff; --leg: #f2cf5b;
  --shadow: rgba(0,0,0,0.35); --glass: #182a38; --btn2-sh: #000;
  --plank: rgba(255,255,255,0.025);
  color-scheme: dark;
}
:root[data-theme="light"] {
  /* Денна лабораторія: прохолодна стіна, ті самі полиці, скло й етикетки; дошка лишається темною. */
  --bg: #e8eef2; --bg2: #dbe3e9; --panel: #ffffff; --panel2: #eef2f5; --line: #cfd9e1;
  --ink: #10202e; --muted: #475b6c; --faint: #5f6c78; --on-teal: #0d1a22;
  --yellow: #f2b544; --yellow-sh: #c0861f; --teal: #0f6f7c; --wood: #8a5a33; --wood-sh: #5b3b22; --wood-hi: #a06a3e;
  --glass-line: #6f8ea3; --paper: #f7eed9; --paper-ink: #2a1d10; --board: #22343f; --board-frame: #6b4627; --chalk: #f2f5f0;
  --ok-bg: #e3f4ea; --ok: #17643c; --warn-bg: #fdf0dc; --warn: #84490a; --bad-bg: #fde5ea; --bad: #b0304a;
  --rare: #2f5fd0; --epic: #6b3fc4; --leg: #8a6608;
  --shadow: rgba(16,32,46,0.12); --glass: #f4f8fa; --btn2-sh: #b9c6d1;
  --card-sh: 0 1px 0 rgba(16,32,46,0.04), 0 6px 18px rgba(16,32,46,0.07);
  --plank: rgba(16,32,46,0.035);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.5 Onest, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.disp { font-family: 'Dela Gothic One', sans-serif; font-weight: 800; letter-spacing: 0.01em; }
.mono { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

#app { min-height: 100%; display: flex; flex-direction: column; overflow-x: clip; }

.wrap { width: 100%; max-width: 480px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; padding: 0 16px; }
.wide { max-width: 1180px; }
.screen { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 8px 0 24px; animation: enter 0.28s cubic-bezier(.2,.8,.2,1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
.screen.still { animation: none; }

/* Смуга пробних даних і верхня панель — на кожному екрані */
.band { background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 600; padding: 8px 16px; text-align: center; }
.band { font-size: 14px; }
.band button { background: none; border: 0; text-decoration: underline; font-weight: 700; cursor: pointer; padding: 12px 6px; margin: -10px 0; color: inherit; font-size: 14px; }
.top { display: flex; align-items: center; gap: 8px; padding: 12px 0 4px; min-height: 60px; }
.top .grow { flex: 1; min-width: 0; }
.chip { height: 44px; padding: 0 12px; border-radius: 12px; background: var(--panel); display: inline-flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 15px; color: var(--ink); border: 0; text-decoration: none; white-space: nowrap; cursor: default; }
button.chip { cursor: pointer; }
.chip.icon { width: 44px; padding: 0; justify-content: center; }
.chip svg { flex: none; }
.top .chip { flex: none; }
.top .chip:first-child { flex: 0 1 auto; min-width: 44px; overflow: hidden; }
@media (max-width: 370px) { .top { gap: 6px; } .top .chip { height: 36px; padding: 0 8px; font-size: 14px; } .top .chip.icon { width: 36px; padding: 0; } .rank-t { display: none; } }

/* Кнопки */
.btn { min-height: 58px; padding: 0 20px; border-radius: 16px; background: var(--yellow); color: #10202e; display: flex; align-items: center; justify-content: center; gap: 8px; font: 800 16px/1.2 'Dela Gothic One', sans-serif; letter-spacing: 0.02em; box-shadow: 0 5px 0 var(--yellow-sh); border: 0; cursor: pointer; text-decoration: none; text-align: center; transition: transform 0.12s ease, box-shadow 0.12s ease; touch-action: manipulation; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--yellow-sh); }
.btn[disabled] { background: var(--panel2); color: var(--muted); box-shadow: 0 5px 0 var(--btn2-sh); cursor: default; transform: none; }
.btn2 { min-height: 54px; padding: 0 16px; border-radius: 16px; background: var(--panel); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; box-shadow: 0 5px 0 var(--btn2-sh); text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease; touch-action: manipulation; }
.btn2:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--btn2-sh); }
.btn2[disabled] { opacity: 0.5; cursor: default; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 12px; font-size: 16px; min-height: 44px; }
.row { display: flex; gap: 10px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 10px; }
.panel { background: var(--panel); border-radius: 18px; padding: 16px; }
.status { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; font-size: 16px; font-weight: 600; }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.warn { background: var(--warn-bg); color: var(--warn); }
.status.bad { background: var(--bad-bg); color: var(--bad); }
.kicker { font-size: 14px; font-weight: 700; color: var(--yellow); letter-spacing: 0.08em; text-transform: uppercase; }
:root[data-theme="light"] .kicker { color: #7a5c08; }
h1, h2, h3 { margin: 0; }
h1.disp { font-size: 22px; line-height: 1.25; }
h2.disp { font-size: 17px; }
.bar { height: 10px; border-radius: 999px; background: var(--panel2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--teal); border-radius: 999px; transform-origin: left; transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
.steps { display: flex; gap: 5px; flex: 1; }
.steps span { flex: 1; height: 8px; border-radius: 999px; background: var(--panel2); transition: background 0.3s ease; }
.steps span.on { background: var(--teal); }
.err { color: var(--bad); font-weight: 600; font-size: 14px; min-height: 20px; }

/* Нижнє меню */
.nav { position: sticky; bottom: 0; background: var(--bg2); border-top: 1px solid var(--line); display: flex; justify-content: center; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
.nav a { flex: 1; max-width: 160px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; border-radius: 12px; text-decoration: none; color: var(--muted); font-size: 14px; min-height: 56px; font-weight: 600; position: relative; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--panel); }
.nav .dot { position: absolute; top: 4px; right: calc(50% - 20px); width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }

/* Числовик: живе — дихає і кліпає */
.cz { position: relative; flex: none; }
.cz-anim { animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.cz-anim .cz-lid { animation: blink 4.6s infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-3px) scale(1.015, 0.985); } }
@keyframes blink { 0%, 93%, 100% { height: 0; } 95.5% { height: 100%; } }
.cz-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.cz-name { font-weight: 700; font-size: 16px; text-align: center; line-height: 1.2; }
.cz-num { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--muted); }

/* Полиця */
.shelf { display: flex; justify-content: space-around; align-items: flex-end; gap: 6px; padding: 0 6px; min-height: 96px; }
.plank { height: 10px; border-radius: 4px; background: var(--wood); box-shadow: 0 6px 0 var(--wood-sh); }

/* Головна */
.hero { position: relative; display: flex; flex-direction: column; align-items: center; padding: 18px 0 0; }
.hero .stage { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 240px; width: 100%; }
.glow { position: absolute; left: 50%; bottom: 10px; width: 260px; height: 260px; margin-left: -130px; border-radius: 50%; background: radial-gradient(circle, rgba(60,200,216,0.22), transparent 65%); pointer-events: none; }
.bubble { position: relative; background: var(--panel); border-radius: 16px; padding: 12px 14px; font-weight: 600; font-size: 16px; line-height: 1.35; }
.bubble::after { content: ''; position: absolute; left: 26px; bottom: -8px; width: 16px; height: 16px; background: var(--panel); transform: rotate(45deg); border-radius: 3px; }
.dots5 { display: flex; gap: 8px; justify-content: center; }
.dots5 span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--faint); transition: background 0.3s, border-color 0.3s, transform 0.3s; }
.dots5 span.on { background: var(--teal); border-color: var(--teal); }
.ch-card { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: linear-gradient(0deg, var(--panel), var(--panel)); border: 2px solid var(--epic); }

/* Пригода */
.kolba { display: flex; gap: 10px; align-items: flex-end; }
.sent { display: flex; flex-direction: column; gap: 8px; }
.sent button { text-align: left; font-size: 19px; line-height: 1.4; font-weight: 500; padding: 10px 12px; border-radius: 14px; border: 2px dashed var(--line); background: transparent; cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.15s; }
.sent button:active { transform: scale(0.98); }
.sent button.right { border: 2px solid var(--ok); background: var(--ok-bg); font-weight: 700; }
.sent button.wrong { border-color: var(--warn); animation: shake 0.4s ease; }
.sent p { margin: 0; font-size: 20px; line-height: 1.45; font-weight: 500; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.q { font-size: 20px; font-weight: 700; line-height: 1.35; padding: 12px 14px; border-radius: 14px; background: var(--ok-bg); color: var(--ink); }

/* Колба: десятки — палички, одиниці — краплі */
.flask { position: relative; width: 210px; height: 258px; margin: 6px auto 0; }
.flask svg.glass { position: absolute; inset: 0; }
.flask .content { position: absolute; left: 34px; right: 34px; bottom: 26px; height: 120px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; flex-wrap: wrap-reverse; align-content: flex-start; }
.rod { width: 12px; height: 70px; border-radius: 6px; background: var(--teal); box-shadow: inset 0 -6px 0 rgba(0,0,0,0.15); animation: drop-in 0.35s cubic-bezier(.34,1.56,.64,1) both; }
.one { width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); animation: drop-in 0.35s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes drop-in { from { transform: translateY(-60px) scale(0.6); opacity: 0; } }
.flask .bubbles span { position: absolute; bottom: 30px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.5); animation: rise 3s ease-in infinite; opacity: 0; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-150px); opacity: 0; } }
.puff { position: absolute; left: 50%; top: 0; width: 140px; height: 90px; margin-left: -70px; pointer-events: none; }
.puff span { position: absolute; border-radius: 50%; background: #8aa0b4; animation: puff 0.9s ease-out forwards; }
@keyframes puff { from { transform: scale(0.2); opacity: 0.9; } to { transform: scale(1.6) translateY(-30px); opacity: 0; } }
.counter { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.counter .num { font: 800 46px/1 'JetBrains Mono', monospace; text-align: center; min-width: 110px; font-variant-numeric: tabular-nums; }
.counter .pair { display: flex; flex-direction: column; gap: 8px; }
.counter .btn2 { min-height: 56px; font-family: 'JetBrains Mono', monospace; font-size: 16px; }
.lbl { font-size: 14px; color: var(--muted); text-align: center; font-weight: 600; }

/* Аркуш знизу */
.veil { position: fixed; inset: 0; background: rgba(5,12,20,0.55); z-index: 20; animation: fade 0.2s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--panel); border-radius: 22px 22px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; max-width: 520px; margin: 0 auto; animation: up 0.32s cubic-bezier(.2,.9,.25,1) both; max-height: 92vh; overflow: auto; }
.sheet .grab { align-self: center; width: 44px; height: 5px; border-radius: 999px; background: var(--line); }
@keyframes up { from { transform: translateY(100%); } }
.modal { position: fixed; inset: 0; z-index: 21; display: flex; align-items: center; justify-content: center; padding: 16px; pointer-events: none; }
.modal > div { pointer-events: auto; background: var(--panel); border-radius: 22px; padding: 22px; max-width: 420px; width: 100%; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; animation: pop 0.4s cubic-bezier(.34,1.56,.64,1) both; max-height: 90vh; overflow: auto; }
@keyframes pop { from { transform: scale(0.7); opacity: 0; } }

/* Результат */
.reward { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 10px; }
.rays { position: absolute; top: -10px; left: 50%; width: 360px; height: 360px; margin-left: -180px; background: repeating-conic-gradient(from 0deg, rgba(255,210,63,0.16) 0 10deg, transparent 10deg 24deg); border-radius: 50%; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); animation: spin 18s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.appear { animation: appear 0.7s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes appear { 0% { transform: scale(0.2) translateY(40px); opacity: 0; } 60% { opacity: 1; } }
.plus { position: absolute; right: 18%; top: 30px; font: 800 22px 'Dela Gothic One', sans-serif; color: var(--teal); animation: floatup 1.6s ease-out 0.5s both; }
@keyframes floatup { 0% { transform: translateY(20px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }
.expr { font: 800 30px/1.2 'JetBrains Mono', monospace; text-align: center; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 700; background: var(--panel2); }
.tag.gold { background: #2e2a14; color: #f2cf5b; }
:root[data-theme="light"] .tag.gold { background: #fbf0c8; color: #7a5c08; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 1.8s cubic-bezier(.3,.6,.5,1) forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); } }

/* Альбом */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tabs button { flex: none; height: 44px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--panel); color: var(--muted); font: 600 15px 'JetBrains Mono', monospace; cursor: pointer; position: relative; }
.tabs button[aria-selected="true"] { background: var(--teal); color: var(--on-teal); }
.tabs button.full::after { content: ''; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.card { background: var(--panel); border-radius: 16px; padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-height: 150px; border: 2px solid transparent; cursor: pointer; transition: transform 0.15s ease; }
.card:active { transform: scale(0.96); }
.card.gold { border-color: #e8b923; }
.card.miss { background: var(--bg2); cursor: default; }
.card .cz-name { font-size: 14px; }

/* Гардероб */
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.slots button { height: 48px; border-radius: 12px; border: 0; background: var(--panel); color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; }
.slots button[aria-selected="true"] { background: var(--teal); color: var(--on-teal); }
.items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.item { background: var(--panel); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 6px; border: 2px solid var(--line); text-align: left; cursor: pointer; transition: transform 0.15s, border-color 0.2s; }
.item:active { transform: scale(0.97); }
.item.on { border-color: var(--ok); background: var(--ok-bg); }
.item.locked { opacity: 0.85; cursor: default; background: var(--bg2); }
.item .nm { font-weight: 700; font-size: 16px; line-height: 1.2; }
.item .rr { font-size: 14px; font-weight: 700; }
.rar-c { color: var(--muted); } .rar-r { color: var(--rare); } .rar-e { color: var(--epic); } .rar-l { color: var(--leg); }
.wear-pick { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.wear-pick button { flex: none; background: var(--panel); border: 2px solid transparent; border-radius: 14px; padding: 8px 6px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.wear-pick button[aria-pressed="true"] { border-color: var(--teal); }

/* Вхід */
.code-in { font: 800 30px 'JetBrains Mono', monospace; letter-spacing: 0.3em; text-align: center; width: 100%; padding: 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); }
.code-in:focus { border-color: var(--teal); outline: none; }
.nums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.nums button { height: 58px; border-radius: 14px; border: 0; background: var(--panel); font: 800 21px 'JetBrains Mono', monospace; cursor: pointer; box-shadow: 0 4px 0 var(--btn2-sh); }
.nums button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--btn2-sh); }
.pins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pins button { aspect-ratio: 1; border-radius: 18px; border: 0; background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); box-shadow: 0 4px 0 var(--btn2-sh); transition: transform 0.12s; }
.pins button:active { transform: scale(0.94); }
.slots3 { display: flex; gap: 10px; justify-content: center; }
.slots3 span { width: 64px; height: 64px; border-radius: 16px; border: 2px dashed var(--faint); display: flex; align-items: center; justify-content: center; }
.slots3 span.on { border: 2px solid var(--teal); background: var(--panel); animation: pop 0.3s cubic-bezier(.34,1.56,.64,1) both; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.field input { font: 600 18px 'JetBrains Mono', monospace; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); letter-spacing: 0.08em; }

/* Кабінет учительки */
.t-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi b { font: 800 28px/1.1 'Dela Gothic One', sans-serif; }
.kpi span { font-size: 13px; color: var(--muted); }
.tbl-wrap { overflow-x: auto; background: var(--panel); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 700; position: sticky; top: 0; background: var(--panel); }
td.n { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.st { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.st.good { color: var(--ok); } .st.mid { color: var(--warn); } .st.low { color: var(--bad); } .st.few { color: var(--faint); }
.days { display: flex; gap: 6px; align-items: flex-end; height: 90px; }
.days div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.days i { display: block; width: 100%; max-width: 34px; background: var(--teal); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.switch { width: 44px; height: 26px; border-radius: 999px; border: 0; background: var(--panel2); position: relative; cursor: pointer; flex: none; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--faint); transition: transform 0.2s, background 0.2s; }
.switch[aria-checked="true"] { background: var(--ok-bg); }
.switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--ok); }
.tip { position: relative; cursor: help; border-bottom: 1px dotted var(--faint); }

/* Друк карток */
.cards-print { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.kcard { border: 2px dashed var(--line); border-radius: 16px; padding: 14px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; break-inside: avoid; }
.kcard .pinrow { display: flex; gap: 8px; }
.kcard .pinrow span { width: 52px; height: 52px; border-radius: 12px; background: var(--bg2); display: flex; align-items: center; justify-content: center; }
@media print {
  .band, .top, .nav, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
  .kcard { background: #fff; border-color: #888; }
  .kcard .pinrow span { background: #f2f2f2; }
}

.start-hero { display: flex; justify-content: center; gap: 4px; align-items: flex-end; padding-top: 10px; }
.foot { font-size: 12px; color: var(--faint); text-align: center; padding: 16px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Детектив: числа-сліди і дії */
.badge-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--yellow); color: #10202e; display: flex; align-items: center; justify-content: center; flex: none; }
.clues p { line-height: 1.9; }
.clues p.qline { font-weight: 700; }
.clue { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 44px; padding: 0 10px; margin: 0 3px; border-radius: 12px; border: 2px dashed var(--teal); background: transparent; font: 800 20px 'JetBrains Mono', monospace; color: var(--ink); cursor: pointer; vertical-align: middle; transition: transform 0.15s cubic-bezier(.34,1.56,.64,1), background 0.2s, border-color 0.2s; }
.clue:active { transform: scale(0.92); }
.clue.on { background: var(--teal); border-style: solid; color: var(--on-teal); transform: scale(1.06); }
.clue.right { background: var(--ok-bg); border: 2px solid var(--ok); color: var(--ok); }
.clue.extra { border: 2px solid var(--faint); color: var(--faint); text-decoration: line-through; }
.clue.bad { animation: shake 0.4s ease; border-color: var(--warn); }
.clue[disabled] { cursor: default; }
.ops { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.op { min-height: 88px; border-radius: 18px; border: 2px solid var(--line); background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; box-shadow: 0 5px 0 var(--btn2-sh); transition: transform 0.12s; }
.op b { font: 800 34px/1 'Dela Gothic One', sans-serif; }
.op span { font-size: 15px; color: var(--muted); font-weight: 600; }
.op:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--btn2-sh); }
.op.right { border-color: var(--ok); background: var(--ok-bg); }
.op.wrong { border-color: var(--warn); animation: shake 0.4s ease; }
.op[disabled] { cursor: default; }
.plan { margin-top: 6px; font-size: 22px; color: var(--ok); }

/* Підказки Пані Колби */
.coach { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--panel); border: 2px solid var(--teal); font-weight: 600; font-size: 16px; line-height: 1.35; animation: pop 0.35s cubic-bezier(.34,1.56,.64,1) both; }
.coach .link { padding: 8px; min-height: 44px; font-weight: 700; color: var(--teal); }
.coach-k { flex: none; }
.nudge { animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); box-shadow: 0 5px 0 var(--yellow-sh), 0 0 0 8px rgba(255,210,63,0.35); } }
/* Карта кімнат */
.rooms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.room { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; padding: 12px; border-radius: 16px; background: var(--panel); border: 2px solid var(--line); cursor: pointer; min-height: 112px; box-shadow: 0 4px 0 var(--btn2-sh); transition: transform 0.12s; }
.room:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--btn2-sh); }
.room[disabled] { opacity: 0.6; cursor: default; }
.room.cur { border-color: var(--teal); }
.room.locked { background: var(--bg2); box-shadow: none; cursor: default; }
.room-t { font-weight: 700; font-size: 16px; line-height: 1.25; display: flex; gap: 6px; align-items: center; }
.room-s { font-size: 14px; color: var(--muted); line-height: 1.3; }
.room-cur { font-size: 13px; font-weight: 700; color: var(--teal); }
.steps3 { display: flex; gap: 5px; }
.steps3 i { width: 22px; height: 8px; border-radius: 999px; background: var(--panel2); }
.steps3 i.on { background: var(--yellow); }
/* Етапи програми в кабінеті */
.stgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.stg { text-align: left; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); color: var(--muted); cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 56px; }
.stg.open { background: var(--panel); color: var(--ink); }
.stg[aria-checked="true"] { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.stg span { font-size: 13px; color: var(--muted); }
button.chip { cursor: pointer; }

/* Картка числовика */
.hero-link { text-decoration: none; color: inherit; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.lvl-badge { font: 700 14px 'JetBrains Mono', monospace; padding: 6px 12px; border-radius: 999px; background: var(--panel); }
.skill { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--panel); }
.skill .bar { display: flex; }
.skill .bar i.b2 { background: var(--yellow); border-radius: 0 999px 999px 0; }
.plus-b { color: var(--yellow); }
:root[data-theme="light"] .plus-b { color: #7a5c08; }
.trait { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 2px solid var(--epic); }
.trait.locked { border-color: var(--line); background: var(--bg2); }
.lvlup { border: 2px solid var(--yellow); }
.shake-y { animation: shake 0.4s ease; }
.sheet .btn2, .lvlup .btn2, .modal .btn2 { background: var(--panel2); }

/* Денна тема: глибина тінями замість темних тонів */
:root[data-theme="light"] .panel, :root[data-theme="light"] .item, :root[data-theme="light"] .card, :root[data-theme="light"] .skill,
:root[data-theme="light"] .trait, :root[data-theme="light"] .kpi, :root[data-theme="light"] .tbl-wrap, :root[data-theme="light"] .bubble,
:root[data-theme="light"] .coach, :root[data-theme="light"] .ch-card { box-shadow: var(--card-sh); }
:root[data-theme="light"] .item, :root[data-theme="light"] .card, :root[data-theme="light"] .skill, :root[data-theme="light"] .kpi { border: 1px solid var(--line); }
:root[data-theme="light"] .chip { box-shadow: var(--card-sh); border: 1px solid var(--line); }
:root[data-theme="light"] .item.on { background: #eaf7ee; border: 2px solid var(--ok); }
/* Закриті речі й кімнати: пунктирна рамка, тьмяний персонаж, текст лишається контрастним */
:root[data-theme="light"] .item.locked, :root[data-theme="light"] .room.locked, :root[data-theme="light"] .card.miss {
  background: rgba(255,255,255,0.5); border: 2px dashed #b9c6d3; box-shadow: none; opacity: 1; }
:root[data-theme="light"] .item.locked .cz, :root[data-theme="light"] .room.locked .cz { filter: saturate(0.35); opacity: 0.6; }
.item.locked .cz { opacity: 0.75; }
:root[data-theme="light"] .item.locked .nm, :root[data-theme="light"] .room.locked .room-t { color: var(--ink); }
:root[data-theme="light"] .room { background: #fff; border: 1px solid var(--line); box-shadow: var(--card-sh), 0 4px 0 var(--btn2-sh); }
:root[data-theme="light"] .room.cur { border: 2px solid var(--teal); }
:root[data-theme="light"] .btn2 { background: #fff; border: 1px solid var(--line); }
:root[data-theme="light"] .sheet .btn2, :root[data-theme="light"] .lvlup .btn2, :root[data-theme="light"] .modal .btn2 { background: var(--panel2); }
:root[data-theme="light"] .nav { background: #ffffff; box-shadow: 0 -6px 18px rgba(16,32,46,0.06); }
:root[data-theme="light"] .nav a[aria-current="page"] { background: var(--panel2); }
:root[data-theme="light"] .glow { background: radial-gradient(circle, rgba(60,200,216,0.22), transparent 65%); }
:root[data-theme="light"] .band { background: #fdf3e3; border-bottom: 1px solid #f0dfc2; }
:root[data-theme="light"] .tabs button, :root[data-theme="light"] .slots button { background: #fff; border: 1px solid var(--line); color: var(--muted); }
:root[data-theme="light"] .tabs button[aria-selected="true"], :root[data-theme="light"] .slots button[aria-selected="true"] { border-color: var(--teal); }
:root[data-theme="light"] .tag { background: #fff; border: 1px solid var(--line); }
:root[data-theme="light"] .clue { border-color: #0f6f7c; }
:root[data-theme="light"] .flask svg.glass path { stroke: #7f95a8; }
:root[data-theme="light"] .pins button, :root[data-theme="light"] .nums button, :root[data-theme="light"] .op { background: #fff; border: 1px solid var(--line); }
:root[data-theme="light"] .code-in, :root[data-theme="light"] .field input { background: #fff; }
:root[data-theme="light"] .stg { background: rgba(255,255,255,0.5); }
:root[data-theme="light"] .stg.open { background: #fff; }
:root[data-theme="light"] .shelf + .plank, :root[data-theme="light"] .plank { box-shadow: 0 6px 0 var(--wood-sh), 0 12px 18px rgba(16,32,46,0.10); }

/* ================= Напрям Б «Полиці з банками» ================= */
body { background-image: repeating-linear-gradient(90deg, var(--plank) 0 1px, transparent 1px 64px); }
.disp { font-family: 'Dela Gothic One', sans-serif; font-weight: 400; letter-spacing: 0.02em; }
.hand { font-family: Neucha, cursive; }
h1.disp { font-size: 24px; line-height: 1.15; }
h2.disp { font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--glass-line); }
.kicker { font-family: 'Dela Gothic One', sans-serif; font-weight: 400; letter-spacing: 0.07em; color: var(--yellow); }
:root[data-theme="light"] .kicker { color: #8a5a10; }
:root[data-theme="light"] h2.disp { color: #3d5a6e; }
/* Кнопки: бурштинова з фаскою знизу; другорядна — темна плитка */
.btn { border-radius: 8px; background: var(--yellow); color: #24170a; font-family: 'Dela Gothic One', sans-serif; font-weight: 400; font-size: 18px; letter-spacing: 0.03em; box-shadow: inset 0 -5px 0 var(--yellow-sh), 0 3px 0 #000; }
.btn:active { transform: translateY(3px); box-shadow: inset 0 -2px 0 var(--yellow-sh), 0 0 0 #000; }
.btn[disabled] { box-shadow: inset 0 -4px 0 rgba(0,0,0,0.25); }
.btn2 { border-radius: 8px; box-shadow: 0 3px 0 var(--btn2-sh); }
.btn2:active { transform: translateY(3px); box-shadow: 0 0 0 var(--btn2-sh); }
.chip { border-radius: 6px; }
:root[data-theme="light"] .btn { box-shadow: inset 0 -5px 0 var(--yellow-sh), 0 3px 0 #8a6a3a; }
/* Площини: менші радіуси, без однакового заокруглення скрізь */
.panel, .card, .item, .skill, .trait, .kcard, .room, .ch-card, .coach, .bubble { border-radius: 6px; }
.status { border-radius: 6px; }
.sheet { border-radius: 14px 14px 0 0; }
.modal > div { border-radius: 10px; }
/* Табличка-назва в шапці */
.plate { padding: 6px 12px 7px; background: #5b3b22; border: 2px solid #3b2615; border-radius: 3px; box-shadow: inset 0 -3px 0 #4a2f1b; font-family: 'Dela Gothic One', sans-serif; font-size: 16px; letter-spacing: 0.04em; color: #f6d9a8; white-space: nowrap; }
/* Паперова етикетка */
.label { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 10px 8px; background: var(--paper); color: var(--paper-ink); border-radius: 2px; box-shadow: 0 2px 0 rgba(0,0,0,0.35); line-height: 1.05; }
.label .hand { font-size: 20px; }
.label .mono { font-size: 13px; }
/* Полиця */
.plank { height: 14px; border-radius: 2px; background: var(--wood); box-shadow: 0 8px 0 var(--wood-sh), 0 18px 24px rgba(0,0,0,0.35); }
:root[data-theme="light"] .plank { box-shadow: 0 8px 0 var(--wood-sh), 0 16px 20px rgba(16,32,46,0.15); }
/* Велика банка з числовиком на головній */
.jar-hero { position: relative; width: 250px; height: 280px; display: flex; justify-content: center; align-items: flex-end; margin: 0 auto 30px; }
.jar-hero svg.jar { position: absolute; left: 0; bottom: 0; }
.jar-hero .cz-in { position: relative; margin-bottom: 32px; }
.jar-hero .label { position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%) rotate(-2deg); text-decoration: none; white-space: nowrap; z-index: 1; }
.jar-hero .label::before { content: ''; position: absolute; top: -14px; left: 50%; width: 2px; height: 14px; background: var(--wood-hi); }
.lvl-badge { font: 700 13px 'JetBrains Mono', monospace; }
/* Банки-кімнати */
.rooms { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.room, :root[data-theme="light"] .room { background: transparent; border: 0; box-shadow: none; padding: 0; min-height: 0; align-items: center; text-align: center; gap: 4px; }
.room:active { transform: translateY(2px); box-shadow: none; }
.room.cur, :root[data-theme="light"] .room.cur { border: 0; }
.room.locked, :root[data-theme="light"] .room.locked { background: transparent; border: 0; }
.room svg { display: block; }
.room-t { font-size: 15px; justify-content: center; text-align: center; }
.room-s { font-size: 13px; text-align: center; }
.room-cur { color: var(--yellow); }
:root[data-theme="light"] .room-cur { color: #8a5a10; }
.rooms-shelf { height: 10px; border-radius: 2px; background: var(--wood); box-shadow: 0 6px 0 var(--wood-sh); margin-top: -2px; }
/* Кроки пригоди — пробірки */
.steps { align-items: flex-end; height: 32px; }
.steps span { height: 28px; border-radius: 3px 3px 10px 10px; background: transparent; border: 2px solid var(--line); }
.steps span.on { border-color: var(--glass-line); background: linear-gradient(transparent 0 22%, var(--teal) 22%); }
/* Дошка з умовою */
.board, .sent.panel, .clues.panel { background: var(--board); color: var(--chalk); border: 10px solid var(--board-frame); border-radius: 4px; box-shadow: inset 0 0 0 2px #1a2830, 0 4px 0 rgba(0,0,0,0.6); font-family: Neucha, cursive; }
.sent.panel p, .clues.panel p { font-size: 24px; line-height: 1.6; font-weight: 400; }
.clues p.qline { border-bottom: 3px solid var(--yellow); display: inline; font-weight: 400; }
.clue { font-family: 'JetBrains Mono', monospace; border-radius: 4px; border: 2px dashed var(--teal); color: var(--chalk); }
.clue.on { background: var(--teal); color: var(--on-teal); border-style: solid; }
.clue.right { background: var(--teal); border: 2px solid var(--teal); color: var(--on-teal); }
.clue.extra { border: 2px dashed #7f95a6; color: #9cb0be; text-decoration: line-through; background: transparent; }
:root[data-theme="light"] .clue { border-color: #47d3e0; }
/* Дії — металеві плитки */
.op { border-radius: 8px; }
.op b { font-family: 'JetBrains Mono', monospace; font-weight: 800; }
/* Бульбашка Пані Колби — паперова записка */
.bubble { background: var(--paper); color: var(--paper-ink); font-family: Neucha, cursive; font-size: 20px; font-weight: 400; line-height: 1.3; }
.bubble::after { background: var(--paper); }
.coach { background: var(--paper); color: var(--paper-ink); border: 0; box-shadow: 0 2px 0 rgba(0,0,0,0.35); font-family: Neucha, cursive; font-size: 19px; font-weight: 400; transform: rotate(-0.6deg); }
.coach .link { color: #5b3b22; font-family: Onest, sans-serif; font-size: 15px; }
/* Нижнє меню: активний розділ — етикетка */
.nav a[aria-current="page"], :root[data-theme="light"] .nav a[aria-current="page"] { background: var(--paper); color: var(--paper-ink); border-radius: 6px; }
.nav a { border-radius: 6px; }
/* Альбом: банки на полицях */
.grid3 { row-gap: 18px; }
.card { background: var(--glass); border: 2px solid var(--glass-line); border-radius: 6px 6px 14px 14px; position: relative; padding-top: 18px; }
.card::before { content: ''; position: absolute; top: -8px; left: 22%; right: 22%; height: 10px; background: var(--wood-hi); border-radius: 2px; }
.card.miss { border-style: dashed; border-color: var(--line); background: transparent; }
.card.miss::before { background: #4b3a2c; }
.card .cz-name { font-family: Neucha, cursive; font-size: 16px; font-weight: 400; background: var(--paper); color: var(--paper-ink); padding: 0 6px; border-radius: 2px; }
.card.miss .cz-name { background: transparent; color: var(--muted); }
.tabs button { border-radius: 6px; }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--paper-ink); }
.slots button { border-radius: 6px; }
.slots button[aria-selected="true"] { background: var(--paper); color: var(--paper-ink); }
:root[data-theme="light"] .tabs button[aria-selected="true"], :root[data-theme="light"] .slots button[aria-selected="true"] { border-color: #c9b98f; }
/* Гардероб: речі з паперовою біркою */
.item .nm { font-family: Neucha, cursive; font-size: 19px; font-weight: 400; }
.item.on { border-color: var(--ok); }
/* Звання, краплі, серія — вузькі плитки */
.top .chip { font-size: 16px; }

/* ================= Кабінет учительки · BP Core «Відомість» ================= */
body[data-role="teacher"] { background: #fafaf7; background-image: none; color: #1d1d1b; font-family: Onest, system-ui, sans-serif; }
body[data-role="teacher"] .wrap.wide { max-width: 1180px; padding: 0 32px; }
.vt { --vt-ink: #1d1d1b; --vt-rule: #e1e1da; --vt-soft: #dcdcd5; --vt-muted: #55554f; --vt-field: #d6ebe4; --vt-on: #fff;
  font-family: Onest, system-ui, sans-serif; font-weight: 300; font-size: 15px; line-height: 1.5; color: var(--vt-ink); display: flex; flex-direction: column; gap: 32px; padding: 28px 0 48px; }
.vt b, .vt strong, .vt .b { font-weight: 600; }
.vt-mast { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--vt-ink); }
.vt-over { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.04em; }
.vt-h1 { margin: 2px 0 0; font-family: Onest, system-ui, sans-serif; font-weight: 700; font-size: 34px; line-height: 1.1; }
.vt-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vt-tools .chip { background: transparent; border: 1px solid var(--vt-ink); border-radius: 3px; box-shadow: none; color: var(--vt-ink); }
.vt-btn { height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--vt-ink); border-radius: 3px; background: transparent; color: var(--vt-ink); text-decoration: none; font: 400 15px Onest, system-ui, sans-serif; cursor: pointer; }
.vt-btn:active { box-shadow: inset 0 -3px 0 var(--vt-ink); }
.vt-top { display: flex; flex-wrap: wrap; gap: 32px; align-items: stretch; }
.vt-field { flex: 1 1 380px; padding: 24px 28px; background: var(--vt-field); border-radius: 3px; display: flex; flex-direction: column; gap: 8px; }
.vt-hero { font-family: Onest, system-ui, sans-serif; font-weight: 700; font-size: 76px; line-height: 1; }
.vt-field summary { cursor: pointer; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.vt-mono, .vt .m { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }
.vt-field .vt-mono { margin: 6px 0 0; font-size: 12.5px; line-height: 1.7; }
.vt-kv { flex: 1 1 420px; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--vt-ink); }
.vt-kv > div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--vt-rule); }
.vt-kv > div:nth-child(2n) { padding-left: 16px; border-left: 1px solid var(--vt-rule); }
.vt-kv dt { font-size: 14px; }
.vt-kv dd { margin: 2px 0 0; font-family: Onest, system-ui, sans-serif; font-weight: 500; font-size: 30px; }
.vt-kv small { font-size: 16px; }
.vt-sec { border-top: 2px solid var(--vt-ink); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.vt-sec h2 { margin: 0; font-family: Onest, system-ui, sans-serif; font-weight: 500; font-size: 20px; }
.vt-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.vt-note { font-size: 13.5px; color: var(--vt-muted); }
.vt-lead { margin: 0; font-size: 18px; font-weight: 400; }
.vt-bad { color: #9c3b26; font-weight: 600; }
:root[data-theme="dark"] .vt-bad { color: #f08a6e; }
.vt-stages { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); border: 1px solid var(--vt-ink); border-radius: 3px; overflow: hidden; }
.vt-stages button { min-height: 76px; padding: 8px; border: 0; border-right: 1px solid var(--vt-ink); background: transparent; color: var(--vt-muted); text-align: left; display: flex; flex-direction: column; gap: 2px; cursor: pointer; font: 300 13px/1.25 Onest, system-ui, sans-serif; }
.vt-stages button:last-child { border-right: 0; }
.vt-stages button.past { background: var(--vt-soft); color: var(--vt-ink); }
.vt-stages button.cur { background: var(--vt-on); color: var(--vt-ink); box-shadow: inset 0 -4px 0 var(--vt-ink); font-weight: 600; }
.vt-when { font-size: 12px; color: var(--vt-muted); }
.vt-scroll { overflow-x: auto; }
.vt-tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.vt-tbl th { text-align: left; font: 400 11.5px 'JetBrains Mono', monospace; text-transform: uppercase; padding: 8px; border-bottom: 1px solid var(--vt-ink); white-space: nowrap; background: transparent; color: var(--vt-ink); position: static; }
.vt-tbl td { padding: 10px 8px; border-bottom: 1px solid var(--vt-soft); white-space: nowrap; }
.vt-tbl th:first-child, .vt-tbl td:first-child { padding-left: 0; }
.vt-tbl .r { text-align: right; }
.vt-tbl tr.off td { color: var(--vt-muted); }
.vt-sev { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 13.5px; font-weight: 400; }
.vt-sev.good { background: #e4e4de; color: #141414; }
.vt-sev.mid { background: #ecd9a8; color: #4a3500; }
.vt-sev.low { background: #c9654c; color: #fff; }
.vt-sev.few { border: 1px dashed #8a8a82; color: var(--vt-muted); }
.vt-rel { letter-spacing: 2px; }
.vt-days { display: flex; gap: 6px; align-items: flex-end; min-height: 130px; border-bottom: 1px solid var(--vt-ink); padding-bottom: 6px; overflow-x: auto; }
.vt-days > div { flex: 1; min-width: 46px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.vt-days i { display: block; width: 100%; max-width: 34px; background: var(--vt-ink); border-radius: 2px 2px 0 0; }
@media (max-width: 760px) {
  body[data-role="teacher"] .wrap.wide { padding: 0 16px; }
  .vt-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vt-stages button { border-bottom: 1px solid var(--vt-ink); }
  .vt-hero { font-size: 60px; }
  .vt-kv { grid-template-columns: 1fr; }
  .vt-kv > div:nth-child(2n) { padding-left: 0; border-left: 0; }
}
body[data-role="teacher"] .band { background: #ecd9a8; color: #3b2a00; border-bottom: 1px solid #141414; }
.modal h2.disp, .sheet h2.disp, .spot-card h2.disp { text-transform: none; color: var(--ink); letter-spacing: 0.02em; font-size: 20px; }
@media (max-width: 420px) { .rank-t { display: none; } }
.rooms { align-items: start; }
@media (max-width: 400px) { .btn { font-size: 16px; letter-spacing: 0.01em; } }

.vt-todo { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.vt-todo li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--vt-soft); }
.vt-todo li:last-child { border-bottom: 0; }
.vt-todo li div { display: flex; flex-direction: column; gap: 2px; }
.vt-todo b { font-size: 17px; font-weight: 600; }
.vt-sign { font-size: 18px; line-height: 1.4; width: 18px; flex: none; }
.vt-sign.bad { color: #9c3b26; } .vt-sign.warn { color: #8a6200; } .vt-sign.ok { color: #2f6b45; }
:root[data-theme="dark"] .vt-sign.bad { color: #f08a6e; } :root[data-theme="dark"] .vt-sign.warn { color: #e3b75a; } :root[data-theme="dark"] .vt-sign.ok { color: #7fcf9b; }
.vt-link { color: var(--vt-ink); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; min-height: 32px; display: inline-flex; align-items: center; }
.vt-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.vt-kv4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vt-kv4 > div { padding-left: 16px; border-left: 1px solid var(--vt-rule); }
.vt-kv4 > div:first-child { padding-left: 0; border-left: 0; }
.vt-lesson { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 18px; font-size: 19px; line-height: 1.6; font-weight: 400; }
.vt-lesson li { padding-bottom: 14px; border-bottom: 1px dashed var(--vt-rule); }
.vt-blank { display: block; margin-top: 8px; font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--vt-muted); }
.vt-answers { margin: 0; padding-left: 24px; columns: 2; font-size: 15px; }
@media (max-width: 760px) { .vt-kv4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vt-kv4 > div:nth-child(3) { padding-left: 0; border-left: 0; } }
@media print { body[data-role="teacher"] { background: #fff; } .vt { color: #000; } .vt-lesson { font-size: 16pt; } }
.vt-tools .chip, :root[data-theme="light"] .vt-tools .chip { box-shadow: none; border: 1px solid var(--vt-ink); background: transparent; width: 44px; height: 44px; }
.vt-mast + .vt-sec { border-top: 0; padding-top: 4px; }
.vt-kv4 { flex: none; }

/* Вхід за іменами й конструктор імені */
.who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.who button { min-height: 118px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; padding: 10px 6px; border: 2px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); cursor: pointer; box-shadow: 0 3px 0 var(--btn2-sh); }
.who button .hand { font-size: 19px; line-height: 1.1; text-align: center; }
.who button .mono { font-size: 20px; }
.who button:active { transform: translateY(2px); }
.nick-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nick-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.nick-list button { min-height: 46px; padding: 6px 10px; border-radius: 6px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); font: 400 19px Neucha, cursive; text-align: left; cursor: pointer; }
.nick-list button[aria-pressed="true"] { background: var(--paper); color: var(--paper-ink); border-color: var(--yellow); }
.nick-list button[disabled] { opacity: 0.55; cursor: default; }
.nick-list small { font: 600 12px Onest, sans-serif; color: var(--muted); }
.nick-tag { text-decoration: none; transform: rotate(-2deg); max-width: 55%; }
.nick-tag .hand { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vt-nick { display: block; font: 300 13px Onest, system-ui, sans-serif; color: var(--vt-muted); }

.slots3.ghost span { opacity: 0.55; }
.vt-confirm { border: 1px solid var(--vt-ink); border-radius: 3px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.vt-confirm p { margin: 0; }
.vt-btn-ink { background: var(--vt-ink); color: #f5f5f2; }
:root[data-theme="dark"] .vt-btn-ink { color: #161614; }

.btn2.on-form { background: var(--paper); color: var(--paper-ink); box-shadow: inset 0 0 0 2px var(--yellow); }

.install { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 6px; background: var(--panel); border: 2px dashed var(--glass-line); }
.install-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; font-size: 16px; }
.install-steps svg { vertical-align: -3px; }

/* Реакції: роззирається, підстрибує від дотику, радіє */
.react { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; touch-action: manipulation; }
.react[disabled] { cursor: default; }
.cz-anim .cz-pupil { animation: look 7s ease-in-out infinite; }
@keyframes look { 0%, 38%, 62%, 100% { transform: translateX(0); } 44%, 50% { transform: translateX(-22%); } 54%, 58% { transform: translateX(22%); } }
.cz.boing { animation: boing 0.65s cubic-bezier(.3,1.7,.5,1) !important; }
@keyframes boing { 0% { transform: translateY(0) scale(1, 1); } 25% { transform: translateY(0) scale(1.12, 0.86); } 55% { transform: translateY(-26px) scale(0.92, 1.1); } 80% { transform: translateY(0) scale(1.06, 0.94); } 100% { transform: translateY(0) scale(1, 1); } }
.happy-wrap .cz { animation: happy 0.7s cubic-bezier(.3,1.6,.5,1) 0.8s 2 both, bob 3.2s ease-in-out 2.3s infinite; }
@keyframes happy { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-22px) rotate(-6deg); } 70% { transform: translateY(0) rotate(4deg); } }
.say { position: absolute; z-index: 40; width: 200px; transform: translateY(-100%); padding: 8px 12px; background: var(--paper); color: var(--paper-ink); font: 400 19px/1.25 Neucha, cursive; text-align: center; border-radius: 6px; box-shadow: 0 3px 0 rgba(0,0,0,0.35); pointer-events: none; animation: say 2.2s ease both; }
@keyframes say { 0% { opacity: 0; transform: translateY(-80%) scale(0.8); } 12%, 80% { opacity: 1; transform: translateY(-100%) scale(1); } 100% { opacity: 0; transform: translateY(-115%); } }

/* Гід із підсвічуванням */
.spot-veil { position: fixed; inset: 0; z-index: 30; }
.spot { position: fixed; z-index: 31; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(5,12,20,0.74); outline: 3px solid var(--yellow); outline-offset: 2px; pointer-events: none; animation: spotpulse 1.4s ease-in-out infinite; transition: all 0.3s ease; }
@keyframes spotpulse { 0%, 100% { outline-offset: 2px; } 50% { outline-offset: 7px; } }
.spot-card { position: fixed; z-index: 32; left: 16px; right: 16px; max-width: 448px; margin: 0 auto; background: var(--panel); color: var(--ink); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); animation: pop 0.3s cubic-bezier(.34,1.56,.64,1) both; }

/* Самостійні рухи числовиків */
.cz.act-hop { animation: acthop 0.9s cubic-bezier(.3,1.5,.5,1) !important; }
@keyframes acthop { 0%, 100% { transform: translateY(0) scale(1, 1); } 20% { transform: translateY(0) scale(1.08, 0.9); } 45% { transform: translateY(-16px) scale(0.95, 1.06); } 70% { transform: translateY(0) scale(1.04, 0.96); } }
.cz.act-tilt { animation: acttilt 0.9s ease-in-out !important; transform-origin: 50% 100%; }
@keyframes acttilt { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 60% { transform: rotate(7deg); } 85% { transform: rotate(-3deg); } }
.cz.act-dance { animation: actdance 1s ease-in-out !important; }
@keyframes actdance { 0%, 100% { transform: translateX(0) rotate(0); } 20% { transform: translateX(-6px) rotate(-5deg); } 40% { transform: translateX(6px) rotate(5deg) translateY(-6px); } 60% { transform: translateX(-6px) rotate(-5deg); } 80% { transform: translateX(4px) rotate(3deg) translateY(-4px); } }
/* Лічильник крапель підскакує */
.drops-chip.bump { animation: bump 0.6s cubic-bezier(.3,1.7,.5,1) 0.3s 2; }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.25); background: var(--teal); color: var(--on-teal); } }
/* Новий рівень: числовик світиться */
.lvl-glow { position: relative; display: inline-flex; justify-content: center; }
.lvl-glow::before { content: ''; position: absolute; inset: -20px; border-radius: 50%; background: radial-gradient(circle, rgba(242,181,68,0.55), transparent 65%); animation: glowpulse 1.2s ease-in-out infinite; }
.lvl-glow .cz { animation: happy 0.7s cubic-bezier(.3,1.6,.5,1) 0.3s 3 both !important; }
@keyframes glowpulse { 0%, 100% { opacity: 0.5; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.1); } }

.sent p.reading, .sent button.reading, .clues p.reading { background: rgba(242,181,68,0.22); border-radius: 4px; box-shadow: 0 0 0 4px rgba(242,181,68,0.22); }

.item.locked { cursor: pointer; }
.item.locked.trying { border-color: var(--yellow); border-style: solid; }
.try-l { font-size: 13px; font-weight: 700; color: var(--yellow); }
:root[data-theme="light"] .try-l { color: #8a5a10; }

/* ---------- Інші форми задач: загублене число, ланцюжок, Помилко, піраміда, ваги ---------- */
.pz-n, .pz-live { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; height: 50px; padding: 0 8px; border-radius: 6px; background: var(--board); border: 2px solid var(--board-frame); color: var(--chalk); font: 800 24px/1 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }
.pz-live, .pz-n.hole { background: transparent; border: 3px dashed #f2b544; color: #f2b544; }
.pz-live { min-width: 64px; }
.pz-op { font: 800 26px/1 'JetBrains Mono', monospace; color: var(--ink); padding: 0 2px; }
.pz-eq { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 18px 10px; border-radius: 6px; background: var(--panel); }
.pz-chain { display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 26px 6px 14px; border-radius: 6px; background: var(--panel); flex-wrap: nowrap; }
.pz-chain .pz-n, .pz-chain .pz-live { min-width: 50px; height: 46px; font-size: 21px; }
.pz-hop { position: relative; display: flex; flex-direction: column; align-items: center; color: var(--teal); width: 56px; margin-bottom: 30px; }
.pz-hop svg { width: 56px; height: 26px; }
.pz-hop b { position: absolute; top: -22px; font: 800 17px/1 'JetBrains Mono', monospace; color: var(--teal); }
.pz-fix { display: flex; align-items: center; gap: 10px; }
.pz-friend { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; transform: rotate(-4deg); }
.pz-friend .lbl { font-size: 14px; font-weight: 700; color: var(--muted); }
.pz-say { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pz-say b { font-size: 24px; font-family: 'JetBrains Mono', monospace; font-weight: 800; }
.pz-say s { color: var(--bad); text-decoration-thickness: 3px; }
.pz-say .muted { font-size: 17px; }
.pz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pz-opt { min-height: 76px; border-radius: 8px; border: 3px solid var(--line); background: var(--panel); color: var(--ink); font: 800 30px/1 'JetBrains Mono', monospace; cursor: pointer; box-shadow: 0 4px 0 var(--shadow); transition: transform 0.15s cubic-bezier(.34,1.56,.64,1); }
.pz-opt:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shadow); }
.pz-opt.on { background: var(--teal); border-color: var(--teal); color: var(--on-teal); transform: scale(1.04); }
.pz-opt.bad { opacity: 0.45; text-decoration: line-through; animation: shake 0.4s ease; cursor: default; }
.pz-pyr { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border-radius: 6px; background: var(--panel); }
.pz-row { display: flex; gap: 6px; }
.pz-row .pz-n, .pz-row .pz-live { min-width: 70px; height: 48px; border-radius: 4px; }
.pz-scales { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 14px 12px 64px; border-radius: 6px; background: var(--panel); }
.pz-pan { display: flex; align-items: flex-end; justify-content: center; gap: 6px; min-height: 64px; padding-bottom: 8px; border-bottom: 6px solid var(--wood); border-radius: 0 0 40px 40px; }
.pz-w { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 52px; padding: 0 6px; border-radius: 14px 14px 6px 6px; background: var(--wood); color: #fff8ea; font: 800 22px/1 'JetBrains Mono', monospace; }
.pz-w.hole { background: transparent; padding: 0; }
.pz-w.hole .pz-live { min-width: 56px; height: 52px; }
.pz-beam { position: absolute; left: 14%; right: 14%; bottom: 46px; height: 6px; border-radius: 3px; background: var(--muted); }
.pz-stand { position: absolute; left: 50%; bottom: 10px; width: 0; height: 0; transform: translateX(-50%); border-left: 22px solid transparent; border-right: 22px solid transparent; border-bottom: 36px solid var(--muted); }
.pz-n.hole { border-color: var(--faint); color: var(--muted); }
[data-theme="light"] .pz-live, [data-theme="light"] .pz-w.hole .pz-live { border-color: #b06d00; color: #8a5400; }
/* Знайдені сліди: світлий зелений текст на темно-зеленому, щоб число читалося. */
.clue.right { background: var(--ok-bg); border: 2px solid var(--ok); color: var(--ok); }
.pz-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pz-card { min-height: 88px; border-radius: 6px; border: 3px solid var(--board-frame); background: var(--board); color: var(--chalk); font: 800 24px/1.1 'JetBrains Mono', monospace; cursor: pointer; box-shadow: 0 4px 0 var(--shadow); transition: transform 0.15s cubic-bezier(.34,1.56,.64,1); }
.pz-card:nth-child(odd) { transform: rotate(-1.5deg); }
.pz-card:nth-child(even) { transform: rotate(1.2deg); }
.pz-card.on { border-color: #f2b544; box-shadow: 0 0 0 3px #f2b544, 0 4px 0 var(--shadow); transform: scale(1.04); }
.pz-card.bad { opacity: 0.45; text-decoration: line-through; cursor: default; }
.pz-seq { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; row-gap: 14px; padding: 22px 6px 16px; border-radius: 6px; background: var(--panel); }
.pz-seq .pz-n, .pz-seq .pz-live { min-width: 48px; height: 46px; font-size: 21px; border-radius: 50%; padding: 0 6px; }
.pz-seq .pz-live { min-width: 56px; }
.pz-arr { position: relative; color: var(--teal); font: 800 18px/1 'JetBrains Mono', monospace; padding: 0 3px; }
.pz-arr b { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 14px; }

/* Панель відповіді в задачах інших форм */
.abox { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: 6px; background: var(--panel); }
.abox-flask { width: 96px; height: 118px; position: relative; overflow: visible; }
.abox-flask .flask { position: absolute; left: 0; top: 0; margin: 0; transform: scale(0.457); transform-origin: top left; }
.abox-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.abox .num { font: 800 44px/1 'JetBrains Mono', monospace; text-align: center; font-variant-numeric: tabular-nums; padding-bottom: 2px; }
.abox-row { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 6px; align-items: center; }
.abox-row .lbl { text-align: left; font-size: 13px; }
.abox-row .btn2 { min-height: 48px; padding: 0 4px; font-family: 'JetBrains Mono', monospace; font-size: 17px; }
/* Числовик-кнопка: замість рамки фокусу — світіння навколо числовика */
.react:focus { outline: none; }
.react:focus-visible .cz { filter: drop-shadow(0 0 8px var(--yellow)); }
/* Задачі з малюнками: тарілки, ряди, поділи порівну */
.pz-art { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 10px; border-radius: 6px; background: var(--panel); }
.pz-pic { display: inline-flex; width: 24px; height: 24px; }
.pz-pic svg { width: 100%; height: 100%; }
.pz-plates { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pz-plate { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 3px; width: 92px; min-height: 64px; padding: 10px 8px; border-radius: 50%; background: #f5efe2; box-shadow: inset 0 0 0 5px #e3d8c3, 0 3px 0 rgba(0,0,0,0.25); }
.pz-plate.empty { width: 84px; min-height: 64px; }
.pz-plate.empty .pz-live { min-width: 48px; height: 40px; font-size: 20px; background: transparent; }
.pz-grid { display: grid; gap: 6px 4px; justify-content: center; padding: 8px; }
.pz-grid .pz-pic { width: 24px; height: 24px; }
.pz-pile { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 280px; padding: 10px 12px; border-radius: 6px; border: 2px dashed var(--faint); }
.pz-down { font: 800 22px/1 'JetBrains Mono', monospace; color: var(--teal); }
.pz-cap { margin: 0; font-weight: 700; color: var(--muted); }
.pz-plate { width: 96px; min-height: 84px; padding: 12px 10px; border-radius: 48px; }
.pz-plate .pz-pic { width: 22px; height: 22px; }
.pz-q { font: 800 22px/1 'JetBrains Mono', monospace; color: #b5a88e; }
.pz-cap.pz-ok { color: var(--ok); }
.pz-cap.pz-over { color: var(--bad); }
#pz-share { display: flex; flex-direction: column; align-items: center; gap: 8px; }
/* Ім'я в грі: два вибори, варіанти — у шторці */
.nick-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.picker { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 6px; min-height: 68px; padding: 8px 12px; border-radius: 6px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; box-shadow: 0 3px 0 var(--btn2-sh); }
.picker[disabled] { opacity: 0.55; cursor: default; }
.picker.set { border-color: var(--yellow); }
.picker-k { grid-column: 1 / -1; font: 700 12px/1.2 Onest, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.picker-v { font: 400 21px/1.2 Neucha, cursive; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker:not(.set) .picker-v { color: var(--muted); }
.picker-c { color: var(--muted); }
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pick-tile { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 52px; padding: 6px 12px; border-radius: 6px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); font: 400 20px/1.15 Neucha, cursive; text-align: left; cursor: pointer; }
.pick-tile[aria-pressed="true"] { background: var(--paper); color: var(--paper-ink); border-color: var(--yellow); }
.pick-tile[disabled] { opacity: 0.5; cursor: default; }
.pick-tile small { font: 600 12px Onest, sans-serif; color: var(--muted); }
/* Табличка відділу: латунна, з двома гвинтиками — як на дверях лабораторії */
.dept { position: relative; align-self: flex-start; display: inline-flex; align-items: center; padding: 5px 22px 6px; background: #d9ad4f; border: 2px solid #8a6420; border-radius: 3px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 2px 0 rgba(0,0,0,0.3); font: 400 14px/1 'Dela Gothic One', sans-serif; letter-spacing: 0.08em; color: #4a3008; transform: rotate(-1.5deg); }
.dept::before, .dept::after { content: ''; position: absolute; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #8a6420; box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); }
.dept::before { left: 7px; } .dept::after { right: 7px; }
.dept.sm { padding: 4px 18px 5px; font-size: 12px; transform: rotate(2deg); }
.dept.sm::before { left: 6px; } .dept.sm::after { right: 6px; }
/* Гроші: монети круглі, купюри прямокутні */
.pz-coin, .pz-note { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; background: var(--m-bg); color: var(--m-ink); border: 2px solid var(--m-ink); font-family: 'JetBrains Mono', monospace; line-height: 1; padding: 0; cursor: default; }
.pz-coin { width: 46px; height: 46px; border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(255,255,255,0.35), 0 2px 0 rgba(0,0,0,0.3); }
.pz-note { width: 66px; height: 40px; border-radius: 4px; box-shadow: inset 0 0 0 3px rgba(255,255,255,0.3), 0 2px 0 rgba(0,0,0,0.3); }
.pz-coin b, .pz-note b { font-size: 17px; font-weight: 800; }
.pz-coin small, .pz-note small { font: 700 9px/1 Onest, sans-serif; }
button.pz-coin, button.pz-note { cursor: pointer; transition: transform 0.15s cubic-bezier(.34,1.56,.64,1); }
button.pz-coin:active, button.pz-note:active { transform: scale(0.9); }
.pz-purse { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; min-height: 52px; }
.pz-wal { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 6px; background: #6b4627; color: #f6e7cf; box-shadow: inset 0 -4px 0 #4a2f1b; }
.pz-wal-h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.pz-wal-h b { font-size: 24px; color: #fff3dc; }
.pz-wal .pz-purse { padding: 8px; border-radius: 4px; background: #563620; border: 2px dashed #8a6440; }
.pz-wal .muted { color: #d8c2a2; font-size: 15px; }
.pz-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 4px 0; }
.pz-tray .pz-coin { width: 54px; height: 54px; }
.pz-tray .pz-note { width: 74px; height: 46px; }
.pz-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pz-tag { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 14px 8px 20px; background: var(--paper); color: var(--paper-ink); border-radius: 4px 14px 14px 4px; font: 400 19px/1.1 Neucha, cursive; position: relative; transform: rotate(-2deg); }
.pz-tag::before { content: ''; position: absolute; left: 7px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--panel); }
.pz-tag b { font: 800 18px 'JetBrains Mono', monospace; }
.pz-paid { display: flex; align-items: center; gap: 8px; }
/* Годинник */
.pz-clocks { display: flex; align-items: center; justify-content: center; gap: 4px; }
.pz-cl { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pz-clock { width: 128px; height: 128px; }
.cl-face { fill: #fbf6ea; stroke: #6b4627; stroke-width: 3; }
.cl-ticks line { stroke: #6b4627; }
.cl-num text { font: 700 10px Onest, sans-serif; fill: #2a2016; }
.cl-h { stroke: #2a2016; } .cl-m { stroke: #d2453b; } .cl-dot { fill: #2a2016; }
.cl-q { font: 800 30px 'JetBrains Mono', monospace; fill: #b06d00; }
.pz-hm { font-size: 16px; font-weight: 800; }
.pz-arr2 { display: flex; flex-direction: column; align-items: center; font: 800 15px/1.2 'JetBrains Mono', monospace; color: var(--teal); min-width: 44px; text-align: center; }
.pz-tray { flex-direction: column; align-items: center; gap: 10px; }
.pz-tray > div { display: flex; gap: 10px; justify-content: center; }
/* Геометрія і величини */
.pz-geo { width: 100%; max-width: 320px; height: auto; }
.g-line { fill: none; stroke: var(--teal); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.g-dot { fill: var(--panel); stroke: var(--teal); stroke-width: 3; }
.g-fig { fill: rgba(71, 211, 224, 0.12); stroke: var(--teal); stroke-width: 4; stroke-linejoin: round; }
.g-tick { stroke: var(--ink); stroke-width: 2; }
.g-lbl text { font: 700 15px 'JetBrains Mono', monospace; fill: var(--ink); }
.g-seg { stroke: #d2453b; stroke-width: 5; stroke-linecap: round; }
.g-guide { stroke: #d2453b; stroke-width: 1.5; stroke-dasharray: 3 3; }
.r-body { fill: #f2d48a; stroke: #9a6a17; stroke-width: 2; }
.r-ticks line { stroke: #4a3008; stroke-width: 1.2; }
.r-ticks text { font: 700 9px Onest, sans-serif; fill: #4a3008; }
.pz-dm { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pz-strip { display: flex; align-items: center; gap: 8px; }
.pz-strip span { display: flex; border: 2px solid #9a6a17; border-radius: 3px; background: #f2d48a; }
.pz-strip i { width: 18px; height: 16px; border-right: 1px solid #c9a24f; }
.pz-strip i:last-child { border-right: 0; }
.pz-strip.loose span { background: #fbe9b8; border-style: dashed; }
.pz-strip b { font: 800 14px 'JetBrains Mono', monospace; color: var(--muted); }
.pz-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; background: #57c46b; color: #0f2a14; font: 400 17px/1 Neucha, cursive; }
.pz-item .pz-live { min-width: 48px; height: 40px; font-size: 19px; background: #f5efe2; }
.pz-w small { font: 700 10px Onest, sans-serif; margin-left: 2px; }
.pz-jars { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.pz-jar { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pz-jar svg { width: 40px; height: 56px; }
.pz-jar.big svg { width: 70px; height: 80px; }
.pz-jar.big .pz-live { position: absolute; top: 22px; min-width: 52px; height: 40px; font-size: 19px; }
.pz-jar b { font: 800 14px 'JetBrains Mono', monospace; }
.j-glass { fill: var(--glass); stroke: var(--muted); stroke-width: 2.5; }
.j-water { fill: #47a7e0; opacity: 0.85; }
.pz-barrel { display: flex; align-items: center; gap: 14px; }
.pz-barrel svg { width: 96px; height: 120px; flex: none; }
.pz-blbl { display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.pz-blbl b { font: 800 18px 'JetBrains Mono', monospace; }
.pz-blbl .pz-live { min-width: 52px; height: 40px; font-size: 19px; margin-left: 4px; }
.pz-dm.two { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 12px; justify-content: center; }
.pz-dm.two .pz-strip i { width: 11px; height: 14px; }
.pz-dm.two .pz-strip b { font-size: 12px; }
.pz-scales.kgs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.pz-scales.kgs .pz-pan { flex-wrap: wrap; align-content: flex-end; gap: 4px; }
.pz-scales.kgs .pz-w { min-width: 40px; height: 40px; font-size: 17px; border-radius: 10px 10px 5px 5px; }
.pz-scales.kgs .pz-item { flex-direction: column; font-size: 15px; padding: 5px 6px; }

/* Код входу вчительки */
.h2 { margin: 0; font-size: 19px; font-weight: 800; }
.secret { display: block; font-size: 26px; font-weight: 800; letter-spacing: .08em; word-break: break-all; padding: 10px 12px; border: 2px dashed currentColor; border-radius: 10px; user-select: all; }
@media print { .secret-box { border: 2px solid #000; } }

/* Аркуш задач для уроку (екран і папір). Аркуш отримують діти, тому він у стилі гри: заокруглено, Onest, товсті м'які рамки. */
.vt-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.vt-tabs .vt-btn { border-radius: 999px; padding: 0 18px; }
.vt-btn.on, .ws-num { background: var(--vt-ink); color: #f5f5f2; }
.ws-who { display: flex; flex-wrap: wrap; gap: 8px 32px; font: 500 17px Onest, system-ui, sans-serif; padding: 12px 0; }
.ws-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ws-task { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 2px solid var(--vt-ink); border-radius: 20px; font-family: Onest, system-ui, sans-serif; break-inside: avoid; page-break-inside: avoid; }
.ws-top { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; }
.ws-num { display: inline-flex; flex: none; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; font: 800 16px Onest, system-ui, sans-serif; }
.ws-say, .ws-q { margin: 0; font-size: 17px; line-height: 1.45; }
.ws-q b { font-weight: 700; }
.ws-board { color: var(--ink); background: var(--panel); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; align-items: center; }
.ws-board .pz-live { min-width: 44px; }
.ws-opts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ws-hint { width: 100%; font-size: 15px; color: var(--vt-muted); }
.ws-box { min-width: 60px; padding: 8px 14px; text-align: center; border: 2px solid var(--vt-ink); border-radius: 999px; font: 700 18px Onest, system-ui, sans-serif; }
.ws-task .vt-blank { font: 500 17px Onest, system-ui, sans-serif; color: var(--vt-ink); }
@media print {
  .ws-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ws-task { border-color: #000; padding: 12px; }
  .ws-num { background: #000; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ws-board { background: #fff; color: #000; border: 1.5px solid #bbb; }
  /* Менше фарби: числа й гирі — білі з чорним контуром. */
  .ws-board .pz-n, .ws-board .pz-w { background: #fff !important; color: #000 !important; border: 2px solid #000 !important; box-shadow: none !important; }
  .ws-board .pz-live { color: #000 !important; border-color: #000 !important; }
  .ws-key { break-before: page; page-break-before: always; }
  @page { margin: 12mm; }
}

/* Кабінет учительки: простіше і світліше. Тонкі світлі лінії, м'які кути, без тіней і без стилю лабораторії. */
.vt { font-weight: 400; }
.vt-mast { border-bottom: 1px solid var(--vt-rule); }
.vt-sec { border-top: 1px solid var(--vt-rule); }
.vt-h1 { font-weight: 700; letter-spacing: -0.01em; }
.vt-sec h2 { font-weight: 600; }
.vt-kv { border-top: 1px solid var(--vt-rule); }
.vt-kv dd { font-weight: 600; }
.vt-btn, .vt-tools .chip { border: 1px solid #cfcfc8; border-radius: 10px; background: #fff; }
.vt-btn:hover { border-color: var(--vt-ink); }
.vt-btn.on, .ws-num { background: var(--vt-ink); color: #fff; border-color: var(--vt-ink); }
.vt-field { border-radius: 16px; }
.vt-stages { border: 1px solid var(--vt-rule); border-radius: 14px; background: #fff; }
.vt-stages button { border-right: 1px solid var(--vt-rule); }
.vt-days { border-bottom: 1px solid var(--vt-rule); }
.vt-days i { border-radius: 4px 4px 0 0; }
.vt-tbl th { border-bottom: 1px solid var(--vt-rule); color: var(--vt-muted); }
/* Вхід, картки й «Код входу» в кабінеті — ті самі світлі елементи. */
body[data-role="teacher"] .disp { font-family: Onest, system-ui, sans-serif; font-weight: 700; letter-spacing: -0.01em; }
body[data-role="teacher"] .panel { background: #fff; border: 1px solid #e1e1da; border-radius: 16px; color: #1d1d1b; }
body[data-role="teacher"] .btn { background: #1d1d1b; color: #fff; border-radius: 12px; box-shadow: none !important; font: 600 17px Onest, system-ui, sans-serif; letter-spacing: 0; }
body[data-role="teacher"] .btn2 { background: #fff; color: #1d1d1b; border: 1px solid #cfcfc8; border-radius: 12px; box-shadow: none !important; }
body[data-role="teacher"] .btn:active, body[data-role="teacher"] .btn2:active { transform: none; box-shadow: none; }
body[data-role="teacher"] .chip { background: #fff; color: #1d1d1b; border: 1px solid #cfcfc8; border-radius: 10px; box-shadow: none !important; }
body[data-role="teacher"] .field input { background: #fff; color: #1d1d1b; border: 1px solid #cfcfc8; border-radius: 10px; }
body[data-role="teacher"] .field input:focus { outline: 2px solid #1d1d1b; outline-offset: 1px; }
body[data-role="teacher"] .muted, body[data-role="teacher"] .link { color: #5c5c56; }
body[data-role="teacher"] .secret { border: 1.5px dashed #8a8a82; }
/* Аркуш задач — у стилі кабінету: світлі рамки, м'які кути. */
.ws-task { border: 1px solid #cfcfc8; border-radius: 14px; background: #fff; }
.ws-board { background: transparent; color: #1d1d1b; padding: 0; }
.ws-box { border: 1px solid #8a8a82; border-radius: 10px; font-weight: 600; }
.ws-num { font-weight: 700; font-size: 15px; width: 30px; height: 30px; }
.ws-top { font-weight: 700; }

/* Верхня панель дитини (звання, серія, енергія, звук) завжди видима на телефоні. */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
body[data-role="teacher"] .top { position: static; margin: 0; padding-left: 0; padding-right: 0; background: transparent; }
@media print { .top { position: static; } }

/* Гід відкритий — сторінка не гортається, рамка й картка не зсуваються. */
html.guide-on, html.guide-on body { overscroll-behavior: none; }
.spot-veil { touch-action: none; }
.spot-card { max-height: calc(100vh - 24px); overflow: auto; overscroll-behavior: contain; }
.mission { display: flex; flex-direction: column; gap: 12px; }
.mission .kolba { margin: 0; }
.install.flat { background: transparent; padding: 0; border: 0; box-shadow: none; }
.panel.cond p { font-size: 16px; margin: 0 0 6px; }
.panel.cond .plan { margin-top: 8px; }

/* Підказка на назві замість абзацу-пояснення */
.tip[data-tip] { display: inline-flex; align-items: baseline; gap: 6px; border-bottom: 0; outline: none; }
.tip-q { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #c9c9c1; color: #6b6b63; font: 600 12px/1 Onest, sans-serif; transform: translateY(-2px); flex: none; }
.tip[data-tip]::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 8px); z-index: 40; width: max-content; max-width: min(320px, 80vw);
  padding: 10px 12px; border-radius: 12px; background: #24241f; color: #fff; font: 400 14px/1.45 Onest, sans-serif; letter-spacing: 0; text-transform: none; white-space: normal;
  opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.tip[data-tip]:hover::after, .tip[data-tip].open::after, .tip[data-tip]:focus-visible::after { opacity: 1; }
.tip[data-tip]:focus-visible .tip-q { border-color: #24241f; color: #24241f; }
@media print { .tip-q, .tip[data-tip]::after { display: none; } }

/* Головна кнопка «Грати»: завжди видно над нижнім меню, навіть коли колба займає весь екран */
.play-bar { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 4; padding: 6px 0; margin: -6px 0; }
.btn-play { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; font-size: 22px; letter-spacing: 0.08em; }
.btn-play svg { flex: none; }
/* Заряд енергії: смужка замість тексту «найбільше можна мати» */
.charge { display: flex; align-items: center; gap: 10px; }
.charge .bar { flex: 1; height: 14px; }
.charge .bar i { background: var(--yellow); }
.prize { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--bg2); }
.prize .cz { width: 56px; flex: none; }
.prize.on { outline: 2px solid var(--ok, #4caf7a); }
/* Закрита тема, яку дитина відкриває сама: смужка «2 / 3» до сходинки 2 попередньої теми */
.room-bar { display: block; width: 70%; height: 6px; margin: 4px auto 0; border-radius: 3px; background: var(--line); overflow: hidden; }
.room-bar i { display: block; height: 100%; background: var(--yellow); }
/* Порожній рядок помилки не робить дірки між полем і кнопкою */
body[data-role="teacher"] .err:empty { display: none; }
body[data-role="teacher"] form .btn { margin-top: 10px; }
/* Ряд з 5 чисел стоїть в одному рядку навіть на вузькому телефоні */
.pz-seq { flex-wrap: nowrap; padding-left: 4px; padding-right: 4px; }
.pz-seq .pz-n, .pz-seq .pz-live { flex: 0 1 46px; min-width: 0; width: 46px; height: 46px; padding: 0; font-size: 18px; }
.pz-seq .pz-arr { flex: none; padding: 0 2px; font-size: 14px; }
.pz-seq .pz-arr b { font-size: 13px; top: -17px; }
/* Бочка в задачі «Літри»: дерево, обручі, шкала, вода і те, що дитина доливає */
.pz-barrel svg { width: 112px; height: 130px; }
.b-wood { fill: #c08a4e; stroke: #6b4627; stroke-width: 3; }
.b-hoop { stroke: #5a3a1f; stroke-width: 4; }
.b-add { fill: #9fd4f2; opacity: 0.9; stroke: #47a7e0; stroke-width: 1.5; stroke-dasharray: 4 3; }
.b-over { fill: #f2a3a3; opacity: 0.9; }
.b-lbl { font: 700 10px 'JetBrains Mono', monospace; fill: #2b1a0c; }
.b-have { fill: #fff; }
.b-warn { color: var(--bad); font-weight: 700; }
/* Заряд енергії — 10 поділок */
.cells { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.cells span { height: 16px; border-radius: 4px; background: var(--line); }
.cells span.on { background: var(--yellow); box-shadow: inset 0 -3px 0 var(--yellow-sh); }
/* Банка дня: зірка ×2 над банкою */
.room { position: relative; }
.room-day { position: absolute; top: -6px; right: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; background: var(--yellow); color: #2b1a0c; font: 800 12px/1.3 Onest, sans-serif; box-shadow: 0 2px 0 var(--yellow-sh); }
.shelf-link { display: block; text-decoration: none; }
/* Нагадування про Виклики: фіолетова плашка */
.ch-note { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: #2a2140; color: #e6dcf8; font-size: 15px; }
:root[data-theme="light"] .ch-note { background: #efe8fb; color: #3b2a63; }
/* Виклик у шторці банки */
.ch-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: #2a2140; border: 2px solid #6b4fa8; color: #efe8fb; }
.ch-rules { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.ch-btn { background: #c9a6ff !important; color: #1d1230 !important; box-shadow: 0 5px 0 #7a5bb8 !important; }
.ch-lack { font-size: 13px; color: #cdbbee; }
:root[data-theme="light"] .ch-box { background: #f3edfd; color: #2a1d4a; }
:root[data-theme="light"] .ch-lack { color: #5b4a80; }
/* Клас: спільна мета й тиждень */
.goal { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--paper); color: var(--paper-ink); }
.goal .bar { background: #d8c9a6; } .goal .bar i { background: var(--yellow-sh); }
.lb { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 4px 12px; border-radius: 14px; background: var(--panel); border: 2px solid transparent; }
.lb-row.me { border-color: var(--yellow); background: var(--panel2); }
.lb-place { width: 24px; font: 700 15px 'JetBrains Mono', monospace; color: var(--muted); }
.lb-place.top { color: var(--yellow); }
.lb-nick { flex: 1; font-size: 19px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-none { width: 36px; height: 40px; }
.lb-ava { width: 40px; height: 48px; flex: none; position: relative; }
.lb-ava .cz { position: absolute; left: 0; top: -4px; transform: scale(0.66); transform-origin: top left; }
.goal h2, .goal .disp { color: var(--paper-ink) !important; }

/* ---------- Комп'ютер і планшет (з 18.11.2026) ----------
   На телефоні все як було: одна колонка й меню внизу.
   Від 760 px: ширша колонка. Від 1000 px: меню зліва, дві колонки в лабораторії, картці числовика й класі. */
.lab-l, .lab-r, .card-l, .card-r { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 760px) {
  body[data-role="kid"] .wrap { max-width: 720px; padding: 0 24px; }
  body[data-role="kid"] .grid3 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  body[data-role="kid"] .items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-role="kid"] .top { margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
}
@media (min-width: 1000px) {
  body[data-role="kid"] #app { display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; }
  body[data-role="kid"] #app > .band { grid-column: 1 / -1; }
  body[data-role="kid"] #app > .wrap { grid-column: 2; grid-row: 2; max-width: 1120px; width: 100%; padding: 0 40px; min-height: 100vh; }
  body[data-role="kid"] #app:not(:has(> .nav)) > .wrap { grid-column: 1 / -1; max-width: 880px; }
  body[data-role="kid"] .top { margin: 0 -40px; padding-left: 40px; padding-right: 40px; }
  /* Меню зліва: вертикальна колонка на всю висоту. */
  body[data-role="kid"] #app > .nav { grid-column: 1; grid-row: 2; position: sticky; top: 0; height: 100vh; flex-direction: column; justify-content: flex-start; gap: 6px; padding: 20px 12px; border-top: 0; border-right: 1px solid var(--line); }
  body[data-role="kid"] .nav a { flex: none; max-width: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; font-size: 16px; min-height: 52px; }
  body[data-role="kid"] .nav .dot { top: 10px; right: 10px; }
  /* «Грати» без нижнього меню: просто внизу екрана. */
  body[data-role="kid"] .play-bar { bottom: 16px; }
  /* Лабораторія: зліва числовик і «Грати», справа банки й знахідки. */
  .screen.lab { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 32px; align-items: start; }
  .screen.lab .lab-l { position: sticky; top: 76px; }
  /* Картка числовика: зліва числовик і досвід, справа одяг і навички. */
  .screen.cardv { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 32px; align-items: start; }
  .screen.cardv .card-l { position: sticky; top: 76px; }
  /* Клас: зліва мета й рекорди, справа тиждень. */
  .screen.cls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-areas: "h h" "goal week" "rec week" ". week"; gap: 20px 32px; align-items: start; }
  .cls-h { grid-area: h; } .cls-goal { grid-area: goal; } .cls-week { grid-area: week; } .cls-rec { grid-area: rec; }
  /* Пригода: ширша дошка і колба. */
  .screen.playv { max-width: 760px; margin: 0 auto; width: 100%; }
  .sheet { width: 520px; left: calc(50% - 260px + 116px); right: auto; }
  .modal { max-width: 480px; }
}
.nav-brand { display: none; }
@media (min-width: 1000px) {
  body[data-role="kid"] .nav-brand { display: block; padding: 6px 14px 18px; font: 400 17px/1.2 'Dela Gothic One', sans-serif; color: var(--yellow); letter-spacing: 0.02em; }
  .coach { gap: 14px; }
}
@media (min-width: 1000px) {
  /* Пригода на комп'ютері: кнопка «Перевірити» одразу під колбою, а не внизу екрана. */
  body[data-role="kid"] #app:not(:has(> .nav)) > .wrap { min-height: auto; }
  .screen.playv { flex: none; }
  .screen.playv .row[style*="margin-top:auto"] { margin-top: 8px !important; }
}

/* Без коду класу: короткі пункти на картці вибору */
.facts { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }

/* ================= Кабінет учительки 2.0 (19.11.2026): акаунт, класи, вкладки, тема ================= */
body[data-role="teacher"] { --t-bg: #fafaf7; --t-surface: #fff; --t-line: #cfcfc8; --t-ok: #1d7445; --t-warn: #8a5200; --t-bad: #b42d22; --t-ok-soft: #e2f1e8; --t-warn-soft: #f8ecdc; --t-bad-soft: #f8e5e2; --t-pop: 0 12px 32px rgba(21, 23, 26, 0.16); }
.vt2 { gap: 24px; padding-top: 0; }
.vt-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--vt-rule); }
.vt-brand { font: 600 12px 'JetBrains Mono', monospace; letter-spacing: 0.04em; color: var(--vt-ink); text-decoration: none; }
.vt2 .grow, .vt-menu .grow { flex: 1 1 auto; }
.vt-btn { gap: 8px; justify-content: center; white-space: nowrap; }
.vt-btn.sm { height: 36px; font-size: 14px; padding: 0 10px; }
.vt-btn.ink { background: var(--vt-ink); color: var(--t-bg); border-color: var(--vt-ink); font-weight: 600; }
.vt-btn.ghost { border-color: transparent; background: transparent; }
.vt-btn.wide { width: 100%; }
.vt-btn.bad, .vt-menu .bad { color: var(--t-bad); }
.vt-btn.bad { border-color: var(--t-bad); }
.vt-btn svg { flex: none; }
.vt-pick { position: relative; }
.vt-pick > summary { list-style: none; cursor: pointer; }
.vt-pick > summary::-webkit-details-marker { display: none; }
.vt-menu { position: absolute; left: 0; top: calc(100% + 6px); min-width: 260px; max-height: 70vh; overflow: auto; z-index: 30; background: var(--t-surface); border: 1px solid var(--vt-ink); border-radius: 10px; box-shadow: var(--t-pop); padding: 6px; display: flex; flex-direction: column; }
.vt-pick.right .vt-menu { left: auto; right: 0; }
.vt-menu a, .vt-menu button { min-height: 44px; display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--vt-ink); font: 400 15px Onest, system-ui, sans-serif; text-decoration: none; text-align: left; cursor: pointer; }
.vt-menu a:hover, .vt-menu button:hover { background: var(--vt-soft); }
.vt-menu .cur { font-weight: 600; }
.vt-menu hr { border: 0; border-top: 1px solid var(--vt-rule); margin: 6px 0; width: 100%; }
.vt-av { width: 32px; height: 32px; border-radius: 50%; background: var(--vt-soft); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.vt-tabs2 { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 2px solid var(--vt-ink); margin-top: -8px; }
.vt-tabs2 a { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; color: var(--vt-muted); text-decoration: none; font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.vt-tabs2 a[aria-current="page"] { color: var(--vt-ink); border-bottom-color: var(--vt-ink); }
.vt-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.vt-col { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.vt2 .vt-row { align-items: center; }
.vt-h2 { margin: 0; flex: 1 1 auto; font: 600 19px/1.3 Onest, system-ui, sans-serif; }
.vt-h3 { margin: 0; font: 600 16px Onest, system-ui, sans-serif; }
.vt-status { padding: 12px 14px; border-radius: 10px; font-size: 14.5px; }
.vt-status.ok { background: var(--t-ok-soft); } .vt-status.warn { background: var(--t-warn-soft); } .vt-status.bad { background: var(--t-bad-soft); }
.vt-card { background: var(--t-surface); border: 1px solid var(--vt-rule); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 12px; color: var(--vt-ink); }
.vt-cardbtn { text-align: left; font: inherit; cursor: pointer; width: 100%; text-decoration: none; }
.vt-cardbtn:hover { border-color: var(--vt-ink); }
.vt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.vt-login { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 16px; }
.vt-login > .vt-card { flex: 0 1 440px; padding: 28px; gap: 16px; }
.vt-login-side { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }
.vt-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.vt-form { display: flex; flex-direction: column; gap: 14px; }
.vt-lbl { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.vt-in { min-height: 44px; width: 100%; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--t-line); border-radius: 10px; background: var(--t-surface); color: var(--vt-ink); font: 400 16px Onest, system-ui, sans-serif; }
.vt-in:focus { outline: 2px solid var(--vt-ink); outline-offset: 1px; }
textarea.vt-in { padding: 10px 12px; line-height: 1.5; resize: vertical; min-height: 132px; }
.vt-in.code { font: 600 24px 'JetBrains Mono', monospace; letter-spacing: 0.3em; }
.vt-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.vt-chip.ok { background: var(--t-ok-soft); color: var(--t-ok); } .vt-chip.warn { background: var(--t-warn-soft); color: var(--t-warn); } .vt-chip.bad { background: var(--t-bad-soft); color: var(--t-bad); } .vt-chip.mute { background: var(--vt-soft); color: var(--vt-muted); }
.vt-code6 { font: 700 44px/1 'JetBrains Mono', monospace; letter-spacing: 0.06em; }
.vt-code6.sm { font-size: 24px; }
.vt-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.vt-seg button { min-height: 36px; padding: 0 12px; border: 1px solid var(--t-line); border-radius: 999px; background: var(--t-surface); color: var(--vt-ink); font: 500 14px Onest, system-ui, sans-serif; cursor: pointer; }
.vt-seg button[aria-pressed="true"] { background: var(--vt-ink); color: var(--t-bg); border-color: var(--vt-ink); }
.vt-seg b { font-family: 'JetBrains Mono', monospace; font-weight: 600; margin-left: 6px; }
.vt-controls { display: flex; flex-direction: column; gap: 12px; }
.vt-search { position: relative; flex: 1 1 280px; min-width: 0; }
.vt-search svg { position: absolute; left: 12px; top: 13px; color: var(--vt-muted); }
.vt-search .vt-in { padding-left: 40px; }
.vt-strong { font-weight: 600; color: var(--vt-ink); }
.vt-todo2 { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-top: 2px solid var(--vt-ink); }
.vt-todo2 li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0; border-bottom: 1px solid var(--vt-rule); }
.vt-todo2 li > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; }
.vt-todo2 b { font-size: 16px; }
.vt-plist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.vt-plist li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--vt-rule); }
.vt-side { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); z-index: 60; background: var(--t-bg); color: var(--vt-ink); border-left: 1px solid var(--vt-ink); padding: 24px; display: flex; flex-direction: column; gap: 16px; overflow: auto; box-sizing: border-box;
  --vt-ink: #1d1d1b; --vt-rule: #e1e1da; --vt-soft: #ecece6; --vt-muted: #55554f; --vt-field: #d6ebe4; font-family: Onest, system-ui, sans-serif; }
.vt-narrow { max-width: 820px; margin: 0 auto; }
.vt-doc { display: flex; flex-direction: column; gap: 24px; background: var(--t-surface); border: 1px solid var(--vt-rule); border-radius: 14px; padding: 32px 36px; }
.vt-doc-head { display: flex; flex-direction: column; gap: 6px; border-bottom: 2px solid var(--vt-ink); padding-bottom: 16px; }
.vt-doc-foot { border-top: 1px solid var(--vt-rule); padding-top: 12px; }
.vt-kv3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vt-kv3 > div { padding-left: 14px; border-left: 1px solid var(--vt-rule); }
.vt-kv3 > div:first-child { padding-left: 0; border-left: 0; }
.vt-doc details summary { cursor: pointer; }
.vt2 .tip-q { border-color: var(--t-line); color: var(--vt-muted); }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .vt-login > .vt-card { padding: 20px; }
  .vt-doc { padding: 20px 18px; }
  .vt-kv3 { grid-template-columns: 1fr; } .vt-kv3 > div { padding-left: 0; border-left: 0; }
  .vt-code6 { font-size: 36px; }
  .vt-menu { min-width: 240px; }
}
@media print { .vt-side, .vt-top .vt-pick, .vt-tabs2 { display: none; } .vt-doc { border: 0; padding: 0; } }

/* Темна тема кабінету: ті самі ролі кольорів, що в BP Core. */
:root[data-theme="dark"] body[data-role="teacher"] { background: #121315; color: #eceef1; --t-bg: #121315; --t-surface: #1a1c1f; --t-line: #3a3e45; --t-ok: #6dcf98; --t-warn: #eaa65a; --t-bad: #f2908a; --t-ok-soft: #17291f; --t-warn-soft: #2c2317; --t-bad-soft: #301c1a; --t-pop: 0 12px 32px rgba(0, 0, 0, 0.55); }
:root[data-theme="dark"] .vt, :root[data-theme="dark"] .vt-side { --vt-ink: #eceef1; --vt-rule: #2c3035; --vt-soft: #24272b; --vt-muted: #a3a9b1; --vt-field: #1f3a33; --vt-on: #1a1c1f; }
:root[data-theme="dark"] .vt-btn, :root[data-theme="dark"] .vt-tools .chip { background: #1a1c1f; border-color: #3a3e45; color: #eceef1; }
:root[data-theme="dark"] .vt-btn.ghost { background: transparent; border-color: transparent; }
:root[data-theme="dark"] .vt-btn.ink, :root[data-theme="dark"] .vt-btn.on { background: #eceef1; color: #121315; border-color: #eceef1; }
:root[data-theme="dark"] .vt-stages { background: #1a1c1f; }
:root[data-theme="dark"] .vt-sev.good { background: #24272b; color: #eceef1; }
:root[data-theme="dark"] .vt-sev.mid { background: #3a2d12; color: #f0cf8a; }
:root[data-theme="dark"] .vt-sev.low { background: #7a3326; color: #fff; }
:root[data-theme="dark"] body[data-role="teacher"] .panel { background: #1a1c1f; border-color: #2c3035; color: #eceef1; }
:root[data-theme="dark"] body[data-role="teacher"] .btn { background: #eceef1; color: #121315; }
:root[data-theme="dark"] body[data-role="teacher"] .btn2, :root[data-theme="dark"] body[data-role="teacher"] .chip, :root[data-theme="dark"] body[data-role="teacher"] .field input { background: #1a1c1f; color: #eceef1; border-color: #3a3e45; }
:root[data-theme="dark"] body[data-role="teacher"] .field input:focus { outline-color: #eceef1; }
:root[data-theme="dark"] body[data-role="teacher"] .muted, :root[data-theme="dark"] body[data-role="teacher"] .link { color: #a3a9b1; }
:root[data-theme="dark"] body[data-role="teacher"] .band { background: #3a2d12; color: #f0cf8a; border-bottom-color: #3a3e45; }
:root[data-theme="dark"] .ws-task { background: #1a1c1f; border-color: #3a3e45; }
:root[data-theme="dark"] .ws-board { color: #eceef1; }
@media print { :root[data-theme="dark"] body[data-role="teacher"] { background: #fff; color: #000; } }
.vt-login-side .vt-field, .vt-side .vt-field, .vt-doc .vt-field { flex: none; }
/* Друга кнопка всередині картки не зливається з карткою: світліша площина і контур. */
.panel .btn2 { background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line), 0 3px 0 var(--btn2-sh); }
.vt-card .vt-kv { flex: none; }
/* iPhone, гра з головного екрана: сторінка заходить під смугу з годинником (black-translucent).
   Уся сторінка починається нижче цієї смуги. Саму смугу закриває площина кольору фону, тому вміст під нею не просвічує.
   Верхнє меню прилипає під смугою, а не під годинником. */
body { padding-top: env(safe-area-inset-top, 0px); }
body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 50; pointer-events: none; }
body[data-role="teacher"]::before { background: var(--t-bg); }
.top { top: env(safe-area-inset-top, 0px); }
.vt-side { padding-top: calc(24px + env(safe-area-inset-top, 0px)); }
/* Учні на телефоні — картки замість таблиці. */
.vt-mcards { display: none; margin: 0; padding: 0; list-style: none; flex-direction: column; gap: 8px; }
.vt-mcard { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; background: var(--t-surface); border: 1px solid var(--vt-rule); border-radius: 12px; }
.vt-mcard-main { flex: 1 1 100%; display: flex; flex-direction: column; gap: 4px; color: var(--vt-ink); text-decoration: none; }
.vt-mcard-main .vt-row { justify-content: space-between; }
@media (max-width: 640px) { .vt-mcards { display: flex; } .vt-wideonly { display: none; } }
/* Герой: ім’я на етикетці під банкою, уся банка веде в картку героя (19.11.2026). */
a.hero-link { color: inherit; text-decoration: none; cursor: pointer; }
a.hero-link:focus-visible .cz { filter: drop-shadow(0 0 8px var(--yellow)); }
.jar-hero .hero-tag { padding: 7px 14px 9px; }
.jar-hero .hero-tag .hand { font-size: 26px; max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.hero-name { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.hero-name .hand { font-size: 30px; line-height: 1.1; }
.hero-name .mono { font-family: 'JetBrains Mono', monospace; font-size: 14px; }
.hero-mark { color: var(--yellow); font-family: 'JetBrains Mono', monospace; font-weight: 700; letter-spacing: 0.06em; }
.card.hero-c { border-color: var(--yellow); }
.hero-badge { position: absolute; top: 6px; left: 6px; padding: 1px 6px; border-radius: 3px; background: var(--yellow); color: var(--paper-ink); font: 700 12px Onest, sans-serif; letter-spacing: 0.04em; z-index: 1; }
.card.hero-c .cz-name { max-width: 100%; white-space: normal; text-align: center; font-size: 15px; line-height: 1.1; padding: 1px 6px 2px; }
.phone-sec { margin-top: 12px; }
.exit-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
:root[data-theme="light"] .hero-mark { color: var(--leg); }
/* Знак питання з поясненням: маленький кружок, але зона дотику 44 px. */
.qm { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; color: var(--muted); font: 700 13px/1 Onest, sans-serif; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.qm::after { content: ''; position: absolute; inset: -11px; }
/* Банки: назва завжди на дві лінії, тож полиці однакові. */
.room-t { min-height: 2.5em; align-items: center; }
/* «Зрозуміло» на паперовій бульбашці — темним чорнилом, а не блакитним. */
.bubble .link { color: var(--paper-ink); font-family: Onest, sans-serif; font-size: 15px; font-weight: 700; }
/* Невисокий екран телефона (iPhone із панелями Safari): банка з героєм менша, щоб етикетку не закривала кнопка «Грати». */
@media (max-height: 760px) { .lab .jar-hero { zoom: 0.74; margin-bottom: 34px; } .lab .kolba { zoom: 0.8; } }
a.happy-wrap { color: inherit; text-decoration: none; }
/* Герой у верхній смузі: числовик 60×66 зменшений до кружка 44 px. */
.hero-chip { overflow: hidden; padding: 0; }
.hero-chip .cz { zoom: 0.5; margin: 6px 0 0 !important; }
.hero-mini .cz { margin: 0 !important; }
/* Плашка «звання · серія · енергія» в одну кнопку. */
.stat-pill { gap: 0; padding: 0 4px; }
.stat-pill .pill-part { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; height: 100%; }
.stat-pill .pill-part + .pill-part { border-left: 1px solid var(--line); }
.top .stat-pill:first-child { overflow: visible; }
@media (max-width: 370px) { .stat-pill .pill-part { padding: 0 6px; } }
.sep-line { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.stat-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px; border: 0; border-radius: 8px; background: var(--panel2); color: var(--ink); font: inherit; cursor: pointer; }
