/* Masar – Gestaltung */
:root {
  --bg: #f6f4ef;
  --bg-2: #efece4;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --line: #e6e2d8;
  --line-2: #d9d4c7;
  --ink: #17171c;
  --ink-2: #45454f;
  --ink-3: #6a6a74;
  --accent: #0d7a69;
  --accent-2: #0b5f73;
  --accent-ink: #ffffff;
  --accent-soft: #e2f1ec;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --late: #c2410c;
  --shadow-s: 0 1px 2px rgba(23, 23, 28, .05);
  --shadow: 0 1px 2px rgba(23, 23, 28, .04), 0 10px 30px -12px rgba(23, 23, 28, .12);
  --shadow-l: 0 2px 6px rgba(23, 23, 28, .05), 0 30px 60px -20px rgba(23, 23, 28, .25);
  --r: 18px;
  --r-s: 12px;
  --side: 264px;
  --font: 'Inter', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --c-teal: #0e9f87; --c-sky: #2f80d1; --c-violet: #7357d6; --c-rose: #dc4a68; --c-amber: #d48a1c; --c-slate: #5f6b7a;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1113; --bg-2: #13171a; --surface: #171b1e; --surface-2: #1b2024; --line: #262d32; --line-2: #333b41;
  --ink: #eef0f1; --ink-2: #bcc3c8; --ink-3: #8d969c; --accent: #3cc7ad; --accent-2: #39a9c4; --accent-ink: #06201b;
  --accent-soft: #14302b; --danger: #ff7a6b; --danger-soft: #3a1c19; --late: #fb923c;
  --shadow-s: none; --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -12px rgba(0,0,0,.6); --shadow-l: 0 30px 60px -20px rgba(0,0,0,.7);
  --c-teal: #2ec4a8; --c-sky: #5aa6f0; --c-violet: #9b84f2; --c-rose: #f07691; --c-amber: #f0b44a; --c-slate: #9aa6b4;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1113; --bg-2: #13171a; --surface: #171b1e; --surface-2: #1b2024; --line: #262d32; --line-2: #333b41;
    --ink: #eef0f1; --ink-2: #bcc3c8; --ink-3: #8d969c; --accent: #3cc7ad; --accent-2: #39a9c4; --accent-ink: #06201b;
    --accent-soft: #14302b; --danger: #ff7a6b; --danger-soft: #3a1c19; --late: #fb923c;
    --shadow-s: none; --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -12px rgba(0,0,0,.6); --shadow-l: 0 30px 60px -20px rgba(0,0,0,.7);
    --c-teal: #2ec4a8; --c-sky: #5aa6f0; --c-violet: #9b84f2; --c-rose: #f07691; --c-amber: #f0b44a; --c-slate: #9aa6b4;
    color-scheme: dark;
  }
}

.c-teal { --c: var(--c-teal); } .c-sky { --c: var(--c-sky); } .c-violet { --c: var(--c-violet); }
.c-rose { --c: var(--c-rose); } .c-amber { --c: var(--c-amber); } .c-slate { --c: var(--c-slate); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 15.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01';
}
[dir="rtl"] body { font-size: 16px; line-height: 1.7; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.35; }
p { margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
.ic { flex: none; display: block; }
[dir="rtl"] .flip .ic, [dir="rtl"] .ic:has(.dir) { transform: scaleX(-1); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.spacer { flex: 1; }
.muted { color: var(--ink-3); }
.small { font-size: .85em; }
.center { text-align: center; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
main:focus, h1:focus { outline: none; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }
kbd { font: 600 11px/1 var(--font); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-3); }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 14.5px; text-decoration: none;
  white-space: nowrap; transition: transform .12s ease, background .15s, box-shadow .15s, border-color .15s; color: var(--ink);
  background: var(--surface);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff) 0%, var(--accent) 100%); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface); border-color: var(--ink-3); }
