/* MZD Berg, neues Design (November 2026).
   Gleiche Tokens wie Ultimapix Signage (upx.css), Akzent MZD-Rot statt Blau.
   Alle Klassen beginnen mit m-, damit sie nicht mit Tailwind oder style.css kollidieren.
   Handy: Tab-Leiste unten. Ab 900px: Seitenleiste links. Dunkel über html.dark (Schlüssel mzd-dark-mode). */

@font-face { font-family: "Inter"; src: url("inter.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
  --m-bg: #f5f5f7; --m-card: #fff; --m-card-2: #fbfbfd;
  --m-ink: #1d1d1f; --m-dim: #6e6e73; --m-faint: #8a8a8f; --m-line: #d2d2d7; --m-line-2: #e5e5ea;
  --m-red: #b42629; --m-red-press: #9a1f22; --m-red-soft: rgba(180, 38, 41, .09); --m-on-red: #fff;
  --m-green: #1f8a3b; --m-green-soft: rgba(52, 199, 89, .14);
  --m-orange: #b25000; --m-orange-dot: #ff9f0a; --m-orange-soft: rgba(255, 159, 10, .16);
  --m-blue: #0a6cd6;
  --m-fill: rgba(120, 120, 128, .12); --m-fill-2: rgba(120, 120, 128, .2);
  --m-glass: rgba(249, 249, 251, .84); --m-scrim: rgba(0, 0, 0, .3);
  --m-seg-on: #fff; --m-seg-shadow: 0 1px 1px rgba(0, 0, 0, .04), 0 3px 8px rgba(0, 0, 0, .1);
  --m-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px rgba(0, 0, 0, .06);
  --m-r-l: 20px; --m-r-m: 12px; --m-r-s: 9px;
  --m-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --m-safe-b: env(safe-area-inset-bottom, 0px);
  --m-safe-t: env(safe-area-inset-top, 0px);
  --m-tab-h: 58px;
  color-scheme: light;
}
html.dark {
  --m-bg: #000; --m-card: #1c1c1e; --m-card-2: #232325;
  --m-ink: #f5f5f7; --m-dim: #a1a1a6; --m-faint: #8e8e93; --m-line: #3a3a3c; --m-line-2: #2c2c2e;
  --m-red: #ff5f5c; --m-red-press: #ff7b78; --m-red-soft: rgba(255, 95, 92, .16); --m-on-red: #1a0303;
  --m-green: #30d158; --m-green-soft: rgba(48, 209, 88, .16);
  --m-orange: #ffb340; --m-orange-soft: rgba(255, 159, 10, .2);
  --m-blue: #4ea1ff;
  --m-fill: rgba(120, 120, 128, .24); --m-fill-2: rgba(120, 120, 128, .36);
  --m-glass: rgba(22, 22, 24, .84); --m-scrim: rgba(0, 0, 0, .55);
  --m-seg-on: #636366; --m-seg-shadow: 0 1px 2px rgba(0, 0, 0, .4); --m-shadow: none;
  color-scheme: dark;
}

/* ---------- Grund ---------- */
body.mzd { margin: 0; min-height: 100vh; background: var(--m-bg); color: var(--m-ink); font: 400 15px/1.45 var(--m-sans); letter-spacing: -.011em; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
.mzd *, .mzd *::before, .mzd *::after { box-sizing: border-box; }
.mzd button, .mzd input, .mzd select, .mzd textarea { font-family: var(--m-sans); color: inherit; letter-spacing: inherit; }
.mzd button { cursor: pointer; }
.mzd a { color: inherit; }
.mzd :focus-visible { outline: 3px solid color-mix(in srgb, var(--m-red) 45%, transparent); outline-offset: 2px; }
.m-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.m-ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.m-num { font-variant-numeric: tabular-nums; }
.m-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.m-skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--m-ink); color: var(--m-bg) !important; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.m-skip:focus { top: calc(12px + var(--m-safe-t)); }
[hidden] { display: none !important; }

/* ---------- Schale ---------- */
.m-app { min-height: 100vh; }
.m-main { padding-bottom: calc(var(--m-tab-h) + var(--m-safe-b)); min-width: 0; }
.m-pubmain { min-height: 100vh; padding-bottom: var(--m-safe-b); }
.m-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--m-tab-h) + var(--m-safe-b)); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + var(--m-safe-b)) max(6px, env(safe-area-inset-left, 0px)); background: var(--m-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--m-line); }
.m-side-logo { display: none; }
.m-tab { display: grid; justify-items: center; gap: 2px; padding: 2px 0; color: var(--m-faint) !important; font-size: 10.5px; font-weight: 500; text-decoration: none; position: relative; }
.m-tab .m-ico { width: 25px; height: 25px; stroke-width: 1.7; }
.m-tab[aria-current="page"] { color: var(--m-red) !important; }
.m-tab .m-badge { position: absolute; top: 0; left: calc(50% + 6px); }
.m-imp { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; background: var(--m-orange-soft); font-size: 14px; }
.m-imp form { margin: 0; }

