/* Pro studenty · Kamil Kopecký — design systém (světlý i tmavý režim) */
:root {
  --bg: #F3F5F9; --surface: #FFFFFF; --surface2: #F7F8FB; --text: #0D1B2A; --muted: #4B5870; --muted2: #3B4860;
  --line: #D9E0EA; --line2: #E7EBF2; --navy: #0F2747; --navy2: #0A1C34; --btn: #0F2747; --btnText: #FFFFFF;
  --sun: #FFC940; --sunInk: #7A5600; --sunSoft: #FFF1CC; --link: #1F4E8C;
  --blueSoft: #E4ECF8; --blueInk: #1F4E8C; --mintSoft: #E3F3EE; --mintInk: #1C6B57; --coralSoft: #FDEBE4; --coralInk: #A3330F;
  --ok: #16855C; --danger: #B42318; --dangerSoft: #FDE7E4; --help: #C73E14;
  --shadow: 0 8px 22px rgba(15,39,71,.06); --shadow2: 0 14px 34px rgba(15,39,71,.12); --shadow3: 0 18px 34px rgba(15,39,71,.16);
  --r: 24px; --r2: 18px; --r3: 14px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #081426; --surface: #0F2140; --surface2: #0C1B36; --text: #EAF0F8; --muted: #A9B8CF; --muted2: #C3CFE0;
  --line: #22406A; --line2: #183156; --navy: #050E1C; --navy2: #030A15; --btn: #2A5BA8; --btnText: #FFFFFF;
  --sunInk: #FFD978; --sunSoft: #3D3110; --link: #A9C8F5;
  --blueSoft: #16335E; --blueInk: #A9C8F5; --mintSoft: #123D35; --mintInk: #8FE0C6; --coralSoft: #40221A; --coralInk: #FFB49B;
  --ok: #5EE0A8; --danger: #FF9C8F; --dangerSoft: #43201C;
  --shadow: 0 8px 22px rgba(0,0,0,.25); --shadow2: 0 14px 34px rgba(0,0,0,.35); --shadow3: 0 18px 34px rgba(0,0,0,.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); }
img { max-width: 100%; }
h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--sun); color: #0F2747; padding: 10px 14px; border-radius: 10px; z-index: 100; font-weight: 700; }
.skip:focus { top: 12px; }
.ic { flex: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }
main { flex: 1 0 auto; }

/* tlačítka */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r3); border: 1px solid transparent; background: var(--btn); color: var(--btnText); font-weight: 700; font-size: 14.5px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .12s ease, filter .12s ease; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-sun { background: var(--sun); color: #0F2747; font-weight: 800; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-soft { background: var(--line2); color: var(--text); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 11px; }
.btn-icon { width: 44px; padding: 0; }
.btn-sm.btn-icon { width: 36px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--line2); color: var(--muted2); }
.pill-blue { background: var(--blueSoft); color: var(--blueInk); } .pill-mint { background: var(--mintSoft); color: var(--mintInk); }
.pill-sun { background: var(--sunSoft); color: var(--sunInk); } .pill-coral { background: var(--coralSoft); color: var(--coralInk); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #5EE0A8; box-shadow: 0 0 0 4px rgba(94,224,168,.18); display: inline-block; }
.code { padding: 3px 9px; border-radius: 8px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--muted2); }

