/* Evklid – videz. Barve so v spremenljivkah; temni način je razred .dark na <html> (nastavi ga theme.js).
   Lastne barve iz Nastavitve → Videz theme.js zapiše kot slog na <html> in prepišejo te privzete. */
:root {
  /* Slog Čist (privzeti, docs/oblikovanje.md); Igriv in Temen sta v ui.css (»Slogi«) in theme.js. */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #141821;
  --muted: #566070;
  --border: #e1e5eb;
  --accent: #2353d1;
  --accent-2: #4a74e0;
  --accent-grad: #3d6fe8;
  --accent-soft: #e8eefc;
  --accent-text: #ffffff;
  --hero-a: #2353d1;  /* podlaga pod belim besedilom (kartica Današnji trening, logotip) */
  --hero-b: #3563dc;
  --gold: #f5a524;
  --user-bubble: var(--accent);
  --user-text: #ffffff;
  --ok: #1e7a4c;
  --ok-bg: #e5f4ec;
  --danger: #d33a3f;
  --danger-bg: #fdecec;
  --warm: #b0500a;   /* niz dni, odštevanje do cilja */
  --radius: 14px;
  --radius-sm: 10px;
  --press: 0px;      /* globina »pritisnjenih« gumbov (Igriv: 3px) */
  --shadow: 0 1px 2px rgba(20, 24, 33, 0.06);
  --shadow-lg: 0 10px 30px rgba(20, 24, 33, 0.14);
  --font: "Instrument Sans Variable", "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
:root.dark {
  --bg: #0d1117;
  --surface: #151b23;
  --surface-2: #1e2631;
  --text: #e6eaf0;
  --muted: #9da7b6;
  --border: #2a3340;
  --accent: #6e9bff;
  --accent-2: #8fb2ff;
  --accent-grad: #5b8cf5;
  --accent-soft: #1a2a4a;
  --accent-text: #0d1117;
  --hero-a: #2353d1;
  --hero-b: #2f5fd8;
  --user-bubble: var(--accent);
  --user-text: #0d1117;
  --ok: #4cd38c;
  --ok-bg: #12301f;
  --danger: #ff6b6e;
  --danger-bg: #3a1a1f;
  --warm: #f5a35c;
  --shadow: none;
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
/* Meniji (zgornja in spodnja vrstica, seznam pogovorov, spustni seznami) imajo lahko svoje barve.
   Privzeto so enaki oknom; theme.js nastavi --menu-* ob lastnih barvah. */
.topbar, .tabbar, .sidebar, .dd-list {
  --surface: var(--menu, var(--surface-base));
  --text: var(--menu-text, var(--text-base));
  --muted: var(--menu-muted, var(--muted-base));
  --surface-2: var(--menu-2, var(--surface-2-base));
  --border: var(--menu-border, var(--border-base));
  --accent: var(--menu-accent, var(--accent-base));
  --accent-soft: var(--menu-accent-soft, var(--accent-soft-base));
  color: var(--text);
}
:root, :root.dark {
  --surface-base: var(--surface); --text-base: var(--text); --muted-base: var(--muted); --surface-2-base: var(--surface-2);
  --border-base: var(--border); --accent-base: var(--accent); --accent-soft-base: var(--accent-soft);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; overscroll-behavior-y: none; } /* brez osveževanja s potegom med pisanjem */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); font-size: 0.93em; }
