/* ==========================================================================
   LA LE LU · Kasse
   Gestaltung abgeleitet von schlossfreudenberg.de/lalelu:
   Montserrat in Versalien mit Sperrung, Open Sans im Text, Magenta-Akzent,
   rosa Stempel, dünne Linien, schwarze Pillen-Knöpfe. Flach, ohne Schatten.
   ========================================================================== */

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("fonts/opensans.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --bg: #F7F5F8;
  --surface: #FFFFFF;
  --surface-2: #FBFAFC;
  --ink: #212529;
  --ink-2: #5A5F67;
  --ink-3: #8C9098;
  --line: rgba(33, 37, 41, .13);
  --line-strong: #212529;
  --accent: #DE0EAD;
  --accent-ink: #FFFFFF;
  --accent-soft: #FCE4F6;
  --rose: #FFBAFF;
  --rose-ink: #B0088A;
  --blue: #0C6FAA;
  --ok: #3F8F6B;
  --ok-soft: #E2F1E9;
  --bad: #D2433F;
  --bad-soft: #FBE5E4;
  --warn: #C98A0C;
  --warn-soft: #FBF0D4;
  --btn: #000000;
  --btn-ink: #FFFFFF;
  --scrim: rgba(20, 16, 22, .38);
  --hatch: rgba(33, 37, 41, .10);

  --f-display: "Montserrat", "Trebuchet MS", Verdana, sans-serif;
  --f-body: "Open Sans", "Segoe UI", system-ui, sans-serif;

  --r: 14px;
  --r-sm: 10px;
  --pill: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.32, 1.25, .5, 1);
  --nav-w: 236px;
  --tab-h: 64px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131115;
    --surface: #1C1A1F;
    --surface-2: #211E25;
    --ink: #F3EFF4;
    --ink-2: #B9B3BD;
    --ink-3: #8A848E;
    --line: rgba(255, 255, 255, .11);
    --line-strong: #F3EFF4;
    --accent: #F25ACB;
    --accent-ink: #1A0614;
    --accent-soft: rgba(242, 90, 203, .14);
    --rose: #FFBAFF;
    --rose-ink: #8E0A70;
    --blue: #5AAEE0;
    --ok: #62B98F;
    --ok-soft: rgba(98, 185, 143, .15);
    --bad: #F0706A;
    --bad-soft: rgba(240, 112, 106, .15);
    --warn: #E9B54A;
    --warn-soft: rgba(233, 181, 74, .15);
    --btn: #F3EFF4;
    --btn-ink: #131115;
    --scrim: rgba(0, 0, 0, .55);
    --hatch: rgba(255, 255, 255, .09);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131115;
  --surface: #1C1A1F;
  --surface-2: #211E25;
  --ink: #F3EFF4;
  --ink-2: #B9B3BD;
  --ink-3: #8A848E;
  --line: rgba(255, 255, 255, .11);
  --line-strong: #F3EFF4;
  --accent: #F25ACB;
  --accent-ink: #1A0614;
  --accent-soft: rgba(242, 90, 203, .14);
  --rose: #FFBAFF;
  --rose-ink: #8E0A70;
  --blue: #5AAEE0;
  --ok: #62B98F;
  --ok-soft: rgba(98, 185, 143, .15);
  --bad: #F0706A;
  --bad-soft: rgba(240, 112, 106, .15);
  --warn: #E9B54A;
  --warn-soft: rgba(233, 181, 74, .15);
  --btn: #F3EFF4;
  --btn-ink: #131115;
  --scrim: rgba(0, 0, 0, .55);
  --hatch: rgba(255, 255, 255, .09);
  color-scheme: dark;
}

