/* ==========================================================================
   Edeka Schneider · Bestell-App
   Ein Stylesheet, keine Fremdschriften, keine Bibliotheken.
   Aufbau: 1 Farben & Grundlagen · 2 Start & Anmeldung · 3 Rahmen (Navigation)
           4 Seitenkopf, Kennzahlen, Filter · 5 Karten · 6 Knöpfe & Formulare
           7 Dialoge, Menüs, Hinweise · 8 Nachrichten · 9 Infos, Admin, Profil
           10 Bewegung
   ========================================================================== */

/* ---------- 1 Farben & Grundlagen ---------- */
:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #efece5;
  --surface-3: #e5e1d8;
  --ink: #17181c;
  --muted: #626770;
  --line: #e1ddd3;
  --accent: #ffc800;
  --accent-ink: #1a1a1a;
  --accent-soft: #fff1b8;
  --header: #101114;
  --header-2: #1b1d22;
  --header-ink: #f4f3ef;
  --header-muted: #a5a8b0;
  --red: #d63838;
  --blue: #2c6be0;
  --green: #17824a;
  --amber: #b86e00;
  --on-tone: #ffffff;
  --shadow: 0 1px 2px rgba(22, 22, 28, .05), 0 8px 24px rgba(22, 22, 28, .06);
  --shadow-lg: 0 12px 48px rgba(10, 10, 14, .28);
  --r: 16px;
  --r-sm: 11px;
  --top-h: 56px;
  --tabs-h: 62px;
  --side-w: 252px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f12; --surface: #17191e; --surface-2: #1f2228; --surface-3: #292c34;
    --ink: #f1f0eb; --muted: #9a9ea8; --line: #2a2d35;
    --accent-soft: #3b3310;
    --header: #08090b; --header-2: #17191e;
    --red: #ff6b6b; --blue: #74a7ff; --green: #4bc58b; --amber: #f1b24a; --on-tone: #121316;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 10px 28px rgba(0, 0, 0, .32);
    --shadow-lg: 0 16px 56px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0f12; --surface: #17191e; --surface-2: #1f2228; --surface-3: #292c34;
  --ink: #f1f0eb; --muted: #9a9ea8; --line: #2a2d35;
  --accent-soft: #3b3310;
  --header: #08090b; --header-2: #17191e;
  --red: #ff6b6b; --blue: #74a7ff; --green: #4bc58b; --amber: #f1b24a; --on-tone: #121316;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 10px 28px rgba(0, 0, 0, .32);
  --shadow-lg: 0 16px 56px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.015em; text-wrap: balance; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.solid { fill: currentColor; stroke: none; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

/* Farbton-Helfer: Hintergrund und Schrift leiten sich aus --tone ab */
.t-red { --tone: var(--red); } .t-blue { --tone: var(--blue); } .t-green { --tone: var(--green); } .t-amber { --tone: var(--amber); } .t-muted { --tone: var(--muted); }

/* ---------- 2 Start & Anmeldung ---------- */
.boot, .auth {
  min-height: 100vh; min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  padding: calc(24px + var(--safe-t)) 18px calc(24px + var(--safe-b));
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(255, 200, 0, .14), transparent 70%),
    var(--header);
  color: var(--header-ink);
}
.boot img, .auth-logo { width: min(340px, 72vw); height: auto; }
.boot-bar { width: 120px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; background: var(--accent); border-radius: 3px; animation: slide 1s ease-in-out infinite alternate; }
@keyframes slide { from { transform: translateX(-20%); } to { transform: translateX(170%); } }

.auth-card {
  width: min(420px, calc(100vw - 28px));
  background: var(--surface);
  color: var(--ink);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 16px;
}
.auth-card h1 { font-size: 1.35rem; }
.auth-foot { color: var(--header-muted); font-size: .8rem; text-align: center; }
.link-btn { background: none; border: 0; padding: 6px 4px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }
@media (hover: hover) { .link-btn:hover { color: var(--ink); } }
.wait-emoji { font-size: 3rem; line-height: 1; }

