/* Tutor — monochrom, clean, futuristisch */
@font-face { font-family: "Geist"; src: url("/tutor/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/tutor/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #ffffff; --bg2: #fafafa; --panel: #ffffff; --panel2: #f4f4f5; --line: #e6e6e8; --line2: #d4d4d8;
  --ink: #0a0a0a; --ink2: #3f3f46; --mute: #71717a; --faint: #a1a1aa;
  --inv: #0a0a0a; --onInv: #ffffff;
  --ok: #0a0a0a; --bad: #0a0a0a;
  --dot: rgba(0,0,0,.09);
  --shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 30px -12px rgba(0,0,0,.18);
  --r: 14px; --r2: 22px;
  --ease: cubic-bezier(.16,1,.3,1);
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg2: #060607; --panel: #0b0b0c; --panel2: #141416; --line: #1f1f22; --line2: #2e2e33;
    --ink: #f5f5f5; --ink2: #d4d4d8; --mute: #8b8b93; --faint: #5b5b63;
    --inv: #f5f5f5; --onInv: #000000; --dot: rgba(255,255,255,.08);
    --shadow: 0 1px 0 rgba(255,255,255,.03), 0 10px 40px -16px rgba(0,0,0,.9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg2: #060607; --panel: #0b0b0c; --panel2: #141416; --line: #1f1f22; --line2: #2e2e33;
  --ink: #f5f5f5; --ink2: #d4d4d8; --mute: #8b8b93; --faint: #5b5b63;
  --inv: #f5f5f5; --onInv: #000000; --dot: rgba(255,255,255,.08);
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 10px 40px -16px rgba(0,0,0,.9);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--inv); color: var(--onInv); }
.mono { font-family: var(--mono); }
.eyebrow { font: 500 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Punktraster */
.dots { background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 22px 22px; }
.dots-fade { -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 72%); mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 72%); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font-weight: 550; font-size: 14px; cursor: pointer; transition: transform .15s var(--ease), background .15s, border-color .15s, opacity .15s; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
.btn.primary:hover { opacity: .88; }
.btn.lg { height: 50px; padding: 0 24px; font-size: 15.5px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--panel2); border-color: transparent; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn .k { font: 500 11px var(--mono); color: var(--faint); border: 1px solid var(--line2); border-radius: 5px; padding: 1px 5px; }
.btn.primary .k { color: var(--onInv); border-color: color-mix(in srgb, var(--onInv) 40%, transparent); opacity: .7; }
.iconbtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink2); transition: background .15s; }
.iconbtn:hover { background: var(--panel2); color: var(--ink); }
.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); font-size: 12.5px; font-weight: 550; color: var(--ink2); cursor: pointer; transition: all .15s var(--ease); white-space: nowrap; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
.tag { display: inline-flex; align-items: center; gap: 5px; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: var(--panel2); color: var(--ink2); }

/* Karten */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card.raise { box-shadow: var(--shadow); }

/* Eingaben */
.field { width: 100%; border: 1px solid var(--line2); background: var(--panel); border-radius: 12px; padding: 11px 14px; outline: none; transition: border-color .15s; }
.field:focus { border-color: var(--ink); }
textarea.field { resize: vertical; min-height: 90px; line-height: 1.5; }
select.field { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

/* Einblenden */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.96); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blinkc { 50% { opacity: 0; } }
.anim-in { animation: fadeUp .45s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } .reveal { opacity: 1; transform: none; } }

/* ============ LANDING ============ */
.nav { position: sticky; top: 0; z-index: 40; height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; font-size: 17px; text-decoration: none; }
.brand .mini { width: 28px; height: 28px; }
.brand small { font: 500 10px var(--mono); letter-spacing: .1em; color: var(--mute); border: 1px solid var(--line2); border-radius: 5px; padding: 2px 5px; text-transform: uppercase; }
.nav .links { display: flex; gap: 4px; margin-left: 16px; }
.nav .links a { text-decoration: none; color: var(--mute); font-size: 14px; padding: 6px 10px; border-radius: 8px; }
.nav .links a:hover { color: var(--ink); background: var(--panel2); }
.nav .spacer { flex: 1; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hero { position: relative; padding: 70px 0 40px; text-align: center; overflow: hidden; }
.hero .bgdots { position: absolute; inset: -40px 0 0 0; pointer-events: none; }
.hero-face { width: 168px; height: 168px; margin: 0 auto 26px; position: relative; }
.hero h1 { font-size: clamp(42px, 7.2vw, 84px); line-height: .98; letter-spacing: -.045em; font-weight: 650; margin: 14px auto 0; max-width: 960px; }
.hero h1 .soft { color: var(--faint); }
.hero p.sub { font-size: clamp(17px, 2vw, 20px); color: var(--mute); max-width: 620px; margin: 22px auto 0; line-height: 1.5; }
.greet { font: 500 15px var(--mono); color: var(--ink2); min-height: 22px; }
.greet .cur { display: inline-block; width: 8px; height: 17px; background: var(--ink); vertical-align: -3px; margin-left: 2px; animation: blinkc 1s steps(1) infinite; }

.dropzone { position: relative; max-width: 720px; margin: 36px auto 0; border: 1.5px dashed var(--line2); border-radius: var(--r2); background: var(--panel); padding: 26px; text-align: left; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; box-shadow: var(--shadow); }
.dropzone.drag { border-color: var(--ink); transform: scale(1.01); }
.dropzone .row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dropzone .file-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--inv); color: var(--onInv); display: grid; place-items: center; flex: none; }
.dropzone .file-ico .ico { width: 24px; height: 24px; }
.dropzone .t { flex: 1; min-width: 200px; }
.dropzone .t b { display: block; font-size: 17px; letter-spacing: -.01em; }
.dropzone .t span { color: var(--mute); font-size: 14px; }
.dropzone .meta { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; gap: 14px; flex-wrap: wrap; font: 500 12px var(--mono); color: var(--mute); }
.dropzone .meta i { font-style: normal; display: inline-flex; gap: 6px; align-items: center; }
.dropzone .meta i::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.trybar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

.section { padding: 110px 0 0; }
.section h2 { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -.035em; line-height: 1.02; font-weight: 650; margin: 12px 0 0; max-width: 760px; }
.section p.lead { color: var(--mute); font-size: 18px; max-width: 600px; margin: 16px 0 0; }
.center { text-align: center; } .center h2, .center p.lead { margin-left: auto; margin-right: auto; }

/* Pinnwand */
.board { position: relative; margin-top: 48px; border: 1px solid var(--line); border-radius: 28px; padding: 34px; background: var(--bg2); overflow: hidden; }
.board::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 22px 22px; pointer-events: none; }
.pins { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; }
.pin { position: relative; grid-column: span 4; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 20px; box-shadow: var(--shadow); transform: rotate(var(--rot, 0deg)); transition: transform .35s var(--ease), box-shadow .35s; min-height: 210px; display: flex; flex-direction: column; }
.pin:hover { transform: rotate(0deg) translateY(-4px); }
.pin::before { content: ""; position: absolute; top: 12px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--ink); box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.pin.big { grid-column: span 8; grid-row: span 2; min-height: 440px; }
.pin.wide { grid-column: span 6; }
.pin h3 { margin: 18px 0 6px; font-size: 21px; letter-spacing: -.02em; line-height: 1.15; }
.pin p { margin: 0; color: var(--mute); font-size: 14.5px; }
.pin .demo { margin-top: auto; padding-top: 16px; }
.pin .num { font: 500 11px var(--mono); color: var(--faint); letter-spacing: .1em; }

/* Mini-Demos in den Pins */
.mini-quiz .opt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font-size: 13.5px; margin-top: 6px; background: var(--panel); }
.mini-quiz .opt .l { font: 600 11px var(--mono); width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line2); display: grid; place-items: center; }
.mini-quiz .opt.ok { border-color: var(--ink); background: var(--inv); color: var(--onInv); }
.mini-quiz .opt.ok .l { border-color: var(--onInv); }
.flip { perspective: 900px; height: 118px; }
.flip .in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: flipit 6s var(--ease) infinite; }
.flip .f, .flip .b { position: absolute; inset: 0; backface-visibility: hidden; border: 1px solid var(--line2); border-radius: 12px; display: grid; place-items: center; padding: 14px; text-align: center; font-size: 14px; background: var(--panel); }
.flip .b { transform: rotateY(180deg); background: var(--inv); color: var(--onInv); }
@keyframes flipit { 0%, 40% { transform: rotateY(0); } 50%, 90% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }
.wave { display: flex; align-items: center; gap: 3px; height: 46px; }
.wave i { flex: 1; background: var(--ink); border-radius: 2px; height: 20%; animation: wv 1.2s ease-in-out infinite; }
@keyframes wv { 0%,100% { height: 18%; } 50% { height: var(--h, 80%); } }
.pathmini { display: flex; flex-direction: column; gap: 7px; }
.pathmini div { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.pathmini span { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line2); flex: none; display: grid; place-items: center; font-size: 10px; }
.pathmini .d span { background: var(--inv); border-color: var(--inv); color: var(--onInv); }
.pathmini .c span { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 15%, transparent); }

.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.step3 { border-top: 1px solid var(--ink); padding-top: 18px; }
.step3 .n { font: 500 13px var(--mono); color: var(--mute); }
.step3 h3 { font-size: 22px; letter-spacing: -.02em; margin: 10px 0 6px; }
.step3 p { color: var(--mute); margin: 0; }

.privacy { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center; }
.privacy ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.privacy li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.privacy li b { display: block; }
.privacy li span { color: var(--mute); font-size: 14.5px; }
.lock { width: 34px; height: 34px; border-radius: 10px; background: var(--inv); color: var(--onInv); display: grid; place-items: center; flex: none; }

.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 44px; max-width: 880px; margin-left: auto; margin-right: auto; text-align: left; }
.plan { border: 1px solid var(--line); border-radius: 22px; padding: 28px; background: var(--panel); position: relative; }
.plan.pro { border-color: var(--ink); box-shadow: var(--shadow); }
.plan .badge { position: absolute; top: -11px; right: 22px; background: var(--inv); color: var(--onInv); font: 500 11px var(--mono); letter-spacing: .08em; padding: 5px 9px; border-radius: 999px; text-transform: uppercase; }
.plan h3 { margin: 0; font-size: 20px; }
.plan .price { font-size: 46px; font-weight: 650; letter-spacing: -.04em; margin: 12px 0 2px; }
.plan .price small { font-size: 15px; color: var(--mute); font-weight: 450; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 9px; font-size: 14.5px; }
.plan li { display: flex; gap: 10px; } .plan li::before { content: "→"; font-family: var(--mono); color: var(--mute); }
.fineprint { font: 500 12px var(--mono); color: var(--mute); margin-top: 18px; text-align: center; }

.faq { max-width: 760px; margin: 40px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-weight: 600; font-size: 17px; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--mute); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--mute); margin: 10px 0 0; }

.founder { display: flex; gap: 22px; align-items: flex-start; max-width: 760px; margin: 0 auto; border: 1px solid var(--line); border-radius: 22px; padding: 28px; background: var(--panel); }
.founder p { margin: 0 0 10px; font-size: 17px; line-height: 1.6; }
.founder .sig { font: 500 13px var(--mono); color: var(--mute); }

.final { padding: 120px 0 90px; text-align: center; }
.final .bigface { width: 120px; height: 120px; margin: 0 auto 26px; }
footer.foot { border-top: 1px solid var(--line); padding: 28px 24px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; font-size: 13.5px; color: var(--mute); }
footer.foot a { color: var(--mute); text-decoration: none; margin-right: 14px; } footer.foot a:hover { color: var(--ink); }

/* ============ APP ============ */
.app { display: grid; grid-template-columns: 268px 1fr; height: 100vh; height: 100dvh; }
.side { border-right: 1px solid var(--line); background: var(--bg2); display: flex; flex-direction: column; min-height: 0; }
.side .top { padding: 14px 14px 8px; display: flex; align-items: center; gap: 8px; }
.side .scroll { flex: 1; overflow: auto; padding: 6px 10px 14px; }
.side .grp { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 14px 8px 6px; }
.doc-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--ink2); position: relative; }
.doc-item:hover { background: var(--panel2); }
.doc-item.on { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--line); font-weight: 550; }
.doc-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-item .pg { font: 500 11px var(--mono); color: var(--faint); }
.doc-item .del { opacity: 0; } .doc-item:hover .del { opacity: 1; }
.side .bottom { border-top: 1px solid var(--line); padding: 12px 14px; display: grid; gap: 10px; }
.quota { display: grid; gap: 7px; }
.quota .row { display: flex; justify-content: space-between; font: 500 12px var(--mono); color: var(--mute); }
.quota .bar { height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; }
.quota .bar i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .6s var(--ease); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: 58px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 15.5px; font-weight: 600; margin: 0; letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; font-size: 13px; font-weight: 550; color: var(--mute); white-space: nowrap; transition: color .15s, background .2s var(--ease); }
.tab:hover { color: var(--ink); }
.tab.on { background: var(--inv); color: var(--onInv); }
.tab .ico { width: 15px; height: 15px; }
.view { flex: 1; overflow: auto; min-height: 0; position: relative; }
.view-in { max-width: 1060px; margin: 0 auto; padding: 28px 26px 80px; animation: fadeIn .25s ease both; }
.vh { display: flex; align-items: flex-end; gap: 14px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.vh h2 { font-size: 30px; letter-spacing: -.03em; margin: 6px 0 0; line-height: 1.1; }
.vh p { color: var(--mute); margin: 6px 0 0; }

/* Leerer Zustand / Start */
.empty { text-align: center; padding: 70px 20px; }
.empty .face { width: 120px; height: 120px; margin: 0 auto 20px; }
.empty h2 { font-size: 30px; letter-spacing: -.03em; margin: 0; }
.empty p { color: var(--mute); max-width: 460px; margin: 10px auto 22px; }

/* Übersicht = Pinnwand des Dokuments */
.hub { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { grid-column: span 2; position: relative; border: 1px solid var(--line); background: var(--panel); border-radius: 18px; padding: 20px; cursor: pointer; transition: transform .25s var(--ease), border-color .2s, box-shadow .25s; text-align: left; display: flex; flex-direction: column; gap: 6px; min-height: 150px; }
.tile:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: var(--shadow); }
.tile.big { grid-column: span 4; grid-row: span 2; }
.tile.half { grid-column: span 3; }
.tile .ti { width: 38px; height: 38px; border-radius: 11px; background: var(--panel2); display: grid; place-items: center; margin-bottom: 8px; }
.tile.dark { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
.tile.dark .ti { background: color-mix(in srgb, var(--onInv) 14%, transparent); }
.tile.dark p { color: color-mix(in srgb, var(--onInv) 65%, transparent); }
.tile h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.tile p { margin: 0; color: var(--mute); font-size: 14px; }
.tile .foot { margin-top: auto; display: flex; gap: 8px; align-items: center; font: 500 11.5px var(--mono); color: var(--faint); padding-top: 10px; }
.tile.dark .foot { color: color-mix(in srgb, var(--onInv) 55%, transparent); }
.ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; background: conic-gradient(var(--ink) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; }
.ring > div { width: 62px; height: 62px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font: 650 18px var(--sans); letter-spacing: -.02em; }
.tile.dark .ring { background: conic-gradient(var(--onInv) calc(var(--p) * 1%), color-mix(in srgb, var(--onInv) 20%, transparent) 0); }
.tile.dark .ring > div { background: var(--inv); }

/* ---- Tutor (Chat + Tafel) ---- */
.tutor { display: grid; grid-template-columns: minmax(330px, 420px) 1fr; height: 100%; min-height: 0; }
.chatcol { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; background: var(--bg2); }
.chathead { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chathead .face { width: 44px; height: 44px; flex: none; }
.chathead b { display: block; font-size: 15px; } .chathead span { font-size: 12.5px; color: var(--mute); }
.msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 92%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; animation: fadeUp .3s var(--ease) both; white-space: pre-wrap; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--inv); color: var(--onInv); border-bottom-right-radius: 5px; }
.msg.ai { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg .boardlink { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font: 500 12px var(--mono); border: 1px solid var(--line2); border-radius: 8px; padding: 4px 8px; cursor: pointer; background: var(--panel2); }
.msg .acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--mute); animation: wv2 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes wv2 { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 10px; }
.composer { border-top: 1px solid var(--line); padding: 12px; background: var(--bg2); }
.composer .box { border: 1px solid var(--line2); border-radius: 16px; background: var(--panel); padding: 8px 8px 8px 14px; display: flex; gap: 8px; align-items: flex-end; transition: border-color .15s; }
.composer .box:focus-within { border-color: var(--ink); }
.composer textarea { flex: 1; border: 0; outline: 0; background: transparent; resize: none; max-height: 160px; min-height: 24px; padding: 6px 0; font-size: 14.5px; line-height: 1.5; }
.composer .opts { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--mute); }
.send { width: 36px; height: 36px; border-radius: 11px; border: 0; background: var(--inv); color: var(--onInv); display: grid; place-items: center; cursor: pointer; flex: none; }
.send[disabled] { opacity: .35; }

