/* Pegelschorsch Bandreisen
   Stil: weniger, aber besser. Warmes Hellgrau wie ein Gerätegehäuse, schwarze Kreise,
   große Grotesk-Ziffern, kleine Mono-Beschriftungen, weiche Kacheln und ein einziges
   Signal-Orange für „jetzt“ und „heute“. Hell und dunkel über dieselben Tokens. */

:root {
  --bg: #DCDCD6;          /* Gehäuse */
  --tile: #E9E9E4;        /* Kachel, eine Stufe heller */
  --tile-2: #D2D2CB;      /* Eingabefelder, Vertiefungen */
  --ink: #121211;         /* Schrift, Kreise */
  --ink-on: #F2F2EE;      /* Schrift auf schwarzen Kreisen */
  --muted: #6F6F69;       /* Nebentext */
  --line: #BDBDB5;        /* Linien, leere Ringe */
  --signal: #E5622B;      /* Signal-Orange */
  --signal-on: #FFFFFF;
  --plan: #6A4FA3;        /* nur Planung sichtbar */
  --bad: #B8402B;
  --r-tile: 26px;
  --r-field: 14px;
  --grotesk: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'Space Mono', 'SF Mono', ui-monospace, Menlo, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #1B1B1A;
  --tile: #272725;
  --tile-2: #323230;
  --ink: #ECECE6;
  --ink-on: #151514;
  --muted: #9A9A93;
  --line: #4A4A46;
  --signal: #F06C34;
  --signal-on: #160B05;
  --plan: #B9A2EE;
  --bad: #F08A73;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B1B1A;
    --tile: #272725;
    --tile-2: #323230;
    --ink: #ECECE6;
    --ink-on: #151514;
    --muted: #9A9A93;
    --line: #4A4A46;
    --signal: #F06C34;
    --signal-on: #160B05;
    --plan: #B9A2EE;
    --bad: #F08A73;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.45 var(--grotesk);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2 { margin: 0; font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }
p { margin: 0 0 6px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kleine Mono-Beschriftung wie auf einem Gerät */
.lbl, .block > h2, .edit legend, .facts dt, .test-logins h2 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
}

/* ---------- Rahmen ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: calc(12px + var(--safe-t)) 18px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.brand { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.brand-band { font-family: var(--mono); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; }
.brand-app { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.topbar-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.status {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
  background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: right;
  font-family: var(--mono); font-size: 11px; color: var(--muted); line-height: 1.3;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); flex: none; }
.status.is-offline .status-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--signal); }
.status.is-offline { color: var(--ink); }
.status.is-syncing .status-dot { animation: pulse .9s infinite alternate; }
.status-pending { color: var(--signal); font-weight: 700; flex-basis: 100%; }
@keyframes pulse { to { opacity: .25; } }

.main { padding: 8px 18px calc(110px + var(--safe-b)); max-width: 640px; margin: 0 auto; }

/* Navigation: schwarze Pille, aktives Feld hell eingesetzt */
.tabbar {
  position: fixed; left: 50%; bottom: calc(14px + var(--safe-b)); z-index: 10;
  transform: translateX(-50%);
  display: flex; gap: 2px; padding: 5px;
  width: min(calc(100% - 28px), 440px);
  background: var(--ink); border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.tab {
  flex: 1; text-align: center; padding: 11px 4px; border-radius: 999px;
  color: color-mix(in srgb, var(--ink-on) 72%, transparent); text-decoration: none; font-size: 15px; font-weight: 500;
  position: relative; white-space: nowrap;
}
@media (max-width: 420px) { .tab { font-size: 14px; padding: 11px 2px; } }
.tab-badge { position: absolute; top: 2px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--signal); color: var(--signal-on); font-size: 11px; line-height: 18px; font-weight: 700; opacity: 1; }
.tab.is-active { background: var(--bg); color: var(--ink); opacity: 1; }
/* Kleiner Punkt über dem Reiter: dort gibt es etwas Neues */
.tab-dot { position: absolute; top: 3px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px var(--ink); }
.tab.is-active .tab-dot { box-shadow: 0 0 0 2px var(--bg); }
.tab-dot[hidden] { display: none; }

/* ---------- Tagkopf: große Ziffer wie ein Kalenderblatt ---------- */
.day-head { margin: 4px 0 22px; }
.day-num { font-size: clamp(120px, 38vw, 168px); font-weight: 700; letter-spacing: -0.06em; line-height: .8; margin: 6px 0 14px -6px; }
.day-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; }
.day-month { font-size: 26px; line-height: 1.05; margin: 0; }
.day-month span { display: block; color: var(--muted); }
.day-wd { font-size: 26px; margin: 0; }
.day-name { font-size: clamp(28px, 7.6vw, 36px); }
.day-place { color: var(--muted); font-size: 20px; margin-top: 2px; }
.day-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.ahead { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* Status als Punkt: bestätigt = gefüllt, Option = Ring, Idee = gestrichelter Ring, abgesagt = durchgestrichen */
.state { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 13px; }
.state i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: none; }
.state-bestaetigt i { background: var(--ink); }
.state-option i { box-shadow: inset 0 0 0 1.5px var(--ink); }
.state-idee i { border: 1.5px dashed var(--muted); }
.state-abgesagt { color: var(--muted); text-decoration: line-through; }
.state-abgesagt i { background: var(--line); }
.state-type { color: var(--muted); }

