/* ------------------------------------------------------------------ *
 * Wedding-Planner – Oberfläche im Stil von Apples «Liquid Glass»,
 * eingefärbt nach der Save-the-Date-Karte von Dana & Pascal: Creme als
 * Grund, Kobalt als Tinte, Schleifenblau für die Lichtflecken hinter dem
 * Glas, und Fraunces – weich und leicht verspielt – für Datum, Namen und
 * Titel. Bedienelemente bleiben in der Systemschrift.
 *
 * Aufbau in drei Ebenen:
 *   0  eine ruhige, farbige Grundfläche (.app::before)
 *   1  Inhaltsflächen aus mattem Glas (Karten, Zeilen, Tabellen)
 *   2  schwebende Bedienelemente (Seitenleiste, Dialoge, Hinweise)
 *
 * Alles ist auf «.app» eingegrenzt: eingebettet in ein fremdes Theme fasst
 * das Stylesheet nichts ausserhalb an.
 *
 * Zur Leistung: `backdrop-filter` ist teuer. Es liegt deshalb nur auf den
 * wenigen schwebenden Flächen und auf Karten – Listenzeilen, von denen es
 * Dutzende geben kann, bekommen nur durchscheinende Füllungen. Weil die
 * Grundfläche ohnehin weich verlaufend ist, sieht man den Unterschied nicht.
 * ------------------------------------------------------------------ */

/* Selbst gehostet (SIL Open Font License, siehe fonts/OFL.txt): das Plugin
   lädt nichts von fremden Servern. Variabel in Stärke, optischer Grösse,
   «SOFT» und «WONK» – eine Datei für alle Schnitte. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces.woff2") format("woff2");
}

:root {
  /* Grundfläche und Glas – Creme der Karte, Schleifenblau als Licht */
  --bg: #f5ecd3;
  /* Bewusst zurückhaltend: der Flyer ist flach – das Glas soll nur einen
     Hauch Licht einfangen, keine bunten Flecken. */
  --bg-tint-1: rgba(143, 159, 211, .28);
  --bg-tint-2: rgba(255, 249, 230, .9);
  --bg-tint-3: rgba(143, 159, 211, .18);
  --bg-tint-4: rgba(250, 242, 220, .8);

  --glass-soft: linear-gradient(150deg, rgba(255, 253, 245, .62), rgba(255, 251, 238, .34));
  --glass-strong: linear-gradient(150deg, rgba(255, 253, 246, .8), rgba(255, 251, 238, .55));
  --glass-raised: linear-gradient(150deg, rgba(255, 254, 249, .9), rgba(255, 252, 242, .7));
  --glass-sunken: rgba(255, 252, 240, .45);
  --glass-hover: rgba(255, 253, 246, .74);

  --rim: rgba(255, 255, 250, .55);
  --rim-bright: rgba(255, 255, 252, .82);
  --rim-dim: rgba(255, 255, 250, .12);
  --hairline: rgba(43, 63, 155, .12);
  --hairline-strong: rgba(43, 63, 155, .2);

  --blur-panel: saturate(180%) blur(30px);
  --blur-card: saturate(160%) blur(18px);
  --blur-overlay: saturate(140%) blur(24px);

  /* Schrift – Tinte aus dem Kobalt der Karte */
  --text: #1d2660;
  --text-muted: #4d578d;
  --text-faint: #5f6898;

  /* Akzente */
  --accent: #2b3f9b;
  --accent-strong: #1f2e7c;
  --accent-soft: rgba(43, 63, 155, .12);
  --accent-glow: rgba(43, 63, 155, .32);
  /* Schrift auf Akzentflächen (Knöpfe, Markenzeichen). */
  --on-accent: #fffaf0;
  /* Schleifenblau – nur Schmuck, nie Information. */
  --ribbon: #8f9fd3;
  --ribbon-soft: rgba(143, 159, 211, .28);
  --good: #2f7a54;
  --good-soft: rgba(47, 122, 84, .14);
  --warning: #94650f;
  --warning-soft: rgba(196, 140, 34, .2);
  --danger: #b03a32;
  --danger-soft: rgba(197, 66, 56, .15);
  /* «intern»: Himbeere – hebt sich klar vom Blau ab und ist keine Statusfarbe. */
  --internal: #a3436a;
  --internal-soft: rgba(176, 72, 114, .14);
  --overlay: rgba(20, 26, 64, .3);

  /* Tiefe – Schatten mit einem Hauch Kobalt statt Grau */
  --shadow-sm: 0 1px 2px rgba(29, 38, 96, .03), 0 3px 10px -6px rgba(29, 38, 96, .08);
  --shadow: 0 1px 2px rgba(29, 38, 96, .03), 0 14px 34px -20px rgba(29, 38, 96, .16);
  --shadow-lg: 0 24px 70px -20px rgba(22, 30, 80, .44), 0 2px 8px rgba(22, 30, 80, .1);
  --inner-top: inset 0 1px 0 rgba(255, 255, 252, .85);
  --inner-bottom: inset 0 -1px 0 rgba(255, 255, 252, .3);

  /* Form und Bewegung */
  --r-xl: 22px;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 9px;
  --r-pill: 999px;
  --spring: cubic-bezier(.32, .72, 0, 1);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif;
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  /* Die weichen, leicht schiefen Formen der Karte – für grosse Zahlen und Namen. */
  --display-soft: "SOFT" 30, "WONK" 0;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Nachtblau mit Creme als Tinte – die Karte umgedreht. */
    --bg: #0e1330;
    --bg-tint-1: rgba(43, 63, 155, .62);
    --bg-tint-2: rgba(143, 159, 211, .2);
    --bg-tint-3: rgba(62, 48, 124, .4);
    --bg-tint-4: rgba(32, 70, 140, .36);

    --glass-soft: linear-gradient(150deg, rgba(246, 238, 212, .09), rgba(246, 238, 212, .045));
    --glass-strong: linear-gradient(150deg, rgba(246, 238, 212, .13), rgba(246, 238, 212, .065));
    --glass-raised: linear-gradient(150deg, rgba(246, 238, 212, .16), rgba(246, 238, 212, .09));
    --glass-sunken: rgba(6, 9, 26, .42);
    --glass-hover: rgba(246, 238, 212, .12);

    --rim: rgba(246, 238, 212, .18);
    --rim-bright: rgba(246, 238, 212, .5);
    --rim-dim: rgba(246, 238, 212, .04);
    --hairline: rgba(246, 238, 212, .1);
    --hairline-strong: rgba(246, 238, 212, .18);

    --text: #f6eed6;
    --text-muted: #bcc0dc;
    --text-faint: #9aa1c6;

    --accent: #aebcf2;
    --accent-strong: #ccd5fb;
    --accent-soft: rgba(174, 188, 242, .18);
    --accent-glow: rgba(174, 188, 242, .28);
    --on-accent: #10173d;
    --ribbon: #8f9fd3;
    --ribbon-soft: rgba(143, 159, 211, .3);
    --good: #8fd0a8;
    --good-soft: rgba(143, 208, 168, .18);
    --warning: #e7bd72;
    --warning-soft: rgba(231, 189, 114, .18);
    --danger: #f2978b;
    --danger-soft: rgba(242, 151, 139, .18);
    --internal: #f0a6c4;
    --internal-soft: rgba(240, 166, 196, .18);
    --overlay: rgba(4, 6, 20, .5);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px -6px rgba(0, 0, 0, .5);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 36px -16px rgba(0, 0, 0, .7);
    --shadow-lg: 0 28px 80px -22px rgba(0, 0, 0, .85), 0 2px 10px rgba(0, 0, 0, .5);
    --inner-top: inset 0 1px 0 rgba(255, 250, 235, .14);
    --inner-bottom: inset 0 -1px 0 rgba(255, 250, 235, .05);
  }
}

/* Nur die eigenständige Seite darf am Dokument selbst schrauben – als Plugin
   liegt die App in einem fremden Theme und fasst nichts ausserhalb an. */
body.wpl-standalone { margin: 0; }

/* Wurzelelement: Typografie, Grundfarben und die Layoutmasse, die im
   Plugin-Betrieb überschrieben werden. */
