/* Streifzug: Ausbau 02.10.2026 (features.js). Gleiche Farbwelt: Katzenfarben tragen
   die Daten, Moos die Bedienung, Regen ein eigenes Wasserblau (geprueft gegen beide
   Katzenfarben, hell und dunkel). Nacht = leiser Schleier, nie eine Farbe. */
:root { --rain: #0E8FA8; --night: rgba(28, 39, 35, .06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rain: #2BA3C2; --night: rgba(0, 0, 0, .28); } }
:root[data-theme="dark"] { --rain: #2BA3C2; --night: rgba(0, 0, 0, .28); }

/* Fuenf Reiter */
.seg { grid-template-columns: repeat(5, 1fr); }
.seg button { font-size: 13px; padding: 8px 2px; }
@media (max-width: 899px) { .tabbar { grid-template-columns: repeat(5, 1fr); } .tabbar button { font-size: 11px; } }
@media (min-width: 900px) {
  .panel { width: 440px; }
  .map { left: 440px; }
  .map-top { left: 456px; }
}

/* ---------- Finden ---------- */
.find-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.find-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 11px; border-radius: 999px; border: 1px solid var(--line);
  font-weight: 600; font-size: 14px; color: var(--ink); background: var(--raised); }
.find-btn svg, .find-opt svg { width: 18px; height: 18px; fill: none; stroke: var(--c); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.find-btn svg .f { fill: var(--c); stroke: none; }
.find-box { flex: 1 1 100%; padding: 12px 14px 10px; border-radius: var(--r-m); background: var(--wash); }
.find-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.find-head b { font: 600 16px var(--serif); font-variation-settings: "SOFT" 100; }
.find-x { font-size: 13px; color: var(--ink-2); padding: 4px 2px; }
.find-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.find-opt { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--raised);
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); min-height: 56px; }
.find-opt b { display: block; font-size: 15px; font-weight: 600; }
.find-opt small { display: block; font-size: 12px; color: var(--muted); line-height: 1.25; }
.find-opt.is-ask, .find-opt.is-on { grid-column: 1 / -1; flex-wrap: wrap; justify-content: space-between; }
.find-ask { font-size: 14px; color: var(--ink); flex: 1 1 180px; }
.find-acts { display: inline-flex; gap: 6px; }
.find-acts button, .find-stop { padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; border: 1px solid var(--line); color: var(--ink-2); }
.find-go { background: var(--c); border-color: var(--c) !important; color: #fff !important; }
.find-state { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2); }
.find-state b { color: var(--ink); font-weight: 600; }
.find-state i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--c); border-right-color: transparent; animation: spin 1s linear infinite; flex: none; }
.find-state.on i { border: 0; background: var(--c); animation: livebeat 1.2s infinite; }
.find-left { font-variant-numeric: tabular-nums; }
.find-foot { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.find-row button:disabled { opacity: .55; }

/* Aufzeichnung wartet aufs Tragen */
.rec-wait { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 0; padding: 9px 12px; border-radius: 12px;
  background: var(--line-2); font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.rec-wait span { flex: 1 1 200px; }
.rec-wait button { font-size: 13px; font-weight: 600; color: var(--moss); padding: 2px 0; text-decoration: underline; text-underline-offset: 3px; }

/* Live: Aufwachen mit Zeit statt Endlos-Kreisel */
.live-state.pending > span { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.live-sub { flex-basis: 100%; font-size: 12px; color: var(--muted); font-weight: 400; }
.live-left.wake { font-weight: 600; color: var(--ink); }

/* ---------- Mitteilungen ---------- */
.map-tools .tool#btn-push.on svg { stroke: var(--moss); }
.modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: end center; background: rgba(12, 18, 16, .38);
  padding: 0; animation: fade-in .18s ease-out; }
.modal-card { width: min(520px, 100%); max-height: min(88vh, 760px); overflow: auto; background: var(--surface); color: var(--ink);
  border-radius: var(--r-l) var(--r-l) 0 0; padding: 18px 22px calc(22px + var(--sab)); box-shadow: var(--shadow); }
@media (min-width: 700px) { .modal { place-items: center; } .modal-card { border-radius: var(--r-l); padding-bottom: 24px; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.modal-head h2 { font: 600 24px var(--serif); font-variation-settings: "SOFT" 100, "opsz" 48; margin: 0; }
.modal-head .tool svg { width: 20px; height: 20px; }
.modal-lead { font-size: 15.5px; color: var(--ink); margin: 4px 0 16px; line-height: 1.45; }
.modal-lead.on { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.modal-lead.on i { width: 10px; height: 10px; border-radius: 50%; background: var(--moss); flex: none; }
.modal-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; line-height: 1.4; }
.modal-err { font-size: 14px; color: var(--warn); margin: 10px 0 0; }
.steps { margin: 0 0 8px; padding-left: 20px; font-size: 15px; line-height: 1.7; }
.push-cats { margin-bottom: 6px; }
.push-kinds { list-style: none; margin: 8px 0 14px; padding: 0; }
.push-kinds li { padding: 12px 0; border-top: 1px solid var(--line); }
.push-sw { align-items: flex-start; }
.push-sw .switch-ui { margin-top: 2px; }
.push-sw b { display: block; color: var(--ink); font-weight: 600; font-size: 15px; }
.push-sw small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.night-win { display: flex; align-items: center; gap: 8px; margin: 10px 0 0 48px; font-size: 13.5px; color: var(--ink-2); }
.night-win select { font: inherit; color: var(--ink); background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.push-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.btn-ghost { padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--moss); color: var(--moss); font-weight: 600; font-size: 14.5px; }
.btn-link { font-size: 13.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Wiedergabe ---------- */
.play-bar { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.play-btn { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--moss); color: var(--moss-ink);
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--moss) 70%, transparent); transition: transform .1s; }
.play-btn:active { transform: scale(.94); }
.play-btn svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.play-speed { flex: 1; min-width: 0; }
.play-speed .chip { padding: 5px 10px; font-size: 12.5px; }
.play-tl { height: 20px; margin: 4px 0 -2px; border-radius: 5px; overflow: hidden; background: var(--line-2); }
.play-tl svg { width: 100%; height: 20px; }
.tl-night { fill: var(--night); }
.tl-out { fill: var(--c); }
.scrub.playing input::-webkit-slider-thumb { border-color: var(--moss); }
.play-clock { position: absolute; z-index: 550; left: 50%; top: calc(64px + var(--sat)); transform: translateX(-50%); pointer-events: none;
  display: grid; justify-items: center; padding: 8px 20px 9px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.play-clock b { font: 600 34px/1 var(--serif); font-variation-settings: "SOFT" 100, "opsz" 72; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.play-clock span { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
@media (min-width: 900px) { .play-clock { left: calc(440px + (100% - 440px) / 2); top: 22px; } }

/* ---------- Revier ---------- */
.terr-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); margin: 0 0 12px; }
.terr-key span { display: inline-flex; align-items: center; gap: 7px; }
.terr-key i { width: 16px; height: 11px; border-radius: 4px; }
.k-core i { background: color-mix(in srgb, var(--ink-2) 42%, transparent); }
.k-range i { background: color-mix(in srgb, var(--ink-2) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.k-prev i { box-shadow: inset 0 0 0 1.5px var(--ink-2); background: none; -webkit-mask: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 6px); mask: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 6px); }
.terr-tab th { text-align: right; }
.terr-tab th:first-child { text-align: left; }
.terr-tab tr[class^="c"] th { font: 600 17px var(--serif); font-variation-settings: "SOFT" 100; color: var(--ink); text-align: left; padding: 10px 0; border-top: 1px solid var(--line); }
.terr-tab tr[class^="c"] th i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 7px; vertical-align: 1px; }
.terr-tab { margin-bottom: 10px; }
.delta { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-top: 1px; }
.meet-sec { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.meet-sec #meet-range { margin: 0 0 8px; }
.meets { list-style: none; margin: 0 0 24px; padding: 0; }
.meets li { border-top: 1px solid var(--line); }
.meets li:first-child { border-top: 0; }
.meets button { width: 100%; display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 11px 6px; text-align: left; border-radius: 10px; }
.meets button[aria-pressed="true"] { background: var(--line-2); }
.meets b { display: block; font-size: 14.5px; font-weight: 600; }
.meets small { display: block; font-size: 12.5px; color: var(--muted); }
.meet-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meet-mk, .meet-pin { position: relative; width: 30px; height: 22px; }
.meet-mk i, .meet-pin i { position: absolute; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface); }
.meet-mk i.c0, .meet-pin i.c0 { left: 0; }
.meet-mk i.c1, .meet-pin i.c1 { left: 11px; }
.meet-pin { width: 30px; height: 30px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.meet-pin i { top: 6px; }

/* ---------- Drinnen und draussen (Tagesbaender) ---------- */
.acto { margin: 4px 0 26px; }
.act-row { display: grid; grid-template-columns: 44px 1fr 52px; gap: 8px; align-items: center; padding: 3px 0; }
.act-row[data-day]:hover { background: color-mix(in srgb, var(--line-2) 60%, transparent); border-radius: 8px; }
.act-day { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.act-day small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.act-band { width: 100%; height: 30px; display: block; }
.a-night { fill: var(--night); }
.a-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.a-track { fill: var(--line-2); }
.a-out { fill: var(--c); }
.a-rain { fill: var(--rain); }
.act-sum { display: grid; gap: 1px; justify-items: end; font-variant-numeric: tabular-nums; line-height: 1.15; }
.act-sum b { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.act-sum b small { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.act-sum b::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c); margin-right: 4px; vertical-align: 1px; }
.act-t { font-size: 10.5px; color: var(--muted); }
.act-axis .act-hours { position: relative; height: 14px; display: block; }
.act-axis i { position: absolute; transform: translateX(-50%); font-style: normal; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.act-axis i:first-child { transform: none; }
.act-axis i:last-child { transform: translateX(-100%); }
.legend .rain i.tick { width: 12px; height: 4px; border-radius: 1px; background: var(--rain); }
.legend .night i.sq { background: var(--night); box-shadow: inset 0 0 0 1px var(--line); }
.legend { flex-wrap: wrap; row-gap: 6px; }
.wx td small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }

/* ---------- Bericht ---------- */
.rep .chips { margin: 4px 0 12px; }
.rep-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.rep-dates label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.rep-dates input { display: block; width: 100%; margin-top: 4px; font: 400 15px var(--sans); color: var(--ink); padding: 9px 10px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--raised); }
.rep-go { display: block; text-align: center; text-decoration: none; margin-bottom: 8px; }
