/* 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; }
/* slajd nesmí dědit styly okolí (náhledy jsou uvnitř tlačítek: zarovnání na střed, písmo tlačítka…) */
.sr-slide { text-align: left; font-size: 16px; font-weight: 400; font-style: normal; letter-spacing: normal; word-spacing: normal; text-transform: none; text-indent: 0; white-space: normal; font-variant: normal; font-stretch: normal; }
.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; } }

/* materiály s náhledem titulní strany */
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.mat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2, 14px); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.mat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow3, var(--shadow)); }
.mat-cover { position: relative; aspect-ratio: 4 / 3; background: var(--surface2, #eef2f7); display: flex; align-items: flex-start; justify-content: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.mat-cover img { width: 86%; margin-top: 7%; box-shadow: 0 6px 18px rgba(15,39,71,.22); border-radius: 3px; display: block; }
.mat-ext { align-self: center; font-size: 30px; font-weight: 900; color: var(--muted); letter-spacing: .04em; }
.mat-badge { position: absolute; right: 10px; bottom: 10px; background: var(--navy, #0F2747); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; }
.mat-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mat-body b { line-height: 1.3; }
.mat-body small { color: var(--muted); font-size: 13px; }
.mat-act { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; flex-wrap: wrap; }
@media (max-width: 600px) { .mat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .mat-body { padding: 10px; } .mat-act .btn { flex: 1; } }

.mn-resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--muted) 50%, var(--muted) 58%, transparent 58%, transparent 70%, var(--muted) 70%, var(--muted) 78%, transparent 78%); opacity: .5; }
.map-node.sel .mn-resize, .map-node:hover .mn-resize { opacity: 1; }

/* video na slajdu */
.sr-video { cursor: pointer; }
.sr-video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 14cqh; height: 10cqh; min-width: 44px; min-height: 32px; border: 0; border-radius: 2.5cqh; background: rgba(229,45,39,.92); cursor: pointer; z-index: 2; box-shadow: 0 1cqh 3cqh rgba(0,0,0,.35); }
.sr-video-play span { position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: 2.2cqh 0 2.2cqh 3.6cqh; border-color: transparent transparent transparent #fff; }
.sr-video:hover .sr-video-play { background: #e52d27; }
.sr-video-lbl { position: absolute; left: 1cqh; top: 1cqh; background: rgba(0,0,0,.65); color: #fff; font: 700 2.2cqh "Plus Jakarta Sans", sans-serif; padding: .4cqh 1cqh; border-radius: .8cqh; z-index: 3; }
.mat-cover { text-decoration: none; }
/* výrazné nadpisy skupin (videa, materiály, dovednosti) */
.vid-h { display: flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 800; margin: 46px 0 18px; padding-top: 26px; border-top: 2px solid var(--line); scroll-margin-top: 16px; }
.vid-h::before { content: ""; width: 6px; align-self: stretch; min-height: 28px; border-radius: 4px; background: var(--sun); flex: none; }
.vid-jump + .vid-h, .tab-body > .vid-h:first-child, .outcomes .oc-progress + .vid-h { border-top: 0; padding-top: 0; margin-top: 18px; }
.vid-h-n { font-size: 14px; font-weight: 700; color: var(--muted); background: var(--line2); border-radius: 99px; padding: 3px 10px; }
@media (max-width: 600px) { .vid-h { font-size: 21px; margin-top: 34px; padding-top: 20px; } }

/* ───── lekce ───── */
.lesson-list { display: flex; flex-direction: column; gap: 12px; max-width: 960px; }
.lesson-card { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: var(--r, 18px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s; }
.lesson-card:hover { transform: translateY(-2px); border-color: var(--sun); }
.lesson-card .go { margin-left: auto; flex: none; }
.lesson-n { width: 64px; height: 64px; flex: none; border-radius: 16px; background: var(--navy, #0F2747); color: var(--sun, #FFC940); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 26px; font-weight: 900; line-height: 1; }
.lesson-n small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #C5D1E4; margin-bottom: 3px; }
.lesson-card.is-done .lesson-n { background: #2E9E5B; color: #fff; }
.lesson-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lesson-main b { font-size: 19px; line-height: 1.25; }
.lesson-main small { color: var(--muted); line-height: 1.45; }
.lesson-meta { font-size: 13px; font-weight: 700; color: var(--muted); display: flex; gap: 10px; }
.lesson-done { color: #2E9E5B; }
.lesson-page { max-width: 1000px; }
.lesson-guide { border-left: 6px solid var(--sun); padding: 24px 28px; }
.lesson-guide h2 { display: flex; align-items: center; gap: 10px; font-size: 21px; margin-bottom: 10px; }
.lesson-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; counter-reset: none; }
.lstep { display: flex; gap: 16px; align-items: flex-start; position: relative; }
.lstep::before { content: ""; position: absolute; left: 21px; top: 46px; bottom: -16px; width: 2px; background: var(--line); }
.lstep:last-child::before { display: none; }
.lstep-n { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--sun); color: #0F2747; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: 18px; position: relative; z-index: 1; }
.lstep-body { flex: 1; min-width: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.lstep-type { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.lstep-note { margin: 0; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--sun) 16%, var(--surface)); font-weight: 600; }
.lstep-title { font-size: 18px; margin: 0; }
.lstep-pres, .lstep-link { display: flex; gap: 16px; align-items: center; color: var(--text); text-decoration: none; }
.lstep-pres:hover b, .lstep-link:hover b { text-decoration: underline; }
.lstep-thumb { width: 260px; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.lstep-thumb .sr-slide { pointer-events: none; }
.lstep-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; align-items: flex-start; }
.lstep-main b { font-size: 17px; line-height: 1.3; }
.lstep-main small { color: var(--muted); }
.lstep-link .row-ic { flex: none; }
.lstep-mat { display: flex; gap: 16px; align-items: flex-start; }
.lstep-mat-cover { width: 120px; flex: none; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface2, #eef2f7); display: flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 900; color: var(--muted); }
.lstep-mat-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.lstep-video { border-radius: 12px; max-width: 720px; }
.lesson-finish { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
.lesson-nav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.lesson-done-toggle { max-width: 420px; }
@media (max-width: 700px) {
  .lstep { gap: 10px; } .lstep-n { width: 34px; height: 34px; font-size: 15px; } .lstep::before { left: 16px; top: 36px; }
  .lstep-pres, .lstep-mat { flex-direction: column; align-items: stretch; } .lstep-thumb { width: 100%; } .lstep-mat-cover { width: 100px; }
  .lesson-card { padding: 14px; gap: 12px; } .lesson-n { width: 50px; height: 50px; font-size: 21px; } .lesson-main b { font-size: 17px; }
  .lesson-guide { padding: 18px; } .lstep-body { padding: 14px; }
}
.lstep-thumb { display: block; } .lstep-thumb .sr-slide { display: block; width: 100%; }
.mat-also { font-style: italic; }

/* ───── rozvržení stránky jako na e-bezpeci.cz ─────
   obsah v jednom širokém sloupci (max. 1680 px, okraje 20–72 px), ilustrace v záhlaví
   ukotvená k pravému okraji obsahu, ne k okraji okna */
.wrap { max-width: 1440px; padding-left: clamp(20px, 4.5vw, 72px); padding-right: clamp(20px, 4.5vw, 72px); }
.viewer-page .top .wrap { max-width: 1680px; }
.viewer { max-width: 1680px; padding-left: clamp(12px, 4.5vw, 72px); padding-right: clamp(12px, 4.5vw, 72px); }
.hero { padding-top: clamp(24px, 3vw, 48px); padding-bottom: clamp(90px, 8vw, 130px); }
.hero h1 { font-size: clamp(36px, 5.2vw, 76px); max-width: 900px; }
.hero p.lead { font-size: clamp(17px, 1.25vw, 21px); max-width: 640px; }
@media (min-width: 901px) {
  .hero-img { width: auto; aspect-ratio: 1672 / 941; right: max(0px, calc((100% - 1440px) / 2 - 80px)); max-width: 70%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%); mask-image: linear-gradient(90deg, transparent, #000 22%); }
  .top::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background: linear-gradient(90deg, var(--navy) 0%, rgba(15,39,71,.85) 28%, rgba(15,39,71,.25) 50%, rgba(15,39,71,0) 62%); }
  .top > .wrap, .top > section, .top > .top-bar { position: relative; z-index: 1; }
}

/* Klíčová slova – dlaždice */
.kw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.kw-grid .kw { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden; }
.kw-grid .kw::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--kwInk); }
.kw-grid .kw:hover { transform: translateY(-2px); box-shadow: var(--shadow2); }
.kw-ic { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--kwSoft); color: var(--kwInk); }
.kw-ic svg { display: block; }
.kw-tx { min-width: 0; }
.kw-tx h3 { font-size: 17px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.kw-tx p { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.kw-c0 { --kwSoft: var(--sunSoft); --kwInk: var(--sunInk); }
.kw-c1 { --kwSoft: var(--blueSoft); --kwInk: var(--blueInk); }
.kw-c2 { --kwSoft: var(--mintSoft); --kwInk: var(--mintInk); }
.kw-c3 { --kwSoft: var(--coralSoft); --kwInk: var(--coralInk); }
.kw-c0::before { background: var(--sun) !important; }
@media (max-width: 560px) { .kw-grid { grid-template-columns: 1fr; } }
.kw-grid .kw[hidden] { display: none; }

/* Základní literatura v lekci */
.le-star { gap: 6px; color: var(--muted); }
.le-star.on { color: var(--sunInk); background: var(--sunSoft); }
.le-star.on svg, .le-featured .row-ic svg.star-f, .lstep-keybadge svg, .lk-ic svg, .le-star-inline svg { fill: currentColor; }
.le-star-inline { color: var(--sunInk); vertical-align: -2px; }
.le-featured { border-color: var(--sun) !important; box-shadow: inset 4px 0 0 var(--sun); }
.lesson-key { margin-bottom: 24px; border: 1px solid var(--sun); background: linear-gradient(180deg, var(--sunSoft), var(--surface) 70%); }
.lesson-key h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.lk-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--sun); color: #3d2b00; }
.lk-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.lk-list a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; height: 100%; }
.lk-list a:hover { border-color: var(--sun); box-shadow: var(--shadow); }
.lk-list b { display: block; font-size: 15px; line-height: 1.3; }
.lk-list small { color: var(--muted); font-size: 13px; }
.lk-n { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 800; font-size: 14px; }
.lstep-key .lstep-body { border: 2px solid var(--sun); box-shadow: 0 0 0 4px var(--sunSoft), var(--shadow); }
.lstep-key .lstep-n { background: var(--sun); color: #3d2b00; }
.lstep-keybadge { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: var(--sun); color: #3d2b00; font-size: 12px; font-weight: 800; letter-spacing: 0; text-transform: none; }

/* AI u komentáře slajdu */
.ai-instr { margin: 10px 0 2px; border: 1px solid var(--line); border-radius: var(--r3); padding: 8px 12px; background: var(--surface2); }
.ai-instr summary { cursor: pointer; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; list-style: none; }
.ai-instr summary::-webkit-details-marker { display: none; }
.ai-instr textarea { margin-top: 8px; font-size: 14px; }
.ai-instr .hint { font-size: 12px; margin: 6px 0 0; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-chips .chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.ai-chips .chip:hover { border-color: var(--sun); background: var(--sunSoft); }
.ai-fix-box { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--sun); border-radius: var(--r3); background: var(--sunSoft); }
.ai-fix-box .hint { margin: 0 0 6px; }
.ai-diff { font-size: 14px; line-height: 1.6; white-space: pre-wrap; background: var(--surface); border-radius: 10px; padding: 8px 10px; max-height: 260px; overflow: auto; }
.ai-diff del { color: var(--danger); background: var(--dangerSoft); text-decoration: line-through; }
.ai-diff ins { color: var(--ok); background: var(--mintSoft); text-decoration: none; font-weight: 700; }

/* test – obrázky */
.q-img { display: block; margin: 0 0 16px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface2); max-width: 100%; width: fit-content; }
.q-img img { display: block; max-width: 100%; max-height: 420px; object-fit: contain; }
.q .opts-img { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.q .opts-img label.opt { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; position: relative; }
.q .opts-img label.opt input { position: absolute; top: 14px; left: 14px; margin: 0; z-index: 1; background: #fff; }
.q .opts-img .opt-img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--surface2); border-radius: 10px; }
.q .opts-img label.opt span { text-align: center; font-weight: 600; }
.q .opts-img label.opt:has(input:checked) { border-color: var(--btn); box-shadow: 0 0 0 2px var(--btn); }
.opt-letter { font-weight: 800; color: var(--muted); }
/* editor testu */
.q-new { border: 1px solid var(--sun); }
.q-types { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.q-types label { cursor: pointer; }
.q-types input { position: absolute; opacity: 0; pointer-events: none; }
.q-types span { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 700; font-size: 14px; background: var(--surface); }
.q-types input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.q-types input:focus-visible + span { outline: 3px solid var(--sun); }
.q-text-row { display: flex; gap: 10px; align-items: flex-start; }
.q-text-row textarea { flex: 1; }
.q-body .hint { font-size: 12px; margin: 4px 0 0; }
.q-ans { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; }
.q-ans-h { font-weight: 700; font-size: 14px; }
.ans-row { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ans-row.is-ok { border-color: var(--ok); background: var(--mintSoft); }
.ans-row > input { flex: 1; min-width: 0; }
.ans-ok { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); min-width: 92px; cursor: pointer; }
.ans-ok input { width: 18px; height: 18px; accent-color: var(--ok); }
.img-slot { display: inline-flex; flex: 0 0 auto; }
.img-slot.has { position: relative; width: 64px; height: 48px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface2); }
.q-text-row .img-slot.has { width: 120px; height: 84px; }
.img-slot.has img { width: 100%; height: 100%; object-fit: contain; }
.img-x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(13,27,42,.75); color: #fff; font-size: 11px; cursor: pointer; display: grid; place-items: center; }
.img-add { gap: 4px; white-space: nowrap; }
.q-ed-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.q-ed-head .eyebrow { flex: 1; }
.q-type-sel { width: auto; height: 34px; padding: 0 10px; font-size: 13px; border-radius: 10px; }
.quick-q summary { cursor: pointer; list-style: none; }
.quick-q summary::-webkit-details-marker { display: none; }
.quick-q summary h3::after { content: " ▾"; color: var(--muted); }
.quick-q[open] summary { margin-bottom: 8px; }
@media (max-width: 600px) { .ans-row { flex-wrap: wrap; } .ans-ok { min-width: 0; } .q-text-row { flex-direction: column; } }

/* zvýrazňování čteného komentáře */
.cm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cm-head h3 { margin: 0; }
.hl-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.hl-toggle input { accent-color: var(--btn); }
.comment-text .cw { border-radius: 4px; transition: background-color .15s, color .15s; cursor: pointer; }
.comment-text .cw:hover { text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: 3px; }
.comment-text.reading .cw { color: var(--muted); }
.comment-text.reading .cw.past { color: var(--text); }
.comment-text.reading .cw.now { color: #2b1f00; background: var(--sun); box-shadow: 0 0 0 2px var(--sun); }
.comment-text { max-height: 60vh; overflow-y: auto; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { .comment-text .cw { transition: none; } .comment-text { scroll-behavior: auto; } }

/* Buy me a coffee – nad tlačítkem chatu, ať se nepřekrývají */
body:has(.chat-fab) #bmc-wbtn { bottom: 92px !important; }
body:has(.chat-fab) #bmc-iframe { bottom: 160px !important; }
@media (max-width: 900px) { body:has(.chat-fab) #bmc-wbtn { bottom: 76px !important; right: 14px !important; width: 52px !important; height: 52px !important; } }
/* přehrávač výkladu – kompaktní mřížka, nic nepřetéká */
.v-side .audio { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "play seek speed" "play time speed"; column-gap: 12px; row-gap: 0; align-items: center; }
.v-side .audio [data-play] { grid-area: play; width: 40px; height: 40px; min-width: 40px; padding: 0; flex: none; border-radius: 50%; }
.v-side .audio .seek { grid-area: seek; width: 100%; min-width: 0; height: 18px; min-height: 0; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; }
.v-side .audio .t { grid-area: time; min-width: 0; text-align: left; font-size: 12px; line-height: 1.2; }
.v-side .audio .speed { grid-area: speed; width: auto; min-width: 0; height: 34px; min-height: 34px; padding: 0 6px; color: var(--text); }

/* úvodní slovo lekce */
.lesson-welcome { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 18px; border-left: 5px solid var(--sun); }
.lesson-welcome .lw-photo { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--sun); box-shadow: var(--shadow); }
.lesson-welcome h2 { font-size: 22px; margin: 0 0 8px; }
.lesson-welcome .prose { font-size: 16.5px; line-height: 1.65; }
.lw-sign { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.lw-body { min-width: 0; flex: 1; }
@media (max-width: 600px) { .lesson-welcome { flex-direction: column; align-items: center; text-align: left; } .lesson-welcome .lw-photo { width: 84px; height: 84px; flex-basis: 84px; } }

/* úvodní slovo k předmětu (nad záložkami, jde sbalit) */
.subj-welcome { display: block; margin: 0 0 18px; position: relative; z-index: 3; }
.subj-welcome summary { display: flex; align-items: center; gap: 16px; cursor: pointer; list-style: none; }
.subj-welcome summary::-webkit-details-marker { display: none; }
.subj-welcome .lw-photo { width: 64px; height: 64px; flex: 0 0 64px; }
.subj-welcome[open] .lw-photo { width: 84px; height: 84px; flex-basis: 84px; }
.sw-sum { flex: 1; display: flex; flex-direction: column; }
.sw-sum b { font-size: 20px; }
.sw-sum small { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.sw-tog::after { content: "Zobrazit ▾"; font-size: 13px; font-weight: 700; color: var(--muted); }
.subj-welcome[open] .sw-tog::after { content: "Skrýt ▴"; }
.subj-welcome .lw-body { margin: 10px 0 0 100px; }
@media (max-width: 600px) { .subj-welcome .lw-body { margin-left: 0; } }
.subj-welcome { margin-top: -40px; box-shadow: var(--shadow2); }
.subj-welcome + .tabs { margin-top: 0; }
/* záložky předmětu: na počítači se zalomí do dalšího řádku místo schovávání */
@media (min-width: 901px) { .tabs { flex-wrap: wrap; overflow: visible; row-gap: 4px; } }

/* záložky předmětu na mobilu: všechny vidět jako dlaždice (zalomené do řádků), nic se neschovává mimo obrazovku */
@media (max-width: 900px) {
  .tabs { flex-wrap: wrap; overflow: visible; gap: 6px; padding: 8px; border-radius: 18px; }
  .tabs a { min-height: 40px; padding: 0 12px; font-size: 14px; border-radius: 12px; background: var(--surface2); flex: 1 1 auto; justify-content: center; }
  .tabs a[aria-current="page"] { background: var(--btn); }
  .tabs .n { font-size: 11.5px; padding: 0 7px; }
}

.q textarea.input { width: 100%; min-height: 100px; }
.q textarea.ok { border-color: var(--ok); background: var(--mintSoft); }
.q textarea.bad { border-color: var(--danger); background: var(--dangerSoft); }
.q .ai-model { margin: 6px 0; white-space: pre-line; }

/* třídicí otázka */
.sortq { display: flex; flex-direction: column; gap: 10px; }
.sort-help { margin: 0; }
.sort-pool { min-height: 54px; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface2); }
.sort-pool.is-empty::after { content: "Všechny položky jsou zařazené ✓"; color: var(--muted); font-size: 13px; align-self: center; }
.sort-zones { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 10px; }
.sort-zone { border: 2px solid var(--kc); border-radius: 14px; padding: 8px; min-height: 120px; background: color-mix(in srgb, var(--kc) 7%, var(--surface)); display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.sort-zone > b { color: var(--kc); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.sz-items { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sort-c0 { --kc: #2F6FD0; } .sort-c1 { --kc: #D49B00; } .sort-c2 { --kc: #1C9A6C; } .sort-c3 { --kc: #C2410C; }
.sort-item { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: grab; box-shadow: var(--shadow); max-width: 100%; }
.sort-item img { max-width: 140px; max-height: 90px; border-radius: 6px; }
.sort-item.picked { outline: 3px solid var(--sun); }
.sortq.picking .sort-zone, .sortq.picking .sort-pool { box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 45%, transparent); }
.sort-zone.over, .sort-pool.over { box-shadow: 0 0 0 3px var(--sun); }
.sort-item.dragging { opacity: .5; }
.sort-item.ok { border-color: var(--ok); background: var(--mintSoft); }
.sort-item.bad { border-color: var(--danger); background: var(--dangerSoft); }
.sort-item small { font-size: 12px; color: var(--danger); font-weight: 700; }
.sortq.done .sort-item, .sortq.done .sort-zone { cursor: default; }
@media (max-width: 600px) { .sort-zones { grid-template-columns: 1fr; } }

/* zvuk na slajdu */
.sr-audio.playing .sr-audio-btn { animation: srPulse 1.2s ease-in-out infinite; }
@keyframes srPulse { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255,201,64,0)); } 50% { filter: drop-shadow(0 0 1.2cqh rgba(255,201,64,.9)); } }
@media (prefers-reduced-motion: reduce) { .sr-audio.playing .sr-audio-btn { animation: none; outline: .4cqh solid #FFC940; } }

/* oznámení vyučujícího nahoře na stránce předmětu */
.gate ~ .subj-notice { max-width: 460px; margin: -56px auto 60px; }
.subj-notice { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 18px; padding: 16px 20px; border-radius: var(--r2); background: var(--blueSoft); color: var(--text); border: 1px solid var(--line); }
.subj-notice.urgent { background: var(--dangerSoft); border-color: var(--danger); }
.subj-notice-ic { font-size: 26px; line-height: 1; }
.subj-notice b { font-size: 17px; display: block; }
.subj-notice p { margin-top: 4px; color: var(--muted2); }
.subj-notice.urgent b { color: var(--danger); }

/* ---------- Otázky a odpovědi v kurzu ---------- */
.cqa { display: grid; gap: 18px; max-width: 860px; }
.cqa-ask { display: grid; gap: 10px; }
.cqa-ask textarea, .cqa-item textarea, .cqa-tools input { width: 100%; font: inherit; font-size: 15px; padding: 12px 14px; border-radius: var(--r3); border: 1px solid var(--line); background: var(--surface2); color: var(--text); resize: vertical; }
.cqa-ask-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cqa-ask-row .btn { margin-left: auto; }
.cqa-ask-row .chk { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; min-height: 40px; cursor: pointer; }
.cqa-ask-row .chk input { width: 20px; height: 20px; }
.cqa-h { font-size: 16px; font-weight: 800; margin: 6px 0 10px; display: flex; align-items: center; gap: 8px; }
.cqa-h .n { font-size: 12.5px; padding: 2px 9px; border-radius: 99px; background: var(--line2); color: var(--muted); }
.cqa-list { display: grid; gap: 10px; }
.cqa-item { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: 14px 16px; }
.cqa-item.pinned { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.cqa-item.hiddenq { opacity: .75; }
.cqa-vote { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 54px; min-height: 54px; padding: 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; }
.cqa-vote .e { font-size: 18px; line-height: 1; }
.cqa-vote[aria-pressed="true"] { background: var(--sunSoft); border-color: var(--sun); color: var(--sunInk); }
.cqa-vote:disabled { cursor: default; opacity: .7; }
.cqa-q { font-size: 15.5px; font-weight: 700; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cqa-meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cqa-tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; background: var(--line2); color: var(--muted2); }
.cqa-tag.ok { background: var(--mintSoft); color: var(--mintInk); }
.cqa-tag.warn { background: var(--sunSoft); color: var(--sunInk); }
.cqa-tag.no { background: var(--dangerSoft); color: var(--danger); }
.cqa-a { margin-top: 10px; padding: 10px 14px; border-left: 4px solid var(--ok); background: var(--mintSoft); border-radius: 0 12px 12px 0; color: var(--text); font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-theme="dark"] .cqa-a { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); }
.cqa-a b { display: block; font-size: 12.5px; color: var(--mintInk); margin-bottom: 2px; }
[data-theme="dark"] .cqa-a b { color: var(--muted2); }
.cqa-empty { padding: 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r2); font-size: 14px; }
.cqa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cqa-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); padding: 10px 14px; }
.cqa-stats b { display: block; font-size: 24px; font-weight: 800; }
.cqa-stats span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.cqa-filter { flex-wrap: wrap; margin-bottom: 14px; }
.cqa-reply { display: grid; gap: 8px; margin-top: 10px; }
.cqa-reply-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cqa-reply-row .chk { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; min-height: 40px; margin-right: auto; cursor: pointer; }
.cqa-reply-row .chk input { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .cqa-item { grid-template-columns: 1fr; }
  .cqa-vote { flex-direction: row; min-height: 44px; justify-self: start; gap: 6px; padding: 6px 14px; }
  .cqa-ask-row .btn, .cqa-reply-row .btn { flex: 1 1 auto; }
  .cqa-reply-row .chk { width: 100%; }
}

/* ---------- Hodnocení předmětu ---------- */
.crt { max-width: 760px; display: grid; gap: 14px; }
.crt-h { font-size: 20px; font-weight: 800; }
.crt-stars { border: 0; padding: 0; margin: 0; }
.crt-stars legend { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.crt-row { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.crt-star { cursor: pointer; font-size: 38px; line-height: 1; color: var(--line); padding: 2px; transition: transform .1s, color .1s; position: relative; }
.crt-star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.crt-star.on { color: var(--sun); }
.crt-star.hov { transform: scale(1.12); }
.crt-star:focus-within { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 8px; }
.crt-val { margin-left: 10px; font-weight: 800; font-size: 18px; min-width: 60px; }
.crt-f { display: grid; gap: 6px; font-size: 15px; }
.crt-f textarea { width: 100%; font: inherit; font-size: 15px; padding: 12px 14px; border-radius: var(--r3); border: 1px solid var(--line); background: var(--surface2); color: var(--text); resize: vertical; }
.crt-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.crt-foot .btn { margin-left: auto; }
.crt-admin { max-width: 900px; }
.crt-sum { display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: 18px 20px; margin-bottom: 14px; }
.crt-big b { font-size: 48px; font-weight: 800; line-height: 1; }
.crt-big span { font-size: 18px; color: var(--muted); font-weight: 700; margin-left: 4px; }
.crt-big small { display: block; color: var(--muted); font-weight: 700; margin-top: 6px; }
.crt-bstars { position: relative; width: 200px; height: 20px; margin-top: 8px; background: var(--line); -webkit-mask: repeating-linear-gradient(90deg, #000 0 18px, transparent 18px 20px); mask: repeating-linear-gradient(90deg, #000 0 18px, transparent 18px 20px); border-radius: 4px; }
.crt-bstars i { position: absolute; inset: 0 auto 0 0; background: var(--sun); }
.crt-hist { display: flex; gap: 6px; align-items: flex-end; height: 120px; flex: 1; min-width: 260px; }
.crt-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.crt-col i { display: block; width: 100%; max-width: 34px; min-height: 2px; background: var(--sun); border-radius: 6px 6px 2px 2px; }
.crt-cnt { font-size: 12px; font-weight: 800; color: var(--muted); }
.crt-lbl { font-size: 12.5px; font-weight: 800; }
.crt-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.crt-tools .seg { margin-right: auto; }
.crt-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: 12px 16px; margin-bottom: 10px; }
.crt-item.is-hidden { opacity: .6; }
.crt-item-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.crt-s { font-weight: 800; }
.crt-s span { color: var(--sun); letter-spacing: 1px; margin-left: 6px; }
.crt-s em { color: var(--line); font-style: normal; }
.crt-act { margin-left: auto; display: flex; gap: 6px; }
.crt-t { margin-top: 8px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .crt-row { gap: 0; }
  .crt-star { font-size: clamp(22px, 7.6vw, 30px); padding: 0 1px; }
  .crt-val { width: 100%; margin: 6px 0 0; }
  .crt-foot .btn { width: 100%; }
}

/* 3D modely ve slajdech */
.v-slide-wrap:has(.sr-model) .nav-zone { pointer-events: none; }
.sr-model model-viewer { --progress-bar-color: #FFC93C; }
.sr-model-ic { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 800 6cqh "Plus Jakarta Sans", sans-serif; color: #0F2747; opacity: .55; }
.sr-model-hint { position: absolute; left: 50%; bottom: 1.2cqh; transform: translateX(-50%); background: rgba(15,39,71,.72); color: #fff; font: 700 1.9cqh "Plus Jakarta Sans", sans-serif; padding: .5cqh 1.4cqh; border-radius: 99px; pointer-events: none; white-space: nowrap; opacity: .9; transition: opacity .4s; }
.sr-model:hover .sr-model-hint, .sr-model:focus-within .sr-model-hint { opacity: 0; }
/* úvodní ilustrace 2026: nadpis nesmí zasahovat do postav vpravo */
@media (min-width: 901px) {
  .hero h1 { max-width: min(760px, 50vw); }
  .hero p.lead { max-width: min(640px, 46vw); }
  .hero .search { max-width: min(580px, 46vw); }
}
@media (max-width: 900px) { .hero-img { object-position: 78% 40%; } }
/* 3D – popisky a animace */
.sr-hs { display: flex; align-items: center; gap: .6cqh; padding: 0; border: 0; background: none; cursor: pointer; position: relative; transform: translate(-1.4cqh, -50%); transform-origin: left center; font: 700 2.4cqh "Plus Jakarta Sans", sans-serif; transition: opacity .25s; }
.sr-hs:not([data-visible]) { opacity: .35; pointer-events: none; }
.sr-hs-dot { flex: none; width: 2.8cqh; height: 2.8cqh; border-radius: 50%; background: #FFC93C; color: #0F2747; font-weight: 800; font-size: 1.6cqh; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 .35cqh #fff, 0 .4cqh 1cqh rgba(0,0,0,.35); }
.sr-hs-lbl { background: rgba(15,39,71,.88); color: #fff; padding: .45cqh 1cqh; border-radius: .8cqh; white-space: nowrap; box-shadow: 0 .3cqh .8cqh rgba(0,0,0,.25); }
.sr-hs-tip { display: none; position: absolute; left: 0; top: calc(100% + .8cqh); width: max(26cqh, 220px); max-width: 40cqw; background: #fff; color: #0F2747; font-weight: 500; font-size: 1.9cqh; line-height: 1.4; padding: 1cqh 1.3cqh; border-radius: 1cqh; box-shadow: 0 .6cqh 2cqh rgba(0,0,0,.3); text-align: left; white-space: normal; z-index: 2; }
.sr-hs[aria-expanded="true"] .sr-hs-tip { display: block; }
.sr-hs[aria-expanded="true"] .sr-hs-dot { background: #fff; }
.sr-model-play { position: absolute; right: 1.2cqh; bottom: 1.2cqh; width: 4.4cqh; height: 4.4cqh; border-radius: 50%; border: 0; background: rgba(15,39,71,.78); color: #fff; font-size: 2cqh; cursor: pointer; z-index: 3; display: flex; align-items: center; justify-content: center; }
.sr-model-play:hover { background: #0F2747; }
.card-foot .meta-learn { align-items: center; gap: 6px; }
.card-foot .meta-learn .ic { opacity: .7; }
.card-foot .meta-learn b { font-weight: 800; color: var(--text); }
/* úvodní ilustrace: zarovnaná k pravému okraji obsahu (ne k rohu okna), vpravo i nahoře se plynule ztrácí */
@media (min-width: 901px) {
  .hero-img { -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%), linear-gradient(180deg, transparent, #000 8%); mask-image: linear-gradient(90deg, transparent, #000 20%), linear-gradient(180deg, transparent, #000 8%); -webkit-mask-composite: source-in; mask-composite: intersect; }
}
@media (min-width: 1480px) {
  .hero-img { right: calc((100% - 1440px) / 2 + 40px); max-width: 64%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 10%);
    mask-image: linear-gradient(90deg, transparent, #000 20%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 10%);
    -webkit-mask-composite: source-in; mask-composite: intersect; }
}

/* ---------- Nástěnka: pastelové lístečky ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px 24px; padding: 14px 4px 10px; }
.note { --nc: #FFF1A8; --nk: #5C4A00; position: relative; background: var(--nc); color: #2A2A2A; padding: 26px 20px 16px; border-radius: 3px 3px 14px 3px; box-shadow: 0 1px 1px rgba(0,0,0,.06), 0 10px 22px -8px rgba(15,39,71,.35); display: flex; flex-direction: column; gap: 8px; transform: rotate(-1.2deg); transition: transform .2s, box-shadow .2s; min-height: 170px; }
.board .note:nth-child(3n+2) { transform: rotate(1deg); }
.board .note:nth-child(3n) { transform: rotate(-.4deg) translateY(4px); }
.board .note:nth-child(5n+4) { transform: rotate(1.6deg); }
.board .note:hover { transform: rotate(0) translateY(-3px) scale(1.01); box-shadow: 0 2px 2px rgba(0,0,0,.06), 0 18px 30px -10px rgba(15,39,71,.45); z-index: 2; }
.note::after { content: ""; position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; background: linear-gradient(135deg, rgba(0,0,0,.09) 0 50%, transparent 50%); border-radius: 0 0 14px 0; }
.note-pin { position: absolute; top: -9px; left: 50%; width: 70px; height: 20px; transform: translateX(-50%) rotate(-2deg); background: rgba(255,255,255,.55); border: 1px solid rgba(0,0,0,.05); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.note.is-pinned .note-pin { width: 18px; height: 18px; border-radius: 50%; top: -7px; background: radial-gradient(circle at 35% 35%, #ff8a8a, #d02a2a 60%, #8a1414); border: 0; box-shadow: 0 3px 4px rgba(0,0,0,.3); }
.note-flag { font-size: 12px; font-weight: 800; color: var(--nk); opacity: .85; }
.note-t { font-family: "Plus Jakarta Sans", sans-serif; font-size: 18px; font-weight: 800; line-height: 1.25; color: #1E1E1E; margin: 0; overflow-wrap: anywhere; }
.note-b { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.note-b p { margin: 0 0 6px; }
.note-b ul { margin: 0 0 6px 18px; }
.note-b a { color: inherit; text-decoration: underline; }
.note-link { align-self: flex-start; margin-top: auto; display: inline-flex; gap: 6px; align-items: center; font-weight: 800; font-size: 14px; color: var(--nk); background: rgba(255,255,255,.55); padding: 7px 12px; border-radius: 99px; text-decoration: none; min-height: 36px; }
.note-link span { font-weight: 600; opacity: .8; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-link:hover { background: rgba(255,255,255,.85); }
.note-d { font-size: 12px; color: var(--nk); opacity: .7; font-weight: 700; }
.note-yellow { --nc: #FFF1A8; --nk: #6B5500; }
.note-pink { --nc: #FFD4E2; --nk: #8A2450; }
.note-blue { --nc: #CFE6FF; --nk: #1D4F8A; }
.note-green { --nc: #D2F2D6; --nk: #23663A; }
.note-purple { --nc: #E5DAFF; --nk: #4F2F99; }
.note-orange { --nc: #FFDDBF; --nk: #8A4510; }
[data-theme="dark"] .note { box-shadow: 0 10px 24px -8px rgba(0,0,0,.7); }
@media (prefers-reduced-motion: reduce) { .note, .board .note:hover { transition: none; } }
@media (max-width: 600px) { .board { grid-template-columns: 1fr; gap: 22px; padding: 10px 6px; } }
