/* Lions Dienstplan – App-Stil
   Farben aus dem Lions-Auftritt: Blau #00338D (einzige Akzentfarbe, nur auf kleinen Marken),
   seine hellen Stufen für Flächen, Lions-Gold nur als heller Zeitbalken wie in der Papiervorlage.
   Raster: Sidebar 232 + Inhalt mit 29px Rand; Tagesspalten teilen die Breite gleichmäßig (repeat(n, 1fr)) mit 16px Abstand. */

@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap; src: url(fonts/source-sans-3-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap; src: url(fonts/source-sans-3-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-weight: 700; font-display: swap; src: url(fonts/source-sans-3-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap; src: url(fonts/source-sans-3-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap; src: url(fonts/source-sans-3-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-weight: 700; font-display: swap; src: url(fonts/source-sans-3-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ground: #f5f7fb;  --surface: #ffffff;  --raised: #f8f9fc;
  --border: #e2e6ee;  --rule: #edf0f5;     --control: #cdd4df;
  --text: #09101d;    --muted: #55565a;    --faint: #686b73;

  --accent: #00338d;          /* Lions-Blau */
  --accent-ink: #002766;
  --accent-50: #f0f4fb;
  --accent-100: #e1e9f7;
  --accent-200: #c3d3ee;
  --gold: #f9c910;            /* Lions-Gold, nur in der PDF als voller Balken */
  --gold-50: #fef8dc;
  --gold-200: #f5e08a;

  --positive: #1f6f45;  --pill-positive-bg: #dcf5e6;  --pill-positive-ink: #0b3b22;
  --negative: #b4232a;  --pill-negative-bg: #fdecea;  --pill-negative-ink: #7c1a1f;
  --pill-warning-bg: #fffbeb; --pill-warning-ink: #8a3c0c;

  --radius-card: 10px; --radius-control: 8px; --radius-chip: 999px;
  --gap: 16px; --card-pad: 20px; --pad: 29px;
  --side-w: 232px; --top-h: 64px;
  --font: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --fs-title: 26px; --fs-section: 17px; --fs-kpi: 24px; --fs-lead: 34px; --fs-body: 15px; --fs-small: 13px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 var(--fs-body)/1.5 var(--font); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-section); font-weight: 600; }
p { margin: 0; }
code { font-size: 0.92em; background: var(--raised); padding: 1px 5px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-200); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- Buttons & Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: var(--radius-control); border: 1px solid transparent; font: 600 15px/1 var(--font); cursor: pointer;
  white-space: nowrap; text-decoration: none; transition: background-color .12s, border-color .12s, transform .08s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--control); }
.btn-secondary:hover { background: var(--accent-50); border-color: var(--accent-200); }
.btn-danger { background: var(--surface); color: var(--negative); border-color: #e7b8bb; }
.btn-danger:hover { background: var(--pill-negative-bg); }
.btn-wide { width: 100%; height: 44px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-text { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 8px; margin: 0;
  font: 600 14px/1.2 var(--font); color: var(--accent); cursor: pointer; border-radius: 6px; white-space: nowrap; }
.btn-text:hover { background: var(--accent-50); }
.btn-text.danger { color: var(--negative); }
.btn-text.danger:hover { background: var(--pill-negative-bg); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; border-radius: 8px; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--accent-50); }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 600; font-size: 14px; padding: 0; }
.field small { color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]), select, textarea {
  width: 100%; height: 40px; padding: 0 12px; font: 400 15px/1.4 var(--font); color: var(--text);
  background: var(--surface); border: 1px solid var(--control); border-radius: var(--radius-control); }
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-200); border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
/* Gesperrte Felder sichtbar machen (z. B. Name aus der Lions-Verwaltung) */
input:read-only:not([type=radio]):not([type=checkbox]), select:disabled, textarea:read-only {
  background: var(--raised); color: var(--muted); border-style: dashed; cursor: not-allowed; }
