/* Schriften liegen auf Knovell selbst (public/fonts), ohne Anfragen an Google */
/* Bricolage Grotesque normal, latin-ext */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/bricolage-grotesque-normal-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Bricolage Grotesque normal, latin */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/bricolage-grotesque-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Literata italic, latin-ext */
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/literata-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Literata italic, latin */
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/literata-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Literata normal, latin-ext */
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/literata-normal-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Literata normal, latin */
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/literata-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Knovell – Heft, Karopapier, Textmarker */
:root {
  --paper: #f6f3ec;
  --sheet: #fffdf8;
  --ink: #1c1b18;
  --ink-2: #4a473f;
  --muted: #6f6b62;
  --line: #e2ddd0;
  --line-2: #cfc8b7;
  --grid: rgba(60, 90, 140, .07);
  --rule: rgba(60, 90, 140, .13);
  --margin: #e0796b;
  --marker: #ffe25a;
  --marker-ink: #1c1b18;
  --blue: #2f5bd3;
  --ok: #2f8a4e;
  --bad: #c0392b;
  --r: 16px;
  --accent: #2f5bd3;
  --c-home: #d99a00; --c-explore: #2f6fe0; --c-cards: #129a63; --c-nova: #7a58ee; --c-groups: #ec6f22; --c-rank: #db3f78; --c-saved: #0e9aa0; --c-profile: #5b6b82; --c-partners: #0f8fbf;
  --serif: 'Literata', Georgia, 'Times New Roman', serif;
  --sans: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151412; --sheet: #1d1c19; --ink: #ebe7dc; --ink-2: #c4bfb1; --muted: #8c8779; --line: #302e29; --line-2: #45423a;
    --grid: rgba(150, 170, 220, .05); --rule: rgba(150, 170, 220, .09); --margin: #9c4a40; --marker: #d9bd2f; --blue: #7d9cf0; color-scheme: dark;
    --muted: #9c978a; --accent: #4a72ea;
  }
}
:root[data-theme="dark"] {
  --paper: #151412; --sheet: #1d1c19; --ink: #ebe7dc; --ink-2: #c4bfb1; --muted: #9c978a; --line: #302e29; --line-2: #45423a;
  --grid: rgba(150, 170, 220, .05); --rule: rgba(150, 170, 220, .09); --margin: #9c4a40; --marker: #d9bd2f; --blue: #7d9cf0; color-scheme: dark; --accent: #4a72ea;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; font-optical-sizing: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: 36px; letter-spacing: -.025em; }
h2 { font-size: 23px; }
h3 { font-size: 17px; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 16px; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl { background: linear-gradient(100deg, transparent 2%, var(--marker) 4%, var(--marker) 96%, transparent 98%) 0 72% / 100% 46% no-repeat; color: var(--marker-ink); padding: 0 .08em; }
:root[data-theme="dark"] .hl, :root:not([data-theme="light"]) .hl { color: inherit; }
.karo { background-color: var(--sheet); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 22px 22px; }
.eyebrow { font-size: 14px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 21px; letter-spacing: -.035em; padding: 2px 8px 18px; }
.wordmark img { width: 30px; height: 30px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 6px; border-radius: 14px; color: var(--ink-2); font-weight: 600; font-size: 15.5px; transition: background-color .15s; }
.nav a:hover { background: color-mix(in srgb, var(--a, var(--ink)) 8%, transparent); color: var(--ink); }
.nav a.active { color: var(--ink); font-weight: 800; background: color-mix(in srgb, var(--a, var(--ink)) 14%, var(--paper)); }
.ni { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--a, var(--ink)); background: color-mix(in srgb, var(--a, var(--ink)) 13%, var(--sheet)); transition: background-color .15s, color .15s, transform .2s; }
.ni svg { width: 19px; height: 19px; stroke-width: 2; }
.nav a.active .ni { background: var(--a); color: #fff; }
.nav a:hover .ni { transform: rotate(-6deg); }
.sidebar .foot { margin-top: auto; padding: 10px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.sidebar .foot a:hover { color: var(--ink); text-decoration: underline; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 32px; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar .wordmark { display: none; padding: 0; font-size: 19px; }
.search { flex: 1; max-width: 520px; position: relative; }
.search input { width: 100%; padding: 11px 16px 11px 42px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--sheet); outline: none; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.icon-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-2); border: 0; background: none; cursor: pointer; }
.icon-btn:hover { background: var(--line); color: var(--ink); }
.dot { position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.page { padding: 32px; max-width: 1120px; margin: 0 auto; }
.page.narrow { max-width: 760px; }
.bottom-nav { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 10px 16px; }
  .topbar .wordmark { display: inline-flex; }
  .page { padding: 20px 16px 96px; }
  h1 { font-size: 27px; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--paper); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 2px 6px; min-width: 60px; }
  .bottom-nav a .ni { width: 40px; height: 30px; border-radius: 999px; background: none; color: var(--muted); }
  .bottom-nav a.active { color: var(--ink); }
  .bottom-nav a.active .ni { background: color-mix(in srgb, var(--a) 18%, var(--paper)); color: var(--a); }

}
@media (max-width: 560px) { .topbar .search { display: none; } #msearch { display: grid !important; } }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--sheet); color: var(--ink); font-weight: 700; cursor: pointer; white-space: nowrap; line-height: 1.3; box-shadow: 0 2px 0 var(--line-2); transition: transform .08s, box-shadow .08s, background-color .15s, border-color .15s; }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 transparent; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 58%, #000); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn.ghost { border-color: transparent; background: none; box-shadow: none; }
.btn.ghost:hover { background: var(--line); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.sm { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn.lg { padding: 13px 22px; font-size: 17px; }
.btn.xl { padding: 15px 24px; font-size: 18px; border-radius: 14px; }
.btn.xl svg { width: 21px; height: 21px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.link { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; background: none; border: 0; padding: 0; }
.field { display: block; }
.field > span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--sheet); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.input.xl { font-size: 19px; padding: 15px 16px; border-radius: 14px; }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.55; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.error { color: var(--bad); font-size: 14px; font-weight: 500; min-height: 1px; }
.box { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); }
.box.pad { padding: 22px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--sheet); font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.chip:hover { border-color: var(--ink-2); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip .code { height: 20px; min-width: 22px; font-size: 10.5px; }
.tabs { display: flex; width: fit-content; max-width: 100%; gap: 4px; padding: 4px; background: color-mix(in srgb, var(--line) 70%, transparent); border-radius: 999px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 8px 16px; font-weight: 700; color: var(--ink-2); border: 0; background: none; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background-color .15s; }
.tabs a:hover { color: var(--ink); background: color-mix(in srgb, var(--sheet) 60%, transparent); }
.tabs .active { color: var(--ink); background: var(--sheet); box-shadow: 0 1px 3px rgba(30, 25, 10, .15); }

/* Fach-Kürzel wie im Stundenplan */
.code { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 5px; border-radius: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; color: #fff; background: var(--c, #6b7280); }
.code.lg { min-width: 42px; height: 38px; font-size: 15px; border-radius: 12px; }
.subj { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line); color: var(--ink-2); }
.tag.ok { gap: 3px; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.tag.ok svg { width: 13px; height: 13px; }
.tag.warn { background: color-mix(in srgb, var(--marker) 45%, transparent); color: var(--ink); }
.verify-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 32px; background: color-mix(in srgb, var(--marker) 30%, var(--paper)); border-bottom: 1px solid var(--line); font-size: 14px; }
.verify-banner > svg { flex: none; width: 18px; height: 18px; }
.verify-banner > span:first-of-type { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) { .verify-banner { padding: 10px 16px; } }
.avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; text-transform: uppercase; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.avatar.lg { width: 76px; height: 76px; font-size: 30px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 44px 0 16px; }
.section-head h2 { margin: 0; }
.section-head a { font-size: 15px; font-weight: 700; color: var(--accent); }
.section-head a:hover { color: var(--ink); text-decoration: underline; }
.page-head { margin-bottom: 8px; }
.page-head p { color: var(--ink-2); font-size: 17px; max-width: 620px; }

/* ---------- Lernzettel-Karten (Heftseite) ---------- */
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 26px 20px; }
.note { cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.sheet { position: relative; height: 168px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 12px; background-color: var(--sheet);
  background-image: linear-gradient(90deg, transparent 33px, var(--margin) 33px, var(--margin) 34px, transparent 34px), repeating-linear-gradient(transparent 0 19px, var(--rule) 19px 20px);
  background-position: 0 0, 0 14px; padding: 18px 14px 0 44px; font-family: var(--serif); font-size: 11.5px; line-height: 20px; color: var(--ink-2); transition: transform .15s, box-shadow .15s; }
.sheet::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, var(--sheet)); }
.sheet b { padding-right: 34px; display: block; color: var(--ink); font-size: 13px; line-height: 20px; margin-bottom: 0; }
.sheet .code { position: absolute; top: 10px; right: 10px; font-family: var(--sans); }
.sheet .ftype { position: absolute; left: 40px; bottom: 7px; z-index: 1; background: var(--sheet); padding: 1px 4px; border-radius: 3px; font-family: var(--sans); font-size: 11px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.note:hover .sheet { transform: translateY(-2px) rotate(-.4deg); box-shadow: 0 8px 20px -10px rgba(30, 25, 10, .35); }
.note-title { font-weight: 800; font-size: 16.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note:hover .note-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.note-meta { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-top: -4px; }
.note-meta .sep::before { content: '·'; }
.note-meta .likes { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; }
.note-meta .likes svg { width: 14px; height: 14px; }
.note-meta .likes.on svg { fill: var(--bad); stroke: var(--bad); }

/* ---------- Listen (Kartensets, Gruppen, Rangliste) ---------- */
.list { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); }
.list > * { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.list > a:hover, .list > [data-href]:hover { background: color-mix(in srgb, var(--line) 45%, var(--sheet)); cursor: pointer; }
.list .title { font-weight: 700; }
.meter { width: 90px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; flex: none; }
.meter > div { height: 100%; background: var(--ok); border-radius: 999px; }
.due { font-size: 13px; font-weight: 800; color: #fff; background: var(--bad); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }

/* ---------- Landing ---------- */
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; max-width: 1180px; margin: 0 auto; }
.hero { border-bottom: 1px solid var(--line); overflow-x: clip; }
.hero-inner { max-width: 1180px; margin: 0 auto; padding: 56px 32px 64px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1; letter-spacing: -.04em; margin-bottom: 22px; }
.hero .lead { font-size: 18px; color: var(--ink-2); max-width: 500px; margin-bottom: 28px; }
.hero .facts { margin-top: 26px; font-size: 14px; color: var(--muted); }
.hero-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; transform: rotate(1.5deg); }
.hero-notes .note:nth-child(2) { margin-top: 38px; }
.hero-notes .note:nth-child(3) { margin-top: -38px; }
.hero-notes .sheet { height: 190px; }
.section { max-width: 1180px; margin: 0 auto; padding: 64px 32px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; counter-reset: step; }
.steps li { list-style: none; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; font-size: 26px; font-weight: 800; line-height: 1; margin-bottom: 14px; color: #fff; background: var(--accent); transform: rotate(-4deg); }
.steps li:nth-child(2)::before { background: var(--c-cards); transform: rotate(3deg); }
.steps li:nth-child(3)::before { background: var(--c-groups); }
.steps h3 { font-size: 18px; }
.steps p { color: var(--ink-2); }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.features > div { padding: 18px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 170px 1fr; gap: 16px; }
.features dt { font-weight: 700; }
.features dd { margin: 0; color: var(--ink-2); }
.price { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: start; }
.price .big { font-size: clamp(48px, 8vw, 92px); font-weight: 800; letter-spacing: -.05em; line-height: .9; }
.site-foot { border-top: 1px solid var(--line); }
.site-foot .section { padding: 28px 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) {
  .hero-inner, .price { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-left: 16px; padding-right: 16px; }
  .hero-inner { padding-top: 24px; }
  .steps, .features { grid-template-columns: 1fr; }
  .features > div { grid-template-columns: 1fr; gap: 4px; }
  .section { padding: 44px 16px; }
  .landing-nav { padding: 12px 16px; }
  .hero-notes .sheet { height: 150px; }
}

/* ---------- Auth / Onboarding ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r); padding: 30px; box-shadow: 0 1px 0 var(--line); }
.auth-card.wide { max-width: 620px; }

/* ---------- Lernzettel-Ansicht ---------- */
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 36px; align-items: start; }
@media (max-width: 1000px) { .layout-2 { grid-template-columns: 1fr; } }
.doc { position: relative; background-color: var(--sheet); border: 1px solid var(--line-2); border-radius: 14px; padding: 30px 36px 36px 64px;
  background-image: linear-gradient(90deg, transparent 43px, var(--margin) 43px, var(--margin) 44px, transparent 44px), linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, 22px 22px, 22px 22px; }
@media (max-width: 640px) { .doc { padding: 22px 16px 24px 34px; background-image: linear-gradient(90deg, transparent 21px, var(--margin) 21px, var(--margin) 22px, transparent 22px), linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); } }
.md { font-family: var(--serif); font-size: 16.5px; line-height: 1.7; }
.md h1, .md h2, .md h3 { font-family: var(--sans); }
.md h1 { font-size: 27px; margin: .1em 0 .6em; }
.md h2 { font-size: 19px; margin: 1.6em 0 .5em; }
.md h2::before { content: ''; display: inline-block; width: 10px; height: 10px; background: var(--marker); margin-right: 9px; border-radius: 2px; vertical-align: 1px; }
.md h3 { font-size: 16px; margin: 1.3em 0 .4em; }
.md p, .md ul, .md ol { margin: .55em 0; }
.md ul, .md ol { padding-left: 1.3em; }
.md li { margin: .2em 0; }
.md li::marker { color: var(--muted); }
.md strong { font-weight: 700; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--marker) 70%, transparent) 62%); }
.md blockquote { margin: 1.1em 0; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: 4px; font-family: var(--sans); font-size: 15px; background: var(--sheet); }
.md code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .86em; background: var(--line); padding: 1px 5px; border-radius: 3px; }
.md pre { background: var(--ink); color: var(--paper); padding: 14px 16px; border-radius: 6px; overflow-x: auto; }
.md pre code { background: none; padding: 0; color: inherit; }
.md a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.md table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 14px; }
.md td, .md th { border: 1px solid var(--line-2); padding: 6px 10px; text-align: left; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions .btn.on { border-color: var(--ink); }
.actions .btn.on svg { fill: currentColor; }
#like.on { color: var(--bad); border-color: var(--bad); }
.file-view { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: 4px; background: var(--sheet); }
.side h3 { font-size: 15px; color: var(--ink-2); margin-bottom: 10px; }
.side .sec { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.comment { display: flex; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.comment .text { white-space: pre-wrap; margin-top: 2px; }

/* ---------- Profil ---------- */
.profile-head { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 20px; }
.stats > * { background: none; border: 0; padding: 0; text-align: left; cursor: default; }
.stats button { cursor: pointer; }
.stats button:hover span { text-decoration: underline; }
.stats b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.stats span { font-size: 13px; color: var(--muted); }
.xp { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.xp > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--c-nova)); border-radius: 999px; }

/* ---------- Karteikarten ---------- */
.flip-wrap { perspective: 1400px; max-width: 600px; margin: 0 auto; }
.flip { position: relative; height: 330px; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, .7, .2, 1); cursor: pointer; }
.flip.flipped { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 18px; border: 1px solid var(--line-2); background-color: var(--sheet); box-shadow: 0 14px 30px -18px rgba(30, 25, 10, .45);
  background-image: linear-gradient(transparent 52px, var(--margin) 52px, var(--margin) 53.5px, transparent 53.5px), repeating-linear-gradient(transparent 0 31px, var(--rule) 31px 32px);
  background-position: 0 0, 0 53px; display: flex; flex-direction: column; overflow: auto; }