.boardcol { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.boardbar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.boardbar .tt { font-weight: 600; font-size: 14.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boardbar .cnt { font: 500 12px var(--mono); color: var(--mute); }
.boardarea { flex: 1; overflow: auto; position: relative; }
.boardarea.dots { background-color: var(--bg); }

/* Tafel-Inhalt */
.tafel { max-width: 780px; margin: 0 auto; padding: 30px 30px 60px; font-size: 15.5px; line-height: 1.65; }
.tafel > *:first-child { margin-top: 0; }
.tafel h2.tt { font-size: 26px; letter-spacing: -.03em; margin: 0 0 18px; line-height: 1.15; }
.tafel h3 { font-size: 17px; margin: 22px 0 8px; letter-spacing: -.01em; }
.tafel p { margin: 8px 0; }
.tafel ul, .tafel ol { padding-left: 22px; margin: 8px 0; }
.tafel li { margin: 4px 0; }
.tafel table { border-collapse: separate; border-spacing: 0; width: 100%; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-variant-numeric: tabular-nums; background: var(--panel); font-size: 14.5px; }
.tafel th, .tafel td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.tafel th { background: var(--panel2); font-weight: 600; font-size: 13px; }
.tafel tr:last-child td { border-bottom: 0; }
.tafel td.n, .tafel th.n { text-align: right; font-family: var(--mono); font-size: 13.5px; }
.tafel .example, .tafel .step, .tafel .calc, .tafel .result, .tafel .warn, .tafel .source, .tafel .bs, .tafel .vs, .tafel .flow, .tafel .kpis { animation: fadeUp .4s var(--ease) both; }
.tafel .example { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 14px 0; background: var(--panel); }
.tafel .example::before { content: "BEISPIEL"; display: block; font: 500 10.5px var(--mono); letter-spacing: .12em; color: var(--mute); margin-bottom: 6px; }
.tafel .step { border-left: 2px solid var(--ink); padding: 4px 0 4px 14px; margin: 12px 0; }
.tafel .calc { font: 14px/1.95 var(--mono); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 12px 0; white-space: pre-wrap; overflow-x: auto; }
.tafel .result { background: var(--inv); color: var(--onInv); border-radius: 12px; padding: 12px 16px; margin: 14px 0; font-weight: 600; }
.tafel .warn { border: 1px dashed var(--ink); border-radius: 12px; padding: 12px 16px; margin: 14px 0; }
.tafel .warn::before { content: "ACHTUNG · TYPISCHER FEHLER"; display: block; font: 500 10.5px var(--mono); letter-spacing: .12em; margin-bottom: 5px; }
.tafel .source { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--line); font: 500 12px var(--mono); color: var(--mute); }
.tafel .kpis { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.tafel .kpi { flex: 1; min-width: 140px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); }
.tafel .kpi small { display: block; font: 500 11px var(--mono); letter-spacing: .06em; color: var(--mute); text-transform: uppercase; }
.tafel .kpi b { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tafel .tkonto { display: inline-block; vertical-align: top; min-width: 250px; margin: 10px 14px 10px 0; background: var(--panel); border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line); }
.tafel .tkonto .k { font-weight: 700; text-align: center; border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.tafel .tkonto .s { display: flex; }
.tafel .tkonto .s > div { flex: 1; padding: 6px 8px; font: 13px/1.8 var(--mono); white-space: pre-wrap; }
.tafel .tkonto .s > div:first-child { border-right: 2px solid var(--ink); }
.tafel .bs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 12px 0; font-weight: 600; background: var(--panel); }
.tafel .bs span { font: 500 12px var(--mono); color: var(--mute); text-transform: uppercase; letter-spacing: .1em; }
.tafel .bs em { margin-left: auto; font-style: normal; font-family: var(--mono); }
.tafel .flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.tafel .flow .box { border: 1px solid var(--ink); border-radius: 10px; padding: 8px 12px; background: var(--panel); font-weight: 550; font-size: 14px; }
.tafel .flow .arrow { color: var(--mute); font-size: 18px; }
.tafel .vs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.tafel .vs > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); }
.tafel svg { width: 100%; height: auto; max-height: 420px; display: block; margin: 14px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.tafel svg text { fill: var(--ink); font-family: var(--sans); }
.tafel svg line, .tafel svg path, .tafel svg polyline, .tafel svg rect, .tafel svg circle, .tafel svg ellipse, .tafel svg polygon { stroke: var(--ink); fill: none; stroke-width: 2; }
.tafel svg .ax { stroke: var(--mute); stroke-width: 1.5; }
.tafel svg .l1 { stroke: var(--ink); stroke-width: 3; }
.tafel svg .l2 { stroke: var(--ink2); stroke-width: 2.5; stroke-dasharray: 7 6; }
.tafel svg .f1 { fill: var(--ink); fill-opacity: .14; stroke: none; }
.tafel svg .f2 { fill: var(--ink); fill-opacity: .06; stroke: none; }
.tafel svg .dot { fill: var(--ink); stroke: none; }
.tafel svg text { stroke: none; }
.tafel svg path.l1, .tafel svg polyline.l1 { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 1.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.tafel code { font: 13px var(--mono); background: var(--panel2); padding: 1px 5px; border-radius: 5px; }
.tafel .empty-board { text-align: center; color: var(--mute); padding: 90px 20px; }
.tafel .empty-board .face { width: 90px; height: 90px; margin: 0 auto 16px; opacity: .9; }

/* ---- Quiz ---- */
.qwrap { max-width: 760px; margin: 0 auto; }
.qtop { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.qprog { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.qprog i { display: block; height: 100%; background: var(--ink); transition: width .5s var(--ease); }
.qcount { font: 500 12.5px var(--mono); color: var(--mute); }
.qcard { border: 1px solid var(--line); border-radius: 22px; background: var(--panel); padding: 28px; box-shadow: var(--shadow); animation: pop .35s var(--ease) both; }
.qcard .qtype { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.qcard .q { font-size: 21px; font-weight: 600; letter-spacing: -.015em; line-height: 1.35; margin: 14px 0 20px; }
.opts { display: grid; gap: 9px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line2); background: var(--panel); border-radius: 14px; padding: 13px 15px; cursor: pointer; transition: border-color .15s, background .15s, transform .15s var(--ease); font-size: 15px; line-height: 1.4; }
.opt:hover { border-color: var(--ink); }
.opt .key { font: 600 12px var(--mono); width: 26px; height: 26px; border: 1px solid var(--line2); border-radius: 8px; display: grid; place-items: center; flex: none; color: var(--mute); }
.opt.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt.sel .key { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
.opt.right { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
.opt.right .key { border-color: var(--onInv); color: var(--onInv); background: transparent; }
.opt.wrong { border-style: dashed; border-color: var(--ink); opacity: .75; animation: shake .4s; }
.opt.wrong .key { text-decoration: line-through; }
.opt .why { display: block; font-size: 13px; opacity: .8; margin-top: 4px; }
.opt.locked { cursor: default; }
.opt.locked:hover { transform: none; }
.tf { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tf .opt { justify-content: center; font-weight: 600; padding: 20px; font-size: 17px; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match .col { display: grid; gap: 8px; align-content: start; }
.mi { border: 1px solid var(--line2); border-radius: 12px; padding: 11px 13px; font-size: 14px; cursor: pointer; background: var(--panel); transition: all .15s var(--ease); position: relative; line-height: 1.4; }
.mi:hover { border-color: var(--ink); }
.mi.pick { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mi.done { background: var(--panel2); cursor: default; }
.mi .badge { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--inv); color: var(--onInv); font: 600 11px var(--mono); display: grid; place-items: center; }
.mi.right { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
.mi.wrong { border-style: dashed; border-color: var(--ink); }
.order { display: grid; gap: 8px; }
.oi { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line2); border-radius: 12px; padding: 11px 13px; background: var(--panel); cursor: grab; user-select: none; font-size: 14.5px; transition: transform .2s var(--ease), border-color .15s, box-shadow .15s; touch-action: none; }
.oi .grip { font: 600 12px var(--mono); color: var(--mute); width: 22px; }
.oi .mv { margin-left: auto; display: flex; gap: 2px; }
.oi.dragging { box-shadow: var(--shadow); border-color: var(--ink); z-index: 2; position: relative; cursor: grabbing; }
.oi.right { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
.oi.right .grip { color: var(--onInv); }
.oi.wrong { border-style: dashed; border-color: var(--ink); }
.cloze { font-size: 18px; line-height: 2.1; }
.gap { display: inline-flex; min-width: 110px; height: 36px; vertical-align: middle; align-items: center; justify-content: center; border-bottom: 2px solid var(--ink); margin: 0 4px; padding: 0 8px; font-weight: 600; cursor: pointer; border-radius: 6px 6px 0 0; background: var(--panel2); font-size: 15px; }
.gap.active { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.gap.right { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
.gap.wrong { text-decoration: line-through; }
.bank { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.bank .chip { height: 34px; font-size: 14px; }
.bank .chip.used { opacity: .25; pointer-events: none; }
.numrow { display: flex; gap: 10px; align-items: center; }
.numrow input { font: 600 22px var(--mono); max-width: 260px; }
.numrow .unit { font: 600 18px var(--mono); color: var(--mute); }
.feedback { margin-top: 18px; border-radius: 16px; padding: 16px 18px; animation: fadeUp .35s var(--ease) both; border: 1px solid var(--line); background: var(--panel2); }
.feedback .verdict { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.feedback .verdict .badge { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--inv); color: var(--onInv); }
.feedback.bad .verdict .badge { background: transparent; color: var(--ink); border: 1.5px dashed var(--ink); }
.feedback p { margin: 8px 0 0; color: var(--ink2); }
.feedback .sol { font: 13.5px/1.8 var(--mono); white-space: pre-wrap; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.feedback .src { font: 500 12px var(--mono); color: var(--mute); margin-top: 8px; }
.qactions { display: flex; gap: 10px; margin-top: 20px; align-items: center; flex-wrap: wrap; }
.qactions .sp { flex: 1; }
.conf { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--mute); }
.result-hero { text-align: center; padding: 30px 10px; }
.result-hero .score { font-size: 84px; font-weight: 650; letter-spacing: -.05em; line-height: 1; }
.result-hero .face { width: 110px; height: 110px; margin: 0 auto 12px; }
.qlist { display: grid; gap: 8px; margin-top: 22px; text-align: left; }
.qlist div { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14px; background: var(--panel); }
.qlist .m { font: 600 12px var(--mono); width: 22px; flex: none; }

/* Einstellungen (Quiz erzeugen etc.) */
.setup { border: 1px solid var(--line); border-radius: 22px; background: var(--panel); padding: 26px; }
.setup .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.setup label.l { display: block; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
.setup .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.list { display: grid; gap: 10px; }
.li { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--panel); cursor: pointer; transition: border-color .15s, transform .2s var(--ease); }
.li:hover { border-color: var(--ink); transform: translateY(-1px); }
.li .gr { flex: 1; min-width: 0; }
.li b { display: block; font-size: 15px; } .li span { color: var(--mute); font-size: 13px; }
.li .sc { font: 600 14px var(--mono); }

/* Karteikarten */
.fc-stage { max-width: 640px; margin: 10px auto 0; }
.fc { perspective: 1400px; height: 330px; cursor: pointer; }
.fc .in { position: relative; width: 100%; height: 100%; transition: transform .55s var(--ease); transform-style: preserve-3d; }
.fc.flipped .in { transform: rotateY(180deg); }
.fc .f, .fc .b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 24px; border: 1px solid var(--line2); background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 34px; font-size: 21px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; box-shadow: var(--shadow); }
.fc .b { transform: rotateY(180deg); background: var(--inv); color: var(--onInv); font-weight: 500; font-size: 18px; }
.fc .hint { position: absolute; bottom: 16px; font: 500 11px var(--mono); letter-spacing: .1em; opacity: .5; text-transform: uppercase; }
.fc .pg { position: absolute; top: 16px; right: 18px; font: 500 11px var(--mono); opacity: .5; }
.rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.rate .btn { height: 52px; flex-direction: column; gap: 0; border-radius: 14px; }
.rate .btn small { font: 500 10.5px var(--mono); color: var(--mute); }
.rate .btn.primary small { color: color-mix(in srgb, var(--onInv) 65%, transparent); }
.deckstats { display: flex; gap: 10px; justify-content: center; margin: 14px 0 0; font: 500 12px var(--mono); color: var(--mute); }

/* Podcast */
.pod { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.cover { aspect-ratio: 1; border-radius: 24px; background: var(--inv); color: var(--onInv); position: relative; overflow: hidden; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.cover::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--onInv) 18%, transparent) 1px, transparent 1.2px); background-size: 16px 16px; }
.cover > * { position: relative; }
.cover h3 { margin: 0; font-size: 24px; letter-spacing: -.03em; line-height: 1.1; }
.cover .wave i { background: var(--onInv); }
.player { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.play { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--inv); color: var(--onInv); display: grid; place-items: center; cursor: pointer; flex: none; transition: transform .15s var(--ease); }
.play:hover { transform: scale(1.05); }
.play .ico { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.ptrack { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; cursor: pointer; }
.ptrack i { display: block; height: 100%; background: var(--ink); width: 0; }
.script { display: grid; gap: 4px; max-height: 62vh; overflow: auto; padding-right: 6px; }
.line { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 9px 12px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.line:hover { background: var(--panel2); }
.line .who { font: 600 12px var(--mono); color: var(--mute); padding-top: 2px; }
.line.now { background: var(--inv); color: var(--onInv); }
.line.now .who { color: color-mix(in srgb, var(--onInv) 70%, transparent); }

/* Lernpfad */
.path { position: relative; display: grid; gap: 14px; }
.path::before { content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; background: var(--line); }
.chap { position: relative; display: flex; gap: 16px; align-items: flex-start; }
.chap .node { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--line2); background: var(--bg); display: grid; place-items: center; font: 600 15px var(--mono); flex: none; z-index: 1; transition: all .3s var(--ease); }
.chap.done .node { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
.chap.cur .node { border-color: var(--ink); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ink) 10%, transparent); }
.chap .body { flex: 1; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: var(--panel); cursor: pointer; transition: border-color .15s, transform .2s var(--ease); }
.chap .body:hover { border-color: var(--ink); transform: translateX(3px); }
.chap .body h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.chap .body p { margin: 4px 0 0; color: var(--mute); font-size: 14px; }
.chap .terms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.weight { display: inline-flex; gap: 3px; } .weight i { width: 6px; height: 6px; border-radius: 50%; background: var(--line2); } .weight i.on { background: var(--ink); }

/* Lektion */
.lesson { max-width: 820px; margin: 0 auto; }
.lsteps { display: flex; gap: 6px; margin-bottom: 18px; }
.lsteps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.lsteps i.on { background: var(--ink); }
.lslide { border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; animation: pop .35s var(--ease) both; }
.lslide .tafel { padding: 28px 30px 26px; }
.lcheck { border-top: 1px solid var(--line); padding: 22px 28px; background: var(--bg2); }

/* Lernzettel */
.mindmap { width: 100%; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); overflow: auto; }
.mindmap svg { display: block; }
.mindmap text { fill: var(--ink); font-family: var(--sans); }
.terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.term { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--panel); }
.term b { display: block; margin-bottom: 4px; }
.term span { color: var(--mute); font-size: 14px; }

/* Lade-Zustand */
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 90px 20px; text-align: center; }
.loading .face { width: 100px; height: 100px; }
.loading b { font-size: 18px; }
.loading .sub { color: var(--mute); font: 500 13px var(--mono); min-height: 20px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line2); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }

/* Toast + Modal */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; }
.toast { background: var(--inv); color: var(--onInv); padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); animation: fadeUp .3s var(--ease) both; max-width: 90vw; }
.modal-bg { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 90; display: grid; place-items: center; padding: 16px; animation: fadeIn .2s both; }
.modal { width: min(520px, 100%); background: var(--panel); border: 1px solid var(--line2); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); animation: pop .3s var(--ease) both; max-height: 90vh; overflow: auto; }
.modal h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.modal p { color: var(--mute); margin: 0 0 16px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* Ingest-Fortschritt */
.ingest { max-width: 520px; margin: 80px auto; text-align: center; }
.ingest .face { width: 110px; height: 110px; margin: 0 auto 18px; }
.ingest .bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 18px 0 8px; }
.ingest .bar i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .3s; }

/* Mobile */
.mob-only { display: none; }
@media (max-width: 980px) {
  .pins { grid-template-columns: repeat(2, 1fr); }
  .pin, .pin.big, .pin.wide { grid-column: span 2; grid-row: auto; min-height: 0; transform: none; }
  .hub { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile.big, .tile.half { grid-column: span 2; grid-row: auto; }
  .tutor { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .tutor .boardcol { position: fixed; inset: 0; z-index: 60; background: var(--bg); transform: translateY(100%); transition: transform .4s var(--ease); }
  .tutor.showboard .boardcol { transform: none; }
  .mob-only { display: inline-grid; }
  .pod { grid-template-columns: 1fr; }
  .cover { max-width: 320px; }
  .privacy { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 86vw; max-width: 320px; z-index: 70; transform: translateX(-100%); transition: transform .35s var(--ease); box-shadow: var(--shadow); }
  .app.sideopen .side { transform: none; }
  .topbar { padding: 0 10px; gap: 6px; }
  .topbar h1 { display: none; }
  .tabs { margin-left: 0; flex: 1; }
  .tab span { display: none; } .tab { padding: 0 11px; }
  .view-in { padding: 20px 16px 80px; }
  .nav .links { display: none; }
  .nav { padding: 0 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding-top: 40px; }
  .hero-face { width: 128px; height: 128px; }
  .steps3, .pricing { grid-template-columns: 1fr; }
  .board { padding: 18px; border-radius: 22px; }
  .match { gap: 8px; } .mi { font-size: 13px; padding: 9px 10px; }
  .qcard { padding: 20px; }
  .qcard .q { font-size: 18px; }
  .rate { grid-template-columns: repeat(2, 1fr); }
  .founder { flex-direction: column; }
  .tafel { padding: 22px 16px 60px; }
  .tafel .vs { grid-template-columns: 1fr; }
  .section { padding-top: 80px; }
}

/* ---- Ergänzungen ---- */
.msg { white-space: normal; }
.cite { font: 500 11.5px var(--mono); padding: 1px 6px; border-radius: 6px; background: var(--panel2); color: var(--ink2); margin: 0 2px; white-space: nowrap; }
.msg.me .cite { background: color-mix(in srgb, var(--onInv) 15%, transparent); color: inherit; }
.mob-menu { display: none; }
.qcard.compact { box-shadow: none; border: 0; padding: 0; background: transparent; animation: none; }
.qcard.compact .q { font-size: 18px; margin-top: 0; }
.tile[disabled] { pointer-events: none; }
.doclist { display: grid; gap: 2px; }
.side .brand .mini, .nav .brand .mini { display: inline-block; }
.tafel br + br { display: none; }
.opt .tx { flex: 1; }
.empty .face, .loading .face, .ingest .face { display: block; }
@media (max-width: 760px) { .mob-menu { display: inline-grid; } }
@media print {
  .side, .topbar, .vh .btn, .vh button, .toasts { display: none !important; }
  .app { display: block; height: auto; } .view { overflow: visible; } body { overflow: visible !important; }
  .card { break-inside: avoid; }
}
a.tab, a.doc-item, a.btn, a.chip, a.tile, .brand { text-decoration: none; }
.doclist { grid-template-columns: minmax(0, 1fr); }
.side .scroll { overflow-x: hidden; }

.dropzone { display: block; cursor: pointer; }
.vh h2, .hero h1, .empty h2, .pin h3, .tile h3 { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }

/* ================= BWL MAX · Bewegung ================= */
.scrollbar { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); z-index: 50; }
.pill-tag { display: inline-flex; align-items: center; gap: 8px; margin: 0 auto 14px; padding: 6px 12px 6px 10px; border: 1px solid var(--line2); border-radius: 999px; background: var(--panel); font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
.pill-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ink) 50%, transparent); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ink) 45%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }
.hero .greet { margin-top: 2px; }
.hero .spot { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), color-mix(in srgb, var(--ink) 7%, transparent), transparent 70%); transition: opacity .4s; }
.hero .bgdots { -webkit-mask-image: radial-gradient(520px circle at var(--mx, 50%) var(--my, 30%), #000 0%, rgba(0,0,0,.35) 45%, transparent 75%); mask-image: radial-gradient(520px circle at var(--mx, 50%) var(--my, 30%), #000 0%, rgba(0,0,0,.35) 45%, transparent 75%); }

/* Erscheinen beim Laden */
[data-in] { opacity: 0; transform: translateY(18px); filter: blur(10px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
[data-in].in { opacity: 1; transform: none; filter: none; }
.nav[data-in] { transform: translateY(-100%); filter: none; }
.nav[data-in].in { transform: none; }
.hero-face[data-in] { transform: translateY(-40px) scale(.6) rotate(-8deg); }
.hero-face[data-in].in { transform: none; }
h1[data-in], h2[data-split] { opacity: 1; transform: none; filter: none; }

/* Wörter einzeln */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
[data-split] .wi { display: inline-block; transform: translateY(105%) rotate(4deg); opacity: 0; filter: blur(8px); transition: transform .9s var(--ease), opacity .9s var(--ease), filter .9s var(--ease); transition-delay: calc(var(--i) * 55ms); }
[data-split].in .wi { transform: none; opacity: 1; filter: none; }

/* Scroll-Reveal kräftiger */
.reveal { opacity: 0; transform: translateY(34px) scale(.98); filter: blur(8px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.pin.fly { opacity: 0; transform: translate(var(--fx, 0), 80px) rotate(var(--fr, 6deg)) scale(.92); filter: blur(10px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease), box-shadow .35s; }
.pin.fly.in { opacity: 1; transform: rotate(var(--rot, 0deg)); filter: none; }
.pin.fly.in:hover { transform: rotate(0deg) translateY(-6px); }
svg.draw .l1, svg.draw .l2 { stroke-dasharray: 700; stroke-dashoffset: 700; }
.in svg.draw .l1, .in svg.draw .l2 { animation: draw 1.6s var(--ease) .5s forwards; }
svg.draw .dot { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.in svg.draw .dot { animation: dotpop .5s var(--ease) 1.5s forwards; }
svg.draw .f2 { opacity: 0; } .in svg.draw .f2 { animation: fadeIn .8s ease 1.6s forwards; }
@keyframes dotpop { from { transform: scale(0); } to { transform: scale(1); } }

/* Laufband */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 70px; padding: 18px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee .track { display: flex; width: max-content; animation: marq 38s linear infinite; }
.marquee span { font: 600 clamp(20px, 3vw, 30px) var(--sans); letter-spacing: -.02em; padding: 0 28px; white-space: nowrap; color: var(--ink); }
.marquee span:nth-child(even) { color: var(--faint); }
.marquee span::after { content: "✦"; margin-left: 56px; font-size: .6em; color: var(--faint); vertical-align: middle; }
@keyframes marq { to { transform: translateX(-50%); } }

/* Max-Reihe */
.maxrow { display: flex; justify-content: center; gap: clamp(8px, 2vw, 22px); margin: 40px 0 18px; flex-wrap: wrap; }
.maxrow .face { width: clamp(84px, 13vw, 132px); height: clamp(84px, 13vw, 132px); }
.maxrow .face:nth-child(odd) { transform: translateY(12px); }
.spicebar { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); margin-top: 8px; }
.spicebar span { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 550; color: var(--mute); transition: all .4s var(--ease); }
.spicebar span.on { background: var(--inv); color: var(--onInv); }

/* Magnet-Knöpfe */
.magnet { transition: transform .25s var(--ease), opacity .15s; will-change: transform; }

/* FAQ weich */
.faq details .ans { overflow: hidden; }
.faq summary { transition: color .2s; }
.faq details:not([open]) summary:hover { color: var(--ink2); }

/* App: Inhalte erscheinen gestaffelt */
.view-in > * { animation: riseIn .6s var(--ease) both; }
.view-in > *:nth-child(2) { animation-delay: .06s; } .view-in > *:nth-child(3) { animation-delay: .12s; } .view-in > *:nth-child(4) { animation-delay: .18s; } .view-in > *:nth-child(5) { animation-delay: .24s; }
.hub > * { animation: riseIn .7s var(--ease) both; }
.hub > *:nth-child(1) { animation-delay: .05s; } .hub > *:nth-child(2) { animation-delay: .1s; } .hub > *:nth-child(3) { animation-delay: .15s; } .hub > *:nth-child(4) { animation-delay: .2s; } .hub > *:nth-child(5) { animation-delay: .25s; } .hub > *:nth-child(6) { animation-delay: .3s; } .hub > *:nth-child(7) { animation-delay: .35s; } .hub > *:nth-child(8) { animation-delay: .4s; }
.list > *, .path > .chap { animation: riseIn .6s var(--ease) both; }
.list > *:nth-child(2), .path > .chap:nth-child(2) { animation-delay: .05s; } .list > *:nth-child(3), .path > .chap:nth-child(3) { animation-delay: .1s; } .list > *:nth-child(4), .path > .chap:nth-child(4) { animation-delay: .15s; } .list > *:nth-child(n+5), .path > .chap:nth-child(n+5) { animation-delay: .2s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* Quiz: lebendige Klicks */
.opt { position: relative; overflow: hidden; isolation: isolate; }
.opt::before { content: ""; position: absolute; inset: 0; background: var(--panel2); transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--ease); z-index: -1; }
.opt:hover::before { transform: scaleX(.04); }
.opt.sel::before { transform: scaleX(1); }
.opt:active { transform: scale(.985); }
.opt.sel .key { animation: keypop .35s var(--ease); }
@keyframes keypop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.opt.right::before { background: var(--inv); transform: scaleX(1); }
.opt.right { animation: rightPulse .6s var(--ease); }
.opt.right::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid var(--ink); animation: ringOut .7s var(--ease) forwards; pointer-events: none; }
@keyframes rightPulse { 0% { transform: scale(1); } 35% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes ringOut { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.06); } }
.opt .why { animation: fadeUp .4s var(--ease) .15s both; }
.mi, .oi, .chip, .gap { transition: transform .2s var(--ease), background .25s, color .25s, border-color .2s, box-shadow .25s; }
.mi:active, .chip:active { transform: scale(.96); }
.mi.pick { transform: translateY(-2px); box-shadow: var(--shadow); }
.mi .badge { animation: keypop .35s var(--ease); }
.mi.right, .oi.right, .gap.right { animation: rightPulse .6s var(--ease); }
.gap { transition: all .3s var(--ease); }
.gap:not(:empty) { animation: keypop .35s var(--ease); }
.feedback { animation: fbIn .5s var(--ease) both; transform-origin: top; }
@keyframes fbIn { from { opacity: 0; transform: translateY(-6px) scaleY(.96); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.feedback .verdict .badge { animation: keypop .45s var(--ease) .1s both; }
.qcard { transition: transform .4s var(--ease); }
.burst { position: absolute; pointer-events: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: burst .8s var(--ease) forwards; z-index: 5; }
@keyframes burst { from { opacity: 1; transform: translate(0, 0) scale(1); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.4); } }
.spice { width: auto; height: 32px; padding: 0 30px 0 10px; font-size: 12.5px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { [data-in], .reveal, .pin.fly, [data-split] .wi { opacity: 1 !important; transform: none !important; filter: none !important; } .marquee .track { animation: none; } }

/* Max über Max */
.selfie { padding-top: 90px; }
.center { text-align: center; }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.quote { margin: 0; border: 1px solid var(--line); border-radius: 20px; padding: 22px; background: var(--panel); display: flex; flex-direction: column; gap: 14px; }
.quote:nth-child(2) { transition-delay: .1s; } .quote:nth-child(3) { transition-delay: .2s; }
.quote .stars { letter-spacing: 3px; font-size: 15px; }
.quote blockquote { margin: 0; font-size: 17px; line-height: 1.45; letter-spacing: -.01em; font-weight: 500; }
.quote figcaption { margin-top: auto; display: flex; align-items: center; gap: 10px; font: 500 12px var(--mono); color: var(--mute); }
.quote .qf { width: 34px; height: 34px; flex: none; }
@media (max-width: 860px) { .quotes { grid-template-columns: 1fr; } }
.selfie h2 { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -.035em; line-height: 1.02; font-weight: 650; margin: 12px auto 0; max-width: 760px; }
.selfie p.lead { color: var(--mute); font-size: 18px; max-width: 600px; margin: 16px auto 0; }

.fbstars { display: flex; gap: 6px; margin: 4px 0 14px; }
.fbstar { font-size: 30px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--line2); transition: transform .2s var(--ease), color .2s; padding: 2px; }
.fbstar:hover { transform: scale(1.15); }
.fbstar.on { color: var(--ink); animation: keypop .35s var(--ease); }
.fbconsent { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 13.5px; color: var(--ink2); cursor: pointer; }

/* ===== v3: Sprechblase, Thema ohne Skript, Konto, Feedback-Gesicht, Mindmap ===== */
.navlogin { border: 0; background: none; color: var(--mute); font: 550 14px var(--sans); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.navlogin:hover { color: var(--ink); background: var(--panel2); }

.hero-max { position: relative; width: max-content; margin: 0 auto 26px; }
.hero-max .hero-face { margin: 0; }
.bubble { position: absolute; left: calc(100% + 14px); top: 6px; width: max-content; max-width: 300px; min-width: 120px; text-align: left; background: var(--panel); border: 1.5px solid var(--ink); border-radius: 20px 20px 20px 6px; padding: 12px 16px; box-shadow: var(--shadow); transform-origin: 0 100%; }
/* Sprechblasen-Spitze: zwei saubere Dreiecke (Rand + Füllung) */
.bubble::before, .bubble::after { content: ""; position: absolute; width: 0; height: 0; border-style: solid; pointer-events: none; }
.bubble::before { left: -12px; bottom: 16px; border-width: 8px 12px 8px 0; border-color: transparent var(--ink) transparent transparent; }
.bubble::after { left: -9.75px; bottom: 17.5px; border-width: 6.5px 11.75px 6.5px 0; border-color: transparent var(--panel) transparent transparent; }
.bubble .greet { display: block; font: 550 15px/1.35 var(--sans); color: var(--ink); min-height: 20px; }
.bubble[data-in] { opacity: 0; transform: scale(.4) translate(-20px, 10px); transition: opacity .5s var(--ease), transform .7s cubic-bezier(.34,1.56,.64,1); }
.bubble[data-in].in { opacity: 1; transform: none; }
@media (max-width: 860px) {
  .hero-max { display: flex; flex-direction: column; align-items: center; }
  .bubble { position: relative; left: auto; top: auto; margin-top: 14px; max-width: min(320px, 86vw); border-radius: 20px; transform-origin: 50% 0; }
  .bubble::before { left: 50%; top: -12px; bottom: auto; margin-left: -8px; border-width: 0 8px 12px 8px; border-color: transparent transparent var(--ink) transparent; }
  .bubble::after { left: 50%; top: -9.75px; bottom: auto; margin-left: -6.5px; border-width: 0 6.5px 11.75px 6.5px; border-color: transparent transparent var(--panel) transparent; }
}

.or { display: flex; align-items: center; gap: 14px; max-width: 720px; margin: 22px auto 0; color: var(--faint); font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.askbar { display: flex; align-items: center; gap: 10px; max-width: 720px; margin: 14px auto 0; padding: 8px 8px 8px 10px; background: var(--panel); border: 1px solid var(--line2); border-radius: 999px; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.askbar:focus-within { border-color: var(--ink); transform: translateY(-1px); }
.askbar .af { width: 38px; height: 38px; flex: none; }
.askbar .tin { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 500 16px var(--sans); color: var(--ink); padding: 8px 4px; }
.askbar .tin::placeholder { color: var(--mute); }
.askbar .btn { flex: none; }
.askbar.inapp { margin-top: 26px; text-align: left; }
.askbar.inmodal { margin: 4px 0 0; box-shadow: none; }
@media (max-width: 520px) { .askbar { border-radius: 22px; flex-wrap: wrap; padding: 10px; } .askbar .tin { flex-basis: calc(100% - 60px); } .askbar .btn { width: 100%; } }

.accchip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px dashed var(--line2); border-radius: 12px; background: transparent; cursor: pointer; text-align: left; color: var(--ink); transition: border-color .15s, background .15s; }
.accchip:hover { border-color: var(--ink); background: var(--panel); }
.accchip .av { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--inv); color: var(--onInv); display: grid; place-items: center; font: 700 13px var(--sans); }
.accchip .av .ico { width: 14px; height: 14px; }
.accchip .tx { display: grid; min-width: 0; }
.accchip b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.accchip small { font: 500 11px var(--mono); color: var(--mute); }

.modal.login { position: relative; text-align: center; max-width: 420px; }
.modal.login .lface { width: 76px; height: 76px; margin: 0 auto 12px; }
.modal.login p { margin-bottom: 18px; }
.modal.login .lx { position: absolute; top: 12px; right: 12px; }
.lform { display: flex; gap: 8px; }
.lform .field { flex: 1; min-width: 0; }
.field.code { text-align: center; font: 700 30px var(--mono); letter-spacing: .4em; padding: 12px 0 12px .4em; }
.lerr { min-height: 20px; margin-top: 8px; color: var(--ink); font-size: 13.5px; font-weight: 550; }
.lfine { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 8px; font-size: 12.5px; color: var(--mute); }
.lfine .ico { width: 14px; height: 14px; flex: none; }
.accbox { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.accrow { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; background: var(--panel2); font-size: 14px; }
.accrow span { color: var(--mute); }
.accrow b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 520px) { .lform { flex-direction: column; } }

.feedback .fbface { width: 40px; height: 40px; flex: none; animation: keypop .45s var(--ease) .05s both; }

.mindmap { position: relative; overflow: hidden; }
.mm-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.mm-hint { font: 500 11.5px var(--mono); color: var(--mute); }
.mindmap svg.mm { width: 100%; height: auto; max-height: 76vh; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.mm .mm-l { fill: none; stroke: var(--ink); }
.mm .mm-l-branch { stroke-width: 2.4; opacity: .55; }
.mm .mm-l-leaf { stroke-width: 1.3; opacity: .3; }
.mm .mm-n { cursor: grab; touch-action: none; }
.mm .mm-n.drag { cursor: grabbing; }
.mm .mm-root .mm-box { fill: var(--inv); }
.mm .mm-root text { fill: var(--onInv); }
.mm .mm-branch .mm-box { fill: var(--panel); stroke: var(--ink); stroke-width: 1.6; transition: fill .15s; }
.mm .mm-branch:hover .mm-box { fill: var(--panel2); }
.mm .mm-branch text { fill: var(--ink); }
.mm .mm-badge { fill: var(--mute) !important; font-family: var(--mono); }
.mm .mm-leaf text { fill: var(--ink2); }
.mm .mm-leaf:hover text { fill: var(--ink); }
.mm .mm-dot { fill: var(--ink); }
.mindmap:fullscreen, .mindmap.mm-full { background: var(--bg); display: flex; flex-direction: column; border-radius: 0; border: 0; }
.mindmap.mm-full { position: fixed; inset: 0; z-index: 90; }
.mindmap:fullscreen svg.mm, .mindmap.mm-full svg.mm { flex: 1; max-height: none; height: 100%; }
@media (max-width: 760px) { .mm-hint { display: none; } .mindmap svg.mm { min-width: 0; } }
@media (max-width: 760px) {
  .mindmap { overflow: hidden; }
  .mindmap .mm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mindmap .mm-scroll svg.mm { min-width: 760px; max-height: none; touch-action: pan-x pan-y; }
  .mindmap:fullscreen .mm-scroll, .mindmap.mm-full .mm-scroll { flex: 1; overflow: auto; }
}
.nav .brand { white-space: nowrap; }
@media (max-width: 520px) { .nav { gap: 6px; } .nav .brand small { display: none; } .navlogin { padding: 6px; font-size: 13.5px; } }
.mindmap:fullscreen .mm-scroll, .mindmap.mm-full .mm-scroll { flex: 1; display: flex; min-height: 0; }
.mindmap:fullscreen .mm-scroll svg.mm, .mindmap.mm-full .mm-scroll svg.mm { height: 100%; max-height: none; }

/* ===== Mit Max sprechen ===== */
.bubtalk { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; height: 32px; padding: 0 13px 0 10px; border-radius: 999px; border: 0; background: var(--inv); color: var(--onInv); font: 600 13.5px var(--sans); cursor: pointer; transition: transform .2s var(--ease); position: relative; }
.bubtalk .ico { width: 16px; height: 16px; }
.bubtalk:hover { transform: translateY(-1px) scale(1.03); }
.bubtalk { animation: talkping 2.6s 2.5s infinite; }
@keyframes talkping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ink) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--ink) 0%, transparent); } }
.micbtn { width: 36px; height: 36px; flex: none; border-radius: 11px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: all .15s; }
.micbtn:hover { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
.micbtn .ico { width: 18px; height: 18px; }
.talkbtn .ico { width: 15px; height: 15px; }
@media (max-width: 760px) { .talkbtn .lbl { display: none; } }

.voice { position: fixed; inset: 0; z-index: 95; background: var(--bg); display: flex; flex-direction: column; opacity: 0; transform: scale(1.02); transition: opacity .25s var(--ease), transform .35s var(--ease); }
.voice.in { opacity: 1; transform: none; }
.voice .vtop { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.voice .vchips { flex: 1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.voice .vchips .eyebrow { margin-right: 4px; }
.voice .vmain { flex: 1; overflow: auto; display: flex; flex-direction: column; align-items: center; padding: 10px 20px 20px; text-align: center; }
.voice .vstage { position: relative; width: 190px; height: 190px; margin: 2vh 0 18px; flex: none; }
.voice .vface { position: absolute; inset: 0; }
.voice .vring { position: absolute; inset: -14px; border-radius: 50%; border: 2px solid var(--ink); opacity: 0; transition: transform .08s linear, opacity .2s; }
.voice[data-state="listen"] .vring { opacity: .35; }
.voice[data-state="speak"] .vring { opacity: .25; animation: vpulse 1.1s ease-in-out infinite; }
@keyframes vpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.voice .vstatus { font: 500 13px var(--mono); color: var(--mute); min-height: 20px; }
.voice .vyou, .voice .vsaid { max-width: 640px; width: 100%; margin-top: 14px; }
.voice .vyou p { margin: 4px 0 0; color: var(--mute); font-size: 15px; }
.voice .vsaid p { margin: 4px 0 0; font-size: clamp(18px, 2.4vw, 23px); line-height: 1.4; letter-spacing: -.01em; font-weight: 550; }
.voice .vsaid:not(:empty) { animation: fadeUp .4s var(--ease) both; }
.voice .vboard { max-width: 760px; width: 100%; margin-top: 18px; text-align: left; }
.voice .vboard .tafel { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); padding: 20px; margin-top: 8px; max-width: none; }
.voice .vbottom { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 18px 22px; border-top: 1px solid var(--line); }
.voice .vmic { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--inv); color: var(--onInv); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); transition: transform .2s var(--ease); }
.voice .vmic .ico { width: 30px; height: 30px; }
.voice .vmic:hover { transform: scale(1.05); }
.voice .vmic:disabled { opacity: .35; cursor: not-allowed; }
.voice[data-state="listen"] .vmic { animation: vmicpulse 1.2s ease-in-out infinite; }
.voice[data-state="listen"] .vmic .ico rect { fill: currentColor; }
@keyframes vmicpulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ink) 35%, transparent); } 50% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--ink) 0%, transparent); } }
.voice[data-state="think"] .vmic { opacity: .5; }
.voice .vhint { font: 500 11.5px var(--mono); color: var(--faint); text-align: center; }
.voice .vtype { display: flex; gap: 8px; width: min(560px, 100%); }
.voice .vtype .field { flex: 1; min-width: 0; padding: 9px 13px; }
@media (max-width: 760px) { .voice .vstage { width: 140px; height: 140px; } .voice .vchips .eyebrow { display: none; } }
button.doc-item { border: 0; background: transparent; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.chathead > div b, .chathead > div span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chathead .talkbtn { flex: none; }
@media (max-width: 1440px) { .chathead .talkbtn .lbl { display: none; } .chathead .talkbtn { width: 36px; padding: 0; justify-content: center; } }

/* Von oben wieder reinkommen (beim Hochscrollen) */
.reveal.up:not(.in) { transform: translateY(-34px) scale(.98); }
.pin.fly.up:not(.in) { transform: translate(var(--fx, 0), -80px) rotate(var(--fr, 6deg)) scale(.92); }
[data-split].up:not(.in) .wi { transform: translateY(-105%) rotate(-4deg); }
/* Beta auch am Handy */
@media (max-width: 520px) {
  .nav .brand small { display: inline-block; }
  .nav { padding: 0 12px; gap: 4px; }
  .nav .brand { gap: 6px; font-size: 16px; }
  .nav .brand small { font-size: 9px; padding: 1px 4px; }
  .nav .iconbtn { width: 32px; height: 32px; }
  .nav .btn.sm { padding: 0 11px; }
}

.mobhint { display: none; }
@media (max-width: 760px) { .mobhint { display: block; margin: 12px auto 0; font: 500 12px var(--mono); color: var(--mute); } }
.mtip { position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 80; display: flex; gap: 12px; align-items: center; padding: 12px 10px 12px 12px; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); animation: fadeUp .45s var(--ease) both; transition: opacity .3s, transform .3s; }
.mtip.out { opacity: 0; transform: translateY(12px); }
.mtip .mtf { width: 40px; height: 40px; flex: none; }
.mtip b { display: block; font-size: 14px; }
.mtip span { font-size: 13px; color: var(--ink2); line-height: 1.4; }