.btn.light { background: #fff; color: #0b3b36; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost.danger { background: transparent; color: var(--danger); border-color: transparent; }
.btn.ghost.danger:hover { background: var(--danger-soft); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; gap: 6px; }
.btn.small .ic { width: 17px; height: 17px; }
.btn.big { min-height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn.full { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--accent-ink); border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 0; background: transparent;
  color: var(--ink-3); transition: background .15s, color .15s; flex: none;
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.sm .ic { width: 17px; height: 17px; }
.icon-btn[aria-pressed="true"] { color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Formularfelder ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > label, .field legend { font-weight: 600; font-size: 13.5px; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
fieldset.field legend { margin-bottom: 8px; }
.hint { color: var(--ink-3); font-size: 12.5px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s; font-size: 15px;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: .85; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
input:disabled { background: var(--surface-2); color: var(--ink-3); }
.form-error { color: var(--danger); font-weight: 600; font-size: 14px; min-height: 0; }
.form-error:empty { display: none; }
.form-error:not(:empty) { margin: 0 0 14px; padding: 10px 12px; background: var(--danger-soft); border-radius: 10px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 48px !important; }
.pw-wrap .icon-btn { position: absolute; inset-inline-end: 3px; top: 3px; }

.check {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border-radius: 7px; flex: none;
  border: 2px solid var(--line-2); background: var(--surface); display: grid; place-items: center; transition: all .15s; cursor: pointer;
}
.check:hover { border-color: var(--accent); }
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::after { content: ''; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.check.sm { width: 19px; height: 19px; border-radius: 6px; }
.check.sm:checked::after { width: 5px; height: 9px; }

.colors { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.colors legend { width: 100%; }
.swatch { position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--c); cursor: pointer; display: block; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent; transition: box-shadow .15s; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }
.swatch:has(input:focus-visible) { outline: 2.5px solid var(--accent); outline-offset: 5px; }
.stars { flex-direction: row; gap: 4px; }
.stars legend { width: 100%; }
.star { position: relative; color: var(--line-2); cursor: pointer; }
.star input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.star .ic { width: 30px; height: 30px; }
.stars:has(.star:nth-of-type(1) input:checked) .star:nth-of-type(-n+1),
.stars:has(.star:nth-of-type(2) input:checked) .star:nth-of-type(-n+2),
.stars:has(.star:nth-of-type(3) input:checked) .star:nth-of-type(-n+3),
.stars:has(.star:nth-of-type(4) input:checked) .star:nth-of-type(-n+4),
.stars:has(.star:nth-of-type(5) input:checked) .star:nth-of-type(-n+5) { color: var(--c-amber); }
.stars:has(input:checked) .star .ic, .star .ic { fill: currentColor; }
.star:has(input:focus-visible) { outline: 2.5px solid var(--accent); border-radius: 6px; }

/* ---------- Marke ---------- */
.brand-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand-link.small { font-size: 15px; gap: 8px; }
.brand-link.light { color: #fff; }
.logo { display: block; filter: drop-shadow(0 4px 10px rgba(14, 159, 135, .25)); }

/* ---------- Startseite ---------- */
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.site-head { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.head-row { display: flex; align-items: center; gap: 10px; height: 68px; }
.lang-pick { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); position: relative; }
.lang-pick select { min-height: 38px !important; padding: 6px 28px 6px 8px !important; border: 0 !important; background: transparent !important; font-weight: 600; font-size: 14px !important; color: var(--ink-2); width: auto !important; cursor: pointer; }
[dir="rtl"] .lang-pick select { padding: 6px 8px 6px 28px !important; }
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 50% at 20% 30%, color-mix(in srgb, var(--c-teal) 22%, transparent), transparent 70%),
              radial-gradient(35% 45% at 80% 20%, color-mix(in srgb, var(--c-amber) 20%, transparent), transparent 70%),
              radial-gradient(30% 40% at 60% 80%, color-mix(in srgb, var(--c-violet) 14%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow-s); }
.eyebrow .ic { width: 16px; height: 16px; color: var(--c-amber); }
.display { font-size: clamp(42px, 6.4vw, 76px); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin: 22px 0 20px; text-wrap: balance;
  background: linear-gradient(120deg, var(--ink) 30%, var(--accent) 75%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[dir="rtl"] .display { letter-spacing: 0; line-height: 1.25; font-weight: 700; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 34em; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.mock { position: relative; height: 470px; }
.mock-win { position: absolute; inset: 10px 30px 30px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-l); overflow: hidden; transform: rotate(-1.2deg); }
.mock-top { display: flex; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mock-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.mock-body { padding: 22px 24px; }
.mock-eyebrow { color: var(--ink-3); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.mock-h { font-size: 26px; font-weight: 800; margin: 4px 0 18px; letter-spacing: -.02em; }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-stats div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.mock-stats b { display: block; font-size: 22px; }
.mock-stats span { display: block; font-size: 11.5px; line-height: 1.3; color: var(--ink-3); }
.mock-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 16px 0; }
.mock-week div { text-align: center; padding: 8px 0; border-radius: 12px; font-size: 11px; color: var(--ink-3); }
.mock-week b { display: block; font-size: 15px; color: var(--ink); }
.mock-week .on { background: var(--accent); color: var(--accent-ink); }
.mock-week .on b { color: var(--accent-ink); }
.mock-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.mc { width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--line-2); }
.mc.on { background: var(--accent); border-color: var(--accent); }
.bar-s { width: 4px; height: 18px; border-radius: 4px; background: var(--c-sky); }
.mock-card { position: absolute; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow-l); font-size: 14px; }
.mock-card small { display: block; color: var(--ink-3); font-size: 12px; }
.mock-card.c1 { inset-inline-end: 0; top: 60px; animation: float 6s ease-in-out infinite; }
.mock-card.c2 { inset-inline-start: -10px; bottom: -18px; animation: float 7s ease-in-out infinite reverse; }
.mock-card.c2 .ic { color: var(--c-violet); width: 26px; height: 26px; }
@keyframes float { 50% { transform: translateY(-8px); } }

.section { padding: 88px 0; }
.section.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; letter-spacing: -.03em; text-align: center; text-wrap: balance; }
[dir="rtl"] .h2 { letter-spacing: 0; font-weight: 700; }
.section-sub { text-align: center; color: var(--ink-2); font-size: 17px; margin: 12px auto 0; max-width: 36em; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s; }
.feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-l); }
.feat h3 { font-size: 18px; margin: 16px 0 6px; }
.feat p { color: var(--ink-2); font-size: 15px; }
.feat-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--c); }
.feat-ic .ic { width: 24px; height: 24px; }
.f0 { --c: var(--c-sky); } .f1 { --c: var(--c-teal); } .f2 { --c: var(--c-violet); } .f3 { --c: var(--c-rose); } .f4 { --c: var(--c-amber); } .f5 { --c: var(--c-slate); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 40px; margin-top: 48px; }
.why-grid li { display: flex; gap: 16px; align-items: flex-start; }
.why-grid h3 { font-size: 16.5px; margin-bottom: 4px; }
.why-grid p { color: var(--ink-2); font-size: 14.5px; }
.why-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); flex: none; }
.cta-band { text-align: center; padding: 64px 24px; border-radius: 30px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(60% 120% at 0% 0%, #18b496 0%, transparent 60%), radial-gradient(60% 120% at 100% 100%, #0b5f73 0%, transparent 60%), #0d7a69; }
.cta-band .h2 { color: #fff; }
.cta-band p { opacity: .9; margin: 10px 0 28px; font-size: 17px; }
.site-foot { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-3); font-size: 14px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; justify-content: space-between; }
.foot-row a { color: var(--ink-2); }
.prose { max-width: 720px; padding: 48px 0 80px; }
.prose h1 { font-size: 38px; margin-bottom: 24px; }
.prose p { margin-bottom: 16px; color: var(--ink-2); font-size: 16.5px; }

/* ---------- Anmeldung ---------- */
.auth { display: grid; grid-template-columns: minmax(340px, 1fr) 1.2fr; min-height: 100vh; min-height: 100dvh; }
.auth-art { position: relative; padding: 40px 48px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  background: radial-gradient(70% 60% at 10% 10%, #1bc2a2 0%, transparent 60%), radial-gradient(70% 70% at 100% 100%, #0b4f66 0%, transparent 60%), #0d7a69; }
.auth-art::after { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); inset-inline-end: -200px; top: 30%; box-shadow: 0 0 0 60px rgba(255,255,255,.04), 0 0 0 130px rgba(255,255,255,.03); }
.auth-quote { font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; max-width: 11em; }
[dir="rtl"] .auth-quote { letter-spacing: 0; line-height: 1.35; }
.auth-art ul { display: grid; gap: 12px; font-weight: 500; position: relative; z-index: 1; }
.auth-art li { display: flex; gap: 10px; align-items: center; }
.auth-art li .ic { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: rgba(255,255,255,.18); }
.auth-main { display: flex; flex-direction: column; padding: 24px; }
.auth-top { display: flex; align-items: center; }
.auth-card { width: min(420px, 100%); margin: auto; padding: 24px 0 40px; }
.auth-card h1 { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.auth-card .sub { color: var(--ink-2); margin: 8px 0 28px; }
.auth-card .switch { text-align: center; margin-top: 20px; color: var(--ink-2); }
.or { margin: 22px 0; height: 1px; background: var(--line); }

/* ---------- App-Rahmen ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 18px 14px; border-inline-end: 1px solid var(--line); background: var(--surface-2); }
.brand { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px 22px; }
.drawer-close { display: none; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 14.5px; transition: background .15s, color .15s; }
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s), 0 0 0 1px var(--line); }
.nav a[aria-current="page"] .ic { color: var(--accent); }
.side-foot { margin-top: auto; display: grid; gap: 12px; }
.sync-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); padding: 0 12px; font-weight: 500; }
.sync-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-teal); }
.sync-pill.busy .dot { background: var(--c-amber); animation: pulse 1s infinite; }
.sync-pill.off .dot { background: var(--c-slate); }
.sync-pill.err .dot { background: var(--danger); }
.sync-pill.guest .dot { background: var(--c-amber); }
@keyframes pulse { 50% { opacity: .3; } }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px; color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--c-teal), var(--accent-2)); }
.avatar .ic { width: 18px; height: 18px; }
.me-text { display: grid; min-width: 0; line-height: 1.3; }
.me-text b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 10px; padding: 14px 36px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4); }
.only-mobile { display: none !important; }
.search-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); min-width: 240px; font-size: 14px; }
.search-btn kbd { margin-inline-start: auto; }
.search-btn:hover { border-color: var(--line-2); color: var(--ink-2); }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 36px; padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, var(--c-amber) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c-amber) 35%, transparent); font-size: 14px; font-weight: 500; }
.banner .ic { color: var(--c-amber); }
.banner span { flex: 1; min-width: 180px; }
main#main { padding: 18px 36px 64px; width: 100%; max-width: 1240px; }
.backdrop { position: fixed; inset: 0; background: rgba(10, 12, 14, .45); z-index: 40; backdrop-filter: blur(2px); }
.tabbar { display: none; }

.page-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px; justify-content: space-between; margin: 10px 0 24px; }
.page-head h1, .dash-head h1 { font-size: clamp(28px, 3.2vw, 38px); font-weight: 800; letter-spacing: -.03em; }
[dir="rtl"] .page-head h1, [dir="rtl"] .dash-head h1 { letter-spacing: 0; font-weight: 700; }
.page-head .sub { color: var(--ink-3); margin-top: 4px; font-weight: 500; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.dash-head { margin: 10px 0 20px; }
.eyebrow-date { color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
[dir="rtl"] .eyebrow-date { letter-spacing: 0; font-size: 14px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 6px 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { font-size: 17px; font-weight: 700; }
.card-head h2 small { display: block; font-size: 13px; font-weight: 500; color: var(--ink-3); margin-top: 2px; }
.link { font-size: 13.5px; font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip .ic { width: 13px; height: 13px; }
.chip.late { background: color-mix(in srgb, var(--late) 14%, var(--surface)); color: var(--late); }
.chip.hot { background: color-mix(in srgb, var(--c-rose) 14%, var(--surface)); color: var(--c-rose); }
.chip.muted { padding: 2px 6px; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; margin-inline-start: 8px; border-radius: 999px; background: var(--bg-2); font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 26px 12px; color: var(--ink-3); }
.empty > .ic { width: 34px; height: 34px; padding: 7px; box-sizing: content-box; border-radius: 16px; background: var(--bg-2); color: var(--ink-3); }
.empty p { max-width: 26em; font-size: 14.5px; }
.bar { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--c, var(--accent)), color-mix(in srgb, var(--c, var(--accent)) 70%, #fff)); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.ring { --size: 58px; position: relative; display: grid; place-items: center; width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  background: conic-gradient(var(--c, var(--accent)) calc(var(--p) * 1%), var(--bg-2) 0); }
.ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.ring b, .ring small { position: relative; font-size: 14px; font-weight: 800; }
.ring.big { --size: 96px; }
.ring.big::before { inset: 9px; }
.ring.big b { font-size: 26px; line-height: 1; }
.ring.big small { font-size: 13px; color: var(--ink-3); position: absolute; margin-top: 34px; }

/* Schnell-Eingabe */
.quick { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 22px; transition: border-color .15s, box-shadow .15s; }
[dir="rtl"] .quick { padding: 6px 16px 6px 6px; }
.quick:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent), var(--shadow); }
.quick > .ic { color: var(--accent); }
.quick input:not(.quick-date) { border: 0 !important; box-shadow: none !important; padding: 8px 0 !important; min-height: 40px !important; background: transparent !important; flex: 1; font-size: 15.5px !important; }
.quick .quick-date { width: auto !important; min-height: 38px !important; padding: 6px 10px !important; font-size: 13.5px !important; border-radius: 10px !important; background: var(--surface-2) !important; }

/* Kennzahlen */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { position: relative; display: grid; gap: 2px; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.stat::after { content: ''; position: absolute; inset-inline-end: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: color-mix(in srgb, var(--c) 10%, transparent); }
.stat b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 10px; }
.stat b small { font-size: 16px; color: var(--ink-3); font-weight: 600; }
.stat > span:last-child { color: var(--ink-3); font-size: 13px; font-weight: 500; }
.stat-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--c); }
.stat-ic .ic { width: 19px; height: 19px; }
.s1 { --c: var(--c-teal); } .s2 { --c: var(--c-amber); } .s3 { --c: var(--c-rose); } .s4 { --c: var(--c-violet); }
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.span2 { grid-column: span 2; grid-row: span 2; }