.face .face-label { background: var(--sheet); height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; font-size: 14px; font-weight: 700; color: var(--muted); flex: none; }
.face .face-text { flex: 1; display: grid; place-items: center; text-align: center; padding: 10px 30px 30px; font-family: var(--serif); font-size: 27px; line-height: 1.35; }
.face.back { transform: rotateY(180deg); }
.face.back .face-text { font-size: 22px; }
.learn-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 600px; margin: 22px auto 0; }
.learn-btns .btn { padding: 16px 18px; font-size: 17px; justify-content: space-between; }
.learn-btns .yes { background: color-mix(in srgb, var(--ok) 12%, var(--sheet)); border-color: color-mix(in srgb, var(--ok) 45%, var(--line-2)); color: var(--ok); box-shadow: 0 3px 0 color-mix(in srgb, var(--ok) 35%, var(--line-2)); }
.learn-btns kbd { font-family: inherit; font-size: 11px; color: inherit; opacity: .7; border: 1px solid currentColor; border-radius: 6px; padding: 1px 6px; }
.learn-btns .yes:hover { border-color: var(--ok); color: var(--ok); }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 34px; }
.modes a { display: block; padding: 18px 20px; border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--sheet); box-shadow: 0 3px 0 var(--line-2); transition: transform .1s; }
.modes a:hover { border-color: var(--ink-2); transform: translateY(-2px); }
.modes a.main { background: var(--c-cards); color: #fff; border-color: var(--c-cards); box-shadow: 0 3px 0 color-mix(in srgb, var(--c-cards) 55%, #000); }
.modes b { display: flex; align-items: center; gap: 8px; font-size: 18px; margin-bottom: 4px; }
.modes span { font-size: 14px; opacity: .85; }
@media (max-width: 640px) { .modes { grid-template-columns: 1fr; } }
.quiz-opt { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 16px 18px; border-radius: 14px; border: 1.5px solid var(--line-2); box-shadow: 0 2px 0 var(--line-2); background: var(--sheet); cursor: pointer; margin-bottom: 8px; font-size: 15.5px; }
.quiz-opt .letter { flex: none; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.quiz-opt:hover:not([disabled]) { border-color: var(--ink); }
.quiz-opt.correct { border-color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }
.quiz-opt.correct .letter { background: var(--ok); border-color: var(--ok); color: #fff; }
.quiz-opt.wrong { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.quiz-opt.wrong .letter { background: var(--bad); border-color: var(--bad); color: #fff; }
.card-row { display: grid; grid-template-columns: 24px 1fr 1fr 34px; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.card-row .num { padding-top: 10px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-row textarea { min-height: 44px; }
@media (max-width: 640px) { .card-row { grid-template-columns: 1fr 34px; } .card-row .num { display: none; } .card-row textarea:nth-of-type(2) { grid-column: 1; } }
.boxes { display: flex; gap: 3px; } .boxes i { width: 7px; height: 7px; border-radius: 2px; background: var(--line-2); } .boxes i.on { background: var(--ok); }
.result { text-align: center; padding: 48px 0; }
.result .score { font-size: 80px; color: var(--accent); font-weight: 800; letter-spacing: -.05em; line-height: 1; margin-bottom: 8px; }

/* ---------- Nova / Chat ---------- */
.chat-layout { display: grid; grid-template-columns: 230px 1fr; gap: 0; height: calc(100vh - 61px - 64px); border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); padding: 12px; overflow-y: auto; }
.chat-list a.conv { display: block; padding: 8px 11px; border-radius: 10px; font-size: 14px; color: var(--ink-2); }
.chat-list a.conv:hover { background: var(--line); }
.chat-list a.conv.active { background: var(--line); color: var(--ink); font-weight: 600; }
.chat-main { display: flex; flex-direction: column; min-height: 0; }
.chat-head { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.msg.user { align-self: flex-end; max-width: 78%; background: color-mix(in srgb, var(--c-nova) 12%, var(--sheet)); border: 1px solid color-mix(in srgb, var(--c-nova) 30%, var(--line)); padding: 10px 16px; border-radius: 18px 18px 6px 18px; white-space: pre-wrap; }
.msg.assistant { align-self: stretch; max-width: 720px; }
.msg.assistant .md { font-size: 15.5px; }
.msg.assistant .md > :first-child { margin-top: 0; }
.msg.assistant .md > :last-child { margin-bottom: 0; }
.msg-who { font-size: 14px; font-weight: 800; color: var(--c-nova); margin-bottom: 4px; }
.chat-input { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-input textarea { resize: none; min-height: 42px; max-height: 160px; }
.chat-empty { margin: auto; max-width: 460px; width: 100%; }
.chat-empty ul { list-style: none; padding: 0; margin: 14px 0 0; }
.chat-empty li button { width: 100%; text-align: left; padding: 10px 0; background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); }
.chat-empty li button:hover { color: var(--ink); }
.typing::after { content: ''; display: inline-block; width: 8px; height: 15px; background: var(--ink); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 900px) { .chat-layout { grid-template-columns: 1fr; height: calc(100vh - 57px - 140px); } .chat-list { display: none; } .chat-scroll { padding: 18px 14px; } }

/* ---------- Gruppen ---------- */
.group-chat { display: flex; flex-direction: column; height: calc(100vh - 250px); min-height: 380px; }
.gmsg { display: flex; gap: 10px; max-width: 82%; }
.gmsg.mine { align-self: flex-end; flex-direction: row-reverse; }
.gmsg .bubble { background: var(--paper); border: 1px solid var(--line); padding: 9px 14px; border-radius: 18px 18px 18px 6px; white-space: pre-wrap; word-break: break-word; }
.gmsg.mine .bubble { background: var(--accent); color: #fff; border-color: var(--accent); border-radius: 18px 18px 6px 18px; }
.gmsg .who { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.gmsg.mine .who { text-align: right; }

/* ---------- Rangliste ---------- */
.rank { width: 30px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }
.rank.top { color: var(--ink); }
.xp-num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Sonstiges ---------- */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: 90vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) { #toast { bottom: 100px; } }
.modal-back { position: fixed; inset: 0; background: rgba(20, 18, 12, .45); display: grid; place-items: center; z-index: 90; padding: 16px; }
.modal { width: 100%; max-width: 460px; max-height: 85vh; overflow-y: auto; background: var(--paper); border: 1px solid var(--line-2); border-radius: 20px; padding: 26px; }
.empty { padding: 40px 0; color: var(--ink-2); max-width: 460px; }
.empty h3 { font-size: 20px; color: var(--ink); }
.empty-ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 20px; margin-bottom: 14px; background: color-mix(in srgb, var(--accent) 13%, var(--sheet)); color: var(--accent); transform: rotate(-5deg); }
.empty-ico svg { width: 28px; height: 28px; }
.skeleton { background: var(--line); border-radius: 4px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.notif { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.notif.unread { box-shadow: inset 3px 0 0 var(--marker); }
.notif:last-child { border-bottom: 0; }
.dropzone { display: block; border: 2px dashed var(--line-2); border-radius: 16px; padding: 26px; text-align: center; cursor: pointer; color: var(--ink-2); background: var(--sheet); }
.dropzone:hover, .dropzone.drag { border-color: var(--ink); color: var(--ink); }
.toolbar { display: flex; gap: 4px; flex-wrap: wrap; }
.toolbar button { border: 1px solid var(--line-2); background: var(--sheet); border-radius: 4px; padding: 3px 9px; cursor: pointer; font-size: 13px; font-weight: 600; }
.toolbar button:hover { border-color: var(--ink); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.swatches button.active { box-shadow: 0 0 0 2px var(--ink); }
.subject-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.subject-picker button { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--sheet); cursor: pointer; text-align: left; font-weight: 500; }
.subject-picker button:hover { border-color: var(--ink); }
.subject-picker button.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; }
.subject-picker button.active::after { content: '✓'; margin-left: auto; font-weight: 700; }
.my-subjects { display: flex; gap: 8px; flex-wrap: wrap; }
.my-subjects a { display: inline-flex; align-items: center; gap: 9px; padding: 6px 16px 6px 6px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--sheet); font-weight: 700; box-shadow: 0 2px 0 var(--line-2); }
.my-subjects a .code { border-radius: 999px; height: 28px; min-width: 32px; }
.my-subjects a:hover { border-color: var(--ink); }
@media (max-width: 640px) { .list .meter { display: none; } .section-head { flex-wrap: wrap; } .list > * { padding: 12px 14px; } }

/* Passwortfeld */
.field > label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field > span.row { display: flex; margin-bottom: 5px; }
.field > span.row > label { font-weight: 700; font-size: 14px; }
.field small { display: block; margin-top: 5px; font-size: 12.5px; }
.pw-field { position: relative; }
.pw-field .input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 32px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 4px; cursor: pointer; }
.pw-toggle:hover, .pw-toggle.on { color: var(--ink); }
.pw-toggle.on svg { stroke-width: 2.2; }

/* ---------- Einstieg und Anmeldeformular ---------- */
.entry-auth-form { margin-top: 20px; }
.entry-auth-form > * + * { margin-top: 13px; }
.entry-auth-form .entry-field-help { margin-top: 4px; }
.entry-auth-form .entry-terms { line-height: 1.45; }
.entry-trial-link { display: inline-block; margin-top: 7px; }
.entry-profile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 12px; margin: 14px 0; padding: 8px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); color: var(--muted); font-size: 13.5px; }
.entry-profile .btn { flex: none; }
.trial-shell { min-height: 100vh; }
.trial-top { max-width: 760px; margin-inline: auto; padding: 12px 32px 0; }
.trial-top .wordmark { padding: 0; }
.trial-shell .page { padding-top: 19px; }
.trial-result .trial-signin { margin-top: 16px; }
@media (max-width: 700px) { .trial-top { padding-inline: 16px; } .trial-shell .page { padding-bottom: 24px; } }

/* Schulwahl und wiederverwendete Animationen */
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.input.lg { padding: 12px 14px; font-size: 17px; }
.su-at { position: relative; display: block; }
.su-at > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 17px; color: var(--muted); pointer-events: none; }
.su-at > i svg { vertical-align: -4px; }
.su-at .input { padding-left: 36px; }
.su-sub { margin: 22px 0 8px; font-size: 14px; }
.su-pick .chip { transition: background-color .15s, color .15s, border-color .15s; }
.btn.busy { color: transparent !important; position: relative; }
.btn.busy::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: su-spin .7s linear infinite; }
.shake { animation: su-shake .38s cubic-bezier(.36, .07, .19, .97); }
@keyframes su-spin { to { transform: rotate(1turn); } }
@keyframes su-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes su-press { 40% { transform: scale(.93); } }
@keyframes su-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .shake { animation: none; } }

/* ---------- Heute und Lernrunden ---------- */
.study-home {
  --study-color: color-mix(in srgb, var(--accent) 83%, var(--ink));
  --study-soft: color-mix(in srgb, var(--c-nova) 11%, var(--sheet));
  --study-edge: color-mix(in srgb, var(--c-nova) 28%, var(--line));
  --study-green: color-mix(in srgb, var(--ok) 74%, var(--ink));
  max-width: 1032px;
  margin-inline: auto;
}
.study-greeting { margin: 4px 0 24px; }
.study-greeting p { margin: 0 0 5px; font-size: 15px; color: var(--muted); }
.study-greeting h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); line-height: 1.06; overflow-wrap: anywhere; }
.study-dashboard { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(260px, 1fr); gap: 18px; }
.study-plan { position: relative; isolation: isolate; overflow: hidden; min-height: 278px; display: flex; align-items: center; padding: 28px; border: 1px solid var(--study-edge); border-radius: 24px; background: var(--study-soft); }
.study-plan.is-done { --study-soft: color-mix(in srgb, var(--ok) 10%, var(--sheet)); --study-edge: color-mix(in srgb, var(--ok) 32%, var(--line)); --study-color: var(--study-green); }
.study-plan-content { position: relative; z-index: 1; width: min(100%, 390px); }
.study-plan-label { display: flex; align-items: center; gap: 7px; color: var(--study-color); font-weight: 800; font-size: 14px; margin-bottom: 12px; }
.study-plan h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.03; letter-spacing: -.028em; text-wrap: balance; overflow-wrap: anywhere; margin: 0 0 10px; }
.study-plan p { color: var(--ink-2); font-size: 15px; margin-bottom: 22px; max-width: 38ch; }
.study-plan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.study-card-mark { position: absolute; z-index: 0; inset: auto -12px 26px auto; width: 116px; height: 154px; border: 1px solid var(--study-edge); border-radius: 18px; background: color-mix(in srgb, var(--study-color) 7%, var(--sheet)); transform: rotate(12deg); }
.study-card-mark span { display: grid; place-items: center; position: absolute; inset: 5px 11px -5px -11px; border: 1px solid var(--study-edge); border-radius: inherit; transform: rotate(-17deg); color: var(--study-color); background: color-mix(in srgb, var(--study-color) 6%, var(--sheet)); box-shadow: 0 8px 18px color-mix(in srgb, var(--study-color) 13%, transparent); }
.study-card-mark svg { width: 36px; height: 36px; stroke-width: 1.35; }
.study-progress { padding: 19px 22px; border-radius: 24px; }
.study-progress h2 { margin: 0; font-size: 17px; }
.study-goal-value { display: flex; align-items: baseline; gap: 4px; margin: 4px 0 9px; color: var(--ink-2); }
.study-goal-value strong { color: var(--ink); font-size: 35px; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.study-goal-value svg { color: var(--study-green); align-self: center; margin-left: 3px; }
.study-meter { display: block; appearance: none; width: 100%; height: 8px; border: none; border-radius: 999px; overflow: hidden; background: var(--line); color: var(--accent); accent-color: var(--accent); }
.study-meter::-webkit-progress-bar { background-color: var(--line); border-radius: inherit; }
.study-meter::-webkit-progress-value { background: currentColor; border-radius: inherit; }
.study-meter::-moz-progress-bar { background: currentColor; border-radius: inherit; }
.study-goal-note { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.study-goal-form { margin-top: 10px; }
.study-goal-form select { min-width: 0; padding: 7px 8px; font-size: 14px; }
.study-goal-form p { margin: 6px 0 0; }
.study-series { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.study-series h2 { display: flex; gap: 5px; align-items: center; }
.study-series h2 svg { width: 16px; height: 16px; color: color-mix(in srgb, var(--c-groups) 78%, var(--ink)); }
.study-series .row > span { color: var(--muted); font-size: 13px; }
.study-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 11px 0 0; padding: 0; list-style: none; text-align: center; color: var(--muted); font-size: 11.5px; }
.study-week li { display: grid; justify-items: center; gap: 4px; }
.study-day-mark { display: grid; place-items: center; width: min(100%, 28px); aspect-ratio: 1; border-radius: 9px; border: 1px solid var(--line); color: var(--study-green); background: color-mix(in srgb, var(--line) 32%, transparent); }
.study-day-mark svg { width: 15px; height: 15px; stroke-width: 2.4; }
.study-week .is-studied .study-day-mark { background: color-mix(in srgb, var(--ok) 18%, var(--sheet)); border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }
.study-week .is-today { color: var(--ink); font-weight: 800; }
.study-week .is-today .study-day-mark { border: 1.5px solid var(--accent); }
.study-other { margin-top: 26px; }
.study-other h2 { font-size: 20px; margin-bottom: 10px; }
.study-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.study-shortcut { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--sheet); }
.study-shortcut:hover { border-color: var(--line-2); background: color-mix(in srgb, var(--line) 25%, var(--sheet)); }
.study-shortcut b { display: block; font-size: 15px; line-height: 1.15; }
.study-shortcut small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.2; }
.study-shortcut > svg { width: 16px; color: var(--muted); }
.study-menu { display: grid; gap: 25px; margin-top: 20px; }
.study-menu h2 { font-size: 19px; margin-bottom: 8px; }
.study-menu .study-shortcut + .study-shortcut { margin-top: 5px; }
.study-legal { display: flex; flex-wrap: wrap; gap: 5px 14px; color: var(--muted); font-size: 13px; margin-top: 22px; }
.study-legal a:hover { text-decoration: underline; }
.study-loading { height: 280px; margin-top: 24px; }
.study-round-head { display: grid; grid-template-columns: 90px minmax(0, 1fr) 60px; gap: 10px; align-items: center; text-align: center; }
.study-round-head > span { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.study-round-meter { margin: 12px 0 26px; }
button.flip { display: block; width: 100%; padding: 0; background: none; border: 0; text-align: left; }
button.flip .face-label { text-align: left; }
button.flip .face-text { overflow-wrap: anywhere; }
.study-flip-hint, .study-round-error { text-align: center; margin: 14px 0 0; }
.learn-btns [disabled] { cursor: wait; }
.learn-btns .revisit { background: var(--sheet); border-color: var(--line-2); }
.study-result { padding: 32px 0; }
.study-result p { max-width: 46ch; margin-inline: auto; }
.study-result-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 21px; background: color-mix(in srgb, var(--ok) 15%, var(--sheet)); color: color-mix(in srgb, var(--ok) 78%, var(--ink)); }
.study-result-icon svg { width: 33px; height: 33px; }
.study-result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.study-question { text-align: center; margin-bottom: 15px; }
.study-question h1 { font-family: var(--serif); font-size: clamp(19px, 3vw, 25px); letter-spacing: 0; line-height: 1.35; }
.study-quiz-next { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; }
.study-quiz-next p { margin: 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.study-goal-form[hidden], .study-round-head ~ [hidden], .learn-btns[hidden], .study-quiz-next[hidden], .study-result [hidden] { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1100px) and (min-width: 901px) { .study-card-mark { display: none; } }
@media (min-width: 1200px) { .study-plan { padding-right: 120px; } }
@media (max-width: 700px) {
  .study-plan-actions .btn { padding-inline: 12px; font-size: 15px; }
  .study-dashboard, .study-shortcuts { grid-template-columns: 1fr; gap: 10px; }
  .study-plan { padding: 22px 19px; min-height: 0; }
  .study-plan-content { width: 100%; }
  .study-card-mark { display: none; }
  .study-progress { padding: 15px 19px; }
  .study-greeting { margin: 0 0 16px; }
  .study-other { margin-top: 20px; }
  .study-shortcut { min-height: 50px; }
  .study-round-head { grid-template-columns: 80px minmax(0, 1fr) 43px; gap: 6px; }
  .study-round-meter { margin-bottom: 18px; }
  .flip { height: clamp(225px, 47svh, 330px); }
  .face .face-text, .face.back .face-text { font-size: clamp(18px, 5.2vw, 22px); padding: 12px 17px 18px; }
  .learn-btns .btn { padding: 12px 10px; font-size: 15px; }
  .learn-btns kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) { button.flip { transition: none; } }

/* ---------- Karten erstellen lassen ---------- */
.ai-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.ai-head h1 { margin: 0 0 6px; }
.lead-sm { font-size: 17px; color: var(--ink-2); margin: 0; }
.ai-badge { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 19px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--c-nova)); transform: rotate(-6deg); box-shadow: 0 4px 0 color-mix(in srgb, var(--c-nova) 50%, #000); }
.ai-badge svg { width: 28px; height: 28px; }
.ai-source { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.ai-source button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 14px 16px; border-radius: var(--r); border: 2px solid var(--line-2); background: var(--sheet); cursor: pointer; transition: border-color .15s, background-color .15s; }
.ai-source button svg { grid-row: span 2; width: 26px; height: 26px; color: var(--muted); }
.ai-source button b { font-size: 17px; }
.ai-source button span { font-size: 13.5px; color: var(--muted); }
.ai-source button.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--sheet)); }
.ai-source button.active svg { color: var(--accent); }
.ai-source button[disabled] { opacity: .55; cursor: not-allowed; }
.ai-box { padding: 22px; border-radius: 20px; background: var(--sheet); border: 1.5px solid var(--line-2); }
.ai-box > * + * { margin-top: 18px; }
.ai-label { display: block; font-weight: 800; font-size: 15px; margin-bottom: 8px; }
.ai-ideas { margin-top: 10px; }
.ai-ideas .chip { font-size: 13.5px; padding: 5px 12px; }
.ai-opts { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.ai-more { width: auto; padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: color-mix(in srgb, var(--line) 70%, transparent); }
.seg button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font-weight: 800; cursor: pointer; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.seg button.active { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 3px rgba(30, 25, 10, .15); }
.ai-note { text-align: center; margin-top: 10px !important; }
#ai-form.dim { opacity: .45; pointer-events: none; transition: opacity .2s; }
@media (max-width: 640px) { .ai-source, .ai-opts { grid-template-columns: 1fr; } .ai-box { padding: 16px; } .ai-head h1 { font-size: 26px; } .ai-badge { width: 48px; height: 48px; } }

/* Warten: Kartenstapel mischt sich */
.ai-wait { display: grid; place-items: center; gap: 18px; padding: 44px 0 20px; text-align: center; font-weight: 700; color: var(--ink-2); }
.ai-stack { position: relative; width: 120px; height: 84px; }
.ai-stack i { position: absolute; inset: 0; border-radius: 12px; background: var(--sheet); border: 2px solid var(--line-2);
  background-image: linear-gradient(transparent 22px, var(--margin) 22px, var(--margin) 23.5px, transparent 23.5px), repeating-linear-gradient(transparent 0 13px, var(--rule) 13px 14px); background-position: 0 0, 0 23px;
  animation: ai-shuffle 1.6s cubic-bezier(.5, 0, .3, 1) infinite; }
.ai-stack i:nth-child(1) { animation-delay: 0s; } .ai-stack i:nth-child(2) { animation-delay: -.53s; } .ai-stack i:nth-child(3) { animation-delay: -1.06s; }
@keyframes ai-shuffle {
  0% { transform: translate(0, 0) rotate(-4deg); z-index: 3; }
  30% { transform: translate(70px, -14px) rotate(14deg); z-index: 3; }
  50% { transform: translate(0, 4px) rotate(3deg); z-index: 1; }
  100% { transform: translate(0, 0) rotate(-4deg); z-index: 1; }
}

/* Ergebnis: Karten werden ausgeteilt */
.ai-result { margin-top: 26px; padding-top: 6px; }
.ai-cards { display: grid; gap: 10px; }
.ai-card { position: relative; display: grid; grid-template-columns: 30px 1fr 1fr 40px; gap: 10px; align-items: start; padding: 12px 12px 12px 14px; border-radius: 16px; background: var(--sheet); border: 1.5px solid var(--line-2); box-shadow: 0 2px 0 var(--line-2);
  animation: ai-deal .42s cubic-bezier(.2, .9, .25, 1.15) both; animation-delay: calc(var(--i) * 70ms); transition: opacity .2s, transform .2s; }
@keyframes ai-deal { from { opacity: 0; transform: translateY(-18px) rotate(-3deg) scale(.96); } }
.ai-card.gone { opacity: 0; transform: translateX(40px) rotate(6deg); }
.ai-num { display: grid; place-items: center; width: 28px; height: 28px; margin-top: 4px; border-radius: 9px; background: color-mix(in srgb, var(--c-cards) 15%, var(--sheet)); color: var(--c-cards); font-weight: 800; font-size: 13px; }
.ai-card textarea { width: 100%; resize: none; border: 1.5px solid transparent; border-radius: 10px; background: transparent; padding: 6px 8px; line-height: 1.45; outline: none; overflow: hidden; }
.ai-card textarea:hover { border-color: var(--line); }
.ai-card textarea:focus { border-color: var(--accent); background: var(--paper); }
.ai-front { font-weight: 700; }
.ai-back { color: var(--ink-2); font-family: var(--serif); }
@media (max-width: 640px) { .ai-card { grid-template-columns: 28px 1fr 36px; } .ai-back { grid-column: 2; } .ai-card .icon-btn { grid-column: 3; grid-row: 1; } }

/* Hinweis auf der Karteikarten-Seite */
.ai-cta { display: flex; align-items: center; gap: 16px; margin: 18px 0 26px; padding: 18px 20px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--c-nova)); box-shadow: 0 4px 0 color-mix(in srgb, var(--c-nova) 50%, #000); transition: transform .12s; }
.ai-cta:hover { transform: translateY(-2px); }
.ai-cta .ai-badge { background: rgba(255, 255, 255, .2); box-shadow: none; width: 50px; height: 50px; }
.ai-cta > span:nth-child(2) { flex: 1; }
.ai-cta b { display: block; font-size: 19px; }
.ai-cta span span { opacity: .9; font-size: 14.5px; }
.ai-cta > svg { width: 24px; height: 24px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  .ai-stack i, .ai-card { animation: none; }
  .ai-card.gone, .nav a:hover .ni, .tile:hover, .ai-cta:hover, .modes a:hover { transform: none; }
}
@media (max-width: 560px) { .hide-sm { display: none !important; } }
/* Rangliste: Medaillen für die ersten drei */
#lb .list > a:nth-child(-n+3) .rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #3a2a00; text-align: center; font-size: 14px; }
#lb .list > a:nth-child(1) .rank { background: #f5c542; }
#lb .list > a:nth-child(2) .rank { background: #cfd5dc; }
#lb .list > a:nth-child(3) .rank { background: #e0a06a; }

/* ---------- Schule wählen ---------- */
.sp-chosen[hidden], .sp-search[hidden], .sp-class[hidden], .sp-other[hidden] { display: none; }
.sp-search .input { padding-left: 42px; }
.sp-res { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.sp-res button { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--sheet); display: grid; gap: 1px; transition: border-color .15s, transform .12s; animation: su-rise .25s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 20ms); }
.sp-res button:hover, .sp-res button:focus-visible { border-color: var(--c-groups); }
.sp-res button b { font-weight: 600; line-height: 1.3; }
.sp-res button span { font-size: 13px; color: var(--muted); }
.sp-none { color: var(--muted); font-size: 14px; padding: 6px 2px; }
.sp-chosen { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--c-groups); background: color-mix(in srgb, var(--c-groups) 7%, var(--sheet)); animation: su-press .32s cubic-bezier(.3, 1.6, .5, 1); }
.sp-chosen b { display: block; line-height: 1.3; }
.sp-chosen .grow > span { font-size: 13px; color: var(--muted); }
.sp-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--c-groups); background: color-mix(in srgb, var(--c-groups) 15%, var(--sheet)); }
.sp-ico svg { width: 22px; height: 22px; }
.sp-other { display: grid; gap: 4px; margin-top: 10px; max-width: 220px; }
.chip.ghost { border-style: dashed; }

