/* v10 · Bearbeiten vor Ort – Creator-Modus im Space (siehe Entscheidungen.md E3–E5) */

/* ---------- mode switch in the top bar ---------- */
#mode-sw:empty { display: none; }
.mode-sw { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); margin-right: 6px; }
.mode-sw button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.mode-sw button .icon { width: 15px; height: 15px; }
.mode-sw button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16,16,24,.12); }
.mode-sw button[data-v="edit"][aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
body.editing .topbar { box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- publish strip (only when something is unpublished) ---------- */
#pub-strip { background: #FFF6E0; border-bottom: 1px solid #F1D99A; color: #5C4300; font-size: 14px; }
.ps-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.pub-dot { width: 9px; height: 9px; border-radius: 50%; background: #E39B1B; box-shadow: 0 0 0 4px color-mix(in srgb, #E39B1B 25%, transparent); flex: none; }
.ps-acts { margin-left: auto; display: inline-flex; gap: 6px; }
#pub-strip .btn-ghost { color: #5C4300; }
:root[data-theme="dark"] #pub-strip { background: #2A2311; border-color: #4A3D17; color: #F3D27A; }
:root[data-theme="dark"] #pub-strip .btn-ghost { color: #F3D27A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #pub-strip { background: #2A2311; border-color: #4A3D17; color: #F3D27A; } :root:not([data-theme="light"]) #pub-strip .btn-ghost { color: #F3D27A; } }
.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 50vh; overflow-y: auto; }
.pub-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.pub-list li > span { display: grid; gap: 1px; flex: 1; min-width: 0; font-size: 14px; }
.pub-list li > span span { font-size: 12px; color: var(--muted); }
.pub-foot { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- editable text ---------- */
.ce { border-radius: 6px; outline: 1.5px dashed transparent; outline-offset: 3px; transition: outline-color .15s; cursor: text; min-height: 1.2em; }
.ce:hover { outline-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.ce:focus { outline: 2px solid var(--accent); }
.ce:empty::before { content: attr(data-ph); color: var(--muted); opacity: .75; }
.kh-hero .ce:hover { outline-color: rgba(255,255,255,.6); }
.kh-hero .ce:focus { outline-color: #fff; }
.kh-hero .ce:empty::before { color: rgba(255,255,255,.75); }
.ce-p { white-space: pre-wrap; display: block; }
.mini-btn { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; flex: none; cursor: pointer; }
.mini-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.mini-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.mini-btn:disabled { opacity: .35; cursor: default; }
.mini-btn .icon { width: 16px; height: 16px; }

/* ---------- blocks with "+" between them ---------- */
.cvb { position: relative; }
.bt { position: absolute; right: -6px; top: -14px; z-index: 2; display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); opacity: 0; transition: opacity .15s; }
.bt .mini-btn { width: 26px; height: 26px; }
.cvb:hover > .bt, .cvb:focus-within > .bt, .ee-q:hover > .bt { opacity: 1; }
.ins { position: relative; height: 22px; display: flex; align-items: center; justify-content: center; }
.ins::before { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; border-top: 1.5px dashed transparent; transition: border-color .15s; }
.ins:hover::before, .ins.open::before { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.ins-btn { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; opacity: .5; transition: opacity .15s, color .15s, border-color .15s, transform .15s; }
.ins-btn .icon { width: 14px; height: 14px; }
.ins:hover .ins-btn, .ins.open .ins-btn, .ins-btn:focus-visible { opacity: 1; color: var(--accent); border-color: var(--accent); }
.ins.open .ins-btn { transform: rotate(45deg); }
.ins-menu { display: none; position: absolute; top: calc(50% + 16px); left: 50%; transform: translateX(-50%); z-index: 30; padding: 6px; gap: 2px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); flex-wrap: wrap; width: max-content; max-width: min(560px, 90vw); }
.ins.open .ins-menu { display: flex; animation: pop .15s var(--ease); }
.ins-menu button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 12px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; }
.ins-menu button:hover { background: var(--accent-soft); color: var(--accent); }
.ins-menu .icon { width: 15px; height: 15px; }
.cv-prose > .ins:first-child:last-child { height: 44px; }
.cv-prose > .ins:first-child:last-child .ins-btn { opacity: 1; width: 34px; height: 34px; }
.cv-video { position: relative; display: flex; align-items: center; gap: 12px; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: var(--g); color: #fff; padding: 20px; cursor: pointer; margin: 0 0 8px; }
.cv-video::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.25); }
.cv-video input, .cv-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 3; }
.cv-video > * { position: relative; z-index: 2; }
.cv-play { position: absolute !important; inset: 0; display: grid; place-items: center; }
.cv-play .icon { width: 64px; height: 64px; }
.cv-vt { align-self: flex-end; font-weight: 600; font-size: 14px; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.cv-vr { align-self: flex-end; margin-left: auto; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 9px; background: rgba(255,255,255,.22); }
.cv-file { position: relative; cursor: pointer; }
.cv-file .meta span.ce { position: relative; z-index: 4; }

/* ---------- status field ---------- */
.vis-sel { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.vis-sel select { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; max-width: 240px; }
.vis-sel select:focus { outline: none; }
.vis-sel:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.vis-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--success); }
.vis-dot.vis-draft { background: var(--border); box-shadow: inset 0 0 0 1.5px var(--muted); }
.vis-dot.vis-preview { background: var(--accent); }
.vis-dot.vis-drip { background: #E39B1B; }

/* ---------- ⋯ menus ---------- */
.kebab { position: relative; }
.kebab > summary { list-style: none; cursor: pointer; }
.kebab > summary::-webkit-details-marker { display: none; }
.kebab-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; min-width: 230px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: grid; animation: pop .15s var(--ease); }
.kebab-pop button, .kebab-pop a { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.kebab-pop button:hover:not(:disabled), .kebab-pop a:hover { background: var(--surface-2); }
.kebab-pop button:disabled { opacity: .4; cursor: default; }
.kebab-pop .icon { width: 15px; height: 15px; color: var(--muted); flex: none; }
.kebab-pop .danger, .kebab-pop .danger .icon { color: var(--danger); }
.kebab-pop hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.kp-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px 2px; }
.kp-sp { width: 15px; flex: none; }
.toast-undo button { margin-left: 10px; border: 0; background: rgba(255,255,255,.16); color: inherit; font: inherit; font-weight: 700; padding: 5px 12px; border-radius: 8px; cursor: pointer; }

/* ---------- type chooser ---------- */
.tchoose { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tc { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); font: inherit; color: var(--text); cursor: pointer; }
.tc:hover, .tc:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.tc-ico, .qs-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.tc-t { display: grid; gap: 2px; } .tc-t span { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* ---------- quiet outline (course page + lesson panel) ---------- */
.qo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.qo-mod { position: relative; border-radius: 12px; min-width: 0; }
.qo-mh { position: relative; display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 20px; min-width: 0; }
.qo-mt { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--text); padding: 2px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qo-mt:focus { white-space: normal; }
.qo-row { position: relative; display: flex; align-items: center; border-radius: 9px; min-width: 0; }
.qo-row > a, .qo-line { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; padding: 7px 8px 7px 20px; font-size: 14px; color: var(--text); line-height: 1.35; }
.qo-row:hover { background: var(--surface-2); }
.qo-row.cur { background: var(--accent-soft); }
.qo-row.cur > a { color: var(--accent); font-weight: 600; }
.qo-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qo-line .qo-t { white-space: normal; flex: 0 1 auto; }
.qo-state { flex: none; font-size: 12px; font-style: italic; color: var(--muted); font-weight: 400; }
.qo-open { margin-left: auto; display: grid; place-items: center; width: 26px; height: 22px; border-radius: 7px; color: var(--muted); opacity: 0; }
.qo-open .icon { width: 15px; height: 15px; }
.qo-row:hover .qo-open { opacity: 1; }
.qo-open:hover { background: var(--accent-soft); color: var(--accent); }
.qo-grip { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); width: 16px; display: grid; place-items: center; color: var(--muted); cursor: grab; opacity: 0; transition: opacity .12s; z-index: 1; }
.qo-grip .icon { width: 13px; height: 13px; }
.qo-row:hover .qo-grip, .qo-mh:hover .qo-grip { opacity: .8; }
.qo-row .kebab, .qo-mh .kebab { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity .12s; }
.qo-row:hover .kebab, .qo-row:focus-within .kebab, .qo-row .kebab[open], .qo-mh:hover .kebab, .qo-mh:focus-within .kebab, .qo-mh .kebab[open] { opacity: 1; }
.qo-row .kebab[open], .qo-mh .kebab[open], .qo-row:has(.kebab[open]), .qo-mh:has(.kebab[open]), .qo-mod:has(.kebab[open]) { z-index: 60; }
.qo .kebab .mini-btn { width: 26px; height: 26px; }
.qo-row:hover .kebab .mini-btn, .qo-mh:hover .mini-btn { background: var(--surface); box-shadow: var(--shadow); }
.qo-mh .qo-plus { position: absolute; right: 32px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; opacity: 0; transition: opacity .12s; }
.qo-mh:hover .qo-plus, .qo-plus:focus-visible { opacity: 1; }
.qo-mh:hover .qo-mt { padding-right: 64px; }
.qo-row:hover > a, .qo-row:hover .qo-line { padding-right: 36px; }
.qo-row:hover > a .qo-state { display: none; }
.qo-add { display: flex; align-items: center; gap: 6px; margin: 2px 0 0 12px; padding: 5px 8px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted); border-radius: 8px; cursor: pointer; }
.qo-add .icon, .qo-addm .icon { width: 13px; height: 13px; }
.qo-add:hover { color: var(--accent); background: var(--accent-soft); }
.qo-addm { display: flex; align-items: center; gap: 6px; padding: 6px 4px 6px 20px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; justify-self: start; }
.qo-addm:hover { color: var(--accent); }
.cvo-drop { height: 2px; margin: 0 8px; border-radius: 3px; }
.is-dragging .cvo-drop { height: 22px; border: 1.5px dashed color-mix(in srgb, var(--accent) 40%, var(--border)); margin: 2px 8px 4px; }
.cvo-drop.drop-before { background: var(--accent-soft); border-style: solid !important; }
.qo-row.drop-before, .qo-mod.drop-before { box-shadow: 0 -2px 0 0 var(--accent); }
.dragging { opacity: .4; }
/* big version on the course page */
.qo-big .qo-mh { padding-top: 8px; }
.qo-big .qo-mt { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.qo-big .qo-line { font-size: 15px; padding-top: 10px; padding-bottom: 10px; }
.ke-ol { padding: 14px 8px; }
.ke-note { display: flex !important; gap: 10px; align-items: center; padding: 16px 18px !important; border-style: dashed !important; box-shadow: none !important; color: var(--muted); font-size: 14px; grid-template-columns: none !important; }
.ke-note .icon { color: var(--accent); flex: none; }
.ke-empty { display: grid; gap: 10px; justify-items: start; padding: 10px; }
/* panel in the lesson */
.fp-edit .fpanel-list { padding: 12px 6px 16px; }
.fp-edit .fpanel-head { padding-bottom: 12px; }

/* ---------- lesson page in edit mode ---------- */
.le-h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin: 8px 0 12px; letter-spacing: -.025em; }
.le-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.le-type { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.le-type .icon { width: 15px; height: 15px; }
.le-end { margin-top: 36px; padding-top: 16px; border-top: 1px dashed var(--border); }
.le-end .nav-cards { margin-top: 8px; }
.le-fake { pointer-events: none; opacity: .75; }
.le-more { margin-top: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.le-more > summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); list-style: none; }
.le-more > summary::-webkit-details-marker { display: none; }
.le-more > summary .icon { width: 16px; height: 16px; }
.le-more-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 16px 14px; font-size: 14px; }
.le-more-in label { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; }
.le-more-in select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.le-del { color: var(--danger); }
/* exercise + quiz edited inline */
.ee-row { display: flex; align-items: center; gap: 12px; cursor: default; }
.ee-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border); flex: none; }
.ee-t { flex: 1; min-width: 0; }
.ee-row .mini-btn { opacity: 0; } .ee-row:hover .mini-btn { opacity: 1; }
.ee-add { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1.5px dashed var(--border); border-radius: 10px; background: none; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; justify-self: start; margin-top: 4px; }
.ee-add:hover { border-color: var(--accent); color: var(--accent); }
.ee-add .icon { width: 14px; height: 14px; }
.ee-hint { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 20px; }
.ee-hint .icon { width: 14px; height: 14px; }
.ee-q { position: relative; display: grid; gap: 0; }
.ee-q > .bt { top: -6px; }
.ee-opt { cursor: default; gap: 12px; }
.ee-opt .key { border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: var(--text); }
.ee-opt .key:hover { outline: 2px solid var(--success); }
.ee-opt .mini-btn { opacity: 0; } .ee-opt:hover .mini-btn { opacity: 1; }
.ee-q .explain { color: var(--muted); }