input:read-only:focus, textarea:read-only:focus { outline: none; border-color: var(--control); }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input, .radio input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.input-suffix { display: flex; align-items: center; gap: 8px; }
.input-suffix input { max-width: 120px; }
.input-suffix em { font-style: normal; color: var(--muted); }
.joined { display: flex; }
.joined input { border-top-right-radius: 0; border-bottom-right-radius: 0; font-size: 14px; }
.joined .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; height: 40px; }

.notice { padding: 12px 16px; border-radius: var(--radius-control); font-size: 15px; margin-bottom: 20px;
  background: var(--accent-50); border: 1px solid var(--accent-100); color: var(--accent-ink); }
.notice-error { background: var(--pill-negative-bg); border-color: #f3c6c9; color: var(--pill-negative-ink); }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--radius-chip);
  font-size: 13px; font-weight: 600; background: var(--rule); color: var(--muted); white-space: nowrap; flex: none; }
.pill-accent { background: var(--accent-100); color: var(--accent-ink); }
.pill-warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }

/* ---------------------------------------------------------------- Rahmen (Ruled T-frame) */
.app .side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--ground); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 14px 12px 16px; z-index: 30; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 6px 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand span { display: grid; line-height: 1.2; min-width: 0; }
.brand strong { font-size: 17px; font-weight: 700; color: var(--accent); }
.brand small { font-size: 13px; color: var(--muted); }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav a.is-active { background: var(--accent-100); color: var(--accent-ink); }
.nav a.is-active .ic { color: var(--accent); }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.me { display: flex; gap: 10px; align-items: center; padding: 4px 6px; }
.me-text { display: grid; line-height: 1.25; min-width: 0; }
.me-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { font-size: 13px; color: var(--muted); }
.side-foot .btn-text { color: var(--muted); width: 100%; justify-content: flex-start; height: 36px; padding: 0 8px; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--accent-100); color: var(--accent-ink); font-size: 12px; font-weight: 700; }

.top { position: sticky; top: 0; z-index: 20; height: var(--top-h); margin-left: var(--side-w); background: var(--ground);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 var(--pad); }
.top-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.top-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-club { align-self: stretch; display: flex; align-items: center; padding-left: 20px; border-left: 1px solid var(--border); color: var(--muted); font-size: 14px; white-space: nowrap; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.crumb:hover { color: var(--text); text-decoration: none; }
.crumb-sep { color: var(--control); }
.menu-btn, .top-mark, .scrim { display: none; }
.live { display: inline-flex; align-items: center; gap: 7px; margin-left: 8px; height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--muted); white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); }
.live.is-stale .live-dot { background: #b7791f; }
.live.is-pulse .live-dot { animation: pulse 1s ease-out 1; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31,111,69,.5); } 100% { box-shadow: 0 0 0 8px rgba(31,111,69,0); } }

.canvas { margin-left: var(--side-w); padding: 28px var(--pad) 64px; max-width: calc(var(--side-w) + 1400px); }

/* ---------------------------------------------------------------- Titelzeilen */
.title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.title-row .sub { margin-top: 6px; color: var(--muted); font-size: 16px; }
.title-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); margin-bottom: 24px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; padding: 16px var(--card-pad) 12px; }
.empty { padding: 20px var(--card-pad) 24px; color: var(--muted); }