/* ---------- Chats ---------- */
.list.rooms .room { gap: 12px; }
.chat-rule { display: flex; gap: 6px; align-items: center; margin: 0; padding: 7px 14px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.chat-rule svg { width: 15px; height: 15px; flex: none; color: var(--ok); }
.chat-ended { margin: 0; padding: 14px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.chat-empty { margin: auto; text-align: center; max-width: 340px; font-size: 14.5px; }
.gmsg { position: relative; align-items: flex-start; }
.msg-more { align-self: center; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s; }
.msg-more svg { width: 16px; height: 16px; }
.gmsg:hover .msg-more, .msg-more:focus-visible { opacity: 1; }
.msg-more:hover { background: var(--line); color: var(--bad); }
@media (hover: none) { .msg-more { opacity: .6; } }
.rep-reasons { display: grid; gap: 6px; }
.rep-reasons label { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.rep-reasons label:has(input:checked) { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 6%, var(--sheet)); }
.school-cta { background: linear-gradient(135deg, var(--c-groups), #e0457b); box-shadow: 0 4px 0 color-mix(in srgb, var(--c-groups) 55%, #000); margin: 8px 0 14px; }

/* ---------- Lernpartner ---------- */
.partner-top { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin: 20px 0 8px; }
.dice-box { padding: 20px; border-radius: 20px; background: var(--sheet); border: 1.5px solid var(--line-2); box-shadow: 0 3px 0 var(--line-2); }
.switch { display: flex; gap: 14px; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .sw { flex: none; width: 50px; height: 30px; border-radius: 99px; background: var(--line-2); position: relative; transition: background-color .2s; }
.switch .sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.switch input:checked + .sw { background: var(--c-partners); }
.switch input:checked + .sw::after { transform: translateX(20px); }
.switch input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch b { display: block; }
.dice-stage { display: grid; justify-items: center; gap: 12px; margin-top: 22px; text-align: center; transition: opacity .2s; }
.dice-box:not(.on) .dice-stage { opacity: .5; }
.dice { position: relative; width: 74px; height: 74px; border-radius: 18px; background: var(--sheet); border: 2.5px solid var(--c-partners); box-shadow: 0 5px 0 color-mix(in srgb, var(--c-partners) 60%, #000); transform: rotate(-8deg); }
.dice i { position: absolute; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: var(--c-partners); left: var(--x); top: var(--y); transition: left .2s, top .2s, opacity .2s; }
/* Augen: Standard und 5 = Würfelfünf */
.dice i:nth-child(1) { --x: 27%; --y: 27%; } .dice i:nth-child(2) { --x: 73%; --y: 27%; } .dice i:nth-child(3) { --x: 50%; --y: 50%; }
.dice i:nth-child(4) { --x: 27%; --y: 73%; } .dice i:nth-child(5) { --x: 73%; --y: 73%; } .dice i:nth-child(6) { --x: 50%; --y: 50%; opacity: 0; }
.dice[data-n="1"] i:not(:nth-child(3)) { opacity: 0; }
.dice[data-n="2"] i:nth-child(n+2):nth-child(-n+4), .dice[data-n="2"] i:nth-child(6) { opacity: 0; }
.dice[data-n="3"] i:nth-child(2), .dice[data-n="3"] i:nth-child(4), .dice[data-n="3"] i:nth-child(6) { opacity: 0; }
.dice[data-n="4"] i:nth-child(3), .dice[data-n="4"] i:nth-child(6) { opacity: 0; }
.dice[data-n="6"] i:nth-child(3) { --x: 27%; } .dice[data-n="6"] i:nth-child(6) { --x: 73%; opacity: 1; }
.dice.rolling { animation: dice-roll .55s cubic-bezier(.4, 0, .6, 1) infinite; }
.dice.rolled { animation: dice-land .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes dice-roll { 0% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-22px) rotate(180deg); } 100% { transform: translateY(0) rotate(360deg); } }
@keyframes dice-land { 0% { transform: scale(1.2) rotate(20deg); } 100% { transform: scale(1) rotate(-8deg); } }
#found:empty { display: none; }
.found { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--c-partners) 9%, var(--sheet)); border: 1.5px solid var(--c-partners); animation: su-press .4s cubic-bezier(.3, 1.6, .5, 1); }
.found-msg { margin: 16px 0 0; text-align: center; color: var(--ink-2); }
.safety { padding: 18px 20px; border-radius: 20px; background: color-mix(in srgb, var(--ok) 7%, var(--sheet)); border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line)); }
.safety > svg { width: 26px; height: 26px; color: var(--ok); }
.safety h3 { margin: 6px 0 8px; font-size: 17px; }
.safety ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 14.5px; }
.safety p { margin: 12px 0 0; color: var(--ink-2); }
.pcard { gap: 12px; }
.pcard.ended { opacity: .65; }
.pcommon { display: flex; gap: 3px; }
.ended-list { margin-top: 18px; }
.ended-list summary { cursor: pointer; }
@media (max-width: 900px) { .partner-top { grid-template-columns: 1fr; } .tiles { grid-template-columns: 1fr; } .pcommon { display: none; } }
@media (prefers-reduced-motion: reduce) { .dice.rolling, .dice.rolled, .found, .sp-chosen, .sp-res button { animation: none; } }
.found .grow { min-width: 180px; }
@media (max-width: 1180px) { .partner-top { grid-template-columns: 1fr; } }
.gmsg.mine .bubble .link { color: #fff; font-weight: 600; }
.share-deck { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; }
.share-deck:hover:not(:disabled) { background: color-mix(in srgb, var(--line) 45%, var(--sheet)); }
.share-deck:disabled { cursor: not-allowed; opacity: .55; }

/* ---------- Lehrplan ---------- */
.lp-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.lp-head h1 { margin: 0; }
.lp-badge { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: color-mix(in srgb, var(--c-saved) 16%, var(--sheet)); color: var(--c-saved); flex: none; }
.lp-badge .i { width: 28px; height: 28px; }
.lp-hello { padding: 14px 18px; margin-bottom: 16px; border-color: color-mix(in srgb, var(--c-saved) 45%, var(--line)); }
.lp-controls { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.lp-tracks { padding: 18px 20px; margin-bottom: 18px; }
.lp-tracks h2 { margin: 0; font-size: 19px; }
.lp-choice { margin-top: 16px; }
.lp-choice.later { opacity: .72; }
.lp-choice-h { margin-bottom: 4px; }
.lp-choice p { margin: 2px 0 8px; }
.lp-choice .chips { gap: 8px; }
.lp-choice .chip { white-space: normal; text-align: left; }
.lp-info { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c-saved) 10%, var(--sheet)); }
.lp-suggest { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: 14.5px; }
.lp-none { margin: 0 0 16px; }
.lp-filter { margin: 4px 0 14px; gap: 10px; }
.lp-subject { margin: 0 0 26px; }
.lp-subject h2 { display: flex; align-items: center; gap: 10px; font-size: 21px; margin: 0 0 10px; }
.lp-topics { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: lp; }
.lp-topics > li { position: relative; padding: 14px 16px 14px 52px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); counter-increment: lp; }
.lp-topics > li::before { content: counter(lp); position: absolute; left: 14px; top: 13px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; font-size: 13px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--sheet)); }
.lp-t { font-size: 16.5px; }
.lp-topics ul { margin: 6px 0 10px; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.lp-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-missing { padding: 20px; margin-top: 32px; }
.lp-missing h2 { margin: 0 0 4px; }
.lp-thanks { display: flex; gap: 8px; align-items: center; color: var(--ok); font-weight: 600; }
@media (max-width: 640px) { .lp-controls { grid-template-columns: 1fr 1fr; } .lp-controls .field:first-child { grid-column: 1 / -1; } .lp-topics > li { padding-left: 46px; } }
.lp-curated { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }
.lp-curated-h { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.lp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--sheet); font-size: 14px; text-decoration: none; color: inherit; }
.lp-chip:hover { border-color: var(--c, var(--accent)); }
.lp-chip small { color: var(--muted); font-size: 12px; }
.lp-chip .i, .lp-curated-h .i { width: 16px; height: 16px; }