/* Was Max kann (Hero) */
.featrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 820px; margin: 22px auto 0; }
.feat { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 10px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink2); font-size: 13.5px; font-weight: 550; text-decoration: none; transition: background .35s var(--ease), color .35s var(--ease), border-color .35s, transform .35s var(--ease); }
.feat .ico { width: 16px; height: 16px; }
.feat:hover, .feat.hl { background: var(--inv); color: var(--onInv); border-color: var(--inv); transform: translateY(-2px); }
.featrow[data-in] .feat { opacity: 0; transform: translateY(10px) scale(.9); transition: opacity .5s var(--ease), transform .6s cubic-bezier(.34,1.56,.64,1), background .35s, color .35s, border-color .35s; transition-delay: calc(var(--k) * 70ms); }
.featrow[data-in].in .feat { opacity: 1; transform: none; }
.featrow[data-in].in .feat.hl { transform: translateY(-2px); transition-delay: 0s; }
.featrow[data-in] { opacity: 1 !important; transform: none !important; filter: none !important; }
@media (max-width: 520px) { .featrow { gap: 6px; } .feat { height: 30px; font-size: 12.5px; padding: 0 10px 0 8px; } }
.talklink { display: inline-flex; align-items: center; gap: 7px; margin: 12px auto 0; border: 0; background: none; color: var(--mute); font: 550 14px var(--sans); cursor: pointer; padding: 6px 10px; border-radius: 999px; transition: color .15s, background .15s; }
.talklink .ico { width: 16px; height: 16px; }
.talklink:hover { color: var(--ink); background: var(--panel2); }
.empty .talklink { display: flex; }
.bubble { width: 300px; }
@media (max-width: 860px) { .bubble { width: min(320px, 86vw); } }

/* Punkte + Lichtschein über die ganze Startseite (statt nur im Hero) */
#landing { position: relative; isolation: isolate; }
.pagebg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.pagebg .pdots { position: absolute; inset: 0; opacity: .45; }
.pagebg .pdots.hi { opacity: 1; -webkit-mask-image: radial-gradient(520px circle at var(--mx, 50%) var(--my, 30%), #000 0%, rgba(0,0,0,.35) 45%, transparent 75%); mask-image: radial-gradient(520px circle at var(--mx, 50%) var(--my, 30%), #000 0%, rgba(0,0,0,.35) 45%, transparent 75%); }
.pagebg .pspot { position: absolute; inset: 0; background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 30%), color-mix(in srgb, var(--ink) 8%, transparent), transparent 70%); }
@media (hover: none) { .pagebg .pdots.hi, .pagebg .pspot { --mx: 50vw; --my: 22vh; } }
.feat { cursor: pointer; font-family: var(--sans); }
.trybody { display: grid; gap: 4px; justify-items: center; }
.trybody .trybtn { width: 100%; justify-content: center; }
.trybody .or { width: 100%; margin: 14px 0 2px; }
.trybody .askbar { width: 100%; }

.feat > span { display: grid; place-items: center; width: 17px; height: 17px; flex: none; }
.feat .ico { display: block; width: 17px; height: 17px; }
.feat { line-height: 1; }
.olang { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 500 11.5px var(--mono); color: var(--mute); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; padding: 2px; background: var(--panel); }
.seg button { border: 0; background: transparent; color: var(--mute); font: 600 12px var(--sans); padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--inv); color: var(--onInv); }
.vchip { gap: 4px; padding-right: 4px; cursor: pointer; }
.vchip.fixed { cursor: default; }
.pv { width: 22px; height: 22px; border-radius: 50%; border: 0; display: inline-grid; place-items: center; background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; cursor: pointer; padding: 0; }
.pv .ico { width: 11px; height: 11px; }

/* Sprachumschalter (Landing-Nav) */
.langsw { display: inline-flex; align-items: center; padding: 2px; gap: 2px; border: 1px solid var(--line2); border-radius: 999px; background: var(--panel); flex: none; }
.langsw button { border: 0; background: transparent; color: var(--mute); font: 600 11.5px var(--sans); letter-spacing: .04em; padding: 4px 8px; border-radius: 999px; cursor: pointer; line-height: 1; transition: background .15s, color .15s; }
.langsw button:hover { color: var(--ink); }
.langsw button.on { background: var(--inv); color: var(--onInv); }
@media (max-width: 520px) { .langsw button { font-size: 11px; padding: 3px 6px; } }
@media (max-width: 430px) { .langsw { padding: 1px; } .langsw button.on { display: none; } .langsw button { background: transparent; color: var(--ink); } }
@media (max-width: 430px) { .nav { gap: 3px; } .nav .navlogin { padding: 6px 4px; font-size: 13px; } .langsw button { padding: 3px 5px; } }

/* Seitenleiste: Sprachschalter neben Hell/Dunkel – Marke bleibt einzeilig */
.side .top { gap: 6px; }
.side .top .brand { white-space: nowrap; flex: none; }
.side .top .brand small { display: inline-block; font-size: 9px; padding: 1px 4px; }
.side .top .langsw button.on { display: none; }
.olang > span { white-space: nowrap; }

/* Gedankenblase beim Bauen: die Denk-Punkte führen hinein */
.thinkwrap { position: relative; display: inline-block; margin: 0 auto; }
.ingest .thinkwrap { display: block; width: 110px; margin: 46px auto 18px; }
.ingest .thinkwrap .face { margin: 0; }
.loading .thinkwrap { margin-top: 40px; }
.thought { position: absolute; left: calc(100% + 6px); bottom: calc(100% - 4px); width: max-content; max-width: 250px; padding: 10px 14px; background: var(--panel); border: 1.5px solid var(--ink); border-radius: 20px 20px 20px 6px; font: 550 14px/1.35 var(--sans); color: var(--ink); text-align: left; box-shadow: var(--shadow); transform-origin: 0 100%; }
@media (max-width: 760px) {
  .loading .thinkwrap, .ingest .thinkwrap { margin-top: 96px; }
  .thought { left: 50%; bottom: calc(100% + 22px); max-width: min(270px, 82vw); border-radius: 20px; text-align: center; translate: -50% 0; transform-origin: 50% 100%; }
}
.thought::before, .thought::after { content: ""; position: absolute; border: 1.5px solid var(--ink); background: var(--panel); border-radius: 50%; }
.thought::before { width: 11px; height: 11px; left: -13px; bottom: -6px; }
.thought::after { width: 6px; height: 6px; left: -22px; bottom: -14px; }
@media (max-width: 760px) {
  .thought::before { left: calc(50% + 14px); bottom: -15px; }
  .thought::after { left: calc(50% + 24px); bottom: -25px; }
}
.modal { position: relative; }
.modal .mx { position: absolute; top: 12px; right: 12px; z-index: 2; }
.modal .mx + h3 { padding-right: 34px; }