/* ---------- Als Nächstes: schwarzer Kreis + Pillen-Kacheln ---------- */
.next { display: grid; grid-template-columns: 46% 1fr; gap: 12px; align-items: center; margin: 0 0 14px; }
.next-circle {
  aspect-ratio: 1; border-radius: 50%;
  background: var(--ink); color: var(--ink-on);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.next-time { font-size: clamp(38px, 11vw, 52px); font-weight: 400; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.next-in { font-family: var(--mono); font-size: 12px; margin-top: 8px; opacity: .8; }
.next-circle.is-done { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.next-pills { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pill-tile { background: var(--tile); border-radius: 999px; padding: 14px 20px; min-width: 0; }
.pill-tile strong { display: block; font-family: var(--mono); font-size: 14px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.next-pills .pill-tile:first-child strong { color: var(--signal); }

/* Punkte-Raster der Tour */
.tour-dots { background: var(--tile); border-radius: var(--r-tile); padding: 16px 18px 18px; margin-bottom: 14px; }
.tour-dots .lbl { margin-bottom: 12px; }
.dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.dot-day {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted);
  text-decoration: none; font-family: var(--mono); font-size: 12px;
}
.dot-day.is-past { background: var(--ink); color: var(--ink-on); box-shadow: none; }
.dot-day.is-current { background: var(--signal); color: var(--signal-on); box-shadow: none; font-weight: 700; }
.dot-day.is-cancelled { opacity: .35; }

/* ---------- Kacheln ---------- */
.block { background: var(--tile); border-radius: var(--r-tile); padding: 18px 20px 20px; margin-bottom: 14px; }
.block > h2 { margin-bottom: 12px; }
.block-internal > h2 { color: var(--plan); }
.big-line { font-size: 24px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; margin-bottom: 4px; }
.big-line time { font-variant-numeric: tabular-nums; }
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: transparent; border-radius: var(--r-tile); box-shadow: inset 0 0 0 1.5px var(--line);
  padding: 14px 18px; margin-bottom: 14px; font-size: 15px;
}
.notice::before { content: ''; flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--signal); }
.mine { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--signal); margin-top: 12px; }
.internal { color: var(--plan); }
.diet { color: var(--muted); font-size: 15px; margin-top: 8px; }
.empty, .empty-state p { color: var(--muted); }
.empty-state { padding: 40px 0; }
.empty-state h1 { font-size: 40px; margin-bottom: 10px; }

.schedule { list-style: none; margin: 0; padding: 0; }
.schedule li { display: grid; grid-template-columns: 16px 62px 1fr; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.schedule li:first-child { border-top: 0; }
.schedule li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; align-self: center; box-shadow: inset 0 0 0 1.5px var(--line); }
.schedule time { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.schedule li.is-past { color: var(--muted); }
.schedule li.is-past::before { background: var(--ink); box-shadow: none; opacity: .5; }
.schedule li.is-next::before { background: var(--signal); box-shadow: none; }
.schedule li.is-next time, .schedule li.is-next span { font-weight: 700; }

.vis { font-family: var(--mono); font-size: 11px; margin-left: 8px; padding: 1px 8px; border-radius: 999px; vertical-align: 2px; white-space: nowrap; }
.vis-planung { color: var(--plan); box-shadow: inset 0 0 0 1px var(--plan); }
.vis-band { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px 18px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.facts div { min-width: 0; }
.facts dt { margin-bottom: 3px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.contacts, .team, .guests, .daylist { list-style: none; margin: 0; padding: 0; }
.contacts li, .team li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.contacts li:first-child, .team li:first-child { border-top: 0; padding-top: 0; }
.contacts li > div:first-child, .team li > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.contacts span, .team span { color: var(--muted); font-size: 15px; }
.contact-actions, .team-side { display: flex; gap: 6px; flex: none; align-items: center; }
.team code { font-family: var(--mono); font-size: 13px; }
/* Team-Liste: bei wenig Platz rutschen die Knöpfe unter den Namen statt ihn zu überdecken */
.team li { flex-wrap: wrap; }
.team li > div:first-child { flex: 1 1 140px; overflow-wrap: anywhere; }
.team-side { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.team .team-side { flex: 0 1 auto; max-width: 100%; }
.rooming { margin-top: 12px; }
.rooming summary { cursor: pointer; font-family: var(--mono); font-size: 13px; }
.rooming ul { padding-left: 18px; margin: 8px 0 0; }

/* ---------- Knöpfe: Pillen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 22px; border-radius: 999px;
  border: 0; background: var(--ink); color: var(--ink-on);
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--ink-on); }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-small { min-height: 38px; padding: 6px 16px; font-size: 14px; }
.block .btn-quiet { margin-top: 14px; }
.contacts .btn-quiet, .team .btn-quiet { margin-top: 0; }
.btn-icon { width: 42px; height: 42px; border: 0; background: var(--tile-2); border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.back { display: inline-block; margin: 6px 0 10px; font-family: var(--mono); font-size: 13px; text-decoration: none; }
.back::before { content: '‹ '; }
.pager { display: flex; justify-content: space-between; margin: 4px 0 4px; font-family: var(--mono); font-size: 13px; position: relative; z-index: 2; }
.pager a { text-decoration: none; padding: 8px 0; }
.pager a:first-child::before { content: '‹ '; }
.pager a:last-child::after { content: ' ›'; }

.segmented { display: inline-flex; padding: 4px; gap: 2px; background: var(--ink); border-radius: 999px; max-width: 100%; }
.segmented button { border: 0; background: transparent; color: var(--ink-on); opacity: .72; padding: 9px 16px; border-radius: 999px; cursor: pointer; font-size: 15px; font-weight: 500; }
.segmented button.is-active { background: var(--bg); color: var(--ink); opacity: 1; }

/* ---------- Termine ---------- */
.page-title { font-size: clamp(56px, 17vw, 76px); font-weight: 700; letter-spacing: -0.05em; line-height: .9; margin: 10px 0 24px; }
.tour { margin-bottom: 30px; }
.tour-name { font-size: 26px; letter-spacing: -0.02em; }
.tour > .lbl { margin: 4px 0 10px; }
.daylist { background: var(--tile); border-radius: var(--r-tile); padding: 4px 18px; }
.daylist li + li a { border-top: 1px solid var(--line); }
.daylist li a { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; color: var(--ink); text-decoration: none; }
.daylist li.is-past a { opacity: .45; }
.dl-date { display: flex; flex-direction: column; line-height: 1; }
.dl-day { font-size: 40px; font-weight: 700; letter-spacing: -0.05em; }
.daylist li.is-today .dl-day { color: var(--signal); }
.dl-mon { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 4px; }
.dl-main { display: flex; flex-direction: column; min-width: 0; }
.dl-main strong { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.dl-main span { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-status { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.dl-status .state { font-size: 12px; }
.dl-status em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--signal); }

/* ---------- Formulare ---------- */
label { display: flex; flex-direction: column; gap: 5px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  background: var(--tile-2); border: 0; border-radius: var(--r-field);
  color: var(--ink); font-family: var(--grotesk); font-size: 16px;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.check { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-family: var(--grotesk); font-size: 16px; }
.check input { width: 22px; min-height: 22px; height: 22px; accent-color: var(--signal); flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edit fieldset { border: 0; margin: 0 0 14px; padding: 18px 20px 20px; background: var(--tile); border-radius: var(--r-tile); display: flex; flex-direction: column; gap: 12px; }
.edit legend { float: left; width: 100%; padding: 0; margin-bottom: 2px; }
.edit legend + * { clear: both; }
.edit .page-title { font-size: 40px; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: 112px 1fr 150px 42px; gap: 6px; align-items: center; }
.row-contact, .row-travel { padding: 10px; background: var(--bg); border-radius: 18px; }
.row-contact { grid-template-columns: 1fr 1fr 42px; }
.row-contact select { grid-column: 1 / 3; }
.row-travel { grid-template-columns: 112px 1fr 42px; }
.row-travel .btn-icon { grid-column: 3; grid-row: 1; }
.party { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.party .muted { font-family: var(--mono); font-size: 12px; }
.sticky-actions { flex-wrap: nowrap; }
.sticky-actions .btn { flex: 1; white-space: nowrap; }
.sticky-actions { position: sticky; bottom: calc(84px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); padding: 12px 0; margin-top: 0; z-index: 5; }
.inline-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.add-day { margin-top: 12px; }
.add-day summary { cursor: pointer; font-family: var(--mono); font-size: 13px; font-weight: 700; padding: 8px 0; }
.add-day summary::marker { color: var(--signal); }
.form-error { color: var(--bad); font-family: var(--mono); font-size: 13px; }

/* ---------- Ortssuche ---------- */
.place-search { display: flex; flex-direction: column; gap: 5px; }
.combo { position: relative; }
.place-search > label { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.suggest {
  position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none; max-height: 330px; overflow-y: auto;
  background: var(--bg); border-radius: 20px; box-shadow: 0 14px 40px rgba(0, 0, 0, .2);
}
.suggest [role="option"] { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 10px 14px; border-radius: 14px; cursor: pointer; }
.suggest [role="option"] strong { font-weight: 600; }
.suggest [role="option"] span { grid-column: 1; color: var(--muted); font-size: 14px; }
.suggest [role="option"] em { grid-column: 2; grid-row: 1 / 3; align-self: center; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.suggest [role="option"][aria-selected="true"], .suggest [role="option"]:hover { background: var(--tile-2); }
.suggest-status { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0; min-height: 0; }
.suggest-status:empty { display: none; }
.picked { font-size: 14px; color: var(--muted); margin: 0; }
.picked:empty { display: none; }
.picked a { color: var(--ink); font-weight: 600; margin-left: 4px; }
.route-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.block .route-actions .btn-quiet { margin-top: 0; }

.suggest .powered { padding: 6px 14px 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; }
.save-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.save-item { align-items: flex-start; background: var(--tile); border-radius: 18px; padding: 12px 14px; }
.save-item span { display: flex; flex-direction: column; }
.save-item small { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.brand-switch { background: none; border: 0; padding: 4px 8px; border-radius: 14px; cursor: pointer; color: var(--ink); justify-self: center; }
.brand-switch:hover { background: var(--tile); }
.brand-switch .brand-band i { display: inline-block; width: 7px; height: 7px; margin-left: 6px; vertical-align: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.band-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.band-item { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border: 0; border-radius: 20px; background: var(--tile); cursor: pointer; color: var(--ink); }
.band-item i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink); flex: none; }
.band-item.is-current i { background: var(--signal); box-shadow: none; }
.band-item span { display: flex; flex-direction: column; }
.band-item strong { font-size: 18px; font-weight: 600; }
.band-item small { font-family: var(--mono); font-size: 12px; color: var(--muted); }
/* Neues in einer anderen Band: Hinweis in der Liste und Punkt am Bandnamen oben */
.band-item span { flex: 1; min-width: 0; }
.band-news { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--signal); margin-top: 2px; }
.band-news-dot { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--signal); color: var(--signal-on); font-size: 12px; line-height: 22px; text-align: center; font-weight: 700; }
.band-news-dot:empty { min-width: 10px; width: 10px; height: 10px; padding: 0; }
.brand-switch { position: relative; }
.brand-news { position: absolute; top: 4px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px var(--bg); }
.new-band { margin-top: 18px; }
.test-band { margin: 16px 0 0; }
.rooms:empty { display: none; }
.rooms .lbl { margin-bottom: 8px; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.room {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: 12px 16px; border: 0; border-radius: 20px; background: var(--tile-2); cursor: pointer;
}
.room strong { font-weight: 600; }
.room span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.room.is-active { background: var(--ink); color: var(--ink-on); }
.room.is-active span { color: var(--ink-on); opacity: .75; }
.details-status { font-size: 14px; color: var(--muted); margin: 0; }
.details-status:empty { display: none; }
.room-line { font-size: 17px; margin-bottom: 4px; }
.facts dd a { color: var(--ink); font-weight: 600; }

/* ---------- Gäste ---------- */
.show-pick { margin-bottom: 12px; }
.guest-count { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.guests { background: var(--tile); border-radius: var(--r-tile); padding: 4px 18px; }
.guest { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 14px 0; }
.guest + .guest { border-top: 1px solid var(--line); }
.guests .empty { padding: 14px 0; }
.guest-main { display: flex; flex-direction: column; min-width: 0; }
.guest-main span { color: var(--muted); font-size: 14px; }
.guest-status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; align-self: start; }
.guest-status::before { content: ''; width: 10px; height: 10px; border-radius: 50%; }
.guest-angefragt .guest-status::before { box-shadow: inset 0 0 0 1.5px var(--signal); }
.guest-angefragt .guest-main strong { font-style: italic; }
.guest-bestaetigt .guest-status::before { background: var(--ink); }
.guest-abgelehnt { opacity: .5; }
.guest-abgelehnt .guest-status { text-decoration: line-through; }
.guest-abgelehnt .guest-status::before { background: var(--line); }
.guest-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.guest-actions:empty { display: none; }
.guest-form { background: var(--tile); border-radius: var(--r-tile); padding: 18px 20px 20px; margin-top: 14px; }
.guest-form h2 { font-size: 24px; }

/* ---------- Anmeldung ---------- */
.login { max-width: 440px; margin: 0 auto; padding: calc(40px + var(--safe-t)) 22px 40px; }
.login-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-bottom: 36px; }
.login-dots i { aspect-ratio: 1; border-radius: 50%; background: var(--ink); }
.login-dots i.is-current { background: var(--signal); }
.login-title { font-size: clamp(60px, 19vw, 84px); font-weight: 700; letter-spacing: -0.055em; line-height: .88; }
.login-by { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 10px 0 28px; }
.login-lead { color: var(--muted); margin-bottom: 18px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input { font-family: var(--mono); font-size: 20px; letter-spacing: .06em; text-transform: uppercase; }
.login-form input::placeholder { text-transform: none; letter-spacing: 0; }
.test-logins { margin-top: 34px; }
.test-logins .muted { font-size: 15px; }
.test-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.test-login { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 14px 18px; background: var(--tile); border: 0; border-radius: 22px; cursor: pointer; text-align: left; }
.test-login strong { font-weight: 600; }
.test-login span { font-family: var(--mono); color: var(--muted); font-size: 11px; }
.login-theme { margin-top: 30px; display: flex; justify-content: center; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin: 28px 0 8px; font-size: 14px; }
.legal-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.legal-links a:hover { color: var(--ink, inherit); }

/* ---------- Meldung ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); z-index: 20;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 36px); padding: 14px 20px; border-radius: 22px;
  background: var(--signal); color: var(--signal-on); font-weight: 600;
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Push-Nachricht bei offener App: Leiste oben zum Antippen */
#push-banner {
  position: fixed; z-index: 25; left: 50%; top: calc(10px + env(safe-area-inset-top, 0px));
  width: min(calc(100% - 24px), 460px); display: flex; align-items: stretch;
  transform: translate(-50%, -140%); opacity: 0; pointer-events: none; transition: transform .25s, opacity .25s;
  background: var(--ink); color: var(--ink-on); border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
#push-banner.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#push-banner button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.push-banner-main { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left; padding: 12px 6px 12px 18px; }
.push-banner-main strong { font-size: 15px; }
.push-banner-main span { font-size: 14px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.push-banner-main em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--signal); margin-top: 2px; }
.push-banner-x { padding: 0 16px; font-size: 22px; opacity: .7; }

/* ---------- Fenster unten: Installieren, Einladen ---------- */
#sheet[hidden] { display: none; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 30; background: color-mix(in srgb, var(--ink) 35%, transparent); }
.sheet {
  position: fixed; z-index: 31; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + var(--safe-b));
  width: min(calc(100% - 28px), 460px); max-height: calc(100dvh - 40px); overflow-y: auto;
  background: var(--bg); color: var(--ink); border-radius: 30px; padding: 22px 22px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.sheet:focus { outline: none; }
.sheet h2 { font-size: 30px; letter-spacing: -0.03em; margin: 4px 0 12px; }
.sheet .actions { margin-top: 16px; }
.sheet .small { font-size: 13px; margin-top: 14px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 8px 0; align-items: start; }
.steps li::before {
  content: counter(step); width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--ink-on);
  font-family: var(--mono); font-size: 12px; margin-top: 1px;
}
.ico { width: 20px; height: 20px; vertical-align: -4px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sheet-code, .code-display { font-family: var(--mono); font-size: 28px; font-weight: 700; letter-spacing: .06em; text-align: center; background: var(--tile); border-radius: 999px; padding: 12px; margin: 8px 0 0; }
.sheet-arrow {
  position: fixed; z-index: 32; left: 50%; bottom: calc(2px + var(--safe-b)); transform: translateX(-50%);
  width: 0; height: 0; pointer-events: none;
}
.sheet-arrow svg {
  position: absolute; left: -22px; bottom: 0; width: 44px; height: 44px; padding: 9px;
  border-radius: 50%; background: var(--signal); fill: none; stroke: var(--signal-on); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  animation: nudge 1.1s ease-in-out infinite alternate;
}
@keyframes nudge { from { transform: translateY(-6px); } to { transform: translateY(2px); } }
#sheet:has(.sheet-arrow) .sheet { bottom: calc(62px + var(--safe-b)); }
.qr-wrap { background: #fff; border-radius: 24px; padding: 14px; width: min(100%, 280px); margin: 6px auto 10px; }
.qr { display: block; width: 100%; height: auto; }
.invite-link { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: center; overflow-wrap: anywhere; margin: 0; }
.warn { display: flex; gap: 10px; font-size: 14px; margin: 0 0 10px; }
.warn::before { content: ''; flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--signal); }
body.has-sheet { overflow: hidden; }

@media (max-width: 520px) {
  .row { grid-template-columns: 104px 1fr 42px; }
  .row select[name="vis"] { grid-column: 1 / 3; grid-row: 2; }
  .row .btn-icon { grid-column: 3; grid-row: 1; }
  .row-contact { grid-template-columns: 1fr 42px; }
  .row-contact > * { grid-column: 1; }
  .row-contact .btn-icon { grid-column: 2; grid-row: 1; }
  .row-contact select[name="vis"] { grid-column: 1; grid-row: auto; }
  .row-travel input[name="from"], .row-travel input[name="to"], .row-travel input[name="duration"] { grid-column: 1 / 3; }
  .two { grid-template-columns: 1fr; }
}

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

/* ---------- Druck: Day Sheet auf Papier ---------- */
@media print {
  :root, :root[data-theme="dark"] { --bg: #fff; --tile: #fff; --ink: #000; --ink-on: #fff; --muted: #555; --line: #bbb; color-scheme: light; }
  body { font-size: 11pt; }
  .topbar, .tabbar, .actions, .pager, #toast, .btn, .tour-dots { display: none !important; }
  .main { padding: 0; max-width: none; }
  .day-num { font-size: 64pt; }
  .block { border: 1px solid #bbb; border-radius: 10px; break-inside: avoid; }
  .next-circle { width: 120px; }
  .rooming ul { display: block; }
}

/* Person bearbeiten: Code-Bereich */
.code-box { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.code-box .sheet-code { margin: .25rem 0 .5rem; }
.code-box .btn { margin-top: .75rem; }

/* Tour umbenennen: dezent unter dem Tournamen */
.tour-rename { margin: .35rem 0 .9rem; }
.tour-rename summary { font-size: .85rem; color: var(--muted, inherit); cursor: pointer; }
.tour-rename[open] summary { margin-bottom: .5rem; }

/* Setliste im Day Sheet */
.setlist-img { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: var(--line); margin-bottom: .75rem; }
.setlist-text { white-space: pre-wrap; font: inherit; font-size: 1.05rem; line-height: 1.5; margin: 0 0 .75rem; }
.file-line { margin: 0 0 .25rem; }
.file-open[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.setlist-block details { margin-top: .75rem; }
@media print { .setlist-block form, .setlist-block details, .setlist-block .actions { display: none; } }

/* Login-Code merken */
.login-form .remember { margin-top: .75rem; }
.saved-hint { margin: .25rem 0 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.my-code { margin: 1rem 0 1.25rem; }
.profile-lang { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line, rgba(0,0,0,.1)); }
.profile-lang .segmented { margin: .4rem 0 .5rem; }
.my-code .code-display { margin: .25rem 0 .5rem; }

/* Neue Tour anlegen: oben auf der Termine-Seite */
.new-tour { margin: 0 0 1.5rem; }
.tour-rename .btn { margin-top: .5rem; }

/* Löschen: deutlich als gefährlich erkennbar */
.btn-danger { background: var(--signal); color: var(--signal-on); border-color: var(--signal); }
.delete-list { margin: .5rem 0 1rem 1.1rem; padding: 0; }
.delete-list li { margin: .25rem 0; }
.warn-lbl { color: var(--signal); }

/* Änderungen an bestätigten Tagen: leicht in Signalfarbe markiert, bis die App neu gestartet wird */
.is-changed { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--signal) 60%, transparent); background-color: color-mix(in srgb, var(--signal) 9%, transparent); }
.block.is-changed { position: relative; }
.block.is-changed > h2::after { content: 'geändert'; margin-left: .5em; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--signal); text-transform: uppercase; }
.day-head.is-changed { border-radius: 18px; padding: 8px 10px; margin: 0 -10px; }
.notice-changed { color: var(--signal); font-weight: 600; }
button.notice-changed { display: flex; width: 100%; border: 0; text-align: left; font: inherit; font-size: 15px; font-weight: 600; color: var(--signal); cursor: pointer; }
/* Push angetippt: geänderte Stelle leuchtet kurz auf */
.is-flash { animation: change-flash 1.6s ease-out 2; }
@keyframes change-flash {
  0%, 100% { background-color: color-mix(in srgb, var(--signal) 9%, transparent); }
  30% { background-color: color-mix(in srgb, var(--signal) 32%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .is-flash { animation: none; } }
.daylist li.is-changed { box-shadow: none; background: color-mix(in srgb, var(--signal) 9%, transparent); border-radius: 14px; }
.changed-tag { font-family: var(--mono); font-size: 11px; color: var(--signal); text-transform: uppercase; letter-spacing: .04em; margin-right: .5em; }

/* Wiederhergestellter Entwurf */
.notice-draft { color: var(--signal); }

/* ---------- Team und Messenger ---------- */
.day-pick { display: block; margin-bottom: 14px; }
.chat-list { list-style: none; margin: 0; padding: 0; }
.chat-list li a { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.chat-list li:first-child a { border-top: 0; }
.chat-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--ink-on); display: grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: -.1em; }
.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-main span { color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-unread .chat-main strong, .is-unread .chat-main span { color: var(--ink); font-weight: 600; }
.chat-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.badge { background: var(--signal); color: var(--signal-on); border-radius: 9px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; line-height: 18px; text-align: center; }
.chat-head { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 4px 0 10px; }
.chat-title { font-size: 30px; margin: 4px 0 0; line-height: 1.1; }
.chat-info summary { cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 4px; }
.chat-messages { list-style: none; margin: 8px 0 0; padding: 0 0 150px; display: flex; flex-direction: column; gap: 6px; }
.chat-day { align-self: center; margin: 10px 0 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.chat-empty { color: var(--muted); text-align: center; padding: 30px 0; }
.msg { align-self: flex-start; max-width: 82%; background: var(--tile); border-radius: 18px 18px 18px 6px; padding: 8px 12px 6px; }
.msg.is-mine { align-self: flex-end; background: var(--ink); color: var(--ink-on); border-radius: 18px 18px 6px 18px; }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.35; }
.msg-by { display: block; font-size: 12px; font-weight: 600; color: var(--signal); margin-bottom: 2px; }
.msg time { display: block; text-align: right; font-family: var(--mono); font-size: 11px; opacity: .6; margin-top: 2px; }
.chat-compose { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + var(--safe-b)); z-index: 9; width: min(calc(100% - 28px), 612px); display: flex; gap: 8px; align-items: flex-end; background: var(--bg); padding: 8px 0; }
.chat-compose textarea { flex: 1; resize: none; min-height: 48px; max-height: 160px; border-radius: 24px; padding: 12px 16px; font: inherit; font-size: 16px; }
.chat-compose .btn { flex: none; }

/* ---------- Glocke oben rechts: Änderungen und neue Nachrichten ---------- */
.bell-wrap { position: relative; }
.bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--tile); color: var(--ink); cursor: pointer; padding: 0; }
.bell svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bell.has-news { background: var(--ink); color: var(--ink-on); }
.bell.has-news svg { animation: bell-ring 1.2s ease-in-out 1; transform-origin: 50% 10%; }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } }
@media (prefers-reduced-motion: reduce) { .bell.has-news svg { animation: none; } }
.bell-badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--signal); color: var(--signal-on); font-family: var(--mono); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.topbar-side { justify-self: start; }
.bell-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: min(340px, calc(100vw - 28px)); max-height: 70vh; overflow-y: auto; background: var(--tile); border-radius: 20px; padding: 14px 14px 10px; box-shadow: 0 18px 40px rgba(0, 0, 0, .22); text-align: left; font-family: inherit; }
.bell-menu .lbl { margin: 0 0 8px; }
.bell-list { list-style: none; margin: 0 0 8px; padding: 0; }
.bell-list a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 6px; border-radius: 12px; color: inherit; text-decoration: none; }
.bell-list a:hover { background: var(--tile-2); }
.bell-list a.is-unread { background: color-mix(in srgb, var(--signal) 10%, transparent); }
.bell-kind { flex: none; width: 22px; text-align: center; color: var(--signal); font-size: 14px; line-height: 22px; }
.bell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bell-main strong { font-size: 15px; }
.bell-main span { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bell-list time { flex: none; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }

.status { flex-wrap: nowrap; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.status-line { display: inline-flex; align-items: center; gap: 6px; }
.status-pending { flex-basis: auto; }

/* Technik-Infos unter Profil */
.diag summary { cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.diag[open] summary { margin-bottom: 10px; }
.diag-log { list-style: none; margin: 10px 0 0; padding: 0; font-family: var(--mono); font-size: 12px; line-height: 1.45; color: var(--muted); }
.diag-log b { color: var(--ink); font-weight: 600; }

/* Tage löschen (Termine) */
.day-del-toggle { margin: 10px 0 0; }
.daylist.is-deleting li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.daylist.is-deleting li a { min-width: 0; }
.day-del { border: 0; border-radius: 999px; padding: 6px 10px; background: var(--signal); color: var(--signal-on); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }

/* ---------- Technical Rider ---------- */
.rider-list { list-style: none; margin: 0 0 14px; padding: 0; }
.rider-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.rider-list li > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rider-list strong { font-size: 19px; }
.rider-list .actions { margin: 0; }
.rider-name { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 6px 0 12px; }
.rider-name input { font-family: var(--grotesk); font-size: 26px; font-weight: 600; color: var(--ink); }
.rider-lang { flex-direction: row; align-items: center; gap: 10px; font-family: var(--grotesk); font-size: 16px; color: var(--ink); margin: 18px 0 4px; cursor: pointer; }
.rider-lang input { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--signal); }
/* Ausgabe-Knöpfe Deutsch | English als zusammengehörendes Paar */
.export-langs { display: inline-flex; }
.export-langs .btn + .btn { margin-left: -2px; }
.export-langs .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.export-langs .btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.rf-en { border-left: 3px solid var(--signal, #E5622B); padding-left: 10px; }
.rf-en.is-missing textarea, .rf-en.is-missing input { outline: 1px dashed var(--signal, #E5622B); }
.rf-en-tag { align-self: flex-start; display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 700; color: #fff; background: var(--signal, #E5622B); border-radius: 4px; padding: 1px 5px; margin-right: 4px; }
.rider-top { margin: 0 0 6px; }
.rider-save { margin: 0 0 14px; }
.rider-sec > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; font-size: 19px; font-weight: 600; }
.rider-sec > summary::-webkit-details-marker { display: none; }
.rider-sec > summary > span::before { content: '▸'; display: inline-block; width: 1.1em; color: var(--signal); transition: transform .15s; }
.rider-sec[open] > summary > span::before { transform: rotate(90deg); }
.rider-sec[open] > summary { margin-bottom: 14px; }
.rider-sec.is-off > summary > span { opacity: .45; text-decoration: line-through; }
.rider-on { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.rf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.rf { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 0; }
.rf-full { grid-column: 1 / -1; }
.rf textarea { min-height: 84px; resize: vertical; font-family: var(--grotesk); }
.rf-check { flex-direction: row; align-items: center; gap: 8px; font-family: var(--grotesk); font-size: 15px; color: var(--ink); }
.rf-checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.rf-checks legend { padding: 0; margin-bottom: 8px; }
.rf-checks label { display: inline-flex; align-items: center; gap: 6px; font-family: var(--grotesk); font-size: 15px; color: var(--ink); }
.rl { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.rl .lbl { margin: 6px 0 2px; }
.rl-head, .rl-row { display: grid; gap: 6px; align-items: center; }
.rl-head span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.rl-row input, .rl-row select { min-height: 40px; padding: 8px 10px; font-size: 14px; }
.rl-num { font-family: var(--mono); font-size: 13px; text-align: right; color: var(--muted); }
.rl-check { display: flex; justify-content: center; }
.rl-mlabel { display: none; }
.rl-tools { display: flex; gap: 2px; }
.rl-btn { width: 32px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.rl-btn:hover:not(:disabled) { background: var(--tile-2); color: var(--ink); }
.rl-btn:disabled { opacity: .3; }
.rl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
@media (max-width: 620px) {
  .rf-grid { grid-template-columns: 1fr; }
  .rl-head { display: none; }
  .rl-row { grid-template-columns: 1fr 1fr !important; padding: 10px; border-radius: 14px; background: var(--tile-2); }
  .rl-row .rl-num { grid-column: 1 / -1; text-align: left; }
  .rl-row .rl-tools { grid-column: 1 / -1; justify-content: flex-end; }
  .rl-check { justify-content: flex-start; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
  .rl-mlabel { display: inline; }
}
.plot-teaser { background: var(--bg); border-radius: 16px; padding: 8px; }

/* Stageplot */
.sp-svg { display: block; width: 100%; height: auto; font-family: var(--grotesk); }
.sp-stage { fill: var(--tile); stroke: var(--ink); stroke-width: 3; }
.sp-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 6; }
.sp-edge { fill: var(--muted); font-family: var(--mono); letter-spacing: .08em; }
.sp-dim { fill: var(--muted); font-family: var(--mono); }
.sp-line { fill: none; stroke: var(--ink); stroke-width: 2; }
.sp-light { fill: var(--tile-2); stroke: var(--ink); stroke-width: 2; }
.sp-dark { fill: var(--ink); stroke: var(--ink); stroke-width: 2; }
.sp-inv { stroke: var(--tile); }
.sp-line.sp-inv, .sp-light.sp-inv { fill: none; }
.sp-dash { stroke-dasharray: 10 6; }
.sp-stroke { stroke: var(--ink); stroke-width: 2; }
.sp-text { fill: var(--ink); font-weight: 700; font-family: var(--mono); }
.sp-inv-text { fill: var(--tile); }
.sp-muted-text { fill: var(--muted); font-weight: 400; }
.sp-label { fill: var(--ink); font-weight: 700; paint-order: stroke; stroke: var(--tile); stroke-width: 4px; }
.sp-num { fill: var(--signal); }
.sp-num-text { fill: var(--signal-on); font-weight: 700; font-family: var(--mono); }
.sp-hit { fill: transparent; stroke: none; }
.sp-sel { fill: none; stroke: var(--signal); stroke-width: 3; stroke-dasharray: 8 5; }
.sp-svg.is-editor { touch-action: none; user-select: none; -webkit-user-select: none; }
.sp-svg.is-editor .sp-item { cursor: grab; }
.plot-editor .page-title { margin-bottom: 10px; }
.plot-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 10px; }
.plot-bar label { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.plot-bar input[type=number] { width: 90px; min-height: 40px; }
.plot-bar .rf-check { flex-direction: row; min-height: 40px; }
.plot-stage { background: var(--tile); border-radius: var(--r-tile); padding: 6px; }
.plot-inspector { position: relative; margin: 10px 0; background: var(--tile); border-radius: 20px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.plot-insp { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.plot-insp > strong { width: 100%; }
.plot-insp label { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); flex: 1 1 160px; }
.plot-insp label.plot-n { flex: 0 0 72px; }
.plot-insp input { min-height: 40px; }
.plot-tools { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.plot-palette { background: var(--tile); border-radius: var(--r-tile); padding: 12px; margin-top: 10px; }
.plot-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.chip { flex: none; border: 0; border-radius: 999px; padding: 8px 12px; background: var(--tile-2); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.chip.is-on { background: var(--ink); color: var(--ink-on); }
.plot-syms { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.plot-sym { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; border-radius: 14px; padding: 8px 6px; background: var(--bg); color: var(--ink); font: inherit; font-size: 11.5px; line-height: 1.2; text-align: center; cursor: pointer; }
.plot-sym:hover { outline: 2px solid var(--signal); }
.plot-sym svg { width: 56px; height: 56px; }

.rf-check input, .rl-check input, .rider-on input, .rf-checks input, .plot-bar input[type=checkbox] { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--signal); }
.rider-on, .rl-check { flex-direction: row !important; align-items: center; }
@media (max-width: 620px) {
  .rl-row { background: var(--bg); gap: 6px; }
  .rl-row input, .rl-row select { background: var(--tile); min-height: 38px; }
  .rl-row .rl-tools { margin-top: -4px; }
}
@media (max-width: 620px) {
  .rl-row .rl-num { grid-column: 1 !important; grid-row: 1; align-self: center; }
  .rl-row .rl-tools { grid-column: 2 !important; grid-row: 1; margin: 0; }
}

@media (min-width: 900px) {
  .main:has(.plot-editor) { max-width: 1120px; }
  .plot-editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 18px; align-items: start; }
  .plot-editor > .lbl, .plot-editor > .page-title, .plot-editor > .plot-bar, .plot-editor > p.muted { grid-column: 1 / -1; }
  .plot-editor > .plot-stage { grid-column: 1; grid-row: span 2; }
  .plot-editor > .plot-inspector { grid-column: 2; position: sticky; top: 90px; bottom: auto; margin: 0 0 10px; }
  .plot-editor > .plot-palette { grid-column: 2; margin-top: 0; }
  .plot-editor .plot-syms { grid-template-columns: repeat(3, 1fr); }
}

.plot-quick { display: flex; gap: 6px; margin-left: auto; }
.plot-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.plot-insp .plot-skirt { flex: 0 0 auto; flex-direction: row; font-family: var(--grotesk); font-size: 14px; color: var(--ink); min-height: 40px; }
.plot-insp select { min-height: 40px; }

.sp-thick { stroke-width: 3.5; }
.sp-role { font-weight: 400; fill: var(--muted); }

.sp-wing { fill: color-mix(in srgb, var(--tile-2) 70%, transparent); stroke: var(--muted); stroke-width: 2; stroke-dasharray: 10 7; }
.plot-bar .plot-save { order: -1; }
.plot-insp label.plot-fs { flex: 0 0 110px; }
.plot-save-bottom { margin-top: 12px; }
@media (min-width: 900px) { .plot-editor > .plot-save-bottom { grid-column: 1 / -1; } }

/* Elementliste im Stageplot-Editor */
.plot-list { background: var(--tile); border-radius: 20px; padding: 10px 12px; margin-bottom: 10px; }
.plot-list summary { cursor: pointer; font-weight: 600; padding: 4px 2px; }
.plot-items { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; }
.plot-items li { display: flex; align-items: center; gap: 4px; border-radius: 12px; }
.plot-items li.is-selected { background: color-mix(in srgb, var(--signal) 14%, transparent); }
.plot-item-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px 6px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; border-radius: 12px; }
.plot-item-pick:hover { background: var(--tile-2); }
.plot-item-pick svg { width: 34px; height: 34px; flex: none; }
.plot-item-pick span { display: flex; flex-direction: column; min-width: 0; }
.plot-item-pick strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plot-item-pick small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.plot-item-del { flex: none; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.plot-item-del:hover { background: var(--signal); color: var(--signal-on); }
@media (min-width: 900px) {
  .main:has(.plot-editor) { max-width: 1360px; }
  .plot-editor { grid-template-columns: 240px minmax(0, 1fr) 340px !important; }
  .plot-editor > .plot-list { grid-column: 1; grid-row: span 3; position: sticky; top: 90px; margin: 0; }
  .plot-editor > .plot-list .plot-items { max-height: calc(100vh - 200px); }
  .plot-editor > .plot-stage { grid-column: 2 !important; }
  .plot-editor > .plot-inspector, .plot-editor > .plot-palette { grid-column: 3 !important; }
}

/* Logo im Rider: Vorschau der ersten Seite */
.logo-box { border-top: 1px solid var(--line); padding-top: 12px; }
.logo-wrap { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 620px) { .logo-wrap { grid-template-columns: 1fr; } .logo-page { max-width: 300px; } }
.logo-page { position: relative; width: 100%; aspect-ratio: 595 / 842; background: #fff; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.18); overflow: hidden; container-type: inline-size; touch-action: none; }
.lp-title { position: absolute; font-family: Helvetica, Arial, sans-serif; font-weight: 700; color: #000; font-size: 3.7cqw; line-height: 1.25; }
.lp-lines { position: absolute; display: flex; flex-direction: column; gap: 1.6cqw; }
.lp-lines i { display: block; height: 1.1cqw; background: #e3e3df; border-radius: 1cqw; }
.lp-lines i:nth-child(4n) { width: 70%; }
.lp-lines i:nth-child(5n) { background: #f0b89e; width: 24%; margin-top: 2cqw; }
.logo-img { position: absolute; cursor: grab; outline: 1.5px dashed var(--signal); outline-offset: 2px; user-select: none; -webkit-user-drag: none; }
.logo-ctrl { display: flex; flex-direction: column; gap: 10px; }
.logo-ctrl label { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.logo-ctrl input[type=range] { accent-color: var(--signal); min-height: 0; padding: 0; }
.logo-upload { cursor: pointer; }

/* WLAN teilen */
.wifi-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 12px; }
@media (max-width: 520px) { .wifi-grid { grid-template-columns: 1fr; } .wifi-qr { max-width: 240px; } }
.wifi-qr { background: #fff; color: #000; border-radius: 16px; padding: 10px; cursor: zoom-in; }
.wifi-qr svg { display: block; width: 100%; height: auto; }
.wifi-cap { display: flex; flex-direction: column; gap: 2px; margin: 6px 2px 0; font-size: 13px; line-height: 1.3; word-break: break-all; }
.wifi-cap span { font-family: var(--mono); font-size: 12px; color: #444; }
.wifi-empty { color: #666; margin: 10px; }
.wifi-fields { display: flex; flex-direction: column; gap: 10px; }
.wifi-fields label { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.wifi-src { margin-top: 10px; }
.wifi-full { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.72); display: grid; place-items: center; padding: 20px; }
.wifi-full-card { background: #fff; color: #000; border-radius: 22px; padding: 18px; width: min(92vw, 460px); text-align: center; }
.wifi-full-card .wifi-cap { font-size: 18px; align-items: center; }
.wifi-full-card .wifi-cap span { font-size: 15px; }

.wifi-box > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.wifi-box > summary::-webkit-details-marker { display: none; }
.wifi-sum { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wifi-sum strong { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.wifi-box[open] .wifi-sum small { display: none; }
.wifi-sum small { font-size: 16px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wifi-toggle { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--tile-2); position: relative; }
.wifi-toggle::before { content: ''; position: absolute; left: 12px; top: 10px; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .15s; }
.wifi-box[open] .wifi-toggle::before { transform: rotate(-135deg); top: 14px; }
.wifi-box[open] > summary { margin-bottom: 8px; }
.wifi-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-pair { display: inline-flex; }
.chip-pair .chip:first-child { border-radius: 999px 0 0 999px; padding-right: 8px; }
.chip-pair .chip-x { border-radius: 0 999px 999px 0; padding: 8px 10px 8px 6px; color: var(--muted); }
.wifi-box { margin-top: 14px; }

/* ---------- Dokumente am Tag & Auslesen ---------- */
.docs { list-style: none; margin: 0 0 .5rem; padding: 0; }
.docs li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.docs li:first-child { border-top: 0; padding-top: 0; }
.doc-kind { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--ink-on); display: grid; place-items: center; font: 700 10px var(--mono); letter-spacing: .04em; }
.doc-main { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.doc-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.docs-block details { margin-top: .75rem; }
.scan-title { overflow-wrap: anywhere; }
.scan-status { font-family: var(--mono); font-size: 13px; margin: 6px 0 10px; }
.scan-progress { height: 8px; border-radius: 4px; background: var(--tile-2); overflow: hidden; margin-bottom: 14px; }
.scan-progress i { display: block; height: 100%; width: 0; background: var(--signal); border-radius: 4px; transition: width .3s; }
.scan-sum { font-family: var(--mono); font-size: 13px; margin: 4px 0 6px; }
.scan-group { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.scan-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "c k b" "c v b"; column-gap: 12px; align-items: center; padding: 9px 12px; border-radius: 14px; background: var(--tile-2); margin-bottom: 6px; cursor: pointer; }
.scan-row input { grid-area: c; width: 20px; height: 20px; accent-color: var(--signal); }
.scan-k { grid-area: k; font-size: 13px; color: var(--muted); }
.scan-v { grid-area: v; overflow-wrap: anywhere; }
.scan-v s { color: var(--muted); }
.scan-badge { grid-area: b; font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 10px; background: var(--ink); color: var(--ink-on); }
.scan-row.is-anders .scan-badge { background: var(--signal); color: var(--signal-on); }
.scan-same, .scan-text { margin-top: 12px; font-size: 14px; }
.scan-same ul { list-style: none; padding: 0; margin: 8px 0 0; } .scan-same li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); }
.scan-text pre { white-space: pre-wrap; font: 12px/1.45 var(--mono); max-height: 40vh; overflow: auto; background: var(--tile-2); padding: 10px 12px; border-radius: 12px; margin-top: 8px; }
.scan-ok { font-weight: 600; }
.sheet .scan-row + h3 { margin-top: 14px; }
.scan-row { font-family: var(--grotesk); text-transform: none; letter-spacing: 0; font-size: 15px; }
.scan-v b { font-weight: 600; }

/* ---------- Hilfe & Tutorials ---------- */
.tut-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tut-card { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 0; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.tut-thumb { position: relative; flex: none; width: 132px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--tile-2); }
.tut-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tut-dur { position: absolute; right: 6px; bottom: 6px; font: 700 10px var(--mono); background: rgba(18,18,17,.85); color: #F2F2EE; padding: 2px 5px; border-radius: 5px; }
.tut-play { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: var(--signal); color: #fff; display: grid; place-items: center; font-size: 13px; padding-left: 2px; opacity: .92; }
.tut-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tut-text strong { font-size: 16px; }
.tut-seen { font: 400 11px var(--mono); color: var(--muted); margin-top: 3px; }
.tut-first { outline: 2px solid var(--signal); outline-offset: -2px; }
.tut-playlist { display: inline-block; margin-top: 12px; font-size: 14px; }
.tut-link { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px 6px 8px; margin: 0 0 12px; border-radius: 16px; border: 1px solid var(--line); background: none; color: inherit; font: 500 13px var(--grotesk); cursor: pointer; }
.tut-link > span:first-child { width: 20px; height: 20px; border-radius: 50%; background: var(--signal); color: #fff; display: grid; place-items: center; font-size: 9px; padding-left: 1px; }
.tut-link .muted { font-family: var(--mono); font-size: 11px; }
.sheet .tut-link { margin: 10px 0 4px; }
.tut-player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; margin: 10px 0 12px; }
.tut-player.is-vertical { aspect-ratio: 9 / 16; max-height: 62vh; width: auto; margin-left: auto; margin-right: auto; }
.tut-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tut-hint { display: flex; align-items: stretch; gap: 6px; margin: 0 0 14px; }
.tut-hint-main { flex: 1; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; border: 0; background: var(--ink); color: var(--ink-on); font: 15px var(--grotesk); text-align: left; cursor: pointer; }
.tut-hint-play { width: 30px; height: 30px; border-radius: 50%; background: var(--signal); color: #fff; display: grid; place-items: center; font-size: 11px; padding-left: 2px; flex: none; }
.tut-hint-x { width: 44px; border-radius: 18px; border: 1px solid var(--line); background: none; color: inherit; font-size: 18px; cursor: pointer; }

/* ---------- Ablauf kopieren ---------- */
.sched-copy-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.sched-list { margin-top: 4px; }
.sched-pick { width: 100%; border: 0; text-align: left; font: inherit; color: inherit; }
.sched-pick > span:first-child { grid-area: c; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); }
.sched-n { background: var(--tile); color: var(--muted); }
.sched-mode { border: 0; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.sched-mode legend { margin: 0 0 6px; padding: 0; }

/* ---------- Ladeplan ---------- */
.lpx-name { width: 100%; font: inherit; font-size: 26px; font-weight: 700; letter-spacing: -.01em; background: transparent; border: 0; border-bottom: 1px dashed var(--line); color: var(--ink); padding: 4px 0; margin: 2px 0 14px; }
.lpx-name:focus { outline: none; border-bottom-color: var(--signal); }
.lp-vehicle summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.lp-vehicle summary .muted { font-size: 13px; }
.lp-vehicle label, .lp-meta label, .lp-new label { display: block; margin-top: 10px; }
.lp-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lp-grid4 label { font-size: 12px; }
@media (max-width: 560px) { .lp-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 10px; }
.lp-toolbar .muted { margin-left: auto; }
.lp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.lp-stats > div { background: var(--tile); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-stats strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.lp-stats .lbl { margin: 0; }
.lp-stats .is-bad strong { color: var(--bad); }
.lp-stats .is-warn strong { color: var(--signal); }
.lp-bar { display: block; height: 5px; border-radius: 3px; background: var(--tile-2); overflow: hidden; margin-top: 4px; }
.lp-bar b { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.lp-stats .is-bad .lp-bar b { background: var(--bad); }
@media (max-width: 560px) { .lp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lp-warn { border-left: 4px solid var(--signal); }
.lp-work { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.lp-stage-wrap { min-width: 0; }
.lp-views { margin: 0 0 8px; }
.lp-stage { background: #fbfbf8; border-radius: 18px; padding: 6px; overflow: hidden; position: relative; }
.lp-svg { display: block; width: 100%; height: auto; margin: 0 auto; font-family: var(--grotesk); user-select: none; -webkit-user-select: none; }
.lp-svg.is-editor { touch-action: none; }
.lp-svg.is-editor .lp-top { cursor: grab; }
.lp-svg.is-editor .lp-top:active { cursor: grabbing; }
.lp3d { position: relative; height: min(70vh, 720px); min-height: 360px; border-radius: 14px; overflow: hidden; }
.lp3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.lp3d-canvas:active { cursor: grabbing; }
.lp3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lp3d-num { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: #121211; color: #fff; font: 700 12px/24px var(--grotesk); text-align: center; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.lp3d-num.is-sel, .lp3d-num.is-next { background: #E5622B; width: 30px; height: 30px; margin: -15px 0 0 -15px; line-height: 30px; font-size: 14px; }
.lp3d-num.is-done { background: #9a9a93; }
.lp3d-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 4px 2px; }
.lp3d-bar .chip { background: var(--tile-2); }
.lp3d-help { margin: 4px 6px 4px; }
@media (min-width: 1000px) {
  .main:has(.lp-editor), .main:has(.lp-crew) { max-width: 1320px; }
  .lp-work { grid-template-columns: minmax(0, 1fr) 340px; }
  .lp-side { position: sticky; top: 76px; }
  .lp3d { height: min(74vh, 780px); }
}
@media (max-width: 600px) {
  .lp-stage { padding: 2px; border-radius: 14px; margin: 0 -10px; }
  .lp3d { height: 64vh; min-height: 320px; }
}
.lp-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lp-side > div { background: var(--tile); border-radius: 18px; padding: 12px 14px; }
.lp-insp p { margin: 0 0 6px; }
.lp-insp .actions { gap: 6px; margin-top: 6px; }
.lp-prob { color: var(--bad); font-size: 14px; }
.lp-hint { margin: 0; }
.lp-rest h2 { font-size: 16px; margin: 0 0 8px; }
.lp-rest-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lp-rest-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.lp-rest-list .actions { margin: 0; gap: 4px; align-items: center; }
.lp-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lp-add select { flex: 1 1 180px; min-width: 0; }
.lp-add input[type=number] { width: 64px; }
.lp-cases { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.lp-case { display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(5, minmax(0, .8fr)) 32px; gap: 6px; align-items: center; background: var(--tile); border-radius: 16px; padding: 8px 10px; }
.lp-case input { min-width: 0; padding: 8px; font-size: 14px; }
.lp-case-head { background: transparent; padding: 0 10px; font-size: 12px; color: var(--muted); }
.lp-case-opts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.lp-case-opts input[data-cf=group] { flex: 1 1 140px; }
.lp-case-opts input[type=color] { width: 40px; height: 32px; padding: 2px; border-radius: 8px; }
@media (max-width: 560px) {
  .lp-case { grid-template-columns: repeat(5, minmax(0, 1fr)) 32px; }
  .lp-case > input[data-cf=name] { grid-column: 1 / -2; }
  .lp-case > .btn-icon { grid-column: -2 / -1; grid-row: 1; }
  .lp-case-head { display: none; }
}
.lp-import textarea { width: 100%; font-family: var(--mono); font-size: 13px; }
.lp-import summary { cursor: pointer; font-weight: 600; }
.lp-file { cursor: pointer; }
.lp-crew .lp-mode { margin: 6px 0 10px; }
.lp-progress { margin: 4px 0 12px; }
.lp-crew-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@media (min-width: 1000px) { .lp-crew-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } .lp-crew-grid .lp-stage-wrap { position: sticky; top: 76px; } }
.lp-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lp-steps button { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) 30px; gap: 10px; align-items: center; text-align: left; background: var(--tile); color: var(--ink); border: 0; border-radius: 16px; padding: 10px 12px; font: inherit; cursor: pointer; }
.lp-steps button > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lp-num { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--ink-on); display: grid; place-items: center; font-size: 15px; }
.lp-tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); }
.lp-steps .is-next button { outline: 3px solid var(--signal); outline-offset: -3px; }
.lp-steps .is-done button { opacity: .5; }
.lp-steps .is-done .lp-num { background: var(--muted); }
.lp-steps .is-done .lp-tick { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 5px var(--tile); }
.lp-day-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; }
.lp-day-line > span { display: flex; flex-direction: column; min-width: 0; }
.lp-vh { font-size: 14px; margin: 16px 0 4px; }
.lp-shape { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 12px 0 4px; }
.lp-shape figure { margin: 0; max-width: 100%; }
.lp-shape svg { display: block; max-width: 100%; height: auto; }
.lp-shape figcaption { font-size: 11px; color: var(--muted); margin-top: 2px; }
.lp-shape-box { fill: none; stroke: var(--line); stroke-dasharray: 4 3; }
.lp-shape-hull { fill: var(--tile-2); stroke: var(--ink); stroke-width: 1.5; }
.lp-shape-obs { fill: var(--muted); opacity: .55; }
.lp-plist, .lp-obs { display: flex; flex-direction: column; gap: 6px; }
.lp-prow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 6px; align-items: center; max-width: 380px; }
.lp-orow { display: grid; grid-template-columns: 30px minmax(0, 1.6fr) repeat(6, minmax(0, .8fr)) 32px; gap: 5px; align-items: center; }
.lp-orow.is-hidden > input, .lp-orow.is-out > input { opacity: .5; }
.lp-prow input, .lp-orow input { min-height: 40px; padding: 6px 8px; font-size: 14px; min-width: 0; }
.lp-prow-head, .lp-orow-head { font-size: 11px; color: var(--muted); font-family: var(--mono); }
@media (max-width: 640px) {
  .lp-orow { grid-template-columns: 30px repeat(3, minmax(0, 1fr)) 32px; }
  .lp-orow > input[data-lpv$=".name"] { grid-column: 2 / -2; }
  .lp-orow > .lp-eye { grid-column: 1; grid-row: 1; }
  .lp-orow > .btn-icon { grid-column: -2 / -1; grid-row: 1; }
  .lp-orow > input:not([data-lpv$=".name"]) { grid-column: span 1; }
  .lp-orow > input[data-lpv$=".x"] { grid-column: 2; }
  .lp-orow-head { display: none; }
}
.lp-more { margin-top: 14px; }
.lp-more > summary { cursor: pointer; font-weight: 600; }
.lp-seats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 12px; }
.lp-seats .lbl { margin: 0 6px 0 0; }
.lp-seats .chip.is-on { background: var(--ink); color: var(--ink-on); }
.lp-orow-opts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -2px 0 4px; }
.lp-insp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin: 8px 0 4px; }
.lp-insp-grid label { font-size: 11px; gap: 3px; }
.lp-insp-grid input { min-height: 38px; padding: 6px 8px; font-size: 14px; }
.lp-list h2 { font-size: 16px; margin: 0 0 8px; }
#lp-list h2 { font-size: 16px; margin: 0 0 8px; }
.lp-vis-actions { margin: 0 0 6px; gap: 6px; }
.lp-vis-types { margin: 4px 0 8px; }
.lp-vis-types .chip { display: inline-flex; align-items: center; gap: 6px; opacity: .55; }
.lp-vis-types .chip.is-on { opacity: 1; }
.lp-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.lp-vlist { list-style: none; margin: 0; padding: 0; max-height: 44vh; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.lp-vlist li { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; border-radius: 10px; }
.lp-vlist li.is-sel { background: var(--tile-2); }
.lp-vlist li.is-hidden .lp-vname { opacity: .45; }
.lp-vname { border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; padding: 6px 4px; cursor: pointer; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; min-width: 0; }
.lp-vname b { font-variant-numeric: tabular-nums; min-width: 1.6em; }
.lp-vname .lp-prob { font-style: normal; font-weight: 700; }
.lp-eye { display: grid; place-items: center; cursor: pointer; flex-direction: row; }
.lp-eye input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.lp-eye span { width: 22px; height: 14px; border-radius: 50% / 60%; border: 2px solid var(--ink); position: relative; }
.lp-eye span::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--ink); }
.lp-eye input:not(:checked) + span { border-color: var(--line); }
.lp-eye input:not(:checked) + span::after { background: transparent; box-shadow: none; width: 26px; height: 2px; margin: -1px 0 0 -13px; border-radius: 0; background: var(--line); transform: rotate(-30deg); }
.lp-eye input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 3px; }
/* Packliste */
.lp-pack { margin-top: 14px; }
.lp-pack-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.lp-pack-head h2 { margin: 0; font-size: 18px; }
.lp-pack-head h2 .muted { font-size: 13px; font-weight: 400; margin-left: 6px; }
.lp-pack-head .actions { margin: 0; gap: 6px; }
.lp-ptable { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 12px; }
.lp-prow2 { display: grid; grid-template-columns: 30px 34px minmax(120px, 1.8fr) repeat(4, minmax(46px, .55fr)) minmax(110px, 1.1fr) repeat(2, minmax(52px, .6fr)) 58px 46px 52px 104px; gap: 5px; align-items: center; padding: 3px 4px; border-radius: 12px; }
.lp-prow2 input, .lp-prow2 select { min-height: 36px; padding: 5px 7px; font-size: 13.5px; min-width: 0; border-radius: 10px; }
.lp-prow2 select { padding-right: 24px; background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; }
.lp-phead { font-family: var(--mono); font-size: 10.5px; color: var(--muted); padding-bottom: 0; }
.lp-prow2.is-sel { background: var(--tile-2); box-shadow: inset 0 0 0 2px var(--signal); }
.lp-prow2.is-out .lp-pname { font-style: italic; }
.lp-prow2.is-hidden > :not(.lp-eye) { opacity: .45; }
.lp-prow2.is-bad .lp-pnum { box-shadow: 0 0 0 2px var(--bad); }
.lp-pnum { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--ink); color: var(--ink-on); font: 700 12px/30px var(--grotesk); cursor: pointer; padding: 0; box-shadow: inset 0 -4px 0 var(--c, transparent); }
.lp-prow2.is-out .lp-pnum { background: var(--line); color: var(--ink); }
.lp-pz { font-size: 12px; color: var(--muted); white-space: nowrap; }
.lp-pload { grid-column: span 3; justify-self: start; }
.lp-pchk { display: grid; place-items: center; }
.lp-pchk input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--signal); }
.lp-pact { display: flex; gap: 2px; justify-content: flex-end; }
.lp-pact .btn-icon { width: 32px; height: 32px; }
.lp-pprob { grid-column: 3 / -1; color: var(--bad); font-size: 12px; margin-top: -2px; }
.lp-pf { display: contents; }
.lp-pcap { display: none; }
@media (max-width: 900px) {
  .lp-phead { display: none; }
  .lp-prow2 { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px 5px; background: var(--tile); padding: 10px; }
  .lp-prow2.is-sel { background: var(--tile); }
  .lp-prow2 > .lp-eye { grid-column: span 1; }
  .lp-prow2 > .lp-pnum { grid-column: span 2; justify-self: center; }
  .lp-prow2 > .lp-pname { grid-column: span 9; }
  .lp-pf { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-family: var(--mono); font-size: 10px; color: var(--muted); }
  .lp-pcap { display: block; }
  .lp-pf-l, .lp-pf-w, .lp-pf-h, .lp-pf-kg, .lp-pf-x, .lp-pf-y { grid-column: span 3; }
  .lp-pf-o { grid-column: span 6; }
  .lp-prow2 > .lp-pz { grid-column: span 3; align-self: end; padding-bottom: 10px; }
  .lp-prow2 > .lp-pload { grid-column: span 6; align-self: end; }
  .lp-pchk { grid-column: span 3; display: flex; flex-direction: row; align-items: center; gap: 6px; justify-content: flex-start; }
  .lp-pchk .lp-pcap { font-family: var(--mono); font-size: 11px; color: var(--muted); }
  .lp-prow2 > .lp-pact { grid-column: span 6; }
  .lp-pprob { grid-column: 1 / -1; }
}

.lp-frow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px; border-radius: 12px; }
.lp-fname { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; min-width: 0; }
.lp-frow.is-hidden .lp-fname, .lp-frow.is-out .lp-fname { opacity: .5; }
.lp-frow .chip.is-on { background: var(--ink); color: var(--ink-on); }
.lp-fixed { margin-top: 4px; }

.lp-vorigin { margin: 6px 0 4px; }
.lp-vstat { margin: 4px 0; font-size: 14px; }
.lp-vstat.is-changed { color: var(--signal); font-weight: 600; }
.lp-vorigin .actions { gap: 6px; margin: 6px 0; }
.lp-eye span { flex: none; box-sizing: border-box; }
.lp-orow > .lp-eye, .lp-frow > .lp-eye, .lp-prow2 > .lp-eye { width: 30px; height: 30px; }
.lp-orow-opts .rf-check, .lp-vehicle .rf-check, .lp-case-opts .rf-check { flex-direction: row; align-items: center; gap: 6px; font-family: var(--grotesk); font-size: 13px; color: var(--ink); }
.lp-orow-opts .rf-check input, .lp-vehicle .rf-check input, .lp-case-opts .rf-check input { width: 18px; min-height: 18px; height: 18px; padding: 0; accent-color: var(--signal); flex: none; }
.lp-orow-opts { padding-left: 35px; }
.lp-vehicle .lp-eye { display: grid; place-items: center; margin: 0; }

/* ---------- Carnet ---------- */
.main:has(.cn-editor) { max-width: 1320px; }
.cn-sec > summary { cursor: pointer; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; list-style: none; }
.cn-sec > summary::-webkit-details-marker { display: none; }
.cn-sec > summary h2 { margin: 0; }
.cn-sec > summary::before { content: '▸'; color: var(--muted); }
.cn-sec[open] > summary::before { content: '▾'; }
.cn-sec > summary .muted { font-size: 13px; }
.cn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 14px; margin-top: 12px; }
.cn-grid2 { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.cn-countries .chip.is-off { opacity: .4; text-decoration: line-through; }
.cn-countries .chip.is-on, .cn-editor .chip-row .chip.is-on { background: var(--ink); color: var(--ink-on); }
.cn-summary .lp-stats { margin-bottom: 8px; }
.cn-errors, .cn-warns { margin: 6px 0; padding-left: 20px; }
.cn-errors li { color: var(--bad); }
.cn-warns li { color: var(--muted); }
.cn-ok { color: #2f8a5b; font-weight: 600; }
.cn-table { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.cn-row { display: grid; grid-template-columns: 54px minmax(160px, 2.2fr) minmax(80px, 1fr) minmax(90px, 1.1fr) minmax(110px, 1.2fr) 58px 64px 86px 58px 108px; gap: 5px; align-items: center; padding: 3px 4px; border-radius: 12px; }
.cn-row input { min-height: 36px; padding: 5px 7px; font-size: 13.5px; min-width: 0; border-radius: 10px; }
.cn-row .cn-n { text-align: right; }
.cn-head { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.cn-sum { font-weight: 700; font-variant-numeric: tabular-nums; }
.cn-sum span:nth-child(n+6) { text-align: right; padding-right: 8px; }
.cn-nr { font-variant-numeric: tabular-nums; font-weight: 700; text-align: center; }
.cn-row.is-bad { box-shadow: inset 3px 0 0 var(--bad); }
.cn-iss { grid-column: 2 / -1; font-size: 12px; color: var(--bad); margin-top: -2px; }
.cn-iss.is-hint { color: var(--muted); }
.cn-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cn-steps .rf-check, .cn-editor > .block .rf-check { align-items: flex-start; }
.cn-steps .rf-check input, .cn-editor .rf-check input { width: 20px; min-height: 20px; height: 20px; flex: none; accent-color: var(--signal); margin-top: 2px; }
@media (max-width: 1000px) {
  .cn-head { display: none; }
  .cn-row { grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--tile); padding: 8px; }
  .cn-row > .cn-nr { grid-column: span 1; }
  .cn-row > input[data-cni=desc] { grid-column: span 5; }
  .cn-row > input[data-cni=brand], .cn-row > input[data-cni=model], .cn-row > input[data-cni=serial] { grid-column: span 2; }
  .cn-row > input[data-cni=qty], .cn-row > input[data-cni=kg] { grid-column: span 1; }
  .cn-row > input[data-cni=value], .cn-row > input[data-cni=origin] { grid-column: span 2; }
  .cn-row > .lp-pact { grid-column: 1 / -1; justify-content: flex-end; }
  .cn-row.cn-sum { background: transparent; }
  .cn-sum span:empty { display: none; }
  .cn-iss { grid-column: 1 / -1; }
}
.cn-editor .actions select { width: auto; flex: 1 1 220px; min-width: 0; }

.lp-prow2 input[data-pl=d] { grid-column: span 2; }
@media (max-width: 900px) { .lp-pf-d { grid-column: span 6; } }
.lp-fs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 6px 0 4px; }
.lp-fs label { flex: 1 1 200px; font-size: 11px; gap: 4px; }
.lp-fs label span { color: var(--ink); font-family: var(--grotesk); font-size: 12px; margin-left: 4px; }
.lp-fs input[type=range] { min-height: 28px; padding: 0; background: transparent; accent-color: var(--signal); }

/* ---------- Tourkasse ---------- */
.kasse-uploads[hidden] { display: none; }
.kasse-title { font-size: clamp(40px, 12vw, 60px); }
.kasse-tour { max-width: 360px; margin: -8px 0 16px; }
.kasse-scan { margin: 0 0 18px; }
.kasse-scan .actions { margin-top: 12px; }
.kasse-scan-btn { width: 100%; min-height: 64px; font-size: 19px; gap: 12px; display: inline-flex; align-items: center; justify-content: center; }
.kasse-scan-btn svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.kasse-accs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.kasse-acc { background: var(--bg); border-radius: 18px; padding: 14px 16px; }
.kasse-acc-head { display: flex; flex-direction: column; gap: 2px; }
.kasse-acc .actions { margin-top: 10px; gap: 8px; }
.kasse-bal { font-family: var(--mono); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kasse-bal.is-neg, .kasse-book .is-neg { color: var(--bad); }
.kasse-warn { color: var(--signal); }
.kasse-amt { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kasse-amt.is-in { color: #2E7D4F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kasse-amt.is-in { color: #7BD39B; } }
:root[data-theme="dark"] .kasse-amt.is-in { color: #7BD39B; }
.kasse-list { list-style: none; margin: 0; padding: 0; }
.kasse-day { display: flex; gap: 10px; align-items: baseline; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 14px 0 6px; border-bottom: 1px solid var(--line); }
.kasse-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.kasse-row:hover strong { text-decoration: underline; }
.kasse-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kasse-row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.kasse-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.kasse-tags { display: flex; gap: 4px; }
.kasse-tag { font-style: normal; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; background: var(--tile-2); color: var(--muted); }
.kasse-tag.is-open { background: var(--signal); color: var(--signal-on); }
.kasse-tag.is-warn { color: var(--signal); }
.kasse-owed, .kasse-cats { list-style: none; margin: 0 0 8px; padding: 0; }
.kasse-owed li, .kasse-cats li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.kasse-owed li > span:first-child { flex: 1 1 auto; }
.kasse-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 0 0 12px; }
.kasse-sum div { background: var(--bg); border-radius: 16px; padding: 10px 14px; }
.kasse-sum dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.kasse-sum dd { margin: 4px 0 0; font-family: var(--mono); font-size: 18px; font-weight: 700; }
.kasse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; }
.kasse-form > label, .kasse-form > details, .kasse-form > .kasse-pay { margin-top: 12px; }
.kasse-amount input { font-family: var(--mono); font-size: 22px; font-weight: 700; }
.kasse-pay { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.kasse-pay .chip { font-size: 14px; padding: 10px 14px; }
.kasse-vat summary, .kasse-count summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.kasse-vat .kasse-grid { margin-bottom: 8px; }
.kasse-rcs { display: flex; flex-wrap: wrap; gap: 10px; }
.kasse-rc { position: relative; width: 96px; height: 128px; border-radius: 12px; overflow: hidden; background: var(--tile-2); }
.kasse-rc a { display: block; width: 100%; height: 100%; }
.kasse-rc img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.kasse-rc-pdf { display: grid !important; place-items: center; font-family: var(--mono); font-weight: 700; color: var(--ink); text-decoration: none; }
.kasse-rc-x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.kasse-rc-add { width: 96px; height: 128px; border-radius: 12px; border: 2px dashed var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 8px; }
.kasse-ocr { margin-top: 10px; }
.kasse-pd { list-style: none; margin: 12px 0 0; padding: 0; }
.kasse-pd li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.kasse-pd-who { flex: 1 1 160px; flex-direction: row !important; align-items: center; gap: 8px !important; font-family: var(--grotesk) !important; font-size: 16px !important; color: var(--ink) !important; }
.kasse-pd input[type=checkbox], .kasse-pd-paid input { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--signal); }
.kasse-pd-amt { width: 110px; font-family: var(--mono); }
.kasse-pd-paid { flex-direction: row !important; align-items: center; gap: 6px !important; }
.kasse-total { font-family: var(--mono); margin-top: 10px; }
.kasse-diff { font-family: var(--mono); font-size: 18px; font-weight: 700; margin: 12px 0; }
.kasse-diff.is-off { color: var(--bad); }
.kasse-diff.is-ok { color: #2E7D4F; }
.kasse-denoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 6px; }
.kasse-denoms label span { font-family: var(--mono); color: var(--ink); }
.kasse-book { width: 100%; border-collapse: collapse; font-size: 15px; }
.kasse-book th { text-align: left; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 6px 4px; }
.kasse-book td { padding: 8px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.kasse-book .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.kasse-accedits { list-style: none; margin: 0; padding: 0; }
.kasse-accedit .kasse-grid { margin: 10px 0; }
.kasse-save { position: sticky; bottom: calc(86px + var(--safe-b)); z-index: 3; background: var(--bg); padding: 10px 0; margin-top: 8px; }

/* Scanner (Vollbild) */
body.has-kscan { overflow: hidden; }
.kscan { position: fixed; inset: 0; z-index: 2000; background: #0E0E0D; color: #F2F2EE; display: flex; }
.kscan[hidden] { display: none; }
.kscan-wrap { flex: 1; display: flex; flex-direction: column; padding: calc(12px + var(--safe-t)) 16px calc(16px + var(--safe-b)); gap: 12px; max-width: 760px; margin: 0 auto; width: 100%; min-height: 0; }
.kscan .lbl { color: #9A9A93; margin: 0; }
.kscan-top { display: flex; align-items: center; gap: 12px; }
.kscan-close { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #272725; color: #F2F2EE; font-size: 26px; line-height: 1; cursor: pointer; }
.kscan-intro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; color: #C9C9C2; font-size: 17px; line-height: 1.45; }
.kscan-art { width: 150px; height: 150px; }
.kscan-art .bg { fill: #272725; }
.kscan-art .paper { fill: #F2F2EE; }
.kscan-art .ink { stroke: #121211; stroke-width: 3; stroke-linecap: round; }
.kscan-art .frame { fill: none; stroke: #F06C34; stroke-width: 4; stroke-linecap: round; }
.kscan-actions { display: flex; flex-direction: column; gap: 10px; }
.kscan-actions .btn { width: 100%; justify-content: center; }
.kscan .btn-quiet { color: #F2F2EE; box-shadow: inset 0 0 0 1.5px #F2F2EE; background: transparent; }
.kscan .btn-primary { background: #F06C34; color: #160B05; border-color: #F06C34; }
.kscan-pick, label.kscan-pick { cursor: pointer; text-align: center; display: inline-flex; flex-direction: row; font-family: var(--grotesk); font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.kscan .btn-primary.kscan-pick { color: #160B05; }
.kscan-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.kscan-imgbox { position: relative; touch-action: none; }
.kscan-canvas { width: 100%; height: 100%; display: block; object-fit: contain; }
.kscan-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.kscan-poly { fill: rgba(240,108,52,.14); stroke: #F06C34; stroke-width: 0.5%; vector-effect: non-scaling-stroke; stroke-width: 3px; }
.kscan-h { fill: rgba(240,108,52,.35); stroke: #fff; stroke-width: 3px; vector-effect: non-scaling-stroke; cursor: grab; touch-action: none; }
.kscan-h.is-drag { fill: rgba(240,108,52,.75); }
.kscan-hint { color: #C9C9C2; font-size: 14px; text-align: center; margin: 0; }
.kscan-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.kscan-mode { background: #272725; }
.kscan-mode button { color: #F2F2EE; }
.kscan-mode button.is-active { background: #F2F2EE; color: #121211; }
.kscan-pages { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; align-content: start; }
.kscan-page { position: relative; border-radius: 12px; overflow: hidden; background: #272725; aspect-ratio: 3/4; }
.kscan-page > button:first-child { width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: pointer; }
.kscan-page img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.kscan-pdf { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-family: var(--mono); font-weight: 700; font-size: 22px; padding: 10px; text-align: center; }
.kscan-pdf span { font-size: 11px; font-weight: 400; word-break: break-all; color: #9A9A93; }
.kscan-busy { align-items: center; justify-content: center; text-align: center; }
.kscan-spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #272725; border-top-color: #F06C34; animation: kspin 0.9s linear infinite; }
@keyframes kspin { to { transform: rotate(360deg); } }
.kscan-bar { width: min(320px, 80%); height: 6px; border-radius: 3px; background: #272725; overflow: hidden; }
.kscan-bar i { display: block; height: 100%; background: #F06C34; transition: width .2s; }

/* Personen einer Tour */
.tour-people-list { margin: .4rem 0 .6rem; }
.tour-people-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: .4rem 0; }
.tour-people-add label { flex: 1 1 220px; }
.tp-scope { border: 0; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.tp-scope .check, .band-for .check { flex-direction: row; align-items: flex-start; gap: 12px; font-family: var(--grotesk); font-size: 16px; color: var(--ink); }
.tp-scope .check input, .band-for .check input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; padding: 0; flex: none; accent-color: var(--signal); }
.tp-scope .check span, .band-for .check span { display: flex; flex-direction: column; gap: 2px; }
.tp-scope .check strong { font-weight: 600; }
.tp-scope .check small { font-size: 14px; }

/* Profil → Team: Touren je Person, Person aus der Band entfernen */
.member-tours li { align-items: flex-start; }
.member-remove .lbl { color: var(--signal); }
.member-remove .btn-danger { margin-top: .4rem; }

/* Rollen-Erklärung beim Einladen / Bearbeiten */
.role-help { margin: -.2rem 0 .4rem; font-size: 14px; }
.role-help summary { cursor: pointer; color: var(--muted); }
.role-help ul { margin: .5rem 0 .3rem; padding-left: 1.1rem; display: grid; gap: .3rem; }
.role-help li { color: var(--ink); line-height: 1.35; }

/* Band für eine andere Person anlegen (Band wechseln → Neue Band) */
.band-for { margin: 4px 0 8px; font-size: 14px; }
.band-for summary { cursor: pointer; color: var(--muted); }
.band-for label { margin-top: 8px; }
.band-for .check { margin-top: 12px; }
