:root {
  --accent: #b4532a;
  --accent-soft: #f6e5dc;
  --bg: #f5f3ef;
  --card: #ffffff;
  --ink: #1d1a16;
  --muted: #6f675d;
  --line: #e4ddd2;
  --soft: #efeae2;
  --ok: #2f7d4f; --ok-soft: #dcefe3;
  --warn: #a86a00; --warn-soft: #fbeccc;
  --err: #b3261e; --err-soft: #f7dcda;
  --info: #2c5d9e; --info-soft: #dde8f6;
  --radius: 14px;
  --tabbar: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141210; --card: #1f1c19; --ink: #f2ede6; --muted: #a39a8e; --line: #36302a; --soft: #2a2622;
    --accent-soft: #4a2a1b; --ok-soft: #1d3a28; --warn-soft: #3d2e10; --err-soft: #43201d; --info-soft: #1b2c44;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }

/* Mobile-Grundausstattung (Skill „mobile-native“) */
html {
  -webkit-text-size-adjust: 100%;      /* keine automatische Schriftvergrößerung im Querformat */
  overscroll-behavior: none;           /* kein versehentliches Pull-to-Refresh mitten im Service */
}
button, a, .chip, .tile, .res, [role="button"], summary {
  touch-action: manipulation;          /* keine 300-ms-Verzögerung beim Tippen */
}
button, .btn, .chip, .tile, #tabbar a, summary {
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;   /* Langes Drücken markiert keinen Text */
}
/* Sofortiges Feedback beim Antippen (nicht erst beim Loslassen) */
.btn, .chip, .tile, .res, .kpi.click, .free-opt, .sec-t, .day, .slot, .wk-cell, .mo-cell, .yr-day {
  transition: transform 110ms ease-out, background-color 110ms ease-out, border-color 110ms ease-out;
}
.btn:active:not(:disabled), .chip:active, .tile:active, .res:active, .kpi.click:active, .free-opt:active,
.sec-t:active, .mo-cell:active, .wk-cell:active { transform: scale(.97); }
/* Sichtbarer Fokus für Tastatur & Screenreader (WCAG 2.4.7) – erscheint nicht beim Antippen */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
/* Größere Tippflächen auf Touch-Geräten (Skill „accessibility“ / Apple HIG: ~44 px) */
@media (pointer: coarse) {
  .btn.sm { height: 40px; }
  .chip { height: 40px; padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* Layout */
#shell { min-height: 100%; display: flex; flex-direction: column; }
#topbar {
  position: sticky; top: 0; z-index: 20; background: var(--bg); padding: calc(env(safe-area-inset-top) + 10px) 16px 8px;
  display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line);
}
#topbar h1 { font-size: 1.15rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#topbar select { max-width: 55vw; background: transparent; border: 0; font-weight: 700; font-size: 1.1rem; padding: 0; }
#view { flex: 1; padding: 12px 16px calc(var(--tabbar) + env(safe-area-inset-bottom) + 20px); max-width: 1100px; width: 100%; margin: 0 auto; }
#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
#tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 600; position: relative; }
#tabbar a svg { width: 24px; height: 24px; }
#tabbar a.active { color: var(--accent); }
#tabbar a.plus span.fab { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; margin-top: -18px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.badge-dot { position: absolute; top: 6px; left: calc(50% + 6px); background: var(--err); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.3; border-radius: 999px; padding: 1px 5px; }
@media (min-width: 900px) {
  #shell { flex-direction: row; }
  #tabbar { position: sticky; top: 0; height: 100vh; width: 92px; grid-template-columns: 1fr; grid-auto-rows: 76px; align-content: start; border-top: 0; border-right: 1px solid var(--line); padding-top: 12px; }
  #tabbar a.plus span.fab { margin-top: 0; }
  #main-col { flex: 1; min-width: 0; }
  #view { padding-bottom: 40px; }
}