/* Max ist überall weiß; auf hellen Flächen mit Kontur */
:root .tile.dark .face svg .fz-head, :root .on-inv .face svg .fz-head { stroke: #0a0a0a; stroke-width: 15; }

/* Mit Max reden: klarer Knopf unter dem Themenfeld (statt in der Sprechblase) */
.talkcta { display: flex; align-items: center; gap: 12px; margin: 14px auto 0; padding: 10px 18px 10px 10px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); cursor: pointer; text-align: left; font-family: var(--sans); transition: border-color .2s, transform .2s var(--ease), background .2s; }
.talkcta:hover { border-color: var(--ink); transform: translateY(-2px); }
.talkcta .tc-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--inv); color: var(--onInv); display: grid; place-items: center; flex: none; }
.talkcta .tc-ic .ico { width: 19px; height: 19px; }
.talkcta b { display: block; font-size: 15px; font-weight: 650; }
.talkcta small { display: block; font-size: 12.5px; color: var(--mute); margin-top: 1px; }
.hero .talkcta[data-in] { margin-left: auto; margin-right: auto; }

/* Handy: Sprachschalter unter dem Header links, Beta unter dem Namen */
.langsw.mob { display: none; }
@media (max-width: 760px) {
  .nav .langsw:not(.mob) { display: none; }
  .langsw.mob { display: inline-flex; position: absolute; top: 12px; left: 16px; z-index: 5; padding: 3px; }
  .langsw.mob button, .langsw.mob button.on { display: inline-block; font-size: 13.5px; padding: 7px 14px; letter-spacing: 0; }
  .langsw.mob button:not(.on) { color: var(--mute); background: transparent; }
  .hero { padding-top: 64px; }
  .nav .brand { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; row-gap: 1px; align-items: center; line-height: 1.05; }
  .nav .brand .mini { grid-row: 1 / 3; }
  .nav .brand .bn { grid-column: 2; }
  .nav .brand small { grid-column: 2; justify-self: start; display: inline-block; font-size: 8.5px; padding: 1px 4px; margin: 0; }
}
/* Seitenleiste unten: nichts darf über den Rand ragen */
.side { overflow-x: hidden; }
.side .bottom { min-width: 0; overflow: hidden; }
.side .bottom > * { min-width: 0; max-width: 100%; }
.olang { flex-wrap: wrap; row-gap: 6px; }
.olang .seg button { padding: 4px 9px; }
.voice .vth { display: none; left: calc(100% + 4px); bottom: calc(100% - 22px); }
.voice .vth.on { display: block; }
@media (max-width: 760px) { .voice .vth { left: 50%; bottom: calc(100% + 18px); } .voice .vstage { margin-top: 70px; } }
.voice .vctrl { display: flex; align-items: center; justify-content: center; gap: 18px; width: min(560px, 100%); }
.voice .vstop { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); display: grid; place-items: center; cursor: pointer; opacity: .35; pointer-events: none; transition: opacity .2s, border-color .2s; }
.voice .vstop .ico { width: 18px; height: 18px; }
.voice[data-state="think"] .vstop, .voice[data-state="speak"] .vstop, .voice[data-state="listen"] .vstop { opacity: 1; pointer-events: auto; border-color: var(--ink); }
.voice .vvol { display: flex; align-items: center; gap: 6px; }
.voice .vvol input[type=range] { width: 90px; accent-color: var(--ink); }
.voice .vmute .ico { width: 20px; height: 20px; }
@media (max-width: 520px) { .voice .vvol input[type=range] { width: 64px; } .voice .vctrl { gap: 12px; } }

/* ---- Schwebender Max (Assistent) ---- */
.asst { --asst-z: 85; }
.asst.off, .asst.off * { display: none !important; }
.asst-bub { position: fixed; right: 18px; bottom: 18px; z-index: 75; width: 56px; height: 56px; padding: 0; border-radius: 50%; border: 1px solid var(--line2); background: var(--panel); box-shadow: var(--shadow), 0 6px 22px -8px rgba(0,0,0,.28); cursor: pointer; display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .25s var(--ease), border-color .2s, opacity .2s; }
.asst-bub:hover { transform: translateY(-2px); border-color: var(--ink); }
.asst-bub:active { transform: scale(.96); }
.asst-bub:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.asst-bub .asst-bf { width: 42px; height: 42px; display: block; margin-top: 3px; pointer-events: none; }
.asst-dot { position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--inv); border: 2px solid var(--panel); transform: scale(0); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.asst.unread .asst-dot { transform: scale(1); }
.asst-tip { position: absolute; right: calc(100% + 10px); top: 50%; translate: 0 -50%; white-space: nowrap; font: 600 12.5px var(--sans); padding: 6px 11px; border-radius: 999px; background: var(--inv); color: var(--onInv); opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .25s var(--ease); pointer-events: none; }
@media (hover: hover) { .asst-bub:hover .asst-tip { opacity: 1; transform: none; } }
.asst.dragging .asst-tip { opacity: 0 !important; }
.asst.dragging, .asst.dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.asst.open .asst-bub, .asst.nobub:not(.open)[data-state="idle"] .asst-bub, .asst.covered .asst-bub { opacity: 0; pointer-events: none; transform: scale(.6); }

.asst-panel { position: fixed; z-index: var(--asst-z); display: none; flex-direction: column; width: 384px; height: 560px; right: 18px; bottom: 18px; background: var(--bg); border: 1px solid var(--line2); border-radius: 20px; box-shadow: var(--shadow), 0 24px 60px -24px rgba(0,0,0,.35); overflow: hidden; color: var(--ink); }
.asst.open .asst-panel { display: flex; }
.asst-h { display: flex; align-items: center; gap: 4px; padding: 10px 8px 10px 12px; border-bottom: 1px solid var(--line); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; flex: none; position: relative; background: var(--bg2); }
.asst-fw { position: relative; width: 34px; height: 34px; flex: none; margin-right: 6px; }
.asst-f { display: block; width: 34px; height: 34px; }
.asst-tt { flex: 1; min-width: 0; line-height: 1.2; }
.asst-tt b { display: block; font-size: 14px; letter-spacing: -.01em; }
.asst-sees { display: block; font: 500 11px var(--mono); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asst-ib { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.asst-ib .ico { width: 16px; height: 16px; }
.asst-spk.on { background: var(--inv); color: var(--onInv); }
.asst-spk.on:hover { background: var(--inv); color: var(--onInv); opacity: .85; }
.asst-think { position: absolute; left: calc(100% + 8px); top: 50%; translate: 0 -50%; z-index: 3; display: none; width: max-content; max-width: 210px; padding: 6px 11px; border: 1.5px solid var(--ink); border-radius: 14px 14px 14px 5px; background: var(--panel); font: 550 12.5px/1.3 var(--sans); color: var(--ink); box-shadow: var(--shadow); white-space: normal; }
.asst-think.on { display: block; }
.asst-think::before { content: ""; position: absolute; left: -9px; bottom: 2px; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--panel); }
.asst-menu { position: absolute; top: 54px; right: 8px; z-index: 4; width: 250px; padding: 12px; border: 1px solid var(--line2); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); display: grid; gap: 6px; animation: fadeIn .15s both; }
.asst-menu[hidden] { display: none; }
.asst-vch { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.asst-vch .chip { height: 26px; font-size: 12px; padding: 0 9px; }
.asst-mi { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 8px 8px; border-radius: 9px; font: 550 13.5px var(--sans); color: var(--ink2); cursor: pointer; text-align: left; }
.asst-mi:hover { background: var(--panel2); color: var(--ink); }
.asst-mi .ico { width: 16px; height: 16px; }

.asst-body { flex: 1; min-height: 0; display: flex; }
.asst-chat { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.asst-msgs { flex: 1; overflow: auto; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.asst-m { max-width: 92%; padding: 9px 12px; border-radius: 15px; font-size: 14px; line-height: 1.5; word-wrap: break-word; animation: fadeUp .28s var(--ease) both; }
.asst-m.me { align-self: flex-end; background: var(--inv); color: var(--onInv); border-bottom-right-radius: 5px; white-space: pre-wrap; }
.asst-m.ai { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.asst-m.ai:has(.asst-tafel) { width: 100%; max-width: 100%; }
.asst-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.asst-acts .chip { height: 26px; font-size: 12px; }
.asst-tafel { margin-top: 9px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.asst-th { display: flex; align-items: center; gap: 7px; padding: 6px 6px 6px 10px; border-bottom: 1px solid var(--line); background: var(--panel2); font-size: 12.5px; }
.asst-th > span { display: contents; }
.asst-th .ico { width: 15px; height: 15px; }
.asst-th b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asst-big { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); font: 600 11.5px var(--sans); color: var(--ink); cursor: pointer; flex: none; }
.asst-big:hover { border-color: var(--ink); }
.asst-big .ico { width: 13px; height: 13px; }
.asst-tb { position: relative; max-height: 230px; overflow: hidden; cursor: zoom-in; }
.asst-tb::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.asst-tb .tafel { padding: 12px 14px 18px; font-size: 13px; line-height: 1.55; max-width: none; }
.asst-tb .tafel h3 { font-size: 14px; margin: 10px 0 6px; }
.asst-tb .tafel .calc { font-size: 12px; padding: 9px 11px; }
.asst-tb .tafel svg { max-height: 170px; margin: 8px 0; }
.asst-sugg { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 8px; }
.asst-sugg:empty { display: none; }
.asst-sugg .chip { height: 27px; font-size: 12px; }
.asst-comp { border-top: 1px solid var(--line); padding: 10px 10px 8px; background: var(--bg2); flex: none; }
.asst-box { display: flex; align-items: flex-end; gap: 6px; border: 1px solid var(--line2); border-radius: 14px; background: var(--panel); padding: 6px 6px 6px 12px; transition: border-color .15s; }
.asst-box:focus-within { border-color: var(--ink); }
.asst-box textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; resize: none; max-height: 140px; min-height: 22px; padding: 5px 0; font-size: 14px; line-height: 1.45; }
.asst-mic, .asst-send { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex: none; position: relative; }
.asst-mic { border: 1px solid var(--line2); background: var(--panel); color: var(--ink2); }
.asst-mic:hover { border-color: var(--ink); color: var(--ink); }
.asst-mic:disabled { opacity: .35; pointer-events: none; }
.asst-mic .ico, .asst-send .ico { width: 16px; height: 16px; }
.asst-send { border: 0; background: var(--inv); color: var(--onInv); }
.asst-send:disabled { opacity: .3; pointer-events: none; }
.asst[data-state="listen"] .asst-mic { background: var(--inv); color: var(--onInv); border-color: var(--inv); box-shadow: 0 0 0 calc(var(--lvl, 0) * 9px + 2px) color-mix(in srgb, var(--ink) 18%, transparent); transition: box-shadow .08s linear; }
.asst[data-state="listen"] .asst-mic .ico rect { fill: currentColor; }
.asst-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 0 4px; font: 500 10.5px var(--mono); color: var(--faint); min-height: 14px; }
.asst-st { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mute); }
.asst-cost { white-space: nowrap; flex: none; }
.asst-rz { position: absolute; left: 0; top: 0; width: 18px; height: 18px; z-index: 5; cursor: nwse-resize; touch-action: none; }
.asst-rz::before { content: ""; position: absolute; left: 5px; top: 5px; width: 7px; height: 7px; border-left: 1.5px solid var(--faint); border-top: 1.5px solid var(--faint); border-top-left-radius: 3px; opacity: 0; transition: opacity .2s; }
.asst-panel:hover .asst-rz::before { opacity: 1; }
.asst-grab { display: none; }

/* Tafel groß (nur im Vollbild) */
.asst-bv { display: none; flex-direction: column; min-width: 0; min-height: 0; flex: 1.6; border-left: 1px solid var(--line); background: var(--bg); }
.asst-bvh { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.asst-bvh > span { display: contents; }
.asst-bvh b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asst-bva { flex: 1; overflow: auto; background-color: var(--bg); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 22px 22px; }

/* Vollbild: Overlay über der Seite (die Seite darunter bleibt, wie sie ist) */
.asst.full .asst-panel { inset: 0 !important; width: auto !important; height: auto !important; border-radius: 0; border: 0; z-index: 88; }
.asst.full .asst-rz, .asst.full .asst-grab { display: none; }
.asst.full .asst-h { cursor: default; padding: 12px 14px 12px 18px; }
.asst.full .asst-chat { max-width: 760px; margin: 0 auto; width: 100%; }
.asst.full.board .asst-chat { max-width: 440px; margin: 0; flex: none; width: 40%; min-width: 320px; }
.asst.full.board .asst-bv { display: flex; }
.asst.full .asst-tb { max-height: 150px; }

/* Handy: Bottom Sheet */
@media (max-width: 600px) {
  .asst-panel { left: 0 !important; right: 0 !important; bottom: 0 !important; width: auto !important; border-radius: 20px 20px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .asst-grab { display: flex; justify-content: center; padding: 7px 0 3px; touch-action: none; cursor: grab; background: var(--bg2); flex: none; }
  .asst-grab i { width: 38px; height: 4px; border-radius: 4px; background: var(--line2); }
  .asst-h { cursor: default; padding-top: 4px; }
  .asst-rz { display: none; }
  .asst-think { max-width: min(220px, 56vw); }
  .asst-box textarea { font-size: 16px; }
  .asst.full .asst-panel { padding-top: env(safe-area-inset-top, 0px); }
  .asst.full.board .asst-chat { display: none; }
  .asst.full.board .asst-bv { border-left: 0; }
  .asst.full.board .asst-bv .tafel { padding: 18px 16px 50px; }
  .asst-tip { display: none; }
}

/* „Max zurückholen“ nach dem Ausblenden */
.asst-back { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 82; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: 600 13px var(--sans); box-shadow: var(--shadow); cursor: pointer; animation: fadeUp .35s var(--ease) both; transition: opacity .3s, transform .3s; }
.asst-back:hover { border-color: var(--ink); }
.asst-back.out { opacity: 0; transform: translateY(10px); }
.asst-back .asst-cf { width: 28px; height: 28px; display: block; }
@media print { .asst, .asst-back { display: none !important; } }
.asst-panel:focus { outline: none; }

/* ===== Klausurplan ===== */
.klplan.still > * { animation: none; }
.klplan .pl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; min-width: 0; }
.klplan .pl-ch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.klplan .pl-ch h3 { margin: 6px 0 0; font-size: 20px; letter-spacing: -.02em; line-height: 1.2; }
.klplan .pl-ch h4 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.klplan .pl-empty { color: var(--mute); margin: 4px 0; font-size: 14.5px; }
.klplan .pl-note { margin: 14px 0 0; font-size: 13.5px; color: var(--ink2); padding: 10px 12px; border-radius: 12px; background: var(--panel2); }
.klplan .pl-note.strong { background: transparent; border: 1px dashed var(--line2); }
.klplan .pl-fine { color: var(--faint); font-size: 12px; margin: 10px 0 0; }
.klplan .pl-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* Wizard */
.pl-wiz { border: 1px solid var(--line); border-radius: 22px; background: var(--panel); padding: 26px; display: grid; gap: 22px; }
.pl-maxrow { display: flex; align-items: center; gap: 14px; }
.pl-maxrow .face { width: 58px; height: 58px; flex: none; }
.pl-say { position: relative; background: var(--panel); border: 1.5px solid var(--ink); border-radius: 18px 18px 18px 6px; padding: 10px 14px; font: 550 14.5px/1.35 var(--sans); max-width: 440px; }
.pl-form { display: grid; gap: 4px; }
.pl-step { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.pl-step:first-child { border-top: 0; padding-top: 0; }
.pl-n { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line2); display: grid; place-items: center; font: 600 12px var(--mono); color: var(--ink2); }
.pl-sb { display: grid; gap: 10px; min-width: 0; }
.pl-sb label.l { display: block; font: 600 15px/1.3 var(--sans); letter-spacing: -.01em; color: var(--ink); margin: 3px 0 0; }
.pl-sb .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-daterow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pl-date { width: auto; min-width: 170px; font-family: var(--mono); font-size: 14px; }
.pl-until { font: 500 12.5px var(--mono); color: var(--mute); }
.pl-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 420px; }
.pl-wd .chip { justify-content: center; height: 36px; padding: 0; border-radius: 12px; }
.pl-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mute); }
.pl-min { width: 82px; padding: 4px 10px; height: 30px; border-radius: 999px; font-family: var(--mono); font-size: 13px; }
.pl-go { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); }
.pl-feas { display: grid; gap: 2px; font-size: 13.5px; min-width: 0; flex: 1 1 260px; padding-left: 12px; border-left: 2px solid var(--ink); }
.pl-feas b { font: 600 12.5px var(--mono); letter-spacing: .02em; }
.pl-feas span { color: var(--mute); }
.pl-feas[data-tone="warn"] { border-left-style: dashed; }
.pl-feas[data-tone="mid"] { border-left-color: var(--mute); }
.pl-wiz .pl-fine { margin: -8px 0 0; }
.pl-edit { display: grid; gap: 14px; text-align: left; }
.pl-edit .pl-step { padding: 12px 0; }
.pl-edit .pl-feas { flex: none; }

/* Kopf */
.pl-hero { background: var(--inv); color: var(--onInv); border-radius: 24px; padding: 28px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; margin-bottom: 16px; position: relative; overflow: hidden; }
.pl-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--onInv) 9%, transparent) 1px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); mask-image: linear-gradient(90deg, transparent 30%, #000); pointer-events: none; }
.pl-hero > * { position: relative; z-index: 1; min-width: 0; }
.pl-hero .eyebrow { color: color-mix(in srgb, var(--onInv) 55%, transparent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-big { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 6px; font-size: 40px; font-weight: 650; letter-spacing: -.04em; line-height: 1; flex-wrap: wrap; }
.pl-big .n { font-size: 84px; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.pl-big span:not(.n) { font-size: 17px; font-weight: 500; letter-spacing: -.01em; color: color-mix(in srgb, var(--onInv) 70%, transparent); }
.pl-when { display: flex; align-items: center; gap: 7px; font: 500 12.5px var(--mono); color: color-mix(in srgb, var(--onInv) 70%, transparent); }
.pl-when .ico { width: 15px; height: 15px; }
.pl-prog { margin-top: 22px; }
.pl-pl { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; margin-bottom: 8px; color: color-mix(in srgb, var(--onInv) 80%, transparent); }
.pl-pl b { font: 600 20px var(--mono); color: var(--onInv); }
.pl-bar { position: relative; height: 10px; border-radius: 10px; background: color-mix(in srgb, var(--onInv) 16%, transparent); }
.pl-bar i { display: block; height: 100%; border-radius: 10px; background: var(--onInv); min-width: 10px; transition: width .8s var(--ease); }
.pl-bar s { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--onInv); opacity: .75; }
.pl-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font: 500 11.5px var(--mono); color: color-mix(in srgb, var(--onInv) 60%, transparent); }
.pl-leg span { display: inline-flex; align-items: center; gap: 6px; }
.pl-leg s { display: inline-block; width: 2px; height: 11px; background: currentColor; border-radius: 2px; }
.pl-mood { display: flex; align-items: flex-start; gap: 14px; }
.pl-mf { flex: none; }
.pl-mf .face { width: 86px; height: 86px; }
.pl-bub { flex: 1; min-width: 0; background: color-mix(in srgb, var(--onInv) 7%, transparent); border: 1px solid color-mix(in srgb, var(--onInv) 22%, transparent); border-radius: 20px 20px 20px 6px; padding: 14px 16px; }
.pl-bub p { margin: 0; font: 550 15.5px/1.42 var(--sans); }
.pl-mtag { margin-top: 10px; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--onInv) 55%, transparent); }
.pl-mtag:empty { display: none; }
.pl-mood[data-mood="behind"] .pl-bub, .pl-mood[data-mood="way_behind"] .pl-bub { border-style: dashed; }
.pl-next { margin-top: 12px; max-width: 100%; background: var(--onInv); color: var(--inv); border-color: var(--onInv); }
.pl-next:hover { border-color: var(--onInv); opacity: .9; }
.pl-next .tx { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.klplan > .pl-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; border: 1px dashed var(--line2); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; font-size: 14px; }
.pl-warn span { color: var(--mute); flex: 1 1 260px; }

