:root{
  --bg:#0f172a;--panel:#111827;--card:#fff;--text:#102033;--muted:#64748b;--line:#e2e8f0;
  --accent:#0ea5e9;--accent2:#2563eb;--good:#15803d;--warn:#b45309;--bad:#b91c1c;--violet:#7c3aed;
  --shadow:0 20px 60px rgba(15,23,42,.16);--bottom-nav-height:0px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:rgba(14,165,233,.14)}
html{height:100%;-webkit-text-size-adjust:100%;scroll-behavior:smooth} body{min-height:100%;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:linear-gradient(135deg,#e0f2fe 0%,#f8fafc 46%,#eef2ff 100%);overflow-x:hidden} button,input,select,textarea{font:inherit} button,a,input,select,textarea{touch-action:manipulation}.app-shell{min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:300px minmax(0,1fr)}.sidebar{position:sticky;top:0;height:100vh;height:100dvh;padding:24px 18px;background:linear-gradient(180deg,var(--bg),#111827 55%,#020617);color:#fff;box-shadow:var(--shadow);z-index:20;overflow:auto}.brand{display:flex;align-items:center;gap:12px;margin-bottom:22px}.logo{width:44px;height:44px;border-radius:14px;background:linear-gradient(135deg,#38bdf8,#818cf8);display:grid;place-items:center;font-weight:950;box-shadow:0 10px 30px rgba(56,189,248,.25);flex:0 0 auto}.brand h1{font-size:18px;line-height:1.1;margin:0}.brand p{margin:4px 0 0;color:#cbd5e1;font-size:12px}.nav-btn{width:100%;min-height:52px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#fff;text-align:left;border-radius:16px;padding:14px;margin:10px 0;cursor:pointer;font-size:15px;font-weight:750;display:flex;gap:10px;align-items:center;transition:.18s ease}.nav-btn:hover{background:rgba(255,255,255,.11);transform:translateY(-1px)}.nav-btn.active{background:linear-gradient(135deg,var(--accent),var(--accent2));border-color:transparent}.side-note{margin-top:28px;color:#cbd5e1;font-size:13px;line-height:1.5;border-top:1px solid rgba(255,255,255,.12);padding-top:18px}.side-note strong{color:#fff}main{padding:30px;min-width:0}.hero{background:rgba(255,255,255,.82);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.9);border-radius:30px;padding:24px 28px;box-shadow:var(--shadow);margin-bottom:22px}.hero-grid{display:grid;grid-template-columns:1fr minmax(220px,320px);gap:24px;align-items:center}.eyebrow{margin:0 0 8px;text-transform:uppercase;letter-spacing:.12em;color:#2563eb;font-weight:900;font-size:12px}.hero h2{margin:0 0 10px;font-size:32px;letter-spacing:-.03em;line-height:1.08}.hero p{margin:0;color:var(--muted);line-height:1.58}.hero-image-card{margin:0;border-radius:24px;background:#fff;border:1px solid var(--line);box-shadow:0 16px 44px rgba(15,23,42,.12);overflow:hidden}.hero-image-card img{display:block;width:100%;aspect-ratio:16/11;object-fit:cover}.hero-image-card figcaption{font-weight:900;line-height:1.25;text-align:center;padding:12px 14px;color:#0f172a}.view{display:none}.view.active{display:block}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:10px 0 16px}.section-head h2{font-size:25px;line-height:1.12;margin:0 0 6px}.section-head p{margin:0;color:var(--muted);line-height:1.5}.toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:18px 0}.command{flex:1;min-width:250px;position:relative}.command span{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--accent2);font-weight:900}.command input{width:100%;min-height:50px;border:1px solid var(--line);border-radius:16px;padding:14px 14px 14px 36px;font-size:16px;outline:none;background:#fff;box-shadow:0 8px 28px rgba(15,23,42,.06)}.command input:focus,.select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 4px rgba(14,165,233,.13)}.select,.mini-btn{min-height:48px;border:1px solid var(--line);background:#fff;border-radius:14px;padding:12px 14px;font-size:16px;outline:none}.mini-btn{font-weight:850;cursor:pointer}.mini-btn.primary{background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;border-color:transparent}.mini-btn:hover{transform:translateY(-1px)}.chapter-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}.chapter-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;cursor:pointer;box-shadow:0 12px 32px rgba(15,23,42,.07);transition:.18s ease;min-height:142px}.chapter-card:hover{transform:translateY(-2px);border-color:#93c5fd;box-shadow:0 18px 42px rgba(37,99,235,.12)}.chapter-card small{display:block;color:var(--muted);font-weight:750;margin-bottom:8px}.chapter-card h3{font-size:16px;line-height:1.3;margin:0 0 10px}.tags{display:flex;flex-wrap:wrap;gap:6px}.tag{font-size:12px;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:4px 8px}.reader{background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);overflow:hidden;margin-top:16px}.reader-head{padding:20px 22px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#fff,#f8fafc);display:flex;justify-content:space-between;gap:14px;align-items:flex-start;flex-wrap:wrap}.reader-head h3{margin:0;font-size:22px}.reader-head p{margin:6px 0 0;color:var(--muted)}.reader-body{padding:24px;max-height:70vh;overflow:auto;-webkit-overflow-scrolling:touch}.text-content{font-size:16px;line-height:1.65;white-space:pre-wrap;font-family:inherit}.pill{background:#f1f5f9;color:#475569;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;display:inline-flex;margin-top:10px}.test-layout{display:grid;grid-template-columns:minmax(280px,380px) 1fr;gap:18px}.test-panel,.question-panel,.download-card{background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);padding:20px}.test-panel h3,.question-panel h3,.download-card h2{margin:0 0 10px}.test-panel p,.download-card p,.question-panel-head p{color:var(--muted);line-height:1.55}.test-panel .select,.test-panel .mini-btn{width:100%;margin-top:8px}.status-pill{white-space:nowrap;border-radius:999px;padding:9px 13px;font-size:13px;font-weight:900;border:1px solid var(--line);background:#fff}.status-pill.ok{background:#ecfdf5;color:#166534;border-color:#bbf7d0}.status-pill.fail{background:#fef2f2;color:#991b1b;border-color:#fecaca}.status-pill.neutral{background:#f8fafc;color:#475569}.mode-cards{display:grid;gap:10px;margin-top:14px}.mode-card{border-radius:18px;border:1px solid var(--line);padding:14px}.mode-card h4{margin:0 0 6px}.mode-card p{font-size:14px;margin:0}.mode-card.local{background:#f0fdf4;border-color:#bbf7d0}.mode-card.ai{background:#eef2ff;border-color:#c7d2fe}.question{border:1px solid var(--line);border-radius:18px;padding:16px;margin:14px 0;background:#fbfdff}.question h4{margin:0 0 8px;line-height:1.4}.question small{color:#64748b}.question textarea{width:100%;min-height:150px;resize:vertical;border:1px solid #cbd5e1;border-radius:14px;padding:12px;font-size:16px;line-height:1.5;outline:none;margin-top:10px}.check-buttons{display:grid;grid-template-columns:1fr;gap:12px;margin:18px 0}.check-btn{min-height:56px;border:0;border-radius:18px;color:#fff;font-weight:950;cursor:pointer;padding:14px;box-shadow:0 12px 30px rgba(15,23,42,.11)}.check-btn.local{background:linear-gradient(135deg,#16a34a,#15803d)}.check-btn.ai{background:linear-gradient(135deg,#2563eb,#7c3aed)}
.check-buttons.single{grid-template-columns:1fr}
.check-buttons.single .check-btn{font-size:18px;min-height:62px}.check-btn:disabled{opacity:.66;cursor:not-allowed}.score-box{border-radius:20px;padding:18px;margin-top:18px;background:#f8fafc;border:1px solid var(--line)}.score-big{font-size:44px;font-weight:950;letter-spacing:-.04em}.score-good{color:var(--good)}.score-mid{color:var(--warn)}.score-low{color:var(--bad)}.feedback-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.feedback-card{border-radius:16px;border:1px solid var(--line);padding:14px;background:#fff}.feedback-card h4{margin:0 0 8px}.feedback-card ul{margin:0;padding-left:18px}.eval-note{background:#ecfeff;border:1px solid #bae6fd;color:#075985;border-radius:16px;padding:12px 14px;margin:12px 0;font-size:14px;line-height:1.45}.download-card{max-width:980px}.download-actions{display:flex;gap:10px;flex-wrap:wrap}.download-link{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:#fff;background:linear-gradient(135deg,var(--accent),var(--accent2));padding:15px 18px;border-radius:16px;font-weight:900;margin-top:8px;min-height:48px}.download-link.secondary{background:#0f172a}.setup-box{margin-top:18px;border:1px solid var(--line);border-radius:18px;padding:14px;background:#f8fafc}.setup-box summary{font-weight:950;cursor:pointer}.setup-box code{background:#e2e8f0;border-radius:6px;padding:2px 5px}.pdf-frame{width:100%;height:70vh;border:1px solid var(--line);border-radius:18px;margin-top:18px;background:#fff}.footer{padding:22px 6px 10px;color:#475569;text-align:center;font-weight:900}.toast{position:fixed;right:18px;bottom:18px;z-index:40;background:#0f172a;color:#fff;padding:13px 16px;border-radius:14px;box-shadow:var(--shadow);opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s ease}.toast.show{opacity:1;transform:translateY(0)}.empty{background:#fff;border:1px dashed #cbd5e1;border-radius:20px;padding:28px;text-align:center;color:var(--muted);grid-column:1/-1}.warning{background:#fffbeb;border:1px solid #fde68a;color:#92400e;border-radius:16px;padding:12px 14px;margin:12px 0;line-height:1.45}
@media (max-width:1000px){.app-shell{grid-template-columns:240px 1fr}.hero-grid,.test-layout{grid-template-columns:1fr}.feedback-grid{grid-template-columns:1fr}}
@media (max-width:760px){:root{--bottom-nav-height:88px}body{padding-bottom:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));background:linear-gradient(180deg,#e0f2fe 0%,#f8fafc 42%,#eef2ff 100%)}.app-shell{display:block;min-height:100dvh}.sidebar{position:fixed;left:0;right:0;top:auto;bottom:0;height:auto;min-height:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));padding:8px 10px calc(8px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(3,1fr);gap:8px;overflow:visible;border-radius:22px 22px 0 0;background:rgba(15,23,42,.94);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}.brand,.side-note{display:none}.nav-btn{margin:0;min-height:66px;border-radius:16px;padding:8px 6px;text-align:center;align-items:center;justify-content:center;flex-direction:column;gap:4px;font-size:11px;line-height:1.15}.nav-btn span{font-size:20px}.nav-btn strong{font-weight:850}main{padding:14px 14px 0;min-height:calc(100dvh - var(--bottom-nav-height))}.hero{border-radius:22px;padding:16px;margin-bottom:14px}.hero h2{font-size:24px}.hero-grid{gap:14px}.hero-image-card figcaption{font-size:14px}.section-head{display:block}.status-pill{display:inline-flex;margin-top:10px}.toolbar{display:grid;grid-template-columns:1fr;gap:10px;margin:12px 0}.command{min-width:0}.command input,.select,.mini-btn{width:100%;min-height:48px;font-size:16px}.chapter-grid{grid-template-columns:1fr;gap:10px}.chapter-card{border-radius:16px;padding:14px;min-height:120px}.reader{border-radius:20px}.reader-head{padding:16px}.reader-body{padding:16px;max-height:none;overflow:visible}.text-content{font-size:15.5px;line-height:1.62}.test-panel,.question-panel,.download-card{border-radius:20px;padding:16px;margin-bottom:14px}.question{padding:14px;border-radius:16px}.question textarea{min-height:180px}.check-buttons{grid-template-columns:1fr}.score-big{font-size:38px}.download-actions{display:grid;grid-template-columns:1fr}.download-link{justify-content:center;width:100%}.pdf-frame{display:none}.footer{padding:14px 6px calc(14px + var(--bottom-nav-height));font-size:13px}.toast{left:12px;right:12px;bottom:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 10px);text-align:center}}

.ai-warning{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:18px;padding:14px 16px;margin:12px 0 18px;line-height:1.5;box-shadow:0 10px 28px rgba(154,52,18,.08)}
.ai-warning strong{color:#7c2d12}
.check-section-title{font-weight:950;color:#0f172a;margin:18px 0 8px;font-size:16px}

/* Větší titulní obrázek na hlavní stránce */
.hero-grid{grid-template-columns:minmax(0,.85fr) minmax(360px,560px);gap:28px;align-items:center}
.hero-image-card{border-radius:28px;overflow:hidden}
.hero-image-card img{width:100%;aspect-ratio:2/1;object-fit:cover;background:#f8fafc}
.hero-image-card figcaption{font-size:16px;padding:15px 16px}
@media (max-width:1000px){.hero-grid{grid-template-columns:1fr}.hero-image-card img{aspect-ratio:2/1}}
@media (max-width:760px){.hero-image-card{border-radius:22px}.hero-image-card img{aspect-ratio:2/1}.hero-image-card figcaption{font-size:14.5px}}

/* Finální úpravy: velký titulní obrázek a čistá sekce Dokument ke stažení */
.hero-grid{grid-template-columns:minmax(0,.75fr) minmax(420px,640px);}
.hero-image-card img{aspect-ratio:2/1;object-fit:cover;}
.clean-download-note{margin-top:16px;border:1px solid #bae6fd;background:#ecfeff;color:#075985;border-radius:18px;padding:13px 15px;line-height:1.45;}
@media (max-width:1000px){.hero-grid{grid-template-columns:1fr}.hero-image-card img{aspect-ratio:2/1}}
@media (max-width:760px){.hero-image-card img{aspect-ratio:16/9}.clean-download-note{font-size:14px}}

.local-info-card{margin-top:14px;border-radius:18px;border:1px solid #bbf7d0;background:#f0fdf4;padding:14px;line-height:1.5}
.local-info-card h4{margin:0 0 6px;color:#166534}
.local-info-card p{margin:0;font-size:14px;color:#166534}
.concept-hit{display:inline-flex;margin:3px 4px 3px 0;padding:4px 8px;border-radius:999px;background:#dcfce7;color:#166534;font-size:12px;font-weight:800}
.concept-miss{display:inline-flex;margin:3px 4px 3px 0;padding:4px 8px;border-radius:999px;background:#fee2e2;color:#991b1b;font-size:12px;font-weight:800}
@media (max-width:760px){.local-info-card{font-size:14px}}


/* Hlasové odpovědi */
.voice-info-card{margin-top:14px;border-radius:18px;border:1px solid #c7d2fe;background:#eef2ff;padding:14px;line-height:1.5}
.voice-info-card h4{margin:0 0 6px;color:#3730a3}
.voice-info-card p{margin:0;font-size:14px;color:#3730a3}
.voice-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}
.voice-btn{border:0;border-radius:999px;background:#0f172a;color:#fff;font-weight:900;padding:11px 14px;min-height:44px;cursor:pointer;box-shadow:0 10px 24px rgba(15,23,42,.12)}
.voice-btn.recording{background:#dc2626;animation:pulseMic 1.2s infinite}
.voice-status{font-size:13px;line-height:1.35;color:#64748b;flex:1;min-width:190px}
.voice-status.listening{color:#1d4ed8;font-weight:800}
.voice-status.warn{color:#b45309;font-weight:800}
.voice-status.done{color:#166534;font-weight:800}
.voice-status.neutral{color:#64748b}
@keyframes pulseMic{0%{transform:scale(1);box-shadow:0 0 0 0 rgba(220,38,38,.35)}70%{transform:scale(1.02);box-shadow:0 0 0 10px rgba(220,38,38,0)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(220,38,38,0)}}
@media (max-width:760px){.voice-controls{display:grid;grid-template-columns:1fr;gap:8px}.voice-btn{width:100%;min-height:50px}.voice-status{min-width:0;font-size:13.5px}.voice-info-card{font-size:14px}}

/* AI chat u vybrané kapitoly */
.chapter-chat-box{border:1px solid #c7d2fe;background:linear-gradient(180deg,#eef2ff,#ffffff);border-radius:22px;padding:16px;margin-bottom:20px;box-shadow:0 12px 32px rgba(37,99,235,.08)}
.chapter-chat-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.chapter-chat-head h4{margin:0 0 4px;font-size:18px;color:#312e81}
.chapter-chat-head p{margin:0;color:#475569;line-height:1.45;font-size:14px}
.chapter-ai-status{border:1px solid #cbd5e1;background:#fff;color:#475569;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:950;white-space:nowrap}
.chapter-ai-status.ok{background:#ecfdf5;border-color:#bbf7d0;color:#166534}.chapter-ai-status.loading{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}.chapter-ai-status.error{background:#fef2f2;border-color:#fecaca;color:#991b1b}
.chapter-command{display:block;font-weight:950;color:#0f172a;margin:6px 0 7px}
#chapterChatInput{width:100%;min-height:92px;resize:vertical;border:1px solid #cbd5e1;border-radius:16px;padding:13px 14px;font-size:16px;line-height:1.5;outline:none;background:#fff}
#chapterChatInput:focus{border-color:#6366f1;box-shadow:0 0 0 4px rgba(99,102,241,.13)}
.chapter-chat-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}.chapter-chat-actions .mini-btn{min-height:46px}.chapter-chat-messages{margin-top:12px;max-height:420px;overflow:auto;-webkit-overflow-scrolling:touch;border:1px solid #e2e8f0;background:#fff;border-radius:18px;padding:12px}.chat-placeholder{color:#64748b;font-size:14px;line-height:1.45}.chat-msg{border-radius:16px;padding:12px 13px;margin:10px 0;line-height:1.55}.chat-msg strong{display:block;margin-bottom:4px}.chat-msg.user{background:#f1f5f9;color:#0f172a}.chat-msg.assistant{background:#ecfeff;border:1px solid #bae6fd;color:#0f172a}.chat-msg.assistant strong{color:#075985}.chat-msg.user strong{color:#334155}
@media (max-width:760px){.chapter-chat-box{border-radius:20px;padding:14px}.chapter-chat-actions{display:grid;grid-template-columns:1fr}.chapter-chat-actions .mini-btn{width:100%;min-height:50px}.chapter-chat-messages{max-height:360px}.chapter-chat-head h4{font-size:17px}}



/* ===== MUNI FORCE STYLE v4: vlozeno primo i externi, bez cache ===== */
@font-face{font-family:"MUNI";src:local("MUNI Light"),local("Muni Light"),url("./assets/fonts/Muni-Light.woff2") format("woff2");font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:"MUNI";src:local("MUNI Regular"),local("Muni Regular"),url("./assets/fonts/Muni-Regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"MUNI";src:local("MUNI Medium"),local("Muni Medium"),url("./assets/fonts/Muni-Medium.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"MUNI";src:local("MUNI Medium"),local("Muni Medium"),url("./assets/fonts/Muni-Medium.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"MUNI";src:local("MUNI Bold"),local("Muni Bold"),url("./assets/fonts/Muni-Bold.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"MUNI";src:local("MUNI Bold"),local("Muni Bold"),url("./assets/fonts/Muni-Bold.woff2") format("woff2");font-weight:800 950;font-style:normal;font-display:swap}
:root{
  --muni-blue:#0000dc!important;--muni-yellow:#007b69!important;--muni-black:#000!important;--muni-bg:#f6f6f6!important;--muni-line:#dcdcdc!important;--muni-red:#e4002b!important;--muni-green:#007b69!important;
  --bg:var(--muni-bg)!important;--panel:#fff!important;--card:#fff!important;--text:#000!important;--muted:#333!important;--line:var(--muni-line)!important;--accent:var(--muni-blue)!important;--accent2:var(--muni-blue)!important;--shadow:none!important;
}
*{box-sizing:border-box!important;-webkit-tap-highlight-color:rgba(0,0,220,.12)!important}
html,body{font-family:"MUNI",Arial,Helvetica,sans-serif!important;background:#f6f6f6!important;color:#000!important;font-synthesis: none!important;text-rendering:optimizeLegibility!important;-webkit-font-smoothing:antialiased!important;-moz-osx-font-smoothing:grayscale!important;}
body{border-top:8px solid var(--muni-blue)!important;background:#f6f6f6!important}
a{color:var(--muni-blue)!important;text-decoration:underline!important;text-underline-offset:3px!important}.app-shell{background:#f6f6f6!important}
.sidebar{background:#fff!important;color:#000!important;border-right:1px solid var(--muni-line)!important;box-shadow:none!important;padding-top:30px!important}
.sidebar::before{content:""!important;display:block!important;width:74px!important;height:14px!important;margin:0 0 24px 0!important;background:linear-gradient(90deg,var(--muni-yellow) 0 22%,var(--muni-blue) 22% 100%)!important}
.brand{align-items:flex-start!important;gap:14px!important}.logo{border-radius:0!important;width:48px!important;height:48px!important;background:var(--muni-blue)!important;color:#fff!important;box-shadow:none!important;font-weight:950!important;font-size:31px!important;letter-spacing:.05em!important}.logo::before{content:""!important;position:absolute!important;left:0!important;top:0!important;bottom:0!important;width:9px!important;background:var(--muni-yellow)!important}.brand h1{font-size:24px!important;line-height:1.02!important;margin:0!important;color:var(--muni-blue)!important;font-weight:950!important;letter-spacing:.02em!important;text-transform:uppercase!important}.brand p{color:#000!important;font-weight:500!important;font-size:13px!important}
.nav-btn{border-radius:0!important;background:#fff!important;color:var(--muni-blue)!important;border:1px solid var(--muni-line)!important;box-shadow:none!important;font-weight:850!important}.nav-btn:hover{background:#f4f4ff!important;border-color:var(--muni-blue)!important;transform:translateX(2px)!important}.nav-btn.active{background:var(--muni-blue)!important;color:#fff!important;border-color:var(--muni-blue)!important}.side-note{color:#000!important;border-top:1px solid var(--muni-line)!important}
main{background:#f6f6f6!important;padding:34px!important}.hero,.section-head,.reader,.test-panel,.question-panel,.download-card,.chapter-card,.question,.score-box,.feedback-card,.empty{background:#fff!important;border:1px solid var(--muni-line)!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hero{padding:40px!important;position:relative!important;overflow:hidden!important}.hero::before{content:""!important;position:absolute!important;left:0!important;top:0!important;bottom:0!important;width:18px!important;background:var(--muni-blue)!important}.hero::after{content:""!important;position:absolute!important;left:18px!important;top:0!important;width:14px!important;height:130px!important;background:var(--muni-yellow)!important}.hero-grid{grid-template-columns:minmax(0,.72fr) minmax(420px,660px)!important;gap:32px!important}.eyebrow{color:var(--muni-blue)!important;font-weight:950!important;letter-spacing:.09em!important}.hero h2{font-size:48px!important;line-height:1.02!important;letter-spacing:-.045em!important;color:#000!important;font-weight:950!important}.hero p,.section-head p,.download-card p,.question-panel-head p,.reader-head p{color:#222!important}.hero-image-card{border:1px solid var(--muni-line)!important;border-radius:0!important;background:#fff!important;box-shadow:none!important}.hero-image-card img{aspect-ratio:2/1!important;object-fit:cover!important}.hero-image-card figcaption{background:#fff!important;color:#000!important;font-weight:950!important;border-top:12px solid var(--muni-blue)!important;border-radius:0!important}
.section-head{padding:22px 24px!important}.section-head h2,.reader-head h3,.test-panel h3,.question-panel-head h3,.download-card h2{font-weight:950!important;letter-spacing:-.035em!important;color:#000!important}.command input,.select,textarea,.question textarea,#chapterChatInput{border-radius:0!important;border:1px solid #bdbdbd!important;background:#fff!important;color:#000!important;box-shadow:none!important}.command span{color:var(--muni-blue)!important}.command input:focus,.select:focus,textarea:focus,#chapterChatInput:focus{border-color:var(--muni-blue)!important;box-shadow:0 0 0 3px rgba(0,0,220,.14)!important}.mini-btn,.check-btn,.download-link,.voice-btn{border-radius:0!important;box-shadow:none!important;font-weight:950!important}.mini-btn.primary,.check-btn.local,.download-link{background:var(--muni-blue)!important;color:#fff!important;border-color:var(--muni-blue)!important}.mini-btn:not(.primary),.download-link.secondary,.voice-btn{background:#fff!important;color:var(--muni-blue)!important;border:1px solid var(--muni-blue)!important}.chapter-grid{gap:16px!important}.chapter-card{border-left:12px solid var(--muni-blue)!important;min-height:166px!important}.chapter-card:hover{transform:translateY(-2px)!important;border-color:var(--muni-blue)!important;box-shadow:0 9px 22px rgba(0,0,0,.08)!important}.chapter-card small{color:var(--muni-blue)!important;font-weight:950!important;text-transform:uppercase!important;letter-spacing:.05em!important}.chapter-card h3{color:#000!important;font-weight:900!important}.tag{background:var(--muni-blue)!important;color:#fff!important;border-radius:0!important;font-weight:950!important}
.reader-head{background:#fff!important;border-bottom:1px solid var(--muni-line)!important}.reader-head::before{background:var(--muni-blue)!important}.pill{background:var(--muni-yellow)!important;color:#fff!important;border-radius:0!important;font-weight:950!important}.text-content{background:#fff!important;color:#111!important}.text-content mark{background:var(--muni-yellow)!important;color:#000!important}.local-info-card,.chapter-chat-box,.voice-info-card,.clean-download-note,.ai-warning,.eval-note{border-radius:0!important;background:#fff!important;border:1px solid var(--muni-line)!important;border-left:10px solid var(--muni-blue)!important;box-shadow:none!important;color:#000!important}.voice-info-card{border-left-color:var(--muni-yellow)!important}.chapter-chat-head h4{color:#000!important;font-weight:950!important}.chapter-command{color:var(--muni-blue)!important;font-weight:950!important}.chapter-chat-messages,.chat-msg{border-radius:0!important;box-shadow:none!important}.chat-msg.assistant{background:#f4f4ff!important;border-left:10px solid var(--muni-blue)!important}.chat-msg.user{background:#f7f7f7!important;border-left:10px solid #888!important}.chapter-ai-status{border-radius:0!important}.chapter-ai-status.ok{background:#e9f6ee!important;color:#006b35!important}.chapter-ai-status.error{background:#fff1f2!important;color:#b00020!important}.score-big{font-weight:950!important}.score-good{color:var(--muni-green)!important}.score-mid{color:#b35c00!important}.score-low{color:var(--muni-red)!important}.pdf-frame{border-radius:0!important}.footer{background:#fff!important;border:1px solid var(--muni-line)!important;border-left:14px solid var(--muni-blue)!important;border-radius:0!important;color:#000!important;font-weight:800!important;box-shadow:none!important;padding:20px!important}.footer-meta{display:block!important;margin-top:8px!important;color:#000!important;font-weight:600!important}.footer a{color:var(--muni-blue)!important;font-weight:950!important}
@media(max-width:1000px){.hero-grid{grid-template-columns:1fr!important}.hero h2{font-size:40px!important}}
@media(max-width:760px){body{border-top:6px solid var(--muni-blue)!important;padding-bottom:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom))!important;background:#f6f6f6!important}main{padding:14px 14px 0!important}.hero{padding:26px 18px!important}.hero::before{width:10px!important}.hero::after{left:10px!important;width:8px!important;height:80px!important}.hero h2{font-size:31px!important}.sidebar{background:#fff!important;border-top:1px solid var(--muni-line)!important;border-radius:0!important;box-shadow:0 -8px 20px rgba(0,0,0,.08)!important}.sidebar::before{display:none!important}.nav-btn{border-radius:0!important;background:#fff!important;color:var(--muni-blue)!important}.nav-btn.active{background:var(--muni-blue)!important;color:#fff!important}.nav-btn:hover{transform:none!important}.footer{margin-bottom:calc(var(--bottom-nav-height) + 8px)!important}}


/* ===== ÚPRAVA: čitelnější původní font v kapitolách a testech + zelený akcent ===== */
#chapters,
#chapters *,
#tests,
#tests * {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif !important;
}
:root { --muni-yellow:#007b69!important; --muni-green:#007b69!important; }
.pill,
.text-content mark {
  background:#007b69!important;
  color:#fff!important;
}
.voice-info-card { border-left-color:#007b69!important; }
.sidebar::before { background:linear-gradient(90deg,#007b69 0 22%,var(--muni-blue) 22% 100%)!important; }
.logo::before,
.hero::after { background:#007b69!important; }

/* ===== ÚPRAVA HERO: posunutá fotka vpravo + přepínač POL/BSS ===== */
.hero-copy p,
.hero .eyebrow { display:none!important; }
.hero-copy { min-width:0!important; }
.program-switch{margin-top:28px!important;width:min(360px,100%)!important;display:grid!important;grid-template-columns:1fr 1fr!important;border:2px solid var(--muni-blue)!important;background:#fff!important;padding:4px!important;gap:4px!important}.program-option{min-height:52px!important;border:0!important;border-radius:0!important;background:#fff!important;color:var(--muni-blue)!important;font-family:"MUNI",Arial,Helvetica,sans-serif!important;font-weight:950!important;letter-spacing:.12em!important;cursor:pointer!important}.program-option.active{background:var(--muni-blue)!important;color:#fff!important}.bss-notice{margin-top:24px!important;width:min(420px,100%)!important;border-left:12px solid #007b69!important;border-top:1px solid var(--muni-line)!important;border-right:1px solid var(--muni-line)!important;border-bottom:1px solid var(--muni-line)!important;background:#fff!important;padding:22px 24px!important;color:#000!important;font-family:"MUNI",Arial,Helvetica,sans-serif!important;font-size:18px!important;line-height:1.35!important}.bss-notice strong{font-size:22px!important;font-weight:950!important}@media(min-width:1001px){.hero{padding-right:96px!important}.hero-grid{grid-template-columns:minmax(320px,.56fr) minmax(560px,760px)!important;gap:64px!important;align-items:center!important}.hero-image-card{transform:translateX(56px)!important;justify-self:end!important;width:min(760px,100%)!important}.hero h2{font-size:54px!important;max-width:620px!important}}@media(max-width:1000px){.hero-image-card{transform:none!important}}@media(max-width:760px){.program-switch{margin-top:18px!important}.program-option{min-height:48px!important}.bss-notice{font-size:16px!important}.bss-notice strong{font-size:19px!important}}



/* ===== SIDEBAR CREDIT + DEKADENCE MINI PRVEK ===== */
.sidebar-extra{
  margin-top:22px!important;
  padding-top:18px!important;
  border-top:1px solid var(--muni-line)!important;
  color:#000!important;
  font-family:"MUNI",Arial,Helvetica,sans-serif!important;
}
.sidebar-meta-box{
  border-left:8px solid #007b69!important;
  padding:10px 10px 10px 14px!important;
  background:#fff!important;
  color:#000!important;
  line-height:1.35!important;
}
.sidebar-meta-box p{
  margin:0 0 8px 0!important;
  font-size:14px!important;
  font-weight:800!important;
  color:#000!important;
  letter-spacing:0!important;
}
.sidebar-meta-box p:last-child{margin-bottom:0!important}
.sidebar-meta-box strong{font-weight:950!important;color:#000!important}
.sidebar-meta-box a{color:var(--muni-blue)!important;font-weight:950!important;text-decoration:underline!important;word-break:break-word!important}
.sidebar-quote{
  margin:14px 0 12px!important;
  padding:12px!important;
  border:1px solid var(--muni-line)!important;
  background:#f7f7f7!important;
  color:#000!important;
  font-size:13px!important;
  line-height:1.35!important;
  font-weight:800!important;
}
.sidebar-quote strong{font-weight:950!important;color:#000!important}
.sidebar-quote-punch{display:block!important;font-size:14.5px!important;font-weight:950!important;color:#000!important;line-height:1.35!important}

.sidebar-decadence{
  display:block!important;
  width:100%!important;
  max-width:170px!important;
  height:auto!important;
  max-height:220px!important;
  object-fit:cover!important;
  object-position:center center!important;
  margin:0 auto!important;
  border:1px solid var(--muni-line)!important;
  filter:grayscale(100%)!important;
  background:#000!important;
}
@media(max-width:760px){
  :root{--bottom-nav-height:178px!important}
  .sidebar{
    grid-template-columns:repeat(3,1fr)!important;
    align-items:stretch!important;
    gap:7px!important;
  }
  .sidebar-extra{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 64px!important;
    gap:8px!important;
    grid-column:1 / -1!important;
    order:-1!important;
    margin:0!important;
    padding:6px 6px 8px!important;
    border-top:0!important;
    border-bottom:1px solid var(--muni-line)!important;
    background:#fff!important;
  }
  .sidebar-meta-box{
    padding:6px 8px!important;
    border-left:6px solid #007b69!important;
  }
  .sidebar-meta-box p{
    font-size:11px!important;
    line-height:1.18!important;
    margin-bottom:3px!important;
  }
  .sidebar-quote{
    grid-column:1 / 2!important;
    margin:2px 0 0!important;
    padding:5px 7px!important;
    font-size:10.5px!important;
    line-height:1.16!important;
    border:0!important;
    background:#f5f5f5!important;
  }
  .sidebar-decadence{
    grid-column:2 / 3!important;
    grid-row:1 / span 2!important;
    width:64px!important;
    max-width:64px!important;
    height:88px!important;
    max-height:88px!important;
    object-fit:cover!important;
    margin:0!important;
    align-self:center!important;
  }
  .nav-btn{min-height:58px!important;font-size:10.5px!important;padding:7px 4px!important}
  main{min-height:calc(100dvh - var(--bottom-nav-height))!important}
  .footer{margin-bottom:calc(var(--bottom-nav-height) + 8px)!important;padding-bottom:calc(14px + var(--bottom-nav-height))!important}
}



/* ===== MOBIL: informace v panelu jen nahoře stránky ===== */
@media(max-width:760px){
  body.mobile-sidebar-condensed{--bottom-nav-height:88px!important;}
  body.mobile-sidebar-condensed .sidebar-extra{display:none!important;}
  body.mobile-sidebar-condensed .sidebar{min-height:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom))!important;}
  body.mobile-sidebar-condensed main{min-height:calc(100dvh - var(--bottom-nav-height))!important;}
  body.mobile-sidebar-condensed .footer{margin-bottom:calc(var(--bottom-nav-height) + 8px)!important;padding-bottom:calc(14px + var(--bottom-nav-height))!important;}
}


/* ===== Strukturované čtení kapitol ===== */
.text-content.chapter-structured{white-space:normal!important;padding:0!important;}
.chapter-formatted{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,Helvetica,sans-serif!important;line-height:1.68!important;color:#111827!important;max-width:980px!important;margin:0 auto!important;}
.chapter-formatted mark{background:#007b69!important;color:#fff!important;padding:0 .18em!important;border-radius:3px!important;}
.chapter-part-heading{margin:0 0 22px!important;padding:18px 20px!important;background:#0000dc!important;color:#fff!important;font-size:24px!important;line-height:1.18!important;font-weight:950!important;border-left:12px solid #007b69!important;letter-spacing:-.02em!important;}
.chapter-question-heading{margin:22px 0 18px!important;padding:16px 18px!important;border:2px solid #0000dc!important;border-left:14px solid #007b69!important;background:#fff!important;color:#000!important;font-size:23px!important;line-height:1.22!important;font-weight:950!important;letter-spacing:-.02em!important;}
.chapter-person-heading{margin:26px 0 4px!important;padding:12px 14px!important;background:#f5f5f5!important;border-left:10px solid #0000dc!important;color:#000!important;font-size:21px!important;line-height:1.25!important;font-weight:950!important;}
.chapter-date-line{margin:0 0 12px 24px!important;color:#475569!important;font-size:14px!important;font-weight:800!important;}
.chapter-subheading{margin:22px 0 10px!important;padding:9px 12px!important;border-left:8px solid #007b69!important;background:#f7fbfa!important;color:#000!important;font-size:18px!important;line-height:1.32!important;font-weight:950!important;}
.chapter-number-heading{margin:18px 0 10px!important;padding:10px 12px!important;background:#eef7f5!important;border-left:8px solid #007b69!important;color:#000!important;font-size:17px!important;line-height:1.36!important;font-weight:950!important;}
.chapter-paragraph{margin:0 0 10px!important;color:#111827!important;font-size:16.5px!important;line-height:1.72!important;}
.chapter-paragraph.compact{margin-top:-4px!important;}
.chapter-bullet{display:grid!important;grid-template-columns:26px 1fr!important;gap:7px!important;margin:7px 0!important;padding:8px 12px!important;background:#fbfbfb!important;border:1px solid #e5e7eb!important;color:#111827!important;font-size:16px!important;line-height:1.6!important;}
.chapter-bullet.level-1{border-left:7px solid #0000dc!important;}
.chapter-bullet.level-2{margin-left:24px!important;border-left:6px solid #007b69!important;background:#fff!important;}
.bullet-dot{font-weight:950!important;color:#0000dc!important;text-align:center!important;}
.chapter-bullet.level-2 .bullet-dot{color:#007b69!important;}
.chapter-gap{height:12px!important;}

@media(max-width:760px){.chapter-formatted{font-size:15.5px!important}.chapter-part-heading{font-size:21px!important;padding:14px 15px!important}.chapter-question-heading{font-size:20px!important;padding:13px 14px!important}.chapter-person-heading{font-size:18px!important}.chapter-subheading{font-size:16.5px!important}.chapter-bullet{font-size:15px!important;grid-template-columns:22px 1fr!important;padding:8px 10px!important}.chapter-bullet.level-2{margin-left:10px!important}.chapter-paragraph{font-size:15.5px!important;line-height:1.68!important}}

/* ===== PŘEPÍNAČ POL/BSS: oba obory používají stejnou strukturu aplikace ===== */
.sidebar-meta-box a {
  overflow-wrap: anywhere !important;
}

/* Jemnější mezery v názvu aplikace v levém panelu */
.brand h1{letter-spacing:.02em!important;}

/* ===== AI kontrola přípravných testů ===== */
.check-buttons.dual{grid-template-columns:1fr 1fr!important;gap:12px!important}
.check-btn.ai{background:#007b69!important;color:#fff!important;border:1px solid #007b69!important}
.ai-test-info-card{margin-top:14px;border-radius:18px;border:1px solid #bfdbfe;background:#eff6ff;padding:14px;line-height:1.5}
.ai-test-info-card h4{margin:0 0 6px;color:#0000dc;font-weight:950}
.ai-test-info-card p{margin:0;font-size:14px;color:#1e3a8a}
@media(max-width:760px){.check-buttons.dual{grid-template-columns:1fr!important}.ai-test-info-card{font-size:14px}}


/* ===== MOBILE MUNI FONT + STUDY FOCUS MODE ===== */
@media(max-width:760px){
  body,
  .sidebar,
  .nav-btn,
  .brand,
  .hero,
  .section-head,
  .chapter-card,
  .reader,
  .test-panel,
  .question-panel,
  .download-card,
  .footer,
  button,
  input,
  select,
  textarea{
    font-family:"MUNI", Arial, Helvetica, sans-serif!important;
  }
  .text-content,
  .chapter-structured,
  .chapter-formatted,
  .reader-body,
  .question textarea{
    font-family:"MUNI", Arial, Helvetica, sans-serif!important;
  }
}

/* Režim soustředění při čtení kapitoly */
body.reading-focus #chapters .section-head,
body.reading-focus #chapters .toolbar,
body.reading-focus #chapters .chapter-grid{
  opacity:.22!important;
  filter:grayscale(.25) contrast(.9)!important;
  transition:opacity .22s ease, filter .22s ease!important;
}
body.reading-focus .hero{
  opacity:.20!important;
  filter:grayscale(.3)!important;
  transition:opacity .22s ease, filter .22s ease!important;
}
body.reading-focus .sidebar{
  opacity:.72!important;
  transition:opacity .22s ease!important;
}
body.reading-focus #chapterReader{
  opacity:1!important;
  filter:none!important;
  position:relative!important;
  z-index:50!important;
  border-color:#007b69!important;
  box-shadow:0 0 0 4px rgba(0,123,105,.08), 0 24px 80px rgba(0,0,0,.18)!important;
}
body.reading-focus #chapterReader .reader-head{
  border-left:12px solid #007b69!important;
}
@media(max-width:760px){
  body.reading-focus #chapters .section-head,
  body.reading-focus #chapters .toolbar,
  body.reading-focus #chapters .chapter-grid,
  body.reading-focus .hero{
    opacity:.12!important;
    max-height:70px!important;
    overflow:hidden!important;
    pointer-events:none!important;
  }
  body.reading-focus .sidebar{
    opacity:1!important;
  }
  body.reading-focus #chapterReader{
    margin-top:8px!important;
    box-shadow:0 0 0 3px rgba(0,123,105,.10)!important;
  }
}


/* ===== THEME SWITCHER / IS-LIKE APPEARANCE ===== */
.theme-toggle-btn{position:fixed!important;top:14px!important;right:18px!important;z-index:1300!important;width:42px!important;height:42px!important;border-radius:999px!important;border:1px solid rgba(0,0,0,.12)!important;background:rgba(255,255,255,.92)!important;color:#1e2b3a!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:18px!important;cursor:pointer!important;box-shadow:0 8px 28px rgba(0,0,0,.12)!important;backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important}
.theme-toggle-btn:hover{transform:translateY(-1px)!important}
.theme-backdrop{position:fixed!important;inset:0!important;background:rgba(0,0,0,.18)!important;z-index:1290!important;opacity:0!important;transition:opacity .18s ease!important}
.theme-backdrop.open{opacity:1!important}
.theme-panel{position:fixed!important;top:66px!important;right:18px!important;z-index:1301!important;width:min(420px,calc(100vw - 24px))!important;background:rgba(10,16,25,.96)!important;color:#f4f6fa!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:18px!important;padding:18px!important;box-shadow:0 24px 80px rgba(0,0,0,.35)!important;opacity:0!important;transform:translateY(-8px) scale(.98)!important;transition:opacity .18s ease, transform .18s ease!important;backdrop-filter:blur(14px)!important;-webkit-backdrop-filter:blur(14px)!important}
.theme-panel.open{opacity:1!important;transform:translateY(0) scale(1)!important}
.theme-panel-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin-bottom:10px!important}
.theme-panel-head h3{margin:0!important;font-size:20px!important;color:#fff!important;font-family:"MUNI",Arial,Helvetica,sans-serif!important}
.theme-close-btn{width:34px!important;height:34px!important;border-radius:999px!important;border:1px solid rgba(255,255,255,.14)!important;background:rgba(255,255,255,.06)!important;color:#fff!important;font-size:22px!important;line-height:1!important;cursor:pointer!important}
.theme-group{margin-top:12px!important}
.theme-group-label{font-size:13px!important;letter-spacing:.09em!important;text-transform:uppercase!important;opacity:.78!important;margin-bottom:10px!important}
.theme-row.two{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
.theme-chip{min-height:48px!important;border-radius:999px!important;border:1px solid rgba(255,255,255,.14)!important;background:#a9c7de!important;color:#1c2a38!important;font-size:17px!important;cursor:pointer!important;padding:0 16px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important}
.theme-chip::before{content:""!important;width:18px!important;height:18px!important;border-radius:50%!important;border:2px solid rgba(0,0,0,.22)!important;background:#2b2b2b!important;box-shadow:inset 0 0 0 3px rgba(255,255,255,.08)!important}
.theme-chip.active,.theme-bg-card.active{outline:2px solid #8eb8ff!important;outline-offset:2px!important}
.theme-bg-grid{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:14px!important}
.theme-bg-card{border:0!important;background:transparent!important;color:#f1f5fb!important;cursor:pointer!important;padding:0!important;text-align:center!important}
.theme-bg-card span:last-child{display:block!important;margin-top:8px!important;font-size:15px!important}
.theme-preview{display:block!important;width:100%!important;aspect-ratio:1/1!important;border-radius:8px!important;border:1px solid rgba(255,255,255,.22)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)!important}
.preview-plain{background:#f2f2f2!important}
.preview-stars{background:radial-gradient(circle at 20% 20%,rgba(255,255,255,.95) 0 1px,transparent 2px),radial-gradient(circle at 74% 35%,rgba(255,255,255,.9) 0 1.5px,transparent 2px),radial-gradient(circle at 60% 68%,rgba(255,255,255,.85) 0 1px,transparent 2px),linear-gradient(180deg,#14253c 0%,#1f385e 45%,#0f1620 100%)!important;background-size:auto,auto,auto,cover!important}
.preview-mesh{background:radial-gradient(circle at 18% 24%,rgba(0,123,105,.35),transparent 26%),radial-gradient(circle at 80% 18%,rgba(0,0,220,.24),transparent 30%),radial-gradient(circle at 50% 80%,rgba(0,123,105,.20),transparent 24%),#f4f6f8!important}
body.theme-dark{background:#10161e!important;color:#edf3f9!important}
body.theme-dark main{background:#0f141b!important}
body.theme-dark .hero,body.theme-dark .section-head,body.theme-dark .reader,body.theme-dark .test-panel,body.theme-dark .question-panel,body.theme-dark .download-card,body.theme-dark .chapter-card,body.theme-dark .question,body.theme-dark .score-box,body.theme-dark .feedback-card,body.theme-dark .empty,body.theme-dark .sidebar,body.theme-dark .topbar{background:#171f29!important;border-color:rgba(255,255,255,.10)!important;box-shadow:none!important}
body.theme-dark .hero h2,body.theme-dark .section-head h2,body.theme-dark .question-panel-head h3,body.theme-dark .reader-head h3,body.theme-dark .download-card h2,body.theme-dark .test-panel h3,body.theme-dark .chapter-card h3,body.theme-dark .chapter-card h4,body.theme-dark .brand,body.theme-dark .sidebar-meta-box,body.theme-dark .sidebar-quote,body.theme-dark .footer,body.theme-dark .footer a{color:#f3f7fc!important}
body.theme-dark .hero p,body.theme-dark .section-head p,body.theme-dark .download-card p,body.theme-dark .question-panel-head p,body.theme-dark .reader-head p,body.theme-dark .progress-summary,body.theme-dark .sidebar p,body.theme-dark .sidebar a,body.theme-dark .clean-download-note,body.theme-dark .question small,body.theme-dark .theme-panel-head h3{color:#dbe5ef!important}
body.theme-dark input,body.theme-dark textarea,body.theme-dark select,body.theme-dark .command,body.theme-dark .select{background:#10161e!important;color:#eff5fa!important;border-color:rgba(255,255,255,.14)!important}
body.theme-dark .mini-btn,body.theme-dark .download-link.secondary,body.theme-dark .muni-email-btn.secondary{background:#10161e!important;color:#eef4fa!important;border-color:rgba(255,255,255,.16)!important}
body.theme-dark .footer{border-top-color:rgba(255,255,255,.12)!important}
body.bg-stars{background:radial-gradient(circle at 10% 12%,rgba(255,255,255,.9) 0 1px,transparent 2px),radial-gradient(circle at 72% 14%,rgba(255,255,255,.9) 0 1px,transparent 2px),radial-gradient(circle at 34% 32%,rgba(255,255,255,.7) 0 1px,transparent 2px),radial-gradient(circle at 82% 28%,rgba(255,255,255,.75) 0 1px,transparent 2px),linear-gradient(180deg,#263a5d 0%,#243146 22%,#1c2535 58%,#121822 100%)!important;background-attachment:fixed!important}
body.bg-stars main{background:transparent!important}
body.bg-stars .hero,body.bg-stars .section-head,body.bg-stars .reader,body.bg-stars .test-panel,body.bg-stars .question-panel,body.bg-stars .download-card,body.bg-stars .chapter-card,body.bg-stars .question,body.bg-stars .score-box,body.bg-stars .feedback-card,body.bg-stars .empty{background:rgba(255,255,255,.96)!important}
body.theme-dark.bg-stars .hero,body.theme-dark.bg-stars .section-head,body.theme-dark.bg-stars .reader,body.theme-dark.bg-stars .test-panel,body.theme-dark.bg-stars .question-panel,body.theme-dark.bg-stars .download-card,body.theme-dark.bg-stars .chapter-card,body.theme-dark.bg-stars .question,body.theme-dark.bg-stars .score-box,body.theme-dark.bg-stars .feedback-card,body.theme-dark.bg-stars .empty,body.theme-dark.bg-stars .sidebar{background:rgba(15,22,32,.92)!important}
body.bg-mesh{background:radial-gradient(circle at 8% 18%,rgba(0,123,105,.18),transparent 20%),radial-gradient(circle at 90% 16%,rgba(0,0,220,.10),transparent 26%),radial-gradient(circle at 50% 90%,rgba(0,123,105,.12),transparent 20%),linear-gradient(180deg,#f4f7fa 0%,#eef3f7 100%)!important;background-attachment:fixed!important}
body.bg-mesh main{background:transparent!important}
@media(max-width:760px){.theme-toggle-btn{top:10px!important;right:12px!important;width:38px!important;height:38px!important;font-size:17px!important}.theme-panel{top:auto!important;right:8px!important;left:8px!important;bottom:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 10px)!important;width:auto!important;max-height:min(72vh,640px)!important;overflow:auto!important;border-radius:18px!important;padding:16px!important}.theme-bg-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}.theme-bg-card span:last-child{font-size:13px!important}.theme-chip{min-height:44px!important;font-size:16px!important}}


/* ===== VIDITELNÝ PŘIHLÁŠENÝ ÚČET ===== */
.auth-account{
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  gap:9px!important;
  align-items:center!important;
  margin:8px 0 9px!important;
  padding:9px!important;
  border:1px solid #007b69!important;
  background:#f2fbf8!important;
  color:#000!important;
}
.auth-account[hidden]{display:none!important;}
.auth-avatar{
  width:34px!important;
  height:34px!important;
  border-radius:999px!important;
  background:#007b69!important;
  color:#fff!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-family:"MUNI",Arial,Helvetica,sans-serif!important;
  font-weight:950!important;
  font-size:16px!important;
  line-height:1!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.25)!important;
}
.auth-account-text{
  min-width:0!important;
  line-height:1.15!important;
}
.auth-account-text span{
  display:block!important;
  font-size:9.5px!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
  font-weight:950!important;
  color:#007b69!important;
  margin-bottom:3px!important;
}
.auth-account-text strong{
  display:block!important;
  font-size:12px!important;
  font-weight:950!important;
  color:#000!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  letter-spacing:.02em!important;
}
.auth-card.is-signed-in .auth-status{
  color:#007b69!important;
  font-weight:900!important;
}
.auth-card.is-signed-in #muniLogout{
  display:block!important;
}
@media(max-width:760px){
  .auth-account{
    grid-template-columns:28px minmax(0,1fr)!important;
    gap:7px!important;
    margin:5px 0!important;
    padding:7px!important;
  }
  .auth-avatar{
    width:28px!important;
    height:28px!important;
    font-size:13px!important;
  }
  .auth-account-text span{
    font-size:8.5px!important;
    margin-bottom:2px!important;
  }
  .auth-account-text strong{
    font-size:10.5px!important;
  }
}
body.theme-dark .auth-account{
  background:rgba(0,123,105,.17)!important;
  border-color:#00a88f!important;
}
body.theme-dark .auth-account-text strong{
  color:#fff!important;
}
body.theme-dark .auth-account-text span{
  color:#6ee7d8!important;
}


/* ===== VŽDY VIDITELNÝ PŘIHLÁŠENÝ ÚČET ===== */
.top-auth-badge{
  position:fixed!important;
  top:64px!important;
  right:18px!important;
  z-index:1302!important;
  display:grid!important;
  grid-template-columns:34px minmax(0,220px) auto!important;
  gap:9px!important;
  align-items:center!important;
  padding:9px 10px!important;
  border:1px solid #007b69!important;
  border-left:8px solid #007b69!important;
  background:rgba(255,255,255,.96)!important;
  color:#000!important;
  box-shadow:0 12px 38px rgba(0,0,0,.16)!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
  font-family:"MUNI",Arial,Helvetica,sans-serif!important;
  max-width:min(460px,calc(100vw - 28px))!important;
}
.top-auth-badge[hidden]{display:none!important;}
.top-auth-avatar{
  width:34px!important;
  height:34px!important;
  border-radius:999px!important;
  background:#007b69!important;
  color:#fff!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-weight:950!important;
  font-size:16px!important;
}
.top-auth-text{min-width:0!important;line-height:1.12!important;}
.top-auth-text span{
  display:block!important;
  font-size:9px!important;
  letter-spacing:.14em!important;
  text-transform:uppercase!important;
  color:#007b69!important;
  font-weight:950!important;
  margin-bottom:3px!important;
}
.top-auth-text strong{
  display:block!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:12px!important;
  font-weight:950!important;
  color:#000!important;
}
.top-auth-logout{
  border:1px solid #0000dc!important;
  background:#fff!important;
  color:#0000dc!important;
  padding:7px 9px!important;
  font-size:10px!important;
  font-weight:950!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  cursor:pointer!important;
  font-family:"MUNI",Arial,Helvetica,sans-serif!important;
}
.top-auth-logout:hover{background:#0000dc!important;color:#fff!important;}
.auth-account{
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  gap:9px!important;
  align-items:center!important;
  margin:8px 0 9px!important;
  padding:9px!important;
  border:1px solid #007b69!important;
  background:#f2fbf8!important;
  color:#000!important;
}
.auth-account[hidden]{display:none!important;}
.auth-avatar{
  width:34px!important;
  height:34px!important;
  border-radius:999px!important;
  background:#007b69!important;
  color:#fff!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-weight:950!important;
  font-size:16px!important;
}
.auth-account-text{min-width:0!important;line-height:1.15!important;}
.auth-account-text span{
  display:block!important;
  font-size:9.5px!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
  font-weight:950!important;
  color:#007b69!important;
  margin-bottom:3px!important;
}
.auth-account-text strong{
  display:block!important;
  font-size:12px!important;
  font-weight:950!important;
  color:#000!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  letter-spacing:.02em!important;
}
.auth-card.is-signed-in .auth-status{color:#007b69!important;font-weight:900!important;}
.auth-card.is-signed-in #muniLogout{display:block!important;}
@media(max-width:760px){
  .top-auth-badge{
    top:10px!important;
    left:10px!important;
    right:58px!important;
    max-width:none!important;
    grid-template-columns:28px minmax(0,1fr) auto!important;
    gap:7px!important;
    padding:7px 8px!important;
    border-left-width:6px!important;
  }
  .top-auth-avatar{width:28px!important;height:28px!important;font-size:13px!important;}
  .top-auth-text span{font-size:8px!important;margin-bottom:2px!important;}
  .top-auth-text strong{font-size:10.5px!important;}
  .top-auth-logout{padding:6px 7px!important;font-size:9px!important;}
  .auth-account{
    grid-template-columns:28px minmax(0,1fr)!important;
    gap:7px!important;
    margin:5px 0!important;
    padding:7px!important;
  }
  .auth-avatar{width:28px!important;height:28px!important;font-size:13px!important;}
  .auth-account-text span{font-size:8.5px!important;margin-bottom:2px!important;}
  .auth-account-text strong{font-size:10.5px!important;}
}
body.theme-dark .top-auth-badge,
body.theme-dark .auth-account{
  background:rgba(15,22,32,.96)!important;
  border-color:#00a88f!important;
  color:#fff!important;
}
body.theme-dark .top-auth-text strong,
body.theme-dark .auth-account-text strong{color:#fff!important;}
body.theme-dark .top-auth-text span,
body.theme-dark .auth-account-text span{color:#6ee7d8!important;}
body.theme-dark .top-auth-logout{background:#10161e!important;color:#9eb8ff!important;border-color:#9eb8ff!important;}


/* ===== LEPŠÍ STAV PŘIHLÁŠENÍ ===== */
.auth-help-small{
  font-size:10.5px!important;
  line-height:1.28!important;
  color:#555!important;
  margin:4px 0 7px!important;
  font-weight:650!important;
}
.auth-status{
  overflow-wrap:anywhere!important;
}
@media(max-width:760px){
  .auth-help-small{font-size:9.5px!important;line-height:1.18!important;margin:2px 0 4px!important;}
}
body.theme-dark .auth-help-small{color:#d2dde9!important;}



/* ===== OPRAVA TMAVÉHO REŽIMU + FOTO MOTIVY ===== */
body.theme-dark .brand h1,
body.theme-dark .brand p,
body.theme-dark .logo,
body.theme-dark .eyebrow,
body.theme-dark .hero-image-card figcaption,
body.theme-dark .download-card h2,
body.theme-dark .download-card h3,
body.theme-dark .download-card p,
body.theme-dark .download-card li,
body.theme-dark .download-card a,
body.theme-dark .section-head h2,
body.theme-dark .section-head p,
body.theme-dark .toolbar,
body.theme-dark .toolbar input,
body.theme-dark .toolbar select,
body.theme-dark .download-view,
body.theme-dark .clean-download-note,
body.theme-dark .sidebar h1,
body.theme-dark .sidebar p,
body.theme-dark .sidebar a,
body.theme-dark .side-note,
body.theme-dark .side-note strong{
  color:#f5f9ff!important;
}
body.theme-dark .brand h1{color:#ffffff!important;}
body.theme-dark .brand p{color:#dbe7f5!important;}
body.theme-dark .logo{color:#fff!important;}
body.theme-dark .hero,
body.theme-dark .section-head,
body.theme-dark .download-card,
body.theme-dark .reader,
body.theme-dark .test-panel,
body.theme-dark .question-panel,
body.theme-dark .question,
body.theme-dark .score-box,
body.theme-dark .feedback-card,
body.theme-dark .empty,
body.theme-dark .sidebar,
body.theme-dark .sidebar-panel,
body.theme-dark .hero-image-card,
body.theme-dark .toolbar,
body.theme-dark .download-view,
body.theme-dark .reader-head,
body.theme-dark .reader-body,
body.theme-dark .chapter-reader,
body.theme-dark .chapter-structured,
body.theme-dark .chapter-formatted,
body.theme-dark .text-content,
body.theme-dark .accordion,
body.theme-dark .ai-chat,
body.theme-dark .notes-box,
body.theme-dark .test-results,
body.theme-dark .popup-card,
body.theme-dark .support-popup,
body.theme-dark .support-modal,
body.theme-dark .sidebar-meta-box,
body.theme-dark .sidebar-quote,
body.theme-dark .auth-card,
body.theme-dark .theme-panel,
body.theme-dark .theme-toggle-btn,
body.theme-dark .hero-card,
body.theme-dark .footer{
  background-color:#131b25!important;
  color:#f1f6fc!important;
  border-color:rgba(255,255,255,.12)!important;
}
body.theme-dark .hero,
body.theme-dark .section-head,
body.theme-dark .download-card,
body.theme-dark .reader,
body.theme-dark .question-panel,
body.theme-dark .test-panel,
body.theme-dark .sidebar,
body.theme-dark .hero-image-card,
body.theme-dark .toolbar,
body.theme-dark .footer,
body.theme-dark .sidebar-meta-box,
body.theme-dark .sidebar-quote,
body.theme-dark .auth-card{
  box-shadow:none!important;
}
body.theme-dark .sidebar-meta-box,
body.theme-dark .sidebar-quote,
body.theme-dark .auth-card{
  background:#182330!important;
  color:#edf4fb!important;
}
body.theme-dark .sidebar-meta-box strong,
body.theme-dark .sidebar-quote strong,
body.theme-dark .sidebar-quote-punch,
body.theme-dark .auth-status,
body.theme-dark .auth-help-small,
body.theme-dark .progress-summary,
body.theme-dark .sidebar-meta-box p,
body.theme-dark .sidebar-quote p{
  color:#edf4fb!important;
}
body.theme-dark .sidebar-meta-box a,
body.theme-dark .footer a,
body.theme-dark .sidebar a{
  color:#9ec8ff!important;
}
body.theme-dark .nav-btn{
  background:#192434!important;
  border-color:rgba(255,255,255,.12)!important;
  color:#f4f8fe!important;
}
body.theme-dark .nav-btn.active{
  background:linear-gradient(135deg,#0000dc,#007b69)!important;
  color:#fff!important;
}
body.theme-dark .theme-toggle-btn{
  background:rgba(19,27,37,.95)!important;
  color:#f3f8ff!important;
  border-color:rgba(255,255,255,.14)!important;
}
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .command,
body.theme-dark .select,
body.theme-dark .chat-input,
body.theme-dark .question textarea{
  background:#0e151d!important;
  color:#f4f9ff!important;
  border-color:rgba(255,255,255,.14)!important;
}
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder{color:#aec1d5!important;opacity:1!important;}
body.theme-dark .mini-btn,
body.theme-dark .download-link.secondary,
body.theme-dark .muni-email-btn.secondary,
body.theme-dark .top-auth-logout,
body.theme-dark .close-btn,
body.theme-dark .reader-close,
body.theme-dark .theme-close-btn{
  background:#101821!important;
  color:#f0f6fc!important;
  border-color:rgba(255,255,255,.16)!important;
}
body.theme-dark .download-link:not(.secondary),
body.theme-dark .muni-email-btn:not(.secondary),
body.theme-dark .cta,
body.theme-dark .primary-btn,
body.theme-dark .button-primary{
  background:#0000dc!important;
  color:#fff!important;
  border-color:#0000dc!important;
}
body.theme-dark .chapter-card,
body.theme-dark .chapter-card:hover,
body.theme-dark .question,
body.theme-dark .empty,
body.theme-dark .score-box,
body.theme-dark .feedback-card{
  background:#141d28!important;
  color:#f5f9ff!important;
  border-color:rgba(255,255,255,.12)!important;
}
body.theme-dark .chapter-card h3,
body.theme-dark .chapter-card h4,
body.theme-dark .question h3,
body.theme-dark .question h4,
body.theme-dark .download-card strong,
body.theme-dark .reader-body strong,
body.theme-dark .reader-body h1,
body.theme-dark .reader-body h2,
body.theme-dark .reader-body h3,
body.theme-dark .reader-body h4,
body.theme-dark .reader-body li,
body.theme-dark .reader-body p,
body.theme-dark .text-content,
body.theme-dark .chapter-formatted,
body.theme-dark .chapter-structured,
body.theme-dark .download-card li,
body.theme-dark .feedback-card p,
body.theme-dark .feedback-card li,
body.theme-dark .question label,
body.theme-dark .question small{
  color:#eef5fc!important;
}
body.theme-dark .tag,
body.theme-dark .keyword,
body.theme-dark .chip{
  background:#2038f0!important;
  color:#fff!important;
}
body.theme-dark .footer{
  color:#dce8f5!important;
  border-top-color:rgba(255,255,255,.10)!important;
}
body.theme-dark .hero-image-card figcaption{background:#131b25!important;color:#f6fbff!important;}
body.theme-dark .theme-chip{background:#24374c!important;color:#f4f8ff!important;border-color:rgba(255,255,255,.14)!important;}
body.theme-dark .theme-chip::before{background:#101821!important;border-color:rgba(255,255,255,.22)!important;}
body.theme-dark .theme-bg-card{color:#eef5fb!important;}
body.theme-dark .top-auth-badge{background:rgba(19,27,37,.96)!important;color:#fff!important;border-color:#00a88f!important;}
body.theme-dark .top-auth-text strong,
body.theme-dark .auth-account-text strong{color:#fff!important;}
body.theme-dark .top-auth-text span,
body.theme-dark .auth-account-text span{color:#82ead8!important;}
body.theme-dark .support-note,
body.theme-dark .popup-card p,
body.theme-dark .popup-card strong{color:#eef4fb!important;}
body.theme-dark .support-modal .close,
body.theme-dark .support-popup .close{color:#fff!important;}

/* Lepší mřížka motivů */
.theme-bg-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
.theme-bg-card span:last-child{font-size:14px!important;font-weight:800!important}
.theme-preview{background-size:cover!important;background-position:center center!important}
.preview-stars{background-image:linear-gradient(rgba(7,14,25,.48),rgba(7,14,25,.48)), url('assets/theme/vesmir.jpg')!important;}
.preview-mesh{background:radial-gradient(circle at 18% 24%,rgba(0,123,105,.35),transparent 26%),radial-gradient(circle at 80% 18%,rgba(0,0,220,.24),transparent 30%),radial-gradient(circle at 50% 80%,rgba(0,123,105,.20),transparent 24%),#f4f6f8!important}
.preview-atrium{background-image:linear-gradient(rgba(255,248,234,.20),rgba(255,248,234,.20)), url('assets/theme/atrium.jpg')!important;}
body.bg-stars{position:relative!important;background:#0f1620!important;}
body.bg-stars::before{
  content:""!important;position:fixed!important;inset:0!important;z-index:-1!important;
  background-image:linear-gradient(rgba(4,10,18,.64),rgba(4,10,18,.70)), url('assets/theme/vesmir.jpg')!important;
  background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;
}
body.bg-stars main{background:transparent!important}
body.bg-stars .hero,
body.bg-stars .section-head,
body.bg-stars .reader,
body.bg-stars .test-panel,
body.bg-stars .question-panel,
body.bg-stars .download-card,
body.bg-stars .chapter-card,
body.bg-stars .question,
body.bg-stars .score-box,
body.bg-stars .feedback-card,
body.bg-stars .empty,
body.bg-stars .sidebar,
body.bg-stars .auth-card,
body.bg-stars .sidebar-meta-box,
body.bg-stars .sidebar-quote{background:rgba(255,255,255,.93)!important}
body.theme-dark.bg-stars .hero,
body.theme-dark.bg-stars .section-head,
body.theme-dark.bg-stars .reader,
body.theme-dark.bg-stars .test-panel,
body.theme-dark.bg-stars .question-panel,
body.theme-dark.bg-stars .download-card,
body.theme-dark.bg-stars .chapter-card,
body.theme-dark.bg-stars .question,
body.theme-dark.bg-stars .score-box,
body.theme-dark.bg-stars .feedback-card,
body.theme-dark.bg-stars .empty,
body.theme-dark.bg-stars .sidebar,
body.theme-dark.bg-stars .auth-card,
body.theme-dark.bg-stars .sidebar-meta-box,
body.theme-dark.bg-stars .sidebar-quote{background:rgba(15,22,32,.90)!important}
body.bg-atrium{position:relative!important;background:#f1eee6!important;}
body.bg-atrium::before{
  content:""!important;position:fixed!important;inset:0!important;z-index:-1!important;
  background-image:linear-gradient(rgba(245,238,228,.50),rgba(238,232,221,.54)), url('assets/theme/atrium.jpg')!important;
  background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;
}
body.bg-atrium main{background:transparent!important}
body.bg-atrium .hero,
body.bg-atrium .section-head,
body.bg-atrium .reader,
body.bg-atrium .test-panel,
body.bg-atrium .question-panel,
body.bg-atrium .download-card,
body.bg-atrium .chapter-card,
body.bg-atrium .question,
body.bg-atrium .score-box,
body.bg-atrium .feedback-card,
body.bg-atrium .empty,
body.bg-atrium .sidebar,
body.bg-atrium .auth-card,
body.bg-atrium .sidebar-meta-box,
body.bg-atrium .sidebar-quote{background:rgba(255,251,245,.92)!important}
body.theme-dark.bg-atrium::before{background-image:linear-gradient(rgba(14,18,24,.78),rgba(14,18,24,.70)), url('assets/theme/atrium.jpg')!important;}
body.theme-dark.bg-atrium .hero,
body.theme-dark.bg-atrium .section-head,
body.theme-dark.bg-atrium .reader,
body.theme-dark.bg-atrium .test-panel,
body.theme-dark.bg-atrium .question-panel,
body.theme-dark.bg-atrium .download-card,
body.theme-dark.bg-atrium .chapter-card,
body.theme-dark.bg-atrium .question,
body.theme-dark.bg-atrium .score-box,
body.theme-dark.bg-atrium .feedback-card,
body.theme-dark.bg-atrium .empty,
body.theme-dark.bg-atrium .sidebar,
body.theme-dark.bg-atrium .auth-card,
body.theme-dark.bg-atrium .sidebar-meta-box,
body.theme-dark.bg-atrium .sidebar-quote{background:rgba(15,22,32,.90)!important}
@media(max-width:760px){
  .theme-bg-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  body.bg-stars::before, body.bg-atrium::before{background-position:center center!important}
}


/* ===== FINÁLNÍ OPRAVA MOTIVŮ VE STYLU IS ===== */
/* Jen tři motivy: čistý, vesmír, atrium. Starý jemný motiv je odstraněný z menu. */
.theme-bg-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:14px!important;
}
.theme-bg-card[data-theme-bg="mesh"]{display:none!important;}
.theme-bg-card span:last-child{
  font-weight:850!important;
}
.theme-preview{
  background-size:cover!important;
  background-position:center center!important;
}
.preview-plain{
  background:#f5f5f5!important;
}
.preview-stars{
  background-image:linear-gradient(rgba(7,14,25,.35),rgba(7,14,25,.38)), url("assets/theme/vesmir.jpg")!important;
}
.preview-atrium{
  background-image:linear-gradient(rgba(255,255,255,.18),rgba(255,255,255,.22)), url("assets/theme/atrium.jpg")!important;
}

/* Přímý background na body je spolehlivější než záporný z-index pseudo-element. */
body.bg-plain{
  background:#f6f6f6!important;
  background-image:none!important;
}
body.bg-stars{
  background-image:linear-gradient(rgba(4,10,18,.66),rgba(4,10,18,.72)), url("assets/theme/vesmir.jpg")!important;
  background-size:cover!important;
  background-position:center center!important;
  background-repeat:no-repeat!important;
  background-attachment:fixed!important;
}
body.bg-atrium{
  background-image:linear-gradient(rgba(255,255,255,.68),rgba(255,255,255,.72)), url("assets/theme/atrium.jpg")!important;
  background-size:cover!important;
  background-position:center center!important;
  background-repeat:no-repeat!important;
  background-attachment:fixed!important;
}
body.theme-dark.bg-atrium{
  background-image:linear-gradient(rgba(9,14,20,.78),rgba(9,14,20,.78)), url("assets/theme/atrium.jpg")!important;
}
body.theme-dark.bg-stars{
  background-image:linear-gradient(rgba(4,9,16,.54),rgba(4,9,16,.72)), url("assets/theme/vesmir.jpg")!important;
}

/* Zrušení starých pseudo podkladů, které mohly padat za bílé pozadí. */
body.bg-stars::before,
body.bg-atrium::before{
  display:none!important;
  content:none!important;
}

/* IS efekt: obsah je na jemně průsvitných kartách nad fotkou. */
body.bg-stars main,
body.bg-atrium main{
  background:transparent!important;
}
body.bg-stars .app-shell,
body.bg-atrium .app-shell{
  background:transparent!important;
}
body.bg-stars .hero,
body.bg-stars .section-head,
body.bg-stars .reader,
body.bg-stars .test-panel,
body.bg-stars .question-panel,
body.bg-stars .download-card,
body.bg-stars .chapter-card,
body.bg-stars .question,
body.bg-stars .score-box,
body.bg-stars .feedback-card,
body.bg-stars .empty,
body.bg-stars .footer,
body.bg-atrium .hero,
body.bg-atrium .section-head,
body.bg-atrium .reader,
body.bg-atrium .test-panel,
body.bg-atrium .question-panel,
body.bg-atrium .download-card,
body.bg-atrium .chapter-card,
body.bg-atrium .question,
body.bg-atrium .score-box,
body.bg-atrium .feedback-card,
body.bg-atrium .empty,
body.bg-atrium .footer{
  background:rgba(255,255,255,.86)!important;
  backdrop-filter:blur(7px)!important;
  -webkit-backdrop-filter:blur(7px)!important;
}
body.bg-stars .sidebar,
body.bg-stars .auth-card,
body.bg-stars .sidebar-meta-box,
body.bg-stars .sidebar-quote,
body.bg-atrium .sidebar,
body.bg-atrium .auth-card,
body.bg-atrium .sidebar-meta-box,
body.bg-atrium .sidebar-quote{
  background:rgba(255,255,255,.82)!important;
  backdrop-filter:blur(7px)!important;
  -webkit-backdrop-filter:blur(7px)!important;
}
body.bg-stars .hero-image-card,
body.bg-atrium .hero-image-card{
  background:rgba(255,255,255,.90)!important;
}

/* Tmavá verze motivů */
body.theme-dark.bg-stars .hero,
body.theme-dark.bg-stars .section-head,
body.theme-dark.bg-stars .reader,
body.theme-dark.bg-stars .test-panel,
body.theme-dark.bg-stars .question-panel,
body.theme-dark.bg-stars .download-card,
body.theme-dark.bg-stars .chapter-card,
body.theme-dark.bg-stars .question,
body.theme-dark.bg-stars .score-box,
body.theme-dark.bg-stars .feedback-card,
body.theme-dark.bg-stars .empty,
body.theme-dark.bg-stars .footer,
body.theme-dark.bg-atrium .hero,
body.theme-dark.bg-atrium .section-head,
body.theme-dark.bg-atrium .reader,
body.theme-dark.bg-atrium .test-panel,
body.theme-dark.bg-atrium .question-panel,
body.theme-dark.bg-atrium .download-card,
body.theme-dark.bg-atrium .chapter-card,
body.theme-dark.bg-atrium .question,
body.theme-dark.bg-atrium .score-box,
body.theme-dark.bg-atrium .feedback-card,
body.theme-dark.bg-atrium .empty,
body.theme-dark.bg-atrium .footer{
  background:rgba(16,24,34,.84)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
}
body.theme-dark.bg-stars .sidebar,
body.theme-dark.bg-stars .auth-card,
body.theme-dark.bg-stars .sidebar-meta-box,
body.theme-dark.bg-stars .sidebar-quote,
body.theme-dark.bg-atrium .sidebar,
body.theme-dark.bg-atrium .auth-card,
body.theme-dark.bg-atrium .sidebar-meta-box,
body.theme-dark.bg-atrium .sidebar-quote{
  background:rgba(16,24,34,.86)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
}

/* Tmavý režim: prvky, které předtím zůstávaly světlé nebo nečitelné. */
body.theme-dark main{
  background:transparent!important;
}
body.theme-dark .brand h1{
  color:#fff!important;
}
body.theme-dark .brand p,
body.theme-dark .sidebar p,
body.theme-dark .sidebar-meta-box p,
body.theme-dark .sidebar-meta-box strong,
body.theme-dark .sidebar-quote,
body.theme-dark .sidebar-quote strong,
body.theme-dark .sidebar-quote-punch,
body.theme-dark .auth-title,
body.theme-dark .auth-status,
body.theme-dark .auth-help-small,
body.theme-dark .progress-summary,
body.theme-dark .footer,
body.theme-dark .footer-meta,
body.theme-dark .footer span,
body.theme-dark .section-head p,
body.theme-dark .download-card p,
body.theme-dark .download-card li,
body.theme-dark .reader-body,
body.theme-dark .reader-body p,
body.theme-dark .reader-body li,
body.theme-dark .text-content,
body.theme-dark .chapter-formatted,
body.theme-dark .chapter-structured{
  color:#edf4fb!important;
}
body.theme-dark .sidebar-meta-box a,
body.theme-dark .footer a{
  color:#a9ceff!important;
}
body.theme-dark .nav-btn{
  background:#192434!important;
  color:#f5f9ff!important;
  border-color:rgba(255,255,255,.14)!important;
}
body.theme-dark .nav-btn.active{
  background:#0000dc!important;
  color:#fff!important;
}
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .command input,
body.theme-dark .select{
  background:#0f1722!important;
  color:#f4f8ff!important;
  border-color:rgba(255,255,255,.16)!important;
}
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder{
  color:#b7c7d8!important;
}
body.theme-dark .tag,
body.theme-dark .chip{
  background:#0000dc!important;
  color:#fff!important;
}
body.theme-dark .hero-image-card figcaption{
  background:#131b25!important;
  color:#fff!important;
}
body.theme-dark .theme-toggle-btn{
  background:rgba(19,27,37,.96)!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.18)!important;
}
body.theme-dark .theme-chip{
  background:#24374c!important;
  color:#f4f8ff!important;
}
body.theme-dark .theme-bg-card{
  color:#f4f8ff!important;
}

@media(max-width:760px){
  .theme-bg-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
  }
  body.bg-stars,
  body.bg-atrium{
    background-attachment:scroll!important;
  }
}


/* ===== HERO PRŮSVITNÝ PŘES MOTIVY ===== */
body.bg-stars .hero,
body.bg-atrium .hero{
  background:rgba(255,255,255,.68)!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
  border-color:rgba(255,255,255,.45)!important;
}
body.bg-stars .hero-image-card,
body.bg-atrium .hero-image-card{
  background:rgba(255,255,255,.74)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
  border-color:rgba(255,255,255,.42)!important;
}
body.bg-stars .hero-image-card figcaption,
body.bg-atrium .hero-image-card figcaption{
  background:rgba(255,255,255,.76)!important;
}
body.bg-stars .program-switch,
body.bg-atrium .program-switch{
  background:rgba(255,255,255,.66)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
  border-color:rgba(0,0,220,.72)!important;
}
body.bg-stars .program-option,
body.bg-atrium .program-option{
  background:rgba(255,255,255,.72)!important;
}
body.bg-stars .bss-notice,
body.bg-atrium .bss-notice{
  background:rgba(255,255,255,.70)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
}
body.theme-dark.bg-stars .hero,
body.theme-dark.bg-atrium .hero{
  background:rgba(14,22,32,.62)!important;
  backdrop-filter:blur(11px)!important;
  -webkit-backdrop-filter:blur(11px)!important;
  border-color:rgba(255,255,255,.16)!important;
}
body.theme-dark.bg-stars .hero-image-card,
body.theme-dark.bg-atrium .hero-image-card{
  background:rgba(16,24,34,.68)!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
  border-color:rgba(255,255,255,.14)!important;
}
body.theme-dark.bg-stars .hero-image-card figcaption,
body.theme-dark.bg-atrium .hero-image-card figcaption{
  background:rgba(16,24,34,.78)!important;
}
body.theme-dark.bg-stars .program-switch,
body.theme-dark.bg-atrium .program-switch{
  background:rgba(16,24,34,.58)!important;
  border-color:rgba(120,156,255,.8)!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
}
body.theme-dark.bg-stars .program-option,
body.theme-dark.bg-atrium .program-option{
  background:rgba(16,24,34,.76)!important;
  color:#eef5fc!important;
}
body.theme-dark.bg-stars .program-option.active,
body.theme-dark.bg-atrium .program-option.active{
  background:#0000dc!important;
  color:#fff!important;
}
body.theme-dark.bg-stars .bss-notice,
body.theme-dark.bg-atrium .bss-notice{
  background:rgba(16,24,34,.70)!important;
  color:#eef5fc!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
}
@media(max-width:760px){
  body.bg-stars .hero,
  body.bg-atrium .hero{
    background:rgba(255,255,255,.63)!important;
  }
  body.theme-dark.bg-stars .hero,
  body.theme-dark.bg-atrium .hero{
    background:rgba(14,22,32,.68)!important;
  }
}


/* ===== OPRAVA PŘEPÍNAČE POL/BSS VE SVĚTLÉM REŽIMU S MOTIVY ===== */
body.bg-stars .program-switch,
body.bg-atrium .program-switch{
  background:rgba(255,255,255,.78)!important;
  border:2px solid rgba(0,0,220,.88)!important;
  box-shadow:0 6px 18px rgba(15,23,42,.08)!important;
}
body.bg-stars .program-option,
body.bg-atrium .program-option{
  background:rgba(255,255,255,.80)!important;
  color:var(--muni-blue)!important;
  border:0!important;
  transition:background .18s ease,color .18s ease, box-shadow .18s ease!important;
}
body.bg-stars .program-option:hover,
body.bg-atrium .program-option:hover{
  background:rgba(240,244,255,.98)!important;
}
body.bg-stars .program-option.active,
body.bg-stars .program-option[aria-pressed="true"],
body.bg-atrium .program-option.active,
body.bg-atrium .program-option[aria-pressed="true"]{
  background:var(--muni-blue)!important;
  color:#fff!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.10)!important;
}
body.bg-stars .program-option:not(.active)[aria-pressed="false"],
body.bg-atrium .program-option:not(.active)[aria-pressed="false"]{
  background:rgba(255,255,255,.78)!important;
  color:var(--muni-blue)!important;
}

@media (max-width:760px){
  body.bg-stars .program-switch,
  body.bg-atrium .program-switch{
    background:rgba(255,255,255,.84)!important;
  }
  body.bg-stars .program-option,
  body.bg-atrium .program-option{
    background:rgba(255,255,255,.86)!important;
  }
}


/* ===== OPRAVA TMAVÉHO ČISTÉHO REŽIMU ===== */
html body.theme-dark.bg-plain{
  background:#000000!important;
  background-image:none!important;
  color:#edf3f9!important;
}
body.theme-dark.bg-plain main{
  background:transparent!important;
}
body.theme-dark.bg-plain .app-shell{
  background:#000000!important;
}
body.theme-dark.bg-plain .hero,
body.theme-dark.bg-plain .section-head,
body.theme-dark.bg-plain .reader,
body.theme-dark.bg-plain .test-panel,
body.theme-dark.bg-plain .question-panel,
body.theme-dark.bg-plain .download-card,
body.theme-dark.bg-plain .chapter-card,
body.theme-dark.bg-plain .question,
body.theme-dark.bg-plain .score-box,
body.theme-dark.bg-plain .feedback-card,
body.theme-dark.bg-plain .empty,
body.theme-dark.bg-plain .sidebar,
body.theme-dark.bg-plain .auth-card,
body.theme-dark.bg-plain .sidebar-meta-box,
body.theme-dark.bg-plain .sidebar-quote,
body.theme-dark.bg-plain .footer,
body.theme-dark.bg-plain .toolbar,
body.theme-dark.bg-plain .hero-image-card{
  background:#111820!important;
  border-color:rgba(255,255,255,.12)!important;
}
body.theme-dark.bg-plain .hero-image-card figcaption{
  background:#111820!important;
  color:#f7fbff!important;
}
body.theme-dark.bg-plain .sidebar{
  background:linear-gradient(180deg,#10161e,#0b1118 55%,#05080d)!important;
}
body.theme-dark.bg-plain .toolbar input,
body.theme-dark.bg-plain .toolbar select,
body.theme-dark.bg-plain input,
body.theme-dark.bg-plain textarea,
body.theme-dark.bg-plain select{
  background:#0d141b!important;
  color:#eef5fb!important;
  border-color:rgba(255,255,255,.14)!important;
}
body.theme-dark.bg-plain .program-switch{
  background:#111820!important;
  border-color:#7a9cff!important;
}
body.theme-dark.bg-plain .program-option{
  background:#182330!important;
  color:#eef5fb!important;
}
body.theme-dark.bg-plain .program-option.active,
body.theme-dark.bg-plain .program-option[aria-pressed="true"]{
  background:#0000dc!important;
  color:#fff!important;
}
@media(max-width:760px){
  html body.theme-dark.bg-plain{
    background:#000000!important;
  }
  body.theme-dark.bg-plain .app-shell{
    background:#000000!important;
  }
}


/* ===== OPRAVA ČITELNOSTI V TMAVÉM REŽIMU: NADPISY V KAPITOLÁCH + AI OKNO ===== */
body.theme-dark .chapter-formatted,
body.theme-dark .chapter-structured,
body.theme-dark .text-content.chapter-structured{
  color:#edf4fb!important;
}

body.theme-dark .chapter-part-heading{
  background:#2038f0!important;
  color:#ffffff!important;
  border-left-color:#007b69!important;
  box-shadow:none!important;
}
body.theme-dark .chapter-question-heading{
  background:#131b25!important;
  color:#f7fbff!important;
  border-color:#3454ff!important;
  border-left-color:#007b69!important;
}
body.theme-dark .chapter-person-heading{
  background:#18222e!important;
  color:#f5f9ff!important;
  border-left-color:#3454ff!important;
}
body.theme-dark .chapter-subheading{
  background:#13251f!important;
  color:#f6fbff!important;
  border-left-color:#007b69!important;
}
body.theme-dark .chapter-number-heading{
  background:#10211d!important;
  color:#f4fbff!important;
  border-left-color:#007b69!important;
}
body.theme-dark .chapter-date-line{
  color:#c3d3e4!important;
}
body.theme-dark .chapter-paragraph{
  color:#edf4fb!important;
}
body.theme-dark .chapter-bullet{
  background:#18222e!important;
  color:#edf4fb!important;
  border-color:rgba(255,255,255,.10)!important;
}
body.theme-dark .chapter-bullet.level-1{
  border-left-color:#3454ff!important;
}
body.theme-dark .chapter-bullet.level-2{
  background:#121a24!important;
  border-left-color:#007b69!important;
}
body.theme-dark .bullet-dot{
  color:#90b5ff!important;
}
body.theme-dark .chapter-bullet.level-2 .bullet-dot{
  color:#59c9b4!important;
}
body.theme-dark .chapter-formatted mark,
body.theme-dark .text-content mark{
  background:#007b69!important;
  color:#ffffff!important;
}

/* AI chat / okno u kapitoly */
body.theme-dark .chapter-chat-box{
  background:#121a24!important;
  color:#edf4fb!important;
  border-color:rgba(255,255,255,.12)!important;
  border-left-color:#3454ff!important;
}
body.theme-dark .chapter-chat-head h4{
  color:#ffffff!important;
}
body.theme-dark .chapter-chat-head p,
body.theme-dark .chat-placeholder,
body.theme-dark .chapter-ai-note{
  color:#c7d6e6!important;
}
body.theme-dark .chapter-command{
  color:#ddebff!important;
}
body.theme-dark #chapterChatInput{
  background:#0d141b!important;
  color:#f3f8fe!important;
  border-color:rgba(255,255,255,.14)!important;
}
body.theme-dark #chapterChatInput::placeholder{
  color:#a9bdd0!important;
  opacity:1!important;
}
body.theme-dark .chapter-chat-messages{
  background:#0f1720!important;
  color:#edf4fb!important;
  border-color:rgba(255,255,255,.10)!important;
}
body.theme-dark .chat-msg{
  color:#eef5fc!important;
}
body.theme-dark .chat-msg strong{
  color:#ffffff!important;
}
body.theme-dark .chat-msg.user{
  background:#18222f!important;
  color:#f3f8ff!important;
  border-left:10px solid #6b7280!important;
}
body.theme-dark .chat-msg.assistant{
  background:#122033!important;
  color:#eef6ff!important;
  border:1px solid rgba(120,160,255,.18)!important;
  border-left:10px solid #3454ff!important;
}
body.theme-dark .chat-msg.assistant strong{
  color:#b8ceff!important;
}
body.theme-dark .chapter-ai-status{
  background:#162231!important;
  color:#e9f2fb!important;
  border-color:rgba(255,255,255,.14)!important;
}
body.theme-dark .chapter-ai-status.loading{
  background:#14243a!important;
  color:#cfe0ff!important;
  border-color:#3454ff!important;
}
body.theme-dark .chapter-ai-status.ok{
  background:#11261f!important;
  color:#8de0ca!important;
  border-color:#007b69!important;
}
body.theme-dark .chapter-ai-status.error{
  background:#2a1418!important;
  color:#ffb9c3!important;
  border-color:#a33a47!important;
}

/* případné nadpisy a texty v AI/test kartách */
body.theme-dark .question-panel-head h3,
body.theme-dark .question-panel-head p,
body.theme-dark .test-panel h3,
body.theme-dark .test-panel p,
body.theme-dark .test-panel h4,
body.theme-dark .mode-card h4,
body.theme-dark .mode-card p,
body.theme-dark .mode-card{
  color:#edf4fb!important;
}


/* ===== BODOVÝ SYSTÉM ===== */
.points-system{
  margin-top:10px!important;
  padding:10px!important;
  border:1px solid #007b69!important;
  border-left:8px solid #007b69!important;
  background:#f2fbf8!important;
  color:#000!important;
  font-family:"MUNI",Arial,Helvetica,sans-serif!important;
}
.points-row{
  display:flex!important;
  justify-content:space-between!important;
  align-items:baseline!important;
  gap:10px!important;
  font-size:12px!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  font-weight:950!important;
  color:#007b69!important;
}
.points-row strong{
  font-size:24px!important;
  line-height:1!important;
  color:#000!important;
  letter-spacing:0!important;
}
.points-level{
  margin-top:5px!important;
  font-size:12px!important;
  font-weight:850!important;
  color:#000!important;
}
.points-level strong{
  color:#0000dc!important;
  font-weight:950!important;
}
.points-next{
  margin-top:4px!important;
  font-size:10.5px!important;
  line-height:1.25!important;
  color:#333!important;
  font-weight:750!important;
}
.points-bar{
  margin-top:8px!important;
  height:8px!important;
  background:#dfeeea!important;
  border:1px solid rgba(0,123,105,.35)!important;
  overflow:hidden!important;
}
.points-bar span{
  display:block!important;
  height:100%!important;
  width:0%;
  background:#007b69!important;
  transition:width .25s ease!important;
}
body.theme-dark .points-system{
  background:#10241f!important;
  border-color:#007b69!important;
  color:#edf4fb!important;
}
body.theme-dark .points-row,
body.theme-dark .points-next{
  color:#9fe6d7!important;
}
body.theme-dark .points-row strong,
body.theme-dark .points-level,
body.theme-dark .points-level strong{
  color:#ffffff!important;
}
body.theme-dark .points-bar{
  background:#0b1714!important;
  border-color:#007b69!important;
}
@media(max-width:760px){
  .points-system{
    margin-top:5px!important;
    padding:7px!important;
    border-left-width:6px!important;
  }
  .points-row{font-size:9.5px!important;}
  .points-row strong{font-size:18px!important;}
  .points-level{font-size:10px!important;margin-top:2px!important;}
  .points-next{font-size:9px!important;}
  .points-bar{height:6px!important;margin-top:5px!important;}
}


/* ===== BODOVÝ SYSTÉM: VÍCE ÚROVNÍ ===== */
.points-legend{
  margin-top:7px!important;
  font-size:9.5px!important;
  line-height:1.35!important;
  color:#475569!important;
  font-weight:700!important;
}
body.theme-dark .points-legend{
  color:#b9c9d9!important;
}
@media(max-width:760px){
  .points-legend{
    font-size:8.5px!important;
    line-height:1.25!important;
    margin-top:5px!important;
  }
}


/* ===== ÚPRAVA PROGRES PANELU + PROFIL A ÚROVNĚ ===== */
.auth-title{
  text-align:center!important;
  font-size:calc(14px + 1px)!important;
  letter-spacing:.06em!important;
}
.auth-status{
  font-size:10px!important;
  line-height:1.2!important;
  text-align:center!important;
}
.auth-help-small{
  font-size:8.8px!important;
  text-align:center!important;
  margin-top:2px!important;
}
.progress-summary,
.points-next,
.points-bar,
.points-legend{
  display:none!important;
}
.points-system.compact{
  margin-top:8px!important;
}
.profile-open-btn{
  display:block!important;
  width:100%!important;
  margin-top:8px!important;
  padding:9px 10px!important;
  border:1px solid #0000dc!important;
  background:#fff!important;
  color:#0000dc!important;
  font-family:"MUNI",Arial,Helvetica,sans-serif!important;
  font-weight:950!important;
  font-size:11px!important;
  cursor:pointer!important;
  text-transform:uppercase!important;
  letter-spacing:.06em!important;
}
.profile-open-btn:hover{
  background:#0000dc!important;
  color:#fff!important;
}
.profile-page{
  display:grid!important;
  gap:18px!important;
}
.profile-top-card,
.profile-scale-card,
.profile-levels-card{
  background:#fff!important;
  border:1px solid #d8e1ea!important;
  padding:18px!important;
}
.profile-top-card{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:14px!important;
}
.profile-mini-label{
  font-size:11px!important;
  line-height:1.2!important;
  text-transform:uppercase!important;
  letter-spacing:.1em!important;
  color:#007b69!important;
  font-weight:950!important;
  margin-bottom:5px!important;
}
.profile-user-name,
.profile-current-level{
  font-size:24px!important;
  line-height:1.1!important;
  color:#111!important;
  font-weight:950!important;
}
.profile-big-number{
  font-size:38px!important;
  line-height:1!important;
  color:#0000dc!important;
  font-weight:950!important;
}
.profile-fun-note{
  margin:0 auto!important;
  max-width:560px!important;
  width:100%!important;
  text-align:center!important;
  padding:14px 18px!important;
  background:#c62828!important;
  color:#fff!important;
  font-size:15px!important;
  font-weight:950!important;
  border:1px solid #9e1d1d!important;
}
.profile-scale-card h3,
.profile-levels-card h3{
  margin:0 0 12px!important;
  font-size:22px!important;
  color:#111!important;
}
.profile-scale-bar{
  width:100%!important;
  height:16px!important;
  background:#ebf0f4!important;
  border:1px solid #cad6e1!important;
  overflow:hidden!important;
}
.profile-scale-bar span{
  display:block!important;
  height:100%!important;
  width:0%;
  background:linear-gradient(90deg,#007b69 0%, #0000dc 100%)!important;
  transition:width .25s ease!important;
}
.profile-scale-legend{
  margin-top:8px!important;
  font-size:13px!important;
  color:#334155!important;
  font-weight:800!important;
}
.profile-levels-list{
  display:grid!important;
  gap:10px!important;
}
.profile-level-item{
  display:grid!important;
  grid-template-columns:110px 1fr auto!important;
  align-items:center!important;
  gap:12px!important;
  padding:12px 14px!important;
  border:1px solid #dbe4ec!important;
  background:#fbfdff!important;
}
.profile-level-item .profile-level-points{
  font-weight:950!important;
  color:#0000dc!important;
}
.profile-level-item .profile-level-name{
  font-weight:900!important;
  color:#111!important;
}
.profile-level-item .profile-level-state{
  font-size:12px!important;
  font-weight:850!important;
  color:#556371!important;
}
.profile-level-item.current{
  border-color:#007b69!important;
  background:#eef9f6!important;
}
.profile-level-item.current .profile-level-state{
  color:#007b69!important;
}
.profile-level-item.reached:not(.current){
  background:#f5f8ff!important;
}
body.theme-dark .profile-open-btn{
  background:#10161e!important;
  color:#a9ceff!important;
  border-color:#a9ceff!important;
}
body.theme-dark .profile-open-btn:hover{
  background:#0000dc!important;
  color:#fff!important;
  border-color:#0000dc!important;
}
body.theme-dark .profile-top-card,
body.theme-dark .profile-scale-card,
body.theme-dark .profile-levels-card{
  background:#131b25!important;
  border-color:rgba(255,255,255,.12)!important;
}
body.theme-dark .profile-user-name,
body.theme-dark .profile-current-level,
body.theme-dark .profile-scale-card h3,
body.theme-dark .profile-levels-card h3,
body.theme-dark .profile-level-item .profile-level-name{
  color:#f7fbff!important;
}
body.theme-dark .profile-big-number{
  color:#9cbcff!important;
}
body.theme-dark .profile-scale-legend,
body.theme-dark .profile-level-item .profile-level-state{
  color:#c3d3e4!important;
}
body.theme-dark .profile-level-item{
  background:#101821!important;
  border-color:rgba(255,255,255,.10)!important;
}
body.theme-dark .profile-level-item.current{
  background:#11261f!important;
  border-color:#007b69!important;
}
body.theme-dark .profile-level-item.reached:not(.current){
  background:#122033!important;
}
@media(max-width:760px){
  .auth-title{font-size:14px!important;}
  .auth-status{font-size:9px!important;}
  .auth-help-small{font-size:8px!important;}
  .profile-top-card{
    grid-template-columns:1fr!important;
    gap:10px!important;
    padding:14px!important;
  }
  .profile-user-name,
  .profile-current-level{font-size:20px!important;}
  .profile-big-number{font-size:32px!important;}
  .profile-fun-note{font-size:13px!important;padding:11px 12px!important;}
  .profile-level-item{
    grid-template-columns:74px 1fr!important;
    gap:8px!important;
  }
  .profile-level-item .profile-level-state{
    grid-column:1 / -1!important;
  }
}


/* ===== BSS syntetický materiál – odkazy v sekci stažení ===== */
.bss-material-link[hidden]{display:none!important;}
.bss-material-link{display:inline-flex!important;}
body:not(.program-bss) .bss-material-link{display:none!important;}


/* ===== OPRAVA TMAVÉHO REŽIMU: TEST INFO KARTY A POZNÁMKA KE STAŽENÍ ===== */
body.theme-dark .local-info-card,
body.theme-dark .ai-test-info-card,
body.theme-dark .voice-info-card,
body.theme-dark .clean-download-note{
  background:#121b25!important;
  color:#edf4fb!important;
  border-color:rgba(255,255,255,.14)!important;
  box-shadow:none!important;
}
body.theme-dark .local-info-card{
  border-left:10px solid #007b69!important;
}
body.theme-dark .ai-test-info-card{
  border-left:10px solid #3454ff!important;
}
body.theme-dark .voice-info-card{
  border-left:10px solid #007b69!important;
}
body.theme-dark .clean-download-note{
  border-left:10px solid #3454ff!important;
}
body.theme-dark .local-info-card h4,
body.theme-dark .ai-test-info-card h4,
body.theme-dark .voice-info-card h4,
body.theme-dark .clean-download-note strong{
  color:#ffffff!important;
}
body.theme-dark .local-info-card p,
body.theme-dark .local-info-card p strong,
body.theme-dark .ai-test-info-card p,
body.theme-dark .voice-info-card p,
body.theme-dark .voice-info-card p strong,
body.theme-dark .clean-download-note{
  color:#dce8f5!important;
}
body.theme-dark .local-info-card p strong,
body.theme-dark .voice-info-card p strong{
  font-weight:950!important;
}
body.theme-dark .test-panel .local-info-card,
body.theme-dark .test-panel .ai-test-info-card,
body.theme-dark .test-panel .voice-info-card{
  background:#121b25!important;
}
body.theme-dark.bg-stars .local-info-card,
body.theme-dark.bg-stars .ai-test-info-card,
body.theme-dark.bg-stars .voice-info-card,
body.theme-dark.bg-stars .clean-download-note,
body.theme-dark.bg-atrium .local-info-card,
body.theme-dark.bg-atrium .ai-test-info-card,
body.theme-dark.bg-atrium .voice-info-card,
body.theme-dark.bg-atrium .clean-download-note{
  background:rgba(18,27,37,.88)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
}


/* ===== PŘÁNÍ MÍSTO ODPOČTU DO STÁTNIC ===== */
.exam-countdown-goodluck{
  border-radius:0!important;
  border:1px solid var(--muni-line,#dcdcdc)!important;
  border-left:14px solid var(--muni-blue,#0000dc)!important;
  background:#fff!important;
  box-shadow:none!important;
}
.exam-countdown-goodluck .exam-goodluck-inner{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:128px!important;
  padding:28px 22px!important;
  text-align:center!important;
}
.exam-goodluck-title{
  margin:0!important;
  color:#000!important;
  font-family:"MUNI",Arial,Helvetica,sans-serif!important;
  font-size:clamp(30px,5.4vw,58px)!important;
  line-height:1.04!important;
  font-weight:950!important;
  letter-spacing:-.045em!important;
}
@media(max-width:760px){
  .exam-countdown-goodluck{margin:14px 0 12px!important;border-left-width:10px!important;}
  .exam-countdown-goodluck .exam-goodluck-inner{min-height:108px!important;padding:22px 16px!important;}
  .exam-goodluck-title{font-size:clamp(28px,9vw,42px)!important;}
}

/* ===== POPUP: finální přání ke státnicím ===== */
.donation-goodluck{
  margin:16px 0 0!important;
  padding:13px 2px 0!important;
  border-top:4px solid var(--muni-red,#e4002b)!important;
  text-align:center!important;
  font-family:"MUNI",Arial,Helvetica,sans-serif!important;
}
.donation-goodluck strong{
  display:block!important;
  color:#000!important;
  font-size:15px!important;
  line-height:1.25!important;
  font-weight:950!important;
  letter-spacing:.05em!important;
}

/* ===== MOBILE AUDIO FIX: funkční nahrávky bez rozbitých URL ===== */
.chapter-audio-box{
  margin:0 0 18px!important;
  padding:16px!important;
  background:#fff!important;
  border:1px solid var(--muni-line, #dcdcdc)!important;
  border-left:10px solid var(--muni-green, #007b69)!important;
  box-shadow:none!important;
  color:#000!important;
}
.chapter-audio-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin-bottom:12px!important;
}
.chapter-audio-head h4{
  margin:0 0 5px!important;
  font-size:17px!important;
  line-height:1.2!important;
  font-weight:950!important;
  color:#000!important;
}
.chapter-audio-head p{
  margin:0!important;
  color:#334155!important;
  line-height:1.45!important;
  font-size:14px!important;
}
.chapter-audio-head code{
  word-break:break-all!important;
  white-space:normal!important;
}
.chapter-audio-box audio{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-height:42px!important;
}
.chapter-audio-download{
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:40px!important;
  padding:8px 12px!important;
  background:var(--muni-blue,#0000dc)!important;
  color:#fff!important;
  text-decoration:none!important;
  font-weight:950!important;
  border:1px solid var(--muni-blue,#0000dc)!important;
}
.chapter-audio-box.audio-missing{
  border-left-color:#94a3b8!important;
  background:#f8fafc!important;
}
body.theme-dark .chapter-audio-box{
  background:#171f29!important;
  color:#f3f7fc!important;
  border-color:rgba(255,255,255,.12)!important;
}
body.theme-dark .chapter-audio-head h4{color:#f3f7fc!important}
body.theme-dark .chapter-audio-head p{color:#dbe5ef!important}
body.theme-dark .chapter-audio-box.audio-missing{background:#111827!important}
@media(max-width:760px){
  .chapter-audio-box{padding:13px!important;margin-bottom:14px!important;border-left-width:8px!important}
  .chapter-audio-head{display:block!important;margin-bottom:10px!important}
  .chapter-audio-download{width:100%!important;margin-top:10px!important;min-height:44px!important}
  .chapter-audio-head h4{font-size:16px!important}
  .chapter-audio-head p{font-size:13px!important}
}