svg.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
h1 { font-size: 1.55rem; line-height: 1.25; margin: 0 0 8px; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 1.12rem; margin: 0 0 8px; font-weight: 800; }
.with-icon { display: flex; align-items: center; gap: 8px; }
.with-icon svg.i { color: var(--accent); }
.eyebrow { font-size: 0.76rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
a { color: var(--accent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

/* ---------- gumbi ---------- */
button { cursor: pointer; }
button.primary, button.secondary, button.ghost, button.danger, .modes button, .tab, .text-btn {
  -webkit-tap-highlight-color: transparent;
}
button.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: var(--radius-sm);
  padding: 10px 18px; min-height: 44px; font-weight: 800;
  box-shadow: 0 var(--press) 0 color-mix(in srgb, var(--accent) 65%, #000);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}
button.primary:hover:not(:disabled) { filter: brightness(1.06); }
button.primary:active:not(:disabled) { transform: translateY(calc(var(--press) * 0.66)); box-shadow: 0 calc(var(--press) / 3) 0 color-mix(in srgb, var(--accent) 65%, #000); }
button.primary:disabled { opacity: 0.5; cursor: default; }
button.big { min-height: 52px; padding: 12px 24px; font-size: 1.05rem; }
button.secondary, button:where(:not(.primary, .tab, .danger, .ghost, .text-btn, .node, .next-row, .brand, .link, .choice, .key, .idea)) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--border); background: var(--surface); border-radius: var(--radius-sm);
  padding: 9px 16px; min-height: 44px; font-weight: 700; color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
button.secondary:hover, button:where(:not(.primary, .tab, .danger, .ghost, .text-btn, .node, .next-row, .brand, .link, .choice, .key, .idea)):hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
button.secondary svg.i { color: var(--accent); }
button.small { min-height: 38px !important; padding: 6px 12px !important; font-size: 0.9rem; }
button.ghost { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-weight: 700; padding: 8px 10px; border-radius: var(--radius-sm); min-height: 40px; }
button.ghost:hover { background: var(--surface-2); color: var(--text); }
.text-btn { border: 0; background: none; color: var(--muted); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; margin-top: 4px; }
.text-btn:hover { color: var(--accent); }
button.danger { background: none; border: 1.5px solid var(--danger); color: var(--danger); border-radius: var(--radius-sm); padding: 9px 14px; margin-top: 12px; font-weight: 700; min-height: 44px; }
/* Ime profila (do 40 znakov brez presledka) se prelomi, da ne gre čez kartico na telefonu. */
#delete-student, #delete-student-text { overflow-wrap: anywhere; }
.icon-only { padding: 8px !important; min-width: 44px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }

/* ---------- zgornja vrstica ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: relative; z-index: 4;
}
.brand { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; font-weight: 900; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--text); }
.brand-name span { color: var(--accent); }
.logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 35%, transparent); }
.logo svg.i { width: 20px; height: 20px; }
.tabs { display: flex; gap: 4px; flex: 1; min-width: 0; }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: none; padding: 9px 14px; border-radius: 12px; color: var(--muted); font-weight: 700; white-space: nowrap;
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active { background: var(--accent-soft); color: var(--accent); }
.xp-badge { display: flex; gap: 8px; }
.stat { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; background: var(--surface-2); font-weight: 800; font-size: 0.92rem; white-space: nowrap; }
.stat .xp-unit { color: var(--muted); font-weight: 700; font-size: 0.8rem; }
.stat.xp svg.i { color: var(--gold); fill: var(--gold); }
.stat.streak svg.i { color: #ff7a1a; fill: #ffb21a; }
.xp-badge.bump .stat.xp { animation: bump 0.6s ease; }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.18); background: color-mix(in srgb, var(--gold) 30%, var(--surface-2)); } 100% { transform: scale(1); } }
/* Meni profila: klik na ime zgoraj desno (public/profile-menu.js). */
.profile-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 200px; padding: 4px 10px 4px 4px;
  border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
  font: inherit; font-weight: 800; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.profile-btn:hover, .profile-btn[aria-expanded="true"] { border-color: var(--accent); }
.profile-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.profile-btn .pm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-btn > svg.i { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform 0.15s; }
.profile-btn[aria-expanded="true"] > svg.i { transform: rotate(180deg); }
.pm-avatar {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 900; font-size: 0.95rem;
  background: linear-gradient(135deg, var(--hero-a), var(--hero-b));
}
.pm-avatar.sm { width: 26px; height: 26px; font-size: 0.82rem; }
.pm-avatar.big { width: 44px; height: 44px; border-radius: 14px; font-size: 1.25rem; }
.profile-pop {
  position: fixed; z-index: 60; width: min(290px, calc(100vw - 16px)); max-height: calc(100dvh - 88px); overflow-y: auto;
  margin: 0; padding: 6px; box-shadow: var(--shadow-lg, 0 12px 40px rgba(0, 0, 0, 0.18)); animation: dd-in 0.14s ease; transform-origin: top right;
}
[dir="rtl"] .profile-pop { transform-origin: top left; }
.profile-pop[hidden] { display: none; }
.pm-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 8px; }
.pm-who { display: flex; flex-direction: column; min-width: 0; }
.pm-who b { font-size: 1.05rem; overflow-wrap: anywhere; }
.pm-who small { font-size: 0.82rem; }
.pm-label { padding: 6px 12px 4px; font-size: 0.78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pm-sep { height: 1px; margin: 6px 4px; background: var(--border); }
.pm-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: none; color: var(--text); font: inherit; font-weight: 700; text-align: start; cursor: pointer;
}
.pm-item > span:not(.pm-avatar) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pm-item > svg.i { flex: none; width: 20px; height: 20px; color: var(--muted); }
.pm-item:hover, .pm-item:focus-visible { background: var(--surface-2); outline: none; }
.pm-item[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); }
.pm-item > svg.pm-check { width: 18px; height: 18px; color: var(--accent); }
.pm-item[data-act="logout"] > svg.i { color: var(--danger); }
/* Klik na klobuk: »Nadaljuj z učenjem« (quick-start.js). */
.brand { cursor: pointer; border-radius: 12px; padding: 2px; margin: -2px; } /* 40 px za dotik */
.brand:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; }
.brand[aria-expanded="true"] .logo { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.quick-pop {
  position: fixed; z-index: 60; width: min(360px, calc(100vw - 16px)); max-height: calc(100dvh - 88px); overflow-y: auto;
  margin: 0; padding: 8px; box-shadow: var(--shadow-lg, 0 12px 40px rgba(0, 0, 0, 0.18)); animation: dd-in 0.14s ease; transform-origin: top left;
}
[dir="rtl"] .quick-pop { transform-origin: top right; }
.quick-pop[hidden] { display: none; }
.qs-title { padding: 4px 8px 6px; font-size: 0.78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.qs-row b { overflow-wrap: anywhere; }
.qs-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.qs-row .lr-text .qs-eyebrow { color: var(--accent); font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
/* .qs-row.: ui.css (naložen za style.css) sicer povozi ozadje ikone v .list-row .ic. */
.qs-row.qs-main .ic { background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); color: #fff; }
.qs-row.qs-done .ic { background: var(--ok-bg); color: var(--ok); }
/* Ozek telefon: samo začetnica, ime je v meniju. */
@media (max-width: 400px) {
  .profile-btn { padding: 4px; gap: 0; }
  .profile-btn .pm-name, .profile-btn > svg.i { display: none; }
}
.banner { display: flex; align-items: center; gap: 8px; background: #fff6e0; color: #6b4e00; padding: 7px 20px; font-size: 0.88rem; }
.dark .banner { background: #352b12; color: #f3d98a; }

/* ---------- pogledi, kartice, obrazci ---------- */
.view { flex: 1; min-height: 0; }
.view[hidden] { display: none !important; }
.narrow { max-width: 780px; width: 100%; margin: 0 auto; padding: 24px 16px 48px; overflow-y: auto; overscroll-behavior: contain; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 0.92rem; }
.form input, .form select, input[type="date"], .inline input {
  font-weight: 600; padding: 10px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--bg); min-height: 44px;
}
.form input:focus, .form select:focus { border-color: var(--accent); outline: none; }
.form fieldset { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
.form legend { font-weight: 800; font-size: 0.92rem; padding: 0 4px; }
.form label.radio { flex-direction: row; align-items: center; font-weight: 600; gap: 10px; min-height: 36px; }
.form-actions { display: flex; align-items: center; gap: 12px; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }
.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.pill-list li { background: var(--surface-2); border-radius: 999px; padding: 5px 12px; font-size: 0.9rem; font-weight: 700; }
.pill-list li.auto { border: 1.5px dashed var(--danger); }
/* ---------- tabele: en videz v vsej aplikaciji ----------
   Okvir z zaobljenimi robovi, poudarjena siva glava, črte med vrsticami in stolpci, rahlo
   progaste vrstice, števke enake širine. Velja za tabele iz Markdowna (.md-table: inštruktor,
   razlage, naloge, lekcije, kartice, mnenja) in za tabele, ki jih sestavi koda. :where() ima
   specifičnost 0, zato lahko posamezno orodje (npr. PSE) prepiše poravnavo ali razmik. */
:where(.md-table, .table, .demo-table, .pse-tab, .doc table) {
  border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: normal; margin: 10px 0;
}
:where(.md-table, .table, .demo-table, .pse-tab, .doc table) :where(th, td) {
  padding: 10px 14px; text-align: start; vertical-align: middle; border: 0; border-bottom: 1px solid var(--border);
}
:where(.md-table, .table, .demo-table, .pse-tab, .doc table) :where(th, td) + :where(th, td) { border-inline-start: 1px solid var(--border); }
:where(.md-table, .table, .demo-table, .pse-tab, .doc table) > :where(:last-child) > tr:last-child > :where(th, td) { border-bottom: 0; }
:where(.md-table, .table, .demo-table, .pse-tab, .doc table) :where(th) { background: var(--surface-2); font-weight: 800; color: var(--text); }
:where(.md-table, .table, .demo-table, .pse-tab, .doc table) > :where(tbody) > tr:nth-child(even) > td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
/* Zaobljeni vogali tudi pri sivi glavi in progastih vrsticah. */
:where(.md-table, .table, .demo-table, .pse-tab, .doc table) > :where(:first-child) > tr:first-child > :where(th, td):first-child { border-start-start-radius: calc(var(--radius-sm) - 1px); }
:where(.md-table, .table, .demo-table, .pse-tab, .doc table) > :where(:first-child) > tr:first-child > :where(th, td):last-child { border-start-end-radius: calc(var(--radius-sm) - 1px); }
:where(.md-table, .table, .demo-table, .pse-tab, .doc table) > :where(:last-child) > tr:last-child > :where(th, td):first-child { border-end-start-radius: calc(var(--radius-sm) - 1px); }
:where(.md-table, .table, .demo-table, .pse-tab, .doc table) > :where(:last-child) > tr:last-child > :where(th, td):last-child { border-end-end-radius: calc(var(--radius-sm) - 1px); }
/* Ena formula v eni vrstici (rich.js splitFormulaCells): prazna prva celica nadaljuje ime nad njo,
   zato med njima ni črte in ne progastega ozadja; formule imajo vsaka svojo celico s črto. */
.md-table > tbody > tr:has(+ tr > td:first-child:empty) > td:first-child { border-bottom-color: transparent; }
.md-table > tbody > tr:has(+ tr > td:first-child:empty) > td:first-child,
.md-table > tbody > tr > td:first-child:empty { background: transparent; vertical-align: top; }
/* Ime se v taki tabeli lahko prelomi, da je na telefonu dovolj prostora za formule. */
.md-table:has(> tbody > tr > td:first-child:empty) > tbody > tr > td:first-child { white-space: normal; min-width: 6em; max-width: 11em; }
/* Glava brez besedila (»| | |« v listih formul) je samo prazna siva vrstica. */
.md-table > thead > tr:not(:has(th:not(:empty))) { display: none; }
:where(.md-table, .table, .demo-table, .pse-tab, .doc table) [align="center"] { text-align: center; }
:where(.md-table, .table, .demo-table, .pse-tab, .doc table) [align="right"] { text-align: right; }

/* Tabela iz Markdowna: tako široka kot vsebina; na ozkem zaslonu se pomika vstran, ne stisne.
   Kratke celice in formule se ne prelamljajo (ulomki ostanejo celi), daljše besedilo se. */
.md-table-wrap { max-width: 100%; overflow-x: auto; margin: 10px 0; -webkit-overflow-scrolling: touch; }
.md-table-wrap > .md-table { margin: 0; }
.md-table :is(th, td) { white-space: nowrap; }
.md-table :is(th, td).wrap { white-space: normal; min-width: 11em; max-width: 26em; }
.md-table .katex { white-space: nowrap; }
.md-table td .katex { font-size: 1.1em; }
.md-table :is(th, td) .katex-display { margin: 0; }

.table { width: 100%; font-size: 0.93rem; }
.table td.bad { color: var(--danger); font-weight: 800; }
.activity { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.activity .bar { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; width: auto; height: auto; }
.activity .bar .err { position: absolute; bottom: 0; left: 0; right: 0; background: var(--danger); border-radius: 4px 4px 0 0; }
#flag-list { padding-inline-start: 1.2em; }
.leaderboard { padding-inline-start: 1.4em; }
.leaderboard li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); }
.leaderboard li.me { font-weight: 800; color: var(--accent); }
.toast {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 700;
  animation: rise 0.25s ease;
}
.toast svg.i { color: var(--gold); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- klepet z inštruktorjem ---------- */
.chat-view { display: grid; grid-template-columns: 270px 1fr; }
.sidebar { border-inline-end: 1px solid var(--border); padding: 14px; overflow-y: auto; background: var(--surface); }
.sidebar .primary { width: 100%; }
#conversation-list { list-style: none; padding: 0; margin: 14px 0 0; }
#conversation-list li {
  display: flex; align-items: center; gap: 4px; border-radius: 12px; padding: 9px 10px; cursor: pointer; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted);
}
#conversation-list li span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
#conversation-list li.active, #conversation-list li:hover { background: var(--accent-soft); color: var(--text); }
#conversation-list li button { border: 0 !important; background: none !important; padding: 4px !important; min-height: 0 !important; opacity: 0; color: var(--muted); }
#conversation-list li:hover button, #conversation-list li.active button { opacity: 0.8; }
.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.chat-head h1 { font-size: 1.05rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; gap: 6px; }
.chip { background: var(--surface-2); border-radius: 999px; padding: 3px 11px; font-size: 0.82rem; color: var(--muted); white-space: nowrap; font-weight: 700; }
.messages { flex: 1; overflow-y: auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; }
.empty { margin: auto; text-align: center; color: var(--muted); max-width: 440px; display: flex; flex-direction: column; align-items: center; }
.empty p.big { font-size: 1.5rem; margin: 12px 0 4px; color: var(--text); font-weight: 800; }
.ideas { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; width: 100%; }
.idea { border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 14px; padding: 12px 14px; text-align: start; font-weight: 700; }
.idea:hover { border-color: var(--accent); }
.tutor-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); }
.tutor-avatar.big { width: 64px; height: 64px; border-radius: 20px; box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent); }
.tutor-avatar.big svg.i { width: 30px; height: 30px; }
.msg { max-width: 720px; width: fit-content; padding: 12px 16px; border-radius: 20px; overflow-wrap: anywhere; line-height: 1.6; animation: msg-in 0.2s ease; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.user { align-self: flex-end; background: var(--user-bubble); color: var(--user-text); border-end-end-radius: 6px; white-space: pre-wrap; font-weight: 600; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-end-start-radius: 6px; box-shadow: var(--shadow); position: relative; margin-inline-start: 44px; }
.msg.assistant::before {
  content: ""; position: absolute; inset-inline-start: -44px; bottom: 0; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--hero-a), var(--hero-b));
}
.msg.assistant::after {
  content: "S"; position: absolute; inset-inline-start: -44px; bottom: 0; width: 34px; height: 34px; display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: 0.95rem;
}
.msg.assistant p { margin: 0.45em 0; }
.msg.assistant > :first-child { margin-top: 0; }
.msg.assistant > :last-child { margin-bottom: 0; }
.msg.assistant ol, .msg.assistant ul { padding-inline-start: 1.3em; margin: 0.45em 0; }
.msg.assistant pre { background: var(--surface-2); padding: 10px; border-radius: 10px; overflow-x: auto; }
.msg .katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.msg .photo-note { display: flex; align-items: center; gap: 6px; font-size: 0.85em; opacity: 0.9; margin-bottom: 4px; }
.msg.error { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.typing::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-start: 4px; border-radius: 50%; background: var(--accent); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.deep-btn { display: inline-flex !important; margin-top: 10px; font-size: 0.85rem; min-height: 34px !important; padding: 4px 12px !important; color: var(--muted) !important; }
/* Pod odgovorom: koda sporočila (za preverjanje posnetkov zaslona) in »Prijavi napako« (server/reports.js) */
.msg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 8px; font-size: 0.78rem; color: var(--muted); }
.msg-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.03em; user-select: all; }
button.ghost.msg-report { font-size: 0.78rem; font-weight: 600; padding: 4px 8px; gap: 4px; }
@media (hover: hover) { button.ghost.msg-report:hover { color: var(--danger); } } /* na dotik bi ostal rdeč po tapu */
.msg-report svg.i, .rep-done svg.i { width: 14px; height: 14px; }
.rep-done { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; }
.report-box { display: grid; gap: 8px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); font-size: 0.9rem; }
.report-box p { margin: 0; font-weight: 700; }
.report-box .rep-reasons, .report-box .rep-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.report-box .rep-reasons button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.report-box .rep-reasons button { min-height: 40px !important; }
.report-box .rep-reasons button[aria-pressed="true"]::before { content: "✓"; content: "✓" / ""; margin-inline-end: 6px; } /* izbira ne le z barvo; bralnik zaslona ima aria-pressed, kljukice ne prebere */
.report-box .rep-cancel { color: var(--text); } /* --muted na --surface-2 je v slogih Igriv/Temen pod 4,5 : 1 */
.report-box textarea { width: 100%; min-height: 56px; resize: vertical; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); box-sizing: border-box; }
.report-box .rep-err { color: var(--text); margin: 0; font-weight: 400; border-inline-start: 3px solid var(--danger); padding-inline-start: 8px; } /* --danger na --surface-2 je pod 4,5 : 1 */
.ai-note { font-size: 0.75rem; color: var(--muted); text-align: center; margin: 6px auto 0; max-width: 900px; }
.chat-off { max-width: 900px; margin: 0 auto 8px; width: calc(100% - 32px); box-sizing: border-box; padding: 10px 14px; border: 1px solid var(--danger); border-radius: 12px; background: var(--danger-bg); color: var(--text); font-size: 0.9rem; text-align: center; } /* --danger na --danger-bg je v svetlem načinu 4,1 : 1 */
.composer { border-top: 1px solid var(--border); padding: 12px 16px 14px; background: var(--surface); }
.composer-row { display: flex; gap: 8px; align-items: flex-end; max-width: 900px; margin: 0 auto; background: var(--bg); border: 1.5px solid var(--border); border-radius: 22px; padding: 6px; }
.composer-row:focus-within { border-color: var(--accent); }
.composer textarea { flex: 1; resize: none; max-height: 200px; padding: 9px 6px; border: 0; background: none; outline: none; min-height: 40px; }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--accent); }
.icon-btn svg.i { width: 22px; height: 22px; }
button.send { border-radius: 18px; min-height: 42px; padding: 8px 16px; box-shadow: none; }
.composer > .hint { font-size: 0.8rem; color: var(--muted); margin: 6px auto 0; max-width: 900px; padding-inline-start: 8px; }