/* Heute + Seite */
.pl-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.pl-tasks { display: grid; gap: 8px; }
.pl-task { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .15s, background .2s; min-width: 0; }
.pl-task:hover { border-color: var(--line2); }
.pl-task.done { background: var(--panel2); border-color: transparent; }
.pl-task.done b { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--mute); }
.pl-task.missed { opacity: .5; }
.pl-check { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1.5px solid var(--line2); background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--onInv); padding: 0; transition: background .2s var(--ease), border-color .2s, transform .2s var(--ease); }
.pl-check:hover { border-color: var(--ink); }
.pl-check:active { transform: scale(.9); }
.pl-check[aria-checked="true"] { background: var(--inv); border-color: var(--inv); animation: plpop .35s cubic-bezier(.34,1.56,.64,1); }
.pl-check .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.pl-check[disabled] { cursor: default; }
@keyframes plpop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
.pl-tx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pl-tx b { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pl-tx > span { font-size: 12.5px; color: var(--mute); display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.pl-tx em { font: normal 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 3px 6px; border-radius: 5px; margin-left: 4px; }
.pl-tx em.pl-roll { background: var(--inv); color: var(--onInv); }
.pl-tx em.pl-auto { background: var(--panel); border: 1px solid var(--line2); color: var(--mute); }
.pl-open { flex: none; border: 1px solid var(--line); }
.pl-open:hover { border-color: var(--ink); }
.pl-ring { --p: 0; width: 52px; height: 52px; flex: none; border-radius: 50%; background: conic-gradient(var(--ink) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; }
.pl-ring span { width: 42px; height: 42px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font: 600 12.5px var(--mono); }
.pl-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink2); font-size: 14.5px; }
.pl-side { display: grid; gap: 20px; }
.pl-streak { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pl-sn { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.pl-sn b { font-size: 40px; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.pl-sn span { color: var(--mute); font-size: 13px; }
.pl-sn.zero span { font-size: 14px; color: var(--ink2); max-width: 260px; }
.pl-7 { display: flex; gap: 4px; }
.pl-7 i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: normal 500 10px var(--mono); color: var(--faint); border: 1px solid var(--line); text-transform: uppercase; }
.pl-7 i.on { background: var(--inv); border-color: var(--inv); color: var(--onInv); }
.pl-7 i.rest { border-style: dashed; }
.pl-7 i.td { outline: 1.5px solid var(--ink); outline-offset: 1px; }
.pl-goal { border-top: 1px solid var(--line); padding-top: 18px; }
.pl-est { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.pl-est span { color: var(--mute); font-size: 14px; }
.pl-est b { font-size: 30px; letter-spacing: -.03em; line-height: 1.1; }
.pl-gv { margin: 6px 0 0; font-size: 13.5px; color: var(--ink2); padding-left: 10px; border-left: 2px solid var(--ink); }
.pl-gv[data-ok="close"] { border-left-color: var(--mute); }
.pl-gv[data-ok="gap"] { border-left-style: dashed; }
.pl-lever { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; text-align: left; transition: border-color .15s; }
.pl-lever:hover { border-color: var(--ink); }
.pl-lever span:first-child { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); flex: none; }
.pl-lever b { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Kalender */
.pl-cal { margin-bottom: 8px; }
.pl-key { display: flex; gap: 12px; font: 500 11px var(--mono); color: var(--mute); }
.pl-key span { display: inline-flex; align-items: center; gap: 5px; }
.pl-key i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--ink2); }
.pl-key i.on { background: var(--ink); border-color: var(--ink); }
.pl-wk, .pl-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pl-wk { margin-bottom: 6px; }
.pl-wk span { text-align: center; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.pl-day { position: relative; height: 64px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 6px 7px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; cursor: pointer; color: var(--ink); text-align: left; transition: border-color .15s, transform .2s var(--ease); min-width: 0; overflow: hidden; }
.pl-day:hover { border-color: var(--ink2); }
.pl-day .dn { font: 600 12.5px var(--mono); white-space: nowrap; }
.pl-day .dots { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.pl-day .dots i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--ink2); }
.pl-day .dots i.on { background: var(--ink); border-color: var(--ink); }
.pl-day .dots em { font: normal 600 10px/1 var(--mono); color: var(--mute); }
.pl-day.rest { background: transparent; border-style: dashed; }
.pl-day.out { opacity: .35; }
.pl-day.today { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pl-day.sel { background: var(--panel2); }
.pl-day.full { background: var(--panel2); }
.pl-day.full .dn::after { content: " ✓"; }
.pl-day.moved::after { content: "↷"; position: absolute; right: 6px; top: 4px; font-size: 12px; color: var(--mute); }
.pl-day.mock { border-width: 1.5px; border-color: var(--ink2); }
.pl-day.exam { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
.pl-day.exam .ex { font: 600 9.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pl-dd { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.pl-dd .pl-ch { margin-bottom: 10px; }
.pl-foot { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; margin-top: 14px; }

/* Übersicht: Kachel Klausurvorbereitung */
.tile.wide { grid-column: span 6; min-height: 0; flex-direction: row; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.pl-tile .pt-l { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 320px; }
.pl-tile .pt-l .ti { margin: 0; flex: none; }
.pl-tile .pt-l > div:last-child { min-width: 0; display: grid; gap: 4px; }
.pl-tile .pt-r { display: flex; align-items: center; gap: 18px; flex: 1 1 300px; min-width: 0; }
.pl-tile .pt-n { display: flex; align-items: baseline; gap: 6px; flex: none; }
.pl-tile .pt-n b { font-size: 42px; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.pl-tile .pt-n span { font-size: 13px; color: color-mix(in srgb, var(--onInv) 65%, transparent); }
.pl-tile .pt-p { flex: 1; min-width: 0; display: grid; gap: 8px; }
.pl-tile .pt-p > span { font: 500 11.5px var(--mono); color: color-mix(in srgb, var(--onInv) 60%, transparent); }
.pl-tile .pt-bar { position: relative; height: 8px; border-radius: 8px; background: color-mix(in srgb, var(--onInv) 16%, transparent); }
.pl-tile .pt-bar i { display: block; height: 100%; border-radius: 8px; background: var(--onInv); min-width: 8px; }
.pl-tile .pt-bar s { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--onInv); opacity: .7; border-radius: 2px; }
.pl-tile .foot { margin: 0; padding: 0; }

/* Login: Ziel-Frage */
.lgoal { text-align: left; display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 0 0 18px; }
.lgoal > b { font-size: 15px; } .lgoal > b small { font: 500 11px var(--mono); color: var(--faint); }
.lgoal label { display: grid; gap: 6px; }
.lgoal label > span, .lgoal .lg-l { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.lgoal .lg-l { display: block; margin-bottom: 6px; }
.lgoal .lg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.modal.login .lgoal p { margin: 0; font-size: 12.5px; color: var(--mute); }

@media (max-width: 980px) {
  .tile.wide { grid-column: span 2; }
  .pl-hero { grid-template-columns: 1fr; gap: 22px; }
  .pl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .pl-wiz { padding: 18px; gap: 18px; }
  .pl-step { grid-template-columns: 1fr; gap: 8px; }
  .pl-n { display: none; }
  .pl-go .btn { width: 100%; }
  .pl-hero { padding: 22px 18px; border-radius: 20px; }
  .pl-big .n { font-size: 68px; }
  .pl-mf .face { width: 60px; height: 60px; }
  .pl-bub p { font-size: 14.5px; }
  .klplan .pl-card { padding: 16px; border-radius: 18px; }
  .pl-wk, .pl-month { gap: 4px; }
  .pl-day { height: 46px; padding: 4px 5px; border-radius: 9px; }
  .pl-day .dn { font-size: 11px; }
  .pl-day .dots { gap: 2px; } .pl-day .dots i { width: 5px; height: 5px; }
  .pl-day.exam .ex { font-size: 7.5px; letter-spacing: 0; }
  .pl-tile .pt-r { flex-basis: 100%; }
  .pl-7 i { width: 24px; height: 24px; }
}
.pl-day .lb { font: 500 9.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin-top: -2px; }
@media (max-width: 760px) { .pl-day .lb { display: none; } }
.asst-drag, .asst-drag * { user-select: none !important; -webkit-user-select: none !important; }
.pl-day.exam .ex { display: flex; align-items: center; gap: 4px; }
.pl-day.exam .ex .ico { width: 13px; height: 13px; }
.pl-day.exam .ex b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .pl-day.exam .ex b { display: none; } .pl-day.exam .ex .ico { width: 15px; height: 15px; } .pl-day .dn { font-size: 10.5px; letter-spacing: -.02em; } }
.pl-adj { margin: 12px 0 0 6px; color: var(--onInv); }
.pl-adj:hover { background: color-mix(in srgb, var(--onInv) 10%, transparent); }
/* Max steuert die App: kleine Bestätigungen */
.asst-done { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.asst-cmd { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink2); font: 550 11.5px var(--sans); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; animation: fadeUp .3s var(--ease) both; }
button.asst-cmd { cursor: pointer; }
button.asst-cmd:hover { border-color: var(--ink); color: var(--ink); }
.asst-cmd .ck { display: contents; }
.asst-cmd .ico { width: 13px; height: 13px; stroke-width: 2.2; }
.asst-cmd.run .ico { opacity: .4; }
.asst-cmd.no { white-space: normal; height: auto; padding: 4px 10px 4px 7px; border-style: dashed; color: var(--mute); }
/* Kopf zeigt, dass Max gerade zuhört / spricht / denkt (auch minimiert) */
.asst-bub::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--ink); opacity: 0; pointer-events: none; }
.asst:not(.open)[data-state="speak"] .asst-bub::after { opacity: .5; animation: vpulse 1.1s ease-in-out infinite; }
.asst:not(.open)[data-state="listen"] .asst-bub::after { opacity: .7; animation: vmicpulse 1.2s ease-in-out infinite; border-color: transparent; }
.asst:not(.open)[data-state="think"] .asst-bub::after { opacity: .3; border-style: dashed; animation: asstspin 3s linear infinite; }
@keyframes asstspin { to { transform: rotate(360deg); } }

/* Funktionen im Hero: Top 3 groß, Rest dezent */
.featrow { display: block; max-width: 860px; }
.feattop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feat.big { height: auto; padding: 14px 16px; border-radius: 18px; gap: 12px; text-align: left; justify-content: flex-start; align-items: center; background: var(--panel); border-color: var(--line2); color: var(--ink); line-height: 1.25; }
.feat.big .fi { width: 40px; height: 40px; border-radius: 12px; background: var(--inv); color: var(--onInv); display: grid; place-items: center; flex: none; }
.feat.big .fi .ico { width: 20px; height: 20px; }
.feat.big .ft { display: grid; gap: 2px; min-width: 0; }
.feat.big b { font-size: 15px; font-weight: 650; }
.feat.big small { font-size: 12.5px; color: var(--mute); font-weight: 500; }
.feat.big:hover, .feat.big.hl { background: var(--panel); color: var(--ink); border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); }
.featrest { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.featrest .feat { height: 30px; font-size: 12.5px; color: var(--mute); background: transparent; border-color: var(--line); }
.featrest .feat:hover { color: var(--ink); border-color: var(--ink); background: transparent; }
.featrest .feat > span, .featrest .feat .ico { width: 15px; height: 15px; }
@media (max-width: 760px) { .feattop { grid-template-columns: 1fr; gap: 8px; } .feat.big { padding: 11px 14px; } }

/* Themenfeld: leere Eingabe sichtbar machen */
.askbar.bad { border-color: var(--ink); animation: askshake .35s; }
@keyframes askshake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(5px); } }
.askhint { max-width: 720px; margin: 8px auto 0; font-size: 13px; font-weight: 550; color: var(--ink); text-align: center; }

/* Gedankenblase: die kleinen animierten Denk-Punkte am Kopf führen hinein (keine großen Kreise) */
.thought::before, .thought::after { display: none; }
.thinkwrap .thought { left: calc(100% + 2px); bottom: calc(100% - 6px); border-radius: 20px 20px 20px 5px; translate: none; text-align: left; }
@media (max-width: 760px) {
  .loading .thinkwrap, .ingest .thinkwrap { margin-top: 70px; translate: -62px 0; }
  .thinkwrap .thought { left: calc(100% + 4px); bottom: calc(100% + 2px); max-width: min(190px, calc(100vw - 230px)); font-size: 13px; padding: 9px 12px; }
}
.feat.big > .fi { width: 40px; height: 40px; }
.feat.big > .ft { width: auto; height: auto; display: grid; place-items: start; flex: 1; white-space: normal; }

/* Max-Assistent auf der Startseite: erst beim Scrollen + Ausblenden-Knopf */
.asst.landtop:not(.open) .asst-bub { opacity: 0; pointer-events: none; transform: translateY(14px) scale(.6); }
.asst.land .asst-bub { transition: transform .45s cubic-bezier(.34,1.56,.64,1), border-color .2s, opacity .3s; }
.asst-x { position: absolute; top: -5px; left: -5px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); color: var(--ink); border: 1px solid var(--line2); box-shadow: var(--shadow); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s var(--ease); cursor: pointer; }
.asst-x .ico { width: 11px; height: 11px; stroke-width: 2.4; }
.asst-x:hover { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
@media (hover: hover) { .asst-bub:hover .asst-x { opacity: 1; transform: none; } }
.asst.dragging .asst-x { opacity: 0 !important; }
footer.foot .asst-tg { background: none; border: 0; padding: 0; font: inherit; color: var(--mute); cursor: pointer; margin-right: 14px; }
footer.foot .asst-tg:hover { color: var(--ink); }

/* Mobile-Fixes: Chat-Spalte, Tabs mit Beschriftung, Schließen-X, Laufband */
.tutor { grid-template-columns: minmax(330px, 420px) minmax(0, 1fr); }
.chatcol { min-width: 0; }
.asst-close .ico { width: 20px; height: 20px; stroke-width: 2.3; }
.asst-close { color: var(--ink); }
.marquee .track { will-change: transform; }
@keyframes marq { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: marq 70s linear infinite !important; } }
@media (max-width: 980px) { .tutor { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .chathead { gap: 8px; padding: 10px 12px; }
  .chathead .face { width: 38px; height: 38px; }
  .chathead .field.spice { flex: none; max-width: 112px; padding: 0 28px 0 12px; height: 36px; font-size: 13.5px; }
  .chathead .talkbtn, .chathead .mob-only { width: 36px; height: 36px; flex: none; }
  .composer .opts { flex-wrap: wrap; }
  .topbar { height: 62px; }
  .tabs { min-width: 0; padding: 4px; gap: 4px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 18px), transparent); scroll-behavior: smooth; }
  .tab { height: 40px; padding: 0 15px; font-size: 14.5px; gap: 7px; }
  .tab span { display: inline; }
  .tab .ico { width: 17px; height: 17px; }
  .asst-ib { width: 40px; height: 40px; }
}

/* ===== Handy-Vereinfachung ===== */
@media (max-width: 760px) {
  /* 1 Startseite: Neben-Funktionen als wischbare Zeile, keine Schnupper-Chips */
  .featrest { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 0; padding: 2px 16px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); }
  .featrest::-webkit-scrollbar { display: none; }
  .featrest .feat { flex: none; }
  .hero .trybar { display: none; }
}
@media (max-width: 760px) {
  /* 2 Übersicht: Plan + Max oben, Lernstand schmal, Werkzeuge als 2er-Raster */
  .hub { gap: 10px; }
  .hub .hub-chips { display: none !important; }
  .hub .hub-max { padding: 16px; }
  .hub .hub-max .face { width: 46px !important; height: 46px !important; }
  .hub .hub-max h3 { font-size: 18px !important; }
  .hub .hub-max p { font-size: 13px; }
  .hub .hub-max form { margin-top: 12px !important; }
  .hub .hub-prog { flex-direction: row; align-items: center; gap: 12px; padding: 10px 14px; min-height: 0; }
  .hub .hub-prog .ring { width: 40px; height: 40px; flex: none; }
  .hub .hub-prog .ring > div { width: 32px; height: 32px; font-size: 11px; }
  .hub .hub-prog h3 { margin: 0 !important; font-size: 15px; }
  .hub .hub-prog p { font-size: 13px; margin-left: auto; text-align: right; }
  .hub .hub-tool { grid-column: span 1; padding: 14px; min-height: 0; gap: 0; display: flex; flex-direction: column; align-items: flex-start; }
  .hub .hub-tool .ti { width: 34px; height: 34px; margin-bottom: 10px; }
  .hub .hub-tool h3 { font-size: 14.5px; line-height: 1.25; }
  .hub .hub-tool p, .hub .hub-tool .foot { display: none; }
}
/* 5 Tipp von Max: schmale Leiste */
.mtip { left: 12px; right: 84px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); gap: 8px; padding: 6px 4px 6px 8px; border-radius: 999px; }
.mtip .mtf { width: 28px; height: 28px; }
.mtip .mtx { margin: 0; flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.3; color: var(--ink2); }
.mtip .mtx b { display: inline; font-size: inherit; color: var(--ink); }
.mtip .iconbtn { width: 30px; height: 30px; flex: none; }
/* 6 Lange Wörter: Silbentrennung statt Bruch mitten im Wort */
.vh h2, .hero h1, .empty h2, .pin h3, .tile h3, .cover h3, .vh p, .tafel h2 { overflow-wrap: break-word; word-break: normal; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 7 3 3; }
.cover h3 { min-width: 0; max-width: 100%; }
@media (max-width: 760px) { .vh h2 { font-size: 25px; } .cover h3 { font-size: 21px; } }
/* 3+4 Zusatz-Einstellungen hinter „Anpassen“ */
.more-opts { margin-top: 14px; }
.more-opts > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); font: 600 13.5px var(--sans); color: var(--ink2); cursor: pointer; user-select: none; -webkit-user-select: none; }
.more-opts > summary::-webkit-details-marker { display: none; }
.more-opts > summary .ico { width: 16px; height: 16px; }
.more-opts > summary .mo-chev .ico { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.more-opts[open] > summary .mo-chev .ico { transform: rotate(90deg); }
.more-opts .mo-body { padding-top: 14px; }
@media (min-width: 761px) { .more-opts > summary { display: none; } .more-opts .mo-body { padding-top: 0; } }
@media (max-width: 760px) {
  /* 8 Trainer: kompakte Karten */
  .tr-grid { gap: 8px; grid-template-columns: 1fr; }
  .tr-grid .tr-card { display: grid; grid-template-columns: 40px 1fr 16px; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; min-height: 0; padding: 12px 14px; }
  .tr-grid .tr-card .tr-ico { grid-row: 1 / 3; grid-column: 1; margin: 0; width: 40px; height: 40px; }
  .tr-grid .tr-card .eyebrow { display: none; }
  .tr-grid .tr-card h3 { grid-column: 2; grid-row: 1; margin: 0; font-size: 15.5px; }
  .tr-grid .tr-card p { grid-column: 2; grid-row: 2; font-size: 12.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tr-grid .tr-card .tr-card-f { grid-column: 3; grid-row: 1 / 3; margin: 0; padding: 0; }
  .tr-grid .tr-card .tr-card-f span { display: none; }
  .tr-grid .tr-card .tr-card-f .tr-go { margin: 0; }
}
/* 7 Seitenleiste unten: eine dezente Link-Zeile */
.side-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 4px; padding-top: 4px; }
.side-links button { background: none; border: 0; padding: 4px 6px; font: 500 12px var(--sans); color: var(--mute); cursor: pointer; border-radius: 6px; }
.side-links button:hover { color: var(--ink); background: var(--panel2); }

/* ===== Lebendige Welle (hören / sprechen) ===== */
.lwave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 30px; min-width: 0; }
.lwave i { display: block; flex: 0 1 4px; width: 4px; min-width: 2px; height: 100%; border-radius: 4px; background: currentColor; transform: scaleY(.12); transform-origin: center; transition: transform .07s linear; }
.lwave[data-mode="talk"] i { transition: transform .12s ease-out; }

.asst-live { display: none; align-items: center; gap: 12px; margin: 0 12px 8px; padding: 8px 8px 8px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line2); }
.asst[data-state="listen"] .asst-live, .asst[data-state="speak"] .asst-live { display: flex; animation: fadeUp .25s var(--ease) both; }
.asst[data-state="listen"] .asst-sugg, .asst[data-state="speak"] .asst-sugg { display: none; }
.asst-live .al-l { font: 600 13px var(--sans); white-space: nowrap; color: var(--ink); }
.asst-live .lwave { flex: 1; color: var(--ink); }
.al-stop { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px 0 12px; border-radius: 999px; border: 0; background: var(--inv); color: var(--onInv); font: 650 13.5px var(--sans); cursor: pointer; }
.al-stop .ico { width: 15px; height: 15px; }
.al-stop:active { transform: scale(.96); }
.asst[data-state="listen"] .asst-live .al-l::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; margin-right: 8px; vertical-align: 1px; animation: recdot 1s ease-in-out infinite; }
@keyframes recdot { 50% { opacity: .25; } }

/* Stopp direkt am Kopf, wenn Max minimiert weiterredet */
.asst-bs { position: absolute; bottom: -6px; left: -8px; height: 26px; min-width: 26px; padding: 0 7px; border-radius: 999px; display: none; place-items: center; background: var(--inv); color: var(--onInv); box-shadow: var(--shadow); cursor: pointer; }
.asst-bs .ico { width: 12px; height: 12px; }
.asst:not(.open)[data-state="speak"] .asst-bs, .asst:not(.open)[data-state="listen"] .asst-bs { display: grid; animation: fadeUp .25s var(--ease) both; }

/* Antwort tippt sich: blinkender Cursor */
.typing-on > :last-child::after, .typing-on:not(:has(> *))::after { content: ""; display: inline-block; width: .5em; height: 1em; margin-left: 2px; vertical-align: -.12em; background: currentColor; opacity: .55; animation: tcur .8s steps(1) infinite; }
@keyframes tcur { 50% { opacity: 0; } }