.app {
  --shell-min-height: 100dvh;
  --sidebar-height: 100dvh;
  --sticky-top: 0px;
  --overlay-z: 60;
  position: relative;
  isolation: isolate;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ebene 0: die farbige Grundfläche, durch die alles Glas hindurchschaut. */
.app::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 780px at 6% -8%, var(--bg-tint-1), transparent 60%),
    radial-gradient(860px 680px at 96% 2%, var(--bg-tint-2), transparent 58%),
    radial-gradient(960px 820px at 48% 106%, var(--bg-tint-3), transparent 56%),
    radial-gradient(680px 560px at 82% 66%, var(--bg-tint-4), transparent 58%),
    var(--bg);
}

.app, .app *, .app *::before, .app *::after { box-sizing: border-box; }

.app h1, .app h2, .app h3 {
  font-family: var(--display);
  font-weight: 620;
  letter-spacing: -.012em;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  margin: 0;
}
.app p { margin: 0; }
.app a { color: var(--accent); }
.app .link { color: var(--accent); text-decoration: none; word-break: break-word; }
.app .link:hover { text-decoration: underline; }
.app .text-danger { color: var(--danger); }
.app .icon { flex: none; }

/* ---------------------------------------------------------- Glas */
/* Schwebende Flächen: eigener Weichzeichner, heller Rand, weiche Tiefe. */
.app .sidebar,
.app .topbar,
.app .hero,
.app .login__card,
.app .modal,
.app .toast,
.app .card,
.app .stat {
  position: relative;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur-card);
  backdrop-filter: var(--blur-card);
  box-shadow: var(--inner-top), var(--inner-bottom), var(--shadow);
}

.app .sidebar,
.app .topbar,
.app .modal,
.app .login__card,
.app .toast {
  -webkit-backdrop-filter: var(--blur-panel);
  backdrop-filter: var(--blur-panel);
}

/* Inhaltsflächen ohne eigenen Weichzeichner – es können viele sein. */
.app .check,
.app .task,
.app .event,
.app .idea,
.app .contribution,
.app .scope,
.app .note-card,
.app .note-banner,
.app .hint-banner,
.app .empty,
.app .table-wrap,
.app .note-body {
  position: relative;
  background: var(--glass-soft);
  box-shadow: var(--inner-top), var(--shadow-sm);
}

/* Der Lichtsaum: eine haarfeine Kante, die oben hell aufblitzt und unten
   ausläuft. Dafür wird ein Verlauf als Rahmen maskiert. */
.app .sidebar::after,
.app .topbar::after,
.app .hero::after,
.app .login__card::after,
.app .modal::after,
.app .toast::after,
.app .card::after,
.app .stat::after,
.app .check::after,
.app .task::after,
.app .event::after,
.app .idea::after,
.app .contribution::after,
.app .scope::after,
.app .note-card::after,
.app .note-banner::after,
.app .hint-banner::after,
.app .empty::after,
.app .table-wrap::after,
.app .note-body::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, var(--rim-bright), var(--rim) 28%, var(--rim-dim) 52%, var(--rim) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

/* Inhalte liegen über dem Saum. */
.app .card > *,
.app .hero > *,
.app .stat > *,
.app .check > *,
.app .task > *,
.app .event > *,
.app .idea > *,
.app .contribution > *,
.app .scope > *,
.app .note-card > *,
.app .modal > *,
.app .login__card > * { position: relative; z-index: 1; }

/* ---------------------------------------------------------- Login */
.app .login {
  min-height: var(--shell-min-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
}
.app .login__card {
  width: 100%;
  max-width: 420px;
  border-radius: var(--r-xl);
  padding: 34px 30px;
}
.app .login__eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}
.app .login__title {
  font-size: 32px; font-weight: 800; margin-bottom: 8px;
  font-variation-settings: var(--display-soft); color: var(--accent);
}
.app .login__text { color: var(--text-muted); margin-bottom: 22px; font-size: 14px; }
.app .login__form { display: grid; gap: 15px; }
.app .login__footer { color: var(--text-muted); font-size: 13px; text-align: center; max-width: 420px; }

/* ---------------------------------------------------------- Gerüst */
.app .shell { display: flex; min-height: var(--shell-min-height); }

.app .sidebar {
  width: 248px;
  flex: none;
  border-radius: 0;
  /* Etwas durchlässiger als die Karten – so trägt die Grundfläche durch. */
  background: var(--glass-soft);
  border-right: 1px solid var(--hairline);
  padding: 20px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: var(--sticky-top);
  height: var(--sidebar-height);
  box-shadow: none;
}
.app .sidebar::after { display: none; }

.app .sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 0; }
.app .sidebar__mark {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(150deg, var(--accent), var(--accent-strong));
  color: var(--on-accent);
  font-size: 19px;
  box-shadow: 0 6px 16px -6px var(--accent-glow), var(--inner-top);
}
/* Himugüegeli: heller Panzer auf Kobalt, die Punkte lassen den Grund durch. */
.app .ladybug__spot { fill: var(--accent-strong); }
.app .ladybug__seam { stroke: var(--accent-strong); }

.app .sidebar__title {
  display: block; font-family: var(--display); font-size: 16px; font-weight: 760; letter-spacing: -.01em;
  font-variation-settings: var(--display-soft); color: var(--accent);
}
.app .sidebar__subtitle { display: block; font-size: 12px; color: var(--text-muted); }

.app .nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.app .nav__link {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .25s var(--spring), color .25s var(--spring), transform .25s var(--spring);
}
.app .nav__link:hover { background: var(--glass-hover); color: var(--text); }
.app .nav__link.is-active {
  background: var(--glass-raised);
  color: var(--accent-strong);
  box-shadow: var(--inner-top), var(--shadow-sm);
}

.app .sidebar__user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--hairline);
}
.app .sidebar__user-info { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
.app .sidebar__user-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.app .sidebar__user-info span { color: var(--text-muted); font-size: 12px; }

.app .shell__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app .content {
  flex: 1;
  padding: 30px 34px 72px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.app .topbar { display: none; }
.app .nav-scrim { display: none; }

/* ---------------------------------------------------------- Seitenkopf */
.app .page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 2px 2px 0;
}
.app .page-title {
  font-size: 34px; font-weight: 800; letter-spacing: -.018em; line-height: 1.08;
  font-variation-settings: var(--display-soft); color: var(--accent);
}
.app .page-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.app .page-header__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------- Kopfbereich */
.app .hero {
  border-radius: var(--r-xl);
  padding: 26px 28px;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
/* Aufbau wie die Karte: «save the date», grosses Datum, Namen. */
.app .hero { overflow: hidden; }
.app .hero__intro { min-width: 0; }
.app .hero__eyebrow {
  font-family: var(--display); font-size: 18px; font-weight: 360;
  letter-spacing: .01em; color: var(--accent);
}
.app .hero__bigdate {
  display: block; margin: 4px 0 2px;
  font-family: var(--display); font-weight: 900;
  font-size: clamp(46px, 7.4vw, 82px); line-height: .95; letter-spacing: -.02em;
  font-variation-settings: var(--display-soft);
  font-variant-numeric: lining-nums;
  color: var(--accent);
}
.app .hero__title {
  font-size: 30px; font-weight: 800; margin: 10px 0 4px; letter-spacing: -.012em;
  font-variation-settings: var(--display-soft); color: var(--accent);
}
.app .hero__date {
  font-family: var(--display); font-weight: 360; font-size: 17px; color: var(--text);
}
/* Die Schleife der Karte, angeschnitten an der Ecke – reiner Schmuck. */
.app .hero > .hero__ribbon {
  position: absolute; z-index: 0; right: -34px; bottom: -58px;
  width: 210px; height: auto;
  color: var(--ribbon); opacity: .6; pointer-events: none;
}
.app .hero__date--muted { font-style: italic; }
.app .hero__countdowns { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }

/* Ruhig wie auf dem Flyer: Spalten mit feiner Linie statt Kacheln. */
.app .countdown {
  padding: 2px 22px 2px 0;
  margin-right: 4px;
  border-right: 1px solid var(--hairline);
  min-width: 128px;
}
.app .countdown:last-child { border-right: none; }
.app .countdown--past { opacity: .55; }
.app .countdown__label {
  display: block; font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint);
}
.app .countdown__value {
  display: block; font-family: var(--display); font-size: 21px;
  font-weight: 760; letter-spacing: -.01em; margin: 3px 0 1px;
  font-variation-settings: var(--display-soft); color: var(--accent);
}
.app .countdown__date { display: block; font-size: 12px; color: var(--text-muted); }

.app .note-banner,
.app .hint-banner {
  border-radius: var(--r-lg);
  padding: 14px 18px;
  color: var(--text-muted);
  font-size: 14px;
  border-left: 3px solid var(--accent);
}

/* ---------------------------------------------------------- Kennzahlen */
.app .stat-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
}
.app .stat {
  border-radius: var(--r-lg);
  padding: 17px 19px;
  display: flex; flex-direction: column; gap: 3px;
}
.app .stat__value {
  font-family: var(--display); font-size: 31px; font-weight: 800; letter-spacing: -.015em; line-height: 1.05;
  font-variation-settings: var(--display-soft); color: var(--accent);
}
.app .stat__label { font-size: 13px; color: var(--text-muted); }
.app .stat__hint { font-size: 12px; color: var(--text-faint); }
.app .stat--good .stat__value { color: var(--good); }
.app .stat--danger .stat__value { color: var(--danger); }