@media (min-width: 900px) {
  .m-app { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
  .m-tabbar { position: sticky; top: 0; bottom: auto; height: 100vh; align-self: start; display: flex; flex-direction: column; gap: 2px; padding: 20px 12px; border-top: 0; border-right: .5px solid var(--m-line); grid-row: 1; grid-column: 1; overflow-y: auto; }
  .m-side-logo { display: block; padding: 2px 10px 22px; color: var(--m-red); }
  .m-side-logo .m-logo { height: 30px; width: 125px; }
  .m-tab { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--m-ink) !important; font-size: 14.5px; font-weight: 450; }
  .m-tab .m-ico { width: 20px; height: 20px; color: var(--m-red); }
  .m-tab[aria-current="page"] { background: var(--m-fill-2); color: var(--m-ink) !important; font-weight: 600; }
  .m-tab .m-badge { position: static; margin-left: auto; }
  .m-main { grid-column: 2; padding: 0 28px 40px; }
  .m-main > .m-page { max-width: 820px; margin: 0 auto; }
}

/* ---------- Kopf ---------- */
.m-head { position: sticky; top: 0; z-index: 20; background: var(--m-bg); padding: calc(8px + var(--m-safe-t)) 16px 10px; }
.m-head--static { position: static; }
.m-head--flat { position: static; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.m-head__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
.m-eyebrow { font-size: 13px; font-weight: 600; color: var(--m-dim); }
.m-head h1, .m-h1 { margin: 0; font-size: 32px; line-height: 1.12; font-weight: 700; letter-spacing: -.026em; text-wrap: balance; }
.m-head .m-sub { font-size: 14px; color: var(--m-dim); margin-top: 3px; }
.m-head .m-tools { display: flex; gap: 8px; margin-top: 12px; }
.m-weeknav { display: flex; gap: 6px; }
.m-weeknav a { width: 30px; height: 30px; border-radius: 50%; background: var(--m-fill); color: var(--m-red) !important; display: grid; place-items: center; }
.m-weeknav .m-ico { width: 16px; height: 16px; stroke-width: 2.4; }
.m-navbar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: var(--m-safe-t) 8px 0; }
.m-back { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--m-red) !important; font-size: 17px; padding: 8px; text-decoration: none; }
.m-back .m-ico { width: 20px; height: 20px; stroke-width: 2.4; }
@media (min-width: 900px) { .m-head { padding-top: 26px; } .m-head h1 { font-size: 34px; } }

/* ---------- Segmente, Knöpfe, Chips ---------- */
.m-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--m-fill); border-radius: var(--m-r-s); padding: 2px; gap: 2px; }
.m-seg button, .m-seg a, .m-seg label { border: 0; background: transparent; border-radius: 7px; padding: 6px 8px; font-size: 13px; font-weight: 500; min-height: 30px; white-space: nowrap; text-align: center; text-decoration: none; color: var(--m-ink) !important; display: grid; place-items: center; cursor: pointer; }
.m-seg [aria-pressed="true"], .m-seg [aria-current="page"], .m-seg input:checked + span { background: var(--m-seg-on); box-shadow: var(--m-seg-shadow); font-weight: 600; }
.m-seg label { padding: 0; position: relative; }
.m-seg label input { position: absolute; opacity: 0; pointer-events: none; }
.m-seg label span { display: grid; place-items: center; width: 100%; height: 100%; min-height: 30px; border-radius: 7px; padding: 6px 8px; }

.m-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--m-red); color: var(--m-on-red) !important; font-size: 17px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; transition: transform .12s ease, background .15s; line-height: 1.1; text-align: center; }
.m-btn:active { transform: scale(.98); background: var(--m-red-press); }
.m-btn--block { width: 100%; }
.m-btn--sm { min-height: 34px; padding: 0 14px; font-size: 14px; }
.m-btn--tint { background: var(--m-red-soft); color: var(--m-red) !important; }
.m-btn--gray { background: var(--m-fill); color: var(--m-ink) !important; }
.m-btn--gray:active { background: var(--m-fill-2); }
.m-btn[disabled], .m-btn.is-busy { opacity: .5; pointer-events: none; }
.m-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.4px solid currentColor; border-right-color: transparent; animation: m-spin .7s linear infinite; }
@keyframes m-spin { to { transform: rotate(360deg); } }
.m-link { border: 0; background: none; color: var(--m-red) !important; font-size: inherit; padding: 6px 0; text-decoration: none; }
.m-chips { display: flex; gap: 8px; margin: 0 0 18px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.m-chips::-webkit-scrollbar { display: none; }
.m-chip { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--m-fill); color: var(--m-ink) !important; border-radius: 999px; min-height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; }
.m-chip[aria-pressed="true"] { background: var(--m-ink); color: var(--m-bg) !important; }
.m-chip .m-ico { width: 16px; height: 16px; }
.m-tag { display: inline-flex; align-items: center; min-height: 20px; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--m-fill); color: var(--m-dim); line-height: 1.3; }
.m-tag--red { background: var(--m-red-soft); color: var(--m-red); }
.m-tag--orange { background: var(--m-orange-soft); color: var(--m-orange); }
.m-tag--green { background: var(--m-green-soft); color: var(--m-green); }
.m-tag--blue { background: color-mix(in srgb, var(--m-blue) 14%, transparent); color: var(--m-blue); }
.m-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--m-red); color: var(--m-on-red); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }

/* ---------- Gruppierte Listen ---------- */
.m-gh { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 32px 7px; font-size: 13px; color: var(--m-dim); }
.m-gh a, .m-gh button { border: 0; background: none; color: var(--m-red) !important; font-size: 13px; font-weight: 500; padding: 0; text-decoration: none; }
.m-group { margin: 0 16px 24px; background: var(--m-card); border-radius: var(--m-r-m); overflow: hidden; }
.m-gf { margin: -16px 32px 24px; font-size: 13px; color: var(--m-dim); }
.m-row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 16px; border: 0; background: transparent; text-align: left; position: relative; color: inherit !important; text-decoration: none; font-size: inherit; }
.m-row + .m-row::before, .m-field + .m-row::before, .m-row + .m-field::before, .m-field + .m-field::before { content: ""; position: absolute; top: 0; right: 0; left: var(--inset, 16px); border-top: .5px solid var(--m-line); }
button.m-row:active, a.m-row:active, label.m-row:active { background: var(--m-fill); }
.m-row .m-grow { flex: 1; min-width: 0; }
.m-row .m-t { display: block; font-size: 16px; font-weight: 500; letter-spacing: -.016em; line-height: 1.25; overflow-wrap: anywhere; }
.m-row .m-s { display: block; font-size: 14px; color: var(--m-dim); line-height: 1.3; margin-top: 1px; overflow-wrap: anywhere; }
.m-row .m-v { color: var(--m-dim); font-size: 15px; white-space: nowrap; }
.m-row .m-chev { width: 14px; height: 14px; color: var(--m-faint); stroke-width: 2.4; }
.m-row .m-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.m-row--danger .m-t { color: var(--m-red); }
.m-row--ic { --inset: 58px; }
.m-sq { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: #fff; flex: none; }
.m-sq .m-ico { width: 18px; height: 18px; stroke-width: 2; }
.m-sq--r { background: #e5484d; } .m-sq--o { background: #f08c00; } .m-sq--b { background: #0a84ff; } .m-sq--g { background: #30a14e; } .m-sq--gr { background: #8e8e93; } .m-sq--p { background: #8e5cd9; } .m-sq--t { background: #12a5a5; }
.m-txt { padding: 12px 16px; font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; }
.m-txt + .m-txt { border-top: .5px solid var(--m-line); }
.m-txt small { display: block; font-size: 12.5px; color: var(--m-dim); margin-bottom: 2px; }
.m-txt p { margin: 0 0 6px; } .m-txt p:last-child { margin: 0; }
.m-empty { text-align: center; color: var(--m-dim); padding: 26px 20px; }
.m-facts .m-row { align-items: flex-start; }
.m-facts .m-k { width: 108px; flex: none; font-size: 15px; color: var(--m-dim); padding-top: 1px; }

/* Felder */
.m-field { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 16px; position: relative; }
.m-field > label, .m-field > .m-fl { width: 112px; flex: none; font-size: 16px; }
.m-field input:not([type=checkbox]):not([type=radio]), .m-field select, .m-field textarea { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; font-size: 16px; padding: 12px 0; outline: none; color: var(--m-ink); }
.m-field select { -webkit-appearance: none; appearance: none; background: transparent; }
.m-field textarea { resize: vertical; min-height: 84px; line-height: 1.4; }
.m-field--stack { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
.m-field--stack > label, .m-field--stack > .m-fl { width: auto; font-size: 13px; color: var(--m-dim); }
.m-field--stack textarea, .m-field--stack input { padding-top: 4px !important; }
.m-field input:focus-visible, .m-field select:focus-visible, .m-field textarea:focus-visible { outline: none; }
.m-field:focus-within > label { color: var(--m-red); }
#m-apply { min-height: 100vh; display: flex; flex-direction: column; }
#m-apply .m-wiz-foot { margin-top: auto; }
.m-field input::placeholder, .m-field textarea::placeholder { color: var(--m-faint); }
.m-field.is-error > label, .m-field.is-error > .m-fl { color: var(--m-red); }
.m-ferr { display: block; color: var(--m-red); font-size: 13px; padding: 0 16px 10px; }
.m-switch { -webkit-appearance: none; appearance: none; width: 51px; height: 31px; border-radius: 16px; background: var(--m-fill-2); position: relative; flex: none; transition: background .2s; margin: 0; cursor: pointer; }
.m-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .2s; }
.m-switch:checked { background: #34c759; }
.m-switch:checked::after { transform: translateX(20px); }
.m-check { width: 22px; height: 22px; accent-color: var(--m-red); flex: none; }

/* Hinweis */
.m-notice { margin: 4px 16px 20px; background: var(--m-card); border-radius: var(--m-r-m); padding: 14px 16px; display: grid; gap: 10px; }
.m-notice__t { display: flex; gap: 12px; align-items: flex-start; }
.m-notice b { display: block; font-size: 15px; font-weight: 600; }
.m-notice p { margin: 2px 0 0; font-size: 14px; color: var(--m-dim); }
.m-notice__acts { display: flex; gap: 8px; padding-left: 42px; flex-wrap: wrap; }
.m-notice__acts form { margin: 0; }
.m-notice--ok { background: var(--m-green-soft); }
.m-notice--err { background: var(--m-red-soft); }
.m-notice--ok b { color: var(--m-green); } .m-notice--err b { color: var(--m-red); }
.m-notice--warn { background: var(--m-orange-soft); } .m-notice--warn b { color: var(--m-orange); }

/* ---------- Heute ---------- */
.m-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; background: var(--m-fill); border-radius: 12px; padding: 3px; margin-top: 12px; }
.m-day { border: 0; background: transparent; border-radius: 9px; padding: 6px 0 7px; display: grid; justify-items: center; gap: 1px; position: relative; color: var(--m-ink); }
.m-day__wd { font-size: 11.5px; font-weight: 600; color: var(--m-dim); }
.m-day__n { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.m-day__c { font-size: 11.5px; color: var(--m-dim); }
.m-day.is-today .m-day__n { color: var(--m-red); }
.m-day[aria-pressed="true"] { background: var(--m-card); box-shadow: var(--m-seg-shadow); }
html.dark .m-day[aria-pressed="true"] { background: #3a3a3c; }
.m-day__dot { position: absolute; top: 6px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--m-orange-dot); }
.m-day__ok { position: absolute; top: 5px; right: 7px; width: 13px; height: 13px; color: var(--m-green); stroke-width: 3; }
.m-day.is-holiday .m-day__wd { color: var(--m-red); }
.m-rrow { --inset: 58px; }
.m-ord { width: 30px; height: 30px; border-radius: 50%; background: var(--m-fill); display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--m-dim); flex: none; align-self: flex-start; margin-top: 2px; }
.m-cnt { min-width: 36px; text-align: right; font-size: 26px; font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--m-ink); }
.m-rrow.is-zero .m-t, .m-rrow.is-zero .m-cnt { color: var(--m-faint); }
.m-cnt.is-manual { min-width: 44px; height: 44px; display: inline-grid; place-items: center; text-align: center; border: 2.5px solid var(--m-red); border-radius: 50%; color: var(--m-red); font-size: 22px; }
.m-cnt.is-paused { color: var(--m-faint); }
.m-rrow.is-zero .m-ord { opacity: .5; }
.m-dock { position: sticky; bottom: calc(var(--m-tab-h) + var(--m-safe-b)); z-index: 15; margin: 4px 0 0; padding: 8px 16px 9px; background: color-mix(in srgb, var(--m-bg) 93%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--m-line); display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.m-dock__tot { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.m-dock__tot b { font-size: 20px; font-weight: 700; letter-spacing: -.025em; white-space: nowrap; }
.m-dock__tot span { display: block; font-size: 13px; color: var(--m-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-dock form { margin: 0; display: flex; gap: 8px; align-items: center; }
.m-dock__act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 899px) { .m-dock__act:has(select) { flex: 1 1 100%; } .m-dock__act:has(select) form { flex: 1; } .m-dock__act:has(select) select { flex: 1; max-width: none; } }
.m-wdays span small { display: block; font-size: 11px; font-weight: 500; opacity: .8; }
.m-wdays span { line-height: 1.15; text-align: center; }
.m-dock .m-btn { min-height: 44px; font-size: 16px; white-space: nowrap; }
.m-dock select { border: 0; background: var(--m-fill); border-radius: 10px; padding: 0 10px; min-height: 40px; font-size: 15px; max-width: 46vw; color: var(--m-ink); }
.m-done { display: inline-flex; align-items: center; gap: 6px; color: var(--m-green); font-weight: 600; font-size: 15px; white-space: nowrap; }
.m-done .m-ico { width: 20px; height: 20px; stroke-width: 2.6; }
.m-done--dim { color: var(--m-dim); font-weight: 500; }
@media (min-width: 900px) { .m-dock { bottom: 0; } }

/* Kurze Bildschirme (Handy mit grösserer Schrift oder Zoom): weniger feste Flächen */
@media (max-width: 899px) and (max-height: 700px) {
  :root { --m-tab-h: 50px; }
  .m-tabbar { padding-top: 4px; padding-bottom: calc(3px + var(--m-safe-b)); }
  .m-tab { font-size: 10px; gap: 1px; }
  .m-tab .m-ico { width: 23px; height: 23px; }
  .m-head h1, .m-h1 { font-size: 27px; }
  .m-days { margin-top: 8px; }
  .m-day { padding: 4px 0 5px; }
  .m-day__n { font-size: 17px; }
  .m-dock { padding-top: 6px; padding-bottom: 7px; }
  .m-dock__tot b { font-size: 18px; }
  .m-dock .m-btn { min-height: 40px; font-size: 15px; padding: 0 16px; }
}

/* ---------- Blatt ---------- */
.m-scrim { position: fixed; inset: 0; background: var(--m-scrim); z-index: 90; opacity: 0; transition: opacity .25s; }
.m-scrim.is-on { opacity: 1; }
.m-sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; background: var(--m-bg); border-radius: 14px 14px 0 0; z-index: 95; transform: translateY(105%); transition: transform .32s cubic-bezier(.32, .72, 0, 1); box-shadow: 0 -10px 40px rgba(0, 0, 0, .15); padding-bottom: var(--m-safe-b); }
.m-sheet.is-on { transform: none; }
.m-sheet__grab { width: 36px; height: 5px; border-radius: 3px; background: var(--m-fill-2); margin: 6px auto 0; flex: none; }
.m-sheet__h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 16px 14px; flex: none; }
.m-sheet__h h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.024em; line-height: 1.2; }
.m-sheet__h p { margin: 2px 0 0; color: var(--m-dim); font-size: 14px; }
.m-x { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--m-fill); color: var(--m-dim); display: grid; place-items: center; flex: none; }
.m-x .m-ico { width: 15px; height: 15px; stroke-width: 2.6; }
.m-sheet__b { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; min-height: 0; flex: 1; }
.m-sheet__f { padding: 10px 16px 14px; display: flex; gap: 10px; flex: none; border-top: .5px solid var(--m-line); background: var(--m-bg); }
.m-sheet__f .m-btn { flex: 1; }
.m-sheet__f .m-btn--gray { flex: 0 0 auto; }
.m-field .m-step input { flex: none; width: 40px; padding: 0; }
.m-sheet form { margin: 0; display: contents; }
@media (min-width: 900px) {
  .m-sheet { left: 50%; right: auto; top: 50%; bottom: auto; width: 540px; max-height: 86vh; border-radius: 16px; transform: translate(-50%, -46%) scale(.98); opacity: 0; pointer-events: none; transition: transform .22s, opacity .2s; padding-bottom: 0; }
  .m-sheet.is-on { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
  .m-sheet__grab { display: none; }
}
.m-qa { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 16px 22px; }
.m-qa a, .m-qa button { border: 0; background: var(--m-card); border-radius: var(--m-r-m); display: grid; justify-items: center; gap: 4px; padding: 10px 4px 9px; color: var(--m-red) !important; font-size: 12px; font-weight: 500; text-decoration: none; }
.m-qa .is-off { color: var(--m-faint) !important; pointer-events: none; }
.m-step { display: flex; align-items: center; background: var(--m-fill); border-radius: 999px; padding: 3px; }
.m-step button { width: 40px; height: 36px; border: 0; background: transparent; border-radius: 999px; display: grid; place-items: center; color: var(--m-ink); }
.m-step button:active { background: var(--m-fill-2); }
.m-step button[disabled] { opacity: .3; }
.m-step .m-ico { width: 18px; height: 18px; stroke-width: 2.4; }
.m-step output, .m-step input { width: 40px; text-align: center; font-size: 19px; font-weight: 600; border: 0; background: transparent; padding: 0; }
.m-toast { position: fixed; left: 50%; top: calc(12px + var(--m-safe-t)); transform: translate(-50%, calc(-100% - 40px)); visibility: hidden; background: var(--m-ink); color: var(--m-bg); border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 500; z-index: 120; transition: transform .3s cubic-bezier(.32, .72, 0, 1); max-width: calc(100% - 32px); display: flex; gap: 8px; align-items: center; }
.m-toast.is-on { transform: translate(-50%, 0); visibility: visible; }
.m-toast .m-ico { width: 18px; height: 18px; color: #30d158; stroke-width: 2.6; }
.m-toast.is-err .m-ico { color: #ff6961; }

/* ---------- Öffentlich ---------- */
.m-pub { max-width: 560px; margin: 0 auto; }
.m-pub-top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--m-safe-t)) 16px 10px; }
.m-logo { height: 30px; width: 125px; color: var(--m-red); fill: currentColor; display: block; }
.m-hero { padding: 26px 20px 26px; }
.m-hero h1 { font-size: 34px; line-height: 1.08; letter-spacing: -.03em; margin: 0 0 10px; font-weight: 700; text-wrap: balance; }
.m-hero p { margin: 0 0 22px; font-size: 18px; line-height: 1.4; color: var(--m-dim); }
.m-hero__who { margin-top: 12px; font-size: 14px; color: var(--m-dim); text-align: center; }
.m-phone { font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--m-red) !important; text-decoration: none; display: inline-block; margin: 2px 0; }
.m-foot { padding: 4px 32px 34px; font-size: 13px; color: var(--m-dim); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.m-foot a { color: var(--m-dim) !important; text-decoration: underline; text-underline-offset: 3px; }
.m-prog { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 6px 16px 0; }
.m-prog i { height: 4px; border-radius: 2px; background: var(--m-fill-2); }
.m-prog i.is-on { background: var(--m-red); }
.m-wiz-h { padding: 16px 20px 18px; }
.m-wiz-h h1 { margin: 2px 0 6px; font-size: 28px; letter-spacing: -.026em; line-height: 1.12; }
.m-wiz-h p { margin: 0; color: var(--m-dim); font-size: 15px; }
.m-wdays { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0 16px 6px; }
.m-wdays label { position: relative; }
.m-wdays input { position: absolute; opacity: 0; pointer-events: none; }
.m-wdays span { min-height: 54px; border-radius: var(--m-r-m); background: var(--m-card); font-size: 16px; font-weight: 600; display: grid; place-items: center; cursor: pointer; }
.m-wdays input:checked + span { background: var(--m-red); color: var(--m-on-red); }
.m-wdays input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--m-red) 45%, transparent); }
.m-wiz-foot { position: sticky; bottom: 0; padding: 12px 16px calc(14px + var(--m-safe-b)); background: var(--m-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--m-line); display: flex; gap: 10px; }
.m-wiz-foot .m-btn { flex: 1; }
.m-wiz-foot .m-btn--gray { flex: 0 0 auto; width: 56px; padding: 0; }
.m-calc { margin: 14px 16px 24px; padding: 14px 16px; border-radius: var(--m-r-m); background: var(--m-red-soft); font-size: 15px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.m-calc b { font-weight: 700; }
.m-done-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--m-green-soft); color: var(--m-green); display: grid; place-items: center; margin: 40px auto 18px; }
.m-done-ic .m-ico { width: 32px; height: 32px; stroke-width: 2.6; }
.m-login { max-width: 420px; margin: 0 auto; padding: 18px 0 30px; }
.m-login__h { text-align: center; padding: 20px 24px 26px; }
.m-login__h .m-logo { height: 44px; width: 183px; margin: 0 auto 22px; }
.m-login__h h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.026em; }
.m-login__h p { margin: 0; color: var(--m-dim); }
.mzd .m-pw-t { border: 0; background: none; color: var(--m-red); font-size: 15px; padding: 0; }
.m-turnstile { padding: 12px 16px; min-height: 70px; }