/* ---------- 3 Rahmen ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.top {
  position: sticky; top: 0; z-index: 50;
  height: calc(var(--top-h) + var(--safe-t));
  padding: var(--safe-t) 10px 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--header); color: var(--header-ink);
}
.top .logo { height: 44px; width: auto; }
.top-actions { display: flex; align-items: center; gap: 2px; }
.top .icon-btn { color: var(--header-ink); }
@media (hover: hover) { .top .icon-btn:hover { background: rgba(255, 255, 255, .1); } }

.main { padding: 18px 14px calc(var(--tabs-h) + var(--safe-b) + 96px); max-width: 1240px; margin: 0 auto; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--tabs-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tab {
  position: relative;
  display: grid; justify-items: center; align-content: center; gap: 3px;
  background: none; border: 0; padding: 0;
  color: var(--muted); font-size: .68rem; font-weight: 600; text-decoration: none;
}
.tab .ic { width: 23px; height: 23px; transition: transform .2s; }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] .ic { transform: translateY(-1px) scale(1.06); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 34px; height: 3px; border-radius: 0 0 4px 4px; background: var(--accent); }
.badge {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  display: inline-grid; place-items: center;
  background: var(--red); color: var(--on-tone); font-size: .68rem; font-weight: 700; line-height: 1;
}
.tab .badge { position: absolute; top: 7px; left: calc(50% + 6px); }

.side { display: none; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .top, .tabs { display: none; }
  .side {
    position: sticky; top: 0; height: 100vh; height: 100dvh;
    display: flex; flex-direction: column; gap: 4px;
    padding: 22px 14px 14px;
    background: var(--header); color: var(--header-ink);
    overflow-y: auto;
  }
  .side .logo { width: 100%; max-width: 204px; height: auto; margin: 2px auto 20px; }
  .side-label { margin: 16px 12px 4px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--header-muted); }
  .nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 12px; border: 0; background: none; text-align: left;
    color: var(--header-muted); font-weight: 600; text-decoration: none;
    transition: background .15s, color .15s;
  }
  @media (hover: hover) { .nav-item:hover { background: rgba(255, 255, 255, .06); color: var(--header-ink); } }
  .nav-item[aria-current="page"] { background: var(--header-2); color: var(--header-ink); box-shadow: inset 3px 0 0 var(--accent); }
  .nav-item .badge { margin-left: auto; }
  .side-spacer { flex: 1; min-height: 12px; }
  .side-user {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px; border-radius: 14px; border: 0; text-align: left;
    background: var(--header-2); color: var(--header-ink); text-decoration: none;
  }
  @media (hover: hover) { .side-user:hover { background: #24272e; } }
  .side-user .who { min-width: 0; line-height: 1.25; }
  .side-user .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-user .who span { font-size: .78rem; color: var(--header-muted); }
  .main { padding: 30px clamp(22px, 3.4vw, 48px) 64px; margin: 0; width: 100%; }
  .only-mobile { display: none !important; }
}
@media (max-width: 899.98px) { .only-desktop { display: none !important; } }

.avatar {
  --tone: var(--muted);
  width: 38px; height: 38px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tone); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .02em;
}
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar.sm { width: 30px; height: 30px; font-size: .72rem; }

/* ---------- 4 Seitenkopf, Kennzahlen, Filter ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-head h1 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem); line-height: 1.15; font-weight: 750; }
.page-head .sub { margin-top: 4px; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.stat {
  display: grid; align-content: start; gap: 1px; padding: 11px 12px; border-radius: 14px; text-align: left;
  background: var(--surface); border: 1.5px solid transparent; box-shadow: var(--shadow);
  transition: transform .12s, border-color .15s;
  min-width: 0;
}
.stat:active { transform: scale(.97); }
.stat b { font-size: 1.5rem; line-height: 1.1; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--tone, var(--muted)); }
.stat span { font-size: .72rem; line-height: 1.2; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.stat[aria-pressed="true"] { border-color: var(--tone, var(--muted)); }
@supports (background: color-mix(in srgb, red 10%, blue)) { .stat[aria-pressed="true"] { background: color-mix(in srgb, var(--tone) 9%, var(--surface)); } }
@media (min-width: 600px) {
  .stats { gap: 12px; margin-bottom: 18px; }
  .stat { padding: 14px 16px; }
  .stat span { white-space: nowrap; }
  .stat b { font-size: 1.9rem; }
  .stat span { font-size: .82rem; }
}

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.search { position: relative; flex: 1 1 220px; min-width: 0; }
.search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 44px; padding: 0 38px 0 40px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); }
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--ink); outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; }

.seg { display: inline-flex; padding: 3px; border-radius: 13px; background: var(--surface-2); gap: 2px; max-width: 100%; }
.seg button {
  height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: none;
  color: var(--muted); font-weight: 650; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg.full { display: flex; }
.seg.full button { flex: 1; }

.select { height: 44px; padding: 0 34px 0 12px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }

.sort { position: relative; display: inline-flex; }
@media (max-width: 599.98px) {
  .toolbar .seg { flex: 1; }
  .toolbar .seg button { flex: 1 1 auto; padding: 0 10px; }
  .sort { width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
  .sort .select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; padding: 0; }
}
@media (min-width: 600px) { .sort > .ic { display: none; } }

.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 14px 6px; margin: 0 -14px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrapping { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  --tone: var(--ink);
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 13px; border-radius: 18px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: .87rem; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.chip:active { transform: scale(.96); }
.chip .n { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.chip[aria-pressed="true"] { border-color: var(--tone); background: var(--surface-2); }
@supports (background: color-mix(in srgb, red 10%, blue)) {
  .chip[aria-pressed="true"] { background: color-mix(in srgb, var(--tone) 14%, var(--surface)); }
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tone, var(--muted)); flex: none; }

.section-title { display: flex; align-items: center; gap: 8px; margin: 20px 2px 10px; font-size: .78rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.section-title:first-child { margin-top: 4px; }
.list > .section-title { grid-column: 1 / -1; margin: 12px 2px -2px; }
.list > .section-title:first-child { margin-top: 2px; }
.section-title .n { padding: 1px 7px; border-radius: 9px; background: var(--surface-2); letter-spacing: 0; }

/* ---------- 5 Karten ---------- */
.list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); align-items: start; }
.card {
  --dept: var(--line);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 9px;
  padding: 14px 14px 12px 18px;
  background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow);
  content-visibility: auto; contain-intrinsic-size: auto 190px;
}
.card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--dept); }
.card.urgent { box-shadow: var(--shadow), 0 0 0 1.5px var(--red); }
.card.is-new::after { content: "Neu"; position: absolute; top: 0; right: 52px; padding: 2px 8px; border-radius: 0 0 8px 8px; background: var(--accent); color: var(--accent-ink); font-size: .68rem; font-weight: 750; }
.card-top { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.dept { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: .8rem; font-weight: 650; color: var(--muted); }
.dept span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-top .pill { margin-left: auto; }
.card-top .icon-btn { margin: -5px -6px -5px 0; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 99px;
  background: var(--surface-2); color: var(--ink);
  font-size: .74rem; font-weight: 700; line-height: 1.35; white-space: nowrap;
}
.pill .ic { width: 13px; height: 13px; stroke-width: 2.4; }
@supports (background: color-mix(in srgb, red 10%, blue)) {
  .pill[class*="t-"] { background: color-mix(in srgb, var(--tone) 15%, transparent); color: color-mix(in srgb, var(--tone) 74%, var(--ink)); }
}
.pill.solid { background: var(--red); color: var(--on-tone); }
.card-main { display: flex; gap: 12px; align-items: flex-start; }
.card-body { flex: 1; min-width: 0; display: grid; gap: 7px; }
.card h3 { font-size: 1.08rem; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.qty { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--ink); font-size: .86rem; font-weight: 700; white-space: nowrap; vertical-align: 1px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cust { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .92rem; }
.cust span, .cust a { display: inline-flex; align-items: center; gap: 5px; }
.cust .ic { width: 15px; height: 15px; color: var(--muted); }
.cust a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.note { padding: 8px 11px; border-radius: 10px; background: var(--surface-2); font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.thumb { flex: none; width: 76px; height: 76px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.meta { font-size: .78rem; color: var(--muted); line-height: 1.35; }
.actions { display: flex; gap: 7px; margin-left: auto; }
.card.leaving { animation: leave .26s ease forwards; pointer-events: none; }
@keyframes leave { to { opacity: 0; transform: scale(.94) translateY(6px); } }

.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 3.2rem; line-height: 1; }
.empty b { color: var(--ink); font-size: 1.1rem; }

.skel { height: 150px; border-radius: var(--r); background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%) 0 0 / 300% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- 6 Knöpfe & Formulare ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 16px; border-radius: 13px; border: 1.5px solid transparent;
  background: var(--surface-2); color: var(--ink);
  font-weight: 650; font-size: .95rem; white-space: nowrap; text-decoration: none;
  transition: transform .1s, background .15s, border-color .15s, opacity .15s;
}
@media (hover: hover) { .btn:hover { background: var(--surface-3); } }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .btn-primary:hover { background: #ffd633; } }
.btn-ghost { background: transparent; border-color: var(--line); }
@media (hover: hover) { .btn-ghost:hover { background: var(--surface-2); } }
.btn-ok { background: var(--green); color: var(--on-tone); }
@media (hover: hover) { .btn-ok:hover { background: var(--green); filter: brightness(1.08); } }
.btn-danger { background: var(--red); color: var(--on-tone); }
@media (hover: hover) { .btn-danger:hover { background: var(--red); filter: brightness(1.08); } }
.btn-sm { min-height: 38px; padding: 0 13px; font-size: .88rem; border-radius: 11px; }
.btn-block { width: 100%; }
.btn .ic { width: 1.1em; height: 1.1em; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--accent-ink); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted); text-decoration: none; transition: background .15s, color .15s; }
@media (hover: hover) { .icon-btn:hover { background: var(--surface-2); color: var(--ink); } }
.icon-btn.tonal { background: var(--surface-2); color: var(--ink); border-radius: 12px; width: 38px; height: 38px; }
@media (hover: hover) { .icon-btn.tonal:hover { background: var(--surface-3); } }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); z-index: 40;
  display: inline-flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 22px 0 18px; border: 0; border-radius: 28px;
  background: var(--accent); color: var(--accent-ink); font-weight: 750;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .26);
  transition: transform .12s;
}
.fab:active { transform: scale(.95); }
.fab .ic { width: 22px; height: 22px; stroke-width: 2.6; }