/* Inštruktor: mikrofon (glasovni vnos) in napredna tipkovnica s simboli */
button.icon-btn { border: 0; background: none; padding: 0; min-height: 0; box-shadow: none; flex: none; }
button.icon-btn.on { color: var(--accent); background: var(--accent-soft); }
button.mic-btn.rec { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); animation: mic-pulse 1.3s ease-in-out infinite; }
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 45%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--danger) 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { button.mic-btn.rec { animation: none; } }
.sym-panel { max-width: 900px; margin: 0 auto 8px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 8px; }
.sym-head { margin-bottom: 8px; }
.sym-head .chip-row > button { min-height: 36px; }
.sym-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; max-height: 196px; overflow-y: auto; overscroll-behavior: contain; }
button.sym-key { min-height: 44px; padding: 0 6px; font-size: 1.08rem; font-weight: 700; border-radius: var(--radius-sm); background: var(--bg); border: 1.5px solid var(--border); color: var(--text); box-shadow: none; white-space: nowrap; }
button.sym-key:hover { border-color: var(--accent); color: var(--accent); }
button.sym-key:active { background: var(--accent-soft); }
.sym-foot { margin-top: 6px; }

/* Učna pot: prehod v višji razred / na novo stopnjo */
.level-card { border: 1.5px solid var(--accent); }
.level-card h2 { margin: 0; font-size: 1.15rem; }
.level-card p { margin: 10px 0 0; }
.lc-head { display: flex; align-items: center; gap: 12px; }
.lc-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.lc-ic svg.i { width: 22px; height: 22px; }
.lc-close { margin-inline-start: auto; align-self: flex-start; }
.lc-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.lc-list li { display: flex; gap: 10px; align-items: flex-start; }
.lc-list li svg.i { flex: none; color: var(--accent); width: 20px; height: 20px; margin-top: 2px; }
.level-card .actions { margin-top: 14px; }
.image-preview { position: relative; display: inline-block; margin-bottom: 8px; }
.image-preview img { max-height: 120px; border-radius: 12px; border: 1px solid var(--border); }
.image-preview button { position: absolute; top: -8px; right: -8px; border-radius: 50% !important; padding: 0 7px !important; min-height: 28px !important; }