/* ---------- product overview in edit mode ---------- */
.le-card { position: relative; cursor: default; }
.le-card.is-draft .cover { filter: saturate(.55); }
.le-cover { position: relative; }
.le-grip { position: absolute !important; left: 10px !important; top: 12px !important; transform: none !important; width: 28px !important; height: 28px; border-radius: 8px; background: rgba(255,255,255,.85); color: #333 !important; cursor: grab; }
.le-card:hover .le-grip { opacity: 1; }
.le-sw { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: rgba(255,255,255,.85); opacity: 0; transition: opacity .15s; }
.le-card:hover .le-sw, .le-sw:focus-within { opacity: 1; }
.le-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; padding: 0; }
.le-dot.on { box-shadow: 0 0 0 2px var(--text); }
.lc-meta { font-size: 13px; color: var(--muted); align-self: start; }
.le-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.le-foot .btn { margin-left: auto; }
.le-foot .kebab-pop { top: auto; bottom: calc(100% + 4px); }
.le-new { display: grid; place-content: center; justify-items: center; gap: 8px; min-height: 260px; border-radius: var(--radius); border: 1.5px dashed var(--border); background: none; font: inherit; color: var(--muted); cursor: pointer; text-align: center; padding: 20px; }
.le-new strong { color: var(--text); font-size: 16px; }
.le-new:hover { border-color: var(--accent); background: var(--accent-soft); }
.le-card.drop-before, .le-new.drop-before { box-shadow: -4px 0 0 0 var(--accent); }