form.form, .form { display: grid; gap: 15px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: .82rem; font-weight: 650; color: var(--muted); }
.field .hint { font-size: .8rem; color: var(--muted); }
.field .hint.warn { color: var(--amber); font-weight: 600; }
.input, .field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="tel"], .field input[type="number"], .field input[type="date"], .field input[type="search"], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 13px;
  border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 76px; resize: vertical; line-height: 1.4; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .cols.stack { grid-template-columns: 1fr; } }
.pw { position: relative; }
.pw input { padding-right: 46px !important; }
.pw .icon-btn { position: absolute; right: 3px; top: 3px; }
.stepper { display: grid; grid-template-columns: 46px 1fr 46px; gap: 6px; }
.stepper button { height: 46px; border-radius: 13px; border: 0; background: var(--surface-2); font-size: 1.3rem; font-weight: 700; line-height: 1; }
.stepper button:active { background: var(--surface-3); }
.stepper input { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; padding-left: 4px !important; padding-right: 4px !important; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.switch b { display: block; font-weight: 650; }
.switch small { color: var(--muted); }
.switch input { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--surface-3); position: relative; transition: background .2s; margin: 0; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked { background: var(--green); }
.switch input.danger:checked { background: var(--red); }
.switch input:checked::after { transform: translateX(18px); }
.check { display: flex; align-items: center; gap: 9px; font-size: .92rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }
.form-error { padding: 10px 13px; border-radius: 12px; background: var(--surface-2); color: var(--red); font-weight: 600; font-size: .92rem; }
@supports (background: color-mix(in srgb, red 10%, blue)) { .form-error { background: color-mix(in srgb, var(--red) 12%, transparent); } }
.form-error:empty { display: none; }
.photo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.photo-prev { position: relative; width: 84px; height: 84px; border-radius: 13px; overflow: hidden; background: var(--surface-2); flex: none; }
.photo-prev img { width: 100%; height: 100%; object-fit: cover; }
.photo-prev button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; }
.photo-prev button .ic { width: 14px; height: 14px; }
details.more-fields { border-radius: 13px; border: 1.5px solid var(--line); }
details.more-fields > summary { list-style: none; cursor: pointer; padding: 12px 13px; font-weight: 650; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
details.more-fields > summary::-webkit-details-marker { display: none; }
details.more-fields > summary .ic { transition: transform .2s; color: var(--muted); }
details.more-fields[open] > summary .ic { transform: rotate(90deg); }
details.more-fields > .form { padding: 2px 13px 14px; }

/* ---------- 7 Dialoge, Menüs, Hinweise ---------- */
dialog { color: var(--ink); }
dialog.sheet {
  border: 0; padding: 0; margin: auto;
  width: min(560px, calc(100vw - 28px)); max-width: none;
  max-height: min(88vh, 860px); max-height: min(88dvh, 860px);
  background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
dialog.sheet.narrow { width: min(420px, calc(100vw - 28px)); }
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .22s cubic-bezier(.2, .8, .3, 1); }
dialog::backdrop { background: rgba(8, 8, 10, .58); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 12px 8px 20px; flex: none; }
.sheet-head h2 { font-size: 1.2rem; }
.sheet-body { padding: 6px 20px 20px; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 20px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); flex: none; }
.sheet-foot .btn { flex: 1; min-width: 0; }
.sheet-foot .btn-ghost:not(:only-child) { flex: 0 1 auto; }
@media (max-width: 640px) {
  dialog.sheet, dialog.sheet.narrow { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 93vh; max-height: 93dvh; }
  dialog.sheet[open] { animation: sheet-up .26s cubic-bezier(.2, .8, .3, 1); }
  dialog.sheet .sheet-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--surface-3); }
  .sheet-head { padding-top: 22px; position: relative; }
  dialog.sheet.center { margin: auto; width: calc(100vw - 28px); border-radius: 22px; }
  dialog.sheet.center .sheet-head::before { display: none; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }

dialog.menu {
  border: 0; padding: 6px; margin: 0;
  min-width: 232px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg);
  position: fixed;
}
dialog.menu::backdrop { background: transparent; }
dialog.menu[open] { animation: sheet-in .14s ease; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 11px; background: none; text-align: left; font-weight: 600; }
.menu-item:focus-visible { background: var(--surface-2); }
@media (hover: hover) { .menu-item:hover { background: var(--surface-2); } }
.menu-item .ic { color: var(--muted); }
.menu-item.danger, .menu-item.danger .ic { color: var(--red); }
.menu-sep { height: 1px; margin: 5px 8px; background: var(--line); }
@media (max-width: 640px) {
  dialog.menu { inset: auto 0 0 0 !important; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; padding: 12px 10px calc(12px + var(--safe-b)); }
  dialog.menu::backdrop { background: rgba(8, 8, 10, .5); }
  dialog.menu[open] { animation: sheet-up .22s cubic-bezier(.2, .8, .3, 1); }
  .menu-item { padding: 14px; font-size: 1.02rem; }
}

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; max-height: 94dvh; overflow: visible; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
dialog.lightbox img { max-width: 96vw; max-height: 90vh; max-height: 90dvh; border-radius: 12px; }
dialog.lightbox .icon-btn { position: fixed; top: calc(10px + var(--safe-t)); right: 10px; background: rgba(255, 255, 255, .14); color: #fff; }

.toasts {
  position: fixed; inset: auto auto calc(var(--tabs-h) + var(--safe-b) + 14px) 50%; transform: translateX(-50%);
  width: min(460px, calc(100vw - 24px)); margin: 0; padding: 0; border: 0; background: transparent; overflow: visible;
  display: grid; gap: 8px; z-index: 1000; pointer-events: none;
}
.toasts:not(:popover-open):empty { display: none; }
@media (min-width: 900px) { .toasts { bottom: 24px; } }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 16px; border-radius: 15px;
  background: #1d1f25; color: #f4f3ef; box-shadow: var(--shadow-lg);
  font-weight: 600; font-size: .95rem;
  animation: toast-in .24s cubic-bezier(.2, .8, .3, 1);
}
:root[data-theme="dark"] .toast { background: #f1f0eb; color: #17181c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #f1f0eb; color: #17181c; } }
.toast.err { background: var(--red); color: var(--on-tone); }
.toast span { flex: 1; min-width: 0; }
.toast button { flex: none; border: 0; background: none; padding: 6px 10px; border-radius: 9px; color: var(--accent); font-weight: 750; }
:root[data-theme="dark"] .toast button { color: #8a5a00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast button { color: #8a5a00; } }
.toast.out { animation: toast-out .2s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

.offline-bar { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 45; padding: 7px 14px; background: var(--amber); color: var(--on-tone); font-size: .85rem; font-weight: 650; text-align: center; }
@media (min-width: 900px) { .offline-bar { top: 0; } }

/* ---------- 8 Nachrichten ---------- */
.chat > * { min-width: 0; }
.chat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.conv-list { display: flex; flex-direction: column; min-height: 0; }
.conv-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 8px 16px; }
.conv-items { overflow-y: auto; padding: 0 6px 8px; }
.conv { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 10px; border: 0; border-radius: 13px; background: none; text-align: left; text-decoration: none; }
.conv[aria-current="true"] { background: var(--surface-2); }
@media (hover: hover) { .conv:hover { background: var(--surface-2); } }
.conv .txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.conv .txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .txt span { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .txt span { color: var(--ink); font-weight: 650; }
.conv .side-info { display: grid; justify-items: end; gap: 4px; font-size: .74rem; color: var(--muted); }
.thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 8px; border-bottom: 1px solid var(--line); flex: none; }
.thread-head .who { min-width: 0; line-height: 1.25; }
.thread-head .who span { font-size: .8rem; color: var(--muted); }
.bubbles { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.day { align-self: center; margin: 10px 0 6px; padding: 2px 10px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: .74rem; font-weight: 650; }
.bubble { position: relative; max-width: min(78%, 520px); padding: 8px 12px; border-radius: 16px 16px 16px 5px; background: var(--surface-2); align-self: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; border-radius: 16px 16px 5px 16px; background: var(--accent); color: var(--accent-ink); }
.bubble + .bubble.me, .bubble.me + .bubble:not(.me) { margin-top: 6px; }
.bubble img { border-radius: 10px; margin-bottom: 4px; max-height: 260px; cursor: zoom-in; }
.bubble time { display: block; margin-top: 2px; font-size: .68rem; opacity: .65; text-align: right; white-space: nowrap; }
.bubble .del { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--surface); color: var(--muted); box-shadow: var(--shadow); display: none; place-items: center; }
.bubble .del .ic { width: 13px; height: 13px; }
.bubble:focus-within .del, .bubble.sel .del { display: grid; }
@media (hover: hover) { .bubble:hover .del { display: grid; } }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px calc(8px + var(--safe-b)); border-top: 1px solid var(--line); flex: none; }
.composer textarea { flex: 1; min-height: 44px; max-height: 130px; padding: 10px 14px; border-radius: 22px; border: 1.5px solid var(--line); background: var(--bg); resize: none; line-height: 1.35; }
.composer textarea:focus { outline: none; border-color: var(--ink); }
.composer .send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.composer .send:disabled { opacity: .5; }
.composer .attach { position: relative; }
.composer .attach.has::after { content: ""; position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 2px solid var(--surface); }
.chat-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 30px; color: var(--muted); text-align: center; }