/* Zählkarten als Filter */
.count-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 8px; margin-bottom: 16px; }
.count-card { display: grid; gap: 2px; padding: 10px 14px; height: 64px; border-radius: var(--radius-card); background: var(--surface);
  border: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.count-card strong { color: var(--text); font-size: 18px; font-weight: 600; }
.count-card:hover { text-decoration: none; border-color: var(--accent-200); }
.count-card.is-selected { border: 1.5px solid var(--accent); background: var(--accent-50); color: var(--accent-ink); }

/* Übersicht: Veranstaltungen links, eigene Einsätze rechts */
.home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.home-grid .panel { margin-bottom: 0; }
.mine-list { list-style: none; margin: 0; padding: 0 0 6px; }
.mine-list a { display: grid; gap: 2px; padding: 12px var(--card-pad); border-top: 1px solid var(--rule); color: var(--text); }
.mine-list a:hover { background: var(--accent-50); text-decoration: none; }
.mine-list strong { font-weight: 600; }
.mine-list small { color: var(--muted); font-size: 14px; }

/* Liste der Veranstaltungen */
.event-list { list-style: none; margin: 0; padding: 0 0 6px; }
.event-row { display: grid; grid-template-columns: 64px minmax(0, 1.4fr) minmax(170px, 1fr) minmax(150px, .8fr) 20px; gap: 20px;
  align-items: center; padding: 14px var(--card-pad); border-top: 1px solid var(--rule); color: var(--text); }
.event-row:hover { background: var(--accent-50); text-decoration: none; }
.ev-main { display: grid; min-width: 0; }
.ev-main strong { font-size: 17px; font-weight: 600; }
.ev-main small { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-fill { display: grid; gap: 6px; }
.ev-fill-num { font-weight: 600; }
.ev-mine { font-size: 14px; }
.ev-go { color: var(--faint); }
.track { display: block; height: 6px; border-radius: 999px; background: var(--accent-100); overflow: hidden; }
.track > span { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: 999px; transition: width .4s ease; }

.tile { display: grid; place-items: center; align-content: center; width: 64px; height: 64px; border-radius: 10px;
  background: var(--accent-50); color: var(--accent-ink); text-align: center; line-height: 1.1; flex: none; }
.tile b { font-size: 19px; font-weight: 700; }
.tile i { font-style: normal; font-size: 12px; color: var(--muted); }
.tile-empty { color: var(--faint); }

/* ---------------------------------------------------------------- Dienstplan: Kopf */
.object-head { display: flex; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 14px; margin-bottom: 16px; }
.object-head .tile { width: 68px; height: 76px; }
.object-main { min-width: 0; flex: 1; }
.object-main h1 { font-size: 26px; }
.meta { color: var(--muted); font-size: 15px; margin-top: 4px; }
.object-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.kpis { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); margin-bottom: 12px; }
.kpi { padding: 14px var(--card-pad); display: grid; gap: 4px; align-content: start; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--border); }
.kpi-label { font-size: 14px; color: var(--muted); }
.kpi-value { font-size: var(--fs-kpi); font-weight: 600; line-height: 1.15; }
.kpi-value small { font-size: 15px; font-weight: 400; color: var(--muted); }
.kpi-lead .kpi-value { font-size: var(--fs-lead); font-weight: 700; color: var(--text); }
.kpi-lead .track { margin-top: 6px; height: 8px; }
.kpi-note { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finding { font-size: 16px; margin: 0 0 20px; color: var(--text); }
.finding strong { font-weight: 600; }
.finding a { font-weight: 600; }

.mode-bar { position: sticky; top: calc(var(--top-h) + 8px); z-index: 15; display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 10px 10px 10px 16px; margin-bottom: 16px; border-radius: var(--radius-card); background: var(--accent); color: #fff; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 35, 100, .18); }
.mode-bar .btn { height: 34px; background: #fff; color: var(--accent-ink); }

/* ---------------------------------------------------------------- Dienstplan: Raster */
.day-tabs { display: none; }
.plan { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; align-items: start; margin-bottom: 28px; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px 2px; }
.day-head h2 { font-size: 19px; font-weight: 700; }
.day-head h2 span { font-weight: 400; color: var(--muted); }
.day-fill { font-size: 14px; color: var(--muted); white-space: nowrap; }
.day-track { grid-column: auto; height: 4px; margin-top: -6px; }

.block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; display: flex; flex-direction: column; }
.block { container-type: inline-size; }
@container (max-width: 380px) { .place.is-mine .place-actions .lbl { display: none; } .place.is-mine .place-actions .btn-text { padding: 6px 8px; } }
@container (max-width: 300px) { .place-actions .lbl { display: none; } }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 8px 14px;
  background: var(--gold-50); border-bottom: 1px solid var(--gold-200); }
.block-head h3 { font-size: 17px; font-weight: 700; }
.block.is-category .block-head { background: var(--raised); border-bottom-color: var(--border); }
.block-count { font-size: 14px; color: var(--muted); white-space: nowrap; font-weight: 600; }
.block-count.is-full { color: var(--positive); }
.block-note { padding: 8px 14px 0; font-size: 14px; color: var(--muted); }
.line-label { padding: 10px 14px 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.places { list-style: none; margin: 0; padding: 4px 6px 8px; }
.place { display: flex; align-items: center; gap: 6px; min-height: 40px; border-radius: 8px; padding: 0 4px 0 8px; position: relative; }
.place + .place { border-top: 1px solid var(--rule); }
.place-no { width: 22px; flex: none; color: var(--faint); font-size: 14px; }
.place-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place.is-mine { background: var(--accent-50); border-top-color: transparent; }
.place.is-mine + .place { border-top-color: transparent; }
.place.is-mine .place-name { color: var(--accent-ink); }
.place.is-mine .place-no { color: var(--accent); font-weight: 700; }
.place-actions { display: flex; gap: 0; flex: none; }
@media (hover: hover) {
  .is-admin .place-actions { opacity: 0; transition: opacity .12s; }
  .is-admin .place:hover .place-actions, .is-admin .place:focus-within .place-actions, .is-admin .chip-wrap:hover .place-actions { opacity: 1; }
}
.place-actions .btn-text { padding: 5px 7px; font-size: 13px; }
.place-empty { flex: 1; display: flex; align-items: center; gap: 6px; height: 36px; margin: 0; padding: 0 8px; border: 1px dashed transparent;
  border-radius: 6px; background: none; font: 600 14px/1 var(--font); color: var(--faint); cursor: pointer; text-align: left; }
.place-empty .ic { opacity: 0; }
.place-empty:hover, .place-empty:focus-visible { color: var(--accent); border-color: var(--accent-200); background: var(--accent-50); }
.place-empty:hover .ic, .place-empty.is-first .ic { opacity: 1; }
.place-empty.is-first { color: var(--accent); }
.place-empty[disabled] { cursor: default; color: var(--faint); }
.place-empty[disabled]:hover { background: none; border-color: transparent; }
.is-moving .place-empty { border-color: var(--accent-200); color: var(--accent); background: var(--accent-50); }
.is-moving .place-empty .ic { opacity: 1; }
.place.is-source { outline: 2px solid var(--accent); outline-offset: -2px; }
.place.is-new { animation: arrive 1.6s ease-out 1; }
@keyframes arrive { 0% { background: var(--gold-200); } 100% { background: transparent; } }
.place.is-mine.is-new { animation-name: arrive-mine; }
@keyframes arrive-mine { 0% { background: var(--gold-200); } 100% { background: var(--accent-50); } }

.extras-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.extras-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; align-items: start; }
.notes { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px var(--card-pad); margin-bottom: 20px; white-space: pre-line; }
.notes:empty { display: none; }
.stand { font-size: 13px; color: var(--muted); }

/* Kompakte Kategorien (z. B. Gläserlogistik): eine Zeile je Tag, Namen als Chips */
.clines { list-style: none; margin: 0; padding: 4px 6px 8px; }
.cline { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: center; min-height: 44px; padding: 4px 4px 4px 8px; }
.cline + .cline { border-top: 1px solid var(--rule); }
.cline-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); font: 600 14px/1 var(--font); color: var(--text); cursor: pointer; max-width: 100%; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { border-color: var(--accent-200); background: var(--accent-50); }
.chip.is-mine { background: var(--accent-50); border-color: var(--accent-200); color: var(--accent-ink); }
.chip.is-static { cursor: default; background: var(--raised); border-color: transparent; }
.chip.is-static:hover { background: var(--raised); border-color: transparent; }
.chip.is-new { animation: arrive 1.6s ease-out 1; }
.chip.is-source { outline: 2px solid var(--accent); outline-offset: 1px; }
.chip-free { border-style: dashed; color: var(--faint); font-weight: 600; }
.chip-free.is-first, .is-moving .chip-free { color: var(--accent); border-color: var(--accent-200); }
.chip-free[disabled] { cursor: default; color: var(--faint); background: none; border-color: var(--border); }