/* Bausteine */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stack > * + * { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 360px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .grid2.resp { grid-template-columns: 1fr; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--err); }
.btn.block { width: 100%; }
.btn.sm { height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 9px; }
.btn.icon { width: 42px; padding: 0; }
.btn:disabled { opacity: .5; cursor: default; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chip { flex: none; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: .85rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
label.f { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
input.i, select.i, textarea.i { width: 100%; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; min-height: 42px; }
/* iPhone/Safari zoomt beim Antippen in Felder mit < 16 px Schrift – verhindern */
@media (max-width: 900px) { input.i, select.i, textarea.i, #topbar select { font-size: 16px; } }
.row > input.i { flex: 1 1 140px; }
.row.wrap-sm { flex-wrap: wrap; }
textarea.i { min-height: 72px; resize: vertical; }
input.i:focus, select.i:focus, textarea.i:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: .92rem; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.section-title { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 18px 0 8px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kpi b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .75rem; color: var(--muted); }
.list > * + * { border-top: 1px solid var(--line); }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 2px; cursor: pointer; text-decoration: none; color: inherit; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* Datumsleiste */
.datebar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.datebar .title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; justify-content: center; font-weight: 700; padding: 0 4px; }
.datebar .title svg { flex: none; }
.datebar input[type=date] { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 12px; }
.week button { border: 1px solid transparent; background: none; border-radius: 10px; padding: 6px 0; cursor: pointer; }
.week button small { display: block; font-size: .68rem; color: var(--muted); text-transform: uppercase; }
.week button b { display: block; font-size: 1.05rem; }
.week button i { display: block; font-style: normal; font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.week button.sel { background: var(--ink); color: var(--bg); }
.week button.sel small, .week button.sel i { color: var(--bg); opacity: .8; }
.week button.today b { color: var(--accent); }
.week button.sel.today b { color: var(--bg); }

/* Reservierungskarten */
.res { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.res + .res { margin-top: 8px; }
.res .time { font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.res .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res .meta { font-size: .8rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.res .party { font-weight: 800; font-size: 1.05rem; text-align: right; }
.res .party small { display: block; font-weight: 600; font-size: .72rem; color: var(--muted); }
.res.s-pending { border-left-color: var(--warn); }
.res.s-confirmed { border-left-color: var(--info); }
.res.s-seated { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok-soft) 50%, var(--card)); }
.res.s-finished, .res.s-cancelled, .res.s-no_show { opacity: .55; }
.res.s-no_show { border-left-color: var(--err); }
.tag { display: inline-flex; align-items: center; gap: 3px; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--soft); color: var(--ink); }
.tag.vip { background: #f3d77a; color: #3a2c00; }
.tag.warn { background: var(--err-soft); color: var(--err); }
.tag.info { background: var(--info-soft); color: var(--info); }
.st { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.st-pending { background: var(--warn-soft); color: var(--warn); }
.st-confirmed { background: var(--info-soft); color: var(--info); }
.st-seated { background: var(--ok-soft); color: var(--ok); }
.st-finished { background: var(--soft); color: var(--muted); }
.st-cancelled, .st-no_show { background: var(--err-soft); color: var(--err); }
.group-h { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 16px 2px 8px; }

/* Bottom-Sheet */
#sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; }
#sheet-bg.open { opacity: 1; pointer-events: auto; }
#sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 18px 18px 0 0; padding: 8px 16px calc(env(safe-area-inset-bottom) + 20px); transform: translateY(105%); transition: transform .22s ease; }
#sheet.open { transform: none; }
#sheet .grab { width: 40px; height: 5px; background: var(--line); border-radius: 3px; margin: 4px auto 10px; }
@media (min-width: 700px) {
  #sheet { left: 50%; right: auto; width: 560px; bottom: auto; top: 50%; border-radius: 18px; transform: translate(-50%, -45%) scale(.98); opacity: 0; pointer-events: none; transition: all .18s; max-height: 88vh; }
  #sheet.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
}
.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.actions .btn { height: 48px; }
.act-seat { background: var(--ok) !important; border-color: var(--ok) !important; color: #fff !important; }

/* Prominenter Walk-in-Button (Kopfzeile) */
.walkin-btn { background: var(--ok); border-color: var(--ok); color: #fff; height: 44px; padding: 0 18px; border-radius: 999px; font-size: 1rem; box-shadow: 0 3px 10px color-mix(in srgb, var(--ok) 35%, transparent); }
.walkin-btn:active { transform: scale(.97); }

/* Segment-Umschalter (Tag/Woche/Monat/Jahr, Tische/Raumplan/Zeitleiste) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--soft); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; height: 36px; border-radius: 9px; font-weight: 700; cursor: pointer; color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* Kennzahlen, 4er */
.kpis.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 600px) { .kpis.four { grid-template-columns: repeat(2, 1fr); } }
.kpi small { display: block; font-size: .72rem; color: var(--muted); margin-top: 1px; }
.kpi.click { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .kpi.click:hover { border-color: var(--accent); } }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.card-h a { font-size: .85rem; font-weight: 600; text-decoration: none; }

/* "Jetzt wichtig" */
.alerts { margin-top: 12px; border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.alert-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; cursor: pointer; }
.alert-row + .alert-row { border-top: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
@media (max-width: 480px) {
  .alert-row { flex-wrap: wrap; }
  .alert-row > div { flex: 1 1 calc(100% - 20px) !important; }
  .alert-row > .btn:not(.icon) { flex: 1; }
  .alert-row > .btn.icon { margin-left: 18px; }
}
.dot.err { background: var(--err); } .dot.warn { background: var(--warn); }

/* Kompakte Listen (Ankünfte, Eingang) */
.mini-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); cursor: pointer; flex-wrap: wrap; }
.mini-row .t { font-variant-numeric: tabular-nums; width: 46px; }
.mini-row .n { font-weight: 600; flex: 1; min-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tisch-Kacheln (Live) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
@media (max-width: 420px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { min-width: 0; text-align: left; border: 2px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 10px 10px; cursor: pointer; min-height: 86px; display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden; }
.tile .tl-head { display: flex; justify-content: space-between; align-items: baseline; }
.tile .tl-head b { font-size: 1.15rem; }
.tile .tl-head span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.tile .tl-main { font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .tl-sub { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile .tl-warn { font-size: .72rem; font-weight: 700; color: var(--err); }
.tile .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: color-mix(in srgb, currentColor 15%, transparent); }
.tile .bar span { display: block; height: 100%; background: var(--ok); }
.tile .bar.near span { background: var(--warn); }
.tile .bar.over span { background: var(--err); }
.tile.k-free { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.tile.k-free .tl-main { color: var(--ok); }
.tile.k-soon { border-color: var(--warn); background: var(--warn-soft); }
.tile.k-due { border-color: var(--info); background: var(--info-soft); }
.tile.k-late { border-color: var(--err); background: var(--err-soft); }
.tile.k-late .tl-sub { color: var(--err); font-weight: 700; }
.tile.k-seated { border-color: var(--accent); background: var(--accent-soft); }
.tile.overdue { border-color: var(--err); }
.tile.overdue .tl-sub { color: var(--err); font-weight: 700; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; border: 2px solid var(--line); }
.lg.free { border-color: var(--ok); } .lg.soon { border-color: var(--warn); background: var(--warn-soft); }
.lg.due { border-color: var(--info); background: var(--info-soft); } .lg.seated { border-color: var(--accent); background: var(--accent-soft); }
.lg.late { border-color: var(--err); background: var(--err-soft); } .lg.done { background: var(--soft); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }

/* Hilfe */
.help-btn { width: 40px; height: 40px; border-radius: 50%; font-weight: 800; font-size: 1.1rem; flex: none; }
.sheet-help { position: absolute; top: 10px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-weight: 800; font-size: 1rem; cursor: pointer; z-index: 2; }
#sheet h2:first-of-type { padding-right: 44px; }
.help-topic ol { margin: 4px 0 10px; padding-left: 20px; }
.help-topic li { margin: 3px 0; }
.help-step { margin-top: 10px; }
.help-tips { background: var(--soft); border-radius: 10px; padding: 4px 12px; margin-top: 10px; }
.help-tips p { margin: 8px 0; font-size: .9rem; }
.help-item { padding: 12px 0; border-top: 1px solid var(--line); }
.help-item:first-child { border-top: 0; }
.help-item summary { cursor: pointer; font-weight: 700; }
#view input[type=search].i { margin-bottom: 4px; }

/* Wetter */
.wx-days { display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 4px; overflow-x: auto; }
.wx-day { border: 1px solid transparent; background: none; border-radius: 10px; padding: 4px 0; display: flex; flex-direction: column; align-items: center; cursor: pointer; font-variant-numeric: tabular-nums; }
.wx-day.today { border-color: var(--line); background: var(--soft); }
.wx-day small { font-size: .72rem; color: var(--muted); font-weight: 700; }
.wx-day .wx-ic { font-size: 1.35rem; line-height: 1.3; }
.wx-day b { font-size: .9rem; }
.wx-day i { font-style: normal; font-size: .75rem; color: var(--muted); }
.wx-day em { font-style: normal; font-size: .7rem; color: var(--info); min-height: 1em; }
.week .wk-wx { display: block; font-size: .72rem; margin-top: 1px; }

.greet { font-size: 1.15rem; margin: 2px 0 10px; }
.greet b { font-weight: 800; }

/* ---------------- Vollbild-Ansichten (Empfang, Editor): ohne Kopf- und Menüleiste */
body.fs #tabbar, body.fs #topbar { display: none; }
body.fs #view { padding: calc(env(safe-area-inset-top) + 10px) 14px calc(env(safe-area-inset-bottom) + 14px); max-width: none; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.editor-cta { display: flex; align-items: center; gap: 12px; justify-content: space-between; text-decoration: none; color: inherit; border-color: var(--accent); margin-bottom: 4px; }
.editor-cta > svg { color: var(--muted); flex: none; }

/* „Mehr“ als Kacheln, nach Aufgaben gruppiert */
.tiles-group + .tiles-group { margin-top: 22px; }
.tiles-h { font-size: .95rem; font-weight: 800; margin: 0 2px 8px; color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 158px), 1fr)); gap: 8px; }
.tile-nav { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr auto; column-gap: 9px; row-gap: 5px; align-items: center; min-width: 0; padding: 11px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgb(0 0 0 / .04); transition: border-color .15s, box-shadow .15s; }
.tile-nav .tile-ic { width: 34px; height: 34px; border-radius: 10px; }
.tile-nav b { font-size: .95rem; line-height: 1.2; hyphens: manual; overflow-wrap: break-word; }
.tile-nav .tile-d { grid-column: 1 / -1; align-self: start; font-size: .8rem; line-height: 1.3; color: var(--muted); }
.tile-nav .tile-st { grid-column: 1 / -1; font-size: .76rem; font-weight: 700; color: var(--ok); font-variant-numeric: tabular-nums; }
.tile-nav .tile-st:empty { display: none; }
.tile-nav .tile-st.warn { color: var(--warn); }
.tile-nav:active { transform: scale(.98); }
@media (hover: hover) { .tile-nav:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgb(0 0 0 / .07); } }
.tile-ic { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); flex: none; }
.tile-ic.big { width: 48px; height: 48px; border-radius: 13px; }
.more-foot { margin-top: 26px; text-align: center; }
.more-foot .muted { margin: 8px 0 0; }

/* Unterseiten: auf großen Bildschirmen Menü links dauerhaft sichtbar */
.more-side { display: none; }
@media (min-width: 1024px) {
  .more-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
  .more-side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 76px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
  .more-side-g { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 10px 4px; }
  .more-side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: inherit; text-decoration: none; font-size: .9rem; font-weight: 600; }
  .more-side a svg { color: var(--muted); flex: none; }
  .more-side a:hover { background: var(--soft); }
  .more-side a.on { background: var(--accent-soft); color: var(--accent); }
  .more-side a.on svg { color: var(--accent); }
  .more-back { display: none !important; }
}

/* Tische & Bereiche */
.area-intro { margin-top: 20px; }
.area-intro p { margin: 0 2px 10px; }
.area-card { margin-top: 10px; }
.area-head { display: flex; align-items: center; gap: 12px; }
.area-head h3 { margin: 0; font-size: 1.12rem; }
.area-head .btn { display: inline-flex; align-items: center; gap: 4px; }
.togs { margin-top: 10px; border-top: 1px solid var(--line); }
.tog { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.tog-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tog-t b { font-size: .93rem; }
.tog-t span { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.tog input[role=switch] { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; border-radius: 14px; background: var(--line); position: relative; cursor: pointer; transition: background .18s; margin: 0; }
.tog input[role=switch]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.tog input[role=switch]:checked { background: var(--ok); }
.tog input[role=switch]:checked::after { transform: translateX(20px); }
.tog input[role=switch]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tbl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tbl-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: inherit; cursor: pointer; font-size: .88rem; }
.tbl-chip b { font-size: .95rem; }
.tbl-chip span { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.tbl-chip.off { border-style: dashed; opacity: .75; }
.tbl-chip.add { border-style: dashed; color: var(--accent); font-weight: 700; }
.area-add { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; border-style: dashed; }
.combos { margin-top: 18px; }
.combos summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.combos summary::-webkit-details-marker { display: none; }
.combos .btn { display: inline-flex; align-items: center; gap: 4px; }
details.adv { margin-top: 10px; }
details.adv summary { cursor: pointer; font-size: .88rem; font-weight: 700; color: var(--muted); }

/* ---------------- Raumplan-Editor */
.fp { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.fp-head { display: flex; align-items: center; gap: 10px; }
.fp-head h1 { flex: 1; font-size: 1.15rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-levels { flex-wrap: nowrap; }
.fp-levels .fp-add { border-style: dashed; }
.fp-edit { opacity: .7; }
.fp-stage { width: 100%; overflow: auto; overscroll-behavior: contain; border-radius: var(--radius); }
.fp-canvas.zoomed { max-width: none; max-height: none; min-height: 0; margin: 0; touch-action: pan-x pan-y; }
.fp-zoom { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.fp-zoom > span { min-width: 44px; text-align: center; font-weight: 700; }
.fp-canvas { position: relative; width: 100%; aspect-ratio: var(--ar, 4 / 3); max-height: calc(100dvh - 330px); margin: 0 auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; touch-action: none;
  background-image: linear-gradient(color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px);
  background-size: var(--gx, 6.25%) var(--gy, 8.333%); background-position: -1px -1px; }
@supports (max-height: 1dvh) { .fp-canvas { max-width: calc((100dvh - 330px) * var(--ar, 1.3333)); } }
.fp-tbl { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 2px solid var(--ink); background: var(--soft); border-radius: 10px; cursor: grab; user-select: none; -webkit-user-select: none;
  touch-action: none; transition: box-shadow 120ms ease-out; }
.fp-tbl.round { border-radius: 50%; }
.fp-tbl b { font-size: clamp(.8rem, 2.2vw, 1.15rem); line-height: 1; }
.fp-tbl small { font-size: .7rem; color: var(--muted); }
.fp-tbl.offline { border-style: dashed; }
.fp-tbl.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); z-index: 2; }
.fp-tbl.dragging { cursor: grabbing; box-shadow: 0 10px 24px rgba(0,0,0,.25); z-index: 3; }
.fp-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); }
.fp-hint { text-align: center; font-size: .8rem; color: var(--muted); }
.fp-dock { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.fp-palette-title { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.fp-palette-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.fp-tpl { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); cursor: grab; font-size: .8rem; font-weight: 600; touch-action: none; user-select: none; -webkit-user-select: none; }
.fp-tpl-shape { display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 8px; font-weight: 800; background: var(--card); }
.fp-tpl-shape.round { border-radius: 50%; }
.fp-tpl-shape.rect { width: 56px; height: 30px; }
.fp-ghost { position: fixed; z-index: 99; transform: translate(-50%, -50%); pointer-events: none; display: grid; place-items: center; width: 56px; height: 56px;
  border: 2px solid var(--accent); background: var(--accent-soft); border-radius: 10px; font-weight: 800; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.fp-ghost.round { border-radius: 50%; }
.fp-ghost.rect { width: 90px; height: 48px; }
.fp-inspector { display: flex; flex-direction: column; gap: 10px; }
.fp-insp-row { display: flex; gap: 12px; align-items: flex-end; }
.fp-insp-row.wrap { flex-wrap: wrap; align-items: center; }
.fp-field { flex: 1; min-width: 0; }
.fp-field label.f { margin-top: 0; }
.fp-lbl { align-self: center; font-size: .75rem; font-weight: 700; color: var(--muted); margin-right: 2px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper .btn { font-size: 1.3rem; }
.fp-seats { min-width: 34px; text-align: center; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.fp-foot { text-align: center; }

/* Einrichtung im Raumplan (Editor, Live-Plan, Tablet) – liegt unter den Tischen, ruhig und neutral */
.decor { position: absolute; z-index: 0; display: flex; align-items: center; justify-content: center; gap: 3px; overflow: hidden;
  font-size: clamp(10.5px, 1.4vw, .8rem); font-weight: 700; color: var(--muted); line-height: 1.05; text-align: center; pointer-events: none; }
.decor span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; padding: 0 2px; }
.decor.vert { flex-direction: column; }
.decor.vert span { writing-mode: vertical-rl; max-height: 100%; max-width: none; padding: 2px 0; }
.decor:has(svg) { container-type: size; }
@container (max-width: 64px) { .decor svg + span { display: none; } }
@container (max-height: 13px) { .decor svg { display: none; } }
.decor.k-wall { background: var(--ink); border-radius: 2px; }
.decor.k-window { background: repeating-linear-gradient(90deg, #7fb2d9 0 6px, #cfe4f3 6px 8px); border-radius: 1px; }
.decor.k-entrance { background: color-mix(in srgb, var(--ok) 16%, var(--card)); border: 2px solid var(--ok); border-radius: 6px; color: var(--ok); }
.decor.k-door { border-top: 2px solid var(--ink); border-right: 1px dashed var(--muted); border-top-right-radius: 100%; }
.decor.k-stairs { background: repeating-linear-gradient(0deg, var(--soft) 0 7px, var(--line) 7px 9px); border: 1.5px solid var(--muted); border-radius: 3px; color: var(--ink); }
.decor.k-stairs span { background: var(--card); border-radius: 4px; }
.decor.k-plant { background: radial-gradient(circle at 40% 35%, #8fcf7a, #3f8f3a); border-radius: 50%; color: #fff; }
.decor.k-bar { background: linear-gradient(#b98552, #9a6a3c); border-radius: 5px; color: #fff; }
.decor.k-kitchen { background: repeating-linear-gradient(45deg, var(--soft) 0 6px, var(--card) 6px 12px); border: 1.5px solid var(--muted); border-radius: 4px; color: var(--ink); }
.decor.k-wc { background: color-mix(in srgb, var(--info) 14%, var(--card)); border: 1.5px solid var(--info); border-radius: 4px; color: var(--info); }
.decor.k-pillar { background: var(--muted); border-radius: 2px; }
.decor.k-label { color: var(--ink); font-size: clamp(11px, 1.6vw, .95rem); }
/* im Editor anfassbar */
.fp-deco { pointer-events: auto; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; overflow: visible; }
.fp-deco.k-label { outline: 1px dashed var(--line); }
.fp-deco.sel { outline: 2px solid var(--accent); outline-offset: 2px; z-index: 1; }
.fp-deco.dragging { cursor: grabbing; opacity: .85; }
.fp-tbl { z-index: 1; }
.fp-handle { position: absolute; right: -11px; bottom: -11px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid var(--card);
  box-shadow: 0 1px 4px rgb(0 0 0 / .3); cursor: nwse-resize; touch-action: none; z-index: 4; }
.fp-handle::before { content: ""; position: absolute; inset: -10px; }   /* größere Tippfläche */
.fp-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.fp-tabs .chip { flex: 1; justify-content: center; }
.fp-tpl-deco { display: grid; place-items: center; width: 56px; height: 36px; }
.fp-tpl-deco .decor { position: static; width: 44px; height: 22px; }
.fp-tpl-deco .decor.k-wall { height: 6px; } .fp-tpl-deco .decor.k-window { height: 6px; }
.fp-tpl-deco .decor.k-plant, .fp-tpl-deco .decor.k-pillar, .fp-tpl-deco .decor.k-door, .fp-tpl-deco .decor.k-wc { width: 26px; height: 26px; }
.fp-tpl-deco .decor.k-stairs { width: 24px; height: 34px; }
.fp-tpl-deco .decor.k-label::before { content: "Aa"; font-size: 1rem; }
.fp-ghost .decor { position: static; }
.fp-hint { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.fp-roomsize { display: inline-flex; align-items: center; gap: 5px; }
.fp-size { min-width: 92px; text-align: center; font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fp-tip { flex-basis: 100%; }
.fp-size-prev { margin: 12px auto 0; width: min(100%, 320px); max-height: 220px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 6px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 16px 16px;
  font-size: .85rem; font-weight: 700; text-align: center; padding: 6px; transition: aspect-ratio .2s; }
@media (min-width: 900px) {
  .fp { display: grid; grid-template-columns: 1fr 300px; grid-template-areas: "head head" "levels levels" "stage dock" "hint dock" "foot foot"; align-items: start; }
  .fp-head { grid-area: head; } .fp-levels { grid-area: levels; } .fp-stage { grid-area: stage; } .fp-hint { grid-area: hint; }
  .fp-dock { grid-area: dock; position: sticky; top: 10px; } .fp-foot { grid-area: foot; }
  .fp-canvas { max-height: calc(100dvh - 190px); }
  @supports (max-height: 1dvh) { .fp-canvas { max-width: calc((100dvh - 190px) * var(--ar, 1.3333)); } }
  .fp-insp-row { flex-wrap: wrap; }
}

/* ---------------- Vollbild-Tischplan (Empfang) */
.host { display: flex; flex-direction: column; gap: 10px; min-height: calc(100dvh - 28px); }
.host-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.host-title { display: flex; align-items: baseline; gap: 12px; }
.host-title b { font-size: 1.3rem; }
.host-clock { font-size: 1.3rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.host-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; flex: 1; }
.hs { font-size: .95rem; white-space: nowrap; }
.hs b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.hs.free b { color: var(--ok); } .hs.soon b { color: var(--warn); } .hs.seated b { color: var(--accent); }
.host-actions { display: flex; gap: 8px; margin-left: auto; }
.host-plans { display: grid; gap: 12px; flex: 1; }
.host.multi .host-plans { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.host-area h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; }
.host-floor { position: relative; width: 100%; aspect-ratio: var(--ar, 4 / 3); max-height: calc(100dvh - 200px); margin: 0 auto; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@supports (max-height: 1dvh) { .host:not(.multi) .host-floor { max-width: calc((100dvh - 200px) * var(--ar, 1.3333)); } }
.host-tbl { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 2px;
  border: 3px solid var(--ok); background: var(--ok-soft); border-radius: 12px; cursor: pointer; overflow: hidden; color: var(--ink); }
.host-tbl.round { border-radius: 50%; }
.host-tbl b { font-size: clamp(.9rem, 2.4vw, 1.6rem); line-height: 1; }
.host-tbl small { font-size: clamp(.7rem, 1.3vw, .9rem); font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-tbl.k-soon, .host-tbl.k-due { border-color: var(--warn); background: var(--warn-soft); }
.host-tbl.k-late { border-color: var(--err); background: var(--err-soft); }
.host-tbl.k-seated { border-color: var(--accent); background: var(--accent); color: #fff; }
.host-tbl.overdue { border-color: var(--err); background: var(--err); color: #fff; }
.host-tbl.k-blocked { border-style: dashed; border-color: var(--muted); background: var(--soft); color: var(--muted); }
.host-legend { justify-content: center; }
@media (max-width: 600px) { .host-actions { margin-left: 0; width: 100%; } .host-actions .btn { flex: 1; } }

/* Kundenbindung & Newsletter */
.loyal-row { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.loyal-pts { font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.loyal-bar { height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.loyal-bar span { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .3s ease-out; }
.seg-count { margin-top: 10px; padding: 10px 12px; background: var(--soft); border-radius: 10px; }

/* Tagesnotiz, Online-Pause, Servicekräfte */
.live-head { display: flex; gap: 8px; align-items: stretch; margin-bottom: 10px; }
.live-head .daynote { flex: 1; min-width: 0; margin: 0; }
.live-head > .btn { height: auto; min-height: 42px; white-space: normal; text-align: center; max-width: 120px; color: var(--ok); }
.btn.paused { background: var(--warn-soft); border-color: var(--warn); color: var(--warn) !important; }
.daynote { display: flex; gap: 8px; align-items: flex-start; background: #fff6d6; border: 1px solid #ecd892; color: #3d3200; border-radius: 12px; padding: 9px 12px; margin: 0 0 10px; cursor: pointer; font-size: .9rem; }
.daynote.empty { background: var(--card); border-style: dashed; border-color: var(--line); color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .daynote:not(.empty) { background: #3a3215; border-color: #5c4f1f; color: #f5e7b0; } }
.server-bar { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 10px 0 0; font-size: .82rem; font-weight: 600; }
.srv { display: inline-flex; align-items: center; gap: 5px; }
.srv i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.srv-dot { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 3px; border-radius: 9px; color: #fff; font-style: normal; font-size: .7rem; font-weight: 800; margin-right: 4px; text-transform: uppercase; }
.tile .tl-phase { font-size: .74rem; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.sec-t { border: 2px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 4px; font-weight: 800; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.sec-t small { font-weight: 600; font-size: .65rem; opacity: .85; }
.st-info { background: var(--info-soft); color: var(--info); }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer; outline-offset: 2px; }
.history .hist-row { padding: 6px 0; border-top: 1px solid var(--line); }
details.card summary::marker { color: var(--muted); }

/* Walk-in: freie Tische */
.free-list { display: grid; gap: 6px; }
.free-opt { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; text-align: left; border: 2px solid var(--line); background: var(--card); border-radius: 11px; padding: 10px 12px; cursor: pointer; }
.free-opt span { color: var(--muted); font-size: .85rem; }
.free-opt .until { text-align: right; color: var(--ok); font-weight: 600; }
.free-opt.short .until { color: var(--warn); }
.free-opt.sel { border-color: var(--ok); background: var(--ok-soft); }

/* Zeitleiste */
.tlx { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.tlx-inner { position: relative; }
.tlx-row { position: relative; height: 40px; border-top: 1px solid var(--line); background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: 84px 100%; background-position: 64px 0; cursor: cell; }
.tlx-hours { height: 26px; border-top: 0; background: none; cursor: default; }
.tlx-hour { position: absolute; top: 5px; font-size: .72rem; color: var(--muted); font-weight: 600; transform: translateX(3px); }
.tlx-label { position: sticky; left: 0; z-index: 2; width: 64px; height: 100%; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; padding-left: 8px; }
.tlx-label b { font-size: .9rem; line-height: 1.1; } .tlx-label small { font-size: .7rem; color: var(--muted); }
.tlx-area { position: relative; height: 22px; background: var(--soft); border-top: 1px solid var(--line); }
.tlx-area span { position: sticky; left: 8px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); line-height: 22px; }
.tlx-block { position: absolute; top: 4px; bottom: 4px; border-radius: 7px; padding: 0 6px; font-size: .75rem; line-height: 32px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-left: 4px solid; }
.tlx-block b { font-weight: 800; }
.b-confirmed { background: var(--info-soft); border-color: var(--info); color: var(--ink); }
.b-pending { background: var(--warn-soft); border-color: var(--warn); color: var(--ink); }
.b-seated { background: var(--accent); border-color: color-mix(in srgb, var(--accent) 70%, #000); color: #fff; }
.b-finished { background: var(--soft); border-color: var(--line); color: var(--muted); }
.b-no_show { background: var(--err-soft); border-color: var(--err); color: var(--err); text-decoration: line-through; }
.b-blocked { background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 5px, var(--card) 5px, var(--card) 10px); border-color: var(--muted); color: var(--muted); }
.tlx-block.clash { background-image: repeating-linear-gradient(45deg, color-mix(in srgb, var(--err) 35%, transparent) 0 5px, transparent 5px 10px); border-color: var(--err); }
.tile.k-blocked { background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 6px, var(--card) 6px, var(--card) 12px); border-style: dashed; color: var(--muted); }
.tbl.k-blocked { border-style: dashed; border-color: var(--muted); background: var(--soft); color: var(--muted); }
.tlx-block.overdue { background: var(--err); border-color: color-mix(in srgb, var(--err) 70%, #000); }
.tlx-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--err); z-index: 3; pointer-events: none; }
.tlx-now::before { content: ""; position: absolute; top: 0; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--err); }

/* Woche (Heatmap Stunden × Tage) */
.wk { display: grid; grid-template-columns: 30px repeat(7, 1fr); gap: 3px; }
.wk-corner { }
.wk-day { border: 0; background: none; cursor: pointer; padding: 4px 0 6px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.wk-day small { font-size: .68rem; color: var(--muted); text-transform: uppercase; }
.wk-day b { font-size: 1.05rem; }
.wk-day > span { font-size: .7rem; color: var(--muted); }
.wk-day .occ { border-radius: 6px; padding: 0 5px; font-weight: 700; font-size: .66rem; }
.wk-day.today small { color: var(--accent); font-weight: 800; }
.wk-day.today b { color: var(--accent); }
/* gewählter Tag: dunkle Kopfzeile + Rahmen um die ganze Spalte */
.wk-day.sel { background: var(--ink); }
.wk-day.sel small, .wk-day.sel b, .wk-day.sel > span { color: var(--bg); }
.wk-cell.col-sel { box-shadow: inset 2px 0 0 var(--ink), inset -2px 0 0 var(--ink); }
.wk-cell.col-today { box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
.wk-hour { font-size: .7rem; color: var(--muted); text-align: right; padding-right: 4px; line-height: 30px; font-variant-numeric: tabular-nums; }
.wk-cell { height: 30px; border: 0; border-radius: 6px; font-size: .78rem; font-weight: 700; cursor: pointer; position: relative; font-variant-numeric: tabular-nums; }
.wk-cell i { position: absolute; top: 1px; right: 3px; font-style: normal; font-size: .58rem; opacity: .8; }
.wk-cell.closed, .mo-cell.closed, .yr-day.closed { background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 3px, var(--card) 3px, var(--card) 6px); }

/* Monat */
.mo { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mo-wd { text-align: center; font-size: .7rem; font-weight: 700; color: var(--muted); padding: 2px 0 4px; }
.mo-cell { border: 1px solid var(--line); background: var(--card); border-radius: 9px; min-height: 76px; padding: 4px 5px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; overflow: hidden; }
.mo-cell.empty { border: 0; background: none; cursor: default; }
/* Zellen tragen die Heatmap-Farbe; Text erbt die kontraststarke Schriftfarbe aus occStyle() */
.mo-cell:not(.empty):not(.closed) { border-color: transparent; }
.mo-cell .d { font-size: .75rem; font-weight: 700; opacity: .8; }
.mo-cell b { font-size: 1.1rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mo-cell .small { font-size: .74rem; opacity: .85; }
.mo-cell .pend { font-size: .68rem; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.mo-cell .occ-pct { margin-top: auto; font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; opacity: .85; }
.today-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; background: var(--ink); color: var(--bg); border-radius: 11px; padding: 0 5px; font-weight: 800; }
.mo-cell .d:has(.today-badge) { opacity: 1; }
/* gewählter Tag: doppelter Ring (hell + dunkel) – auf jeder Heatmap-Farbe sichtbar */
.mo-cell.sel, .yr-day.sel { box-shadow: 0 0 0 2px var(--card), 0 0 0 4.5px var(--ink); position: relative; z-index: 1; }
.mo-cell.today:not(.sel) { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
@media (max-width: 480px) { .mo-cell { min-height: 62px; padding: 3px; } .mo-cell b { font-size: .95rem; } .mo-cell .small, .mo-cell .occ-pct { display: none; } }

/* Jahr */
.yr { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.yr-month { padding: 10px; scroll-margin-top: 84px; }
.yr-title { display: flex; justify-content: space-between; align-items: baseline; width: 100%; border: 0; background: none; padding: 0 0 6px; cursor: pointer; }
.yr-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.yr-wd { font-size: .7rem; color: var(--muted); text-align: center; }
.yr-day { aspect-ratio: 1; border: 0; border-radius: 4px; font-size: .72rem; cursor: pointer; padding: 0; font-variant-numeric: tabular-nums; }
.yr-day.today { font-weight: 900; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.yr-day.today:not(.sel) { box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3.5px var(--accent); position: relative; z-index: 1; }
.yr-month.sel { outline: 2.5px solid var(--ink); outline-offset: -1px; }
.yr-month.now .yr-title b::after { content: " · jetzt"; color: var(--accent); font-size: .8em; }

/* Farblegende Auslastung (stufenloser Verlauf) */
.occ-legend { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: 10px; }
.occ-legend-title { font-weight: 700; color: var(--ink); }
.occ-legend-scale { flex: 1 1 180px; min-width: 160px; max-width: 420px; }
.occ-legend-bar { height: 14px; border-radius: 7px; border: 1px solid var(--line); }
.occ-legend-ticks { display: flex; justify-content: space-between; margin-top: 2px; font-variant-numeric: tabular-nums; }
.occ-legend-closed { display: inline-flex; align-items: center; gap: 5px; }
.occ-legend-closed i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line);
  background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 3px, var(--card) 3px, var(--card) 6px); }
/* „Heute / Diese Woche …" in der Datumsleiste */
.now-badge { display: inline-block; margin-left: 6px; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .72rem; font-weight: 800; vertical-align: 1px; white-space: nowrap; }
@media (max-width: 600px) { .yr { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; } .yr-month { padding: 6px; } }
@media (max-width: 400px) { .yr { grid-template-columns: 1fr; } .yr-day { aspect-ratio: auto; height: 34px; font-size: .8rem; } }

/* Tischplan */
.floor { position: relative; width: 100%; aspect-ratio: 4 / 3; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 20px 20px; touch-action: pan-y; }
.floor.editing { touch-action: none; outline: 2px dashed var(--accent); }
.tbl { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; border: 2px solid var(--ok); background: var(--ok-soft); font-weight: 800; font-size: .85rem; text-align: center; line-height: 1.1; cursor: pointer; user-select: none; padding: 2px; overflow: hidden; }
.tbl.round { border-radius: 50%; }
.tbl small { font-weight: 600; font-size: .7rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl.k-due { border-color: var(--info); background: var(--info-soft); }
.tbl.k-soon { border-color: var(--warn); background: var(--warn-soft); }
.tbl.k-late { border-color: var(--err); background: var(--err-soft); }
.tbl.k-seated { border-color: var(--accent); background: var(--accent); color: #fff; }
.tbl.overdue { background: var(--err); border-color: var(--err); color: #fff; }
.tbl.offline { border-style: dashed; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; border: 2px solid; }

/* Slots im Formular */
.slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.slotgrid button { height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.slotgrid button.full { opacity: .35; text-decoration: line-through; }
.slotgrid button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Toast */
#toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 12px); transform: translate(-50%, -150%); z-index: 90; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .25s; max-width: calc(100vw - 32px); }
#toast.show { transform: translate(-50%, 0); }
#offline { position: fixed; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 8px); left: 50%; transform: translateX(-50%); background: var(--warn); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; z-index: 40; }

/* Login */
.login { max-width: 380px; margin: 12vh auto 0; padding: 0 16px; }
.login h1 { font-size: 1.8rem; margin-bottom: 4px; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.brand svg { width: 40px; height: 40px; color: var(--accent); }

/* Statistik */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 10px; }
.bars div { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
@media (hover: hover) and (pointer: fine) { .bars div:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: .7rem; padding: 3px 6px; border-radius: 5px; white-space: nowrap; margin-bottom: 4px; } }
.hbar { display: grid; grid-template-columns: 90px 1fr 44px; gap: 8px; align-items: center; font-size: .85rem; margin: 6px 0; }
.hbar .track { background: var(--soft); border-radius: 4px; height: 10px; overflow: hidden; }
.hbar .track span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
code.snippet { display: block; background: var(--soft); border-radius: 10px; padding: 10px; font-size: .78rem; word-break: break-all; white-space: pre-wrap; }
.qr { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; }