.chat-page .chat { height: calc(100vh - var(--top-h) - var(--safe-t) - var(--tabs-h) - var(--safe-b) - 96px); height: calc(100dvh - var(--top-h) - var(--safe-t) - var(--tabs-h) - var(--safe-b) - 96px); min-height: 320px; }
body.in-thread .tabs, body.in-thread .fab { display: none; }
body.in-thread .main { padding: 0; }
body.in-thread .page-head { display: none; }
body.in-thread .chat-page .chat { height: calc(100vh - var(--top-h) - var(--safe-t)); height: calc(100dvh - var(--top-h) - var(--safe-t)); border-radius: 0; }
.chat.show-thread .conv-list { display: none; }
.chat:not(.show-thread) .thread { display: none; }
@media (min-width: 900px) {
  .chat { grid-template-columns: 320px minmax(0, 1fr); }
  .chat .conv-list { display: flex !important; border-right: 1px solid var(--line); }
  .chat .thread { display: flex !important; }
  .chat-page .chat, body.in-thread .chat-page .chat { height: calc(100vh - 150px); height: calc(100dvh - 150px); border-radius: var(--r); }
  body.in-thread .main { padding: 30px clamp(22px, 3.4vw, 48px) 64px; }
  body.in-thread .page-head { display: flex; }
  .thread-head .back { display: none; }
  .composer { padding-bottom: 8px; }
}