/* ---------------------------------------------------------- Karten */
.app .grid { display: grid; gap: 16px; }
.app .grid--2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); align-items: start; }

.app .card {
  border-radius: var(--r-xl);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.app .card__title { font-size: 17px; letter-spacing: -.02em; }

.app .list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.app .list-row {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.app .list-row:last-child { border-bottom: none; }
.app .list-row__main {
  flex: 1; min-width: 0; text-align: left; background: none; border: none;
  padding: 0; cursor: pointer; color: inherit; font: inherit;
  display: flex; flex-direction: column; gap: 3px;
}
.app .list-row__main:hover .list-row__title { color: var(--accent); }
.app .list-row__title { font-weight: 500; }
.app .list-row__meta {
  font-size: 12.5px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}

.app .timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.app .timeline__item { display: flex; gap: 10px; align-items: flex-start; }
.app .timeline__text { font-size: 13.5px; }
.app .timeline__time { font-size: 12px; color: var(--text-faint); }

/* ---------------------------------------------------------- Gruppen */
.app .task-group { display: flex; flex-direction: column; gap: 10px; }
.app .task-group__title {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--sans);
  font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-faint);
  padding-left: 4px;
}
.app .task-group__count {
  background: var(--glass-sunken);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 1px 9px; font-size: 11.5px; letter-spacing: 0;
}
.app .task-group__items { display: flex; flex-direction: column; gap: 8px; }

/* ---------------------------------------------------------- Aufgaben */
.app .task {
  display: flex; align-items: center; gap: 12px;
  border-radius: var(--r-md);
  padding: 12px 15px;
  transition: transform .3s var(--spring), box-shadow .3s var(--spring);
}
.app .task:hover { box-shadow: var(--inner-top), var(--shadow); }
.app .task--done { opacity: .5; }
.app .task--done .task__title { text-decoration: line-through; }
.app .task--overdue { box-shadow: var(--inner-top), var(--shadow-sm), 0 0 0 1px var(--danger-soft); }
.app .task__main {
  flex: 1; min-width: 0; text-align: left; background: none; border: none;
  padding: 0; cursor: pointer; color: inherit; font: inherit;
  display: flex; flex-direction: column; gap: 4px;
}
.app .task__main:hover .task__title { color: var(--accent); }
.app .task__title { font-weight: 500; }
.app .task__meta {
  font-size: 12.5px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.app .task__actions { display: flex; gap: 2px; }

/* ---------------------------------------------------------- Importassistent */
.app .import { display: flex; flex-direction: column; gap: 16px; }
.app .import__steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: flex; gap: 18px; font-size: 13px; color: var(--text-faint);
}
.app .import__steps li { counter-increment: step; display: flex; align-items: center; gap: 7px; }
.app .import__steps li::before {
  content: counter(step); width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  border: 1.5px solid var(--hairline-strong);
}
.app .import__steps li.is-active { color: var(--text); font-weight: 600; }
.app .import__steps li.is-active::before { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.app .import__steps li.is-done::before { content: '✓'; border-color: var(--accent); color: var(--accent); }
.app .import__drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 26px 18px; border-radius: var(--r-lg); cursor: pointer;
  border: 1.5px dashed var(--hairline-strong); background: var(--glass-sunken); color: var(--accent);
  transition: background .2s var(--spring), border-color .2s var(--spring);
}
.app .import__drop:hover { border-color: var(--accent); background: var(--glass-hover); }
.app .import__drop strong { color: var(--text); font-size: 15px; }
.app .import__drop span { color: var(--text-muted); font-size: 13px; }
.app .import__file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.app .import__or { text-align: center; font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; }
.app .import__mapping { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.app .import__map {
  display: flex; flex-direction: column; gap: 8px; padding: 11px 12px;
  border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--glass-soft);
}
.app .import__map.is-skipped { opacity: .6; }
.app .import__col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app .import__col strong { font-size: 13.5px; }
.app .import__col span { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app .import__defaults { display: flex; flex-wrap: wrap; gap: 12px; }
.app .import__summary { font-size: 14px; color: var(--text-muted); }
.app .import__summary strong { color: var(--text); }
.app .import__warn { color: var(--danger); }
.app .import__more { font-size: 12.5px; color: var(--text-faint); }
.app .import__done { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; }
.app .import__count {
  font-family: var(--display); font-size: 56px; font-weight: 900; line-height: 1;
  font-variation-settings: var(--display-soft); color: var(--accent);
}
.app .import__notes { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-muted); max-height: 180px; overflow: auto; }
.app .modal__actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.app .table--compact td, .app .table--compact th { padding-top: 8px; padding-bottom: 8px; }
.app .table tr.is-duplicate, .app .table tr.is-invalid { opacity: .6; }
.app .table__plain { font-size: 13px; color: var(--text-muted); }
.app .table__address { white-space: pre-line; }
.app .link-quiet { color: var(--text-muted); text-decoration: none; }
.app .link-quiet:hover { color: var(--accent); }

/* ---------------------------------------------------------- Team */
.app .card__hint { font-size: 13px; color: var(--text-muted); margin: -4px 0 10px; }
.app .people__row { gap: 12px; }
.app .people__main { cursor: default; }
.app .people__main:hover .list-row__title { color: inherit; }
.app .people__warn { color: var(--danger); }
.app .button--small { padding: 7px 13px; font-size: 13px; }

/* ---------------------------------------------------------- Farbwahl */
.app .swatches { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.app .swatch {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 6px; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer; font-size: 13px; color: var(--text-muted);
  transition: background .2s var(--spring), border-color .2s var(--spring);
}
.app .swatch:hover { background: var(--glass-hover); }
.app .swatch__input { position: absolute; opacity: 0; pointer-events: none; }
.app .swatch__dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.app .swatch:has(.swatch__input:checked) {
  border-color: var(--hairline-strong); background: var(--glass-raised); color: var(--text);
}
.app .swatch:has(.swatch__input:checked) .swatch__dot {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px currentColor;
}
.app .swatch:has(.swatch__input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------- Checkliste */
.app .checklist-progress { display: flex; flex-direction: column; gap: 12px; }
.app .checklist-progress__head { display: flex; align-items: baseline; gap: 10px; }
.app .checklist-progress__value {
  font-family: var(--display); font-size: 34px; font-weight: 850; line-height: 1;
  letter-spacing: -.015em; font-variation-settings: var(--display-soft); color: var(--accent);
}
.app .checklist-progress__label { font-family: var(--display); font-size: 17px; font-weight: 360; color: var(--text-muted); }
.app .checklist-progress__hint { font-size: 13px; color: var(--text-muted); }

/* Fortschritt: Kobalt auf einer vertieften Glasrinne. */
.app .progress {
  height: 10px; border-radius: var(--r-pill);
  background: var(--glass-sunken);
  box-shadow: inset 0 1px 2px rgba(29, 38, 96, .12);
  overflow: hidden;
}
.app .progress__bar {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--ribbon), var(--accent));
  transition: width .6s var(--spring);
}

