/* lernkit Rich-Text: Anzeige (.lk-text) und Editor (.lkrt) */
.lk-text ul, .lk-text ol { margin:.3em 0; padding-left:1.4em; }
.lk-text li { margin:.1em 0; }
.lk-text sub, .lk-text sup { font-size:.72em; line-height:0; }
.lk-text .lk-f .katex { font-size:1.08em; }
.lk-text .lk-f-block { display:block; text-align:center; margin:.35em 0; }
.lk-text .lk-f-block .katex-display { margin:0; }
.lk-text .lk-f code { font:500 .9em ui-monospace, Menlo, monospace; background:#F1F5F9; border-radius:4px; padding:0 4px; }
.lk-text .katex-display > .katex { white-space:normal; }
.lk-text .katex { max-width:100%; }

.lkrt { position:relative; min-width:0; container-type:inline-size; }
.lkrt .lkrt-plain { padding-right:50px; }
.lkrt-an { position:absolute; top:6px; right:6px; z-index:2; box-sizing:border-box; border:1px solid transparent; background:transparent; color:#94A3B8; border-radius:7px; height:26px; min-width:40px; width:auto; max-width:none; margin:0; padding:0 9px; font:700 13px/24px 'Inter',system-ui,sans-serif; letter-spacing:.5px; white-space:nowrap; overflow:visible; cursor:pointer; opacity:.75; display:inline-flex; align-items:center; justify-content:center; }
.lkrt-an:hover, .lkrt-an:focus-visible { opacity:1; color:#0F766E; border-color:#99F6E4; background:#F0FDFA; outline:none; }
.lkrt-bar .lkrt-an { position:static; opacity:1; color:#0F766E; background:#F0FDFA; border-color:#99F6E4; }
.lkrt:has(.lkrt-bar) { border:1.5px solid #D8D5CE; border-radius:11px; background:#fff; }
.lkrt.fokus { border-color:#0D9488 !important; box-shadow:0 0 0 3px rgba(13,148,136,.12); }
.lkrt-bar { display:flex; flex-wrap:wrap; align-items:center; gap:2px; padding:4px 5px; border-bottom:1px solid #EEF2F6; background:#FAFBFC; border-radius:10px 10px 0 0; }
.lkrt-bar > button:not(.lkrt-an) { border:none; background:transparent; color:#334155; min-width:28px; height:28px; padding:0 7px; border-radius:6px; font:600 13px 'Inter',system-ui,sans-serif; cursor:pointer; display:inline-flex; align-items:center; gap:4px; }
.lkrt-bar > button:not(.lkrt-an):hover { background:#E2E8F0; color:#0F172A; }
.lkrt-bar > button.lkrt-text { font-size:12px; }
.lkrt-bar sup { font-size:.7em; vertical-align:super; line-height:0; } .lkrt-bar sub { font-size:.7em; vertical-align:sub; line-height:0; }
.lkrt-fx { font-family:'Times New Roman',serif; font-style:italic; font-size:14px; }
.lkrt-sep { width:1px; height:18px; background:#E2E8F0; margin:0 4px; }
.lkrt-ed { position:relative; min-height:40px; padding:9px 12px; font:400 15px/1.5 'Inter',system-ui,sans-serif; color:#334155; outline:none; overflow-wrap:anywhere; border-radius:0 0 10px 10px; }
.lkrt-mz .lkrt-ed { min-height:64px; }
.lkrt-ed.leer::before { content:attr(data-placeholder); color:#A3AAB5; pointer-events:none; position:absolute; }
.lkrt-ed .lk-f { cursor:pointer; border-radius:5px; padding:1px 2px; transition:background .15s; }
.lkrt-ed .lk-f:hover, .lkrt-ed .lk-f:focus { background:#CCFBF1; outline:none; }
.lkrt-zahl { display:block; font:600 11px 'Inter',system-ui,sans-serif; color:#64748B; text-align:right; padding:0 6px; }
.lkrt-zahl:empty { display:none; }
.lkrt-zahl.rot { color:#C62828; }

.lkrt-ov { position:fixed; inset:0; z-index:1000; background:rgba(15,23,42,.45); display:flex; align-items:flex-start; justify-content:center; padding:8vh 14px 14px; overflow:auto; }
.lkrt-dlg { width:100%; max-width:600px; background:#fff; border-radius:18px; box-shadow:0 20px 50px rgba(0,0,0,.3); padding:16px 18px; display:flex; flex-direction:column; gap:10px; font-family:'Inter',system-ui,sans-serif; }
.lkrt-tabs { display:flex; gap:4px; background:#F1F5F9; border-radius:10px; padding:3px; }
.lkrt-tabs button { flex:1; border:none; background:transparent; border-radius:8px; padding:7px 10px; font:700 12.5px 'Inter',system-ui,sans-serif; color:#64748B; cursor:pointer; }
.lkrt-tabs button.an { background:#fff; color:#0F172A; box-shadow:0 1px 2px rgba(0,0,0,.1); }
.lkrt-tex { width:100%; border:1.5px solid #D8D5CE; border-radius:10px; padding:9px 11px; font:500 14px/1.45 ui-monospace, Menlo, monospace; color:#0F172A; resize:vertical; outline:none; box-sizing:border-box; }
.lkrt-tex:focus { border-color:#0D9488; }
.lkrt-snips { display:flex; flex-wrap:wrap; gap:4px; }
.lkrt-snips button { border:1px solid #E2E8F0; background:#fff; border-radius:7px; padding:4px 8px; font:600 12px 'Inter',system-ui,sans-serif; color:#334155; cursor:pointer; }
.lkrt-snips button:hover { border-color:#0D9488; color:#0F766E; }
.lkrt-beisp span { font:600 11px 'Inter',system-ui,sans-serif; color:#94A3B8; align-self:center; margin-right:2px; }
.lkrt-beisp button { background:#F8FAFC; }
.lkrt-hilfe { font:400 11.5px/1.5 'Inter',system-ui,sans-serif; color:#64748B; }
.lkrt-hilfe code, .lkrt-tex, .lkrt-snips button { font-feature-settings:'calt' 0, 'liga' 0; }
.lkrt-hilfe code { font:500 11px ui-monospace, Menlo, monospace; background:#F1F5F9; border-radius:4px; padding:0 4px; }
.lkrt-vorrahmen { border:1px dashed #CBD5E1; border-radius:12px; min-height:62px; display:flex; align-items:center; justify-content:center; padding:10px; background:#FCFCFD; overflow-x:auto; }
.lkrt-vor { font-size:20px; color:#0F172A; }
.lkrt-vor .lk-f-block { display:block; }
.lkrt-leer { font:400 13px 'Inter',system-ui,sans-serif; color:#A3AAB5; }
.lkrt-fuss { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.lkrt-chk { font:500 12.5px 'Inter',system-ui,sans-serif; color:#334155; display:flex; gap:6px; align-items:center; cursor:pointer; }
.lkrt-b { border:1.5px solid #CBD5E1; background:#fff; color:#334155; border-radius:9px; height:34px; padding:0 13px; font:700 13px 'Inter',system-ui,sans-serif; cursor:pointer; }
.lkrt-b:hover { border-color:#0F172A; }
.lkrt-ok { background:#0D9488; border-color:#0D9488; color:#fff; } .lkrt-ok:hover { background:#0F766E; border-color:#0F766E; }
.lkrt-weg { color:#C62828; border-color:#F3C4C0; }
.lkrt-menue { position:absolute; z-index:1001; background:#fff; border:1px solid #E2E8F0; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.15); padding:8px; max-width:320px; }
.lkrt-zeichen { display:grid; grid-template-columns:repeat(7, 34px); gap:3px; }
.lkrt-zeichen button { height:32px; border:none; background:#F8FAFC; border-radius:6px; font:500 15px 'Inter',system-ui,sans-serif; color:#0F172A; cursor:pointer; }
.lkrt-zeichen button:hover { background:#CCFBF1; }
.lkrt-spec { font:400 12px/1.6 'Inter',system-ui,sans-serif; color:#334155; }
.lkrt-spec code { font:500 11.5px ui-monospace, Menlo, monospace; background:#F1F5F9; border-radius:4px; padding:1px 4px; }
@container (max-width:470px) { .lkrt-bar > button.lkrt-text { font-size:0; gap:0; } .lkrt-bar > button.lkrt-text .lkrt-fx { font-size:14px; } .lkrt-bar > button:not(.lkrt-an) { min-width:26px; padding:0 5px; } .lkrt-sep { margin:0 2px; } }
/* Aufsatz für fremd gerenderte Felder (lkrt-auto.js) */
.lkrt-auto { position:absolute; width:0; height:0; }
.lkrt-auto > .lkrt-an { position:absolute; white-space:nowrap; width:auto; }
.lkrt-auto.lkrt-auto-an { position:relative; width:auto; height:auto; flex:1 1 100%; align-self:stretch; min-width:0; }