/* ---------- App-Knopf und Anleitung „Zum Home-Bildschirm“ ---------- */
.app-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px 0 9px; margin-right: 6px; border-radius: 999px; background: var(--marker); color: var(--marker-ink); font-size: 14px; line-height: 1; box-shadow: 0 2px 0 color-mix(in srgb, var(--marker) 55%, #000); transition: transform .08s, box-shadow .08s; }
.app-btn:active { transform: translateY(2px); box-shadow: none; }
.app-btn svg { width: 17px; height: 17px; }
.app-btn b { font-weight: 800; }
.app-btn span { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--marker-ink) 12%, transparent); }
@media (max-width: 560px) { .app-btn { margin-right: 2px; padding: 0 10px 0 8px; } .app-btn span { display: none; } }

.app-hero { display: grid; grid-template-columns: 150px 1fr; gap: 32px; align-items: center; margin: 8px 0 30px; }
.app-hero h1 { margin-bottom: 10px; }
.app-hero .lead-sm { max-width: 60ch; }
.app-phone { width: 150px; aspect-ratio: 9 / 18.5; border-radius: 28px; padding: 9px; background: #1c1b18; box-shadow: 0 10px 0 rgba(28, 27, 24, .15); transform: rotate(-5deg); }
.app-screen { height: 100%; border-radius: 20px; background: linear-gradient(170deg, #6d8cf2, #9b7be6 60%, #e98aa8); display: flex; flex-direction: column; align-items: center; padding-top: 26px; gap: 6px; }
.app-screen img { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 3px 8px rgba(0, 0, 0, .25); animation: app-pop .5s .2s cubic-bezier(.3, 1.6, .5, 1) both; }
.app-screen span { color: #fff; font-size: 12px; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
@keyframes app-pop { from { transform: scale(0); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .app-screen img { animation: none; } }
.app-wip { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 12px 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--marker) 55%, transparent); color: var(--ink); font-weight: 700; }
.app-wip svg { width: 18px; height: 18px; flex: none; }
#app-install:not(:empty) { margin-top: 18px; }
.app-seg { margin-bottom: 18px; }
.app-done { display: flex; align-items: center; gap: 10px; padding: 16px 18px; font-weight: 700; }
.app-done svg { color: var(--good, #2e9b5f); }
.app-hint { margin-top: 18px; }
.inst { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; gap: 10px; }
.inst li { min-width: 0; counter-increment: st; position: relative; display: grid; gap: 4px; padding: 16px 18px 16px 62px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); }
.inst li::before { content: counter(st); position: absolute; left: 16px; top: 13px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--marker); color: var(--marker-ink); font-weight: 800; }
.inst b { font-weight: 700; line-height: 1.6; }
.inst span:not(.kbd) { color: var(--muted); font-size: 14.5px; }
.kbd { display: inline; padding: 1px 8px 1px 6px; margin: 0 2px; border: 1.5px solid var(--line-2); border-bottom-width: 3px; border-radius: 8px; background: var(--paper); font-weight: 700; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.kbd svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 5px; }
@media (max-width: 560px) {
  .app-hero { grid-template-columns: 1fr; gap: 18px; }
  .app-phone { width: 104px; border-radius: 22px; padding: 7px; }
  .app-screen { border-radius: 16px; padding-top: 16px; }
  .app-screen img { width: 42px; height: 42px; border-radius: 10px; }
  .app-hero h1 { font-size: 30px; }
}
@media (max-width: 460px) {
  .app-btn.guest { width: 36px; padding: 0; justify-content: center; margin-right: 0; }
  .app-btn.guest b { display: none; }
  .topbar .guest-login { display: none; }
}

/* ---------- Impressum, Datenschutz, Nutzungsbedingungen ---------- */
.legal .md { max-width: 68ch; }
.legal .md code { font-size: .88em; padding: 1px 5px; border-radius: 5px; background: var(--paper); border: 1px solid var(--line); }
.legal-foot { margin-top: 2.2em !important; padding-top: 1em; border-top: 1px solid var(--line); font-family: var(--sans); }
/* Sprachwahl (Flagge neben der Glocke) */
.lang-pick { position: relative; }
.lang-btn .flag { display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 180px; padding: 6px; background: var(--sheet, var(--paper)); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.lang-menu[hidden] { display: none; }
.lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.lang-menu button:hover, .lang-menu button[aria-checked="true"] { background: var(--line); }
.lang-menu .flag { flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.lang-check { margin-left: auto; color: var(--ink-2); }
/* Mit der Sprach-Flagge wird es oben auf dem Handy eng: App-Knopf nur als Symbol */
@media (max-width: 420px) {
  .topbar .app-btn { width: 36px; padding: 0; justify-content: center; margin-right: 0; }
  .topbar .app-btn b { display: none; }
  .topbar .icon-btn { width: 36px; }
}