.app .checklist-group { display: flex; flex-direction: column; gap: 10px; }
.app .checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.app .check {
  display: flex; align-items: flex-start; gap: 14px;
  border-radius: var(--r-md);
  padding: 13px 15px;
}
.app .check__box {
  flex: none; width: 28px; height: 28px; margin-top: 1px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--glass-raised);
  color: var(--on-accent); font-size: 15px; font-weight: 800; line-height: 1;
  cursor: pointer;
  transition: background .25s var(--spring), transform .25s var(--spring), box-shadow .25s var(--spring);
}
.app .check__box:hover:not(:disabled) { transform: scale(1.08); box-shadow: 0 0 0 5px var(--accent-soft); }
.app .check__box:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app .check__box--done {
  background: linear-gradient(150deg, var(--accent), var(--accent-strong));
  box-shadow: 0 4px 12px -5px var(--accent-glow);
}
/* Punkte des Teams: für das Paar sichtbar, aber nicht abhakbar. */
.app .check__box:disabled { cursor: default; border-style: dashed; border-color: var(--text-faint); opacity: .7; }
.app .check__box--done:disabled { border-style: solid; border-color: transparent; }
.app .check__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.app .check__title { font-weight: 550; line-height: 1.35; }
.app .check__note { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.app .check__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 2px; font-size: 12.5px; color: var(--text-faint); }
.app .check__owner { font-weight: 550; color: var(--text-muted); }
.app .check__actions { display: flex; gap: 2px; flex: none; }
.app .check--done .check__title { text-decoration: line-through; text-decoration-color: var(--ribbon); color: var(--text-muted); }
.app .check--done { opacity: .72; }

/* ---------------------------------------------------------- Ideen */
.app .idea-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); align-items: start; }

.app .idea,
.app .contribution,
.app .scope,
.app .note-card {
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: flex; gap: 12px;
  transition: transform .3s var(--spring), box-shadow .3s var(--spring);
}
.app .idea:hover,
.app .contribution:hover,
.app .scope:hover,
.app .note-card:hover { box-shadow: var(--inner-top), var(--shadow); }

.app .idea { align-items: flex-start; }
.app .idea--angenommen { box-shadow: var(--inner-top), var(--shadow-sm), 0 0 0 1px var(--good-soft); }
.app .idea--verworfen { opacity: .5; }

.app .idea__main,
.app .contribution__main,
.app .scope__main,
.app .note-card__main {
  flex: 1; min-width: 0; text-align: left; background: none; border: none;
  padding: 0; cursor: pointer; color: inherit; font: inherit;
  display: flex; flex-direction: column; gap: 7px;
}

/* Titel zuerst, Marken darunter – so bricht kein Titel um eine Marke herum. */
.app .idea__head,
.app .contribution__head,
.app .scope__head {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
}
.app .idea__title,
.app .contribution__title,
.app .scope__title { font-size: 16px; line-height: 1.3; letter-spacing: -.02em; }
.app .idea__main:hover .idea__title,
.app .contribution__main:hover .contribution__title,
.app .scope__main:hover .scope__title,
.app .note-card__main:hover .note-card__title { color: var(--accent); }
.app .idea__text,
.app .contribution__text,
.app .scope__text {
  font-size: 13.5px; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.app .idea__meta,
.app .contribution__meta,
.app .scope__meta {
  font-size: 12.5px; color: var(--text-faint); display: flex; gap: 5px; flex-wrap: wrap;
}
.app .idea__side,
.app .contribution__side {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  align-self: stretch; justify-content: space-between;
}
.app .idea__actions { display: flex; gap: 2px; }

.app .vote {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: var(--glass-sunken);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 7px 12px;
  cursor: pointer; color: var(--text-muted); font: inherit; font-size: 13px;
  transition: all .25s var(--spring);
}
.app .vote:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.app .vote:disabled { cursor: default; }
.app .vote__heart { font-size: 15px; line-height: 1; }
.app .vote--on {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-strong);
  box-shadow: 0 4px 12px -6px var(--accent-glow);
}

/* ------------------------------------------- Unser Beitrag & Abgrenzung */
.app .contribution-list,
.app .scope-grid { display: grid; gap: 12px; align-items: start; }
.app .scope-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.app .contribution--verworfen,
.app .scope--geklaert { opacity: .7; }
.app .scope__badges { display: flex; gap: 5px; flex-wrap: wrap; }
.app .scope__question { font-size: 13.5px; color: var(--accent-strong); }
.app .scope__answer { font-size: 13.5px; color: var(--good); }

/* ---------------------------------------------------------- Termine */
.app .event-list { display: flex; flex-direction: column; gap: 8px; }
.app .event {
  display: flex; align-items: center; gap: 14px;
  border-radius: var(--r-md);
  padding: 11px 15px;
  transition: box-shadow .3s var(--spring);
}
.app .event:hover { box-shadow: var(--inner-top), var(--shadow); }
.app .event--past { opacity: .5; }
.app .event__date {
  width: 54px; flex: none; text-align: center;
  background: var(--accent-soft);
  border-radius: var(--r-sm);
  padding: 6px 0;
}
.app .event__day {
  display: block; font-family: var(--display); font-size: 20px;
  font-weight: 600; letter-spacing: -.02em; color: var(--accent-strong); line-height: 1.1;
}
.app .event__month { display: block; font-size: 10.5px; font-weight: 600; color: var(--accent-strong); }
.app .event__main {
  flex: 1; min-width: 0; text-align: left; background: none; border: none;
  padding: 0; cursor: pointer; color: inherit; font: inherit;
  display: flex; flex-direction: column; gap: 3px;
}
.app .event__main:hover .event__title { color: var(--accent); }
.app .event__title { font-weight: 500; }
.app .event__meta { font-size: 12.5px; color: var(--text-muted); }
.app .event__badges { display: flex; gap: 5px; flex-wrap: wrap; }

/* ---------------------------------------------------------- Protokolle */
.app .note-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.app .note-card__title {
  font-size: 16px; letter-spacing: -.02em;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.app .note-card__date { font-size: 12px; color: var(--text-faint); }
.app .note-card__excerpt {
  font-size: 13.5px; color: var(--text-muted); white-space: pre-wrap;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.app .note-body {
  white-space: pre-wrap; word-break: break-word;
  font-family: var(--sans); font-size: 14px; margin: 0;
  border-radius: var(--r-md); padding: 15px;
}

/* ---------------------------------------------------------- Tabellen */
.app .table-wrap { overflow-x: auto; border-radius: var(--r-lg); }
.app .table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.app .table th,
.app .table td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.app .table th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); font-weight: 600;
  background: var(--glass-sunken);
}
.app .table tbody tr { transition: background .25s var(--spring); }
.app .table tbody tr:hover { background: var(--glass-hover); }
.app .table tbody tr:last-child td { border-bottom: none; }
.app .table tfoot td {
  font-weight: 600; background: var(--glass-sunken);
  border-top: 1px solid var(--hairline-strong); border-bottom: none;
}
.app .table__number { text-align: right; font-variant-numeric: tabular-nums; }
.app .table__title { display: block; font-weight: 500; }
.app .table__note { display: block; font-size: 12px; color: var(--text-muted); }
.app .table__actions { text-align: right; }
/* Die Knöpfe liegen in einem Container: ein <td> mit display:flex verliert
   sein Zellverhalten und sprengt die Tabellenbreite. */
.app .table__actions-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: flex-end; gap: 4px 12px;
}
.app .table tr.is-paid .table__title { color: var(--text-muted); }
.app .table tr.is-inactive { opacity: .5; }
.app .user-cell { display: flex; align-items: center; gap: 10px; }