/* ---------------------------------------------------------------- Tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-weight: 400; font-size: 13px; color: var(--muted); padding: 12px 12px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 12px; border-top: 1px solid var(--rule); vertical-align: middle; }
.table tr:first-child td { border-top: 0; }
.table th:first-child, .table td:first-child { padding-left: var(--card-pad); }
.table th:last-child, .table td:last-child { padding-right: var(--card-pad); }
.table .num { text-align: right; }
.table tr.is-off td { color: var(--faint); }
.person { display: inline-flex; align-items: center; gap: 10px; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.btn-text.icon-only { padding: 6px; min-width: 32px; justify-content: center; }
.row-actions form { display: inline-flex; gap: 2px; margin: 0; }
.link-panel { padding: 16px var(--card-pad) 20px; display: grid; gap: 10px; }
.person-text { display: grid; line-height: 1.3; }
.role-cell { display: inline-grid; gap: 2px; justify-items: start; }
.role-cell small { color: var(--muted); font-size: 12px; }
.person-text small { color: var(--muted); font-size: 13px; }
.claims { border-color: var(--accent-200); }
.claim-list { list-style: none; margin: 0; padding: 0 0 6px; }
.claim-list li { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 12px var(--card-pad); border-top: 1px solid var(--rule); flex-wrap: wrap; }
.claim-text { display: grid; gap: 2px; min-width: 0; }
.claim-text strong { font-weight: 600; overflow-wrap: anywhere; }
.claim-text small { color: var(--muted); font-size: 13px; }
.claim-actions { display: flex; gap: 8px; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 16px; margin: 0 0 12px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.title-actions form { display: contents; }
.auth-panel .choice-list { display: grid; gap: 8px; }

/* ---------------------------------------------------------------- Einstellungen (zweispaltig) */
.settings-row { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--border); }
.settings-label { display: grid; gap: 8px; align-content: start; padding-top: 8px; }
.settings-label p { color: var(--muted); font-size: 15px; }
.settings-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.danger h2 { color: var(--negative); }