/* Sprich-mit-mir: Welle unter Max */
.voice .vwave { width: min(260px, 70vw); height: 44px; margin: 4px auto 0; color: var(--ink); opacity: 0; transition: opacity .25s; }
.voice .vwave .lwave { height: 44px; gap: 4px; }
.voice .vwave .lwave i { flex-basis: 5px; width: 5px; }
.voice[data-state="listen"] .vwave, .voice[data-state="speak"] .vwave { opacity: 1; }
/* Laufende Umrandung auch bei den kleinen Funktionen */
.featrest .feat { transition: color .3s, border-color .3s, transform .35s var(--ease); }
.featrest .feat.hl { color: var(--ink); border-color: var(--ink); background: transparent; transform: translateY(-2px); }
.featrow[data-in].in .featrest .feat.hl { transform: translateY(-2px); }
/* Live-Mitschrift beim Sprechen */
.asst-m.me.draft { opacity: .75; border-style: dashed; }
.asst-m.me.draft::after { content: ""; display: inline-block; width: .45em; height: 1em; margin-left: 3px; vertical-align: -.12em; background: currentColor; opacity: .5; animation: tcur .8s steps(1) infinite; }
.voice .vlive { opacity: .8; }

/* =====================================================================
   Schwebender Max v2 – ohne Chatbox: Insel-Leiste, Untertitel, Tafel über der Seite
   ===================================================================== */
.asst { --kb: 0px; --sl: 0px; --isl-w: min(520px, calc(100vw - var(--sl) - 32px)); --bw: min(560px, 42vw); --gl: color-mix(in srgb, var(--panel) 86%, transparent); }
.asst .ai-isl, .asst .ai-cap, .asst .ai-board, .asst .ai-btab, .asst .ai-menu { display: none; }
.asst.open .ai-isl { display: flex; }
.asst-bub { z-index: 76; }

/* Insel */
.ai-isl { position: fixed; z-index: 86; left: calc(var(--sl) + (100vw - var(--sl)) / 2); bottom: calc(18px + var(--kb) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: var(--isl-w); height: 64px; align-items: center; gap: 6px; padding: 0 8px 0 8px; border-radius: 999px; background: var(--gl); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); border: 1px solid var(--line2); box-shadow: 0 18px 50px -18px rgba(0,0,0,.55), var(--shadow); color: var(--ink); transition: left .35s var(--ease), width .35s var(--ease); }
.asst.has-board:not(.board-min) .ai-isl, .asst.has-board:not(.board-min) .ai-cap { left: calc(var(--sl) + (100vw - var(--sl) - var(--bw) - 24px) / 2); width: min(var(--isl-w), calc(100vw - var(--sl) - var(--bw) - 64px)); }
.ai-fw { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; position: relative; }
.ai-fw::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--ink); opacity: 0; transition: opacity .3s; }
.asst[data-state="listen"] .ai-fw::after { opacity: .55; animation: vmicpulse 1.2s ease-in-out infinite; }
.asst[data-state="think"] .ai-fw::after { opacity: .35; border-style: dashed; animation: asstspin 3s linear infinite; }
.ai-f { width: 42px; height: 42px; display: block; margin-top: 2px; }
.ai-mid { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 100%; position: relative; }
.ai-st { font: 600 14px var(--sans); color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text; flex: none; max-width: 100%; }
.asst[data-state="idle"] .ai-st { color: var(--mute); font-weight: 550; }
.ai-mid .lwave { flex: 1; height: 28px; color: var(--ink); display: none; }
.asst[data-state="listen"] .ai-mid .lwave, .asst[data-state="speak"] .ai-mid .lwave { display: flex; }
.asst[data-state="listen"] .ai-st, .asst[data-state="speak"] .ai-st { max-width: 46%; }
.asst[data-state="listen"] .ai-st::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; margin-right: 8px; vertical-align: 1px; animation: recdot 1s ease-in-out infinite; }
.ai-in { display: none; flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 16px var(--sans); }
.asst.typing .ai-in { display: block; }
.asst.typing .ai-st, .asst.typing .ai-mid .lwave { display: none !important; }
.ai-b { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .15s; }
.ai-b[hidden] { display: none; }
.ai-b .ico { width: 20px; height: 20px; }
.ai-b:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.ai-b:active { transform: scale(.93); }
.ai-b.primary { background: var(--inv); color: var(--onInv); width: 48px; height: 48px; }
.ai-b.primary:hover { background: var(--inv); filter: brightness(1.08); }
.ai-b.primary .ico { width: 21px; height: 21px; }
.ai-b.ai-stop .ico { width: 18px; height: 18px; }
.ai-b.ai-mute.off { color: var(--mute); }
.ai-b.ai-close { width: 36px; height: 36px; color: var(--mute); }
.ai-b.ai-close .ico { width: 17px; height: 17px; }
.ai-b:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Menü (Stimme, neues Gespräch, ausblenden) */
.asst.open .ai-menu:not([hidden]) { display: block; }
.ai-menu { position: fixed; z-index: 88; left: calc(var(--sl) + (100vw - var(--sl)) / 2); transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); width: min(320px, calc(100vw - 32px)); padding: 12px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow), 0 20px 50px -20px rgba(0,0,0,.5); animation: aimenuin .22s var(--ease) both; }
@keyframes aimenuin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translateX(-50%); } }
.ai-menu .asst-vch { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.ai-menu .asst-mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 8px; border: 0; background: none; color: var(--ink); font: 550 14px var(--sans); border-radius: 10px; cursor: pointer; text-align: left; }
.ai-menu .asst-mi:hover { background: var(--panel2); }
.ai-menu .asst-mi .ico { width: 17px; height: 17px; }

/* Untertitel-Karte */
.asst.open.has-cap .ai-cap { display: block; }
.ai-cap { position: fixed; z-index: 85; left: calc(var(--sl) + (100vw - var(--sl)) / 2); transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); width: var(--isl-w); max-height: min(40vh, 340px); border-radius: 22px; background: var(--gl); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); border: 1px solid var(--line2); box-shadow: 0 18px 50px -20px rgba(0,0,0,.5); color: var(--ink); animation: aicapin .35s cubic-bezier(.16,1,.3,1) both; touch-action: none; transition: transform .25s var(--ease), opacity .25s, left .35s var(--ease), max-height .3s var(--ease); display: none; overflow: hidden; }
@keyframes aicapin { from { opacity: 0; transform: translate(-50%, 12px) scale(.97); } to { opacity: 1; transform: translateX(-50%); } }
.ai-cap .ai-grab { display: flex; justify-content: center; padding: 7px 0 0; cursor: grab; }
.ai-cap .ai-grab i, .ai-board .ai-grab i { width: 36px; height: 4px; border-radius: 4px; background: var(--line2); }
.ai-cx { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--mute); display: grid; place-items: center; cursor: pointer; z-index: 1; }
.ai-cx:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.ai-cx .ico { width: 15px; height: 15px; }
.ai-cb { max-height: calc(min(40vh, 340px) - 18px); overflow-y: auto; padding: 4px 44px 16px 20px; overscroll-behavior: contain; touch-action: pan-y; }
.ai-q { font: 500 13.5px/1.45 var(--sans); color: var(--mute); margin-bottom: 6px; }
.ai-q:empty { display: none; }
.ai-q.live { font-size: 17px; line-height: 1.45; color: var(--ink); font-weight: 550; }
.ai-q.live::after { content: ""; display: inline-block; width: .45em; height: 1em; margin-left: 3px; vertical-align: -.12em; background: currentColor; opacity: .5; animation: tcur .8s steps(1) infinite; }
.ai-a { font: 500 16.5px/1.55 var(--sans); color: var(--ink); }
.ai-a p { margin: 0 0 .5em; } .ai-a p:last-child { margin-bottom: 0; }
.ai-a:empty { display: none; }
.ai-x { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ai-x:empty { display: none; }
.ai-cmd { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 9px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--ink); font: 600 12.5px var(--sans); text-decoration: none; cursor: pointer; }
.ai-cmd .ck { display: grid; place-items: center; width: 16px; height: 16px; }
.ai-cmd .ck .ico { width: 14px; height: 14px; }
.ai-cmd.run .ck { animation: asstspin 1s linear infinite; }
.ai-cmd.ok { border-color: var(--ink); }
.ai-cmd.no { color: var(--mute); }
.ai-cmd.link:hover { border-color: var(--ink); }
/* eingeklappt: eine Zeile */
.asst.cap-min .ai-cap { max-height: 46px; cursor: pointer; }
.asst.cap-min .ai-cb { overflow: hidden; padding-top: 0; }
.asst.cap-min .ai-q, .asst.cap-min .ai-x { display: none; }
.asst.cap-min .ai-a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; color: var(--ink2); }
.asst.cap-min .ai-a p { display: inline; }

/* Tafel über der Seite */
.asst.has-board:not(.board-min) .ai-board { display: flex; }
.asst.has-board.board-min .ai-btab { display: inline-flex; }
.ai-board { position: fixed; z-index: 84; top: 76px; right: 20px; bottom: 20px; width: var(--bw); flex-direction: column; border-radius: 24px; background: var(--bg); border: 1px solid var(--line2); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6), var(--shadow); overflow: hidden; animation: aiboardin .45s cubic-bezier(.16,1,.3,1) backwards; transition: transform .25s var(--ease); }
@keyframes aiboardin { from { opacity: 0; transform: translateX(40px) scale(.98); } to { opacity: 1; transform: none; } }
.ai-board .ai-grab { display: none; justify-content: center; padding: 8px 0 2px; cursor: grab; touch-action: none; }
.ai-bh { display: flex; align-items: center; gap: 6px; padding: 12px 10px 12px 18px; border-bottom: 1px solid var(--line); }
.ai-bh > span:first-child .ico { width: 18px; height: 18px; }
.ai-bh b { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-left: 4px; }
.ai-bh .cnt { font: 500 12px var(--mono); color: var(--mute); margin-right: 4px; }
.ai-bh .iconbtn[hidden] { display: none; }
.ai-ba { flex: 1; overflow: auto; overscroll-behavior: contain; }
.ai-ba .tafel { padding: 26px 28px 60px; }
.ai-btab { position: fixed; z-index: 84; right: 0; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; align-items: center; gap: 8px; padding: 14px 9px; border-radius: 14px 0 0 14px; border: 1px solid var(--line2); border-right: 0; background: var(--panel); color: var(--ink); font: 650 13px var(--sans); cursor: pointer; box-shadow: var(--shadow); }
.ai-btab .ico { width: 17px; height: 17px; transform: rotate(90deg); }
/* Tafel „schreibt mit“ */
.tafel.ai-write > .ai-hide { opacity: 0; transform: translateY(8px); }
.tafel.ai-write > .ai-shown { animation: fadeUp .45s var(--ease) both; }

/* Kopf: Stopp-Knopf auch wenn eingeklappt */
.asst.unread:not(.open) .asst-dot { transform: scale(1); }