/* Listenzeilen */
.rows { display: grid; }
.rows + .rows { margin-top: 6px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 12px; transition: background .15s; }
.row:hover { background: var(--surface-2); }
.row + .row { box-shadow: 0 -1px 0 var(--line); }
.row:hover + .row, .row:hover { box-shadow: none; }
.row-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; cursor: pointer; }
.row-title { font-weight: 550; overflow-wrap: anywhere; }
.row-meta { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.task.is-done .row-title { text-decoration: line-through; color: var(--ink-3); text-decoration-color: var(--ink-3); }
.task.is-done .row-meta { opacity: .6; }
.row .icon-btn { opacity: .55; }
.row:hover .icon-btn, .row .icon-btn:focus-visible { opacity: 1; }
.event .ev-bar { width: 4px; align-self: stretch; min-height: 34px; border-radius: 4px; background: var(--c); }
.event .row-main { cursor: default; }
.group + .group { margin-top: 4px; }
.group-h { display: flex; align-items: center; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 14px 12px 6px; }
[dir="rtl"] .group-h { letter-spacing: 0; font-size: 13.5px; }
.group-h.late { color: var(--late); }
.sub-h { font-size: 13px; font-weight: 700; color: var(--ink-3); margin: 18px 4px 6px; }

/* Segment-Umschalter */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 16px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: transparent; font-weight: 600; font-size: 14px; color: var(--ink-3); transition: all .15s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s), 0 0 0 1px var(--line); }
.seg button[aria-pressed="true"] .count { background: var(--accent-soft); color: var(--accent); }
.seg .ic { width: 17px; height: 17px; }
fieldset .seg { margin: 0; }