/* touch: no hover – show tools quietly */
@media (hover: none) {
  .qo-grip { opacity: .5; }
  .qo-row .kebab, .qo-mh .kebab, .qo-mh .qo-plus, .bt, .le-sw, .qo-open, .ee-row .mini-btn, .ee-opt .mini-btn { opacity: 1; }
}
@media (max-width: 640px) {
  .mode-sw button span { display: none; }
  .mode-sw button { padding: 0 10px; }
  .tchoose { grid-template-columns: 1fr; }
  .ps-acts { margin-left: 0; }
}

.e-save { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.e-save .icon { width: 14px; height: 14px; }
@media (max-width: 640px) {
  body.is-creator .nav-link[data-nav="store"] { display: none; }
  body.is-creator .nav-link { white-space: nowrap; }
  .mode-sw { margin-right: 2px; }
}

/* =====================================================================
   v10.1 · Bearbeiten sieht aus wie Ansehen
   Nur änderbare Felder sind gepunktet umrandet; Werkzeuge erst beim Überfahren.
   ===================================================================== */
body.editing .ce { outline: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 3px; }
body.editing .ce:hover { outline-color: var(--accent); }
body.editing .ce:focus { outline: 2px solid var(--accent); }
body.editing .kh-hero .ce { outline-color: rgba(255,255,255,.65); }
body.editing .kh-hero .ce:focus { outline-color: #fff; }
/* "+" between blocks only while hovering the text */
.cv-prose .ins { opacity: 0; transition: opacity .15s; }
.cv-prose:hover .ins, .cv-prose .ins.open, .cv-prose .ins:focus-within, .cv-prose > .ins:first-child:last-child { opacity: 1; }
/* course outline in the normal look; tools float on hover */
.ed-row, .ed-mh { position: relative; }
.ed-row .ce, .ed-mh .ce { cursor: text; }
.ed-tools { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); opacity: 0; transition: opacity .12s; z-index: 2; }
.ed-tools .mini-btn { width: 28px; height: 28px; }
.ed-row:hover .ed-tools, .ed-row:focus-within .ed-tools, .ed-mh:hover .ed-tools, .ed-tools:has(.kebab[open]) { opacity: 1; }
.ed-row:has(.kebab[open]), .ed-mh:has(.kebab[open]), .ol-mod:has(.kebab[open]) { z-index: 60; }
.ed-row .qo-grip { left: -12px; }
.ed-mh .qo-grip { left: -12px; }
.ed-mh { padding-left: 12px; }
.ed-mt { flex: 1; min-width: 0; }
.ed-cnt { font-variant-numeric: tabular-nums; }
.ed-addm { margin: 4px 0 0 4px; }
.ed-row .qo-state { margin-left: 6px; }
/* product cards: tools on the cover */
.le-kebab { position: absolute; right: 10px; top: 10px; opacity: 0; transition: opacity .15s; }
.le-kebab .mini-btn { background: rgba(255,255,255,.9); color: #333; }
.le-card:hover .le-kebab, .le-kebab:has(.kebab[open]) { opacity: 1; }
.le-card:has(.kebab[open]) { z-index: 60; }
.le-grip { opacity: 0; }
.le-card:hover .le-grip { opacity: 1; }
.lc-row { display: flex; align-items: baseline; gap: 8px; }
/* lesson top bar holds the status field */
.fp-edit .fbar-r { gap: 8px; }
.fp-edit .fbar-r .vis-sel { height: 36px; }
.fp-edit .fbar-r .vis-sel select { max-width: 150px; font-size: 13px; }
.le-end { margin-top: 40px; }
.le-dur { padding: 2px 6px; min-width: 50px; display: inline-block; }
@media (max-width: 640px) {
  .fp-edit .fbar-r .vis-sel select { max-width: 92px; }
  .ed-row .qo-grip, .ed-mh .qo-grip { left: -8px; }
}
@media (hover: none) { .ed-tools, .le-kebab, .le-grip, .cv-prose .ins { opacity: 1; } }
.kh-hero h1.ce, .le-h1 { display: inline-block; max-width: 100%; }
.kh-hero-in > h1.ce { margin-top: 10px; }
.le-art > .eyebrow { display: block; }
.vis-inline { display: none; margin: 0 0 14px; }
@media (max-width: 640px) { .vis-top { display: none; } .vis-inline { display: block; } }

/* =====================================================================
   v11 · Kursleitung: ein Dock für alles, was nur Creator betrifft
   Die Seite selbst bleibt exakt wie bei Käufer:innen.
   ===================================================================== */
body.editing .topbar { box-shadow: none; }
body.has-dock { padding-bottom: 96px; }
#dock { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 70; max-width: calc(100vw - 24px); }
.dock { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 12px 40px rgba(16,16,24,.18), 0 2px 6px rgba(16,16,24,.08); white-space: nowrap; }
.dock .mode-sw { margin: 0; }
.dk-sep { width: 1px; height: 24px; background: var(--border); flex: none; }
.dk-save { font-size: 13px; color: var(--muted); padding: 0 2px; }
.dk-ico { width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.dk-ico:hover:not(:disabled) { background: var(--surface-2); }
.dk-ico:disabled { opacity: .3; cursor: default; }
.dk-ico .icon { width: 17px; height: 17px; }
.dk-lab { font-size: 13px; color: var(--muted); }
.dock .vis-sel { height: 34px; }
.dock .vis-sel select { max-width: 170px; font-size: 13px; }
.dk-chk { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 10px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--success); cursor: pointer; }
.dk-chk .icon { width: 16px; height: 16px; }
.dk-chk:hover { background: var(--surface-2); }
.dk-chk.warn { color: #B26B00; background: #FFF4D6; }
:root[data-theme="dark"] .dk-chk.warn { background: #2A2311; color: #F3D27A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dk-chk.warn { background: #2A2311; color: #F3D27A; } }
.dk-live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 0 8px; }
.dk-live .icon { width: 15px; height: 15px; color: var(--success); }
.dk-pub { height: 34px; gap: 8px; }
.dk-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgba(255,255,255,.25); font-size: 12px; font-weight: 700; }
.dk-pop { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); width: min(460px, calc(100vw - 24px)); max-height: 60vh; overflow-y: auto; white-space: normal; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: pop .15s var(--ease); }
.dk-pop-h { display: grid; gap: 1px; padding: 8px 10px 10px; font-size: 14px; }
.dk-pop-h .muted { font-size: 12px; }
.dk-pop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dk-pop li { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--surface-2); }
.dk-pop li > .icon { width: 16px; height: 16px; color: #B26B00; flex: none; }
.dk-pop li > span { flex: 1; min-width: 0; display: grid; gap: 1px; font-size: 14px; }
.dk-pop li > span span { font-size: 12px; color: var(--muted); }
.dk-ok { display: flex; align-items: center; gap: 8px; padding: 10px; font-size: 14px; color: var(--success); margin: 0; }
.dk-ok .icon { width: 16px; height: 16px; }
.dk-foot { padding: 8px 10px 4px; margin: 0; }
/* the prototype's player switch moves out of the way of the dock */
body.has-dock .nsw { bottom: 18px; }
@media (max-width: 900px) { body.has-dock .nsw { display: none; } }

/* lighter "you can change this" marking: dotted, quiet, accent on hover */
body.editing .ce { outline: 1px dotted color-mix(in srgb, var(--text) 30%, transparent); outline-offset: 3px; }
body.editing .ce:hover { outline: 1.5px dashed var(--accent); }
body.editing .ce:focus { outline: 2px solid var(--accent); }
body.editing .kh-hero .ce { outline-color: rgba(255,255,255,.55); }
body.editing .kh-hero .ce:hover, body.editing .kh-hero .ce:focus { outline-color: #fff; }

@media (max-width: 640px) {
  #dock { left: 8px; right: 8px; bottom: 8px; transform: none; max-width: none; }
  .dock { justify-content: space-between; gap: 4px; padding: 5px; }
  .dk-save, .dk-lab, .dock .dk-sep, .dk-chk span, .dk-live span { display: none; }
  .dock .vis-sel select { max-width: 96px; }
  .dk-pop { left: 0; transform: none; width: 100%; }
  body.has-dock { padding-bottom: 76px; }
}

/* round 1: one status, fewer marks */
.dk-status { display: grid; line-height: 1.2; padding: 0 4px; }
.dk-status .e-save { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.dk-status .e-save .icon { width: 12px; height: 12px; }
.dk-st2 { font-size: 13px; font-weight: 600; color: var(--text); }
.dk-status.pending .dk-st2 { color: #B26B00; }
:root[data-theme="dark"] .dk-status.pending .dk-st2 { color: #F3D27A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dk-status.pending .dk-st2 { color: #F3D27A; } }
.dk-hint { position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%); width: min(420px, calc(100vw - 24px)); white-space: normal; padding: 16px; border-radius: 16px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); display: grid; gap: 10px; font-size: 14px; animation: pop .2s var(--ease); }
.dk-hint::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: var(--text); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.dk-hint ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dk-hint li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.dk-hint li .icon { width: 15px; height: 15px; flex: none; margin-top: 2px; opacity: .8; }
.dk-dot { width: 15px; height: 15px; flex: none; margin-top: 2px; border-radius: 4px; border: 1.5px dotted currentColor; opacity: .8; }
.dk-hint .btn { justify-self: end; }
@media (max-width: 640px) { .dk-status .dk-st2 { font-size: 12px; } .dk-status { max-width: 120px; white-space: normal; } .dk-hint { left: 0; transform: none; width: 100%; } .dk-hint::after { left: 30%; } }

/* round 2 */
.dk-kebab .kebab-pop { top: auto; bottom: calc(100% + 10px); right: -8px; }
.dk-kebab > summary { list-style: none; }
.ed-dur { padding: 0 3px; }
.ed-row .ol-meta { transition: margin .12s; }
.ed-row:hover .ol-meta, .ed-row:focus-within .ol-meta { margin-right: 72px; }

/* round 3 */
.dock .vis-sel select { max-width: 220px; }
.dk-num { font-weight: 700; }
@media (max-width: 640px) { .dock .vis-sel select { max-width: 96px; } }

/* round 3b */
body.has-dock #toast-root { bottom: 96px; }
body.has-dock .nsw { display: none; }
.pub-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #FFF4D6; color: #5C4300; font-size: 14px; }
.pub-warn > .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.pub-warn > span { display: grid; gap: 4px; }
.pub-warn a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }
.pub-warn em { font-style: normal; font-size: 12px; opacity: .8; }
:root[data-theme="dark"] .pub-warn { background: #2A2311; color: #F3D27A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pub-warn { background: #2A2311; color: #F3D27A; } }
/* round 4 · phone: two tidy rows – editing on top, status + publish below */
@media (max-width: 640px) {
  .dock { flex-wrap: wrap; row-gap: 6px; white-space: normal; }
  .dk-status { display: grid !important; flex: 1; max-width: none; order: 10; }
  .dk-chk { order: 11; }
  .dk-pub { order: 12; }
  .dk-hint { order: 20; }
  body.has-dock { padding-bottom: 130px; }
  body.has-dock #toast-root { bottom: 130px; }
}

/* =====================================================================
   v11.1 · Alle Details einer Lektion an EINER Stelle (Dock → „Diese Lektion“)
   ===================================================================== */
.lp-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; max-width: 340px; }
.lp-btn:hover, .lp-btn.on { border-color: var(--accent); }
.lp-btn > .icon { width: 14px; height: 14px; color: var(--muted); transition: transform .15s; }
.lp-btn.on > .icon { transform: rotate(180deg); }
.lp-sum { display: grid; text-align: left; line-height: 1.15; min-width: 0; }
.lp-sum small { font-size: 11px; color: var(--muted); }
.lp-sum b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-pop { width: min(520px, calc(100vw - 24px)); padding: 10px 12px 12px; }
.lp-sec { padding: 8px 2px; border-top: 1px solid var(--border); }
.lp-lab { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.lp-vis { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.lp-opt { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1.5px solid transparent; background: var(--surface-2); font: inherit; color: var(--text); cursor: pointer; }
.lp-opt .vis-dot { margin-top: 5px; }
.lp-opt > span:last-child { display: grid; gap: 1px; }
.lp-opt b { font-size: 14px; font-weight: 600; }
.lp-opt small { font-size: 12px; color: var(--muted); }
.lp-opt:hover { border-color: var(--border); }
.lp-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.lp-row2 { display: grid; grid-template-columns: 1.1fr .8fr 1.4fr; gap: 10px; }
.lp-row2 label { display: grid; min-width: 0; }
.lp-row2 select, .lp-row2 input { height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; min-width: 0; width: 100%; }
.lp-row2 select:focus, .lp-row2 input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.lp-acts { display: flex; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
/* tiny format bar on text selection */
#fmt-bar { position: fixed; z-index: 90; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 10px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-size: 12px; }
#fmt-bar button { width: 30px; height: 28px; border: 0; border-radius: 7px; background: rgba(255,255,255,.14); color: inherit; font: inherit; font-size: 15px; cursor: pointer; }
#fmt-bar button:hover { background: rgba(255,255,255,.28); }
#fmt-bar[hidden] { display: none; }
.ce-p strong { font-weight: 700; }
@media (max-width: 640px) {
  .lp-btn { max-width: 170px; }
  .lp-vis { grid-template-columns: 1fr; }
  .lp-row2 { grid-template-columns: 1fr 1fr; }
  .lp-row2 label:last-child { grid-column: 1 / -1; }
  .lp-pop { left: 0; transform: none; width: 100%; max-height: 70vh; }
}
.lp-btn { flex: none; }
@media (max-width: 640px) { .lp-btn { flex: 1 1 auto; } }