/* ---------- Küche ---------- */
.m-big { margin: 14px 16px 24px; background: var(--m-card); border-radius: var(--m-r-l); padding: 18px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 12px; }
.m-big__n { font-size: 56px; font-weight: 700; letter-spacing: -.045em; line-height: 1; }
.m-big__l { font-size: 15px; color: var(--m-dim); }
.m-big__side { text-align: right; font-size: 14px; color: var(--m-dim); line-height: 1.5; }
.m-big__side b { color: var(--m-ink); font-weight: 600; }
.m-wk { display: grid; grid-template-columns: repeat(5, 1fr); padding: 12px 8px; }
.m-wk > div { display: grid; justify-items: center; gap: 2px; }
.m-wk span { font-size: 12px; color: var(--m-dim); font-weight: 600; }
.m-wk b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.m-wk .is-cur b { color: var(--m-red); }

/* ---------- Ferien (Wochen) ---------- */
.m-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 12px; }
.m-weeks label { position: relative; }
.m-weeks input { position: absolute; opacity: 0; pointer-events: none; }
.m-weeks span { display: grid; gap: 1px; justify-items: center; padding: 9px 4px; border-radius: 10px; background: var(--m-fill); cursor: pointer; text-align: center; }
.m-weeks b { font-size: 15px; font-weight: 600; }
.m-weeks small { font-size: 11.5px; color: var(--m-dim); }
.m-weeks input:checked + span { background: var(--m-red); color: var(--m-on-red); }
.m-weeks input:checked + span small { color: inherit; opacity: .85; }
.m-weeks--prefer input:checked + span { background: #30a14e; color: #fff; }
.m-weeks input:disabled + span { opacity: .4; cursor: not-allowed; }

/* ---------- Suche ---------- */
.m-search { margin: 12px 0 0; display: flex; align-items: center; gap: 6px; background: var(--m-fill); border-radius: 10px; padding: 0 10px; height: 38px; color: var(--m-dim); }
.m-search .m-ico { width: 18px; height: 18px; }
.m-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; color: var(--m-ink); }
.m-alpha { margin: 0 32px 6px; font-size: 13px; font-weight: 600; color: var(--m-dim); }