/* ---------- Grundlage ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Versalien-Etikett wie auf der Lalelu-Seite */
.eyebrow, .label {
  font: 600 11px/1.3 var(--f-display);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- App-Rahmen ---------- */
.app {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
}
.nav {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 18px 22px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 26px;
  text-decoration: none;
}
.brand-moon { width: 30px; height: 30px; flex: none; }
.brand-word {
  font: 700 17px/1 var(--f-display);
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-sub {
  display: block;
  margin-top: 5px;
  font: 600 9.5px/1 var(--f-display);
  letter-spacing: .24em;
  color: var(--accent);
}
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font: 600 12px/1 var(--f-display);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-link svg { width: 20px; height: 20px; flex: none; }
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--ink); }
.nav-link[aria-current="page"] svg { color: var(--accent); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-foot { margin-top: auto; display: grid; gap: 10px; padding: 0 2px; }
.nav-foot > * { min-width: 0; }
.nav-foot .btn { white-space: normal; text-align: center; }
.nav-foot .hint { margin: 0; text-align: center; text-wrap: balance; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 60px;
  padding: 10px clamp(16px, 4vw, 44px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.topbar-brand { display: none; margin-right: auto; }
.view:focus, .view:focus-visible { outline: none; }
.view {
  view-transition-name: view;
  width: 100%;
  max-width: 1240px;
  padding: 6px clamp(16px, 4vw, 44px) 64px;
}

/* ---------- Kopf einer Seite ---------- */
.page-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 8px 0 28px;
}
.page-title {
  margin: 0;
  font: 500 clamp(24px, 3.2vw, 34px)/1.1 var(--f-display);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.page-title .accent { color: var(--accent); }
.page-lede { margin: 8px 0 0; color: var(--ink-2); max-width: 54ch; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  font: 600 13px/1.2 var(--f-display);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.section-title .link-btn { font-size: 11px; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border: 1.5px solid transparent;
  border-radius: var(--pill);
  font: 700 13px/1 var(--f-display);
  letter-spacing: .02em;
  white-space: nowrap;
  text-decoration: none;
  transition: transform .15s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--btn) 82%, var(--accent)); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-quiet { background: transparent; color: var(--ink-2); padding: 0 12px; }
.btn-quiet:hover { color: var(--accent); }
.btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 12px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn:active { transform: scale(.94); }
.link-btn {
  padding: 4px 0;
  border: 0;
  background: none;
  font: 600 12px/1.2 var(--f-display);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Sicherungs-Chip ---------- */
.backup-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  font: 600 11px/1 var(--f-display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: border-color .2s, color .2s, background-color .2s;
}
.backup-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.backup-chip.is-due { border-color: var(--warn); color: var(--ink); background: var(--warn-soft); }
.backup-chip.is-due .dot { background: var(--warn); animation: pulse 2s var(--ease) infinite; }
.backup-chip:hover { border-color: var(--accent); }

/* ---------- Status-Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--pill);
  font: 700 10.5px/1 var(--f-display);
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.st-bezahlt { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.st-teilweise { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.st-ueberfaellig { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.st-offen { background: transparent; color: var(--ink-2); }
.chip.st-inaktiv, .chip.st-keine { background: transparent; color: var(--ink-3); border-style: dashed; }
.chip.st-erledigt { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.st-bald { background: var(--rose); color: var(--rose-ink); border-color: transparent; }
.chip.plain::before { display: none; }

/* ---------- Karten & Raster ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(16px, 2.2vw, 24px);
}
.card + .card { margin-top: 18px; }
.card { container-type: inline-size; }
.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1180px) { .grid-main { grid-template-columns: minmax(0, 1fr); } }
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 18px;
  align-items: start;
}
.stack { display: grid; gap: 18px; }

/* ---------- Kennzahlen ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr));
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
}
.kpi {
  position: relative;
  padding: 20px 22px 18px;
  border-right: 1px solid var(--line);
  margin-right: -1px;
  border-bottom: 1px solid var(--line);
  margin-bottom: -1px;
}
.kpi-value {
  margin: 10px 0 4px;
  font: 700 clamp(24px, 2.6vw, 30px)/1.05 var(--f-display);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi-value.is-bad { color: var(--bad); }
.kpi-value.is-ok { color: var(--ok); }
.kpi-sub { font-size: 13px; color: var(--ink-2); }
.kpi-sub b { color: var(--ink); font-weight: 600; }
.progress {
  height: 4px;
  margin-top: 12px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: var(--ok);
  border-radius: inherit;
  transform-origin: left;
  animation: grow .9s var(--ease) both;
}

/* ---------- Monatsleiste (Erkennungsmerkmal) ---------- */
.mbar {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  max-width: 220px;
}
.mbar i {
  position: relative;
  display: block;
  height: 14px;
  border-radius: 3px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  animation: cellIn .45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 28ms);
}
.mbar i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--fill, 0%);
  background: var(--ok);
}
.mbar i.m-paid::after { width: 100%; }
.mbar i.m-part::after { background: var(--warn); }
.mbar i.m-over { box-shadow: inset 0 0 0 1.5px var(--bad); background: var(--bad-soft); }
.mbar i.m-over::after { background: var(--warn); }
.mbar i.m-none {
  box-shadow: none;
  background: repeating-linear-gradient(-45deg, var(--hatch) 0 2px, transparent 2px 5px);
}
.mbar i.m-now { outline: 1.5px solid var(--ink); outline-offset: 1px; }
.mbar.is-lg { max-width: none; gap: 5px; }
.mbar.is-lg i { height: 30px; border-radius: 6px; }
.mbar-legend {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 5px;
  margin-top: 6px;
  font: 600 10px/1 var(--f-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.legend .l-paid { background: var(--ok); }
.legend .l-part { background: linear-gradient(90deg, var(--warn) 50%, var(--surface-2) 50%); box-shadow: inset 0 0 0 1px var(--line); }
.legend .l-over { background: var(--bad-soft); box-shadow: inset 0 0 0 1.5px var(--bad); }
.legend .l-open { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.legend .l-none { background: repeating-linear-gradient(-45deg, var(--hatch) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Listen (statt Tabellen, kippen auf dem Handy zu Karten) ---------- */
.list { border-top: 1px solid var(--line-strong); }
.row {
  display: grid;
  align-items: center;
  gap: 8px 18px;
  min-height: 64px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background-color .2s var(--ease);
}
a.row:hover, button.row:hover, .row.is-click:hover { background: var(--surface-2); }
button.row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.row-title { font-weight: 600; line-height: 1.3; }
.row-sub { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.row-amount { font: 700 15px/1.2 var(--f-display); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row-amount.is-in { color: var(--ok); }
.row-amount.is-out { color: var(--ink); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.fam-row { grid-template-columns: minmax(0, 1.4fr) minmax(140px, 220px) 110px 118px 20px; }
.fam-row .chev { color: var(--ink-3); width: 18px; height: 18px; transition: transform .2s var(--ease), color .2s; }
.fam-row:hover .chev { transform: translateX(3px); color: var(--accent); }
.attn-row { grid-template-columns: minmax(0, 1fr) auto auto; }
@container (max-width: 600px) {
  .attn-row { grid-template-columns: minmax(0, 1fr) auto; }
  .attn-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.pay-row { grid-template-columns: 92px minmax(0, 1fr) auto auto; }
.led-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
.per-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, .8fr) 112px; }
@container (max-width: 560px) {
  .pay-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .pay-row .pay-date { grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); margin-bottom: -6px; }
  .per-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .per-row.per-head { display: none; }
  .per-row .per-due { grid-column: 1; font-size: 13px; color: var(--ink-2); }
  .per-row .per-soll, .per-row .per-paid { display: none; }
  .per-row .per-rest { grid-column: 2; grid-row: 1; text-align: right !important; }
  .per-row .per-status { grid-column: 2 !important; grid-row: 2; justify-self: end; }
  .bday-row { grid-template-columns: 58px minmax(0, 1fr); }
  .bday-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.per-head { min-height: 36px; padding-top: 8px; padding-bottom: 8px; }
.per-head > * { font: 600 10.5px/1.2 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

.led-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.led-ico svg { width: 16px; height: 16px; }
.led-ico.is-in { background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.led-ico.is-fee { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.clip { display: inline-flex; vertical-align: -2px; color: var(--blue); }
.clip svg { width: 14px; height: 14px; }

.group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px 4px 8px;
  border-bottom: 1px solid var(--line-strong);
  font: 600 12px/1 var(--f-display);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.group-head:first-child { padding-top: 4px; }
.group-head span:last-child { color: var(--ink-2); font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* ---------- Aufklapp-Zeilen mit „+" wie im FAQ ---------- */
.acc { border-bottom: 1px solid var(--line-strong); }
.acc > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 14px 2px;
  cursor: pointer;
  font: 500 14px/1.35 var(--f-display);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary .plus {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--accent);
  transition: transform .35s var(--ease);
}
.acc > summary .plus::before, .acc > summary .plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.8px;
  margin: -0.9px 0 0 -9px;
  background: currentColor;
  border-radius: 2px;
}
.acc > summary .plus::after { transform: rotate(90deg); }
.acc[open] > summary .plus { transform: rotate(45deg); }
.acc > summary:hover { color: var(--accent); }
.acc-body { padding: 4px 2px 26px; animation: accIn .35s var(--ease); }
.acc-sum-meta { margin-left: auto; font: 400 13px/1 var(--f-body); letter-spacing: 0; text-transform: none; color: var(--ink-2); }

/* ---------- Formulare ---------- */
.form { display: grid; gap: 16px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
}
.field { display: grid; gap: 7px; min-width: 0; }
.field > .label { color: var(--ink-2); }
.hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.hint.is-bad { color: var(--bad); }
.hint.is-ok { color: var(--ok); }
.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.35;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.textarea { min-height: 120px; resize: vertical; font-size: 14.5px; }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.is-bad { border-color: var(--bad); }
.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23DE0EAD' stroke-width='1.8'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}
.input-money { position: relative; }
.input-money .input { padding-right: 38px; font: 700 18px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.input-money::after { content: "€"; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; }
.input-mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .04em; }

.seg {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface-2);
  max-width: 100%;
}
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--pill);
  font: 600 12px/1.1 var(--f-display);
  letter-spacing: .05em;
  text-align: center;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.seg input:checked + span { background: var(--btn); color: var(--btn-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg.is-wide { display: grid; }

.bday-inputs { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr) minmax(0, 1.2fr); gap: 10px; }
@media (max-width: 767px) { .bday-inputs { grid-template-columns: 1fr 1.4fr; } .bday-inputs .input { grid-column: 1 / -1; } }
.kid-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  animation: accIn .3s var(--ease);
}
.kid-row + .kid-row { margin-top: 8px; }
.kid-row .icon-btn { margin-bottom: 4px; }

.file-drop {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  transition: border-color .2s var(--ease), background-color .2s;
}
.file-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.file-drop .thumb {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  overflow: hidden;
  color: var(--ink-3);
  transition: transform .2s var(--ease);
}
.file-drop .thumb:hover { transform: scale(1.05); }
.file-drop .thumb svg { width: 22px; height: 22px; }
.file-drop .file-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* ---------- Suche & Filter ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.search { position: relative; flex: 1 1 240px; max-width: 360px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); }
.search .input { padding-left: 42px; border-radius: var(--pill); min-height: 42px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  font: 600 11.5px/1 var(--f-display);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: all .2s var(--ease);
}
.fchip:hover { border-color: var(--ink); color: var(--ink); }
.fchip[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.fchip .n { margin-left: 6px; opacity: .6; }

.fy-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
}
.fy-switch .icon-btn { width: 32px; height: 32px; border: 0; }
.fy-switch b { min-width: 92px; text-align: center; font: 700 12.5px/1 var(--f-display); letter-spacing: .08em; }

/* ---------- Rosa Stempel (Erkennungsmerkmal) ---------- */
.stamp {
  position: relative;
  width: 168px;
  height: 168px;
  flex: none;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--rose);
  color: var(--rose-ink);
  transform: rotate(-9deg);
  text-decoration: none;
  transition: transform .5s var(--spring);
  animation: stampIn .8s var(--spring) both .15s;
}
.stamp:hover { transform: rotate(-3deg) scale(1.04); }
.stamp svg.ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 40s linear infinite;
}
.stamp:hover svg.ring { animation-duration: 9s; }
.stamp text {
  font: 700 10.5px var(--f-display);
  letter-spacing: .26em;
  fill: currentColor;
  text-transform: uppercase;
}
.stamp-core {
  position: absolute;
  inset: 30px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 3px;
}
.stamp-day { font: 800 30px/1 var(--f-display); letter-spacing: -.01em; }
.stamp-name { font: 700 11.5px/1.15 var(--f-display); letter-spacing: .1em; text-transform: uppercase; }
.stamp-fam { font: 600 10px/1.2 var(--f-display); letter-spacing: .06em; opacity: .85; }
.stamp.is-empty .stamp-day { font-size: 22px; }

/* ---------- Rosa Fläche (wie Newsletter-Block) ---------- */
.rose-block {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(36px, 6vw, 64px) 24px;
  border-radius: var(--r);
  background: var(--rose);
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.rose-block h2 {
  margin: 0;
  font: 400 clamp(14px, 1.6vw, 16px)/1.3 var(--f-display);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.rose-block h2 b { display: block; margin-top: 4px; font-weight: 700; font-size: 1.25em; }
.rose-block p { margin: 0; max-width: 46ch; color: var(--rose-ink); font-size: 14.5px; }
.rose-block .rule { width: 46px; height: 2px; background: #fff; }
.rose-block .btn-primary { background: #fff; color: var(--rose-ink); }
.rose-block .btn-primary:hover { background: var(--rose-ink); color: #fff; }
.rose-block .moon-deco { position: absolute; right: -30px; top: -30px; width: 160px; height: 160px; opacity: .35; }

.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: var(--r);
  background: var(--rose);
  color: var(--rose-ink);
  animation: accIn .4s var(--ease);
}
.banner b { font: 700 12px/1.3 var(--f-display); letter-spacing: .12em; text-transform: uppercase; }
.banner p { margin: 0; flex: 1 1 260px; font-size: 14px; }
.banner .btn-primary { background: var(--rose-ink); color: #fff; }

.empty-line {
  padding: 26px 4px;
  color: var(--ink-2);
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}

/* ---------- Geburtstage & Reihum ---------- */
.bday-row { grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; }
.date-block {
  display: grid;
  place-items: center;
  width: 58px;
  height: 62px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  text-align: center;
  line-height: 1;
}
.date-block b { font: 700 22px/1 var(--f-display); }
.date-block span { font: 600 10px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-top: -10px; }
.date-block { position: relative; }
.date-tree { position: absolute; right: -9px; top: -9px; font-size: 17px; font-style: normal; line-height: 1; filter: drop-shadow(0 0 0 var(--surface)); }
.tree { font-size: .95em; margin-right: 6px; }
.bday-row.is-soon .date-block { background: var(--rose); border-color: var(--rose); color: var(--rose-ink); }
.bday-row.is-soon .date-block span { color: var(--rose-ink); }
.bday-row.is-done .date-block { border-color: var(--line); color: var(--ink-3); }
.bday-row.is-late .date-block { border-color: var(--bad); color: var(--bad); }
.fam-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fam-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--pill);
  background: var(--accent-soft);
  color: var(--accent);
  font: 700 11.5px/1 var(--f-display);
  letter-spacing: .05em;
}
.fam-pill-to { font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.fam-pill.is-swapped { background: transparent; box-shadow: inset 0 0 0 1px var(--accent); }
.fam-pill svg { width: 13px; height: 13px; }

.queue { display: flex; flex-wrap: wrap; gap: 8px; }
.q-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  will-change: transform;
}
.q-pill .q-n {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  font: 700 12px/1 var(--f-display);
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px var(--line);
}
.q-pill:first-child { border-color: var(--accent); }
.q-pill:first-child .q-n { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.q-pill .q-name { font-weight: 600; font-size: 14px; line-height: 1.15; }
.q-pill .q-last { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; }

/* ---------- QR ---------- */
.qr-wrap { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 22px; align-items: center; }
.qr-box {
  aspect-ratio: 1;
  padding: 12px;
  border-radius: var(--r);
  background: #fff;
  border: 1px solid var(--line);
}
.qr-box svg { width: 100%; height: 100%; }
.kv { display: grid; gap: 12px; }
.kv div { display: grid; gap: 3px; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.kv dd.big { font: 700 26px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.iban { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .03em; }

/* ---------- Fenster / Blatt von unten ---------- */
.sheet-back {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--scrim);
  animation: fadeIn .25s var(--ease) both;
}
.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 560px);
  max-height: min(88dvh, 860px);
  border-radius: 20px;
  background: var(--surface);
  animation: popIn .42s var(--spring) both;
  overflow: hidden;
}
.sheet.is-wide { width: min(100%, 720px); }
.sheet.is-xl { width: min(100%, 980px); }
.sheet-handle { display: none; }
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.sheet-title { margin: 0; font: 600 15px/1.25 var(--f-display); letter-spacing: .12em; text-transform: uppercase; }
.sheet-body { padding: 20px 22px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
}
.sheet-foot .spacer { margin-right: auto; }
.sheet-back.is-closing { animation: fadeOut .22s var(--ease) both; }
.sheet-back.is-closing .sheet { animation: popOut .22s var(--ease) both; }

.lightbox-img { display: block; max-width: 100%; max-height: 70dvh; margin: 0 auto; border-radius: 10px; }
.lightbox-pdf { width: 100%; height: 70dvh; border: 0; border-radius: 10px; background: #fff; }

.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps i { flex: 1; height: 3px; border-radius: 3px; background: var(--line); transition: background-color .3s; }
.steps i.on { background: var(--accent); }

/* ---------- Toast ---------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  display: grid;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  border-radius: var(--pill);
  background: var(--btn);
  color: var(--btn-ink);
  font: 600 13px/1.2 var(--f-display);
  letter-spacing: .03em;
  white-space: nowrap;
  pointer-events: auto;
  animation: toastIn .45s var(--spring) both;
}
.toast svg { width: 16px; height: 16px; color: var(--accent); }
.toast.is-out { animation: toastOut .25s var(--ease) both; }
.toast button { margin-left: 6px; border: 0; background: none; color: var(--accent); font: inherit; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }

/* ---------- Schwebender Knopf (nur mobil) ---------- */
.fab {
  position: fixed;
  right: 18px;
  bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom));
  z-index: 40;
  display: none;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform .25s var(--spring);
  animation: stampIn .5s var(--spring) both;
}
.fab svg { width: 24px; height: 24px; }
.fab:active { transform: scale(.92); }

/* ---------- Detail-Kopf ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font: 600 11px/1 var(--f-display);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
}
.back-link svg { width: 15px; height: 15px; transform: rotate(180deg); }
.back-link:hover { color: var(--accent); }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.meta-line span { display: inline-flex; align-items: center; gap: 6px; }
.meta-line svg { width: 15px; height: 15px; }
.kid-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kid-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  font-size: 13.5px;
}
.kid-chip small { color: var(--ink-3); font-size: 12px; }

.stat-strip { display: flex; flex-wrap: wrap; gap: 10px 34px; margin-top: 18px; }
.stat-strip div { display: grid; gap: 4px; }
.stat-strip b { font: 700 22px/1 var(--f-display); font-variant-numeric: tabular-nums; }

.settings-wrap { max-width: 860px; }
.danger-zone { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Bewegung ---------- */
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes popOut { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetDown { to { transform: translateY(100%); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.94); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
@keyframes cellIn { from { opacity: 0; transform: scaleY(.3); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes accIn { from { opacity: 0; transform: translateY(-4px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes stampIn { from { opacity: 0; transform: rotate(-40deg) scale(.6); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.view > * { animation: rise .45s var(--ease) both; }
.view > *:nth-child(2) { animation-delay: 40ms; }
.view > *:nth-child(3) { animation-delay: 80ms; }
.view > *:nth-child(4) { animation-delay: 120ms; }
.view > *:nth-child(n+5) { animation-delay: 160ms; }
.view.no-anim > *, .view.no-anim .mbar i, .view.no-anim .progress > i, .view.no-anim .stamp { animation: none; }

::view-transition-old(view) { animation: .16s var(--ease) both fadeOut; }
::view-transition-new(view) { animation: none; }

/* ---------- Tablet: Navigation als Leiste oben ---------- */
@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .nav {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    padding: 10px clamp(16px, 4vw, 44px);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .brand { padding: 0 14px 0 0; }
  .brand-sub { display: none; }
  .nav .brand-word { display: none; }
  .nav-link { padding: 0 10px; font-size: 11px; gap: 8px; }
  .nav-link svg { width: 18px; height: 18px; }
  .nav-link::after { left: 10px; right: 10px; bottom: 4px; }
  .nav-foot { display: none; }
  .topbar { position: static; min-height: 0; padding-top: 14px; padding-bottom: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .fam-row { grid-template-columns: minmax(0, 1fr) minmax(120px, 190px) 100px 20px; }
  .fam-row .fam-status { display: none; }
}

/* ---------- Handy: Tab-Leiste unten, Blätter von unten ---------- */
@media (max-width: 767px) {
  body { font-size: 15px; }
  .nav {
    position: fixed;
    inset: auto 0 0 0;
    top: auto;
    z-index: 50;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom));
    padding: 0 6px env(safe-area-inset-bottom);
    justify-content: space-around;
    border-bottom: 0;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: visible;
  }
  .brand { display: none; }
  .nav-link {
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    height: 100%;
    padding: 0 2px;
    border-radius: 0;
    font-size: 9px;
    letter-spacing: .08em;
  }
  .nav-link:hover { background: none; }
  .nav-link svg { width: 22px; height: 22px; }
  .nav-link .nl-long { display: none; }
  .nav-link::after { left: 50%; right: auto; width: 22px; margin-left: -11px; top: 0; bottom: auto; height: 2px; }
  .topbar { position: sticky; top: 0; padding: 10px 16px; min-height: 56px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .topbar-brand { display: flex; padding: 0; }
  .topbar-brand .brand-word { font-size: 14px; }
  .topbar-brand .brand-moon { width: 24px; height: 24px; }
  .backup-chip .bc-text { display: none; }
  .backup-chip { padding: 0 12px; }
  .view { padding-bottom: calc(var(--tab-h) + 96px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 20px; }
  .page-head .head-actions .btn-hide-m { display: none; }
  .fab { display: grid; }
  .toasts { bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); }

  .stamp { width: 132px; height: 132px; position: absolute; right: -4px; top: -10px; }
  .stamp-core { inset: 24px; }
  .stamp-day { font-size: 23px; }
  .stamp-name { font-size: 10px; }
  .stamp-fam { font-size: 9px; }
  .stamp text { font-size: 9px; }
  .page-head.has-stamp { padding-right: 132px; min-height: 120px; align-items: flex-start; }

  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 16px 16px 14px; }
  .kpis.is-three .kpi:first-child { grid-column: 1 / -1; }
  .kpi-value { font-size: 21px; }

  .fam-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name amount" "bar bar"; gap: 10px 12px; padding: 14px 2px; }
  .fam-row .fam-name { grid-area: name; }
  .fam-row .fam-amount { grid-area: amount; }
  .fam-row .mbar { grid-area: bar; max-width: none; }
  .fam-row .chev { display: none; }
  .attn-row { grid-template-columns: minmax(0, 1fr) auto; }
  .attn-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }

  .kid-row { grid-template-columns: 1fr 1fr; }
  .kid-row .kid-name { grid-column: 1 / -1; }
  .kid-row .icon-btn { position: absolute; right: 10px; top: 10px; margin: 0; }
  .kid-row { position: relative; }
  .kid-row .kid-name { padding-right: 46px; }

  .qr-wrap { grid-template-columns: 1fr; justify-items: center; }
  .qr-wrap .qr-box { width: min(100%, 240px); }
  .qr-wrap .kv { width: 100%; }

  .sheet-back { place-items: end stretch; padding: 0; }
  .sheet {
    width: 100%;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    animation: sheetUp .42s cubic-bezier(.2, .9, .25, 1) both;
    touch-action: pan-y;
  }
  .sheet.is-wide, .sheet.is-xl { width: 100%; }
  .sheet-handle {
    display: block;
    flex: none;
    height: 22px;
    cursor: grab;
    touch-action: none;
  }
  .sheet-handle::before { content: ""; display: block; width: 42px; height: 5px; margin: 9px auto 0; border-radius: 5px; background: var(--line); }
  .sheet-head { padding-top: 4px; touch-action: none; }
  .sheet-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .sheet-foot .btn { flex: 1 1 auto; }
  .sheet-back.is-closing .sheet { animation: sheetDown .26s var(--ease) both; }
  .sheet.is-dragging { animation: none; transition: none; }
  .sheet.is-snap { transition: transform .3s var(--spring); }
}

@media (max-width: 380px) {
  .kpi-value { font-size: 19px; }
  .seg span { padding: 0 8px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  .stamp svg.ring { animation: none; }
  ::view-transition-old(view), ::view-transition-new(view) { animation: none; }
}

@media print {
  .nav, .topbar, .fab, .head-actions, .row-actions { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
}
