/* ================================================================
   Unterrichtsplaner – Design
   ================================================================ */
@font-face {
  font-family: "Inter";
  src: url("vendor/inter.woff2") format("woff2-variations"), url("vendor/inter.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --hover: #f4f4f5;
  --border: #e9e9ec;
  --border-strong: #d9d9de;
  --text: #18181b;
  --text-2: #3f3f46;
  --muted: #71717a;
  --subtle: #a1a1aa;
  --accent: #1567ad;
  --accent-hover: #0f548f;
  --accent-soft: #eaf2fb;
  --accent-ink: #0e4a7e;
  --green: #16a34a; --green-soft: #ecfdf3; --green-ink: #15803d;
  --amber: #d97706; --amber-soft: #fffbeb; --amber-ink: #b45309;
  --red: #dc2626; --red-soft: #fef2f2; --red-ink: #b91c1c;
  --blue: #2563eb; --blue-soft: #eff6ff; --blue-ink: #1d4ed8;
  --violet: #7c3aed; --violet-soft: #f5f3ff; --violet-ink: #6d28d9;
  --orange: #ea580c; --orange-soft: #fff7ed; --orange-ink: #c2410c;
  --r: 14px; --r-sm: 10px; --r-xs: 8px;
  --sh-xs: 0 1px 2px rgba(16, 16, 24, .04);
  --sh-sm: 0 1px 3px rgba(16, 16, 24, .05), 0 1px 2px rgba(16, 16, 24, .03);
  --sh-md: 0 8px 24px -6px rgba(16, 16, 24, .10), 0 2px 6px rgba(16, 16, 24, .04);
  --sh-lg: 0 24px 60px -12px rgba(16, 16, 24, .25);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --ring: 0 0 0 3px rgba(21, 103, 173, .18);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 650; letter-spacing: -.015em; color: var(--text); }
h1 { font-size: 1.6rem; letter-spacing: -.025em; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; } h4 { font-size: .9rem; }
p { margin: 0 0 .75em; }
small { font-size: .8rem; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
kbd { background: var(--hover); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; font-size: .85em; font-family: inherit; }
code { background: var(--hover); padding: 1px 5px; border-radius: 5px; font-size: .88em; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.right { margin-left: auto; }
.center { text-align: center; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .mt-s { margin-top: 8px; } .mb-s { margin-bottom: 8px; } .m0 { margin: 0; }
.flex1 { flex: 1; min-width: 0; }
.boot { padding: 60px; text-align: center; color: var(--muted); }
.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }
.ic.s { width: 15px; height: 15px; vertical-align: -2px; }
.ic.l { width: 22px; height: 22px; }
.ic.xl { width: 28px; height: 28px; }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Layout ---------- */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.nw { flex-wrap: nowrap; }
.row.top { align-items: flex-start; }
.row.between { justify-content: space-between; }
.row.g4 { gap: 4px; } .row.g6 { gap: 6px; } .row.g16 { gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.s { gap: 6px; } .stack.l { gap: 20px; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid.auto-s { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 1100px) { .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.side { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

/* ---------- App-Rahmen mit Seitenleiste ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 14px 12px; gap: 4px; z-index: 40;
}
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.sb-brand img { width: 28px; height: 28px; border-radius: 8px; }
.sb-course { margin: 0 2px 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.sb-course .n { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.sb-course .m { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.sb-label { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); padding: 14px 10px 4px; }
.sb-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--text-2); font-weight: 500; font-size: .9rem;
  text-decoration: none; transition: background .12s, color .12s; position: relative;
}
.sb-item .ic { color: var(--subtle); transition: color .12s; }
.sb-item:hover { background: var(--hover); color: var(--text); }
.sb-item:hover .ic { color: var(--text-2); }
.sb-item.active { background: var(--accent-soft); color: var(--accent-ink); }
.sb-item.active .ic { color: var(--accent); }
.sb-item .cnt { margin-left: auto; background: var(--red); color: #fff; font-size: .7rem; font-weight: 600; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.sb-item .cnt.live { background: var(--green); }
.sb-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.main { min-width: 0; }
.page { max-width: 1140px; margin: 0 auto; padding: 32px 40px 80px; }
.page.wide { max-width: none; }
.page.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: .92rem; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.mobile-bar { display: none; }
.sb-backdrop { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--sh-lg); }
  .shell.open .sidebar { transform: none; }
  .shell.open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(24, 24, 27, .35); z-index: 39; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; padding: 10px 14px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
  .mobile-bar .t { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page { padding: 20px 16px 90px; }
  .page-head .actions { margin-left: 0; width: 100%; }
}

/* Lernenden-Navigation unten (Handy) */
.tabbar { display: none; }
@media (max-width: 900px) {
  .learner .sidebar { display: none; }
  .learner .mobile-bar .menu-btn { display: none; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; font-size: .68rem; font-weight: 500; color: var(--muted); border-radius: 10px; position: relative; }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--accent); }
  .tabbar a .pip { position: absolute; top: 2px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
}

/* ---------- Karten ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; box-shadow: var(--sh-xs); }
.card.p0 { padding: 0; }
.card.ps { padding: 14px 16px; }
.card.pl { padding: 28px; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card.click { cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; color: inherit; display: block; }
.card.click:hover { border-color: var(--border-strong); box-shadow: var(--sh-md); }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h2, .card-h h3 { margin: 0; }
.card-h .ic-wrap { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--hover); color: var(--text-2); flex: none; }
.tint-accent { background: var(--accent-soft) !important; color: var(--accent) !important; }
.tint-green { background: var(--green-soft) !important; color: var(--green) !important; }
.tint-amber { background: var(--amber-soft) !important; color: var(--amber) !important; }
.tint-red { background: var(--red-soft) !important; color: var(--red) !important; }
.tint-blue { background: var(--blue-soft) !important; color: var(--blue) !important; }
.tint-violet { background: var(--violet-soft) !important; color: var(--violet) !important; }
.card.hl-accent { border-color: #bcd6ee; background: linear-gradient(180deg, #f3f8fd, #fff); }
.card.hl-amber { border-color: #fde68a; background: var(--amber-soft); }
.card.hl-green { border-color: #bbf7d0; background: var(--green-soft); }
.card.hl-red { border-color: #fecaca; background: var(--red-soft); }
.section { margin-top: 32px; }
.section-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-h h2 { margin: 0; font-size: 1.05rem; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ei { width: 48px; height: 48px; border-radius: 14px; background: var(--hover); color: var(--text-2); display: grid; place-items: center; margin: 0 auto 12px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { max-width: 440px; margin: 0 auto 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  font: inherit; font-size: .88rem; font-weight: 550; line-height: 1; letter-spacing: -.005em;
  border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none !important; white-space: nowrap; user-select: none; box-shadow: var(--sh-xs);
  transition: background .12s, border-color .12s, box-shadow .12s, transform .06s;
}
.btn:hover { background: var(--hover); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(21, 103, 173, .3), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.dark { background: var(--text); border-color: var(--text); color: #fff; }
.btn.dark:hover { background: #27272a; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green:hover { background: #15803d; }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); box-shadow: none; }
.btn.soft:hover { background: #d6e6f5; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: #fecaca; }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.sm { height: 30px; padding: 0 10px; font-size: .82rem; border-radius: 8px; gap: 5px; }
.btn.sm .ic { width: 14px; height: 14px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: .78rem; border-radius: 7px; gap: 4px; }
.btn.xs .ic { width: 13px; height: 13px; }
.btn.lg { height: 46px; padding: 0 20px; font-size: .98rem; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn.icon.xs { width: 26px; }

/* ---------- Badges, Status ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: .74rem; font-weight: 550; background: var(--hover); color: var(--text-2); white-space: nowrap; }
.badge .ic { width: 12px; height: 12px; }
.badge.outline { background: transparent; border: 1px solid var(--border); }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge.green { background: var(--green-soft); color: var(--green-ink); }
.badge.amber { background: var(--amber-soft); color: var(--amber-ink); }
.badge.red { background: var(--red-soft); color: var(--red-ink); }
.badge.blue { background: var(--blue-soft); color: var(--blue-ink); }
.badge.violet { background: var(--violet-soft); color: var(--violet-ink); }
.badge.orange { background: var(--orange-soft); color: var(--orange-ink); }
.sdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: #d4d4d8; }
.s-open .sdot, .sdot.s-open { background: #d4d4d8; }
.s-doing .sdot, .sdot.s-doing { background: var(--blue); }
.s-review .sdot, .sdot.s-review { background: #f59e0b; }
.s-rework .sdot, .sdot.s-rework { background: var(--orange); }
.s-done .sdot, .sdot.s-done { background: var(--green); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #d4d4d8; flex: none; }
.dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.dot.off { background: var(--red); }
.code-pill { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-weight: 600; letter-spacing: .1em; font-size: .78rem; padding: 2px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); cursor: pointer; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label, .label { font-weight: 550; font-size: .84rem; color: var(--text-2); }
.hint { font-size: .8rem; color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=url], input[type=search], input:not([type]), select, textarea {
  font: inherit; font-size: .92rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  padding: 0 12px; height: 38px; width: 100%; min-width: 0; transition: border-color .12s, box-shadow .12s; box-shadow: var(--sh-xs);
}
textarea { padding: 10px 12px; height: auto; resize: vertical; min-height: 84px; line-height: 1.55; }
select { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
input::placeholder, textarea::placeholder { color: var(--subtle); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input.big { height: 60px; font-size: 1.6rem; text-align: center; letter-spacing: .3em; font-weight: 650; text-transform: uppercase; }
input.sm, select.sm { height: 32px; font-size: .84rem; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 4px 0; font-size: .92rem; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.check.box { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); transition: border-color .12s, background .12s; }
.check.box:hover { border-color: var(--border-strong); }
.check.box:has(input:checked) { border-color: #8fbbe2; background: #f5f9fd; }
.check .t { font-weight: 550; }
.check .d { display: block; font-size: .82rem; color: var(--muted); margin-top: 1px; }
.fields { display: flex; gap: 12px; flex-wrap: wrap; }
.fields > .field { flex: 1 1 160px; }
.seg { display: inline-flex; background: var(--hover); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: .84rem; font-weight: 550; border: 0; background: transparent; padding: 0 12px; height: 30px; border-radius: 8px; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }
.list-editor .item { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.list-editor .item .n { width: 20px; text-align: right; color: var(--subtle); font-size: .8rem; }

/* ---------- Listen & Tabellen ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--surface-2); }
.li .main { flex: 1; min-width: 0; }
.li .t { font-weight: 550; color: var(--text); }
.li .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; align-items: center; }
.li .acts { display: flex; gap: 2px; opacity: .6; transition: opacity .12s; }
.li:hover .acts { opacity: 1; }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-xs); }
table.table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .88rem; }
.table th, .table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { background: var(--surface-2); font-weight: 550; font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; z-index: 1; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }

/* Fortschritts-Matrix */
.matrix th.rot { white-space: nowrap; vertical-align: bottom; padding: 10px 4px; min-width: 42px; text-align: center; text-transform: none; letter-spacing: 0; font-size: .78rem; color: var(--text-2); }
.matrix th.rot > div { writing-mode: vertical-rl; transform: rotate(180deg); margin: 0 auto; }
.matrix th.rot span { display: inline-block; max-height: 170px; overflow: hidden; text-overflow: ellipsis; }
.matrix td.name, .matrix th.name { position: sticky; left: 0; background: var(--surface); z-index: 2; min-width: 170px; font-weight: 550; }
.matrix th.name { z-index: 3; background: var(--surface-2); }
.matrix td.cell { text-align: center; padding: 5px; cursor: pointer; }
.cbox { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; transition: transform .1s; }
.cbox .ic { width: 14px; height: 14px; }
td.cell:hover .cbox { transform: scale(1.12); }
.cb-open { background: #f4f4f5; color: #d4d4d8; }
.cb-doing { background: var(--blue-soft); color: var(--blue); }
.cb-review { background: var(--amber-soft); color: var(--amber); }
.cb-rework { background: var(--orange-soft); color: var(--orange); }
.cb-done { background: var(--green-soft); color: var(--green); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Balken & Ring */
.bar { height: 6px; background: #f0f0f2; border-radius: 99px; overflow: hidden; display: flex; }
.bar > i { display: block; height: 100%; transition: width .3s; }
.bar .g { background: var(--green); } .bar .b { background: var(--blue); } .bar .a { background: #f59e0b; } .bar .p { background: var(--accent); }
.bar.lg { height: 10px; }
.ring { --p: 0; --c: var(--accent); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none; background: conic-gradient(var(--c) calc(var(--p) * 1%), #ededf0 0); }
.ring > div { width: 52px; height: 52px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 650; font-size: .92rem; letter-spacing: -.02em; }

/* Personen */
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: .74rem; flex: none; letter-spacing: 0; }
.avatar.l { width: 40px; height: 40px; font-size: .9rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: .82rem; font-weight: 500; color: var(--text-2); }
.chip.sel { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip.me { background: var(--accent-soft); border-color: #bcd6ee; color: var(--accent-ink); }
.chip .x { cursor: pointer; opacity: .5; display: inline-flex; }
.chip .x:hover { opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Kennzahlen */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--sh-xs); }
.stat .l { font-size: .8rem; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 1.75rem; font-weight: 650; letter-spacing: -.03em; margin-top: 4px; line-height: 1.1; }
.stat .v small { font-size: .95rem; color: var(--subtle); font-weight: 500; }
.stat.alert-red { border-color: #fecaca; background: #fffafa; }
.stat.alert-red .v { color: var(--red); }
.stat.alert-amber { border-color: #fde68a; background: #fffdf5; }
.stat.alert-amber .v { color: var(--amber); }

/* Klassenübersicht */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.tile:hover { border-color: var(--border-strong); box-shadow: var(--sh-sm); }
.tile.stuck { border-color: #fca5a5; background: #fffafa; }
.tile.unsure { border-color: #fcd34d; background: #fffdf5; }
.tile.absent { opacity: .5; }
.tile .nm { font-weight: 600; display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.tile .cur { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.tile .bar { margin-top: 10px; }

/* Warteschlangen */
.queue { display: flex; flex-direction: column; gap: 6px; }
.qe { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: .88rem; }
.qe.active { background: var(--green-soft); border-color: #bbf7d0; }
.qe.next { background: var(--amber-soft); border-color: #fde68a; }
.qe .pos { width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; font-weight: 600; font-size: .76rem; flex: none; color: var(--text-2); }
.qe.active .pos { background: var(--green); color: #fff; border-color: var(--green); }
.qe .nm { font-weight: 550; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--hover); display: grid; place-items: center; font-size: 1.25rem; flex: none; }
.card.blocked { background: #fffafa; border-color: #fecaca; }

/* Hinweise / Banner */
.notice { display: flex; gap: 12px; align-items: center; border-radius: var(--r); padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--border); background: var(--surface); }
.notice .ni { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.notice .nt { font-weight: 600; }
.notice .nd { font-size: .86rem; color: var(--muted); }
.notice.accent { background: var(--accent-soft); border-color: #bcd6ee; }
.notice.accent .ni { background: var(--accent); color: #fff; }
.notice.amber { background: var(--amber-soft); border-color: #fde68a; }
.notice.amber .ni { background: #f59e0b; color: #fff; }
.notice.green { background: var(--green-soft); border-color: #bbf7d0; }
.notice.green .ni { background: var(--green); color: #fff; }
.notice.red { background: var(--red-soft); border-color: #fecaca; }
.notice.red .ni { background: var(--red); color: #fff; }
.notice.turn { background: linear-gradient(135deg, #1567ad, #12a84a); border: 0; color: #fff; box-shadow: 0 10px 30px -8px rgba(21, 103, 173, .55); animation: glow 2s infinite; }
.notice.turn .nd { color: rgba(255, 255, 255, .8); }
.notice.turn .ni { background: rgba(255, 255, 255, .18); color: #fff; }
@keyframes glow { 50% { box-shadow: 0 10px 40px -4px rgba(18, 168, 74, .6); } }

/* Status-Schritte */
.steps { display: flex; gap: 6px; margin: 16px 0; }
.steps .s { flex: 1; }
.steps .s i { display: block; height: 4px; border-radius: 99px; background: #ececef; margin-bottom: 6px; }
.steps .s span { font-size: .74rem; font-weight: 550; color: var(--subtle); }
.steps .s.past i { background: #8fbbe2; }
.steps .s.on i { background: var(--accent); }
.steps .s.on span { color: var(--accent); }
.steps .s.past span { color: var(--text-2); }

/* Markdown */
.md { overflow-wrap: anywhere; color: var(--text-2); }
.md h3, .md h4, .md h5 { margin: 1em 0 .4em; color: var(--text); }
.md ul, .md ol { margin: .3em 0 .8em; padding-left: 1.3em; }
.md li { margin: .2em 0; }
.md p:last-child { margin-bottom: 0; }
.md b { color: var(--text); font-weight: 600; }

/* Checkliste */
.checklist .check { padding: 11px 14px; border-radius: 11px; border: 1px solid var(--border); margin-bottom: 6px; background: var(--surface); align-items: center; }
.checklist .check:has(input:checked) { background: var(--green-soft); border-color: #bbf7d0; }
.checklist .check:has(input:checked) span { color: var(--green-ink); text-decoration: line-through; text-decoration-color: rgba(21, 128, 61, .4); }

/* Auswahl-Kacheln */
.picks { display: flex; gap: 8px; flex-wrap: wrap; }
.pick { flex: 1 1 0; min-width: 76px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px 8px; cursor: pointer; text-align: center; font: inherit; font-size: .8rem; font-weight: 550; color: var(--text-2); transition: all .12s; }
.pick .e { font-size: 1.5rem; display: block; margin-bottom: 3px; line-height: 1.2; }
.pick:hover { border-color: var(--border-strong); background: var(--surface-2); }
.pick.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); box-shadow: 0 0 0 1px var(--accent) inset; }

/* Programm / Agenda */
.agenda { display: flex; flex-direction: column; gap: 2px; }
.ag { display: flex; gap: 14px; padding: 8px 10px; border-radius: 10px; align-items: baseline; }
.ag .t { font-weight: 550; font-variant-numeric: tabular-nums; min-width: 96px; color: var(--muted); font-size: .86rem; }
.ag .x { font-weight: 550; }
.ag .n { font-size: .82rem; color: var(--muted); }
.ag.now { background: var(--accent-soft); }
.ag.now .t, .ag.now .x { color: var(--accent-ink); }
.ag.past { opacity: .45; }
.ag.k-break .x { color: var(--muted); }

/* Liste der Aufträge (Lernende) */
.acard { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border); background: var(--surface); border-radius: 13px; cursor: pointer; margin-bottom: 8px; color: inherit; transition: border-color .12s, box-shadow .12s; box-shadow: var(--sh-xs); }
.acard:hover { border-color: var(--border-strong); box-shadow: var(--sh-sm); color: inherit; }
.acard.locked { opacity: .55; }
.acard .si { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--hover); color: var(--muted); }
.acard .si.s-doing { background: var(--blue-soft); color: var(--blue); }
.acard .si.s-review { background: var(--amber-soft); color: var(--amber); }
.acard .si.s-rework { background: var(--orange-soft); color: var(--orange); }
.acard .si.s-done { background: var(--green-soft); color: var(--green); }
.acard .t { font-weight: 600; }
.acard .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.acard .bar { margin-top: 10px; }
.nextcard { background: linear-gradient(135deg, #1567ad 0%, #1a7fc4 60%, #1d9bb8 100%); color: #fff; border: 0; box-shadow: 0 16px 40px -16px rgba(21, 103, 173, .6); }
.nextcard h2 { color: #fff; font-size: 1.25rem; margin: 4px 0; overflow-wrap: anywhere; }
.nextcard .k { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; opacity: .75; }
.nextcard .d { opacity: .85; font-size: .9rem; }
.nextcard .tip { background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px 12px; margin-top: 14px; font-size: .88rem; display: flex; gap: 8px; align-items: flex-start; }
.nextcard .btn { box-shadow: none; }
.nextcard .btn.w { background: #fff; color: var(--accent-ink); border-color: #fff; }
.nextcard .btn.t { background: rgba(255, 255, 255, .16); color: #fff; border-color: transparent; }
.hello h1 { margin: 0; font-size: 1.7rem; }
.hello .muted { margin-top: 2px; }

/* Journal */
.jentry { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); padding: 16px 18px; margin-bottom: 10px; }
.jentry .jh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.jentry .jt { white-space: pre-wrap; color: var(--text-2); }
.jfb { margin-top: 12px; padding: 10px 12px; border-radius: 11px; background: var(--accent-soft); border: 1px solid #d6e6f5; display: flex; gap: 10px; }
.jfb .ic { color: var(--accent); margin-top: 2px; }
.jfb .who { font-size: .76rem; font-weight: 600; color: var(--accent-ink); }
.jfb .tx { white-space: pre-wrap; font-size: .9rem; }
.prompt-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.prompt-chips button { font: inherit; font-size: .78rem; border: 1px dashed var(--border-strong); background: transparent; color: var(--muted); border-radius: 99px; padding: 4px 10px; cursor: pointer; }
.prompt-chips button:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(24, 24, 27, .38); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; animation: fade .14s; }
.modal { background: var(--surface); border-radius: 18px; box-shadow: var(--sh-lg); width: 100%; max-width: 540px; animation: pop .16s cubic-bezier(.2, .9, .3, 1.2); display: flex; flex-direction: column; border: 1px solid rgba(0, 0, 0, .04); }
.modal.wide { max-width: 820px; }
.modal.xwide { max-width: 1080px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 20px 22px 4px; }
.modal-h h2 { margin: 0; flex: 1; font-size: 1.12rem; display: flex; align-items: center; gap: 10px; }
.modal-b { padding: 12px 22px 10px; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px 18px; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--surface); border-radius: 0 0 18px 18px; border-top: 1px solid var(--border); margin-top: 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
@media (max-width: 640px) { .overlay { padding: 0; align-items: flex-end; } .modal { border-radius: 18px 18px 0 0; max-height: 92vh; overflow-y: auto; } }

/* ---------- Toasts ---------- */
#toasts { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { background: #18181b; color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--sh-lg); font-weight: 500; font-size: .88rem; pointer-events: auto; animation: pop .16s; max-width: 100%; display: flex; gap: 10px; align-items: center; }
.toast .ic { width: 16px; height: 16px; }
.toast.error .ic { color: #f87171; } .toast.success .ic { color: #4ade80; } .toast.notice .ic { color: #8fbbe2; }
@media (max-width: 900px) { body.has-tabbar #toasts { bottom: 84px; } }

/* ---------- Landing / Anmeldung ---------- */
.landing { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background:
  radial-gradient(at 15% 10%, #d6e6f5 0, transparent 45%), radial-gradient(at 90% 20%, #dcfce7 0, transparent 40%), radial-gradient(at 50% 100%, #e0f2fe 0, transparent 50%), var(--bg); }
.landing-box { width: 100%; max-width: 440px; }
.brand { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 28px; }
.brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: var(--sh-md); }
.brand h1 { margin: 0; font-size: 1.7rem; }
.card.choice { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--text); }
.choice .muted { display: block; font-size: .86rem; }
.choice:hover { color: var(--text); }
.choice .ci { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.choice b { display: block; font-weight: 600; }
.choice .chev { margin-left: auto; color: var(--subtle); }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; max-height: 50vh; overflow-y: auto; padding: 2px; }
.names button { font: inherit; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; cursor: pointer; text-align: left; font-weight: 550; font-size: .9rem; transition: all .12s; }
.names button:hover { border-color: var(--accent); background: var(--accent-soft); }
.steps-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.steps-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--border-strong); transition: all .2s; }
.steps-dots i.on { width: 20px; background: var(--accent); }

/* ---------- Gruppen ---------- */
.gedit { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gbox { border: 1px solid var(--border); border-radius: 13px; padding: 12px; background: var(--surface); min-height: 96px; transition: border-color .12s, background .12s; }
.gbox.target { border-color: #8fbbe2; background: #f5f9fd; cursor: pointer; }
.gbox.dragover { border-color: var(--accent); background: var(--accent-soft); }
.gbox .gh { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gbox .gh input { font-weight: 600; height: 30px; padding: 0 6px; border-color: transparent; background: transparent; box-shadow: none; }
.gbox .gh input:hover, .gbox .gh input:focus { border-color: var(--border-strong); background: var(--surface); }
.gbox .chip { cursor: grab; }
.gcolor { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }

/* ---------- Spiele ---------- */
.game-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gcard { border: 1px solid var(--border); border-radius: 16px; padding: 18px; background: var(--surface); cursor: pointer; transition: all .14s; box-shadow: var(--sh-xs); text-align: left; font: inherit; color: inherit; }
.gcard:hover { border-color: var(--border-strong); box-shadow: var(--sh-md); transform: translateY(-1px); }
.gcard .gi { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 12px; }
.gcard b { display: block; font-size: 1rem; margin-bottom: 3px; }
.gcard p { margin: 0; font-size: .84rem; color: var(--muted); }

/* Spiel-Bühne (Beamer) */
.stage { position: relative; min-height: 100vh; color: #fff; overflow: hidden; display: flex; flex-direction: column;
  background: radial-gradient(at 0% 0%, #1d74c0 0, transparent 50%), radial-gradient(at 100% 0%, #12a84a 0, transparent 45%), radial-gradient(at 50% 100%, #0ea5e9 0, transparent 55%), #0b2e52; }
.stage.embed { min-height: 520px; border-radius: 18px; }
.stage-top { display: flex; align-items: center; gap: 12px; padding: 22px 32px; font-weight: 600; }
.stage-top .pill { background: rgba(255, 255, 255, .14); padding: 6px 14px; border-radius: 99px; font-size: .9rem; backdrop-filter: blur(6px); }
.stage-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 40px 40px; text-align: center; gap: 24px; }
.stage h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 3.4rem); letter-spacing: -.03em; line-height: 1.15; max-width: 1100px; margin: 0; }
.stage .big-num { font-size: clamp(3rem, 10vw, 8rem); font-weight: 700; letter-spacing: -.05em; font-variant-numeric: tabular-nums; line-height: 1; }
.stage .sub { font-size: clamp(1rem, 1.6vw, 1.35rem); opacity: .8; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 1100px; }
.answer { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: 18px; font-size: clamp(1rem, 1.9vw, 1.6rem); font-weight: 600; text-align: left; color: #fff; border: 0; font-family: inherit; position: relative; overflow: hidden; }
.answer .k { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-weight: 700; flex: none; font-size: 1.1rem; }
.answer .cnt { margin-left: auto; font-variant-numeric: tabular-nums; opacity: .9; }
.answer .fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 255, 255, .16); transition: width .5s; }
.answer > * { position: relative; }
.a0 { background: #e11d48; } .a1 { background: #2563eb; } .a2 { background: #d97706; } .a3 { background: #059669; }
.answer.dim { opacity: .3; }
.answer.correct { box-shadow: 0 0 0 4px #fff; }
.timer-ring { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .15) 0); }
.timer-ring > div { width: 92px; height: 92px; border-radius: 50%; background: #0d3a66; display: grid; place-items: center; font-size: 2.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.board-list { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 8px; }
.board-list .r { display: flex; align-items: center; gap: 14px; background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 12px 18px; font-size: 1.15rem; font-weight: 600; backdrop-filter: blur(4px); }
.board-list .r .p { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-size: .95rem; }
.board-list .r .s { margin-left: auto; font-variant-numeric: tabular-nums; }
.podium { display: flex; align-items: flex-end; gap: 16px; justify-content: center; }
.podium .pl { width: 180px; text-align: center; }
.podium .pl .bl { border-radius: 16px 16px 0 0; background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 2.6rem; font-weight: 700; }
.podium .pl .nm { font-size: 1.2rem; font-weight: 650; margin-bottom: 8px; }
.cloud { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; align-items: center; max-width: 1100px; }
.cloud span { font-weight: 700; letter-spacing: -.02em; line-height: 1.1; animation: pop .3s; }
.stage-ctrl { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 8px; opacity: .25; transition: opacity .2s; }
.stage-ctrl:hover { opacity: 1; }
.stage.embed .stage-ctrl { position: static; justify-content: center; padding: 0 0 26px; }

/* Spiel (Lernende) */
.play { min-height: calc(100vh - 140px); display: flex; flex-direction: column; gap: 16px; }
.play .q { font-size: 1.35rem; font-weight: 650; letter-spacing: -.02em; }
.play .answers { grid-template-columns: 1fr; }
@media (min-width: 640px) { .play .answers { grid-template-columns: 1fr 1fr; } }
.play .answer { cursor: pointer; padding: 20px; font-size: 1.05rem; transition: transform .08s; }
.play .answer:active { transform: scale(.98); }
.play .answer.mine { box-shadow: 0 0 0 4px #18181b; }
.result { text-align: center; padding: 36px 20px; border-radius: 20px; color: #fff; }
.result.ok { background: linear-gradient(135deg, #16a34a, #22c55e); }
.result.bad { background: linear-gradient(135deg, #e11d48, #f43f5e); }
.result.neutral { background: linear-gradient(135deg, #1567ad, #12a84a); }
.result .big { font-size: 2.6rem; font-weight: 700; letter-spacing: -.03em; }

/* QR / Druck */
.qr svg { width: 100%; height: auto; display: block; border-radius: 10px; }
.print-sheet { text-align: center; }
.print-sheet .qr { max-width: 300px; margin: 0 auto; }
.print-sheet .code-big { font-size: 2.4rem; font-weight: 700; letter-spacing: .22em; font-family: ui-monospace, Consolas, monospace; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; text-align: left; }
.how div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; font-size: .84rem; }
.how b { display: block; font-size: 1.2rem; color: var(--accent); }
@media print {
  body.printing > *:not(#modal-root) { display: none !important; }
  body.printing .overlay { position: static; background: none; padding: 0; backdrop-filter: none; }
  body.printing .modal { box-shadow: none; max-width: none; border: 0; }
  body.printing .modal-h, body.printing .modal-f, body.printing .no-print { display: none !important; }
}

/* ================================================================
   Tafel
   ================================================================ */
.tafel { position: relative; height: 100vh; display: flex; flex-direction: column; background: #f1f1f3; background-image: radial-gradient(#dcdce1 1px, transparent 1px); background-size: 20px 20px; }
.tafel-top { display: flex; align-items: center; gap: 8px; padding: 12px 18px; flex-wrap: wrap; }
.tafel-tabs { display: inline-flex; background: rgba(255, 255, 255, .9); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; box-shadow: var(--sh-xs); overflow-x: auto; max-width: 60vw; }
.tafel-tabs button { font: inherit; font-size: .84rem; font-weight: 550; border: 0; background: transparent; padding: 0 12px; height: 30px; border-radius: 9px; cursor: pointer; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tafel-tabs button.on { background: var(--text); color: #fff; }
.tafel-tabs button .live { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.tafel-host { flex: 1; position: relative; min-height: 200px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dock {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; display: flex; gap: 2px; align-items: center;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(16px) saturate(1.4); border: 1px solid rgba(0, 0, 0, .06); border-radius: 18px; padding: 6px; box-shadow: 0 12px 40px -10px rgba(16, 16, 24, .25);
  max-width: calc(100% - 24px); overflow-x: auto;
}
.dock button { font: inherit; border: 0; background: transparent; cursor: pointer; border-radius: 12px; width: 62px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-2); font-size: .66rem; font-weight: 550; flex: none; transition: background .12s; }
.dock button .ic { width: 20px; height: 20px; }
.dock button:hover { background: rgba(0, 0, 0, .05); color: var(--text); }
.dock .sep { width: 1px; height: 30px; background: var(--border); margin: 0 4px; flex: none; }
.board {
  position: relative; overflow: hidden; border-radius: 18px; flex: none; container-type: size; user-select: none;
  --bu: 1px; box-shadow: 0 30px 70px -20px rgba(16, 16, 24, .35), 0 0 0 1px rgba(0, 0, 0, .05);
  background-size: cover; background-position: center; font-family: var(--font);
}
.present-page { position: fixed; inset: 0; background: #0a0a0b; display: flex; align-items: center; justify-content: center; }
.present-page .board { border-radius: 0; box-shadow: none; }
.present-fab { position: fixed; right: 14px; bottom: 14px; z-index: 50; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.present-page:hover .present-fab { opacity: .9; }
.tafel-host:fullscreen { background: #0a0a0b; }
.tafel-host:fullscreen .board { border-radius: 0; box-shadow: none; }

/* Hintergründe */
.bg-aurora { background: radial-gradient(at 12% 18%, #bcd6ee 0, transparent 48%), radial-gradient(at 88% 8%, #fbcfe8 0, transparent 45%), radial-gradient(at 80% 92%, #bae6fd 0, transparent 50%), radial-gradient(at 20% 95%, #ddd6fe 0, transparent 45%), #eef0ff; }
.bg-dawn { background: radial-gradient(at 10% 10%, #fed7aa 0, transparent 50%), radial-gradient(at 90% 20%, #fecdd3 0, transparent 45%), radial-gradient(at 50% 100%, #fde68a 0, transparent 55%), #fff7ed; }
.bg-ocean { background: radial-gradient(at 15% 15%, #a5f3fc 0, transparent 50%), radial-gradient(at 85% 15%, #bfdbfe 0, transparent 45%), radial-gradient(at 50% 100%, #99f6e4 0, transparent 55%), #ecfeff; }
.bg-mint { background: radial-gradient(at 15% 20%, #bbf7d0 0, transparent 50%), radial-gradient(at 85% 80%, #a7f3d0 0, transparent 50%), radial-gradient(at 80% 10%, #d9f99d 0, transparent 45%), #f0fdf4; }
.bg-sand { background: radial-gradient(at 20% 20%, #e7e5e4 0, transparent 50%), radial-gradient(at 80% 80%, #fde68a55 0, transparent 50%), #f5f5f4; }
.bg-graphite { background: radial-gradient(at 15% 10%, #3f3f46 0, transparent 50%), radial-gradient(at 85% 90%, #0d3a66 0, transparent 55%), #18181b; }
.bg-night { background: radial-gradient(at 20% 10%, #1567ad 0, transparent 50%), radial-gradient(at 90% 80%, #12a84a 0, transparent 50%), #0b2e52; }
.bg-mist { background: #f4f4f5; }
.bg-dots { background-color: #fafafa; background-image: radial-gradient(#d4d4d8 1.2px, transparent 1.2px); background-size: 24px 24px; }
.bg-white { background: #ffffff; }
.bg-swatch { width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.bg-swatch.on { border-color: var(--accent); }
.bg-grid-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.bg-grid-pick small { display: block; text-align: center; margin-top: 4px; color: var(--muted); }

/* Elemente */
.widget {
  position: absolute; display: flex; flex-direction: column; background: #fff; color: #18181b;
  border-radius: calc(var(--bu) * 2.2); overflow: hidden; min-width: 0; min-height: 0;
  box-shadow: 0 calc(var(--bu) * .5) calc(var(--bu) * 2.5) rgba(16, 16, 24, .10), 0 0 0 1px rgba(16, 16, 24, .05);
}
.mode-edit .widget { cursor: grab; }
.mode-edit .widget:hover { box-shadow: 0 calc(var(--bu) * .8) calc(var(--bu) * 3.5) rgba(16, 16, 24, .16), 0 0 0 2px rgba(21, 103, 173, .45); }
.widget.dragging { cursor: grabbing; box-shadow: 0 calc(var(--bu) * 2) calc(var(--bu) * 6) rgba(16, 16, 24, .3), 0 0 0 2px var(--accent) !important; z-index: 9999 !important; }
.widget.clear { background: transparent; box-shadow: none; }
.w-tools {
  position: absolute; top: calc(var(--bu) * .9); right: calc(var(--bu) * .9); z-index: 5; display: flex; gap: 2px; padding: 3px;
  background: rgba(255, 255, 255, .95); border-radius: 10px; box-shadow: 0 4px 14px rgba(16, 16, 24, .16), 0 0 0 1px rgba(0, 0, 0, .05);
  opacity: 0; transform: translateY(-3px); transition: opacity .12s, transform .12s; pointer-events: none;
}
.mode-edit .widget:hover .w-tools, .mode-present .widget:hover .w-tools { opacity: 1; transform: none; pointer-events: auto; }
.w-tools button { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 7px; cursor: pointer; display: grid; place-items: center; color: #52525b; padding: 0; }
.w-tools button:hover { background: #f4f4f5; color: #18181b; }
.w-tools button.del:hover { background: var(--red-soft); color: var(--red); }
.w-tools .ic { width: 15px; height: 15px; }
.w-body { flex: 1; min-height: 0; position: relative; container-type: size; overflow: hidden; }
.w-resize { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; z-index: 6; touch-action: none; opacity: 0; transition: opacity .12s; }
.w-resize::after { content: ""; position: absolute; right: 6px; bottom: 6px; width: 8px; height: 8px; border-right: 2px solid #a1a1aa; border-bottom: 2px solid #a1a1aa; border-radius: 0 0 3px 0; }
.mode-edit .widget:hover .w-resize, .mode-present .widget:hover .w-resize { opacity: 1; }
.mode-view .w-resize, .mode-view .w-tools { display: none; }
.wb { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 5cqmin 6cqmin; gap: 2.5cqmin; overflow: hidden; }
.wb.c { align-items: center; justify-content: center; text-align: center; }
.wl { font-size: max(10px, min(5.5cqh, 3.4cqw)); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #a1a1aa; display: flex; align-items: center; gap: .5em; }
.wl .ic { width: 1.2em; height: 1.2em; }
.wt { font-weight: 650; font-size: max(13px, min(8.5cqh, 6cqw)); line-height: 1.2; letter-spacing: -.02em; }
.ws { color: #71717a; font-weight: 500; font-size: max(11px, min(5.2cqh, 3.8cqw)); }
.wscroll { overflow: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
.wctrl { display: flex; gap: 1.4cqmin; flex-wrap: wrap; justify-content: center; }
.wbtn {
  font: inherit; font-weight: 600; font-size: max(11px, min(5.5cqh, 4cqw)); border: 0; background: #f4f4f5; color: #27272a;
  border-radius: 99px; padding: .55em 1.1em; cursor: pointer; line-height: 1.1; white-space: nowrap; display: inline-flex; align-items: center; gap: .4em; transition: background .12s;
}
.wbtn:hover { background: #e4e4e7; }
.wbtn .ic { width: 1.1em; height: 1.1em; }
.wbtn.pri { background: #18181b; color: #fff; }
.wbtn.pri:hover { background: #3f3f46; }
.wbtn.sm { font-size: max(10px, min(4.4cqh, 3.2cqw)); padding: .45em .9em; }
.mode-view .t-only { display: none !important; }
.t-only.hov { opacity: 0; transition: opacity .15s; }
.widget:hover .t-only.hov { opacity: 1; }
.opts-pop { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; flex-direction: column; gap: 1cqmin; padding: 2cqmin; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border-top: 1px solid #f0f0f2; opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; pointer-events: none; }
.widget:hover .opts-pop { opacity: 1; transform: none; pointer-events: auto; }
.dock { scrollbar-width: none; }
.dock::-webkit-scrollbar { display: none; }

/* Timer & Uhr */
.w-time .num { font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.045em; line-height: .95; font-size: min(36cqh, 24cqw); color: #18181b; }
.w-time .num.click { cursor: pointer; }
.w-time .tbar { width: 82%; height: 2.2cqh; min-height: 4px; background: #f0f0f2; border-radius: 99px; overflow: hidden; }
.w-time .tbar i { display: block; height: 100%; background: #18181b; border-radius: 99px; transition: width .25s linear; }
.w-time.warn .num { color: #d97706; } .w-time.warn .tbar i { background: #f59e0b; }
.w-time.over { animation: flashbg 1s infinite; }
.w-time.over .num { color: #dc2626; }
@keyframes flashbg { 50% { background: #fee2e2; } }
.presets { display: flex; gap: 1cqmin; flex-wrap: wrap; justify-content: center; }
.w-clock .num { font-size: min(42cqh, 25cqw); }
.w-clock .date { font-weight: 500; font-size: min(9cqh, 6cqw); color: #71717a; margin-top: 2cqh; }
.w-clock svg { width: 86cqmin; height: 86cqmin; }
@container (max-height: 170px) { .presets { display: none; } }
@container (max-height: 120px) { .w-time .wctrl { display: none; } }
@container (max-height: 64px) { .w-time .wl { display: none; } }

/* Notiz */
.w-note .txt { width: 100%; height: 100%; overflow: auto; font-size: calc(var(--fs, 1) * min(9.5cqh, 5.2cqw)); line-height: 1.35; font-weight: 550; letter-spacing: -.01em; color: inherit; }
.w-note .txt > :first-child { margin-top: 0; }
.w-note .txt p { margin: 0 0 .35em; }
.w-note .txt h3, .w-note .txt h4 { font-size: 1.3em; margin: 0 0 .25em; letter-spacing: -.025em; color: inherit; }
.w-note .txt ul, .w-note .txt ol { margin: .1em 0 .3em; padding-left: 1.15em; }
.w-note textarea { width: 100%; height: 100%; border: 0; background: transparent; font: inherit; font-weight: 550; font-size: calc(var(--fs, 1) * min(7cqh, 4.2cqw)); resize: none; padding: 0; box-shadow: none; outline: none; color: inherit; }
.n-white { background: #fff !important; } .n-yellow { background: #fef9c3 !important; } .n-blue { background: #dbeafe !important; }
.n-green { background: #dcfce7 !important; } .n-pink { background: #fce7f3 !important; } .n-violet { background: #ede9fe !important; }
.n-dark { background: #18181b !important; color: #fafafa !important; }
.n-clear { background: transparent !important; box-shadow: none !important; }
.n-clear .txt { text-shadow: 0 1px 12px rgba(255, 255, 255, .6); }

/* Listen in Elementen */
.w-list { font-size: max(11px, min(5.6cqh, 3.8cqw)); }
.w-st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(150px, 30cqw), 1fr)); gap: 2cqmin; align-content: start; font-size: max(11px, min(4.6cqh, 2.8cqw)); }
.w-st { border-radius: 2cqmin; padding: 2cqmin 2.4cqmin; background: #f7f7f8; }
.w-st.blocked { background: #fef2f2; }
.w-st .h { font-weight: 650; display: flex; gap: .45em; align-items: flex-start; margin-bottom: .35em; }
.w-st .h span:last-child { min-width: 0; overflow-wrap: anywhere; }
.w-st .p { display: flex; align-items: center; gap: .45em; margin-top: .25em; font-weight: 500; }
.w-st .p.act { color: #15803d; font-weight: 600; }
.w-st .n { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: #fff; font-size: .78em; font-weight: 650; flex: none; box-shadow: 0 0 0 1px #e4e4e7; }
.w-st .p.next .n { background: #f59e0b; color: #fff; box-shadow: none; }
.w-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(130px, 22cqw), 1fr)); gap: 2cqmin; align-content: start; }
.w-group { border-radius: 2cqmin; padding: 2cqmin 2.4cqmin; background: #f7f7f8; }
.w-group .h { font-weight: 650; margin-bottom: .3em; display: flex; align-items: center; gap: .45em; }
.w-group .m { font-weight: 500; line-height: 1.4; color: #3f3f46; }
.w-row { display: flex; align-items: center; gap: .6em; padding: .35em 0; font-weight: 550; }
.w-row .n { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: #f4f4f5; font-size: .8em; font-weight: 650; flex: none; }
.w-row .n.ok { background: #16a34a; color: #fff; }
.w-row .r { margin-left: auto; color: #a1a1aa; font-size: .82em; font-weight: 500; }
.wb .agenda { font-size: max(11px, min(5cqh, 4.4cqw)); }
.wb .ag { padding: .45em .6em; gap: .8em; }
.wb .ag .t { min-width: 5.5em; font-size: .9em; }
.wb .ag .n { font-size: .85em; }
@container (max-width: 300px) { .wb .ag { flex-direction: column; gap: 0; } .wb .ag .t { min-width: 0; } }

/* Zufall, Würfel, Arbeitsmodus, Ampel */
.w-rand .name { font-weight: 700; font-size: min(20cqh, 12cqw); line-height: 1.05; letter-spacing: -.035em; }
.w-rand .name.spin { color: #a1a1aa; }
.w-work-grid { display: flex; gap: 3cqmin; align-items: stretch; justify-content: center; flex: 1; min-height: 0; }
.w-work-grid .sym { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 3cqmin; background: #f7f7f8; min-width: 0; padding: 2cqmin; }
.w-work-grid .sym .ic { width: min(30cqh, 14cqw); height: min(30cqh, 14cqw); stroke-width: 1.6; }
.w-work-grid .sym .e { font-size: min(26cqh, 11cqw); line-height: 1.05; white-space: nowrap; }
.w-work-grid .sym .l { font-weight: 650; font-size: max(10px, min(7cqh, 4cqw)); margin-top: 1.5cqh; text-align: center; letter-spacing: -.01em; }
.opts { display: flex; gap: .8cqmin; flex-wrap: wrap; justify-content: center; }
.opts button { font: inherit; font-size: max(11px, min(4.8cqh, 2.8cqw)); line-height: 1.2; padding: .35em .7em; border: 0; border-radius: 99px; background: #f4f4f5; color: #52525b; cursor: pointer; font-weight: 550; }
.opts button.on { background: #18181b; color: #fff; }
.w-traffic { flex-direction: row !important; align-items: center; justify-content: center; gap: 5cqmin; }
.w-traffic .housing { background: #18181b; border-radius: 6cqmin; padding: 3.5cqmin; display: flex; flex-direction: column; gap: 3cqmin; height: 90cqh; justify-content: space-between; }
.w-traffic .lamp { width: 24cqh; height: 24cqh; max-width: 28cqw; max-height: 28cqw; border-radius: 50%; background: #3f3f46; cursor: pointer; transition: background .2s, box-shadow .2s; }
.w-traffic .lamp.r.on { background: #ef4444; box-shadow: 0 0 5cqmin #ef4444; }
.w-traffic .lamp.y.on { background: #f59e0b; box-shadow: 0 0 5cqmin #f59e0b; }
.w-traffic .lamp.g.on { background: #22c55e; box-shadow: 0 0 5cqmin #22c55e; }
.w-traffic .caption { font-weight: 650; font-size: max(13px, min(11cqh, 8cqw)); max-width: 52cqw; letter-spacing: -.02em; text-align: left; }
.w-dice .faces { display: flex; gap: 4cqmin; justify-content: center; align-items: center; }
.w-dice .face { width: min(46cqh, 26cqw); aspect-ratio: 1; background: #fff; border-radius: 18%; box-shadow: 0 1cqmin 3cqmin rgba(0, 0, 0, .12), 0 0 0 1px #e4e4e7; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 12%; }
.w-dice .face i { width: 72%; aspect-ratio: 1; border-radius: 50%; background: #18181b; place-self: center; }
.w-dice .face.roll { animation: roll .5s ease-out; }
@keyframes roll { 0% { transform: rotate(-200deg) scale(.6); } 100% { transform: none; } }

/* QR, Umfrage, Fortschritt, Bild, Lautstärke */
.w-qr .qr { flex: 1; min-height: 0; aspect-ratio: 1; max-width: 100%; }
.w-qr .qr svg { width: 100%; height: 100%; }
.w-qr .code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: .18em; font-size: max(13px, min(10cqh, 11cqw)); }
.w-poll .opt { display: grid; grid-template-columns: minmax(0, 38%) 1fr auto; align-items: center; gap: 2cqmin; margin-bottom: 1.8cqmin; font-weight: 550; font-size: max(11px, min(6cqh, 4cqw)); }
.w-poll .opt .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-poll .opt .pb { height: 1.5em; background: #f4f4f5; border-radius: 99px; overflow: hidden; }
.w-poll .opt .pb i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.w-poll .opt .cnt { min-width: 1.6em; text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.w-poll .vote { display: flex; flex-wrap: wrap; gap: 1.5cqmin; }
.w-poll .vote button { flex: 1 1 40%; font: inherit; font-weight: 600; font-size: max(12px, 5cqmin); padding: 2cqmin; border: 1px solid #e4e4e7; border-radius: 2cqmin; background: #fff; cursor: pointer; }
.w-poll .vote button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.w-prog .r { display: grid; grid-template-columns: minmax(0, 1.3fr) 2fr auto; gap: 2.5cqmin; align-items: center; margin-bottom: 1.6cqmin; font-weight: 550; font-size: max(10px, min(5.6cqh, 3.6cqw)); }
.w-prog .r .n { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.w-prog .bar { height: 1em; }
.w-prog .r > div:last-child { font-variant-numeric: tabular-nums; color: #71717a; }
.w-image img { width: 100%; height: 100%; display: block; }
.w-image .cap { position: absolute; left: 2cqmin; right: 2cqmin; bottom: 2cqmin; background: rgba(24, 24, 27, .7); backdrop-filter: blur(6px); color: #fff; font-weight: 550; padding: 1.5cqmin 3cqmin; border-radius: 2cqmin; font-size: max(11px, min(5.5cqh, 3.8cqw)); }
.w-noise .meter { width: 86%; height: 9cqh; background: #f0f0f2; border-radius: 99px; overflow: hidden; position: relative; }
.w-noise .meter i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #22c55e, #f59e0b 60%, #ef4444); transition: width .1s; border-radius: 99px; }
.w-noise .meter .limit { position: absolute; top: 0; bottom: 0; width: 3px; background: #18181b; }
.w-noise .face { font-size: min(34cqh, 24cqw); line-height: 1; }
.w-assign .md { font-size: max(11px, min(5.4cqh, 3.6cqw)); }
.w-assign .cl { margin: .5em 0 0; padding: 0; list-style: none; font-size: max(11px, min(5.4cqh, 3.6cqw)); font-weight: 500; }
.w-assign .cl li { display: flex; gap: .5em; align-items: center; padding: .15em 0; }
.w-assign .cl li::before { content: ""; width: .85em; height: .85em; border: 2px solid #d4d4d8; border-radius: .25em; flex: none; }

/* Palette */
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.palette button { font: inherit; display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; cursor: pointer; text-align: left; transition: all .12s; }
.palette button:hover { border-color: #8fbbe2; background: #f5f9fd; }
.palette .pi { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--hover); flex: none; color: var(--text-2); }
.palette b { display: block; font-size: .86rem; font-weight: 600; }
.palette small { color: var(--muted); font-size: .74rem; line-height: 1.3; display: block; margin-top: 1px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tpl-grid button { font: inherit; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 14px; cursor: pointer; }
.tpl-grid button:hover { border-color: #8fbbe2; background: #f5f9fd; }
.tpl-grid b { display: block; margin: 8px 0 2px; font-size: .9rem; }
.tpl-prev { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; display: grid; place-items: center; color: #3f3f46; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.tpl-prev.dark { color: #fff; }
.tpl-grid small { color: var(--muted); }

.sortbtns { display: flex; flex-direction: column; }
.sortbtns button { border: 0; background: transparent; cursor: pointer; padding: 0 2px; color: var(--subtle); line-height: 0; }
.sortbtns button:hover { color: var(--accent); }
.sortbtns .ic { width: 14px; height: 14px; }
details.more summary { cursor: pointer; font-weight: 550; color: var(--accent); padding: 4px 0; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
.kbd-hint { font-size: .78rem; color: var(--subtle); }
.help-e { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 8px; background: var(--surface); }
.help-e.active { background: var(--green-soft); border-color: #bbf7d0; }
@media (max-width: 640px) { .hide-sm { display: none !important; } .how { grid-template-columns: 1fr; } }

/* Marken: Berufslernverbund & Bohso KLG */
img.blv { width: 30px; height: auto; flex: none; }
.brand img.blv { width: 52px; box-shadow: none; border-radius: 0; }
.blv-lockup { display: block; height: 58px; width: auto; margin: 0 auto 18px; }
.madeby { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 500; color: var(--subtle); text-decoration: none !important; white-space: nowrap; }
.madeby img.m { width: 17px; height: 17px; }
.madeby img.w { height: 11px; width: auto; }
.madeby.l { font-size: .8rem; gap: 9px; }
.madeby.l img.m { width: 24px; height: 24px; }
.madeby.l img.w { height: 15px; }
.madeby.dark { color: rgba(255, 255, 255, .7); }
.madeby.dark img { filter: invert(1); }
.foot-credit { display: flex; justify-content: center; margin-top: 28px; }
.corner-credit { position: fixed; left: 14px; bottom: 12px; z-index: 40; opacity: .55; pointer-events: none; }
.madeby.pill { background: rgba(255, 255, 255, .88); color: #52525b; padding: 4px 10px; border-radius: 99px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.sb-credit { padding: 8px 10px 2px; }
.print-credit { margin-top: 26px; display: flex; justify-content: center; }
.foot-credit.mobile-only { display: none; }
@media (max-width: 900px) { .foot-credit.mobile-only { display: flex; } }

/* Dokument auf der Tafel */
.w-doc { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; }
.w-doc .pgv { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #f4f4f5; padding: 2cqmin; }
.w-doc .pgv img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; box-shadow: 0 1px 6px rgba(16, 16, 24, .14); border-radius: 2px; }
.w-doc .dbar { display: flex; align-items: center; gap: 1.5cqmin; padding: 1.6cqmin 2.5cqmin; border-top: 1px solid #f0f0f2; font-size: max(11px, min(4.2cqh, 3.2cqw)); flex: none; }
.w-doc .dbar .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.w-doc .dbar .pc { font-variant-numeric: tabular-nums; color: #71717a; font-weight: 600; white-space: nowrap; }
.w-doc .fi { width: min(26cqh, 22cqw); height: min(26cqh, 22cqw); border-radius: 22%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.w-doc .fi .ic { width: 55%; height: 55%; }
.w-doc .qrc { position: absolute; right: 2cqmin; top: 2cqmin; z-index: 2; width: min(30cqmin, 160px); background: #fff; padding: .8cqmin; border-radius: 1.6cqmin; box-shadow: 0 2px 12px rgba(16, 16, 24, .18); }
.w-doc .qrc svg { width: 100%; height: auto; display: block; }
.wbtn[disabled] { opacity: .35; pointer-events: none; }
a.wbtn { text-decoration: none !important; color: #27272a; }
a.wbtn.pri { color: #fff; }
.doc-list .li .main .t { font-weight: 550; }

/* Quiz-Editor (Kahoot-Stil) */
.qz-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.qz-title { flex: 1; min-width: 240px; height: 46px !important; font-size: 1.15rem !important; font-weight: 600; }
.qz { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; min-height: 480px; }
.qz-list { display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 8px; max-height: 64vh; overflow-y: auto; }
#qz-items { display: flex; flex-direction: column; gap: 4px; }
.qz-item { font: inherit; display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 8px; cursor: pointer; color: var(--text-2); font-size: .84rem; }
.qz-item:hover { background: var(--surface); border-color: var(--border); }
.qz-item.on { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; color: var(--text); }
.qz-item .n { width: 22px; height: 22px; border-radius: 7px; background: var(--hover); display: grid; place-items: center; font-weight: 650; font-size: .74rem; flex: none; }
.qz-item.on .n { background: var(--accent); color: #fff; }
.qz-item .tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz-item .tag { font-size: .66rem; font-weight: 650; background: var(--hover); border-radius: 5px; padding: 1px 5px; color: var(--muted); }
.qz-main { min-width: 0; }
.qz-q { font-size: 1.25rem !important; font-weight: 600; text-align: center; min-height: 72px !important; padding: 16px !important; border-radius: 14px !important; }
.qz-img { margin: 14px 0; text-align: center; }
.qz-img img { max-width: 100%; max-height: 200px; border-radius: 12px; box-shadow: var(--sh-sm); }
.qz-drop { font: inherit; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; border: 2px dashed var(--border-strong); border-radius: 14px; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: .9rem; }
.qz-drop:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.qz-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qz-a { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 14px; color: #fff; min-height: 64px; transition: box-shadow .12s; }
.qz-a .k { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-weight: 700; flex: none; }
.qz-a input { flex: 1; background: rgba(255, 255, 255, .14) !important; border: 1px solid rgba(255, 255, 255, .25) !important; color: #fff !important; box-shadow: none !important; font-weight: 600; height: 42px !important; }
.qz-a input::placeholder { color: rgba(255, 255, 255, .7); }
.qz-a input:focus { background: rgba(255, 255, 255, .22) !important; border-color: #fff !important; }
.qz-ok { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); background: transparent; color: transparent; cursor: pointer; display: grid; place-items: center; flex: none; padding: 0; }
.qz-ok .ic { width: 20px; height: 20px; stroke-width: 3; }
.qz-ok:hover { background: rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .7); }
.qz-a.ok { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--green); }
.qz-a.ok .qz-ok { background: #fff; border-color: #fff; color: var(--green); }
@media (max-width: 760px) { .qz { grid-template-columns: 1fr; } .qz-list { max-height: 180px; } .qz-answers { grid-template-columns: 1fr; } }

/* Bilder & Extras im Spiel */
.stage h1.sm { font-size: clamp(1.4rem, 3vw, 2.4rem); }
.stage .qimg { max-height: 32vh; max-width: min(90%, 900px); border-radius: 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); background: #fff; }
.stage.embed .qimg { max-height: 220px; }
.stage-top .timer-ring { width: 72px; height: 72px; }
.stage-top .timer-ring > div { width: 58px; height: 58px; font-size: 1.5rem; }
.stage-top .pill.gold { background: #f59e0b; color: #1c1917; }
.answers.tf { grid-template-columns: 1fr 1fr; }
.qimg-l { width: 100%; max-height: 34vh; object-fit: contain; border-radius: 14px; background: var(--surface); box-shadow: var(--sh-sm); }