/* Woche-Streifen */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.week-strip a { display: grid; justify-items: center; gap: 2px; padding: 10px 0 8px; border-radius: 12px; text-decoration: none; color: var(--ink-3); font-size: 11.5px; font-weight: 600; transition: background .15s; }
.week-strip a:hover { background: var(--bg-2); }
.week-strip b { font-size: 17px; color: var(--ink); }
.week-strip .on a { background: var(--accent); color: color-mix(in srgb, var(--accent-ink) 80%, transparent); }
.week-strip .on b { color: var(--accent-ink); }
.dots { display: flex; gap: 3px; height: 5px; }
.dots em { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.on .dots em { background: var(--accent-ink); }
.mini-goals { display: grid; gap: 14px; }
.mg-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 550; margin-bottom: 6px; }
.mg-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-top b { color: var(--c); }
.book-mini { display: flex; gap: 14px; align-items: center; }
.book-mini > div { flex: 1; min-width: 0; display: grid; gap: 4px; }
.book-mini h3 { font-size: 15.5px; }
.idea-mini { padding: 16px; border-radius: 14px; background: color-mix(in srgb, var(--c) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
.idea-mini h3 { font-size: 15.5px; margin-bottom: 4px; }
.idea-mini p { color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }

/* Kalender */
.cal-layout { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.cal { padding: 18px; }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 0 4px; }
.cal-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; text-transform: capitalize; }
.cal-wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 0 0 8px; }
.cal-wd span { text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { width: 100%; min-height: 96px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); text-align: start; transition: border-color .15s, background .15s, transform .1s; }
.day:hover { border-color: var(--line-2); background: var(--surface); }
.day.out { opacity: .45; }
.day .num { font-size: 13.5px; font-weight: 700; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; }
.day.today .num { background: var(--accent); color: var(--accent-ink); }
.day[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.pills { display: grid; gap: 3px; min-width: 0; }
.pill { display: block; font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: color-mix(in srgb, var(--c) 75%, var(--ink)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-inline-start: 3px solid var(--c); }
.more { font-style: normal; font-size: 11px; color: var(--ink-3); font-weight: 600; padding: 0 4px; }
.tdot { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--late); margin: 2px 4px; }
.agenda { position: sticky; top: 84px; }

/* Wochenplan */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.wday { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px 10px; box-shadow: var(--shadow); min-height: 260px; }
.wday.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow); }
.wday h2 { display: grid; gap: 2px; font-size: 14px; padding: 0 4px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.wday h2 span { font-weight: 700; }
.wday h2 b { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.wday.on h2 b { color: var(--accent); }
.plist { display: grid; gap: 4px; flex: 1; align-content: start; }
.pitem { display: flex; align-items: flex-start; gap: 8px; padding: 7px 4px; border-radius: 9px; font-size: 13.5px; }
.pitem:hover { background: var(--surface-2); }
.pitem label { flex: 1; min-width: 0; overflow-wrap: anywhere; cursor: pointer; padding-top: 1px; line-height: 1.4; }
.pitem .check { margin-top: 1px; }
.pitem.is-done label { text-decoration: line-through; color: var(--ink-3); }
.pitem .icon-btn { width: 24px; height: 24px; opacity: 0; margin-top: -2px; }
.pitem:hover .icon-btn, .pitem .icon-btn:focus-visible { opacity: .7; }
.pev { display: flex; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 600; padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
.ev-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.pfree { color: var(--ink-3); font-size: 13px; padding: 6px 4px; font-style: italic; }
.padd { display: flex; align-items: center; gap: 4px; margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.padd input { min-height: 34px !important; padding: 6px 8px !important; font-size: 13.5px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.padd:focus-within { border-top-color: var(--accent); }

/* Ziele */
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.goal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.goal::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.goal-top { display: flex; gap: 14px; align-items: flex-start; }
.goal-info { flex: 1; min-width: 0; display: grid; gap: 6px; justify-items: start; }
.goal-info h2 { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.goal-info p { display: inline-flex; align-items: center; gap: 6px; }
.goal-info p .ic { width: 14px; height: 14px; }
.chip.area { background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: color-mix(in srgb, var(--c) 80%, var(--ink)); }
.ms-count { margin: 16px 0 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
[dir="rtl"] .ms-count { letter-spacing: 0; }
.ms { display: grid; gap: 2px; }
.ms li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 6px; border-radius: 9px; font-size: 14.5px; }
.ms li:hover { background: var(--surface-2); }
.ms label { flex: 1; cursor: pointer; line-height: 1.4; }
.ms .is-done label { text-decoration: line-through; color: var(--ink-3); }
.goal .check:checked { background: var(--c); border-color: var(--c); }

/* Ideen */
.filter { position: relative; display: flex; align-items: center; margin-bottom: 18px; max-width: 420px; }
.filter > .ic { position: absolute; inset-inline-start: 14px; color: var(--ink-3); pointer-events: none; }
.filter input { padding-inline-start: 44px !important; border-radius: 14px !important; }
.filter.big { max-width: none; margin-bottom: 8px; }
.ideas { columns: 3 280px; column-gap: 16px; }
.idea { break-inside: avoid; margin-bottom: 16px; }
.idea article { padding: 18px 18px 10px; border-radius: var(--r); background: color-mix(in srgb, var(--c) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 24%, transparent); transition: transform .2s, box-shadow .2s; }
.idea article:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.idea h2 { font-size: 16.5px; font-weight: 700; display: flex; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; }
.idea p { color: var(--ink-2); font-size: 14.5px; margin-top: 8px; white-space: pre-line; overflow-wrap: anywhere; }
.idea footer { display: flex; align-items: center; gap: 2px; margin-top: 12px; }
.idea .chip { background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.pin-mark { color: var(--c); }
.pin-mark .ic { width: 17px; height: 17px; margin-top: 2px; }

/* Bücher */
.year-goal { display: flex; align-items: center; gap: 22px; margin-bottom: 20px; --c: var(--c-violet);
  background: linear-gradient(120deg, color-mix(in srgb, var(--c-violet) 10%, var(--surface)), var(--surface) 60%); }
.year-goal h2 { font-size: 19px; font-weight: 800; }
.year-goal p { color: var(--ink-2); margin: 4px 0 12px; }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.book article { display: flex; gap: 16px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); height: 100%; }
.book-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.book-info h2 { font-size: 16.5px; font-weight: 700; overflow-wrap: anywhere; }
.book-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; padding-top: 8px; }
.book-actions .icon-btn { margin-inline-start: auto; }
.cover { position: relative; flex: none; width: 74px; height: 106px; border-radius: 6px 10px 10px 6px; display: grid; place-items: center; overflow: hidden; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 80%, #fff), var(--c) 45%, color-mix(in srgb, var(--c) 70%, #000));
  box-shadow: inset 4px 0 0 rgba(0,0,0,.18), 0 8px 18px -8px color-mix(in srgb, var(--c) 80%, transparent); }
.cover b { font-size: 30px; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,.2); }
.cover i { position: absolute; inset: auto 10px 12px; height: 2px; background: rgba(255,255,255,.5); border-radius: 2px; box-shadow: 0 -6px 0 rgba(255,255,255,.3); }
.cover.sm { width: 52px; height: 74px; }
.cover.sm b { font-size: 22px; }
.rating { color: var(--c-amber); letter-spacing: 2px; font-size: 15px; }
.rating span { color: var(--line-2); }

/* Einstellungen */
.settings { display: grid; gap: 18px; max-width: 720px; }
.settings h2 { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.settings .field:last-child { margin-bottom: 0; }
.file-btn { cursor: pointer; }
.st-imp:focus-visible + .file-btn { outline: 2.5px solid var(--accent); }
.keys { display: grid; gap: 10px; margin: 0; }
.keys div { display: flex; align-items: center; gap: 12px; }
.keys dt { min-width: 70px; }
.keys dd { margin: 0; color: var(--ink-2); }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.danger-zone p { color: var(--ink-2); margin-bottom: 14px; }
.settings .muted.small { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.settings .center { justify-content: center; }
.warn-box { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-weight: 600; margin-bottom: 16px; }

/* ---------- Dialog ---------- */
dialog { padding: 0; border: 0; border-radius: 22px; background: var(--surface); color: var(--ink); width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 32px); box-shadow: var(--shadow-l), 0 0 0 1px var(--line); }
dialog[open] { animation: pop .18s cubic-bezier(.2, .8, .2, 1); }
dialog::backdrop { background: rgba(10, 12, 14, .5); backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dlg-form { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 18px 6px 24px; }
[dir="rtl"] .dlg-head { padding: 18px 24px 6px 18px; }
.dlg-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.dlg-body { padding: 14px 24px 8px; overflow: auto; display: flex; flex-wrap: wrap; column-gap: 12px; }
.dlg-body > * { width: 100%; }
.dlg-body > .field.half { width: calc(50% - 6px); }
.dlg-foot { display: flex; align-items: center; gap: 8px; padding: 14px 24px 20px; border-top: 1px solid var(--line); }
.search-dlg { width: min(620px, calc(100% - 24px)); align-self: start; margin-top: 10vh; }
.results { display: grid; gap: 2px; max-height: 50vh; overflow: auto; padding-bottom: 12px; }
.results .muted { padding: 14px 4px; }
.result { display: flex; width: 100%; align-items: center; gap: 10px; padding: 11px 12px; border: 0; background: transparent; border-radius: 11px; text-align: start; font-weight: 550; }
.result:hover, .result:focus-visible { background: var(--bg-2); }
.result span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result small { color: var(--ink-3); }
.qa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-bottom: 16px; }
.qa { width: 100%; display: grid; justify-items: center; gap: 10px; padding: 20px 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 14px; transition: all .15s; }
.qa .ic { width: 26px; height: 26px; color: var(--c); }
.qa:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); transform: translateY(-2px); }

/* Hinweise */
#toasts { position: fixed; inset-inline: 0; bottom: 24px; display: grid; justify-items: center; gap: 8px; z-index: 60; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-l); font-weight: 600; font-size: 14.5px; pointer-events: auto; opacity: 0; transform: translateY(14px); transition: opacity .25s, transform .25s; }
.toast.in { opacity: 1; transform: none; }
.toast-btn { border: 0; background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); padding: 6px 12px; border-radius: 9px; font-weight: 700; }

/* ---------- Mittlere Bildschirme ---------- */
@media (max-width: 1180px) {
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cal-layout { grid-template-columns: 1fr; }
  .agenda { position: static; }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .span2 { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .mock { height: 430px; max-width: 520px; width: 100%; margin-inline: auto; }
  .feat-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-main .only-mobile { display: inline-flex !important; }

  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 50; width: min(300px, 86vw); transform: translateX(-105%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-l); visibility: hidden; }
  [dir="rtl"] .sidebar { transform: translateX(105%); }
  .drawer-open .sidebar { transform: none !important; visibility: visible; }
  .drawer-close { display: inline-grid; }
  .only-mobile { display: inline-flex !important; }
  .topbar { padding: 10px 16px; }
  .search-btn { min-width: 0; padding: 0 11px; }
  .search-btn span, .search-btn kbd { display: none; }
  .banner { margin: 0 16px; }
  main#main { padding: 12px 16px 110px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 30; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px) saturate(1.5); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border: 0; background: transparent; color: var(--ink-3); font-size: 11px; font-weight: 600; text-decoration: none; border-radius: 12px; }
  .tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar [aria-current="page"] { color: var(--accent); }
  .tabbar [aria-current="page"] .ic { background: var(--accent-soft); border-radius: 10px; }
  .tabbar .ic { width: 40px; height: 28px; padding: 4px 10px; }
  .add-btn span { display: none; }
  .add-btn { padding: 0 12px; }
  #toasts { bottom: 92px; }
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 14px; }
  .stat b { font-size: 25px; }
  .dash-grid { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .week { grid-template-columns: 1fr; }
  .wday { min-height: 0; }
  .day { min-height: 54px; padding: 4px; align-items: center; }
  .day .pills { display: flex; gap: 2px; justify-content: center; }
  .pill { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; font-size: 0; background: var(--c); }
  .more { display: none; }
  .tdot { margin: 0; }
  .cal { padding: 12px; }
  .cal-wd, .cal-grid { gap: 3px; }
  .feat-grid, .why-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 60px; }
  .lead { font-size: 17px; }
  .section { padding: 60px 0; }
  .mock { height: 380px; }
  .mock-card.c1 { top: 20px; }
  .hide-xs { display: none !important; }
  .dlg-body > .field.half { width: 100%; }
  dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 92dvh; }
  .search-dlg { margin-top: auto; }
  .qa-grid { grid-template-columns: repeat(2, 1fr); }
  .books, .goal-grid { grid-template-columns: 1fr; }
  .year-goal { gap: 16px; }
  .ring.big { --size: 82px; }
  .quick { flex-wrap: wrap; }
  .quick .quick-date { order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .check:checked { background: Highlight; }
  .day[aria-pressed="true"], .nav a[aria-current="page"] { outline: 2px solid Highlight; }
}