.mobile-only { display: none; }

/* ---------- učna pot ---------- */
.path-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-label { font-size: 0.76rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.path-note { font-size: .9rem; margin: -8px 0 16px; }
.card.xp-card { padding: 0; overflow: hidden; }
.hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 20px; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); color: #fff; }
.hero h2 { margin: 0; font-size: 1.25rem; }
.hero p { margin: 2px 0 0; opacity: 0.9; font-weight: 600; }
.hero-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, 0.18); }
.hero-icon svg.i { width: 28px; height: 28px; color: #ffe27a; fill: #ffe27a; }
.hero button.primary { background: #fff; color: var(--hero-a); box-shadow: 0 var(--press) 0 rgba(0, 0, 0, 0.18); }
.next-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 20px; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); text-align: start; color: var(--text); }
.next-row:hover { background: var(--surface-2); }
.next-row .eyebrow { flex: none; }
.next-row .next-name { flex: 1; font-weight: 800; }
.next-row svg.i { color: var(--accent); }
.next-row.done svg.i { color: var(--gold); }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 12px 8px; }
.stats-row div { display: flex; flex-direction: column; }
.stats-row b { font-size: 1.25rem; font-weight: 900; }
.stats-row span { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 14px; font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.lg { display: inline-flex; align-items: center; gap: 5px; }
.lg svg.i { width: 18px; height: 18px; padding: 3px; border-radius: 50%; color: #fff; }
.lg.mastered svg.i { background: var(--ok); }
.lg.learning svg.i { background: var(--accent); }
.lg.due svg.i { background: var(--gold); }
.lg.locked svg.i { background: #a3adc3; }

.unit { padding: 20px 20px 16px; }
.unit-head { display: flex; align-items: center; gap: 14px; }
.unit-title { display: flex; flex-direction: column; min-width: 0; }
.unit-title h2 { margin: 0; font-size: 1.15rem; }
.ring {
  --p: 0; flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--surface-2) 0);
  font-size: 0.78rem; font-weight: 900; position: relative;
}
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.ring > * { position: relative; }
.unit.mastered .ring { color: var(--ok); }
.unit.locked .ring { color: var(--muted); }
.unit.locked { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); box-shadow: none; }
.path { list-style: none; margin: 16px 0 6px; padding: 0; position: relative; }
.path::before { content: ""; position: absolute; inset-inline-start: 25px; top: 26px; bottom: 26px; width: 4px; border-radius: 4px; background: var(--surface-2); }
.path li { position: relative; }
.node { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; background: none; padding-block: 6px; padding-inline: 0 8px; border-radius: 16px; text-align: start; color: var(--text); }
.node:hover:not(:disabled) { background: var(--surface-2); }
.node:disabled { cursor: default; }
.node-dot {
  flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); border: 3px solid var(--surface); position: relative; z-index: 1;
  box-shadow: 0 var(--press) 0 color-mix(in srgb, var(--text) 10%, transparent);
  transition: transform 0.15s;
}
.node:hover:not(:disabled) .node-dot { transform: scale(1.06); }
.node-dot svg.i { width: 22px; height: 22px; }
.node.mastered .node-dot { background: var(--ok); color: #fff; box-shadow: 0 var(--press) 0 color-mix(in srgb, var(--ok) 60%, #000); }
.node.learning .node-dot { background: var(--accent); color: var(--accent-text); box-shadow: 0 var(--press) 0 color-mix(in srgb, var(--accent) 60%, #000); }
.node.due .node-dot { background: var(--gold); color: #fff; box-shadow: 0 var(--press) 0 color-mix(in srgb, var(--gold) 60%, #000); }
.node.new .node-dot { background: var(--surface); color: var(--accent); border-color: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-soft); }
.node.locked .node-dot { background: var(--surface-2); color: #a3adc3; }
.node.current .node-dot { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }
.node-text { display: flex; flex-direction: column; min-width: 0; }
.node-name { font-weight: 800; }
.node.locked .node-name { color: var(--muted); }
.node-sub { font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.node.current .node-sub { color: var(--accent); }
.unit-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.unit-actions:empty { display: none; }

/* ---------- tema in naloge ---------- */
.back { margin: -6px 0 10px -6px; }
.topic-head .goals { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-weight: 600; margin: 4px 0 0; }
.topic-head .goals svg.i { color: var(--accent); margin-top: 3px; }
.explanation h3 { font-size: 1rem; margin: 14px 0 4px; }
.explanation details { background: var(--surface-2); border-radius: 10px; padding: 6px 12px; margin: 6px 0; }
.session-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.session-head h1 { margin: 0; }
.session-head p { margin: 2px 0 0; }
.session-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.session-icon svg.i { width: 26px; height: 26px; }
.task { margin-top: 16px; transition: box-shadow 0.3s, border-color 0.3s; }
.task:has(.fb.ok) { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 14%, transparent), var(--shadow); }
.task-top { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.task-topic { font-size: 0.85rem; font-weight: 800; color: var(--muted); flex: 1; min-width: 0; }
.count { font-size: 0.85rem; font-weight: 800; color: var(--muted); }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: -2px 0 14px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--ok), #4fd88e); border-radius: 99px; transition: width 0.4s ease; }
.diff { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 800; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; }
.diff .dots { display: inline-flex; gap: 3px; }
.diff .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.diff.d1 .dots i:nth-child(-n+1), .diff.d2 .dots i:nth-child(-n+2), .diff.d3 .dots i { background: var(--accent); }
.task-text { font-size: 1.12rem; font-weight: 600; line-height: 1.6; }
.answer-row { display: flex; gap: 8px; margin-top: 16px; }
.answer-row input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: var(--radius-sm); border: 2px solid var(--border); background: var(--bg); font-size: 1.1rem; font-weight: 700; min-height: 52px; }
.answer-row input:focus { border-color: var(--accent); outline: none; }
.answer-row button { min-height: 52px !important; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.choice { min-height: 56px; font-size: 1.08rem; font-weight: 700; border: 2px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); box-shadow: 0 var(--press) 0 var(--border); transition: transform 0.08s; }
.choice:hover { border-color: var(--accent); }
.choice:active { transform: translateY(calc(var(--press) * 0.66)); box-shadow: 0 calc(var(--press) / 3) 0 var(--border); }
.feedback { scroll-margin-bottom: calc(var(--pad-h, 0px) + 16px); margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.feedback:empty { display: none; }
.fb { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 600; }
.fb > svg.i { width: 22px; height: 22px; margin-top: 1px; }
.fb > span, .fb > div { flex: 1; }
.fb.ok { background: var(--ok-bg); color: var(--ok); }
.fb.ok b { font-size: 1.05rem; }
.fb.bad { background: var(--danger-bg); color: var(--danger); }
.fb.info, .fb.hint { background: var(--surface-2); color: var(--text); }
.fb.hint > svg.i { color: var(--gold); }
.fb.info > svg.i { color: var(--accent); }
.fb.mastered { background: #fff3d4; color: #6b4e00; }
.dark .fb.mastered { background: #3a2f12; color: #f6d77f; }
.xp-gain { flex: none !important; font-weight: 900; color: var(--gold); background: var(--surface); border-radius: 999px; padding: 2px 10px; animation: float-up 1s ease both; }
@keyframes float-up { 0% { opacity: 0; transform: translateY(8px) scale(0.8); } 40% { opacity: 1; transform: translateY(-4px) scale(1.12); } 100% { transform: none; } }
.pop { animation: pop 0.35s ease; }
@keyframes pop { 0% { transform: scale(0.96); opacity: 0; } 60% { transform: scale(1.02); opacity: 1; } 100% { transform: scale(1); } }
.shake { animation: shake 0.35s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.solution { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; }
.sol-label { display: block; font-size: 0.76rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.small-note { margin: 0; font-size: 0.85rem; }
/* Podatki / Iščemo in formula v rešenem zgledu */
.task-data { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.task-data .data-col { min-width: 120px; }
.task-data .data-list { display: flex; flex-direction: column; gap: 2px; font-size: 1.05rem; }
.formula { margin-bottom: 10px; }
.formula summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; padding: 6px 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); font-weight: 700; font-size: 0.92rem; user-select: none; }
.formula summary::-webkit-details-marker { display: none; }
.formula[open] summary { border-color: var(--accent); color: var(--accent); }
/* Formula v svojem okvirju (rešen zgled, namig), ne prosto med besedilom. */
.formula-body {
  margin: 8px 0 2px; padding: 12px 16px; font-size: 1.12rem; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--surface); border: 1.5px solid var(--border); border-inline-start: 4px solid var(--accent); border-radius: var(--radius-sm);
  overflow-x: auto;
}
.formula[open] .formula-body { animation: fade-up 0.25s ease both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.formula + .sol-label, .task-data + .sol-label { margin-top: 12px; }

/* Vmesni koraki pri nalogi (kot v zvezek) */
.work { margin-top: 14px; }
.work-toggle {
  display: inline-flex; align-items: center; gap: 8px; border: 1.5px dashed var(--border) !important; background: none !important;
  color: var(--muted); font-weight: 800; padding: 8px 12px !important; border-radius: var(--radius-sm); min-height: 44px;
}
.work-toggle:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)) !important; }
.work-toggle > svg.i:last-child { width: 16px; height: 16px; transition: transform 0.2s; }
.work.open .work-toggle { color: var(--accent); border-style: solid !important; border-color: color-mix(in srgb, var(--accent) 45%, var(--border)) !important; }
.work.open .work-toggle > svg.i:last-child { transform: rotate(180deg); }
.work-body { position: relative; margin-top: 8px; }
.work-text {
  display: block; width: 100%; min-height: 96px; resize: vertical; padding: 8px 48px 8px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; font-size: 1.05rem; line-height: 32px; color: var(--text);
  background: repeating-linear-gradient(to bottom, transparent 0 31px, color-mix(in srgb, var(--border) 85%, transparent) 31px 32px), var(--bg);
  background-attachment: local; background-position: 0 8px;
}
.work-text:focus { outline: none; border-color: var(--accent); }
.work-sym { position: absolute; top: 6px; right: 6px; min-height: 36px !important; }
.work-sym.on { color: var(--accent); background: var(--accent-soft); }
.work-sym-panel { margin: 8px 0 0; max-width: none; }

/* Razloži / Preglej s tutorjem pod rešeno nalogo */
.tutor-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.tutor-row button { display: inline-flex; align-items: center; gap: 6px; }
.tutor-row button svg.i { color: var(--accent); }
@media (max-width: 760px) { .tutor-row button { flex: 1 1 auto; justify-content: center; } }
.example { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.example .solution { margin-top: 14px; }
.example .fb.hint { margin-top: 10px; }
.result { margin-top: 8px; text-align: center; }
.result.celebrate { background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 14%, var(--surface)), var(--surface)); animation: pop 0.4s ease; }
.result-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--gold); color: #fff; margin-bottom: 8px; animation: pop 0.5s ease; }
.result-icon svg.i { width: 32px; height: 32px; }
.suggest { border-color: var(--gold); }
.suggest h2 { display: flex; align-items: center; gap: 8px; }
.suggest h2 svg.i { color: var(--gold); }
.tp-units { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 14px; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 700; min-height: 40px; padding: 4px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
label.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- slike pri nalogah ---------- */
.fig { margin: 16px auto 4px; max-width: 420px; }
.fig.wide { max-width: 520px; }
.fig > svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 2px 8px rgba(20, 33, 61, 0.08)); }
.fig .paper { fill: #ffffff; stroke: #dfe6f1; }
.fig .grid line { stroke: #e8eef7; stroke-width: 1; }
.fig .axis { stroke: #2b2f45; stroke-width: 2; }
.fig .arrow { fill: #2b2f45; }
.fig .nums text, .fig text { fill: #5d6b86; font: 600 11px var(--font); }
.fig text.strong { fill: #14213d; font-weight: 900; }
.fig .axis-name { fill: #14213d; font-style: italic; font-weight: 800; font-size: 14px; }
.fig .plot { stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; }
.fig-pt { cursor: pointer; outline: none; }
.fig-pt .hit { fill: transparent; }
.fig-pt .dot { fill: #f5a524; stroke: #fff; stroke-width: 2.5; transition: r 0.15s; }
.fig-pt:hover .dot, .fig-pt:focus-visible .dot { r: 8.5; }
.fig-pt .coord { opacity: 0; fill: #14213d; font-weight: 900; font-size: 13px; paint-order: stroke; stroke: #fff; stroke-width: 4px; transition: opacity 0.15s; }
.fig-pt.show .coord { opacity: 1; }
.fig .tick { stroke: #2b2f45; stroke-width: 2; }
.fig .ray { stroke: var(--accent); stroke-width: 6; stroke-linecap: round; opacity: 0.9; }
.fig .ray-arrow { fill: var(--accent); }
.fig circle.closed { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
.fig circle.open { fill: #fff; stroke: var(--accent); stroke-width: 3; }
.fig figcaption { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.8rem; color: var(--muted); margin-top: 6px; font-weight: 600; }

/* ---------- uvodni ogled ---------- */
.tour { position: fixed; inset: 0; z-index: 60; }
.tour-spot { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(12, 14, 30, 0.6); transition: all 0.3s ease; pointer-events: none; }
.tour-card {
  position: fixed; left: 50%; transform: translateX(-50%); width: min(380px, calc(100% - 32px));
  background: var(--surface); border-radius: 20px; padding: 20px; box-shadow: var(--shadow-lg); animation: pop 0.25s ease;
}
.tour-step { font-size: 0.78rem; font-weight: 800; color: var(--accent); letter-spacing: 0.05em; text-transform: uppercase; }
.tour-card h2 { margin: 4px 0 6px; font-size: 1.2rem; }
.tour-card p { margin: 0; color: var(--muted); font-weight: 600; }
.tour-actions { display: flex; justify-content: space-between; margin-top: 16px; }
.tour-nav { display: flex; gap: 8px; }
.tour-nav [hidden] { display: none; }
.tour-card.center { top: 50% !important; bottom: auto !important; transform: translate(-50%, -50%); left: 50%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Zavihki ne gredo v vrstico (app.js), po korakih: ožji (.tabs-tight), brez imena ob logotipu (.tabs-nobrand),
   manj pogosti samo z ikono (.tabs-minor), vsi samo z ikono (.tabs-compact); izbrani vedno z napisom. */
.topbar.tabs-tight .tabs { gap: 2px; }
.topbar.tabs-tight .tab { padding: 9px 9px; gap: 6px; }
.topbar.tabs-nobrand .brand-name { display: none; }
.topbar.tabs-minor .tab:not(.active):not([data-view="path"], [data-view="textbook"], [data-view="chat"], [data-view="competition"]) span { display: none; }
.topbar.tabs-compact .tab { padding: 9px 11px; }
.topbar.tabs-compact .tab:not(.active) span { display: none; }

/* ---------- ožji računalniki in tablice: zavihki samo z ikonami ---------- */
@media (min-width: 761px) and (max-width: 1240px) {
  .topbar { gap: 10px; padding: 10px 14px; }
  .tab { padding: 9px 11px; }
  .tab:not(.active) span { display: none; }
  .tab svg.i { width: 21px; height: 21px; }
}
@media (min-width: 761px) and (max-width: 980px) {
  .brand-name { display: none; }
  .stat .xp-unit { display: none; }
}

/* ---------- telefon ---------- */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px 0; }
  .brand-name { display: none; }
  .xp-badge { margin-inline-start: auto; }
  .stat { padding: 5px 9px; }
  .stat .xp-unit { display: none; }
  .tabs { order: 3; width: 100%; flex: none; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 4px 12px 8px; width: calc(100% + 24px); }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 8px 12px; font-size: 0.92rem; flex: none; }
  .banner { padding: 6px 12px; }
  .banner .long { display: none; }
  .narrow { padding: 16px 12px 32px; }
  .card { padding: 16px; }
  .hero { grid-template-columns: auto 1fr; padding: 16px; }
  .hero button.primary { grid-column: 1 / -1; width: 100%; }
  .next-row { padding: 12px 16px; flex-wrap: wrap; }
  .next-row .eyebrow { width: 100%; }
  .next-row .next-name { flex: 1; }
  h1 { font-size: 1.35rem; }
  .actions > button.big { flex: 1 1 auto; }
  .answer-row .pad-open-btn span { display: none; }
  .mobile-only { display: inline-flex; }
  .chat-head h1 { flex: 1; }
  .chips .chip:nth-child(n+2) { display: none; }
  .chat-view { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  /* Seznam pogovorov prekrije samo klepet: glava z gumbom ostane nad njim, spodnja vrstica zavihkov vidna. */
  .chat-view { position: relative; }
  .chat-head { position: relative; z-index: 6; }
  .sidebar.open { display: block; position: absolute; inset: 0; z-index: 5; padding-top: 72px; border-inline-end: 0; }
  .messages { padding: 16px 12px; }
  .msg { max-width: 100%; }
  .msg.assistant { margin-inline-start: 40px; }
  .chat-head { padding: 8px 12px; }
  .composer > .hint { display: none; }
  .ai-note { margin-top: 4px; font-size: 0.7rem; }
  .composer { padding: 8px 10px 10px; }
  button.send span { display: none; }
  button.send { padding: 8px 12px; }
}
/* vnos z dotikom */
.pad {
  --ink-h: 30vh;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  max-height: 66vh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column;
  background: var(--surface); border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.12);
  padding: 6px 12px calc(10px + env(safe-area-inset-bottom));
}
.pad-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pad-tabs { display: flex; gap: 4px; }
.pad-tabs button, .pad-close { border: 0 !important; background: none !important; padding: 8px 12px !important; border-radius: 10px; color: var(--muted); }
.pad-tabs button[aria-selected="true"] { background: var(--surface-2) !important; color: var(--text); font-weight: 600; }
.pad-answer { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.pad-value { flex: 1; min-height: 44px; display: flex; align-items: center; padding: 6px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); font-size: 1.25rem; overflow-x: auto; white-space: pre; }
.pad-value.ph { color: var(--muted); font-size: 1rem; }
.pad-body { display: none; }
.pad[data-tab="keys"] .pad-keys, .pad[data-tab="draw"] .pad-draw { display: block; }
.pad-units { display: flex; gap: 6px; }
.pad-units:empty { display: none; }
.pad-units button { min-height: 44px; padding: 6px 14px; border-radius: 12px; }
.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.key { border: 1.5px solid var(--border); background: var(--surface); font-weight: 800; box-shadow: 0 2px 0 var(--border); min-height: 46px; font-size: 1.3rem; border-radius: 12px; touch-action: manipulation; user-select: none; }
.key.fn { background: var(--surface-2); }
.key:active { transform: scale(0.96); }
.draw-tools { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.draw-tools button { padding: 6px 12px; border-radius: 10px; }
.draw-tools button.on { outline: 2px solid var(--accent); }
.canvas-wrap { height: var(--ink-h); overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
/* Gumbi na plošči: brez povečave ob dvojnem dotiku in brez označevanja besedila (iOS). */
.pad button, .pad summary { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.canvas-wrap, canvas.ink { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
canvas.ink {
  display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; color: var(--text);
  background: repeating-linear-gradient(to bottom, transparent 0 39px, color-mix(in srgb, var(--border) 80%, transparent) 39px 40px), var(--bg);
}
.draw-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.draw-foot .muted { font-size: 0.8rem; flex: 1; min-width: 160px; }
.read-result:not(:empty) { margin-bottom: 8px; }
.read-result .actions { margin: 6px 0 0; }
body.pad-open #view-topic { padding-bottom: calc(var(--pad-h, 0px) + 20px); }
/* Vidni del zaslona (brez orodne vrstice brskalnika), kjer brskalnik to zna. */
@supports (height: 1dvh) {
  .pad { max-height: 66dvh; --ink-h: 30dvh; }
}
/* Ko je prikazano »Prebral sem …«, namig spodaj skrijemo, da platno ostane vidno. */
.read-result:not(:empty) ~ .pad-draw .draw-foot { display: none; }
/* Telefon: besedilo naloge ostane pripeto na vrhu, plošča je spodaj. */
@media (max-width: 899px) {
  /* Pisanje se ne začne na samem robu zaslona (poteg nazaj v iOS/Android). */
  .pad[data-tab="draw"] .canvas-wrap { margin: 0 8px; }
  /* Med vnosom skrijemo zavihke in obvestila, da je za nalogo več prostora. */
  body.pad-open .tabs, body.pad-open .banner, body.pad-open #back-to-path, body.pad-open .task-tag { display: none !important; }
  body.pad-open .pad-tabs button, body.pad-open .pad-close { padding: 6px 10px !important; }
  body.pad-open .task .task-text {
    position: sticky; top: -20px; z-index: 2; max-height: 30vh; overflow-y: auto;
    background: var(--surface); margin: 0 -16px; padding: 8px 16px; border-bottom: 1px solid var(--border);
  }
}
/* Tablica v ležečem položaju in računalnik: naloga levo, plošča desno. */
@media (min-width: 900px) {
  .pad {
    top: var(--pad-top, 60px); left: auto; width: 400px; max-height: none; overflow: hidden;
    border-top: 0; border-left: 1px solid var(--border); border-radius: 0; box-shadow: -8px 0 24px rgba(0,0,0,.08);
    padding-top: 12px;
  }
  .pad[data-tab="draw"] .pad-draw { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .pad .canvas-wrap { flex: 1; height: auto; min-height: 120px; }
  body.pad-open #view-topic { padding-bottom: 40px; margin-right: 400px; width: calc(100% - 400px); max-width: none; }
  body.pad-open #view-topic > * { max-width: 760px; margin-left: auto; margin-right: auto; }
}
/* Telefon ležeče: plošča spodaj bi prekrila nalogo, zato je tudi tu ob strani. */
@media (max-width: 899px) and (min-width: 600px) and (max-height: 500px) {
  .pad {
    top: var(--pad-top, 60px); left: auto; width: min(400px, 48vw); max-height: none; overflow-y: auto;
    border-top: 0; border-left: 1px solid var(--border); border-radius: 0; box-shadow: -8px 0 24px rgba(0,0,0,.08);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .pad[data-tab="draw"] .pad-draw { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .pad .canvas-wrap { flex: 1; height: auto; min-height: 90px; margin: 0; }
  .draw-foot { display: none; }
  /* Strnjeno, da je platno vidno brez drsenja. */
  .pad-head { margin-bottom: 0; }
  .pad-tabs button, .pad-close { padding: 4px 8px !important; }
  .pad-answer { margin: 2px 0 6px; }
  .pad-value { min-height: 36px; font-size: 1.05rem; padding: 4px 10px; }
  .pad-check { padding: 6px 12px; min-height: 36px; }
  .draw-tools { margin-bottom: 4px; gap: 4px; }
  .draw-tools button { padding: 4px 8px; min-height: 34px; }
  .draw-tools button span { display: none; }
  .read-result .fb { padding: 6px 10px; font-size: 0.92rem; }
  body.pad-open #view-topic { padding-bottom: 24px; margin-right: min(400px, 48vw); width: calc(100% - min(400px, 48vw)); max-width: none; }
  body.pad-open .task .task-text { position: static; max-height: none; margin: 0; padding: 0; border: 0; }
}


/* ---------- načini učenja (kartice na učni poti) ---------- */
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 16px; }
.modes button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; min-height: 0;
  padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface);
  box-shadow: 0 var(--press) 0 var(--border); color: var(--text); transition: transform 0.08s, box-shadow 0.08s, border-color 0.15s;
}
.modes button:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.modes button:active { transform: translateY(calc(var(--press) * 0.66)); box-shadow: 0 calc(var(--press) / 3) 0 var(--border); }
.modes button.active { border-color: var(--accent); background: var(--accent-soft); }
.modes .ic { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.modes .ic svg.i { width: 22px; height: 22px; }
.modes .m-name { font-weight: 800; line-height: 1.25; }
.modes .m-sub { font-size: 0.8rem; color: var(--muted); font-weight: 600; line-height: 1.3; }
.modes .badge, .tabbar .badge {
  position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px;
  background: var(--gold); color: #fff; font-size: 0.72rem; line-height: 20px; text-align: center; font-weight: 900; border: 2px solid var(--surface);
}
@media (max-width: 520px) {
  /* Telefon: štirje načini v mreži 2 × 2, ikona levo od imena. */
  .modes { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .modes button { flex-direction: row; align-items: center; text-align: start; gap: 10px; padding: 10px; }
  .modes .ic { margin: 0; width: 36px; height: 36px; flex: none; }
  .modes .m-name { font-size: 0.9rem; }
  .modes .m-sub { display: none; }
}

/* ---------- kartice za ponavljanje (public/flashcards.js) ---------- */
#view-cards h1.with-icon svg.i { color: var(--accent); }
.fc-review { margin: 12px 0 16px; }
.fc-card { padding: 18px; border: 1.5px solid var(--border); box-shadow: 0 var(--press) 0 var(--border); }
.fc-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.85rem; font-weight: 700; margin-bottom: 10px; }
.fc-front { font-size: 1.15rem; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.fc-backside { margin-top: 14px; padding-top: 14px; border-top: 1.5px dashed var(--border); line-height: 1.5; overflow-wrap: anywhere; }
.fc-card .actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.fc-card .actions button { flex: 1 1 140px; justify-content: center; min-height: 44px; }
.fc-keys { font-size: 0.78rem; margin: 10px 0 0; }
@media (hover: none) and (pointer: coarse) { .fc-keys { display: none; } }
.fc-front .katex-display, .fc-backside .katex-display, .cards-note .katex-display { overflow-x: auto; overflow-y: hidden; }
.fc-list summary { cursor: pointer; padding: 2px 0; }
.fc-list ul { list-style: none; margin: 10px 0 0; padding: 0; }
.fc-list li { display: flex; gap: 8px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.fc-row-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fc-row-text p { margin: 0; }
.fc-q { font-weight: 700; }
.fc-a { margin-top: 2px; }
.fc-row-btns { display: flex; gap: 2px; flex: none; }
.fc-form { display: grid; gap: 10px; margin-top: 16px; }
.fc-form h2 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.fc-form label { display: grid; gap: 4px; font-weight: 700; font-size: 0.9rem; }
.fc-form textarea { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; }
.fc-list .fc-form { flex: 1; margin: 0; }
.fc-err:empty { display: none; }
.fc-done h2, .fc-empty p:first-child { margin-top: 0; }
/* Pod odgovorom inštruktorja: dodane kartice */
.cards-note { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); font-size: 0.92rem; }
.cards-note .cn-head { display: flex; align-items: center; gap: 6px; color: var(--accent); }
.cards-note .cn-head b { color: var(--text); }
.cards-note ul { margin: 6px 0 4px; padding-inline-start: 20px; }
.cards-note li p { margin: 0; }
.cards-note .text-btn { display: inline-flex; align-items: center; gap: 4px; padding: 2px 0; }
/* Predlog spremembe šole/letnika, ki ga da inštruktor (public/chat-settings.js). */
.set-proposal { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); font-size: 0.92rem; }
.set-proposal .sp-head { display: flex; align-items: center; gap: 6px; color: var(--accent); }
.set-proposal .sp-head b { color: var(--text); }
.set-proposal .sp-change { margin: 6px 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.set-proposal .sp-arrow { width: 16px; height: 16px; color: var(--muted); }
[dir="rtl"] .set-proposal .sp-arrow { transform: scaleX(-1); }
.set-proposal .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.set-proposal .actions button { min-height: 40px; }
.set-proposal .sp-result { margin: 4px 0 0; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.set-proposal .sp-result.ok { color: var(--text); font-weight: 600; }
.set-proposal .sp-result svg { width: 16px; height: 16px; color: var(--accent); }
/* Okvir »Zapomni si« v odgovorih inštruktorja (Markdown citat) */
.msg.assistant blockquote { margin: 10px 0; padding: 8px 12px; border-inline-start: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0; border-start-end-radius: 10px; border-end-end-radius: 10px; }
.msg.assistant blockquote p { margin: 0.2em 0; }

/* ---------- spodnja vrstica (telefon in tablica na dotik) ---------- */
.tabbar { display: none; }
@media (max-width: 760px), (max-width: 1240px) and (hover: none) and (pointer: coarse) {
  .topbar .tabs { display: none; }
  .tabbar {
    display: flex; flex-shrink: 0; position: relative; z-index: 4;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .tabbar .tab {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 4px 2px; border-radius: 14px; font-size: 0.72rem; font-weight: 800; line-height: 1.15; background: none;
  }
  .tabbar .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .tab svg.i { width: 46px; height: 30px; padding: 4px 12px; border-radius: 99px; transition: background 0.15s; }
  .tabbar .tab:hover { background: none; }
  .tabbar .tab.active { background: none; color: var(--accent); }
  .tabbar .tab.active svg.i { background: var(--accent-soft); }
  .topbar { flex-wrap: nowrap; padding: 8px 12px; }
}
body.pad-open .tabbar { display: none; }
.pad-tabs button { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.draw-tools button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.draw-tools button.on { outline: none; border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
@media (max-width: 480px) { .draw-tools button span { display: none; } .draw-tools { flex-wrap: nowrap; } .draw-tools button { flex: 1; padding: 6px !important; } }
@media (max-width: 760px) { .tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); } }

/* Temni način: preliv ostane dovolj temen za bel tekst. */


/* Izbira šole po korakih (level-picker.js) */
.level-picker { display: grid; gap: 10px; }
.lp-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lp-crumbs:empty { display: none; }
.lp-crumb { border: 1px solid var(--border) !important; background: var(--surface-2) !important; border-radius: 999px !important; padding: 5px 12px !important; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.lp-crumb:hover { border-color: var(--accent) !important; }
.lp-sep { color: var(--muted); }
.lp-q { margin: 4px 0 0; font-weight: 700; }
.lp-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.lp-opt { min-height: 48px; font-size: 1rem; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: start; padding: 8px 12px; gap: 2px; }
.lp-opt small { font-size: 0.78rem; font-weight: 500; color: var(--muted); line-height: 1.25; }
.lp-opt.on { border-color: var(--accent); }
body.onboarding .tabs, body.onboarding .tabbar, body.onboarding #modebar, body.onboarding .student-picker { display: none !important; }

/* Lestev namigov in prepoznana napaka pri nalogi */
.hint-row { display: flex; margin-top: 8px; }
.hint-box:empty { display: none; }
.hint-box { display: grid; gap: 8px; margin-top: 10px; }
.hint-box .task-data { margin-top: 8px; }
.hint-box .formula-body { margin-top: 6px; }
.fb.mistake > svg.i { color: var(--accent); }

/* ---------- števec porabe AI (samo skrbnik, public/usage-meter.js) ---------- */
.stat.usage-meter { border: 0; cursor: pointer; color: var(--text); font: inherit; font-weight: 800; font-size: 0.92rem; }
.stat.usage-meter svg.i { color: var(--accent); }
.stat.usage-meter:hover { background: var(--accent-soft); }
.usage-pop {
  position: fixed; z-index: 60; top: 64px; right: 16px; width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 88px); overflow-y: auto; margin: 0; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.usage-pop[hidden] { display: none; }
.um-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.um-head b { display: inline-flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.um-only { display: flex; align-items: center; gap: 6px; margin: 4px 0 12px; font-size: 0.85rem; }
.um-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.um-totals > div { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.um-totals b { font-size: 1.15rem; }
.um-totals small, .um-totals span { font-size: 0.8rem; }
.um-table { font-size: 0.88rem; }
.um-table td:not(:first-child), .um-table th:not(:first-child) { text-align: right; }
.um-table td:not(:first-child) { white-space: nowrap; }
.um-table th { white-space: normal; vertical-align: bottom; }
.um-table td:first-child { overflow-wrap: anywhere; }
.um-bar { display: block; height: 5px; margin-top: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.um-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.um-bar.mid i { background: #eab308; }
.um-bar.hi i { background: var(--danger); }
.um-advice { margin: 12px 0 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.um-advice h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1rem; }
.um-econ { font-size: 0.85rem; margin: 0 0 10px; }
.um-tip { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border-inline-start: 4px solid var(--muted); margin-bottom: 8px; font-size: 0.9rem; }
.um-tip.ok { border-inline-start-color: var(--ok); }
.um-tip.act { border-inline-start-color: #eab308; }
.um-tip p { margin: 4px 0 0; }
.um-claim { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
@media (max-width: 760px) {
  .usage-pop { top: 56px; right: 16px; }
  .stat.usage-meter { font-size: 0.85rem; }
}
@media (max-width: 420px) {
  .stat.usage-meter { padding: 5px 8px; gap: 0; }
  .stat.usage-meter svg.i { display: none; }
}
@media (max-width: 400px) {
  .um-totals { grid-template-columns: 1fr 1fr; }
  .um-totals > div:last-child { grid-column: 1 / -1; }
}

/* ---------- celozaslonski način (public/fullscreen.js) ---------- */
.check-row { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check-row input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.check-row span { display: flex; flex-direction: column; gap: 2px; }