/* ---------------------------------------------------------- Bedienung */
.app .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  padding: 9px 18px;
  font: inherit; font-size: 14px; font-weight: 500; letter-spacing: -.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--spring), box-shadow .25s var(--spring), background .25s var(--spring);
}
.app a.button:hover { text-decoration: none; }
.app .button:active:not(:disabled) { transform: scale(.97); }
.app .button:disabled { opacity: .45; cursor: default; }
.app .button--primary {
  background: linear-gradient(170deg, var(--accent), var(--accent-strong));
  color: var(--on-accent);
  box-shadow: var(--inner-top), 0 8px 20px -10px var(--accent-glow), var(--shadow-sm);
}
.app .button--primary:hover:not(:disabled) { box-shadow: var(--inner-top), 0 12px 26px -10px var(--accent-glow), var(--shadow); }
.app .button--secondary {
  background: var(--glass-raised);
  color: var(--text);
  border-color: var(--hairline);
  box-shadow: var(--inner-top), var(--shadow-sm);
}
.app .button--secondary:hover:not(:disabled) { border-color: var(--hairline-strong); }
.app .button--ghost { background: transparent; color: var(--text-muted); border-color: var(--hairline); }
.app .button--ghost:hover:not(:disabled) { color: var(--text); background: var(--glass-hover); }
.app .button--danger {
  background: linear-gradient(170deg, #c9574a, var(--danger));
  color: #fff;
  box-shadow: var(--inner-top), var(--shadow-sm);
}
.app .button--block { width: 100%; }

.app .icon-button {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer; font-size: 15px; line-height: 1;
  transition: background .25s var(--spring), color .25s var(--spring);
}
.app .icon-button:hover { background: var(--glass-hover); color: var(--text); }
.app .icon-button--danger:hover { background: var(--danger-soft); color: var(--danger); }

.app .link-button {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--accent); font: inherit; font-size: 12.5px; text-decoration: underline;
  text-underline-offset: 2px;
}
.app .link-button--danger { color: var(--danger); }

.app .input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm);
  background: var(--glass-sunken);
  color: var(--text);
  font: inherit; font-size: 14px;
  transition: border-color .25s var(--spring), box-shadow .25s var(--spring), background .25s var(--spring);
}
.app .input:hover { border-color: var(--hairline-strong); background: var(--glass-hover); }
.app .input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--glass-raised);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.app .input:disabled { opacity: .6; cursor: default; }
.app .input--compact { padding: 7px 11px; font-size: 13px; }
.app textarea.input { resize: vertical; min-height: 64px; line-height: 1.5; }

.app .checkbox { width: 18px; height: 18px; flex: none; accent-color: var(--accent); cursor: pointer; }

.app .filter-bar { display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end; }
.app .filter { display: flex; flex-direction: column; gap: 4px; }
.app .filter--grow { flex: 1; min-width: 190px; }
.app .filter__label {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-faint); padding-left: 2px;
}

.app .form { display: flex; flex-direction: column; gap: 14px; }
/* Dialogformulare stellen die Felder zweispaltig; `width: 'half'` paart sie. */
.app .form--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.app .form--grid > .form-field--full,
.app .form--grid > .form__error,
.app .form--grid > .button { grid-column: 1 / -1; }
.app .form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.app .form-field { display: flex; flex-direction: column; gap: 5px; }
.app .form-field--half { grid-column: span 1; }
.app .form-field--inline { flex-direction: row; align-items: center; gap: 10px; }
.app .form-field__inline-label { font-size: 14px; }
.app .form-field__label { font-size: 12.5px; font-weight: 500; color: var(--text-muted); padding-left: 2px; }
.app .form-field__required { color: var(--danger); margin-left: 2px; }
.app .form-field__hint { font-size: 12px; color: var(--text-faint); padding-left: 2px; }
.app .form__error {
  background: var(--danger-soft); color: var(--danger);
  border-radius: var(--r-sm); padding: 9px 13px; font-size: 13px;
}

.app .switch-row { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.app .button-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.app .checkbox-group { display: flex; flex-direction: column; gap: 8px; }
.app .checkbox-group__items { display: flex; flex-direction: column; gap: 7px; padding-left: 4px; }
.app .switch-row--all { font-weight: 600; }
.app .version-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.app .version-row > div { display: flex; flex-direction: column; gap: 3px; }
.app .version-row__value { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -.02em; }

/* ---------------------------------------------------------- Marken */
.app .badge {
  display: inline-flex; align-items: center;
  border-radius: var(--r-pill);
  padding: 2px 9px;
  font-size: 11.5px; font-weight: 560; letter-spacing: 0; white-space: nowrap;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--hairline-strong);
}
.app .badge--good, .app .badge--geklaert, .app .badge--erledigt,
.app .badge--angenommen, .app .badge--bereit, .app .badge--wir, .app .badge--admin {
  background: var(--good-soft); color: var(--good); border-color: transparent;
}
.app .badge--warning, .app .badge--wartet, .app .badge--favorit,
.app .badge--offen, .app .badge--in_klaerung, .app .badge--jga {
  background: var(--warning-soft); color: var(--warning); border-color: transparent;
}
.app .badge--danger, .app .badge--hoch, .app .badge--deadline {
  background: var(--danger-soft); color: var(--danger); border-color: transparent;
}
.app .badge--in_arbeit, .app .badge--beitrag, .app .badge--meilenstein, .app .badge--beschlossen {
  background: var(--accent-soft); color: var(--accent-strong); border-color: transparent;
}
/* Nur intern – für das Brautpaar nicht sichtbar. */
.app .badge--internal {
  gap: 4px;
  background: var(--internal-soft); color: var(--internal); border-color: transparent;
}
.app .badge__lock { font-size: 9.5px; line-height: 1; opacity: .8; }

.app .avatar {
  display: inline-grid; place-items: center; flex: none;
  border-radius: 50%; color: #fff; font-weight: 600; letter-spacing: -.01em;
  box-shadow: var(--inner-top), var(--shadow-sm);
}

/* ---------------------------------------------------------- Dialoge */
.app .modal-overlay {
  position: fixed; inset: 0; z-index: var(--overlay-z, 60);
  background: var(--overlay);
  -webkit-backdrop-filter: var(--blur-overlay);
  backdrop-filter: var(--blur-overlay);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
  animation: fade-in .25s var(--spring);
}
.app .modal-overlay--out { opacity: 0; transition: opacity .2s var(--spring); }
.app .modal {
  background: var(--glass-raised);
  border-radius: var(--r-xl);
  box-shadow: var(--inner-top), var(--inner-bottom), var(--shadow-lg);
  width: 100%; max-width: 540px; max-height: 92dvh;
  display: flex; flex-direction: column;
  animation: pop-in .35s var(--spring);
}
.app .modal--small { max-width: 410px; }
.app .modal--wide { max-width: 700px; }
.app .modal__header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--hairline);
}
.app .modal__title { font-size: 20px; letter-spacing: -.025em; }
.app .modal__body { padding: 20px 22px; overflow-y: auto; }
.app .modal__footer {
  display: flex; justify-content: flex-end; gap: 9px;
  padding: 14px 22px; border-top: 1px solid var(--hairline);
}
.app .modal__text { font-size: 14px; color: var(--text-muted); }
.app .modal__text--muted { font-size: 12.5px; }

.app .detail { display: flex; flex-direction: column; gap: 14px; }
.app .detail__badges { display: flex; gap: 6px; flex-wrap: wrap; }
.app .detail__row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.app .detail__row--muted { color: var(--text-muted); }
.app .detail__subtitle { font-size: 14px; margin-bottom: 3px; }
.app .detail__text { font-size: 14px; white-space: pre-wrap; }

.app .credentials { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.app .credentials dt { color: var(--text-muted); }
.app .credentials dd { margin: 0; }
.app .credentials__secret {
  font-family: var(--mono);
  background: var(--glass-sunken); border: 1px solid var(--hairline);
  border-radius: 7px; padding: 2px 8px;
  user-select: all;
}

/* ---------------------------------------------------------- Kommentare */
.app .comments {
  display: flex; flex-direction: column; gap: 11px;
  border-top: 1px solid var(--hairline); padding-top: 15px;
}
.app .comments__title { font-size: 14px; }
.app .comments__list { display: flex; flex-direction: column; gap: 12px; }
.app .comments__empty { font-size: 13px; color: var(--text-faint); }
.app .comment { display: flex; gap: 10px; }
.app .comment__body { flex: 1; min-width: 0; }
.app .comment__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.app .comment__time { color: var(--text-faint); }
.app .comment__text { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.app .comments__form { display: flex; gap: 8px; align-items: flex-end; }
.app .comments__form .input { flex: 1; }
.app .comments__actions { display: flex; align-items: center; gap: 10px; flex: none; }
.app .comments__internal {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted); white-space: nowrap; cursor: pointer;
}
/* Interne Wortmeldung auf einem Eintrag, den das Paar sonst sieht. */
.app .comment--internal .comment__text {
  border-left: 2px solid var(--internal-soft); padding-left: 10px;
}

/* ---------------------------------------------------------- Verschiedenes */
.app .empty {
  border-radius: var(--r-lg);
  padding: 30px; text-align: center;
  border: 1px dashed var(--hairline-strong);
  box-shadow: none;
}
.app .empty::after { display: none; }
.app .empty__message { font-size: 14px; }
.app .empty__hint { font-size: 13px; color: var(--text-faint); margin-top: 5px; }

.app .loading { display: flex; align-items: center; gap: 10px; color: var(--text-muted); padding: 28px 0; font-size: 14px; }
.app .loading__dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--hairline-strong); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}