/* hlavička (tmavě modrá) */
.top { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.top a { color: inherit; text-decoration: none; }
.top-bar { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid var(--sun); }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name b { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.brand-name span { font-size: 12.5px; font-weight: 700; color: var(--sun); letter-spacing: .05em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.glass { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: rgba(5,14,28,.55); border: 1px solid rgba(255,255,255,.18); font-size: 14px; font-weight: 600; color: #fff; }
.glass-btn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid rgba(255,255,255,.25); background: rgba(5,14,28,.45); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.glass-btn.wide { width: auto; padding: 0 16px; gap: 8px; font-weight: 700; font-size: 14px; }
.theme-toggle .ic-sun { display: none; } [data-theme="dark"] .theme-toggle .ic-sun { display: block; } [data-theme="dark"] .theme-toggle .ic-moon { display: none; }
.hero { position: relative; z-index: 1; padding-top: 34px; padding-bottom: 118px; display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; max-width: 600px; }
.hero h1 mark { background: none; color: inherit; box-shadow: inset 0 -0.32em 0 rgba(255,201,64,.55); }
.hero p.lead { font-size: 18px; color: #C5D1E4; max-width: 520px; }
.hero-img { position: absolute; right: 0; top: 0; height: 100%; width: 60%; object-fit: cover; -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%); mask-image: linear-gradient(to right, transparent 0%, #000 38%); }
.author-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; background: rgba(5,14,28,.5); border: 1px solid rgba(255,255,255,.16); font-size: 14px; }
.author-chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.author-chip span { color: #B9C6DC; }
.search { position: relative; max-width: 580px; }
.search .ic { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #4B5870; }
.search input { width: 100%; height: 60px; padding: 0 20px 0 52px; border-radius: 18px; border: 0; background: #fff; color: #0D1B2A; font-size: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.28); }
.search input::placeholder { color: #7D8AA3; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tags .lbl { font-size: 13px; color: #B9C6DC; margin-right: 4px; }
.tag { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(5,14,28,.45); color: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.tag:hover { background: rgba(255,255,255,.16); }
@media (max-width: 900px) { .hero-img { position: relative; width: 100%; height: 220px; -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); } .hero { padding-top: 0; } }

/* karta pokračování */
.resume { margin-top: -60px; position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 20px 24px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow2); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.resume-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--sunSoft); color: var(--sunInk); display: flex; align-items: center; justify-content: center; flex: none; }
.resume-body { flex: 999 1 320px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eyebrow { font-size: 12.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.progress { height: 8px; border-radius: 99px; background: var(--line2); overflow: hidden; max-width: 520px; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--sun); }
.spacer-top { height: 40px; }

/* sekce + karty předmětů */
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 52px 0 22px; }
.sec-head h2 { font-size: 30px; font-weight: 800; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--line2); }
.seg button { min-height: 40px; padding: 0 16px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(15,39,71,.12); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow3); }
.card-cover { height: 158px; position: relative; overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-cover > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-badges { position: absolute; left: 14px; top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.card-badges .pill { background: var(--surface); color: var(--text); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.card-body h3 { font-size: 20px; font-weight: 800; line-height: 1.22; }
.card-alias { font-size: 13px; color: var(--muted); margin-top: 4px; }
.card-desc { color: var(--muted2); font-size: 14.5px; }
.codes { display: flex; flex-wrap: wrap; gap: 6px; }
.card-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line2); color: var(--muted); font-size: 13px; font-weight: 600; }
.card-foot .meta { display: flex; gap: 12px; flex-wrap: wrap; }
.go { width: 36px; height: 36px; border-radius: 12px; background: var(--btn); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.tint-blue { background: var(--blueSoft); color: var(--blueInk); } .tint-mint { background: var(--mintSoft); color: var(--mintInk); }
.tint-sun { background: var(--sunSoft); color: var(--sunInk); } .tint-coral { background: var(--coralSoft); color: var(--coralInk); }
.empty { padding: 48px 24px; text-align: center; border: 2px dashed var(--line); border-radius: var(--r); color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* předmět */
.crumbs { font-size: 14px; color: #B9C6DC; }
.crumbs a { color: #fff; font-weight: 600; }
.subj-hero { padding-bottom: 96px; }
.subj-hero h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1; letter-spacing: -0.035em; max-width: 640px; }
.alias { font-size: 15px; font-weight: 600; color: #FFD978; }
.subj-codes { display: flex; flex-wrap: wrap; gap: 6px; max-width: 640px; }
.subj-codes span { padding: 4px 10px; border-radius: 8px; background: rgba(5,14,28,.5); border: 1px solid rgba(255,255,255,.18); font-size: 13px; font-weight: 700; }
.tabs { margin-top: -40px; position: relative; z-index: 3; display: flex; gap: 4px; padding: 6px; overflow-x: auto; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow2); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; min-height: 48px; padding: 0 16px; border-radius: 14px; color: var(--muted); font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--btn); color: #fff; }
.tabs .n { padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--line2); color: var(--muted); }
.tabs a[aria-current="page"] .n { background: var(--sun); color: #0F2747; }
.tabs .n.hot { background: var(--help); color: #fff; }
.tab-body { padding: 36px 0 90px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pres-card .thumb { padding: 20px 22px 0; }
.pres-card .thumb .sr-slide { border-radius: 12px 12px 0 0; box-shadow: 0 -2px 18px rgba(15,39,71,.10); pointer-events: none; }
.pres-card .card-body h3 { font-size: 19px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); }
.row + .row { margin-top: 10px; }
.row-ic { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; font-size: 11px; font-weight: 800; }
.row-main { flex: 999 1 240px; min-width: 0; }
.row-main b { display: block; font-weight: 700; }
.row-main small { display: block; font-size: 13.5px; color: var(--muted); }
.row-act { display: flex; gap: 8px; flex-wrap: wrap; }
.kw { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); }
.kw b { font-size: 17px; font-weight: 800; box-shadow: inset 0 -0.35em 0 var(--sunSoft); }
.kw p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.video { aspect-ratio: 16 / 9; background: var(--navy); border-radius: var(--r2) var(--r2) 0 0; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .play { width: 64px; height: 64px; border-radius: 50%; background: var(--sun); color: #0F2747; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px rgba(255,201,64,.18); border: 0; cursor: pointer; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.chat-fab { position: fixed; right: 22px; bottom: 22px; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px; background: var(--btn); color: #fff; box-shadow: 0 16px 40px rgba(15,39,71,.28); font-weight: 700; text-decoration: none; border: 0; cursor: pointer; }
.chat-fab .b { width: 40px; height: 40px; border-radius: 50%; background: var(--sun); color: #0F2747; display: flex; align-items: center; justify-content: center; }
.chat-fab .n { padding: 1px 8px; border-radius: 999px; background: var(--help); font-size: 12px; }

/* heslo */
.gate { max-width: 460px; margin: -60px auto 80px; position: relative; z-index: 3; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow2); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13.5px; font-weight: 700; color: var(--muted2); }
.input, .field input:not([type=file]):not([type=checkbox]):not([type=radio]), .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 15px; }
.field textarea, textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:not([type=file]):focus, .field select:focus, .field textarea:focus { border-color: var(--link); outline: none; box-shadow: 0 0 0 3px var(--blueSoft); }
.hint { font-size: 13px; color: var(--muted); }
.alert { padding: 12px 16px; border-radius: 13px; font-size: 14px; font-weight: 600; }
.alert-err { background: var(--dangerSoft); color: var(--danger); }
.alert-ok { background: var(--mintSoft); color: var(--mintInk); }
.alert-warn { background: var(--sunSoft); color: var(--sunInk); }

/* patička */
.foot { background: var(--navy); color: #B9C6DC; margin-top: auto; }
.foot .wrap { padding-top: 26px; padding-bottom: 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 13.5px; }
.foot img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.foot b { color: #fff; display: block; }
.foot a { color: #fff; }

/* prohlížeč prezentace */
.viewer { display: grid; grid-template-columns: 200px minmax(0, 1fr) 340px; gap: 20px; padding: 20px 24px; max-width: 1640px; margin: 0 auto; width: 100%; }
.v-thumbs { display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 130px); overflow-y: auto; position: sticky; top: 16px; padding-right: 4px; }
.v-thumbs button { border: 2px solid transparent; padding: 0; border-radius: 10px; background: none; cursor: pointer; position: relative; display: block; }
.v-thumbs button[aria-current="true"] { border-color: var(--sun); }
.v-thumbs .num { position: absolute; left: 6px; top: 6px; background: rgba(5,14,28,.75); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; z-index: 2; }
.v-thumbs .sr-slide { border-radius: 8px; pointer-events: none; }
.v-thumbs .has-audio { position: absolute; right: 6px; bottom: 6px; background: var(--sun); color: #0F2747; border-radius: 6px; padding: 2px; z-index: 2; display: flex; }
.v-stage { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.v-slide-wrap { position: relative; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow2); }
.v-slide-wrap .sr-slide { width: 100%; }
.v-slide-wrap .nav-zone { position: absolute; top: 0; bottom: 0; width: 18%; z-index: 5; cursor: pointer; background: none; border: 0; }
.v-slide-wrap .nav-zone.prev { left: 0; } .v-slide-wrap .nav-zone.next { right: 0; }
.v-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.v-bar .count { font-weight: 800; min-width: 74px; text-align: center; }
.v-bar .grow { flex: 1; }
.v-progress { height: 6px; border-radius: 99px; background: var(--line2); overflow: hidden; }
.v-progress span { display: block; height: 100%; background: var(--sun); transition: width .2s ease; }
.v-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: 18px 20px; }
.panel h3 { font-size: 15px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.comment-text { font-size: 15px; line-height: 1.6; white-space: pre-line; }
.audio { display: flex; align-items: center; gap: 10px; }
.audio .seek { flex: 1; accent-color: var(--sun); }
.audio .t { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 78px; text-align: right; }
.speed { min-height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 0 8px; font-size: 13px; font-weight: 700; }
.v-full .viewer { grid-template-columns: minmax(0, 1fr); padding: 0; max-width: none; }
.v-full .v-thumbs, .v-full .v-side { display: none; }
.viewer-page.v-full .top, .viewer-page.v-full .foot { display: none; }
.viewer-page.v-full { background: #000; }
.viewer-page.v-full .v-stage { height: 100vh; justify-content: center; }
.viewer-page.v-full .v-slide-wrap { border-radius: 0; max-height: calc(100vh - 60px); aspect-ratio: 16/9; margin: 0 auto; width: min(100vw, calc((100vh - 60px) * 16 / 9)); }
.viewer-page.v-full .v-bar { padding: 0 16px 10px; color: #fff; }
.viewer-page.v-full .v-progress { display: none; }
.slide-int { position: absolute; z-index: 6; }
@media (max-width: 1180px) { .viewer { grid-template-columns: minmax(0, 1fr) 320px; } .v-thumbs { display: none; } }
@media (max-width: 860px) { .viewer { grid-template-columns: minmax(0, 1fr); padding: 12px; } .v-slide-wrap { border-radius: 10px; } }

/* sdílené slajdy */
.sr-slide { position: relative; overflow: hidden; width: 100%; background: #fff; color: #000; line-height: 1.2; font-family: Carlito, Arimo, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.sr-el { position: absolute; box-sizing: border-box; }
.sr-missing { background: repeating-linear-gradient(45deg, #f1f3f7 0 10px, #e5e9f0 10px 20px); border: 1px dashed #b8c2d3; color: #4B5870; font: 600 12px var(--font); display: flex; align-items: center; justify-content: center; text-align: center; }
.sr-p { margin: 0; }
.sr-text a { color: inherit; }

/* mapa */
.map-wrap { position: relative; height: calc(100vh - 210px); min-height: 480px; background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; touch-action: none; }
.map-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.map-node { position: absolute; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 15px; font-weight: 700; display: flex; flex-direction: column; justify-content: center; text-align: center; overflow-wrap: break-word; hyphens: manual; box-shadow: var(--shadow); cursor: pointer; overflow: hidden; color: var(--text); line-height: 1.35; }
.map-node .md { font-weight: 500; font-size: 13px; color: var(--muted2); margin-top: 4px; text-align: left; }
.map-node.hub { font-size: 17px; font-weight: 800; border-width: 3px; border-color: var(--sun); background: var(--sunSoft); color: var(--text); box-shadow: var(--shadow2); }
[data-theme="dark"] .map-node { border-color: #3A5C8E; }
[data-theme="dark"] .map-node.hub { border-color: var(--sun); }
.map-node.group { background: transparent; border-style: dashed; box-shadow: none; font-size: 14px; color: var(--muted); cursor: default; justify-content: flex-start; text-align: left; }
.map-node.sel { border-color: var(--sun); box-shadow: 0 0 0 4px rgba(255,201,64,.35); }
.map-node.dim { opacity: .35; }
.map-node img { max-width: 100%; border-radius: 8px; display: block; }
.map-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.map-edges text { font: 600 13px var(--font); fill: var(--muted2); paint-order: stroke; stroke: var(--surface2); stroke-width: 4px; }
.map-tools { position: absolute; right: 14px; top: 14px; display: flex; gap: 6px; z-index: 4; }
.map-info { position: absolute; left: 14px; bottom: 14px; right: 14px; max-width: 520px; z-index: 4; }
.map-c-1 { border-color: #E5484D; } .map-c-2 { border-color: #F28C28; } .map-c-3 { border-color: #E0B000; } .map-c-4 { border-color: #2E9E5B; } .map-c-5 { border-color: #18A0C8; } .map-c-6 { border-color: #7B4CC2; }

/* test */
.quiz { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: 22px; }
.q h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; line-height: 1.4; }
.q .opts { display: flex; flex-direction: column; gap: 8px; }
.q label.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.q label.opt:hover { border-color: var(--link); }
.q label.opt input { margin-top: 3px; accent-color: var(--btn); width: 18px; height: 18px; }
.q .ok { border-color: var(--ok) !important; background: var(--mintSoft); }
.q .bad { border-color: var(--danger) !important; background: var(--dangerSoft); }
.q .expl { margin-top: 12px; font-size: 14px; color: var(--muted2); padding: 10px 14px; background: var(--surface2); border-radius: 12px; }
.score { text-align: center; padding: 28px; background: var(--navy); color: #fff; border-radius: var(--r); }
.score b { font-size: 52px; font-weight: 800; color: var(--sun); display: block; }

/* chat */
.chat { display: flex; flex-direction: column; height: min(720px, calc(100vh - 140px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-head .grow { flex: 1; min-width: 0; }
.chat-pinned { background: var(--sunSoft); color: var(--sunInk); padding: 10px 16px; display: flex; gap: 10px; font-size: 13.5px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.msg .av { width: 34px; height: 34px; flex: none; }
.msg-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.msg-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--muted2); flex-wrap: wrap; }
.msg-meta time { font-weight: 600; color: var(--muted); }
.badge-t { padding: 1px 7px; border-radius: 6px; background: var(--sun); color: #0F2747; font-size: 11px; font-weight: 800; }
.bubble { padding: 10px 13px; border-radius: 4px 18px 18px 18px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.teacher .bubble { background: var(--blueSoft); }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .bubble { background: var(--btn); color: #fff; border-color: transparent; border-radius: 18px 4px 18px 18px; }
.msg.mine .bubble a { color: #fff; }
.msg.mine .msg-meta { justify-content: flex-end; }
.msg.pinned .bubble { box-shadow: 0 0 0 2px var(--sun); }
.quote { margin-bottom: 6px; padding: 6px 9px; border-radius: 10px; background: rgba(127,140,170,.16); font-size: 12.5px; white-space: normal; }
.slide-ref { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; padding: 8px; border-radius: 12px; background: rgba(127,140,170,.16); text-decoration: none; color: inherit; font-size: 12.5px; white-space: normal; }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; }
.reacts button { min-height: 28px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 700; cursor: pointer; }
.reacts button.on { border-color: var(--sun); background: var(--sunSoft); }
.msg-tools { display: none; gap: 2px; }
.msg:hover .msg-tools, .msg:focus-within .msg-tools { display: flex; }
.msg-tools button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 3px 5px; border-radius: 6px; font-size: 13px; }
.msg-tools button:hover { background: var(--line2); color: var(--text); }
.chat-compose { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-compose .row2 { display: flex; gap: 8px; align-items: flex-end; }
.chat-compose textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 140px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); resize: none; line-height: 1.4; }
.me-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 2px 10px 2px 2px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; cursor: pointer; }
.me-chip .av { width: 26px; height: 26px; }
.emoji-pop { display: flex; flex-wrap: wrap; gap: 4px; }
.emoji-pop button { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--line2); font-size: 20px; cursor: pointer; }
.typing { font-size: 13px; color: var(--muted); }
.av { border-radius: 50%; overflow: hidden; display: inline-block; flex: none; }
.av svg, .av img { width: 100%; height: 100%; display: block; object-fit: cover; }
.online-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.online-list > span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--line2); font-size: 12.5px; font-weight: 700; }
.online-list .av { width: 22px; height: 22px; }
.modal { position: fixed; inset: 0; background: rgba(5,14,28,.55); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { width: 100%; max-width: 480px; background: var(--surface); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow3); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-box.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { font-size: 20px; }
.av-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.av-grid button { padding: 3px; border-radius: 50%; border: 3px solid transparent; background: none; cursor: pointer; aspect-ratio: 1; }
.av-grid button[aria-pressed="true"] { border-color: var(--sun); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; z-index: 80; box-shadow: var(--shadow3); max-width: calc(100vw - 32px); }
.toast.err { background: var(--danger); }

/* vyhledávání */
.result { display: block; text-decoration: none; color: var(--text); }
.result mark { background: var(--sunSoft); color: inherit; border-radius: 4px; padding: 0 2px; }

/* embed */
.embed-body { background: #000; margin: 0; min-height: 0; }
.embed { display: flex; flex-direction: column; height: 100vh; }
.embed .stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.embed .stage .sr-slide { max-height: 100%; width: auto; height: 100%; max-width: 100%; }
.embed .bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #0F2747; color: #fff; font: 600 13px var(--font); }
.embed .bar a { color: #FFC940; margin-left: auto; text-decoration: none; }
.embed .bar button { background: rgba(255,255,255,.1); color: #fff; border: 0; border-radius: 8px; height: 32px; min-width: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

.field input[type=file] { font-size: 14px; max-width: 100%; }
.viewer-page .top .wrap { max-width: 1640px; }

/* vypnutý předmět: v seznamu šedě a bez akce */
.card-off { filter: grayscale(1); opacity: .55; cursor: not-allowed; box-shadow: none; }
.card-off .card-cover img { filter: contrast(.85); }
.card-off .meta { font-weight: 700; }

/* pojmová mapa: buňky s obrázkem a videem */
.map-node.has-media { justify-content: flex-start; gap: 6px; padding: 10px 12px 12px; }
.map-node .mn-t { line-height: 1.3; }
.map-node .mn-media { width: 100%; border-radius: 9px; overflow: hidden; flex: 1 1 auto; min-height: 60px; background: var(--line2); position: relative; }
.map-node .mn-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; pointer-events: none; }
.map-node .mn-video { background: #101828 center/cover no-repeat; aspect-ratio: 16/9; flex: none; cursor: pointer; }
.mn-play { position: absolute; left: 50%; top: 50%; width: 54px; height: 38px; margin: -19px 0 0 -27px; border-radius: 11px; background: rgba(229,45,39,.92); box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: transform .15s; }
.mn-play::after { content: ""; position: absolute; left: 22px; top: 11px; border-style: solid; border-width: 8px 0 8px 14px; border-color: transparent transparent transparent #fff; }
.map-node .mn-video:hover .mn-play, .mi-video-btn:hover .mn-play { transform: scale(1.08); }
.map-node .mn-doc, .map-node .mn-link { font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-node .mn-doc:hover, .map-node .mn-link:hover { text-decoration: underline; }
.mi-media { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.mi-video { width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; }
.mi-video iframe, .mi-video video { width: 100%; height: 100%; border: 0; display: block; }
.mi-video-btn { all: unset; display: block; width: 100%; height: 100%; background: #101828 center/cover no-repeat; position: relative; cursor: pointer; }
.mi-video-btn:focus-visible { outline: 3px solid var(--sun); }
.mi-img img { max-width: 100%; max-height: 300px; border-radius: 12px; display: block; }
.map-info { max-height: calc(100% - 90px); overflow: auto; }

/* přezdívka studenta v záhlaví */
.glass-btn.me-top { width: auto; padding: 0 14px 0 5px; gap: 9px; font-weight: 700; font-size: 14px; border-radius: 999px; max-width: 260px; }
.glass-btn.me-top[hidden] { display: none; }
.me-top .av { width: 34px; height: 34px; background: #fff; box-shadow: 0 0 0 2px rgba(255,201,64,.85); }
.me-top-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glass-btn.me-top:hover { background: rgba(5,14,28,.65); }
@media (max-width: 720px) { .glass-btn.me-top { padding: 0 4px; } .me-top-name { display: none; } }

/* videa v přehledu */
.video[data-video-src] { cursor: pointer; }
.video[data-video-src]:focus-visible { outline: 3px solid var(--sun); outline-offset: -3px; }
.video .play { position: relative; z-index: 1; transition: transform .15s; }
.video[data-video-src]:hover .play { transform: scale(1.08); }
.video-ext { text-decoration: none; flex-direction: column; gap: 10px; }
.video-ext-lbl { color: #fff; font-weight: 700; font-size: 14px; position: relative; z-index: 1; }
.video-out { display: inline-block; margin-top: 6px; font-size: 13px; }

/* odkazy ve slajdech */
.sr-slide a.sr-link { text-decoration: underline; text-underline-offset: .12em; cursor: pointer; }
.sr-slide a.sr-link:hover { filter: brightness(1.15); }
.sr-slide a.sr-hit:hover { background: rgba(255,201,64,.12); outline: .3cqh solid rgba(255,201,64,.8); border-radius: .6cqh; }
.sr-slide a.sr-hit:focus-visible { outline: .4cqh solid #FFC940; }

/* čitelné odznaky v záhlaví i nad světlou ilustrací */
.top-actions .glass, .top-actions .glass-btn {
  background: rgba(10, 24, 46, .9); border: 1px solid rgba(255,255,255,.35);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 6px 18px rgba(5,14,28,.35); text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.top-actions .glass-btn:hover, .top-actions .glass-btn.me-top:hover { background: #0F2747; border-color: rgba(255,201,64,.75); }
.top-actions .glass .dot { box-shadow: 0 0 0 3px rgba(46,158,91,.35); }
.top-actions .glass-btn.btn-sun { background: var(--sun); color: #0F2747; text-shadow: none; }
.top-bar { position: relative; z-index: 5; }

/* skupiny videí */
.vid-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.vid-jump a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none; }
.vid-jump a span { background: var(--line2); border-radius: 99px; padding: 0 7px; font-size: 12px; }
.vid-jump a:hover { border-color: var(--sun); }
.vid-h { font-size: 22px; margin: 26px 0 12px; scroll-margin-top: 20px; }
.vid-h:first-of-type { margin-top: 10px; }

/* ───── responzivita pro studenty (tablet, mobil) ───── */
@media (max-width: 760px) {
  .map-tools { left: 10px; right: 10px; top: 10px; flex-wrap: wrap; justify-content: flex-end; }
  .map-tools [data-map-search] { flex: 1 1 100%; width: auto !important; order: -1; }
  .map-wrap { height: calc(100svh - 170px); min-height: 420px; }
  .map-info { left: 8px; right: 8px; bottom: 8px; max-height: 58%; }
}
@media (max-width: 600px) {
  .top-bar { padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  .top-actions { gap: 6px; flex-wrap: nowrap; }
  .top-actions .glass { padding: 8px 11px; font-size: 13px; }
  .top-actions [data-online-label] { white-space: nowrap; }
  .top-actions [data-online-label] .dot ~ span + * { display: none; }
  .glass-btn { width: 40px; height: 40px; }
  .glass-btn.wide { width: 40px; padding: 0; }
  .glass-btn.wide span { display: none; }
  .glass-btn.me-top { width: auto; }
  .me-top .av { width: 30px; height: 30px; }
  .chat-fab { right: 14px; bottom: 14px; padding: 6px; }
  .chat-fab { font-size: 0; gap: 0; }
  .chat-fab .n { font-size: 11px; position: absolute; top: -4px; right: -4px; }
  .vid-h { font-size: 19px; }
}
@media (max-width: 380px) {
  .brand-name span { display: none; }
}

/* buňky mapy: text se vždy vejde */
.map-node { overflow-wrap: anywhere; }
.map-node a { overflow-wrap: anywhere; }
.map-measure .map-node .mn-img { height: 150px; flex: none; }
.map-node .mn-img { min-height: 120px; }
.map-node { justify-content: safe center; }
/* buňky mapy zarovnané vlevo */
.map-node { text-align: left; align-items: stretch; }
.map-node .mn-t { text-align: left; }
.map-node .md { margin-top: 2px; }

/* sylabus */
.prose { line-height: 1.65; font-size: 16px; }
.prose h2, .prose h3, .prose h4 { margin: 1.3em 0 .4em; line-height: 1.25; }
.prose h2 { font-size: 22px; } .prose h3 { font-size: 19px; } .prose h4 { font-size: 17px; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: .5em 0; } .prose ul, .prose ol { margin: .4em 0 .8em; padding-left: 1.4em; } .prose li { margin: .25em 0; }
.prose a { color: var(--link); font-weight: 600; overflow-wrap: anywhere; }
.syllabus { max-width: 860px; padding: 28px 32px; }
/* co bych měl/a umět */
.outcomes { max-width: 900px; }
.oc-progress { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.oc-progress p { margin: 2px 0 0; }
.oc-meter { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; max-width: 380px; }
.oc-bar { flex: 1; height: 12px; border-radius: 99px; background: var(--line2); overflow: hidden; }
.oc-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), #2E9E5B); border-radius: 99px; transition: width .35s ease; }
.oc-num { font-weight: 800; white-space: nowrap; }
.oc-list { display: flex; flex-direction: column; gap: 8px; }
.oc-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.oc-item:hover { border-color: var(--sun); }
.oc-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.oc-box { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: transparent; transition: all .15s; }
.oc-item input:focus-visible + .oc-box { outline: 3px solid var(--sun); outline-offset: 2px; }
.oc-item.is-done { background: color-mix(in srgb, #2E9E5B 9%, var(--surface)); border-color: color-mix(in srgb, #2E9E5B 45%, var(--line)); }
.oc-item.is-done .oc-box { background: #2E9E5B; border-color: #2E9E5B; color: #fff; }
.oc-text { flex: 1; font-weight: 600; line-height: 1.4; }
.oc-where { font-size: 14px; font-weight: 700; color: var(--link); white-space: nowrap; text-decoration: none; }
.oc-where:hover { text-decoration: underline; }
@media (max-width: 600px) { .oc-item { flex-wrap: wrap; } .oc-where { margin-left: 40px; } .syllabus { padding: 20px 18px; } }
