/* BEP-Erfassung · im Auftritt von linka.ch: Schwarz, Orange #FF6600, Schrift Rubik.
   Standard ist dunkel wie die Website. «Hell» ist für Sonnenlicht gedacht und wird pro Gerät gespeichert. */
/* Rubik lokal (variable Schrift 300–900, wie www.linka.ch), nichts wird von Google geladen */
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/Rubik-Variable-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/Rubik-Variable-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Rubik"; font-style: italic; font-weight: 300 900; font-display: swap; src: url(fonts/Rubik-Variable-Italic-latin.woff2) format("woff2"); }
:root {
  --bg: #0A0A0A; --surface: #161616; --sunken: #1E1E1E; --ink: #F5F5F5; --muted: #A6A6A6; --line: #2E2E2E;
  --accent: #FF6600; --accent-ink: #0A0A0A; --accent-soft: rgba(255, 102, 0, .16); --accent-text: #FF8533;
  --mark: #FF6B6B; --mark-soft: rgba(217, 58, 58, .18); --ok: #4CC46F; --ok-soft: rgba(46, 158, 79, .18);
  --warn: #F2B544; --warn-soft: rgba(242, 181, 68, .16);
  --logo-w: #F5F5F5;
  --f-display: "Rubik", "Segoe UI", system-ui, sans-serif;
  --f-body: "Rubik", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Rubik", "Segoe UI", system-ui, sans-serif;
  --r: 10px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F3F3F3; --surface: #FFFFFF; --sunken: #F0F0F0; --ink: #0A0A0A; --muted: #5C5C5C; --line: #D9D9D9;
  --accent: #FF6600; --accent-ink: #0A0A0A; --accent-soft: rgba(255, 102, 0, .14); --accent-text: #B84A00;
  --mark: #B42323; --mark-soft: #FBE4E4; --ok: #237A3C; --ok-soft: #E3F3E7; --warn: #8A5A00; --warn-soft: #FBF0D4;
  --logo-w: #0A0A0A;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; text-wrap: balance; margin: 0; letter-spacing: -.015em; }
.logo { display: block; height: 48px; width: auto; aspect-ratio: 433 / 762; flex: none; }
.lk-o { fill: #FF6600; } .lk-w { fill: var(--logo-w); }
h1 { font-size: 28px; } h2 { font-size: 20px; }
a { color: var(--accent-text); }
code { font-family: var(--f-mono); font-size: .9em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Login / Installation */
.narrow { max-width: 620px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 60px max(16px, env(safe-area-inset-left)); display: grid; gap: 18px; }
.brand-big { display: flex; align-items: baseline; gap: 10px; }
.brand-big b { font-family: var(--f-display); font-size: 26px; font-weight: 600; letter-spacing: -.015em; }
.brand-big .logo { height: 48px; align-self: center; }
.brand-big span { color: var(--muted); margin-left: auto; } /* «Linka AG» an den rechten Rand, damit nicht zu viel «Linka» auf einer Zeile steht */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 13px; font-family: var(--f-mono); }
.checks .ok { color: var(--ok); } .checks .bad { color: var(--mark); }

/* App-Leiste */
.bar { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.bar-in { max-width: 1080px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; min-width: 0; cursor: pointer; background: none; border: 0; padding: 0; }
.brand { align-items: center; color: var(--ink); }
.brand b { font-family: var(--f-display); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.brand span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.spacer { flex: 1; }
.sync { font-size: 12px; font-family: var(--f-mono); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.sync.pending i { background: var(--warn); } .sync.offline i { background: var(--mark); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right)) calc(60px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }

/* Bedienelemente */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px 14px; cursor: pointer; font-weight: 500; min-height: 42px; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }
.btn.small { min-height: 34px; padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.note { font-size: 13px; color: var(--muted); margin: 0; }
.status { font-size: 13px; padding: 8px 12px; border-radius: 8px; background: var(--sunken); }
.status.err { background: var(--mark-soft); color: var(--mark); }
.status.ok { background: var(--ok-soft); color: var(--ok); }
.status.warn { background: var(--warn-soft); color: var(--warn); }
.in { width: 100%; border: 1px solid var(--line); background: var(--sunken); border-radius: 8px; padding: 9px 11px; min-height: 42px; }
textarea.in { min-height: 84px; resize: vertical; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 14px; min-width: 0; }
.card .lead { color: var(--muted); font-size: 13px; margin: -8px 0 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.f { display: grid; gap: 6px; min-width: 0; align-content: start; }
.f.wide { grid-column: 1 / -1; }
.f > label, .f > .lbl { font-size: 13px; font-weight: 500; color: var(--muted); }
.fid { font-family: var(--f-mono); font-size: 11px; color: var(--muted); opacity: .7; margin-left: 6px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Listen */
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.head .sub { color: var(--muted); font-size: 14px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.tools .in { max-width: 320px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.list { display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 16px; cursor: pointer; text-align: left; width: 100%; }
.item:hover { border-color: var(--accent); }
.item .t { font-weight: 600; font-size: 16px; }
.item .meta { grid-column: 1; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.mono { font-family: var(--f-mono); }
.pill { grid-row: 1 / span 2; grid-column: 2; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.pill.open { background: var(--sunken); color: var(--muted); border: 1px solid var(--line); }
.pill.work { background: var(--accent-soft); color: var(--accent-text); }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.flag { color: var(--warn); font-weight: 600; }
.bar-progress { height: 4px; background: var(--sunken); border-radius: 2px; overflow: hidden; grid-column: 1 / -1; margin-top: 6px; }
.bar-progress i { display: block; height: 100%; background: var(--accent); }
.results { display: grid; gap: 4px; }
.results button { text-align: left; border: 1px solid var(--line); background: var(--sunken); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.results button:hover { border-color: var(--accent); }

/* Formular */
.layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.rail { position: sticky; top: calc(env(safe-area-inset-top) + 72px); display: grid; gap: 2px; }
.rail button { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.rail .n { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-family: var(--f-mono); font-size: 12px; }
.rail button.done .n { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.rail button.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.rail button.active .n { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.step { display: grid; gap: 16px; min-width: 0; }
.unit { display: flex; align-items: center; gap: 8px; }
.unit .in { font-family: var(--f-mono); }
.unit span { color: var(--muted); font-size: 13px; }
.prefill { font-size: 11px; color: var(--accent-text); }
.yn { display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: 160px; }
.yn button { border: 0; background: var(--sunken); padding: 8px 0; cursor: pointer; min-height: 40px; }
.yn button + button { border-left: 1px solid var(--line); }
.yn button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.cond { border-left: 3px solid var(--accent-soft); padding-left: 14px; }
.foot { font-size: 12px; color: var(--muted); margin: 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.ph { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--sunken); display: grid; }
.ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.ph .cap { padding: 6px 8px; font-size: 12px; display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.ph .cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ph .cap .btn { flex: none; padding-inline: 6px; }
.ph .pend { font-size: 11px; color: var(--warn); padding: 0 8px 6px; }
.add-photo { position: relative; border: 1.5px dashed var(--line); border-radius: 8px; display: grid; place-items: center; text-align: center; padding: 14px; color: var(--muted); cursor: pointer; min-height: 120px; font-size: 13px; }
.add-photo:hover { border-color: var(--accent); color: var(--accent-text); }
.add-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sig { border: 1px solid var(--line); border-radius: 8px; background: #fff; touch-action: none; width: 100%; height: 170px; display: block; cursor: crosshair; }
.nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Foto markieren */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(8, 14, 13, .8); display: grid; grid-template-rows: auto 1fr auto; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.modal .top, .modal .bottom { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); background: var(--surface); }
.modal .top b { font-family: var(--f-display); font-size: 18px; flex: 1; }
.modal .stage { display: grid; place-items: center; overflow: hidden; padding: 10px; min-height: 0; }
.modal canvas { max-width: 100%; max-height: 100%; touch-action: none; cursor: crosshair; border-radius: 4px; }
.modal .bottom .in { flex: 1; min-width: 180px; }

/* Protokoll-Vorschau */
.sheet { background: #fff; color: #1b1b1b; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); padding: 28px 30px; display: grid; gap: 14px; font-size: 13px; }
.sheet .s-brand { display: flex; align-items: center; gap: 14px; background: #0A0A0A; color: #F5F5F5; margin: -28px -30px 4px; padding: 16px 30px; border-bottom: 4px solid #FF6600; border-radius: 4px 4px 0 0; }
.sheet .s-brand .logo { height: 44px; --logo-w: #F5F5F5; }
.sheet .s-co { display: grid; gap: 4px; } .sheet .s-co b { font-size: 16px; font-weight: 600; line-height: 1.1; } .sheet .s-dash { display: block; width: 22px; height: 3px; background: #FF6600; } .sheet .s-co small { color: #A6A6A6; font-size: 12px; align-self: end; }
.sheet .s-brand em { margin-left: auto; font-style: normal; color: #FF6600; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sheet h3 { font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.sheet .s-adr { font-size: 16px; margin-top: -10px; }
.s-box { border: 0; }
.s-box > div:first-child { padding: 6px 0 6px 10px; border-bottom: 1px solid #e0e0e0; border-left: 4px solid #FF6600; font-weight: 700; font-size: 14px; }
.s-rows { padding: 10px 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; }
.s-row { display: grid; grid-template-columns: 46% 1fr; gap: 8px; }
.s-row .k { color: #666; }
.s-imgs { padding: 10px 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.s-imgs figure { margin: 0; } .s-imgs img { width: 100%; border: 1px solid #eee; }
.s-imgs figcaption { font-size: 12px; color: #555; }
.recip { display: grid; gap: 6px; }
.recip div { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.recip div:last-child { border-bottom: 0; }

/* Verwaltung */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.scroll { overflow-x: auto; }

@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .rail button { grid-template-columns: 24px auto; white-space: nowrap; }
  .grid, .s-rows, .s-imgs { grid-template-columns: minmax(0, 1fr); }
  .sheet { padding: 18px 14px; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Übersicht (Linka Tools) */
a.brand { text-decoration: none; }
.portal { display: grid; gap: 34px; }
.portal-hero { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: center; padding-block: 8px 0; }
.eyebrow { margin: 0 0 8px; color: var(--accent-text); font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
/* Firmenname, oranger Strich, Slogan und Unterzeile wie auf www.linka.ch */
/* «Linka AG» gleich gross und gleich stark wie der Slogan darunter */
.hero-name { margin: 0 0 22px; font-family: var(--f-display); font-weight: 600; font-size: clamp(34px, 5.4vw, 56px); line-height: 1.15; letter-spacing: -.015em; color: var(--ink); }
.portal-intro h1 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; max-width: 14ch; }
.portal-intro h1::before { content: ""; display: block; width: 40px; height: 4px; margin-bottom: 18px; background: var(--accent); }
.lede { color: var(--muted); font-size: clamp(18px, 2.2vw, 23px); line-height: 1.5; max-width: 36ch; margin: 20px 0 0; }
.hero-hint { color: var(--muted); font-size: 15px; max-width: 52ch; margin: 18px 0 0; }
.portal-mark { justify-self: center; width: 100%; max-width: 220px; }
.hero-mark { width: 100%; height: auto; overflow: visible; display: block; }
/* Bewegtes Logo von linka.ch (assets/logo/hero-mark.svg): Segmente leuchten vom Rücken her auf, danach laufen Lichtimpulse durch die Linien */
.hero-mark .lk-w, .hero-mark .lk-p-o { fill: var(--logo-w); }
.lk-p-w { fill: #FF6600; }
.lk-seg { animation: lk-in .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
.lk-pulse { animation: lk-fade .6s ease 1.4s both; }
@keyframes lk-in { from { opacity: 0; transform: translate(var(--tx, 0), var(--ty, 0)); } }
@keyframes lk-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lk-seg, .lk-pulse { animation: none; } .lk-pulse { display: none; } }

.portal-block { display: grid; gap: 14px; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.block-head h2 { font-size: 22px; }
.gde-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.gde { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.gde:hover { border-color: var(--accent); }
.gde.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.gde-name { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.gde-proj { color: var(--muted); font-size: 13px; }
.gde-stat { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; }
.gde .bar-progress { margin-top: 2px; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tool { display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-height: 190px; }
a.tool:hover { border-color: var(--accent); }
a.tool:hover .tool-go { color: var(--accent-text); }
.tool-ico { width: 30px; height: 30px; stroke: var(--accent); }
.tool-title { font-size: 18px; font-weight: 600; letter-spacing: -.01em; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tool-text { color: var(--muted); font-size: 14px; }
.tool-stat { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.tool-stat b { color: var(--ink); font-weight: 600; }
.tool-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; stroke: currentColor; }
.tool.soon { opacity: .55; border-style: dashed; }
.tool.soon .tool-ico { stroke: var(--muted); }
.tool.locked { opacity: .7; }
.badge { font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

@media (max-width: 700px) {
  .portal-hero { grid-template-columns: minmax(0, 1fr); }
  .portal-mark { order: -1; max-width: 110px; justify-self: start; }
  .tool { min-height: 0; }
  .bar-in { gap: 6px; }
  .bar .btn.small { padding-inline: 8px; }
}

.btn.danger { color: var(--mark); }
.btn.danger:hover { border-color: var(--mark); color: var(--mark); }
.btn.danger-solid { background: #D93A3A; border-color: #D93A3A; color: #fff; }
.status.confirm { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; }

.bar .brand b { font-size: 22px; }
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot-in { max-width: 1080px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.foot-in a { color: var(--muted); }
@media (max-width: 700px) { .logo { height: 40px; } }

@media (max-width: 760px) { .sheet .s-brand { margin: -18px -14px 4px; padding: 14px; } }

/* Gemeinden pro Benutzer */
.gde-pick { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 0; display: grid; gap: 10px; }
.gde-pick legend { padding: 0 6px; }
.gde-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; cursor: pointer; padding: 6px 8px; border-radius: 8px; background: var(--sunken); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); grid-row: span 2; }
.check small { color: var(--muted); font-size: 12px; }

/* Übersicht: Trennung, umrahmte Aktion, Logo neben dem Titel auch auf dem Handy */
.portal-block.divided { border-top: 1px solid var(--line); padding-top: 26px; }
.btn.outline { border: 1.5px solid var(--accent); color: var(--ink); background: transparent; stroke: var(--accent); }
.btn.outline:hover { background: var(--accent-soft); }
.gde { gap: 2px; }
@media (max-width: 700px) {
  .portal-hero { grid-template-columns: minmax(0, 1fr) 96px; align-items: start; }
  .portal-mark { order: 0; max-width: 96px; justify-self: end; }
}

/* Auswertung */
.pie { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.pie svg { width: 160px; height: 160px; flex: none; }
.pie-legend { display: grid; gap: 8px; min-width: 200px; }
.pie-legend > div { display: grid; grid-template-columns: 14px 1fr auto 48px; gap: 10px; align-items: center; }
.pie-legend i { width: 14px; height: 14px; border-radius: 3px; display: block; }
.pie-legend b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.pie-legend .note { text-align: right; }
.pie-total { border-top: 1px solid var(--line); padding-top: 8px; grid-template-columns: 1fr auto 48px !important; }
.pie-total span { padding-left: 24px; }
#statBtn[aria-expanded="true"] { border-color: var(--accent); }

.maillog { font-size: 12px; background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; white-space: pre-wrap; margin: 8px 0 0; }

/* OTO-Werkzeug */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.oto-tbl td { vertical-align: middle; }
.oto-tbl .in { min-height: 34px; padding: 5px 8px; }
.oto-tbl .in.num { width: 72px; }
.oto-tbl input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.oto-tbl tr.void td { color: var(--muted); }
.oto-tbl tr.void .oto-id { text-decoration: line-through; }
.oto-id { font-weight: 600; white-space: nowrap; letter-spacing: .01em; }
.oto-preview { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r); background: var(--sunken); border-left: 4px solid var(--accent); }
.oto-preview b { font-size: 22px; letter-spacing: .02em; }
.action-bar { position: sticky; bottom: 0; margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); z-index: 3; }
.oto-tbl .in.flat { width: 96px; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.oto-tbl .in.bad { border-color: var(--mark); }
.btn.disabled { opacity: .45; cursor: default; }

/* RegieRapport */
.nowrap { white-space: nowrap; }
.toast { box-shadow: 0 8px 28px rgba(0, 0, 0, .35); border: 1px solid var(--line); background: var(--surface) !important; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; max-width: min(560px, calc(100% - 32px)); }
.btn.big { min-height: 50px; padding: 12px 20px; font-size: 16px; font-weight: 600; }
.regie .card h2 { display: flex; align-items: center; gap: 10px; }
.regie .num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.regie .opt { font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; letter-spacing: 0; }
.regie .in.date { width: auto; min-width: 160px; }
.chips.big .chip { padding: 9px 15px; font-size: 14px; min-height: 42px; }
.regie .grid.addr { grid-template-columns: minmax(0, 2.2fr) minmax(0, .7fr) minmax(0, .8fr) minmax(0, 1.6fr); }
.regie .photos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.regie .ph .cap { padding: 6px; }
.regie .ph .cap .in { flex: 1; min-width: 0; }
.regie .grid.time { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 6px; }
.regie .grid.time .wide { grid-column: 1 / -1; }
.found { border-left: 3px solid var(--accent); padding: 4px 0 4px 10px; font-size: 14px; }
.stepper { display: inline-grid; grid-template-columns: 50px 64px 50px; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: max-content; }
.stepper .btn { border: 0; border-radius: 0; font-size: 22px; min-height: 48px; background: var(--sunken); }
.stepper output { text-align: center; font-size: 20px; font-weight: 600; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; background: var(--accent-soft); border-radius: 8px; padding: 12px 16px; }
.total b { font-size: 26px; color: var(--accent-text); }
.check { gap: 8px; font-size: 14px; }
.ph .cap .in { min-height: 32px; padding: 4px 8px; font-size: 12px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; margin: 0; }
.done-card { max-width: 640px; margin: 24px auto; text-align: left; }
.done-mark { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 700; background: var(--ok-soft); color: var(--ok); }
.done-mark.warn { background: var(--warn-soft); color: var(--warn); }
.card.empty { text-align: left; }
@media (max-width: 760px) {
  .regie .grid.addr { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .regie .grid.addr > :nth-child(1), .regie .grid.addr > :nth-child(4) { grid-column: span 3; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  .kv dd { margin-bottom: 8px; }
  .head .btn.big { width: 100%; }
}
.ph > a { display: block; }
.cat-edit { margin-bottom: 14px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.steps code { white-space: nowrap; }
p.note.wide { grid-column: 1 / -1; margin: 0; }

/* Einstellungen: Reiter links, Inhalt rechts */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.set-nav { display: grid; gap: 4px; position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); }
.set-tab { all: unset; box-sizing: border-box; cursor: pointer; padding: 11px 14px; border-radius: 8px; border-left: 3px solid transparent; color: var(--muted); font-weight: 500; }
.set-tab:hover { background: var(--sunken); color: var(--ink); }
.set-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.set-tab[aria-current="true"] { background: var(--accent-soft); color: var(--ink); border-left-color: var(--accent); font-weight: 600; }
.set-panes { min-width: 0; display: grid; gap: 18px; }
@media (max-width: 760px) {
  .settings { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .set-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: thin; }
  .set-tab { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; padding: 9px 12px; }
  .set-tab[aria-current="true"] { border-bottom-color: var(--accent); }
}

/* RegieRapport 2: Ort, Einsatztage, Material */
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.tbl th.r, .tbl td.r { text-align: right; }
.regie .grid.site { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; }
.regie .yn { width: 140px; }
.days { display: grid; gap: 12px; }
.day { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 12px; display: grid; gap: 10px; background: var(--sunken); }
.day-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.day-head .spacer { flex: 1; }
.techs { display: grid; gap: 8px; }
.tech { display: grid; grid-template-columns: 112px minmax(0, 1fr) 150px 40px; gap: 8px; align-items: center; }
.tech .role { font-size: 13px; color: var(--muted); }
.tech .role.bl { color: var(--accent-text); font-weight: 600; }
.hours { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.hours .btn { border: 0; border-radius: 0; min-height: 42px; padding: 0; font-size: 18px; background: var(--sunken); }
.hours .in { border: 0; border-radius: 0; text-align: center; padding: 6px 2px; min-width: 0; -moz-appearance: textfield; }
.hours .in::-webkit-inner-spin-button, .hours .in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.total.split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.total.split > div { display: grid; gap: 2px; }
.total.split span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.total.split b { font-size: 20px; color: var(--ink); }
.total.split .all b { color: var(--accent-text); font-size: 24px; }
.mats { display: grid; gap: 8px; margin-bottom: 8px; }
.mat { display: grid; grid-template-columns: minmax(0, 1fr) 100px 80px 40px; gap: 8px; align-items: center; }
.ph.new img { outline: 2px dashed var(--accent); outline-offset: -2px; }
.regie .send .row .spacer { flex: 1; }
@media (max-width: 760px) {
  .regie .grid.site { grid-template-columns: minmax(0, 1fr) auto; }
  .regie .grid.site > :nth-child(3) { grid-column: 1 / -1; }
  .tech { grid-template-columns: minmax(0, 1fr) 40px; }
  .tech .role { grid-column: 1 / -1; margin-bottom: -4px; }
  .tech [data-tn] { grid-column: 1 / -1; }
  .tech .hours { grid-column: 1; }
  .mat { grid-template-columns: minmax(0, 1fr) 90px 40px; }
  .mat > :first-child { grid-column: 1 / -1; }
  .total.split b { font-size: 17px; }
  .total.split .all b { font-size: 20px; }
}
.combo { position: relative; }
.combo-list { color: var(--ink); position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: min(290px, 55vh); overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.combo-list li { padding: 10px 12px; border-radius: 6px; cursor: pointer; font-size: 15px; }
.combo-list li b { color: var(--accent-text); font-weight: 600; }
.combo-list li[aria-selected="true"], .combo-list li[role=option]:active { background: var(--accent-soft); }
@media (hover: hover) { .combo-list li[role=option]:hover { background: var(--accent-soft); } }
.combo-list li.none { cursor: default; color: var(--muted); font-size: 13px; }
.pill.billed { background: var(--sunken); color: var(--muted); border: 1px solid var(--line); }
.chips.filter { margin-bottom: 12px; }
.chips.filter .cnt { font-size: 12px; opacity: .75; margin-left: 2px; }

/* Kartenvorschau (Luftbild + GWR, Klick öffnet map.geo.admin.ch) */
.geo-thumb { width: 210px; max-width: 100%; flex: none; }
.gt-link { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--sunken); }
.gt-link:hover, .gt-link:focus-visible { border-color: var(--accent); }
.gt-map { position: relative; width: 210px; max-width: 100%; height: 210px; overflow: hidden; background: #2b2f2a; }
.gt-map img { position: absolute; display: block; max-width: none; }
.gt-map .gt-wms { left: 0; top: 0; width: 210px; height: 210px; }
.gt-pin { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid var(--accent, #FF6600); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.gt-wait { display: grid; place-items: center; color: var(--muted); font-size: 13px; border: 1px solid var(--line); border-radius: 10px; }
.gt-cap { display: flex; justify-content: space-between; gap: 8px; padding: 6px 9px; font-size: 12px; }
.gt-cap .gt-src { color: var(--muted); }
.gt-cap { flex-wrap: wrap; }

.regie .geo-thumb { margin-top: 4px; }
.gt-popup { position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .4); display: grid; gap: 8px; width: 232px; }
.gt-popup .gt-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.linklike { all: unset; cursor: pointer; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.linklike:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Platz der Kartenvorschau */
.rail-col { position: sticky; top: calc(env(safe-area-inset-top) + 72px); display: grid; gap: 14px; align-self: start; }
.rail-col .rail { position: static; }
.geo-mob { display: none; }
.ort-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.ort-row .geo-thumb { margin: 0; }
@media (max-width: 760px) {
  .rail-col { position: static; }
  .geo-desk { display: none; }
  .geo-mob { display: block; }
  .geo-mob { margin-bottom: 4px; }
  .ort-row { grid-template-columns: minmax(0, 1fr); }
}
.modal .tools3 { width: auto; grid-template-columns: repeat(3, auto); } .modal .tools3 button { padding: 6px 14px; min-height: 36px; }

/* Skizze Stockwerke und OTO-Standorte */
.sk-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sk-mode { width: auto; grid-template-columns: repeat(5, auto); }
.sk-mode button { padding: 6px 10px; font-size: 13px; }
.sk-floors { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-canvas { border: 1px solid var(--line); border-radius: 8px; background: var(--sunken); color: var(--ink); padding: 6px; touch-action: none; user-select: none; }
.sk-canvas svg { display: block; width: 100%; height: auto; cursor: crosshair; }
.s-sketch { background: #fff; border-radius: 6px; padding: 6px; }
.s-sketch svg { display: block; width: 100%; height: auto; max-width: 560px; }
@media (max-width: 760px) { .sk-mode { grid-template-columns: repeat(3, auto); } }

.sk-limit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent-soft); font-size: 13px; }
.test-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 1px 6px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); vertical-align: middle; }
.danger-zone { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 6px; }
.danger-zone .row { flex-wrap: wrap; }
.oto-over td { background: var(--accent-soft); }
/* OTDR-Auswertung */
.pill.fail { background: var(--mark-soft); color: var(--mark); }
.otdr-tbl tr[data-m] { cursor: pointer; }
.otdr-tbl tr.dim td { opacity: .55; }
.otdr-tbl .pill { white-space: nowrap; }
.th-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; padding: 4px 0; }
.th-sort .arr { font-size: 10px; opacity: .45; }
.th-sort:hover, .th-sort.on { color: var(--accent-text); }
.th-sort.on .arr { opacity: 1; }
.th-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.linkbtn { all: unset; cursor: pointer; color: var(--accent-text); text-decoration: underline; }
.linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.otdr-tbl th.sel, .otdr-tbl td.sel { width: 34px; padding-right: 0; cursor: default; }
.otdr-tbl td.sel input, .otdr-tbl th.sel input { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; margin: 2px 0 0; }
.otdr-tbl tr.picked td { background: var(--accent-soft); }
.sel-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent-soft); margin: 8px 0; }
.sel-bar b { margin-right: 4px; }
.sel-ask { margin: 8px 0; display: grid; gap: 6px; }
.sel-ask ul { margin: 0; }
.sel-ask p { margin: 0; }
.sel-ask .row { flex-wrap: wrap; gap: 8px; }
.sel-hint { margin: 6px 0; }
.drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); font-size: 14px; margin: 10px 0; }
.drop.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.otdr-wrap { overflow-x: auto; color: var(--ink); }
.otdr-chart { display: block; width: 100%; min-width: 560px; height: auto; }
.otdr-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; }
.otdr-kv div { display: grid; gap: 2px; min-width: 0; } .otdr-kv span { color: var(--muted); font-size: 12px; } .otdr-kv b { font-weight: 500; overflow-wrap: anywhere; }
.reasons { margin: 6px 0 0; padding-left: 18px; }
ul.plain { margin: 6px 0; padding-left: 18px; }

/* Rechtstexte (recht.php) und Links in der Fusszeile */
.foot-legal { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.legal-nav a { color: var(--muted); }
.legal-nav b { color: var(--accent-text); font-weight: 600; }
.legal { gap: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.legal h1 { font-size: 26px; }
.legal h2 { font-size: 18px; margin-top: 14px; }
.legal h3 { font-size: 16px; margin-top: 6px; }
.legal p, .legal ul { margin: 0; }
.legal ul { padding-left: 20px; display: grid; gap: 4px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; display: block; overflow-x: auto; }
.legal th, .legal td { overflow-wrap: normal; hyphens: auto; min-width: 7em; border-bottom: 1px solid var(--line); padding: 6px 8px 6px 0; text-align: left; vertical-align: top; }
.legal th { font-weight: 600; }
.legal a { color: inherit; text-decoration-color: var(--accent); }

/* Adresse, deren BEP-Protokoll eine andere Unternehmung erfasst (nicht anklickbar) */
.item.foreign { opacity: .6; cursor: default; }
.item.foreign:hover { border-color: var(--line); }
/* Logo als Link zurück (recht.php) */
.brand-home { display: flex; align-items: baseline; gap: 10px; color: inherit; text-decoration: none; }
.brand-home .logo { align-self: center; }
.brand-home:hover b { color: var(--accent-text); }

/* Einstellungen breiter: mehr Platz für Listen, Kopf- und Fusszeile gleich breit */
.wrap:has(> .settings), body:has(.settings) .bar-in, body:has(.settings) .foot-in { max-width: 1360px; }

/* Benutzerliste: eine Zeile pro Benutzer, bei wenig Platz als Karten. «Bearbeiten» ist immer sichtbar, ohne seitliches Scrollen. */
.u-list { container-type: inline-size; display: grid; }
.u-row { display: grid; grid-template-columns: minmax(170px, 1.5fr) minmax(130px, 1fr) minmax(130px, 1.3fr) minmax(110px, .9fr) 128px 104px; gap: 6px 16px; align-items: center; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.u-row:not(.u-head):hover { background: var(--sunken); }
.u-row > * { min-width: 0; }
.u-head { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding-block: 8px; }
.u-row.off .u-who, .u-row.off .u-co, .u-row.off .u-gde, .u-row.off .u-tools { opacity: .55; }
.u-who, .u-co { display: grid; gap: 2px; }
.u-who b { font-weight: 600; overflow-wrap: anywhere; }
.u-mail { color: var(--muted); font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.u-mail:hover { color: var(--accent-text); text-decoration: underline; }
.u-co { font-size: 14px; }
.u-co .role { font-size: 12px; color: var(--muted); }
.u-co .role.r-admin { color: var(--accent-text); font-weight: 600; }
.u-co .role.r-super { color: var(--ink); font-weight: 600; }
.u-gde { font-size: 14px; }
.u-more { white-space: nowrap; }
.u-lbl { display: none; }
.u-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.u-chip { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); white-space: nowrap; }
.u-stat .pill { display: inline-block; }
.u-act { justify-self: end; }
.u-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@container (max-width: 760px) {
  .u-head { display: none; }
  .u-row + .u-row { margin-top: 10px; }
  .u-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; align-items: start; }
  .u-who { grid-column: 1; grid-row: 1; }
  .u-stat { grid-column: 2; grid-row: 1; justify-self: end; }
  .u-co { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: start; gap: 8px; align-items: baseline; }
  .u-co .role::before { content: "· "; }
  .u-gde, .u-tools { grid-column: 1 / -1; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: baseline; }
  .u-lbl { display: block; font-size: 12px; color: var(--muted); }
  .u-act { grid-column: 1 / -1; justify-self: stretch; }
  .u-act .btn { width: 100%; }
}

/* RegieRapport: Text pro Einsatztag */
.day .day-text { margin: 0; }
.day .day-text textarea { min-height: 56px; resize: vertical; }
.tbl tr.day-text-row td { padding-top: 2px; }
.tbl tr.day-text-row .lbl { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.tbl tr.day-text-row .pre { white-space: pre-wrap; }
.day .day-work { margin: 0; }
.day .day-text .note { margin: 4px 0 0; }

/* Tätigkeiten-Auswahl: Pfeil-Knopf, fingerfreundliche Zeilen, Rückmeldung nach der Auswahl */
.combo .in { padding-right: 52px; }
.combo-btn { position: absolute; top: 0; right: 0; bottom: 0; width: 48px; border: 0; border-left: 1px solid var(--line); background: transparent; border-radius: 0 8px 8px 0; cursor: pointer; color: var(--muted); }
.combo-btn::before { content: ""; display: block; width: 9px; height: 9px; margin: -4px auto 0; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s; }
.combo.open .combo-btn { color: var(--accent); }
.combo.open .combo-btn::before { transform: rotate(-135deg); margin-top: 4px; }
.combo-list li[role=option] { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.combo-list li[role=option] + li[role=option] { border-top: 1px solid var(--line); border-radius: 0; }
@media (pointer: coarse) { .combo-list li { padding: 14px 12px; font-size: 16px; min-height: 48px; } }
textarea.flash { animation: flash 1s ease-out; }
@keyframes flash { from { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } }
/* Handy: ganze Tätigkeitenliste als Auswahlfenster von unten */
.combo.sheet::before { content: ""; position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); }
.combo.sheet .combo-list { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; top: auto; max-height: 72vh; padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0; border-bottom: 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .45); }
.combo.sheet .combo-list::before { content: "Tätigkeit wählen"; display: block; padding: 8px 12px 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.combo.sheet .combo-list li { padding: 15px 12px; font-size: 17px; }
body:has(.combo.sheet) { overflow: hidden; }
body:has(.combo.sheet) .bar { pointer-events: none; opacity: .45; } /* Kopfzeile liegt über dem Abdunkeln: nicht versehentlich antippen */

/* ---------- Netzkarte (karte.php) ---------- */
.map-wrap { max-width: 1400px; }
.map-tools { display: grid; gap: 10px; margin-bottom: 12px; }
.map-tabs { margin: 0; }
.map-tabs button { font-size: 15px; padding: 10px 18px; }
.map-states { gap: 8px; }
.chip.map-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; min-height: 36px; color: var(--muted); }
.chip.map-chip i { width: 12px; height: 12px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 2px var(--c, var(--line)); opacity: .7; flex: none; }
.chip.map-chip[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip.map-chip[aria-pressed="true"] i { background: var(--c, currentColor); box-shadow: 0 0 0 1.5px #fff; opacity: 1; }
.chip.map-chip .cnt { font-family: var(--f-mono); font-size: 12px; opacity: .8; }
.map-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.map-search { display: grid; gap: 4px; flex: 1 1 260px; max-width: 460px; font-size: 13px; color: var(--muted); font-weight: 500; }
.map-box { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--sunken); }
#map { height: calc(100vh - 330px); height: calc(100dvh - 330px); min-height: 420px; width: 100%; font-family: var(--f-body); }
.map-info { margin: 8px 0 12px; }
.map-box.has-detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; }
.map-detail { position: relative; background: #fff; color: #1b1b1b; border-left: 1px solid var(--line); padding: 16px 18px; overflow-y: auto; max-height: calc(100dvh - 330px); min-height: 420px; }
.map-detail[hidden] { display: none; }
.map-detail .map-pop { min-width: 0; gap: 10px; }
.map-detail .map-pop-head b { font-size: 18px; padding-right: 36px; }
.map-detail .map-pop-head span { font-size: 14px; }
.map-detail .map-pop-row { padding-top: 10px; }
.map-detail .map-pop-row a { color: #B84A00; }
.map-detail .map-pop-ids { font-size: 13px; line-height: 1.6; }
.map-detail .map-pop-ids a { color: #B84A00; }
.map-detail .map-ext { margin-left: 0; font-size: 13px; }
.map-detail-x { position: absolute; top: 8px; right: 8px; color: #5C5C5C; min-height: 36px; }
.map-wait { color: var(--accent-text); }
.map-warn { color: var(--mark); }
.map-base { display: flex; background: #fff; border-radius: 8px; box-shadow: 0 1px 5px rgba(0,0,0,.35); overflow: hidden; }
.map-base button { border: 0; background: #fff; color: #222; padding: 8px 11px; font: 500 13px var(--f-body); cursor: pointer; min-height: 36px; }
.map-base button + button { border-left: 1px solid #ddd; }
.map-base button[aria-pressed="true"] { background: var(--accent); color: #0A0A0A; font-weight: 600; }
.leaflet-bar a.map-fit { display: grid; place-items: center; color: #222; }
.leaflet-container .leaflet-popup-content { margin: 12px 14px; font: 14px/1.45 var(--f-body); }
.leaflet-container a { color: #B84A00; }
.leaflet-tooltip { font: 13px var(--f-body); }
.map-pop { display: grid; gap: 8px; min-width: 210px; color: #1b1b1b; }
.map-pop-head { display: grid; gap: 1px; }
.map-pop-head b { font-size: 15px; }
.map-pop-head span { color: #5C5C5C; font-size: 13px; }
.map-pop-head .map-warn { color: #B42323; }
.map-pop-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid #e5e5e5; padding-top: 7px; }
.map-pop-row b { width: 42px; font-size: 12px; color: #5C5C5C; letter-spacing: .04em; }
.map-pop-row a { margin-left: auto; font-weight: 500; }
.map-pop-ids { font-size: 12px; padding-left: 50px; color: #333; }
.map-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.map-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.map-pop .map-pill { border-color: #ddd; color: #1b1b1b; }
.map-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.map-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.map-near-go { border: 1px solid var(--line); background: var(--sunken); color: var(--ink); border-radius: 6px; padding: 4px 8px; font: 12px var(--f-mono); min-width: 64px; cursor: pointer; }
.map-near-go:hover { border-color: var(--accent); }
@media (max-width: 760px) {
  .map-tabs button { flex: 1; padding: 10px 8px; }
  .map-page .head h1 { font-size: 22px; }
  .map-page .head .sub { display: none; }
  .map-states { gap: 6px; }
  .chip.map-chip { padding: 4px 10px; min-height: 34px; font-size: 13px; }
  .map-row { flex-wrap: nowrap; }
  .map-search { max-width: none; flex: 1 1 auto; min-width: 0; }
  .map-row .btn { flex: none; padding: 9px 10px; }
  .map-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 2px 10px; }
  .map-list li > .map-pill { grid-column: 2; justify-self: start; }
  .map-list li > a, .map-list li > span:not(.map-pill) { grid-column: 2; }
  #map { height: 62vh; height: 62dvh; min-height: 340px; }
  .map-box.has-detail { grid-template-columns: 1fr; }
  .map-box.has-detail #map { height: 42vh; height: 42dvh; min-height: 260px; }
  .map-detail { border-left: 0; border-top: 1px solid var(--line); max-height: none; min-height: 0; }
  .map-base button { padding: 8px 8px; font-size: 12px; }
}

/* Heller Modus: weisser Film hinter dem Inhalt, damit Text vor dem Netz-Hintergrund (assets/netz.js) gut lesbar bleibt.
   Der weiche Rand (box-shadow in derselben Farbe) lässt das Netz daneben sichtbar. Keine backdrop-filter: würde fixierte Fenster (Modals) im Inhalt verschieben. */
:root[data-theme="light"] main.wrap:not(.map-wrap), :root[data-theme="light"] main.narrow, :root[data-theme="light"] .site-foot .foot-in {
  background: rgba(255, 255, 255, .78); box-shadow: 0 0 36px 18px rgba(255, 255, 255, .78); border-radius: 18px;
}
@media print { :root[data-theme="light"] main.wrap, :root[data-theme="light"] main.narrow, :root[data-theme="light"] .site-foot .foot-in { background: none; box-shadow: none; } }