.app .toast-host {
  position: fixed; z-index: calc(var(--overlay-z, 60) + 20);
  bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; padding: 0 16px; width: min(440px, 100%);
}
.app .toast {
  border-radius: var(--r-pill);
  padding: 11px 20px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: var(--inner-top), var(--shadow-lg);
  animation: pop-in .35s var(--spring); text-align: center;
}
.app .toast--error { background: linear-gradient(170deg, #c9574a, var(--danger)); color: #fff; }
.app .toast--out { opacity: 0; transition: opacity .3s var(--spring); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------- Rückfallebenen */
/* Ohne Weichzeichner (ältere Browser) werden die Flächen deckend, sonst
   stünde Text auf durchscheinendem Grund. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .app .sidebar, .app .topbar, .app .hero, .app .login__card,
  .app .modal, .app .toast, .app .card, .app .stat,
  .app .task, .app .event, .app .idea, .app .contribution,
  .app .scope, .app .note-card, .app .countdown,
  .app .note-banner, .app .hint-banner, .app .table-wrap, .app .note-body {
    background: color-mix(in srgb, var(--bg) 82%, #fff);
  }
  .app .modal-overlay { background: rgba(20, 26, 64, .55); }
}

/* Wer weniger Transparenz eingestellt hat, bekommt ruhige, deckende Flächen. */
@media (prefers-reduced-transparency: reduce) {
  .app .sidebar, .app .topbar, .app .hero, .app .login__card,
  .app .modal, .app .toast, .app .card, .app .stat,
  .app .task, .app .event, .app .idea, .app .contribution,
  .app .scope, .app .note-card, .app .countdown,
  .app .note-banner, .app .hint-banner, .app .table-wrap, .app .note-body {
    background: color-mix(in srgb, var(--bg) 84%, #fff);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .app::before { opacity: .35; }
  .app .modal-overlay { background: rgba(20, 26, 64, .6); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .app, .app *, .app *::before, .app *::after,
  .modal-overlay, .modal-overlay *, .toast-host, .toast-host * {
    animation-duration: .001ms !important; transition-duration: .001ms !important;
  }
}

/* ---------------------------------------------------------- Tablet */
@media (max-width: 900px) {
  .app .sidebar {
    position: fixed; z-index: 50; top: var(--sticky-top); left: 0;
    transform: translateX(-100%); transition: transform .4s var(--spring);
    border-right: 1px solid var(--hairline);
    box-shadow: var(--shadow-lg);
  }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 40;
    background: rgba(20, 26, 64, .3);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  .app .topbar {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--hairline);
    border-radius: 0;
    position: sticky; top: var(--sticky-top); z-index: 30;
    box-shadow: none;
  }
  .app .topbar::after { display: none; }
  .app .topbar__title { flex: 1; font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
  .app .icon-button--menu { font-size: 18px; }
  .app .content { padding: 18px 16px 64px; gap: 18px; }
  .app .hero { padding: 22px; }
  .app .hero__title { font-size: 27px; }
  .app .page-title { font-size: 24px; }
}

/* ---------------------------------------------------------- Handy */
/* Auf dem Handy zählt jede Zeile: kompaktere Abstände, Inhalte über die
   volle Breite, Tabellen als Karten und Dialoge als Blatt von unten. */
@media (max-width: 640px) {
  .app { font-size: 14.5px; }
  .app .content { padding: 14px 13px 76px; gap: 14px; }

  .app .page-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .app .page-title { font-size: 23px; }
  .app .page-subtitle { font-size: 13px; }
  .app .page-header__actions { width: 100%; }
  .app .page-header__actions .button { width: 100%; justify-content: center; }

  .app .hero { padding: 17px; border-radius: var(--r-lg); gap: 14px; }
  .app .hero__title { font-size: 24px; margin: 5px 0 2px; }
  .app .hero__date { font-size: 13px; }
  .app .hero__countdowns {
    width: 100%; display: grid; gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app .countdown { min-width: 0; padding: 9px 11px; }
  .app .countdown__label { font-size: 10px; letter-spacing: .06em; }
  .app .countdown__value { font-size: 16px; }
  .app .countdown__date { font-size: 11px; }

  .app .note-banner, .app .hint-banner { font-size: 13px; padding: 11px 14px; border-radius: var(--r-md); }

  .app .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .app .stat { padding: 13px 14px; border-radius: var(--r-md); }
  .app .stat__value { font-size: 21px; }
  .app .stat__label { font-size: 12px; }
  .app .stat__hint { font-size: 11px; }

  .app .card { padding: 15px 16px; gap: 10px; border-radius: var(--r-lg); }
  .app .card__title { font-size: 16px; }
  .app .grid { gap: 12px; }

  .app .filter-bar { gap: 8px; }
  .app .filter { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .app .filter--grow { flex-basis: 100%; }
  .app .filter__label { font-size: 10px; }

  .app .task { flex-wrap: wrap; row-gap: 8px; align-items: center; padding: 12px 13px; }
  .app .task__main { flex: 1 0 calc(100% - 30px); }
  .app .task__actions { margin-left: auto; }

  .app .idea-grid, .app .scope-grid, .app .note-grid,
  .app .contribution-list { grid-template-columns: minmax(0, 1fr); }
  .app .idea, .app .contribution, .app .scope, .app .note-card { padding: 14px 15px; }
  .app .idea__side, .app .contribution__side { flex-direction: row; align-self: auto; gap: 5px; }

  .app .event { flex-wrap: wrap; row-gap: 6px; padding: 11px 13px; }
  .app .event__main { flex: 1 0 calc(100% - 68px); }
  .app .event__badges { margin-left: 68px; }

  .app .task-group__title { font-size: 11.5px; }

  /* Tabellen werden zu Karten – seitliches Schieben trifft man kaum. */
  .app .table-wrap { border: 0; background: none; box-shadow: none; overflow: visible; }
  .app .table-wrap::after { display: none; }
  .app .table { min-width: 0; display: block; }
  .app .table thead { display: none; }
  .app .table tbody, .app .table tfoot { display: block; }
  .app .table tr {
    display: block;
    background: var(--glass-soft);
    border-radius: var(--r-md);
    box-shadow: var(--inner-top), var(--shadow-sm);
    padding: 11px 14px; margin-bottom: 8px;
  }
  .app .table tbody tr:hover { background: var(--glass-soft); }
  /* Raster statt Flex: die Beschriftung steht links, alle Werte einer Zelle
     stapeln sich rechts darunter (Titel und Notiz, Status und Zahler …). */
  .app .table td {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    justify-items: end; align-items: baseline;
    gap: 2px 14px; padding: 5px 0; border: 0;
  }
  .app .table td::before {
    content: attr(data-label);
    grid-column: 1; grid-row: 1; justify-self: start;
    color: var(--text-faint); font-size: 12px;
  }
  .app .table td > * { grid-column: 2; text-align: right; }
  .app .table .table__title, .app .table .table__note { text-align: right; }
  .app .table .user-cell { justify-content: flex-end; text-align: right; }
  .app .table td.table__actions { display: block; padding-top: 9px; }
  .app .table td.table__actions::before { content: none; }
  .app .table .table__hide-mobile { display: none; }
  .app .table tfoot tr { background: var(--glass-strong); }
  .app .table tfoot td:first-child { font-weight: 600; justify-content: flex-start; }

  /* Dialoge als Blatt von unten – so bleibt der Daumen in Reichweite. */
  .app .modal-overlay { padding: 0; align-items: flex-end; }
  .app .modal, .app .modal--small, .app .modal--wide {
    max-width: none; width: 100%; max-height: 92dvh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
  .app .modal__header {
    padding: 16px 18px 12px; position: sticky; top: 0; z-index: 2;
    background: var(--glass-raised);
    -webkit-backdrop-filter: var(--blur-panel);
    backdrop-filter: var(--blur-panel);
  }
  .app .modal__title { font-size: 18px; }
  .app .modal__body { padding: 16px 18px; }
  .app .modal__footer {
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    position: sticky; bottom: 0; z-index: 2;
    background: var(--glass-raised);
    -webkit-backdrop-filter: var(--blur-panel);
    backdrop-filter: var(--blur-panel);
  }
  .app .modal__footer .button { flex: 1; justify-content: center; }

  .app .form--grid { grid-template-columns: minmax(0, 1fr); }
  .app .form--grid > .form-field--half { grid-column: 1 / -1; }
  .app .form-grid { grid-template-columns: minmax(0, 1fr); }

  .app .version-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app .comments__form { flex-direction: column; align-items: stretch; }
  .app .comments__form .button { width: 100%; }
  .app .comments__actions { justify-content: space-between; }
  .app .toast-host { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 380px) {
  .app .hero__countdowns, .app .stat-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------- Flyer
   Wie die Save-the-Date-Karte: flaches Creme, Kobalt, das helle Blau der
   Schleifen. Zwei Schriftlagen – kräftig und weich für Datum, Namen und
   Titel, dünn und klein geschrieben für alles Begleitende. Kein Gold,
   kaum Schatten, Glas nur als Hauch. */
.app {
  --flyer-bold: "SOFT" 100, "WONK" 1;
  --flyer-thin: "SOFT" 0, "WONK" 0;
  --card-bg: color-mix(in srgb, var(--bg) 55%, #fffdf6);
  --card-line: color-mix(in srgb, var(--accent) 16%, transparent);
}
@media (prefers-color-scheme: dark) {
  .app { --card-bg: color-mix(in srgb, var(--bg) 80%, #2b3f9b); --card-line: rgba(246, 238, 212, .12); }
}
.app::before { background: var(--bg); }

/* Flächen: flach wie Papier, eine feine Kobaltlinie statt Glanz. */
.app .card, .app .stat, .app .hero, .app .check, .app .note-banner, .app .hint-banner,
.app .login__card, .app .task, .app .idea, .app .event, .app .note-card, .app .scope-item {
  background: var(--card-bg);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: none;
  border: 1px solid var(--card-line);
}
.app .sidebar { background: transparent; box-shadow: none; border-right: 1px solid var(--card-line); -webkit-backdrop-filter: none; backdrop-filter: none; }
.app .topbar { background: var(--bg); box-shadow: none; border-bottom: 1px solid var(--card-line); -webkit-backdrop-filter: none; backdrop-filter: none; }
.app .sidebar::after, .app .topbar::after, .app .hero::after, .app .login__card::after,
.app .card::after, .app .stat::after { display: none; }

/* Kräftige Lage – wie «21.08.2027» und «Dana & Pascal». */
.app h1, .app h2, .app h3,
.app .page-title, .app .card__title, .app .login__title, .app .hero__title,
.app .sidebar__title, .app .stat__value, .app .countdown__value,
.app .checklist-progress__value, .app .import__count {
  font-family: var(--display); font-weight: 800; font-optical-sizing: auto;
  font-variation-settings: var(--flyer-bold); color: var(--accent); letter-spacing: -.01em;
}
.app .page-title { font-size: clamp(30px, 4.2vw, 40px); line-height: 1.05; }
.app .card__title { font-size: 19px; }
.app .login__title { font-size: 34px; }
.app .stat__value { font-size: 32px; }
.app .sidebar__title { font-size: 17px; }

/* Dünne Lage – wie «save the date» und «Einladung folgt». */
.app .hero__eyebrow, .app .login__eyebrow, .app .hero__date, .app .countdown__label,
.app .checklist-progress__label, .app .sidebar__subtitle, .app .task-group__title,
.app .note-banner, .app .hint-banner {
  font-family: var(--display); font-weight: 300; font-style: normal;
  font-variation-settings: var(--flyer-thin); text-transform: none; letter-spacing: .01em;
  color: var(--accent);
}
.app .hero__eyebrow, .app .login__eyebrow { font-size: 21px; display: block; }
.app .login__eyebrow { font-size: 18px; }
.app .sidebar__subtitle { font-size: 14px; }
.app .note-banner, .app .hint-banner { font-size: 16px; border-left: 3px solid var(--ribbon); }
.app .task-group__title { font-size: 20px; gap: 10px; }
.app .countdown__label { font-size: 16px; }
.app .checklist-progress__label { font-size: 19px; }

/* Kopf der Übersicht: zentriert wie die Karte, Schleifen in den Ecken. */
.app .hero {
  position: relative; overflow: hidden;
  flex-direction: column; align-items: center; text-align: center;
  gap: 18px; padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 48px) clamp(26px, 4vw, 44px);
}
.app .hero__intro { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
.app .hero__bigdate {
  margin: 6px 0 4px;
  font-size: clamp(54px, 11vw, 128px); font-weight: 900; line-height: .95; letter-spacing: -.01em;
  font-variation-settings: var(--flyer-bold);
}
.app .hero__date { font-size: clamp(17px, 2.2vw, 22px); color: var(--accent); }
.app .hero__date--muted { color: var(--text-muted); }
.app .hero__title { font-size: clamp(26px, 3.6vw, 36px); margin: 14px 0 0; }
.app .hero__countdowns {
  position: relative; z-index: 1;
  justify-content: center; gap: 0; margin-top: 6px;
}
.app .countdown { text-align: center; padding: 4px 22px; margin: 0; min-width: 0; border-right: 1px solid var(--card-line); }
.app .countdown__value { font-size: 22px; }
.app .countdown__date { font-size: 12px; }
.app .hero > .hero__ribbon {
  position: absolute; z-index: 0; width: clamp(110px, 16vw, 200px);
  color: var(--ribbon); opacity: .85; bottom: -46px; top: auto;
}
.app .hero > .hero__ribbon--left { left: -40px; right: auto; transform: rotate(18deg); }
.app .hero > .hero__ribbon--right { right: -40px; left: auto; transform: rotate(-18deg) scaleX(-1); }

/* Knöpfe und Marken: Kobalt flach, Marken nur mit Kontur. */
.app .button--primary { background: var(--accent); box-shadow: none; }
.app .button--primary:hover:not(:disabled) { background: var(--accent-strong); box-shadow: none; }
.app .button--secondary { box-shadow: none; background: var(--card-bg); }
.app .badge { background: transparent; font-weight: 500; }
.app .badge--good, .app .badge--geklaert, .app .badge--erledigt, .app .badge--angenommen,
.app .badge--bereit, .app .badge--wir, .app .badge--admin,
.app .badge--warning, .app .badge--wartet, .app .badge--favorit, .app .badge--offen,
.app .badge--in_klaerung, .app .badge--jga,
.app .badge--in_arbeit, .app .badge--beitrag, .app .badge--meilenstein, .app .badge--beschlossen {
  background: transparent; color: var(--accent); border-color: var(--ribbon);
}
.app .badge--danger, .app .badge--hoch, .app .badge--deadline { background: transparent; border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.app .badge--internal { background: transparent; border-color: color-mix(in srgb, var(--internal) 40%, transparent); }

/* Checkliste: Kreis in Kobalt, Fortschritt als Schleifenband. */
.app .check__box { border-width: 1.5px; background: transparent; }
.app .check__box--done { background: var(--accent); box-shadow: none; }
.app .progress { height: 6px; background: var(--card-line); box-shadow: none; }
.app .progress__bar { background: var(--ribbon); }
.app .stat--good .stat__value { color: var(--accent); }

/* Responsiv: Tablet und Handy. */
.app .stat-grid { display: flex; flex-wrap: wrap; }
.app .stat-grid > .stat { flex: 1 1 150px; min-width: 0; }
@media (max-width: 640px) {
  .app .hero { border-radius: var(--r-lg); gap: 14px; }
  .app .hero__countdowns { display: grid; grid-template-columns: 1fr 1fr; row-gap: 14px; width: 100%; }
  .app .countdown { padding: 2px 8px; }
  .app .countdown:nth-child(2n), .app .countdown:last-child { border-right: none; }
  .app .countdown:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .app .countdown__value { font-size: 19px; white-space: nowrap; }
  .app .hero > .hero__ribbon { width: 104px; bottom: -34px; opacity: .7; }
  .app .hero > .hero__ribbon--left { left: -34px; }
  .app .hero > .hero__ribbon--right { right: -34px; }
  .app .stat-grid { gap: 10px; }
  .app .stat-grid > .stat { flex-basis: 140px; }
  .app .stat { padding: 14px; }
  .app .stat__value { font-size: 26px; }
  .app .task-group__title { font-size: 18px; }
}

/* Anmeldung wie die Karte: zentriert, Datum gross, Namen kräftig,
   Schleifen unten in den Ecken, das Formular schlicht darunter. */
.app .login { padding: clamp(16px, 4vw, 40px); }
.app .login__card {
  position: relative; overflow: hidden;
  max-width: 460px;
  padding: clamp(30px, 6vw, 46px) clamp(20px, 5vw, 38px) clamp(64px, 12vw, 84px);
}
.app .login__head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 26px; }
.app .login__eyebrow { font-size: 20px; margin: 0; }
.app .login__date {
  margin: 2px 0 0;
  font-family: var(--display); font-weight: 900; font-optical-sizing: auto;
  font-variation-settings: var(--flyer-bold); color: var(--accent);
  font-size: clamp(46px, 13vw, 66px); line-height: 1; letter-spacing: -.01em;
}
.app .login__title { font-size: clamp(26px, 7vw, 32px); margin: 12px 0 4px; }
.app .login__text {
  font-family: var(--display); font-weight: 300; font-variation-settings: var(--flyer-thin);
  font-size: 17px; color: var(--accent); margin: 0;
}
.app .login__form { gap: 14px; }
.app .login__form .input { font-size: 16px; } /* iOS zoomt sonst beim Antippen */
.app .login__remember { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text-muted); cursor: pointer; }
.app .login__remember input { width: 18px; height: 18px; accent-color: var(--accent); }
.app .login__link {
  justify-self: center; background: none; border: none; padding: 4px 8px; cursor: pointer;
  font-family: var(--display); font-weight: 300; font-size: 16px; color: var(--accent);
  text-decoration: underline; text-decoration-color: var(--ribbon); text-underline-offset: 4px;
}
.app .login__info {
  margin: 0; padding: 10px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--ribbon); color: var(--accent); font-size: 14px;
}
.app .login__card > .login__ribbon {
  position: absolute; z-index: 0; bottom: -34px; width: clamp(96px, 26vw, 128px);
  color: var(--ribbon); opacity: .85; pointer-events: none;
}
.app .login__card > .login__ribbon--left { left: -30px; transform: rotate(18deg); }
.app .login__card > .login__ribbon--right { right: -30px; transform: rotate(-18deg) scaleX(-1); }
.app .login__footer { font-family: var(--display); font-weight: 300; font-size: 15px; color: var(--accent); }

/* ---------------------------------------------------------- Bewegung
   Ruhig und weich: Ansichten blenden ein, Fenster und Menü gleiten,
   Knöpfe geben beim Drücken nach. Bei «Bewegung reduzieren» ist alles
   aus (siehe oben). */
.app { --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-soft: cubic-bezier(.4, 0, .2, 1); }

/* Seitenwechsel: Inhalt hebt sich sanft, leicht gestaffelt. */
.app .view-enter > * { animation: view-in .5s var(--ease-out) both; }
.app .view-enter > :nth-child(2) { animation-delay: .05s; }
.app .view-enter > :nth-child(3) { animation-delay: .1s; }
.app .view-enter > :nth-child(4) { animation-delay: .15s; }
.app .view-enter > :nth-child(n+5) { animation-delay: .2s; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Anmeldung: die Karte erscheint wie aufgelegt. */
.app .login__card { animation: card-in .7s var(--ease-out) both; }
.app .login__head > * { animation: view-in .7s var(--ease-out) both; }
.app .login__head > :nth-child(2) { animation-delay: .08s; }
.app .login__head > :nth-child(3) { animation-delay: .16s; }
.app .login__head > :nth-child(4) { animation-delay: .22s; }
@keyframes card-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }

/* Knöpfe, Links und Kreise: weiche Farbwechsel, spürbarer Druck. */
.app .button, .app .icon-button, .app .nav__link, .app .login__link, .app .check__box,
.app .list-row__main, .app .chip, .app .swatch {
  transition: background-color .25s var(--ease-soft), color .25s var(--ease-soft),
    border-color .25s var(--ease-soft), box-shadow .3s var(--ease-soft),
    transform .25s var(--ease-out), opacity .25s var(--ease-soft);
}
.app .button:hover:not(:disabled) { transform: translateY(-1px); }
.app .button:active:not(:disabled), .app .icon-button:active, .app .nav__link:active,
.app .login__link:active { transform: scale(.97); transition-duration: .08s; }
.app .check__box:active:not(:disabled) { transform: scale(.9); transition-duration: .08s; }
.app .check, .app .card, .app .stat { transition: border-color .3s var(--ease-soft), background-color .3s var(--ease-soft), opacity .3s var(--ease-soft); }
.app .check:hover { border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.app .input, .app select, .app textarea { transition: border-color .25s var(--ease-soft), box-shadow .25s var(--ease-soft), background-color .25s var(--ease-soft); }

/* Fenster: Hintergrund blendet, Fenster gleitet – auch beim Schliessen. */
.app .modal-overlay { animation: fade-in .3s var(--ease-soft); transition: opacity .25s var(--ease-soft); }
.app .modal { animation: modal-in .45s var(--ease-out); transition: transform .28s var(--ease-soft), opacity .28s var(--ease-soft); }
.app .modal-overlay--out { opacity: 0; }
.app .modal-overlay--out .modal { opacity: 0; transform: translateY(12px) scale(.98); }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

/* Mitteilungen gleiten herein und hinaus. */
.app .toast, .toast { animation: toast-in .45s var(--ease-out); transition: opacity .3s var(--ease-soft), transform .3s var(--ease-soft); }
.app .toast--out, .toast--out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Fortschritt füllt sich weich. */
.app .progress__bar { transition: width .9s var(--ease-out); }

/* Handy und Tablet: das Menü gleitet herein, der Hintergrund dunkelt sanft ab. */
@media (max-width: 900px) {
  .app .sidebar {
    background: var(--bg); box-shadow: none;
    transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-soft);
  }
  .app.nav-open .sidebar { box-shadow: 0 0 60px -10px rgba(20, 26, 64, .35); }
  .app .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 40;
    background: rgba(20, 26, 64, .28);
    opacity: 0; pointer-events: none; transition: opacity .4s var(--ease-soft);
  }
  .app.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  .app .sidebar .nav__link { transition: transform .45s var(--ease-out), opacity .45s var(--ease-soft), background-color .25s var(--ease-soft), color .25s var(--ease-soft); }
  .app:not(.nav-open) .sidebar .nav__link { opacity: 0; transform: translateX(-12px); }
  .app.nav-open .sidebar .nav__link:nth-child(2) { transition-delay: .03s; }
  .app.nav-open .sidebar .nav__link:nth-child(3) { transition-delay: .06s; }
  .app.nav-open .sidebar .nav__link:nth-child(4) { transition-delay: .09s; }
  .app.nav-open .sidebar .nav__link:nth-child(5) { transition-delay: .12s; }
  .app.nav-open .sidebar .nav__link:nth-child(n+6) { transition-delay: .15s; }
}

/* Fenster flach wie Papier – kein graues Glas über dem Inhalt. */
.app .modal {
  background: var(--card-bg); border: 1px solid var(--card-line);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 30px 80px -30px rgba(20, 26, 64, .45);
}
.app .modal::after { display: none; }
.app .modal-overlay { background: rgba(20, 26, 64, .32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@media (max-width: 640px) {
  .app .modal__header, .app .modal__footer {
    background: var(--card-bg); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  /* Auf dem Handy gleitet das Blatt von unten herein und wieder hinaus. */
  .app .modal { animation: sheet-in .5s var(--ease-out); }
  .app .modal-overlay--out .modal { transform: translateY(40%); opacity: 1; }
}
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }

/* Anleitung «Als App auf den Homescreen». */
.app .app-steps { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--text); }
.app .app-steps strong { color: var(--accent); font-weight: 600; }

/* Als App vom Homescreen: Platz für Notch und Home-Leiste. */
@media (display-mode: standalone) {
  .app .topbar { padding-top: max(11px, env(safe-area-inset-top)); }
  .app .content { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}