/* ---------- 9 Infos, Admin, Profil, „Mehr“ ---------- */
.panel { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; }
.panel + .panel { margin-top: 12px; }
.stack > .panel, .two > .panel { margin-top: 0; }
.stack > *, .two > * { min-width: 0; }
.panel h2 { font-size: 1.1rem; margin-bottom: 8px; }
.panel p + p { margin-top: 8px; }
.stack { display: grid; gap: 12px; }
.two { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }

.verdict { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-weight: 650; }
@supports (background: color-mix(in srgb, red 10%, blue)) { .verdict { background: color-mix(in srgb, var(--tone) 14%, var(--surface)); } }
.verdict .big { font-size: 1.6rem; line-height: 1; }
.verdict small { display: block; font-weight: 500; color: var(--muted); }
.veg-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.veg-list li { padding: 5px 11px; border-radius: 16px; background: var(--surface-2); font-size: .9rem; font-weight: 550; }
.veg-list li small { color: var(--muted); font-weight: 500; }
.veg-list li.hit { outline: 2px solid var(--accent); background: var(--accent-soft); }
.veg-list li.dim { opacity: .35; }
.panel-title { display: flex; align-items: center; gap: 8px; }
.panel-title .pill { margin-left: auto; }

.phone-card h2 { margin-bottom: 2px; }
.phone-card .addr { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .88rem; margin-bottom: 10px; }
.phone-card .addr .ic { width: 14px; height: 14px; }
.phone-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; }
.phone-row .grow b { display: block; font-size: .82rem; font-weight: 650; color: var(--muted); }
.phone-row .grow span { font-size: 1.06rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.phone-row .go { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--on-tone); flex: none; }
.phone-row .go.mail { background: var(--surface-2); color: var(--ink); }