/* ---------------------------------------------------------------- Dialoge & Meldungen */
.dialog { width: min(520px, calc(100vw - 32px)); border: 0; border-radius: 14px; padding: 24px; color: var(--text);
  box-shadow: 0 20px 60px rgba(9, 16, 29, .25); }
.dialog::backdrop { background: rgba(9, 16, 29, .45); }
.dialog h2 { font-size: 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.dialog .choice-list { display: grid; gap: 8px; }
.dialog .choice-list .btn { justify-content: flex-start; height: 44px; }
.copy-opts { display: grid; gap: 12px; padding: 4px 0 0 26px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px);
  background: var(--text); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; box-shadow: 0 10px 30px rgba(9,16,29,.3); }
.toast.is-error { background: var(--negative); }

/* ---------------------------------------------------------------- Anmeldung */
.auth { background: var(--ground); }
.auth-wrap { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 24px; padding: 40px 16px; }
.auth-brand { display: flex; align-items: center; gap: 16px; }
.auth-brand div { display: grid; line-height: 1.2; }
.auth-brand strong { font-size: 28px; font-weight: 700; color: var(--accent); }
.auth-brand span { color: var(--muted); font-size: 16px; }
.auth-panel { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; display: grid; gap: 16px; }
.auth-panel .lead { color: var(--muted); font-size: 16px; }
.auth-foot { color: var(--muted); font-size: 14px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------------------------------------------------------------- Rechtliches & Fußzeile */
.site-footer { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.site-footer__links { display: flex; gap: 14px; }
.site-footer__links a { color: var(--muted); }
.site-footer__links a:hover { color: var(--text); }
.site-footer__agency { display: inline-flex; opacity: .85; transition: opacity .15s; }
.site-footer__agency:hover, .site-footer__agency:focus-visible { opacity: 1; }
.site-footer__agency img { height: 16px; width: auto; filter: grayscale(1) contrast(1.4); transition: filter .15s; }
.site-footer__agency:hover img, .site-footer__agency:focus-visible img { filter: none; }
.auth-legal { justify-content: center; flex-wrap: wrap; }
.side-legal { justify-content: space-between; padding: 6px 8px 0; }
.side-legal .site-footer__links { gap: 10px; }
.side-legal .site-footer__agency img { height: 13px; }

.legal-wrap { align-content: start; padding-top: 32px; }
.legal-top { width: min(760px, 100%); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.legal-top .auth-brand { color: var(--text); text-decoration: none; }
.legal-top .auth-brand strong { font-size: 22px; }
.legal-panel { width: min(760px, 100%); gap: 0; padding: 32px; }
.legal-panel h1 { margin-bottom: 8px; }
.legal-panel .lead { margin-bottom: 8px; }
.legal-section { padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--rule); display: grid; gap: 10px; }
.legal-section h2 { font-size: 19px; }
.legal-section h3 { font-size: 16px; margin-top: 6px; }
.legal-section p, .legal-section li { line-height: 1.6; overflow-wrap: anywhere; }
.legal-section ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.legal-source { font-size: 14px; color: var(--muted); }
.legal-imprint { display: grid; gap: 10px; }
.legal-imprint h3 { font-size: 16px; margin-top: 8px; }

/* ---------------------------------------------------------------- Struktur-Editor */
.editor { display: grid; gap: 24px; margin-bottom: 32px; }
.editor > * { min-width: 0; }
.ed-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 18px var(--card-pad) 20px; }
.ed-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ed-grid4 { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 16px; }
.ed-cols { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(260px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 4px; }
.ed-col { background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px; display: grid; gap: 10px; align-content: start; }
.ed-col-head { display: grid; gap: 8px; }
.ed-row { display: flex; gap: 6px; align-items: center; }
.ed-row > :first-child { flex: 1; min-width: 0; }
.ed-block { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.ed-block-head { display: flex; gap: 6px; align-items: center; padding: 8px; background: var(--gold-50); border-bottom: 1px solid var(--gold-200); }
.ed-block.is-category .ed-block-head { background: var(--raised); border-bottom-color: var(--border); }
.ed-block-head input { height: 34px; font-weight: 600; }
.ed-block-body { padding: 8px; display: grid; gap: 6px; }
.ed-line { display: grid; grid-template-columns: minmax(0, 1fr) 76px 32px; gap: 6px; align-items: center; }
.ed-line input { height: 34px; font-size: 14px; }
.ed-line .used { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: -2px; }
.ed-mini { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; color: var(--muted); cursor: pointer; flex: none; }
.ed-mini:hover { background: var(--accent-50); color: var(--text); }
.ed-mini.danger:hover { background: var(--pill-negative-bg); color: var(--negative); }
.ed-add { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-hint { font-size: 13px; color: var(--muted); }
.ed-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.ed-section-head > div { min-width: 0; flex: 1 1 260px; }
.ed-kind { height: 34px; width: auto; font-size: 13px; padding: 0 6px; }

/* ---------------------------------------------------------------- Tablet */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--border); }
  .object-head { flex-wrap: wrap; }
  .object-actions { width: 100%; justify-content: flex-start; }
  .event-row { grid-template-columns: 64px minmax(0, 1fr) minmax(150px, .9fr) 20px; }
  .ev-mine { display: none; }
  .home-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Seitenleiste klappt ein */
@media (max-width: 960px) {
  :root { --pad: 20px; --top-h: 56px; }
  .app .side { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s .2s; width: min(300px, 86vw); background: var(--surface); }
  .app.menu-open .side { transform: none; visibility: visible; transition: transform .2s ease; box-shadow: 0 0 40px rgba(9,16,29,.2); }
  .app.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(9,16,29,.35); z-index: 25; }
  .top, .canvas { margin-left: 0; }
  .menu-btn, .top-mark { display: inline-grid; }
  .top-mark { width: 28px; height: auto; }
  .top { padding: 0 12px 0 8px; gap: 8px; }
  .top-club { display: none; }
  .settings-row { grid-template-columns: 1fr; gap: 16px; }
  .ed-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
}

/* ---------------------------------------------------------------- Telefon */
@media (max-width: 720px) {
  :root { --pad: 16px; --card-pad: 16px; --fs-title: 23px; --fs-lead: 30px; }
  .crumb span { display: none; }
  .crumb-sep { display: none; }
  .live { margin-left: auto; }
  .title-row { flex-direction: column; }
  .title-row > .btn, .title-actions { width: 100%; }
  .legal-panel { padding: 22px 18px; }
  .legal-top .btn { width: 100%; }
  .title-actions .btn { flex: 1; }
  .object-head { padding: 12px; gap: 12px; }
  .object-head .tile { width: 56px; height: 64px; }
  .object-main h1 { font-size: 22px; }
  .object-actions .btn { flex: 1 1 calc(50% - 4px); height: 44px; }
  .object-actions .btn-admin { order: 2; flex: 0 1 auto; height: 36px; border: 0; background: none; color: var(--accent); padding: 0 8px; }
  .kpis { grid-template-columns: 1.35fr 1fr 1.15fr; }
  .kpi-label { font-size: 13px; }
  .kpi { padding: 12px 14px; }
  .kpi-lead .kpi-value { font-size: 26px; }
  .kpi-value { font-size: 22px; }
  .kpi:nth-child(n) { border-top: 0; border-left: 1px solid var(--border); grid-column: auto; }
  .kpi:first-child { border-left: 0; }
  .kpi:nth-child(4) { display: none; }
  .day-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 calc(var(--pad) * -1) 14px; padding: 0 var(--pad) 2px; scrollbar-width: none; }
  .day-tab { flex: none; display: grid; gap: 0; text-align: left; padding: 8px 14px; min-height: 52px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); font: 600 15px/1.25 var(--font); color: var(--text); cursor: pointer; }
  .day-tab small { font-weight: 400; color: var(--muted); font-size: 13px; }
  .day-tab[aria-selected=true] { border: 1.5px solid var(--accent); background: var(--accent-50); color: var(--accent-ink); }
  .plan { grid-template-columns: 1fr; gap: 12px; }
  .plan > [data-col]:not(.is-active-col) { display: none; }
  .plan > * { grid-column: 1 !important; grid-row: auto !important; }
  .day-head { display: none; }
  .day-track { display: none; }
  .extras-grid { grid-template-columns: 1fr; }
  .place { min-height: 46px; }
  .place-actions .btn-text { min-width: 40px; min-height: 40px; justify-content: center; }
  .place-empty { height: 42px; }
  .count-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .event-row { grid-template-columns: 56px minmax(0, 1fr) 16px; gap: 14px; }
  .event-row .tile { width: 56px; height: 56px; }
  .ev-fill { grid-column: 2 / 3; grid-row: 2; margin-top: -6px; }
  .ev-go { grid-row: 1 / 3; grid-column: 3; }
  .ev-main small { white-space: normal; }
  .table.members thead { display: none; }
  .table.members tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 16px; border-top: 1px solid var(--rule); }
  .table.members tr:first-child { border-top: 0; }
  .table.members td { border: 0; padding: 2px 0 !important; text-align: left; }
  .table.members td:nth-child(2) { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
  .table.members td:nth-child(3) { grid-row: 1; grid-column: 2; }
  .table.members td:nth-child(4), .table.members td:nth-child(5) { display: none; }
  .table.members td.row-actions { grid-column: 1 / -1; justify-content: flex-start; margin-left: -8px; }
  .ed-grid2, .ed-grid4 { grid-template-columns: 1fr; }
  .ed-cols { grid-template-columns: 1fr; }
}

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

/* ---------------------------------------------------------------- Druck */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11pt; }
  .side, .top, .object-actions, .kpis, .finding, .mode-bar, .day-tabs, .toast, .place-actions, .notice, .skip { display: none !important; }
  .canvas { margin: 0; padding: 0; max-width: none; }
  .object-head { border: 0; padding: 0 0 8px; }
  .plan { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)) !important; gap: 6px; }
  .plan > [data-col] { display: flex !important; }
  .plan > .day-head { display: flex !important; }
  .plan > * { grid-column: var(--gc) !important; grid-row: var(--gr) !important; }
  .block { border-color: #999; break-inside: avoid; }
  .block-head { background: #f9c910 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .place-empty { color: transparent; }
  .place-empty .ic { display: none; }
  .place.is-mine { background: none; }
  .stand { display: block !important; font-size: 9pt; margin-top: 8px; color: #000; }
}
