/* ---------- Creator Studio (admin) – builds on styles.css tokens ---------- */
body.studio { display: block; }
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }

/* Sidebar */
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--border);
  background: var(--surface); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.side-brand .avatar-sm {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  color: #fff; background: linear-gradient(135deg, var(--accent), #C026D3); flex: none;
}
.side-brand strong { display: block; font-size: 14px; line-height: 1.2; }
.side-brand span { font-size: 12px; color: var(--muted); }
.side-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 14px 10px 6px; }
.side-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--muted);
}
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-link .pill { margin-left: auto; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.side-link .pill.warn { background: #F59E0B; color: #1a1300; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 4px; }
.side-row { display: flex; gap: 6px; padding: 4px 2px; }
.side-row .icon-btn { flex: 1; }

/* Main */
.main { padding: 28px clamp(16px, 3vw, 40px) 80px; min-width: 0; outline: none; }
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.top h1 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; }
.top p { color: var(--muted); margin-top: 4px; font-size: 15px; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.save-state { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.save-state .icon { width: 15px; height: 15px; color: var(--success); }
.demo-chip { white-space: nowrap; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--warn-soft); color: #8A6A1A; }
:root[data-theme="dark"] .demo-chip { color: #E9C46A; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { font-size: 16px; }
.card-head a { font-size: 13px; font-weight: 600; color: var(--accent); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.kpi .label { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi .label .icon { width: 16px; height: 16px; }
.kpi .value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 12px; font-weight: 600; margin-top: 2px; color: var(--muted); }
.kpi .delta.up { color: var(--success); }
.kpi .delta.down { color: var(--danger); }

.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; }

/* Chart */
.chart { position: relative; height: 220px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .bar { fill: var(--accent); transition: opacity .15s; }
.chart .hit { fill: transparent; cursor: default; }
.chart.hovering .bar { opacity: .35; }
.chart.hovering .bar.on { opacity: 1; }
.chart-tip {
  position: fixed; z-index: 100; pointer-events: none; background: var(--text); color: var(--bg); border-radius: 10px;
  padding: 8px 10px; font-size: 12px; line-height: 1.45; box-shadow: var(--shadow-lg); transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap;
}
.chart-tip strong { font-size: 13px; }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 10px; align-items: center; font-size: 13px; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { grid-column: 1 / -1; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: -4px; }
.hbar .track span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Lists */
.feed { display: grid; }
.feed-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.feed-item:first-child { border-top: 0; padding-top: 0; }
.feed-item .grow { flex: 1; min-width: 0; }
.feed-item .grow span { display: block; font-size: 12px; color: var(--muted); }
.feed-item .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.av-sm { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; background: var(--surface-2); }
.todo { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.todo + .todo { margin-top: 8px; }
.todo .icon { color: var(--accent); }
.todo .grow { flex: 1; }
.todo strong { font-variant-numeric: tabular-nums; }

/* Toolbar & tables */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input[type="search"], .toolbar select, .select, .input {
  height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: inherit; font: inherit; font-size: 14px; padding: 0 12px;
}
.toolbar input[type="search"] { flex: 1; min-width: 200px; }
.input { width: 100%; height: 42px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted); }
.chip-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table .who { display: flex; align-items: center; gap: 10px; }
.table .who span { display: block; font-size: 12px; color: var(--muted); }
.table .mini-cover { width: 44px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.table .mini-cover .icon { width: 16px; height: 16px; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); margin: 1px 2px 1px 0; white-space: nowrap; }
.mini-progress { display: flex; align-items: center; gap: 8px; min-width: 110px; font-size: 12px; color: var(--muted); }
.mini-progress .progress { flex: 1; height: 5px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.live, .status.paid { background: var(--success-soft); color: var(--success); }
.status.draft { background: var(--surface-2); color: var(--muted); }
.status.withdrawn { background: var(--warn-soft); color: #A16207; }
.status.refunded { background: var(--surface-2); color: var(--muted); }
.status.gift { background: var(--accent-soft); color: var(--accent); }
.status.revoked { background: var(--danger-soft); color: var(--danger); }
.live-tag { font-size: 10px; font-weight: 800; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); margin-left: 6px; vertical-align: 1px; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

/* Product editor */
.ed-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ed-head .cover { width: 72px; aspect-ratio: 1; border-radius: 14px; flex: none; }
.ed-head .cover .icon { max-width: 30px; }
.ed-head .cover::after, .ed-head .cover::before, .ed-head .cover-label { display: none; }
.ed-head .grow { flex: 1; min-width: 200px; }
.ed-head h1 { font-size: 24px; font-weight: 800; }
.ed-head p { color: var(--muted); font-size: 14px; margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab { padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-color: var(--accent); }

.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.mod-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.mod-card + .mod-card { margin-top: 14px; }
.mod-head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 10px; }
.mod-head .num { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mod-head input { flex: 1; font-weight: 700; font-size: 15px; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 6px 8px; color: inherit; font-family: inherit; min-width: 0; }
.mod-head input:hover { border-color: var(--border); }
.mod-head input:focus { border-color: var(--accent); background: var(--surface); outline: none; }
.mini-btn { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; flex: none; }
.mini-btn:hover { background: var(--surface-2); color: var(--text); }
.mini-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.mini-btn .icon { width: 16px; height: 16px; }
.lesson-row {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; font-size: 14px; margin-top: 6px; transition: border-color .15s, background .15s, transform .15s;
}
.lesson-row:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.lesson-row.sel { border-color: var(--accent); background: var(--accent-soft); }
.lesson-row.dragging { opacity: .4; }
.lesson-row.drop-before { box-shadow: 0 -3px 0 0 var(--accent); }
.lesson-row .grip { color: var(--muted); cursor: grab; display: grid; place-items: center; }
.lesson-row .grip .icon { width: 16px; height: 16px; }
.lesson-row .t-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--surface); display: grid; place-items: center; color: var(--accent); flex: none; border: 1px solid var(--border); }
.lesson-row .t-ico .icon { width: 15px; height: 15px; }
.lesson-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.lesson-row .flags { display: flex; gap: 4px; }
.drop-end { height: 10px; border-radius: 8px; margin-top: 4px; }
.drop-end.drop-before { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); height: 40px; }
.add-row { display: flex; gap: 8px; margin-top: 10px; }
.add-row .btn { flex: 1; }
.btn-dashed { border: 1.5px dashed var(--border); background: transparent; color: var(--muted); }
.btn-dashed:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.panel-ed { position: sticky; top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel-ed-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-ed-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.panel-ed-body { padding: 18px; display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.fld label, .fld .lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.fld .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.fld textarea { min-height: 90px; font-size: 15px; }
.section-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: flex; justify-content: space-between; align-items: center; }

/* Toggle switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.switch + .switch { margin-top: 8px; }
.switch .txt strong { display: block; font-size: 14px; }
.switch .txt span { font-size: 12px; color: var(--muted); }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--border); position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:disabled { opacity: .6; cursor: not-allowed; }

/* Block editor */
.blocks { display: grid; gap: 10px; }
.blk { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.blk-head { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.blk-head .icon { width: 14px; height: 14px; }
.blk-head .grow { flex: 1; display: flex; align-items: center; gap: 6px; }
.blk-body { padding: 12px; display: grid; gap: 8px; }
.blk-body textarea { min-height: 80px; font-size: 15px; background: var(--surface); }
.blk-body input[type="text"] { background: var(--surface); }
.add-blocks { display: flex; gap: 6px; flex-wrap: wrap; }
.add-blocks .btn { height: 34px; font-size: 13px; padding: 0 10px; }

.upload {
  display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed var(--border); border-radius: 14px; cursor: pointer; background: var(--surface);
  transition: border-color .15s, background .15s;
}
.upload:hover, .upload.over { border-color: var(--accent); background: var(--accent-soft); }
.upload input { display: none; }
.upload .u-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.upload .grow { flex: 1; min-width: 0; font-size: 14px; }
.upload .grow strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload .grow span { font-size: 12px; color: var(--muted); }
.media-ok { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.upbar { height: 4px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.upbar span { display: block; height: 100%; width: 0; background: var(--accent); animation: up 1.4s var(--ease) forwards; }
@keyframes up { to { width: 100%; } }

.list-ed { display: grid; gap: 8px; }
.list-ed .row { display: flex; gap: 8px; align-items: center; }
.list-ed .row input { flex: 1; }
.list-ed .row .time { width: 86px; flex: none; font-variant-numeric: tabular-nums; }
.q-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: grid; gap: 8px; background: var(--bg); }
.q-card .opt-row { display: flex; gap: 8px; align-items: center; }
.q-card .opt-row input[type="radio"] { width: 18px; height: 18px; accent-color: var(--success); flex: none; }
.q-card .opt-row input[type="text"] { flex: 1; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 44px; height: 44px; border-radius: 12px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }
.swatch.color { width: 34px; height: 34px; border-radius: 50%; }
.cover-preview { max-width: 360px; }

.risk { display: flex; gap: 12px; padding: 14px; border-radius: 12px; font-size: 14px; }
.risk .icon { margin-top: 2px; flex: none; }
.risk.ok { background: var(--success-soft); }
.risk.ok .icon { color: var(--success); }
.risk.warn { background: var(--danger-soft); }
.risk.warn .icon { color: var(--danger); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }

/* Drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(10,10,16,.4); animation: fade .2s var(--ease); }
.drawer {
  position: fixed; z-index: 56; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--surface); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: slide .25s var(--ease);
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; gap: 14px; align-items: center; }
.drawer-head .av-lg { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--accent-soft); color: var(--accent); flex: none; }
.drawer-head .grow { flex: 1; min-width: 0; }
.drawer-head h2 { font-size: 18px; }
.drawer-head p { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.drawer-body { padding: 20px; overflow-y: auto; display: grid; gap: 22px; align-content: start; }
.purchase { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.purchase-head { display: flex; gap: 12px; align-items: center; }
.purchase-head .grow { flex: 1; min-width: 0; }
.purchase-head .grow span { display: block; font-size: 12px; color: var(--muted); }
.purchase-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.lesson-checks { display: grid; gap: 4px; font-size: 13px; }
.lesson-checks div { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.lesson-checks div.done { color: var(--text); }
.lesson-checks .dot { width: 16px; height: 16px; }
.lesson-checks .dot .icon { width: 10px; height: 10px; }
.log { display: grid; gap: 10px; font-size: 13px; }
.log div { display: flex; gap: 10px; }
.log time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 108px; }

/* Comments moderation */
.cmt { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--border); }
.cmt:first-child { border-top: 0; padding-top: 0; }
.cmt .grow { flex: 1; min-width: 0; display: grid; gap: 6px; }
.cmt .meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cmt .meta strong { color: var(--text); }
.cmt .meta a { color: var(--accent); font-weight: 600; }
.cmt p { font-size: 15px; }
.cmt.hidden-c p { opacity: .45; text-decoration: line-through; }
.reply { margin-left: 18px; padding-left: 12px; border-left: 2px solid var(--accent-soft); font-size: 14px; color: var(--muted); }
.reply strong { color: var(--text); }
.reply-form { display: flex; gap: 8px; align-items: flex-end; }
.reply-form textarea { min-height: 42px; height: 42px; font-size: 14px; }
.reply-form .btn { height: 42px; }

/* Type picker */
.type-pick { display: grid; gap: 10px; }
.type-opt { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-align: left; width: 100%; }
.type-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.type-opt .cover { width: 56px; aspect-ratio: 1; border-radius: 12px; flex: none; }
.type-opt .cover::after, .type-opt .cover::before, .type-opt .cover-label { display: none; }
.type-opt .cover .icon { max-width: 24px; }
.type-opt strong { display: block; }
.type-opt span { font-size: 13px; color: var(--muted); }

.store-preview { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--bg); display: flex; gap: 16px; align-items: center; }
.store-preview .avatar { width: 64px; height: 64px; font-size: 22px; background: linear-gradient(135deg, var(--accent), #C026D3); }
.store-preview h3 { font-size: 20px; }
.store-preview p { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Responsive */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash, .builder, .two-col { grid-template-columns: 1fr; }
  .panel-ed { position: static; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: sticky; top: 0; z-index: 40; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 8px 12px;
    border-right: 0; border-bottom: 1px solid var(--border); gap: 2px;
  }
  .side-brand { padding: 0 8px 0 0; }
  .side-brand div, .side-label, .side-foot .side-link span.txt { display: none; }
  .side-link { white-space: nowrap; padding: 8px 10px; }
  .side-foot { margin: 0; padding: 0 0 0 6px; border: 0; display: flex; }
  .side-row { padding: 0; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .value { font-size: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-top: 1px solid var(--border); padding: 10px 0; }
  .table tr:first-child { border-top: 0; }
  .table td { border: 0; padding: 3px 14px; }
}
.purchase-head .mini-cover, .feed-item .mini-cover { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.purchase-head .mini-cover .icon { width: 18px; height: 18px; }
.fld label.upload, .fld label.switch { display: flex; margin-bottom: 0; font-size: inherit; font-weight: inherit; }
.upload .grow { display: grid; gap: 2px; }
.studio .table td.num { white-space: nowrap; }

/* ---------- v4 · Kursplayer tab ---------- */
.player-ed { display: grid; gap: 20px; max-width: 760px; }
.card-sub { font-size: 14px; margin: -6px 0 16px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice { display: grid; gap: 12px; align-content: start; text-align: left; padding: 12px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.choice.on { border-color: var(--accent); background: var(--accent-soft); }
.choice-t { display: grid; gap: 3px; }
.choice-t strong { font-size: 15px; }
.choice-t span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.segc { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-2); }
.segc button { flex: 1; border: 0; background: none; padding: 9px 8px; border-radius: 8px; font-family: inherit; font-weight: 600; font-size: 13px; line-height: 1; color: var(--muted); cursor: pointer; }
.segc button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16,16,24,.12); }
.segc button:disabled { opacity: .45; cursor: default; }
.fixed-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.fixed-list li { display: flex; gap: 10px; align-items: flex-start; }
.fixed-list .icon { width: 18px; height: 18px; color: var(--success); flex: none; margin-top: 2px; }
/* schematic preview */
.sc { display: grid; grid-template-rows: auto 1fr; height: 132px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); overflow: hidden; }
.sc i { display: block; }
.sc-top { display: flex; justify-content: center; align-items: center; height: 26px; border-bottom: 1px solid var(--border); background: var(--surface); }
.sc-pill { display: flex; align-items: center; width: 74px; height: 12px; border-radius: 99px; border: 1px solid var(--border); padding: 0 5px; }
.sc-pill b { display: block; width: 50%; height: 3px; border-radius: 2px; background: var(--accent); }
.sc-steps { display: flex; gap: 3px; }
.sc-steps i { width: 14px; height: 9px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); }
.sc-steps i.on { background: var(--accent); border-color: var(--accent); }
.sc-body { display: flex; min-height: 0; }
.sc-main { flex: 1; display: grid; align-content: start; gap: 5px; padding: 10px 12%; }
.sc-main i { height: 4px; border-radius: 2px; background: var(--surface-2); }
.sc-main i.h { height: 7px; width: 60%; background: var(--text); opacity: .7; }
.sc-main i.v { height: 30px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); }
.sc-main i.s { width: 70%; }
@media (max-width: 760px) { .choice-grid { grid-template-columns: 1fr; } }
/* =====================================================================
   v6 · Kurs-Builder Varianten (A/B/C) + Schnellstart
   ===================================================================== */
.nsw-studio { left: auto; right: 20px; bottom: 20px; }
.nsw-studio .nsw-pop { left: auto; right: 0; }
.modal.modal-wide { max-width: 760px; }
.small-note { font-size: 13px; margin: 0; }
.danger-txt { color: var(--danger); }

/* status: one field, plain words */
.vis { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.vis::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.vis-live { background: var(--success-soft); color: var(--success); }
.vis-preview { background: var(--accent-soft); color: var(--accent); }
.vis-drip { background: var(--warn-soft, #FFF6E5); color: #B26B00; }
.vis-draft { background: var(--surface-2); color: var(--muted); }
.vis-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.vis-dot.vis-live { background: var(--success); } .vis-dot.vis-preview { background: var(--accent); } .vis-dot.vis-drip { background: #E39B1B; } .vis-dot.vis-draft { background: var(--border); box-shadow: inset 0 0 0 1.5px var(--muted); }
.vis-sel { display: inline-flex; align-items: center; gap: 8px; height: 36px; 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); padding-right: 4px; max-width: 260px; cursor: pointer; }
.vis-sel select:focus { outline: none; }
.vis-sel:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ⋯ menu */
.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: 40; min-width: 240px; 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 { 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) { background: var(--surface-2); }
.kebab-pop button:disabled { opacity: .4; cursor: default; }
.kebab-pop button .icon { width: 15px; height: 15px; color: var(--muted); }
.kebab-pop button.danger { color: var(--danger); } .kebab-pop button.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; }

/* undo toast */
.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; }
.toast-undo button:hover { background: rgba(255,255,255,.28); }

/* 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; transition: border-color .15s, background .15s; }
.tc:hover, .tc:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.tc-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 strong { font-size: 15px; } .tc-t span { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* ---------- B · Gliederung ---------- */
.ob { display: grid; gap: 16px; max-width: 920px; }
.ob-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ob-head h2 { font-size: 20px; }
.ob-head p { font-size: 14px; margin-top: 2px; }
.ob-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ob-mod { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 10px 8px; }
.ob-mod-h { display: flex; align-items: center; gap: 10px; padding: 4px 4px 10px; }
.ob-n { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
input.inline-t { flex: 1; min-width: 0; font: inherit; font-size: 17px; font-weight: 700; color: var(--text); border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 5px 8px; }
input.inline-t:hover { border-color: var(--border); }
input.inline-t:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.ob-cnt { font-size: 13px; white-space: nowrap; }
.ob-row { gap: 10px; }
.ob-row .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-link { color: var(--text); font-weight: 500; }
.ob-link:hover { color: var(--accent); }
.ob-no { color: var(--muted); font-size: 13px; margin-right: 8px; font-variant-numeric: tabular-nums; }
.ob-dur { font-size: 13px; white-space: nowrap; }
.ob-add { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; margin-top: 4px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer; }
.ob-add:hover { background: var(--accent-soft); }
.ob-add .icon { width: 16px; height: 16px; }

/* ---------- B · Lektionsseite ---------- */
.lp { max-width: 920px; }
.lp-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.lp-crumb { flex: 1; font-size: 14px; font-weight: 600; min-width: 0; }
.lp-r { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.lp-main { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.lp-type { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lp-type .t-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.lp-type .t-ico .icon { width: 14px; height: 14px; }
input.lp-title { font: inherit; font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; letter-spacing: -.02em; border: 1px solid transparent; border-radius: 10px; padding: 4px 8px; margin-left: -9px; background: transparent; color: var(--text); width: 100%; }
input.lp-title:hover { border-color: var(--border); }
input.lp-title:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.lp-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lp-dur { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.lp-dur .icon { width: 15px; height: 15px; }
.lp-dur input { border: 0; background: none; font: inherit; font-size: 14px; width: 70px; color: var(--text); }
.lp-dur input:focus { outline: none; }
.lp-extra { display: grid; gap: 14px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.lp-more { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.lp-more > summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); list-style: none; }
.lp-more > summary::-webkit-details-marker { display: none; }
.lp-more > summary .icon { width: 16px; height: 16px; }
.lp-more[open] > summary { color: var(--text); border-bottom: 1px solid var(--border); }
.lp-more .form-grid { padding: 16px; }
.lp-more-acts { display: flex; gap: 8px; padding: 0 16px 16px; }
.lp-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.lp-nc { display: grid; gap: 3px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font: inherit; text-align: left; color: var(--text); cursor: pointer; }
.lp-nc span { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.lp-nc span .icon { width: 14px; height: 14px; }
.lp-nc.next { text-align: right; justify-items: end; }
.lp-nc:hover { border-color: var(--accent); }

/* blocks with "+" between them (Rise) */
.bbs { display: grid; }
.bb { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 10px 12px 12px; display: grid; gap: 8px; }
.bb-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.bb-label > .icon { width: 14px; height: 14px; }
.bt { margin-left: auto; display: inline-flex; gap: 0; opacity: 0; transition: opacity .15s; }
.bb:hover .bt, .bb:focus-within .bt, .cvb:hover .bt, .cvb:focus-within .bt { opacity: 1; }
.bt .mini-btn { width: 26px; height: 26px; }
.bb textarea, .bb input[type="text"] { width: 100%; font: inherit; border: 1px solid transparent; border-radius: 8px; background: var(--bg); padding: 10px 12px; color: var(--text); }
.bb textarea:focus, .bb input[type="text"]:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.bb-text { min-height: 110px; line-height: 1.6; resize: vertical; font-size: 16px !important; }
.bb-h { font-size: 19px !important; font-weight: 700; }
.bb-callout { display: flex; gap: 10px; align-items: flex-start; padding: 4px; border-radius: 10px; background: var(--accent-soft); }
.bb-callout > .icon { color: var(--accent); margin: 12px 0 0 8px; width: 18px; height: 18px; flex: none; }
.bb-callout textarea { background: transparent !important; min-height: 60px; }
.bb-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bb-card { display: grid; gap: 6px; padding: 8px; border-radius: 10px; background: var(--bg); }
.bb-card > span { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.bb-card input, .bb-card textarea { background: var(--surface) !important; padding: 7px 9px !important; font-size: 14px; }
.bb-card textarea { min-height: 60px; }
.bb-empty { font-size: 14px; padding: 8px 0; }
.ins { position: relative; height: 26px; 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: .55; 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; }
.bbs > .ins:first-child:last-child { height: 44px; }
.bbs > .ins:first-child:last-child .ins-btn { opacity: 1; width: 34px; height: 34px; }

/* ---------- C · Wie im Kurs ---------- */
.cv-bar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin: -8px 0 18px; border-radius: 14px; background: color-mix(in srgb, var(--accent-soft) 85%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); backdrop-filter: blur(10px); }
.cv-mode { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--accent); }
.cv-mode .icon { width: 16px; height: 16px; }
.cv-hint { font-size: 13px; }
.cv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.cv-canvas { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 36px clamp(18px, 4vw, 56px) 40px; min-width: 0; }
.cv-canvas .eyebrow { display: block; }
.cv-h1 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; letter-spacing: -.025em; margin: 8px 0 18px; }
.ce { border-radius: 8px; outline: 1.5px dashed transparent; outline-offset: 4px; 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: .7; }
.ce-p { white-space: pre-wrap; }
.cvb { position: relative; }
.cvb > .bt { position: absolute; right: -6px; top: -14px; z-index: 2; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); }
.cv-prose .ins { height: 22px; }
.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 { 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; opacity: .95; }
.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); backdrop-filter: blur(6px); }
.cv-file { position: relative; cursor: pointer; }
.cv-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cv-file .meta span.ce { position: relative; z-index: 2; }
.cv-extra { margin-top: 24px; padding: 18px; border-radius: var(--radius); border: 1.5px dashed color-mix(in srgb, var(--accent) 35%, var(--border)); background: var(--surface); display: grid; gap: 14px; }
.cv-extra-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--accent); }
.cv-extra-h .icon { width: 16px; height: 16px; }
.cv-done { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; }
.cv-fake { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; opacity: .85; }
.cv-fake .icon { width: 15px; height: 15px; }
.cv-outline { position: sticky; top: 70px; max-height: calc(100vh - 90px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.cvo-head { display: grid; gap: 2px; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.cvo-head .muted { font-size: 12px; }
.cvo-list { overflow-y: auto; padding: 8px; display: grid; gap: 10px; }
.cvo-h { display: flex; align-items: center; gap: 8px; padding: 4px 4px 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cvo-h > span:first-child { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); flex: none; }
.cvo-mt { flex: 1; min-width: 0; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); padding: 2px 4px; }
.cvo-h .mini-btn { width: 24px; height: 24px; }
.cvo-row { display: flex; align-items: center; border-radius: 9px; }
.cvo-row a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 7px 8px; font-size: 13px; color: var(--text); }
.cvo-row:hover { background: var(--surface-2); }
.cvo-row.cur { background: var(--accent-soft); }
.cvo-row.cur a { color: var(--accent); font-weight: 600; }
.cvo-no { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cvo-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cvo-row .kebab .mini-btn { width: 26px; height: 26px; opacity: 0; }
.cvo-row:hover .kebab .mini-btn, .cvo-row .kebab[open] .mini-btn { opacity: 1; }
.cvo-add { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); border-radius: 8px; cursor: pointer; }
.cvo-add:hover { background: var(--accent-soft); }
.cvo-add .icon, .cvo-addm .icon { width: 14px; height: 14px; }
.cvo-addm { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 8px 10px; padding: 9px; border: 1.5px dashed var(--border); border-radius: 10px; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.cvo-addm:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Schnellstart ---------- */
.qs { gap: 18px; }
.qs-steps { display: flex; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); flex-wrap: wrap; }
.qs-steps span { padding: 5px 10px; border-radius: 99px; background: var(--surface-2); }
.qs-steps .on { background: var(--accent); color: var(--accent-ink); }
.qs-steps .done { background: var(--success-soft); color: var(--success); }
.qs-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.qs-card { display: grid; gap: 6px; align-content: start; text-align: left; padding: 14px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface); font: inherit; color: var(--text); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.qs-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); transform: translateY(-1px); }
.qs-card.on { border-color: var(--accent); background: var(--accent-soft); }
.qs-card strong { font-size: 15px; line-height: 1.3; }
.qs-card > span:not(.qs-ico) { font-size: 13px; color: var(--muted); line-height: 1.45; }
.qs-card em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent); margin-top: 2px; }
.qs-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.qs-card.on .qs-ico { background: var(--accent); color: var(--accent-ink); }
.qs-in { display: grid; gap: 10px; justify-items: start; }
.qs-in textarea { width: 100%; font: inherit; font-size: 15px; line-height: 1.55; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); resize: vertical; }
.qs-in textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.qs-in .upload { width: 100%; }
.qs-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 14px; }
.qs-note .icon { color: var(--accent); flex: none; margin-top: 2px; }
.qs-review { display: grid; gap: 10px; max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.qs-mod { border: 1px solid var(--border); border-radius: 14px; padding: 8px; display: grid; gap: 4px; }
.qs-mod.off { opacity: .5; }
.qs-mh, .qs-l { display: flex; align-items: center; gap: 8px; padding: 4px; }
.qs-mh input[type="text"] { flex: 1; font: inherit; font-weight: 700; font-size: 15px; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; background: transparent; color: var(--text); }
.qs-l { padding-left: 26px; }
.qs-l.off { opacity: .45; }
.qs-l input[type="text"] { flex: 1; min-width: 0; font: inherit; font-size: 14px; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; background: transparent; color: var(--text); }
.qs-mh input[type="text"]:hover, .qs-l input[type="text"]:hover { border-color: var(--border); }
.qs-mh input[type="text"]:focus, .qs-l input[type="text"]:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.qs-l select { font: inherit; font-size: 13px; padding: 5px 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.qs-file { color: var(--muted); display: grid; place-items: center; } .qs-file .icon { width: 15px; height: 15px; }
.qs-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--border); }
.qs-foot .muted { flex: 1; font-size: 14px; text-align: right; }
.qs-empty { max-width: 920px; display: grid; gap: 18px; padding: 28px; border-radius: 20px; border: 1.5px dashed var(--border); background: var(--surface); }
.qs-empty-h { display: flex; gap: 14px; align-items: flex-start; }
.qs-empty-h h2 { font-size: 20px; }
.qs-badge { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); flex: none; }

@media (max-width: 1100px) {
  .cv-grid { grid-template-columns: minmax(0, 1fr); }
  .cv-outline { position: static; max-height: none; order: -1; }
  .qs-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .tchoose, .qs-cards, .lp-nav, .bb-cards { grid-template-columns: 1fr; }
  .ob-dur, .ob-row .grip, .ob-cnt { display: none; }
  .ob-row { min-width: 0; padding-left: 8px; }
  .ob-row .vis { font-size: 0; padding: 4px; gap: 0; }
  .ob-row .vis::before { width: 8px; height: 8px; }
  .ob, .ob-mod, .lp, .cv, .qs-empty { min-width: 0; max-width: 100%; }
  .cv-canvas { padding: 24px 16px; }
  .cv-bar { position: static; }
  .nsw-studio { right: 12px; bottom: 12px; }
  .cv-hint { display: none; }
}

/* =====================================================================
   v7 · D Kombi: C-Editor + sortierbare Gliederung + B-Optionen
   ===================================================================== */
.cv-grid > .cv-canvas, .cv-grid > .kd-below { grid-column: 1; }
.cv-grid > .cv-outline { grid-column: 2; grid-row: 1 / span 2; }
.kd-below { display: grid; gap: 14px; min-width: 0; }
.kd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kd-pos { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-variant-numeric: tabular-nums; }
.kd-pos .muted { padding: 0 6px; }
.mini-btn.off { opacity: .3; pointer-events: none; }
.kd-more > summary .muted { font-weight: 500; font-size: 13px; }
.kd-nav { margin-top: 0; }
/* sortable outline */
.dnd-row { position: relative; padding-left: 2px; }
.dnd-grip, .dnd-mgrip { display: grid; place-items: center; width: 16px; flex: none; color: var(--muted); cursor: grab; opacity: 0; transition: opacity .15s; }
.dnd-grip .icon, .dnd-mgrip .icon { width: 14px; height: 14px; }
.dnd-row:hover .dnd-grip, .cvo-h:hover .dnd-mgrip, .dnd-mgrip:focus-visible { opacity: 1; }
.dnd-row a { padding-left: 4px; }
.dnd-row.dragging, .dnd-mod.dragging { opacity: .4; }
.dnd-row.drop-before { box-shadow: 0 -3px 0 0 var(--accent); }
.cvo-drop { height: 4px; margin: 0 8px; border-radius: 3px; }
.cvo-drop.drop-before { height: 30px; background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.dnd-mod { border-radius: 12px; }
.dnd-mod.drop-before { box-shadow: 0 -3px 0 0 var(--accent); }
.cvo-addm.drop-before { border-color: var(--accent); background: var(--accent-soft); }
.cvo-chip { font-size: 10px; padding: 1px 7px; margin-left: 2px; flex: none; }
.cvo-chip::before { display: none; }
@media (max-width: 1100px) {
  .cv-grid > .cv-outline { grid-column: auto; grid-row: auto; }
  .cv-grid > .cv-canvas, .cv-grid > .kd-below { grid-column: auto; }
  .dnd-grip, .dnd-mgrip { opacity: .6; }
}
.dnd-row a { min-width: 0; overflow: hidden; }
.cvo-h { min-width: 0; }
.cvo-mt { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) {
  /* Kombi on small screens: outline stays on top but compact, scrolls inside */
  .cv-outline:has(.dnd-mod) { max-height: 340px; }
}

/* =====================================================================
   v8 · Entwurfsebene, sichtbares Sortieren, Fokusmodus
   ===================================================================== */
/* publish bar */
#pub-bar { margin: -4px 0 14px; }
.pub-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; font-size: 14px; border: 1px solid var(--border); background: var(--surface); }
.pub-bar > .icon { width: 16px; height: 16px; flex: none; }
.pub-bar.ok { color: var(--muted); }
.pub-bar.ok > .icon { color: var(--success); }
.pub-bar.draft { color: var(--muted); }
.pub-bar.pending { background: #FFF6E0; border-color: #F1D99A; color: #5C4300; }
.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; }
.pub-acts { margin-left: auto; display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pub-bar.pending .btn-ghost { color: #5C4300; }
:root[data-theme="dark"] .pub-bar.pending { background: #2A2311; border-color: #4A3D17; color: #F3D27A; }
:root[data-theme="dark"] .pub-bar.pending .btn-ghost { color: #F3D27A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pub-bar.pending { background: #2A2311; border-color: #4A3D17; color: #F3D27A; } :root:not([data-theme="light"]) .pub-bar.pending .btn-ghost { color: #F3D27A; } }
.unpub { color: #B26B00; font-weight: 600; }
.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 > .icon { width: 16px; height: 16px; color: var(--accent); flex: none; }
.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; }
/* changed lessons in the outline */
.cvo-row.chg .cvo-t::after, .ob-row.chg .ob-link::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #E39B1B; margin-left: 6px; vertical-align: 1px; }

/* visible sorting + collapsible modules */
.dnd-grip, .dnd-mgrip { opacity: .45; }
.dnd-row:hover .dnd-grip, .cvo-h:hover .dnd-mgrip { opacity: 1; color: var(--accent); }
.cvo-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.cvo-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.cvo-hint .icon { width: 13px; height: 13px; }
.cvo-tools .linkbtn { font-size: 12px; }
.cvo-tog { width: 20px; height: 20px; border: 0; background: none; border-radius: 6px; display: grid; place-items: center; color: var(--muted); cursor: pointer; flex: none; }
.cvo-tog .icon { width: 14px; height: 14px; transition: transform .2s; }
.cvo-tog:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.cvo-tog:disabled { opacity: .35; cursor: default; }
.cvo-mod.coll .cvo-tog .icon { transform: rotate(-90deg); }
.cvo-mod.coll { padding-bottom: 2px; }
.cvo-cnt { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 99px; padding: 1px 7px; text-transform: none; letter-spacing: 0; }
.is-dragging .cvo-drop { height: 22px; border: 1.5px dashed color-mix(in srgb, var(--accent) 40%, var(--border)); margin: 2px 8px 4px; }
.is-dragging .cvo-drop.drop-before { border-style: solid; }

/* focus mode: studio menu collapses to an icon rail while writing */
.fx-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fx-btn .icon { width: 15px; height: 15px; }
.fx-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (min-width: 900px) {
  body.focus-ed .shell { grid-template-columns: 68px minmax(0, 1fr); }
  body.focus-ed .side { padding-left: 10px; padding-right: 10px; }
  body.focus-ed .side .txt, body.focus-ed .side-brand > div, body.focus-ed .side .pill { display: none; }
  body.focus-ed .side-link { justify-content: center; padding-left: 0; padding-right: 0; position: relative; }
  body.focus-ed .side-brand { justify-content: center; padding-left: 0; padding-right: 0; }
  body.focus-ed .side-row { justify-content: center; }
}
@media (max-width: 899px) { .fx-btn { display: none; } }
@media (max-width: 640px) { .cvo-h { gap: 5px; } .cvo-cnt { padding: 1px 5px; } }

/* =====================================================================
   v9 · ruhige Gliederung rechts (Kombi)
   Nur Titel. Kein Punkt, keine Nummer, keine Chips.
   Status nur als Wort, wenn eine Lektion nicht live ist.
   Griff, ⋯ und „+ Lektion“ erst beim Überfahren.
   ===================================================================== */
.cv-outline.qo { padding: 0; }
.qo-head { padding: 16px 18px 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.qo .cvo-list { padding: 0 8px 8px; gap: 14px; }
.qo-mod { position: relative; border-radius: 12px; }
.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; border-radius: 6px; 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; }
.qo-row a { 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-state { flex: none; font-size: 12px; font-style: italic; color: var(--muted); font-weight: 400; }
/* tools appear only on hover / focus */
.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; }
.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 { 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 .kebab .mini-btn { width: 26px; height: 26px; }
.qo-row:hover .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 { width: 13px; height: 13px; }
.qo-add:hover { color: var(--accent); background: var(--accent-soft); }
.qo-addm { display: flex; align-items: center; gap: 6px; margin: 4px 16px 14px; padding: 6px 4px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.qo-addm:hover { color: var(--accent); }
.qo-addm .icon { width: 14px; height: 14px; }
.qo .cvo-drop { margin: 0 8px; }
.qo-row.drop-before { box-shadow: 0 -2px 0 0 var(--accent); }
.qo-mod.drop-before { box-shadow: 0 -2px 0 0 var(--accent); }
/* touch screens have no hover: show tools quietly all the time */
@media (hover: none) {
  .qo-grip { opacity: .5; }
  .qo-row .kebab, .qo-mh .kebab { opacity: 1; }
  .qo-row:hover .qo-state { display: inline; }
}

.qo .cvo-list { grid-template-columns: minmax(0, 1fr); }
.qo-mod, .qo-row { min-width: 0; }
.qo .cvo-drop { height: 2px; }
.qo-plus { opacity: 0; transition: opacity .12s; width: 26px !important; height: 26px !important; }
.qo-mh:hover .qo-plus, .qo-plus:focus-visible { opacity: 1; }
@media (hover: none) { .qo-plus { opacity: 1; } }
/* hover tools float over the row – titles keep the full width */
.qo-row .kebab, .qo-mh .kebab { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.qo-mh .qo-plus { position: absolute; right: 32px; top: 50%; transform: translateY(-50%); }
.qo-row:hover .kebab .mini-btn, .qo-mh:hover .mini-btn { background: var(--surface); box-shadow: var(--shadow); }
.qo-row.cur:hover .kebab .mini-btn { background: var(--surface); }
.qo-mh { padding-right: 4px; }
.qo-mh:hover .qo-mt { padding-right: 64px; }
.qo-row:hover a { padding-right: 36px; }
/* an open ⋯ menu must sit above the rows and modules that follow it */
.qo-row .kebab[open], .qo-mh .kebab[open] { z-index: 60; }
.qo-row:has(.kebab[open]), .qo-mh:has(.kebab[open]) { z-index: 60; }
.qo-mod:has(.kebab[open]) { z-index: 60; }
.qo .kebab-pop { min-width: 230px; }

/* =====================================================================
   v11 · Studio D: alle Einstellungen der Lektion in EINER Leiste oben
   ===================================================================== */
.ls-bar { align-items: flex-end; gap: 14px; padding: 10px 14px; }
.ls-sep { width: 1px; align-self: stretch; background: color-mix(in srgb, var(--accent) 25%, var(--border)); }
.ls-group { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.ls { display: grid; gap: 3px; }
.ls > span:first-child { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-left: 2px; }
.ls .vis-sel, .ls-ctl { height: 34px; }
.ls-ctl { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.ls-ctl:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.ls-ctl .icon { width: 15px; height: 15px; flex: none; }
.ls-ctl select, .ls-ctl input { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); padding: 0; min-height: 0; height: auto; width: auto; box-shadow: none; }
.ls-ctl select:focus, .ls-ctl input:focus { outline: none; }
.ls-ctl input { width: 64px; }
.ls .vis-sel select { max-width: 230px; }
.ls-more .kebab > summary.mini-btn { width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface); }
.ls-bar .lp-r { align-self: flex-end; }
.ls-bar .fx-btn { align-self: flex-end; height: 34px; }
@media (max-width: 760px) { .ls-sep { display: none; } .ls-bar .lp-r { margin-left: 0; } }
.ls-bar { flex-wrap: nowrap; }
.ls-bar .lp-r { flex-wrap: nowrap; white-space: nowrap; }
@media (max-width: 1250px) { .ls-bar { flex-wrap: wrap; } }