.more-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.more-link { display: flex; align-items: center; gap: 13px; padding: 15px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); text-decoration: none; border: 0; text-align: left; width: 100%; }
.more-link .icw { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.more-link b { display: block; }
.more-link small { color: var(--muted); }
.more-link > .ic:last-child { margin-left: auto; color: var(--muted); }

.user-row { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-top: 1px solid var(--line); width: 100%; border-left: 0; border-right: 0; border-bottom: 0; background: none; text-align: left; }
.user-row:first-of-type { border-top: 0; }
@media (hover: hover) { button.user-row:hover { background: var(--surface-2); border-radius: 12px; } }
.user-row .who { flex: 1; min-width: 0; line-height: 1.3; }
.user-row .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .who span { font-size: .84rem; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .tags { justify-content: flex-end; flex: none; }
.user-row .row-acts { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
div.user-row { flex-wrap: wrap; }
@media (max-width: 480px) { .user-row .tags { display: none; } }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font: 700 1.35rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; user-select: all; }
.report { margin: 0; padding: 12px; border-radius: 12px; background: var(--surface-2); font: .76rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; }
.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-head h2 { margin: 0; font-size: 1.3rem; }

/* ---------- Handy-Feinschliff ---------- */
/* Tippflächen: auf Touch-Geräten mindestens 44 px hoch */
@media (pointer: coarse) {
  .btn-sm { min-height: 44px; padding: 0 14px; }
  .seg button { height: 42px; }
  .chip { height: 42px; padding: 0 14px; border-radius: 21px; }
  .icon-btn { width: 44px; height: 44px; }
  .icon-btn.tonal { width: 44px; height: 44px; }
  .card-top .icon-btn { margin: -8px -9px -8px 0; }
  .photo-prev button, .bubble .del { width: 32px; height: 32px; }
  .search .clear { top: 0; right: 2px; width: 44px; height: 44px; }
  .check input { width: 24px; height: 24px; }
  .link-btn { padding: 12px 8px; }
}
/* Unter 16 px Schriftgröße zoomt iOS beim Antippen ins Feld – deshalb mobil immer 16 px */
@media (max-width: 899.98px) {
  .select, .search input, .composer textarea { font-size: 16px; }
  .page-head { flex-wrap: wrap; align-items: flex-start; }
  .page-head > .btn { margin-left: auto; }
}
.lbl-short { display: none; }
@media (max-width: 599.98px) {
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  .stat span { white-space: nowrap; overflow-wrap: normal; }
  .user-row .who { flex: 1 1 150px; }
  .cols { gap: 10px; }
}
@media (max-width: 359.98px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .chips { margin: 0 -10px 10px; padding: 2px 10px 6px; }
  .stats { gap: 6px; }
  .stat { padding: 10px 9px; }
  .card { padding: 13px 12px 11px 16px; }
  .sheet-body { padding: 6px 16px 18px; }
  .sheet-head { padding-left: 16px; }
  .sheet-foot { padding-left: 16px; padding-right: 16px; gap: 8px; }
  .tab { font-size: .62rem; }
  .fab { right: 12px; padding: 0 18px 0 14px; }
}
/* Handy quer: Leisten flacher, damit mehr Inhalt Platz hat */
@media (max-height: 480px) and (max-width: 899.98px) {
  :root { --top-h: 46px; --tabs-h: 46px; }
  .top .logo { height: 36px; }
  .tab span:not(.badge) { display: none; }
  .tab .badge { top: 4px; }
  .fab { height: 48px; bottom: calc(var(--tabs-h) + var(--safe-b) + 10px); }
  .main { padding-top: 12px; }
  .page-head h1 { font-size: 1.25rem; }
  .stat { padding: 8px 12px; }
  .stat b { font-size: 1.3rem; }
}
/* Bildschirmtastatur: Formulare und Chat-Eingabe rücken über die Tastatur (--kb setzt app.js) */
@media (max-width: 640px) {
  dialog.sheet, dialog.sheet.narrow { margin-bottom: var(--kb, 0px); max-height: calc(93vh - var(--kb, 0px)); max-height: calc(93dvh - var(--kb, 0px)); }
}
@media (max-width: 899.98px) {
  body.in-thread .chat-page .chat { height: calc(100vh - var(--top-h) - var(--safe-t) - var(--kb, 0px)); height: calc(100dvh - var(--top-h) - var(--safe-t) - var(--kb, 0px)); }
}

/* ---------- 10 Bewegung ---------- */
.list.fresh > .card { animation: pop-in .3s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(min(var(--i, 0), 10) * 28ms); }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px); } }
.bump { animation: bump .32s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 2000; overflow: hidden; }
.confetti i { position: absolute; top: 0; left: 0; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: confetti 1.5s cubic-bezier(.15, .6, .35, 1) forwards; }
@keyframes confetti {
  0% { opacity: 1; transform: translate(var(--x0), var(--y0)) rotate(0); }
  100% { opacity: 0; transform: translate(var(--x1), var(--y1)) rotate(var(--rot)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .confetti { display: none; }
}
@media print {
  .side, .top, .tabs, .fab, .toolbar, .stats, .chips, .actions, .card-top .icon-btn { display: none !important; }
  .shell { display: block; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; content-visibility: visible; }
}