/* Handy */
@media (max-width: 600px) {
  .asst { --isl-w: calc(100vw - 20px); }
  .ai-isl { bottom: calc(10px + var(--kb) + env(safe-area-inset-bottom, 0px)); height: 62px; gap: 4px; padding: 0 6px 0 7px; }
  .ai-cap { bottom: calc(80px + var(--kb) + env(safe-area-inset-bottom, 0px)); max-height: 34vh; }
  .ai-cb { max-height: calc(34vh - 18px); }
  .ai-menu { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .ai-b { width: 42px; height: 42px; }
  .ai-b.primary { width: 46px; height: 46px; }
  .asst[data-state="listen"] .ai-st, .asst[data-state="speak"] .ai-st { max-width: 52%; font-size: 13px; }
  .ai-board { top: calc(10px + env(safe-area-inset-top, 0px)); left: 8px; right: 8px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); border-radius: 22px; animation-name: aisheetin; }
  @keyframes aisheetin { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
  .ai-board .ai-grab { display: flex; }
  .ai-bh { padding-top: 6px; }
  .ai-ba .tafel { padding: 18px 16px 40px; }
  .asst.has-board:not(.board-min) .ai-isl, .asst.has-board:not(.board-min) .ai-cap { left: 50%; width: var(--isl-w); }
  /* Tafel offen: Untertitel als schmale Leiste über der Insel */
  .asst.has-board:not(.board-min).has-cap .ai-board { bottom: calc(84px + 64px + env(safe-area-inset-bottom, 0px)); }
  .asst.has-board:not(.board-min) .ai-cap { max-height: 56px; }
  .asst.has-board:not(.board-min) .ai-cap .ai-q, .asst.has-board:not(.board-min) .ai-cap .ai-x, .asst.has-board:not(.board-min) .ai-cap .ai-grab { display: none; }
  .asst.has-board:not(.board-min) .ai-cap .ai-cb { padding: 10px 44px 10px 16px; max-height: 56px; }
  .asst.has-board:not(.board-min) .ai-cap .ai-a { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ai-btab { top: auto; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 980px) and (min-width: 601px) { .asst { --bw: min(520px, 58vw); } }
@media print { .ai-isl, .ai-cap, .ai-board, .ai-btab { display: none !important; } }
/* Ruhezustand: „Tippen oder sprechen“ sieht aus wie ein Eingabefeld */
.asst[data-state="idle"]:not(.typing) .ai-st { flex: 1; height: 42px; display: flex; align-items: center; padding: 0 14px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); border: 1px solid var(--line); }
.asst[data-state="idle"]:not(.typing) .ai-st:hover { border-color: var(--line2); }
.asst.typing .ai-in { padding: 0 14px; height: 42px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); border: 1px solid var(--line2); }

/* Gespräch als schwebende Blasen (wie WhatsApp – nur der Hintergrund ist die Webseite) */
.ai-feed { display: none; position: fixed; z-index: 85; left: calc(var(--sl) + (100vw - var(--sl)) / 2); transform: translateX(-50%); bottom: calc(94px + var(--kb) + env(safe-area-inset-bottom, 0px)); width: var(--isl-w); max-height: min(58vh, 560px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; pointer-events: none; padding: 26px 2px 4px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 34px); mask-image: linear-gradient(to bottom, transparent 0, #000 34px); transition: left .35s var(--ease), width .35s var(--ease); }
.ai-feed::-webkit-scrollbar { display: none; }
.asst.open.has-cap .ai-feed { display: block; }
.asst.has-board:not(.board-min) .ai-feed { left: calc(var(--sl) + (100vw - var(--sl) - var(--bw) - 24px) / 2); width: min(var(--isl-w), calc(100vw - var(--sl) - var(--bw) - 64px)); }
.ai-fl { display: flex; flex-direction: column; gap: 8px; transition: transform .25s var(--ease), opacity .25s; }
.ai-bub { pointer-events: auto; max-width: 86%; padding: 10px 14px; border-radius: 20px; font: 500 15.5px/1.5 var(--sans); box-shadow: 0 10px 30px -14px rgba(0,0,0,.55), 0 1px 2px rgba(0,0,0,.12); animation: aibubin .35s cubic-bezier(.16,1,.3,1) backwards; overflow-wrap: anywhere; touch-action: pan-y; }
.ai-bub[hidden] { display: none; }
@keyframes aibubin { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.ai-bub.me { align-self: flex-end; background: var(--inv); color: var(--onInv); border-bottom-right-radius: 6px; }
.ai-bub.me.live { opacity: .82; }
.ai-bub.me.live::after { content: ""; display: inline-block; width: .42em; height: 1em; margin-left: 3px; vertical-align: -.12em; background: currentColor; opacity: .55; animation: tcur .8s steps(1) infinite; }
.ai-bub.max { align-self: flex-start; background: var(--gl); color: var(--ink); border: 1px solid var(--line2); border-bottom-left-radius: 6px; -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); }
.ai-bub .ai-a p { margin: 0 0 .45em; } .ai-bub .ai-a p:last-child { margin-bottom: 0; }
.ai-bub .ai-x { margin-top: 8px; }
.ai-bub .ai-x:empty { display: none; }
.ai-bub .ai-a .typing { display: inline-flex; padding: 4px 0; }
.ai-cmd.tap { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
/* Eingeklappt: nur die aktuelle Frage + Antwort */
.asst:not(.feed-open) .ai-bub:not(.last) { display: none; }
.ai-ft { pointer-events: auto; position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px; margin: 0 auto 10px; height: 30px; padding: 0 13px 0 9px; border-radius: 999px; border: 1px solid var(--line2); background: var(--gl); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--ink2); font: 600 12.5px var(--sans); cursor: pointer; box-shadow: 0 6px 20px -10px rgba(0,0,0,.5); }
.ai-ft[hidden] { display: none; }
.ai-ft .ico { width: 14px; height: 14px; }
.ai-ft:hover { color: var(--ink); border-color: var(--ink); }
@media (max-width: 600px) {
  .ai-feed { bottom: calc(80px + var(--kb) + env(safe-area-inset-bottom, 0px)); max-height: 46vh; }
  .asst.feed-open .ai-feed { max-height: 64vh; }
  .ai-bub { font-size: 15px; max-width: 90%; }
  /* eingeklappt am Handy: Antwort höchstens 4 Zeilen, Antippen klappt auf */
  .asst:not(.feed-open) .ai-bub.max .ai-a { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .asst.has-board:not(.board-min) .ai-feed { left: 50%; width: var(--isl-w); max-height: 30vh; }
  .asst.has-board:not(.board-min):not(.feed-open) .ai-bub.me.last { display: none; }
  .asst.has-board:not(.board-min):not(.feed-open) .ai-bub.max .ai-a { -webkit-line-clamp: 2; }
  .asst.has-board:not(.board-min).has-cap .ai-board { bottom: calc(84px + 96px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== Max v3: großer Kopf, Tippen sofort, Mikro als Option, feste Blasen ===== */
.asst-bub { width: 104px; height: 104px; border-width: 1.5px; box-shadow: 0 18px 50px -16px rgba(0,0,0,.55), var(--shadow); }
.asst-bub .asst-bf { width: 80px; height: 80px; margin-top: 6px; }
.asst-dot { width: 16px; height: 16px; top: 6px; right: 6px; }
.asst-x { top: -2px; left: -2px; width: 26px; height: 26px; }
.asst-x .ico { width: 13px; height: 13px; }
.asst-bs { height: 32px; min-width: 32px; bottom: -4px; left: -6px; }
.asst-tip { font: 650 14.5px var(--sans); padding: 10px 15px; right: calc(100% + 14px); box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); }
.asst-tip::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; background: inherit; transform: translateY(-50%) rotate(45deg); border-radius: 2px; }
.asst.tip-on:not(.open):not(.landtop):not(.covered):not(.dragging) .asst-tip { opacity: 1; transform: none; pointer-events: auto; animation: aitipnudge 2.6s ease-in-out 1.2s infinite; }
@keyframes aitipnudge { 0%, 70%, 100% { translate: 0 -50%; } 80% { translate: -6px -50%; } 90% { translate: 0 -50%; } }
@media (max-width: 600px) {
  .asst-bub { width: 84px; height: 84px; }
  .asst-bub .asst-bf { width: 64px; height: 64px; margin-top: 5px; }
  .asst-tip { font-size: 13.5px; padding: 9px 13px; }
}
/* Auf dem Max-Tab ist Max schon die ganze Seite */
.asst.ontutor .asst-bub, .asst.ontutor .ai-isl, .asst.ontutor .ai-feed, .asst.ontutor .ai-menu, .asst.ontutor .ai-bd { display: none !important; }

/* Insel: Gesicht = Einstellungen, Feld immer da, „Sprich mit Max“ als Option */
.ai-fw { border: 0; background: transparent; cursor: pointer; padding: 0; color: inherit; }
.ai-fw:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.asst[data-state="idle"] .ai-st { display: none !important; }
.asst[data-state="idle"] .ai-in { display: block; padding: 0 16px; height: 46px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); border: 1px solid var(--line2); }
.asst[data-state="idle"] .ai-in:focus { border-color: var(--ink); }
.asst:not([data-state="idle"]) .ai-in { display: none !important; }
.ai-talk { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 16px 0 13px; border-radius: 999px; border: 0; background: var(--inv); color: var(--onInv); font: 650 14px var(--sans); cursor: pointer; white-space: nowrap; transition: transform .15s, filter .15s; }
.ai-talk[hidden] { display: none; }
.ai-talk .ico { width: 18px; height: 18px; }
.ai-talk:hover { filter: brightness(1.08); }
.ai-talk:active { transform: scale(.96); }
@media (max-width: 600px) {
  .ai-talk { height: 44px; padding: 0 12px 0 10px; font-size: 13px; gap: 5px; }
  .ai-talk .ico { width: 16px; height: 16px; }
  .asst[data-state="idle"] .ai-in { height: 44px; padding: 0 13px; font-size: 16px; }
  .ai-fw { width: 40px; height: 40px; } .ai-f { width: 36px; height: 36px; }
}

/* Blasen: richtig fest, nicht durchsichtig */
.ai-bub.max { background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--line2); }
:root[data-theme="dark"] .ai-bub.max, .ai-bub.max { box-shadow: 0 12px 34px -14px rgba(0,0,0,.7), 0 1px 2px rgba(0,0,0,.2); }
.ai-bub.greet .ai-a { font-size: 15px; }
.ai-ft { background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; height: 34px; font-size: 13px; }

/* Handy: Verlauf offen = Seite dahinter dunkel & gesperrt, Verlauf scrollbar */
.ai-bd { display: none; position: fixed; inset: 0; z-index: 83; background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: aifade .25s ease both; }
@keyframes aifade { from { opacity: 0; } }
.asst.lock .ai-bd { display: block; }
html.asst-lock, html.asst-lock body, html.asst-lock #view, html.asst-lock .view { overflow: hidden !important; overscroll-behavior: none; }
@media (max-width: 600px) {
  .asst.feed-open .ai-feed { pointer-events: auto; max-height: calc(100dvh - 120px - var(--kb) - env(safe-area-inset-bottom, 0px)); top: auto; -webkit-mask-image: none; mask-image: none; padding-top: 6px; }
  .asst.feed-open .ai-ft { position: sticky; top: 0; margin: 0 0 12px auto; height: 36px; padding: 0 14px 0 10px; color: var(--ink); border-color: var(--ink); }
  .asst:not(.feed-open) .ai-ft { margin: 0 0 8px auto; }
  /* Tafel offen: Text läuft unten in der Tafel mit, keine schwebenden Blasen darüber */
  .asst.has-board:not(.board-min) .ai-feed { display: none !important; }
  .asst.has-board:not(.board-min) .ai-board { bottom: calc(84px + var(--kb) + env(safe-area-inset-bottom, 0px)) !important; z-index: 86; }
  .ai-bsay:not(:empty) { display: block; }
}
.ai-bsay { display: none; flex: none; max-height: 30%; overflow-y: auto; padding: 12px 18px 14px; border-top: 1px solid var(--line); background: var(--panel); font: 500 15px/1.5 var(--sans); color: var(--ink); }
.ai-bsay p { margin: 0 0 .4em; } .ai-bsay p:last-child { margin: 0; }
.ai-bsay .ai-x { display: none; }
.ai-bsay::before { content: "Max"; display: block; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
/* Laptop: Seite bleibt scrollbar – nur über dem Verlauf scrollt der Verlauf (und nichts anderes) */
@media (min-width: 601px) {
  .asst.feed-open .ai-feed { pointer-events: auto; overscroll-behavior: contain; }
}
.asst { color: var(--ink); } .ai-board { color: var(--ink); }
/* „Verlauf“-Knopf: eigenständig, immer gut sichtbar über den Blasen */
.asst > .ai-ft { display: none; position: fixed; z-index: 87; transform: translateX(-50%); margin: 0; height: 34px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: 650 13px var(--sans); box-shadow: 0 8px 24px -10px rgba(0,0,0,.6); }
.asst.tog-on > .ai-ft:not([hidden]) { display: inline-flex; }
.asst.feed-open > .ai-ft { border-color: var(--ink); }
.ai-feed { padding-top: 10px; -webkit-mask-image: none; mask-image: none; }
/* Tafel: – = minimieren, × fragt nach */
.ai-bmin .ico { width: 18px; height: 18px; stroke-width: 2.4; }
.ai-bask { position: absolute; z-index: 3; top: 58px; right: 12px; width: min(330px, calc(100% - 24px)); padding: 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 20px 50px -18px rgba(0,0,0,.65); animation: fadeUp .2s var(--ease) both; }
.ai-bask[hidden] { display: none; }
.ai-bask b { display: block; font-size: 15.5px; margin-bottom: 4px; }
.ai-bask p { margin: 0 0 12px; font-size: 13.5px; color: var(--mute); line-height: 1.45; }
.ai-bask-r { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-bask .btn .ico { width: 15px; height: 15px; }
.ai-bask .ai-del { background: #e5372b; color: #fff; border-color: #e5372b; }
.ai-bask .ai-del:hover { background: #c92b20; border-color: #c92b20; }
.ai-board { position: fixed; }
.ai-board > .ai-bask { position: absolute; }
/* ⋯ neben Max = Einstellungen */
.ai-dots { flex: none; width: 30px; height: 40px; margin-left: -4px; border: 0; background: transparent; color: var(--mute); display: grid; place-items: center; cursor: pointer; border-radius: 10px; }
.ai-dots[hidden] { display: none; }
.ai-dots:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.ai-dots .ico { width: 20px; height: 20px; }
/* Ausblenden-× am Kopf nur am Laptop beim Drüberfahren klickbar – am Handy nie aus Versehen */
.asst-x { pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .asst-bub:hover .asst-x { pointer-events: auto; } }
@media (hover: none) { .asst-x { display: none !important; } }
/* Verlauf offen am Handy: entspannt scrollen */
@media (max-width: 600px) {
  .asst.feed-open .ai-feed { -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  .ai-dots { width: 26px; margin-left: -6px; }
  .ai-fw { width: 38px; height: 38px; } .ai-f { width: 34px; height: 34px; }
  .ai-talk .lbl { font-size: 12.5px; }
}
.asst > .ai-ft { position: fixed !important; margin: 0 !important; top: auto; }
/* Kein halbes „Einfärben“ beim Drüberfahren über Antwortoptionen */
.opt::before { display: none !important; }

/* Drucken / PDF: immer tiefschwarz auf weiß – egal ob dunkles oder helles Design */
@media print {
  :root, :root[data-theme="dark"], :root[data-theme="light"] { --ink: #000; --ink2: #000; --mute: #111; --faint: #333; --bg: #fff; --bg2: #fff; --panel: #fff; --panel2: #fff; --line: #999; --line2: #666; --inv: #fff; --onInv: #000; color-scheme: light; }
  html, body { background: #fff !important; }
  *, *::before, *::after { color: #000 !important; background: transparent !important; box-shadow: none !important; text-shadow: none !important; opacity: 1 !important; filter: none !important; }
  .dots, .bgdots, #pagebg, .mtip, .asst, .asst-back, .toasts, .ai-isl, .ai-feed, .ai-board, .ai-btab { display: none !important; }
  .tafel .calc, .tafel .result, .tafel .example, .tafel .step, .tafel .warn, .card, .tile, .mm-node, .chip { border: 1px solid #555 !important; }
  svg text { fill: #000 !important; }
  svg path, svg line, svg polyline { stroke: #000 !important; }
  svg circle, svg rect { stroke: #000 !important; }
  a { text-decoration: none !important; }
}

/* Ladeanzeige: Fortschritt mit Countdown + Abbrechen */
.ld-bar { width: min(420px, 80vw); height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 6px; }
.ld-bar i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 6px; transition: width .25s linear; position: relative; }
.ld-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bg) 45%, transparent), transparent); animation: ldshine 1.4s linear infinite; }
@keyframes ldshine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.ld-meta { display: flex; align-items: center; gap: 14px; font: 500 13px var(--mono); color: var(--mute); }
.ld-x { font-family: var(--sans); }
.loading .sub { display: none; }

/* Kopfzeile: Titel nimmt sich nicht den Platz der Reiter */
.topbar h1 { flex: 0 1 auto; min-width: 0; max-width: 32%; }
.tabs { flex: 0 1 auto; min-width: 0; }

/* Spaßfragen als Sprechblase am Kopf */
.asst-quip { position: fixed; z-index: 77; right: calc(var(--qr, 18px) + 116px); bottom: calc(var(--qb, 18px) + 30px + env(safe-area-inset-bottom, 0px)); width: min(300px, calc(100vw - 150px)); padding: 13px 34px 13px 15px; border-radius: 18px 18px 6px 18px; background: var(--panel); color: var(--ink); border: 1px solid var(--line2); box-shadow: 0 18px 44px -16px rgba(0,0,0,.6); animation: quipin .5s cubic-bezier(.34,1.56,.64,1) both; cursor: pointer; transform-origin: 100% 100%; }
.asst-quip[hidden] { display: none; }
.asst-quip.out { animation: quipout .26s ease both; }
@keyframes quipin { from { opacity: 0; transform: translate(10px, 8px) scale(.7); } }
@keyframes quipout { to { opacity: 0; transform: translate(6px, 6px) scale(.85); } }
.asst-quip p { margin: 0; font: 600 14.5px/1.4 var(--sans); }
.asst-quip .q-r { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.asst-quip .q-r .chip { height: 30px; font-size: 13px; }
.asst-quip .q-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--mute); display: grid; place-items: center; cursor: pointer; }
.asst-quip .q-x .ico { width: 13px; height: 13px; }
.asst.open .asst-quip, .asst.covered .asst-quip, .asst.landtop .asst-quip, .asst.off .asst-quip { display: none !important; }
.asst.quipping .asst-tip { opacity: 0 !important; animation: none !important; }
@media (max-width: 600px) { .asst-quip { right: calc(var(--qr, 18px) + 96px); width: calc(100vw - 130px); bottom: calc(var(--qb, 18px) + 20px + env(safe-area-inset-bottom, 0px)); } }
/* Rechtsklick-/Lang-drücken-Menü am Kopf */
.asst-ctx { position: fixed; z-index: 90; width: 250px; padding: 8px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 20px 50px -18px rgba(0,0,0,.6); animation: fadeUp .18s var(--ease) both; }
.asst-ctx[hidden] { display: none; }
.asst-ctx .asst-mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 8px; border: 0; background: none; color: var(--ink); font: 550 14px var(--sans); border-radius: 10px; cursor: pointer; text-align: left; }
.asst-ctx .asst-mi:hover { background: var(--panel2); }
.asst-ctx .asst-mi .ico { width: 17px; height: 17px; }
.asst-ctx small { display: block; padding: 6px 8px 4px; color: var(--mute); font-size: 12px; line-height: 1.4; }

/* ===== Wow: Tafel erscheint aus Max' Gesicht ===== */
.ai-board.ai-reveal { animation: aiboardwow 1.05s cubic-bezier(.16,1,.3,1) both; }
@keyframes aiboardwow {
  0% { clip-path: circle(0 at var(--ox, 90%) var(--oy, 100%)); filter: blur(10px) brightness(1.6); transform: perspective(1200px) rotateY(-10deg) scale(.96); }
  55% { filter: blur(0) brightness(1.15); }
  100% { clip-path: circle(160% at var(--ox, 90%) var(--oy, 100%)); filter: none; transform: none; }
}
.ai-board.ai-reveal::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(105deg, transparent 30%, color-mix(in srgb, var(--ink) 18%, transparent) 48%, transparent 66%); background-size: 260% 100%; animation: aisweep 1.1s .25s ease-out both; }
@keyframes aisweep { 0% { background-position: 120% 0; opacity: 1; } 85% { opacity: 1; } 100% { background-position: -40% 0; opacity: 0; } }
.ai-board.ai-reveal { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 40%, transparent), 0 30px 90px -20px color-mix(in srgb, var(--ink) 30%, transparent); }
.ai-board.ai-reveal .tafel > * { animation: aikid .6s cubic-bezier(.16,1,.3,1) both; }
.ai-board.ai-reveal .tafel > *:nth-child(1) { animation-delay: .25s; } .ai-board.ai-reveal .tafel > *:nth-child(2) { animation-delay: .35s; }
.ai-board.ai-reveal .tafel > *:nth-child(3) { animation-delay: .45s; } .ai-board.ai-reveal .tafel > *:nth-child(4) { animation-delay: .55s; }
@keyframes aikid { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }

/* ===== Wow: Szenenwechsel – neue Seite öffnet sich als Kreis aus Max ===== */
.asst-bub { view-transition-name: max-bub; } .ai-isl { view-transition-name: max-isl; } .ai-feed { view-transition-name: max-feed; } .ai-board { view-transition-name: max-board; }
::view-transition-group(max-bub), ::view-transition-group(max-isl), ::view-transition-group(max-feed), ::view-transition-group(max-board) { animation-duration: 0s; }
html.ai-vt::view-transition-old(root) { animation: aivtold .55s cubic-bezier(.4,0,.2,1) both; }
html.ai-vt::view-transition-new(root) { animation: aivtnew .8s cubic-bezier(.16,1,.3,1) both; }
@keyframes aivtold { to { opacity: .25; transform: scale(.97); filter: blur(4px); } }
@keyframes aivtnew { from { clip-path: circle(0 at var(--vx, 90%) var(--vy, 90%)); filter: brightness(1.5) blur(6px); } 60% { filter: none; } to { clip-path: circle(150vmax at var(--vx, 90%) var(--vy, 90%)); } }
/* Ohne View Transitions: Lichtwelle aus Max */
.ai-warp { position: fixed; inset: 0; z-index: 95; pointer-events: none; background: radial-gradient(circle at var(--wx) var(--wy), color-mix(in srgb, var(--ink) 30%, transparent) 0, transparent 60%); animation: aiwarp 1s cubic-bezier(.16,1,.3,1) both; }
@keyframes aiwarp { 0% { clip-path: circle(0 at var(--wx) var(--wy)); opacity: 1; } 70% { opacity: .7; } 100% { clip-path: circle(150vmax at var(--wx) var(--wy)); opacity: 0; } }

/* ===== Insel öffnet sich: Lichtkante läuft einmal herum ===== */
.ai-isl::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--aa, 0deg), transparent 0 70%, var(--ink) 85%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: 0; pointer-events: none; }
@property --aa { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.asst.open .ai-isl::before { animation: aiedge 1.2s cubic-bezier(.4,0,.2,1) .05s both; }
@keyframes aiedge { 0% { --aa: 0deg; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { --aa: 360deg; opacity: 0; } }
.asst.open .ai-fw { animation: aifacein .6s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes aifacein { from { transform: scale(.4) rotate(-25deg); opacity: 0; } }
.asst.open .ai-mid, .asst.open .ai-talk, .asst.open .ai-close, .asst.open .ai-dots { animation: aiitem .5s cubic-bezier(.16,1,.3,1) both; }
.asst.open .ai-mid { animation-delay: .08s; } .asst.open .ai-dots { animation-delay: .05s; } .asst.open .ai-talk { animation-delay: .14s; } .asst.open .ai-close { animation-delay: .18s; }
@keyframes aiitem { from { opacity: 0; transform: translateX(14px); filter: blur(4px); } }
.asst.open .ai-bub.greet { animation: aibubin .55s .25s cubic-bezier(.16,1,.3,1) backwards; }
@media (prefers-reduced-motion: reduce) { .ai-board.ai-reveal, .ai-board.ai-reveal *, .asst.open .ai-isl::before, .asst.open .ai-fw, .asst.open .ai-mid, .asst.open .ai-talk { animation: none !important; } }
@media print { button, .btn, .iconbtn, .tabs { display: none !important; } }

/* ===== Feinschliff Runde 2 ===== */
/* Tafel: keine zweite Grundanimation, Kreis endet ohne Beschnitt (keine kaputte Ecke) */
.ai-board { animation: none; }
.ai-board.ai-reveal { animation: aiboardwow2 1.05s cubic-bezier(.16,1,.3,1) backwards; }
@keyframes aiboardwow2 {
  0% { clip-path: circle(0px at var(--ox, 90%) var(--oy, 100%)); filter: blur(10px) brightness(1.6); transform: perspective(1200px) rotateY(-10deg) scale(.96); }
  55% { filter: blur(0) brightness(1.15); }
  99% { clip-path: circle(400vmax at var(--ox, 90%) var(--oy, 100%)); filter: none; transform: none; }
  100% { clip-path: none; filter: none; transform: none; }
}
.ai-board.ai-reveal::after { animation-fill-mode: both; }
.ai-board.ai-reveal { box-shadow: 0 30px 80px -30px rgba(0,0,0,.6), var(--shadow); }
@media (max-width: 600px) { .ai-board, .ai-board.ai-reveal { animation-name: aiboardwow2; } .ai-board:not(.ai-reveal) { animation: none; } }

/* Insel öffnet sich ruhiger (ca. 3× langsamer) */
.asst.open .ai-isl::before { animation-duration: 3.2s; }
.asst.open .ai-fw { animation-duration: 1.6s; }
.asst.open .ai-mid, .asst.open .ai-talk, .asst.open .ai-close, .asst.open .ai-dots { animation-duration: 1.4s; }
.asst.open .ai-dots { animation-delay: .25s; } .asst.open .ai-mid { animation-delay: .4s; } .asst.open .ai-talk { animation-delay: .6s; } .asst.open .ai-close { animation-delay: .75s; }
/* Begrüßung: schwebt weich herein, dann tippt Max */
.asst.open .ai-bub.greet { animation: aigreet 1.4s .5s cubic-bezier(.16,1,.3,1) backwards; }
@keyframes aigreet { from { opacity: 0; transform: translateY(18px) scale(.92); filter: blur(8px); } }

/* Eingeklappter Verlauf: nur Max' letzte Antwort, kompakt */
.asst:not(.feed-open) .ai-bub.me.last { display: none; }
.asst:not(.feed-open) .ai-bub.max.last .ai-a { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.asst:not(.feed-open) .ai-bub.max.last { cursor: pointer; }

/* Spaßfrage: erscheint weich, löst sich auf */
.asst-quip { animation: quipin2 1.1s cubic-bezier(.16,1,.3,1) both; }
@keyframes quipin2 { 0% { opacity: 0; transform: translate(12px, 10px) scale(.6); filter: blur(10px); } 60% { filter: blur(0); } 100% { opacity: 1; transform: none; filter: none; } }
.asst-quip.out { animation: quipout2 .9s ease both; }
@keyframes quipout2 { to { opacity: 0; filter: blur(12px); transform: scale(1.06); letter-spacing: .04em; } }
.asst-quip .q-a { animation: aifade .6s ease both; }
.asst-quip .q-r { gap: 6px; }
/* Einstellungen: × oben rechts, „Stimme“ mit Luft */
.ai-menu { padding: 16px 14px 12px; }
.ai-mx { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--mute); display: grid; place-items: center; cursor: pointer; }
.ai-mx:hover { background: var(--panel2); color: var(--ink); }
.ai-mx .ico { width: 16px; height: 16px; }
.ai-menu .ai-me { margin: 0 0 12px 2px; }
.ai-menu .asst-vch { margin-top: 0; padding-right: 30px; }

/* ===== Frisch erstellt: sauberer Auftritt (einmalig) ===== */
.fx { animation: fxin .9s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--fx, 0) * 120ms); }
@keyframes fxin { from { opacity: 0; transform: translateY(26px) scale(.985); filter: blur(10px); } }
/* Innenleben nacheinander */
.fx .card, .fx .chap, .fx .opt, .fx .term, .fx .tile, .fx .kl-day, .fx .tafel > * { animation: fxitem .8s cubic-bezier(.16,1,.3,1) both; }
.fx .chap:nth-child(1), .fx .opt:nth-child(1), .fx .term:nth-child(1), .fx .card:nth-child(1) { animation-delay: .25s; }
.fx .chap:nth-child(2), .fx .opt:nth-child(2), .fx .term:nth-child(2), .fx .card:nth-child(2) { animation-delay: .35s; }
.fx .chap:nth-child(3), .fx .opt:nth-child(3), .fx .term:nth-child(3), .fx .card:nth-child(3) { animation-delay: .45s; }
.fx .chap:nth-child(4), .fx .opt:nth-child(4), .fx .term:nth-child(4), .fx .card:nth-child(4) { animation-delay: .55s; }
.fx .chap:nth-child(n+5), .fx .opt:nth-child(n+5), .fx .term:nth-child(n+5), .fx .card:nth-child(n+5) { animation-delay: .65s; }
@keyframes fxitem { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
/* Mindmap: Äste zeichnen sich, Knoten erscheinen von innen nach außen */
.fx .mm-l { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: fxdraw 1.6s .5s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes fxdraw { to { stroke-dashoffset: 0; } }
.fx .mm-n { animation: fxnode .7s cubic-bezier(.16,1,.3,1) both; }
.fx .mm-root { animation-delay: .3s; } .fx .mm-branch { animation-delay: .8s; } .fx .mm-leaf { animation-delay: 1.3s; }
@keyframes fxnode { from { opacity: 0; filter: blur(6px); } }
/* Podcast-Cover dreht sich rein */
.fx .cover { animation: fxcover 1.2s cubic-bezier(.16,1,.3,1) .15s both; }
@keyframes fxcover { from { opacity: 0; transform: perspective(900px) rotateY(-28deg) scale(.9); filter: blur(8px); } }
@media (prefers-reduced-motion: reduce) { .fx, .fx * { animation: none !important; stroke-dashoffset: 0 !important; } }
/* Hero: mehr Luft zwischen Überschrift, Funktionen, Text und Upload */
/* Hero: viel Luft – eins nach dem anderen */
.hero .featrow { margin-top: 72px; }
.hero .featrest { margin-top: 22px; }
.hero p.sub { margin-top: 80px; }
.hero .dropzone { margin-top: 88px; }
.hero .or { margin-top: 56px; }
.hero .or + * { margin-top: 28px; }
@media (max-width: 760px) { .hero .featrow { margin-top: 48px; } .hero .featrest { margin-top: 16px; } .hero p.sub { margin-top: 52px; } .hero .dropzone { margin-top: 56px; } .hero .or { margin-top: 40px; } .hero .or + * { margin-top: 22px; } }
/* Begrüßung: Blase poppt sauber auf, Wörter blenden nacheinander ein (kein Springen) */
.asst.open .ai-bub.greet { animation: aigreet2 .7s .35s cubic-bezier(.34,1.4,.64,1) backwards; transform-origin: 0 100%; }
@keyframes aigreet2 { from { opacity: 0; transform: translateY(10px) scale(.86); } }
.rw { display: inline; opacity: 0; filter: blur(5px); animation: rwin .55s cubic-bezier(.16,1,.3,1) forwards; animation-delay: calc(.7s + var(--i, 0) * 32ms); }
@keyframes rwin { to { opacity: 1; filter: none; } }
@media (prefers-reduced-motion: reduce) { .rw { opacity: 1; filter: none; transform: none; animation: none; } }
.ai-hear { display: inline-flex; align-items: center; gap: 6px; }
.ai-hear svg { width: 14px; height: 14px; }
.ai-hear.on { background: var(--ink); color: var(--bg); }
/* Begrüßung wird nie abgeschnitten */
.asst .ai-bub.greet .ai-a { display: block !important; -webkit-line-clamp: unset !important; overflow: visible !important; }

/* Glanz nur einmal beim Reinkommen, danach weg */
.ai-board.ai-reveal::after { opacity: 0; }
/* Spaßfrage: geschätzte Verteilung */
.asst-quip .q-st { margin-top: 8px; display: grid; gap: 6px; animation: qst .6s .15s cubic-bezier(.16,1,.3,1) backwards; }
.asst-quip .q-st small { font-size: 12px; line-height: 1.35; opacity: .75; }
.asst-quip .q-bar { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 14%, transparent); overflow: hidden; }
.asst-quip .q-bar i { display: block; height: 100%; width: var(--w); background: var(--ink); border-radius: inherit; transform-origin: left; animation: qbar .9s .25s cubic-bezier(.16,1,.3,1) backwards; }
@keyframes qbar { from { transform: scaleX(0); } }
@keyframes qst { from { opacity: 0; transform: translateY(4px); } }

/* Markieren: nur echter Text – keine Kästen, Flächen, Icons, Gesichter oder Knöpfe */
html, body { -webkit-user-select: none; user-select: none; }
p, h1, h2, h3, h4, h5, h6, li, dt, dd, td, th, blockquote, pre, code, figcaption, label, small, strong, em, b, a, span, mark, sup, sub,
.ai-a, .ai-q, .ai-bub, .q-a, .tafel, .tafel *, .prose, .prose *, .md, .md * { -webkit-user-select: text; user-select: text; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
svg, svg *, img, canvas, video, picture, .ico, button, button *, .chip, .chip *, .btn, .btn *, [role="button"], [role="button"] *, [aria-hidden="true"], [aria-hidden="true"] *,
.asst-bub, .asst-bub *, .ai-fw, .ai-fw *, .ai-isl > :not(.ai-in), nav, nav *, .tabs, .tabs *, .opt, .opt * { -webkit-user-select: none !important; user-select: none !important; }
::selection { background: color-mix(in srgb, var(--ink) 22%, transparent); color: inherit; }
[data-split].settled .w { padding: 0; margin: 0; overflow: visible; }
[data-split].settled .wi { transition: none; }
.hero h1, .hero h1 * { -webkit-hyphens: manual !important; hyphens: manual !important; }
.asst-quip .q-r, .asst-quip .q-x, .q-bar { -webkit-user-select: none; user-select: none; }
/* Hell/Dunkel-Wechsel: Kreis wächst aus dem Knopf und färbt die Seite langsam um */
html.theme-vt::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
html.theme-vt::view-transition-new(root) { animation: themein 1.1s cubic-bezier(.65,0,.35,1) both; mix-blend-mode: normal; }
html.theme-vt::view-transition-group(*), html.theme-vt::view-transition-old(*), html.theme-vt::view-transition-new(*) { animation-duration: 1.1s; }
@keyframes themein { from { clip-path: circle(0 at var(--tx) var(--ty)); } to { clip-path: circle(var(--tr) at var(--tx) var(--ty)); } }
html.theme-fade, html.theme-fade * { transition: background-color .8s ease, color .8s ease, border-color .8s ease, fill .8s ease, stroke .8s ease !important; }
/* Hell/Dunkel: während des Kreises keine eigenen Übergänge (sonst kurz graue Leiste oben) */
html.theme-vt *, html.theme-vt *::before, html.theme-vt *::after { transition: none !important; }
/* Login: weich rein und raus */
.modal-bg:has(.modal.login) { animation: lbgin .45s ease both; }
.modal.login { animation: lin .6s cubic-bezier(.16,1,.3,1) both; }
.modal.login .lface { animation: lface .7s .12s cubic-bezier(.34,1.5,.64,1) both; }
.modal.login > :not(.lface):not(.lx) { animation: lkid .55s cubic-bezier(.16,1,.3,1) both; }
.modal.login > :nth-child(3) { animation-delay: .16s; } .modal.login > :nth-child(4) { animation-delay: .22s; } .modal.login > :nth-child(5) { animation-delay: .28s; } .modal.login > :nth-child(n+6) { animation-delay: .34s; }
.modal-bg.out { animation: lbgout .3s ease forwards; }
.modal-bg.out .modal.login { animation: lout .3s cubic-bezier(.4,0,1,1) forwards; }
@keyframes lbgin { from { opacity: 0; backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); } }
@keyframes lbgout { to { opacity: 0; } }
@keyframes lin { from { opacity: 0; transform: translateY(22px) scale(.96); } }
@keyframes lout { to { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes lface { from { opacity: 0; transform: translateY(-10px) scale(.6); } }
@keyframes lkid { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .modal.login, .modal.login *, .modal-bg:has(.modal.login) { animation: none !important; } }
.ai-menu .asst-vch .vchip { height: 30px; padding: 0 4px 0 11px; gap: 6px; font-size: 12.5px; }
.ai-vdesc { font-size: 12px; color: var(--mute); margin: -4px 0 10px; }
.pv.on { background: var(--ink); color: var(--bg); }
@media (max-width: 760px) { .hero .feattop { gap: 12px; } }
/* Spaßfrage: deutliches × zum Wegklicken */
.asst-quip .q-x { top: -11px; right: -11px; width: 30px; height: 30px; background: var(--ink); color: var(--bg); border: 2px solid var(--bg); box-shadow: 0 4px 14px -4px rgba(0,0,0,.45); transition: transform .2s cubic-bezier(.16,1,.3,1); }
.asst-quip .q-x .ico { width: 14px; height: 14px; stroke-width: 2.6; }
.asst-quip .q-x:hover { transform: scale(1.08); }
.asst-quip .q-x::after { content: ""; position: absolute; inset: -8px; }

/* Handy: großes Textfeld oben, „Sprich mit Max“ zentriert darunter */
@media (max-width: 600px) {
  .asst .ai-isl { flex-wrap: wrap; height: auto; padding: 8px 8px 10px; row-gap: 8px; column-gap: 4px; border-radius: 28px; align-content: center; }
  .asst .ai-isl::after { content: ""; flex-basis: 100%; height: 0; order: 5; }
  .ai-isl > * { order: 1; }
  .ai-isl > .ai-mid { height: 48px; }
  .asst[data-state="idle"] .ai-in { height: 48px; font-size: 16px; padding: 0 16px; }
  .ai-isl > .ai-talk, .ai-isl > .ai-done, .ai-isl > .ai-stop { order: 10; margin: 0 auto; }
  .ai-isl > .ai-talk { height: 46px; padding: 0 22px 0 18px; font-size: 14px; gap: 8px; }
  .ai-isl > .ai-talk .lbl { font-size: 14px; }
  .ai-isl > .ai-done, .ai-isl > .ai-stop { width: 46px; height: 46px; }
  /* alles über der Insel um die zweite Reihe nach oben */
  .ai-cap { bottom: calc(138px + var(--kb) + env(safe-area-inset-bottom, 0px)); }
  .ai-feed { bottom: calc(138px + var(--kb) + env(safe-area-inset-bottom, 0px)); }
  .ai-menu { bottom: calc(138px + env(safe-area-inset-bottom, 0px)); }
  .ai-board { bottom: calc(142px + env(safe-area-inset-bottom, 0px)); }
  .asst.has-board:not(.board-min) .ai-board { bottom: calc(142px + var(--kb) + env(safe-area-inset-bottom, 0px)) !important; }
}
/* Chat-× deutlich: Kreis mit Rand, kräftiges Icon */
.ai-b.ai-close { width: 40px; height: 40px; color: var(--ink); background: color-mix(in srgb, var(--ink) 12%, transparent); border: 1.5px solid color-mix(in srgb, var(--ink) 38%, transparent); border-radius: 50%; }
.ai-b.ai-close .ico { width: 18px; height: 18px; stroke-width: 2.5; }
.ai-b.ai-close:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 600px) { .ai-b.ai-close { width: 38px; height: 38px; } }
/* Laptop genauso: großes Textfeld oben, „Sprich mit Max“ zentriert darunter */
@media (min-width: 601px) {
  .asst .ai-isl { flex-wrap: wrap; height: auto; padding: 10px 10px 12px; row-gap: 10px; column-gap: 6px; border-radius: 30px; align-content: center; }
  .asst .ai-isl::after { content: ""; flex-basis: 100%; height: 0; order: 5; }
  .ai-isl > * { order: 1; }
  .ai-isl > .ai-mid { height: 50px; }
  .asst[data-state="idle"] .ai-in { height: 50px; font-size: 16px; padding: 0 18px; }
  .ai-isl > .ai-talk, .ai-isl > .ai-done, .ai-isl > .ai-stop { order: 10; margin: 0 auto; }
  .ai-isl > .ai-talk { height: 46px; padding: 0 24px 0 20px; }
  .ai-isl > .ai-done, .ai-isl > .ai-stop { width: 46px; height: 46px; }
  .ai-cap { bottom: calc(154px + env(safe-area-inset-bottom, 0px)); }
  .ai-feed { bottom: calc(156px + var(--kb) + env(safe-area-inset-bottom, 0px)); }
  .ai-menu { bottom: calc(154px + env(safe-area-inset-bottom, 0px)); }
}

/* „Klick mich“-Hinweis mit kleinem × (Handy + Laptop) */
.asst-tip { display: inline-flex !important; align-items: center; gap: 8px; padding-right: 8px !important; transition: opacity .45s ease, transform .5s cubic-bezier(.16,1,.3,1) !important; }
.asst-tip .tip-x { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--onInv) 14%, transparent); cursor: pointer; position: relative; }
.asst-tip .tip-x::after { content: ""; position: absolute; inset: -8px; }
.asst-tip .tip-x .ico { width: 12px; height: 12px; stroke-width: 2.6; }
.asst-tip .tip-x:hover { background: color-mix(in srgb, var(--onInv) 26%, transparent); }
@media (max-width: 600px) {
  .asst-tip { right: 0; top: auto; bottom: calc(100% + 12px); translate: 0 0; }
  .asst-tip::after { right: 30px; top: auto; bottom: -6px; transform: rotate(45deg); }
  .asst.tip-on:not(.open) .asst-tip { animation: none; }
}
/* Dunkler Modus: auf hellen (invertierten) Flächen braucht Max' weißer Kopf seinen schwarzen Rand */
:root[data-theme="dark"] .on-inv .face svg .fz-head { stroke: #0a0a0a; stroke-width: 15; }

/* Überschrift: immer genau zwei Zeilen – „Lade deine Vorlesung hoch.“ / „Max erklärt sie dir.“ */
.hero h1 { white-space: nowrap; max-width: none; font-size: clamp(26px, 6.3vw, 84px); }
.hero h1 .soft { display: block; }
@media (max-width: 600px) { .hero h1 { font-size: 7.4vw; letter-spacing: -.05em; } }
/* Spitzname + Begrüßung */
.nickf { display: grid; gap: 8px; text-align: left; margin: 4px 0 14px; }
.nickf b { font-size: 14px; }
.nickf .field.bad { border-color: #e5484d; }
.linkbtn { border: 0; background: none; color: var(--mute); font: inherit; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; margin-left: 6px; }
.ngreet { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); opacity: 0; transition: opacity .5s ease; cursor: pointer; }
.ngreet.in { opacity: 1; } .ngreet.out { opacity: 0; transition: opacity .45s ease; }
.ng-in { text-align: center; max-width: 640px; }
.ng-face { width: clamp(150px, 30vw, 230px); height: clamp(150px, 30vw, 230px); margin: 0 auto 26px; }
.ngreet.in .ng-face { animation: ngface .9s cubic-bezier(.34,1.4,.64,1) both; }
.ng-hey { font-size: clamp(34px, 6.4vw, 64px); line-height: 1.02; letter-spacing: -.045em; margin: 0; font-weight: 700; }
.ng-nick { color: var(--ink); background: linear-gradient(90deg, var(--ink), var(--mute), var(--ink)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: ngshine 3s linear infinite; }
.ng-line { font-size: clamp(16px, 2.2vw, 19px); color: var(--ink2); margin: 16px auto 26px; max-width: 460px; }
.ng-go { min-width: 160px; }
.ngreet.in .ng-hey { animation: ngup .8s .25s cubic-bezier(.16,1,.3,1) both; } .ngreet.in .ng-line { animation: ngup .8s .45s cubic-bezier(.16,1,.3,1) both; } .ngreet.in .ng-go { animation: ngup .8s .6s cubic-bezier(.16,1,.3,1) both; }
.ngreet.out .ng-in { transform: scale(.97); transition: transform .45s ease; }
@keyframes ngface { from { opacity: 0; transform: translateY(24px) scale(.6); } }
@keyframes ngup { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@keyframes ngshine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ngreet *, .ngreet { animation: none !important; transition: none !important; } }
/* ---------- Wochen-Challenge ---------- */
.lockb { display: inline-grid; place-items: center; margin-left: 6px; opacity: .7; } .lockb[hidden] { display: none; } .lockb .ico { width: 12px; height: 12px; }
.doc-item .lockb { margin-left: auto; }
.ch { max-width: 1080px; margin: 0 auto; padding: 8px 4px 40px; }
.ch-head { display: flex; gap: 16px; align-items: flex-start; margin: 6px 0 22px; }
.ch-ico { flex: none; width: 52px; height: 52px; border-radius: 16px; background: var(--inv); color: var(--onInv); display: grid; place-items: center; }
.ch-ico .ico { width: 26px; height: 26px; }
.ch-head h2 { margin: 4px 0 6px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.035em; line-height: 1.05; }
.ch-head p { margin: 0; color: var(--mute); max-width: 640px; }
.ch-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ch-card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 22px; animation: chin .6s cubic-bezier(.16,1,.3,1) both; }
.ch-card + .ch-card { animation-delay: .08s; }
@keyframes chin { from { opacity: 0; transform: translateY(12px); } }
.ch-start .ch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; } .ch-start .chip { cursor: default; }
.ch-start p { color: var(--ink2); margin: 0 0 18px; }
.ch-start .btn.lg { width: 100%; justify-content: center; gap: 8px; } .ch-start .btn .ico { width: 18px; height: 18px; }
.ch-board { display: grid; gap: 4px; margin-top: 10px; }
.ch-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; font-size: 14.5px; }
.ch-row:nth-child(odd) { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.ch-row.me { background: var(--inv) !important; color: var(--onInv); font-weight: 650; animation: chme 1.2s ease 1; }
.ch-row.me small { opacity: .7; }
@keyframes chme { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ink) 50%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.ch-pos { font: 600 13px var(--mono); text-align: center; } .ch-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ch-sc { font: 600 13px var(--mono); }
.ch-gap { text-align: center; color: var(--faint); letter-spacing: .3em; font-size: 12px; }
.ch-board.blur { filter: blur(5px); opacity: .55; pointer-events: none; user-select: none; }
.ch-lock { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 18px; overflow: hidden; max-width: 640px; }
.ch-lockc { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 24px; gap: 8px; background: color-mix(in srgb, var(--bg) 35%, transparent); }
.ch-lockc p { margin: 0 0 6px; color: var(--ink2); max-width: 380px; }
.ch-lki { width: 46px; height: 46px; border-radius: 50%; background: var(--inv); color: var(--onInv); display: grid; place-items: center; } .ch-lki .ico { width: 20px; height: 20px; }
.ch-run { max-width: 760px; margin: 0 auto; }
.ch-run .ch-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font: 600 13px var(--mono); }
.ch-bar { flex: 1; height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; }
.ch-bar i { display: block; height: 100%; background: var(--ink); border-radius: inherit; transition: width .5s cubic-bezier(.16,1,.3,1); }
.ch-stage { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 16px; align-items: start; }
.ch-face { width: 74px; height: 74px; } .ch-face.big { width: 110px; height: 110px; margin: 0 auto 6px; }
.ch-q { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.ch-q h3 { font-size: 20px; letter-spacing: -.02em; margin: 6px 0 16px; line-height: 1.3; }
.ch-opts { display: grid; gap: 8px; }
.ch-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line2); background: transparent; color: inherit; font: 500 15px/1.4 var(--sans); cursor: pointer; transition: border-color .15s, transform .15s; }
.ch-opt:hover:not(:disabled) { border-color: var(--ink); } .ch-opt:active:not(:disabled) { transform: scale(.99); }
.ch-opt .ch-k { flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font: 600 12px var(--mono); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.ch-opt.ok { border-color: #2fbf71; background: color-mix(in srgb, #2fbf71 14%, transparent); } .ch-opt.ok .ch-k { background: #2fbf71; color: #fff; }
.ch-opt.bad { border-color: #e5484d; background: color-mix(in srgb, #e5484d 12%, transparent); } .ch-opt.bad .ch-k { background: #e5484d; color: #fff; }
.ch-opt:disabled { cursor: default; } .ch-opt:disabled:not(.ok):not(.bad) { opacity: .5; }
.ch-ex { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .5s ease, opacity .4s ease, margin .4s; color: var(--ink2); font-size: 14.5px; }
.ch-ex.on { max-height: 200px; opacity: 1; margin: 14px 0 4px; }
.ch-next { margin-top: 14px; }
.ch-res { text-align: center; }
.ch-big { font-size: 22px; color: var(--mute); } .ch-big b { font-size: 64px; color: var(--ink); letter-spacing: -.05em; margin: 0 4px; line-height: 1; }
.ch-res .ch-top { display: inline-block; margin: 8px 0 10px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line2); font: 650 14px var(--sans); }
.ch-res .ch-top.hot { background: var(--inv); color: var(--onInv); border-color: var(--inv); }
.ch-verd { color: var(--ink2); margin: 0 auto 16px; max-width: 380px; }
.ch-stats { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; color: var(--mute); font-size: 14px; } .ch-stats b { color: var(--ink); font-size: 18px; }
.ch-fach { display: grid; gap: 6px; text-align: left; margin: 0 0 18px; }
.ch-frow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 13.5px; }
.ch-frow span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.ch-fbar { height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; } .ch-fbar i { display: block; height: 100%; background: var(--ink); }
.ch-frow b { font: 600 12.5px var(--mono); text-align: right; }
.ch-tabs { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; scrollbar-width: none; } .ch-tabs::-webkit-scrollbar { display: none; } .ch-tabs .chip { flex: none; }
@media (max-width: 820px) { .ch-grid { grid-template-columns: 1fr; } .ch-stage { grid-template-columns: 1fr; } .ch-face:not(.big) { display: none; } }
.ch-next[hidden] { display: none !important; }
/* Challenge: großer Auftritt */
.ch { max-width: none; padding: 4px 0 40px; }
.ch-hero { position: relative; overflow: hidden; border-radius: 28px; border: 1px solid var(--line2); background: var(--panel); padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 16px; min-height: 420px; animation: chin .7s cubic-bezier(.16,1,.3,1) both; }
.ch-glow { position: absolute; inset: -40% -10% auto auto; width: 70%; aspect-ratio: 1; background: radial-gradient(closest-side, color-mix(in srgb, var(--ink) 16%, transparent), transparent); filter: blur(10px); animation: chglow 8s ease-in-out infinite alternate; pointer-events: none; }
@keyframes chglow { to { transform: translate(-12%, 10%) scale(1.15); } }
.ch-dots { position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); mask-image: linear-gradient(to bottom, #000, transparent 85%); pointer-events: none; }
.ch-hl { position: relative; z-index: 1; align-self: center; }
.ch-trophy { width: 72px; height: 72px; border-radius: 22px; background: var(--inv); color: var(--onInv); display: grid; place-items: center; margin-bottom: 22px; box-shadow: 0 20px 60px -20px color-mix(in srgb, var(--ink) 60%, transparent); animation: chtro 3.6s ease-in-out infinite; }
.ch-trophy .ico { width: 36px; height: 36px; }
@keyframes chtro { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
.ch-hero h1 { font-size: clamp(40px, 6.2vw, 88px); line-height: .95; letter-spacing: -.05em; margin: 10px 0 16px; font-weight: 750; }
.ch-hero p { color: var(--ink2); font-size: clamp(16px, 1.6vw, 19px); max-width: 560px; margin: 0 0 22px; }
.ch-meta { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 28px; }
.ch-meta span { display: grid; gap: 2px; color: var(--mute); font-size: 13px; } .ch-meta b { color: var(--ink); font-size: 26px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ch-cta { display: grid; gap: 10px; justify-items: start; } .ch-cta .btn.lg { height: 56px; padding: 0 28px; font-size: 16px; gap: 10px; } .ch-cta .btn .ico { width: 18px; height: 18px; } .ch-cta small { color: var(--mute); }
.ch-pod { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; }
.ch-pd { display: grid; justify-items: center; gap: 4px; text-align: center; }
.ch-pdn { font-weight: 700; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ch-pds { font: 600 12px var(--mono); color: var(--mute); }
.ch-pdb { width: 100%; border-radius: 18px 18px 6px 6px; background: color-mix(in srgb, var(--ink) 8%, transparent); border: 1px solid var(--line2); display: grid; place-items: start center; padding-top: 14px; margin-top: 8px; animation: chpod .9s cubic-bezier(.16,1,.3,1) both; transform-origin: bottom; }
.ch-pdb span { font-size: 34px; font-weight: 800; letter-spacing: -.04em; }
.ch-pd.p1 .ch-pdb { height: 210px; background: var(--inv); color: var(--onInv); border-color: var(--inv); animation-delay: .25s; } .ch-pd.p2 .ch-pdb { height: 150px; animation-delay: .1s; } .ch-pd.p3 .ch-pdb { height: 110px; animation-delay: .4s; }
@keyframes chpod { from { transform: scaleY(0); opacity: 0; } }
.ch-pod.blur .ch-pdn, .ch-pod.blur .ch-pds { filter: blur(6px); user-select: none; }
.ch-wide { max-width: none; }
@media (max-width: 900px) { .ch-hero { grid-template-columns: 1fr; min-height: 0; } .ch-pd.p1 .ch-pdb { height: 150px; } .ch-pd.p2 .ch-pdb { height: 110px; } .ch-pd.p3 .ch-pdb { height: 80px; } }
/* Pills: zwei saubere Reihen (5 + 2) */
.featrest .fbreak { flex-basis: 100%; height: 0; }
@media (max-width: 760px) { .featrest .fbreak { display: none; } }