/* ---------- Verwaltungsseiten: Bausteine ----------
   .m-page--wide       breitere Seite für Tabellen (ab 900px bis 1180px)
   .m-toolbar          Filter und Aktionen unter dem Kopf, bricht um, auf dem Handy waagrecht scrollbar
   .m-input/.m-select  einzelne Eingabe ausserhalb gruppierter Listen (Filter)
   .m-card             Karte mit Innenabstand, .m-card__h Kopf, .m-card__b Inhalt
   .m-table            Tabelle in .m-tablewrap; .m-table--stack wird auf dem Handy zu Zeilenkarten (td[data-label])
   .m-stats            Kennzahlen-Kacheln, .m-stat > b + span
   .m-h2               Abschnittstitel innerhalb einer Seite
   .m-fgrid            Formularraster: Felder nebeneinander ab 700px (.m-fgrid > .m-group)
   .m-pager            Seitenwechsel
   .m-actions          Knopfreihe am Ende eines Formulars
*/
@media (min-width: 900px) { .m-main > .m-page--wide { max-width: 1180px; } }
.m-h2 { margin: 26px 32px 8px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.m-h2 + .m-gh { margin-top: 2px; }
.m-lead { margin: 0 32px 14px; color: var(--m-dim); font-size: 14.5px; }
.m-toolbar { display: flex; gap: 8px; align-items: center; margin: 0 0 18px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.m-toolbar::-webkit-scrollbar { display: none; }
.m-toolbar form { margin: 0; display: flex; gap: 8px; align-items: center; }
.m-toolbar > * { flex: none; }
.m-toolbar .m-spacer { flex: 1; }
@media (min-width: 900px) { .m-toolbar { flex-wrap: wrap; overflow: visible; } .m-toolbar form { flex-wrap: wrap; } }
.m-input, .m-select { border: 0; background: var(--m-fill); border-radius: 10px; min-height: 36px; padding: 0 12px; font-size: 15px; color: var(--m-ink); outline: none; max-width: 100%; }
.m-select { -webkit-appearance: none; appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a8f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.m-input:focus-visible, .m-select:focus-visible { outline: 3px solid color-mix(in srgb, var(--m-red) 40%, transparent); outline-offset: 0; }
.m-input--block { width: 100%; }
.m-flabel { display: grid; gap: 4px; font-size: 12.5px; color: var(--m-dim); font-weight: 500; }
.m-card { margin: 0 16px 20px; background: var(--m-card); border-radius: var(--m-r-m); overflow: hidden; }
.m-card__h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; }
.m-card__h h2, .m-card__h h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.018em; line-height: 1.25; }
.m-card__h p { margin: 2px 0 0; font-size: 13.5px; color: var(--m-dim); }
.m-card__b { padding: 0 16px 16px; }
.m-card__b > :first-child { margin-top: 0; } .m-card__b > :last-child { margin-bottom: 0; }
.m-tablewrap { margin: 0 16px 24px; background: var(--m-card); border-radius: var(--m-r-m); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.m-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.m-table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--m-dim); padding: 10px 14px 8px; white-space: nowrap; border-bottom: .5px solid var(--m-line); background: var(--m-card); position: sticky; top: 0; }
.m-table td { padding: 11px 14px; border-top: .5px solid var(--m-line-2); vertical-align: middle; }
.m-table tbody tr:first-child td { border-top: 0; }
.m-table tbody tr:hover td { background: color-mix(in srgb, var(--m-fill) 45%, transparent); }
.m-table .m-r, .m-table th.m-r { text-align: right; }
.m-table .m-c, .m-table th.m-c { text-align: center; }
.m-table .m-dimc { color: var(--m-dim); }
.m-table tr.is-cur td { background: var(--m-red-soft); }
.m-table tr.is-warn td { background: var(--m-orange-soft); }
.m-table tr.is-off td { color: var(--m-faint); }
.m-table a:not(.m-btn):not(.m-chip) { color: var(--m-red); text-decoration: none; font-weight: 500; }
.m-table td form { margin: 0; display: inline; }
.m-table .m-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.m-table tfoot td { font-weight: 600; border-top: .5px solid var(--m-line); }
@media (max-width: 699px) {
  .m-table--stack thead { display: none; }
  .m-table--stack, .m-table--stack tbody, .m-table--stack tr, .m-table--stack td { display: block; width: 100%; }
  .m-table--stack tr { padding: 10px 16px; position: relative; }
  .m-table--stack tr + tr { border-top: .5px solid var(--m-line); }
  .m-table--stack td { border: 0 !important; padding: 2px 0; display: flex; gap: 12px; justify-content: space-between; text-align: right; }
  .m-table--stack td::before { content: attr(data-label); color: var(--m-dim); font-size: 13.5px; text-align: left; flex: none; }
  .m-table--stack td[data-label=""]::before, .m-table--stack td:not([data-label])::before { content: none; }
  .m-table--stack td.m-main-cell { font-size: 16px; font-weight: 600; text-align: left; justify-content: flex-start; padding-bottom: 4px; }
  .m-table--stack .m-acts { justify-content: flex-start; padding-top: 6px; }
  .m-table--stack tbody tr:hover td { background: none; }
  .m-table--stack tr.is-cur, .m-table--stack tr.is-warn { background: var(--m-red-soft); }
  .m-table--stack tr.is-warn { background: var(--m-orange-soft); }
  .m-table--stack tr.is-cur td, .m-table--stack tr.is-warn td { background: none; }
}
.m-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 16px 22px; }
.m-stat { background: var(--m-card); border-radius: var(--m-r-m); padding: 14px 16px; display: grid; gap: 2px; text-decoration: none; color: inherit !important; }
.m-stat b { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.m-stat span { font-size: 13.5px; color: var(--m-dim); }
.m-stat small { font-size: 12.5px; color: var(--m-faint); }
.m-stat--red b { color: var(--m-red); } .m-stat--orange b { color: var(--m-orange); } .m-stat--green b { color: var(--m-green); }
.m-fgrid { display: grid; gap: 0 16px; margin: 0 16px; }
.m-fgrid > .m-group, .m-fgrid > .m-card, .m-fgrid > .m-tablewrap { margin-left: 0; margin-right: 0; }
.m-fgrid > .m-gh { margin-left: 16px; margin-right: 16px; }
@media (min-width: 900px) { .m-fgrid--2 { grid-template-columns: 1fr 1fr; align-items: start; } .m-fgrid--2 > .m-span { grid-column: 1 / -1; } }
.m-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 16px 28px; }
.m-actions .m-btn { flex: 1 1 auto; }
@media (min-width: 900px) { .m-actions .m-btn { flex: 0 0 auto; } }
.m-btn--danger { background: var(--m-red-soft); color: var(--m-red) !important; }
.m-btn--line { background: transparent; color: var(--m-red) !important; box-shadow: inset 0 0 0 1.5px currentColor; }
.m-btn .m-ico { width: 18px; height: 18px; stroke-width: 2.2; }
.m-btn--sm .m-ico { width: 16px; height: 16px; }
.m-pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0 16px 28px; flex-wrap: wrap; font-size: 14px; color: var(--m-dim); }
.m-pager a, .m-pager span.is-cur { min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--m-fill); color: var(--m-ink) !important; text-decoration: none; font-weight: 500; }
.m-pager span.is-cur { background: var(--m-ink); color: var(--m-bg) !important; }
.m-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--m-faint); flex: none; }
.m-dot--green { background: #34c759; } .m-dot--orange { background: var(--m-orange-dot); } .m-dot--red { background: #ff453a; }
.m-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.m-pre { margin: 0; padding: 12px 16px; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--m-ink); }
.m-row .m-acts { display: flex; gap: 6px; flex: none; }
.m-row form { margin: 0; }
.m-field .m-unit { color: var(--m-dim); font-size: 15px; flex: none; }
.m-field--check { gap: 12px; }
.m-field--check > label { width: auto; flex: 1; }
.m-help { display: block; font-size: 13px; color: var(--m-dim); padding: 0 16px 10px; margin-top: -4px; }
.m-ok-ic { color: var(--m-green); } .m-warn-ic { color: var(--m-orange); }
.m-split { display: grid; gap: 0; }
@media (min-width: 1100px) { .m-split { grid-template-columns: minmax(0, 1fr) 360px; gap: 0 4px; align-items: start; } }

/* ---------- Alte Seiten in der neuen Schale ---------- */
.mzd--legacy .m-legacy { padding: calc(16px + var(--m-safe-t)) 16px 24px; max-width: 1280px; }
.mzd--legacy .m-main { background: var(--m-bg); }
.mzd--legacy .m-legacy .nav-sticky { display: none; }
.mzd--legacy .m-legacy { font-family: var(--m-sans); }
html.dark .mzd--legacy .m-main { background: var(--m-bg); }

@media (prefers-reduced-motion: reduce) { .mzd *, .mzd *::before, .mzd *::after { transition: none !important; animation-duration: .001s !important; } }
