@font-face { font-family: 'Bricolage'; src: url(/fonts/bricolage.woff2) format('woff2-variations'); font-weight: 200 800; font-display: swap; 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: 'Bricolage'; src: url(/fonts/bricolage-ext.woff2) format('woff2-variations'); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0; }
@font-face { font-family: 'DM Sans'; src: url(/fonts/dmsans-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(/fonts/dmsans-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(/fonts/dmsans-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(/fonts/dmsans-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #15111B; --bg-deep: #0F0C14; --surface: #1F1927; --surface2: #2A2233; --surface3: #322939;
  --line: #2E2638; --line2: #3A3046; --line3: #4A3D57;
  --text: #F3ECE4; --text2: #E6DDE8; --muted: #ABA1B0; --muted2: #9C92A3;
  --accent: #F2A65A; --accent-hi: #FFB673; --on-accent: #15111B;
  --ok: #AFD07F; --few: #F2A65A; --bad: #FF9DA6;
  --radius: 20px; --nav-h: 76px;
  --disp: 'Bricolage', 'DM Sans', system-ui, sans-serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg-deep); color: var(--text); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.disp { font-family: var(--disp); }
.muted { color: var(--muted); }
.f-tanz { --fc: #F2A65A; --ft: #3A2615; }
.f-naehe { --fc: #EE8499; --ft: #3A1C25; }
.f-atem { --fc: #94BAF3; --ft: #1C2638; }
.f-klang { --fc: #AFD07F; --ft: #232E18; }
.f-dating { --fc: #62CBC6; --ft: #16302F; }
.f-feste { --fc: #CF8BE2; --ft: #2E1C36; }
.f-none { --fc: #ABA1B0; --ft: #2A2233; }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
.view { padding: 18px 16px calc(var(--nav-h) + 96px); display: flex; flex-direction: column; gap: 16px; }
.view.no-nav { padding-bottom: 120px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.topbar .kicker { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
h1.title { margin: 0; font-family: var(--disp); font-size: 2rem; line-height: 1.05; font-weight: 700; letter-spacing: -0.6px; }
h2.section { margin: 0; font-family: var(--disp); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.2px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 6px; }
.sec-head .muted { font-size: 0.8125rem; }

.iconbtn { width: 44px; height: 44px; flex: none; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.iconbtn:hover { border-color: var(--line3); color: var(--text); }
.iconbtn.saved { color: var(--accent); border-color: #5A4330; }
.iconbtn.saved svg { fill: var(--accent); }
.iconbtn.big { width: 52px; height: 52px; border-radius: 26px; }
.avatar { width: 44px; height: 44px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--on-accent); flex: none; border: 0; font-size: 1rem; }
.av { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--on-accent); flex: none; width: 24px; height: 24px; font-size: 0.6875rem; border: 2px solid var(--surface); }
.avs { display: inline-flex; }
.avs .av + .av { margin-left: -7px; }

.pill { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 0.875rem; font-weight: 500; }
.pill:hover { border-color: var(--line3); color: var(--text); }
.hscroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.hscroll::-webkit-scrollbar { display: none; }
.fchip { min-height: 44px; flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--line); background: transparent; color: var(--text2); font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.fchip:hover { border-color: var(--line3); }
.fchip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--fc, currentColor); flex: none; display: inline-block; }
.chip { min-height: 26px; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 13px; background: var(--surface2); font-size: 0.75rem; font-weight: 600; color: var(--fc, var(--text2)); }
.st { min-height: 26px; display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 13px; font-size: 0.75rem; font-weight: 600; border: 1px solid var(--line2); color: var(--text2); }
.st.few { color: var(--few); border-color: #5A4330; }
.st.full { color: var(--bad); border-color: #5C2D36; }
.st.limit { color: #F6C3CF; border-color: #5C2D36; background: #2A1820; }
.st.dupe { color: var(--accent); border-style: dashed; }

.card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--surface2); }
.card.past { opacity: 0.8; }
.card.full .card-title { color: var(--text2); }
.card-top { display: flex; gap: 10px; align-items: flex-start; }
.card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; color: var(--text); }
.card-main:hover { color: var(--text); }
.card-main:hover .card-title { text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 4px; }
.when { font-size: 0.8125rem; font-weight: 600; color: var(--accent); }
.card-title { font-family: var(--disp); font-size: 1.125rem; line-height: 1.25; font-weight: 600; overflow-wrap: anywhere; }
.meta { font-size: 0.875rem; color: var(--muted); }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.social { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; color: var(--text2); }
.list { display: flex; flex-direction: column; gap: 22px; }
.list section { display: flex; flex-direction: column; gap: 10px; }
.list section .cards { display: flex; flex-direction: column; gap: 10px; }

.empty { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--line2); display: flex; flex-direction: column; gap: 8px; }
.empty strong { font-family: var(--disp); font-size: 1.125rem; }
.more { align-self: center; }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 6px 8px calc(14px + env(safe-area-inset-bottom)); background: rgba(21, 17, 27, 0.97); border-top: 1px solid var(--surface2); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 560px; margin: 0 auto; }
.nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; font-size: 0.6875rem; font-weight: 600; color: var(--muted2); border-radius: 14px; }
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--accent); }
.nav .badge { position: absolute; top: 8px; left: calc(50% + 7px); width: 8px; height: 8px; border-radius: 4px; background: #62CBC6; }
.fab { position: fixed; z-index: 31; right: max(18px, calc(50vw - 280px + 18px)); bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border-radius: 30px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 28px rgba(242, 166, 90, 0.32); border: 0; }
.fab:hover { color: var(--on-accent); background: var(--accent-hi); }

/* Kalender */
.cal { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 22px; background: #1A1521; border: 1px solid var(--surface2); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 0.75rem; font-weight: 600; padding: 4px 0; color: var(--muted); }
.day { height: 50px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 0.9375rem; font-weight: 500; padding: 0; }
.day:hover { border-color: var(--line2); }
.day.out { color: #6F6577; }
.day.today { border-color: var(--accent); }
.day.sel { background: var(--text); color: var(--bg); font-weight: 700; }
.day .dots { display: flex; gap: 3px; height: 6px; align-items: center; }
.day .dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--fc); display: block; }
.legend { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; color: var(--fc); }
.row { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--surface2); color: var(--text); }
.row:hover { border-color: var(--line3); color: var(--text); }
.row .time { width: 58px; flex: none; font-size: 0.9375rem; font-weight: 700; color: var(--accent); }

/* Karte */
.mapwrap { position: relative; margin: -18px -16px 0; height: calc(100dvh - var(--nav-h)); }
#map { position: absolute; inset: 0; background: #15111B; }
.map-ctrl { position: absolute; left: 16px; right: 16px; top: 16px; z-index: 500; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.map-ctrl > * { pointer-events: auto; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 4px; gap: 4px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.seg button { min-height: 36px; border: 0; border-radius: 18px; background: transparent; color: #C9BFCC; font-size: 0.8125rem; font-weight: 600; }
.seg button.on { background: var(--text); color: var(--bg); }
.sheet-map { position: absolute; left: 0; right: 0; bottom: 0; z-index: 500; padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; max-height: 40%; overflow-y: auto; }
.handle { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line2); flex: none; }
.pin { width: 30px; height: 30px; border-radius: 15px; border: 3px solid var(--bg); background: var(--fc); color: var(--bg); font-size: 0.8125rem; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
.pin.sel { width: 40px; height: 40px; border-radius: 20px; border-color: var(--text); }
.home-pin { width: 16px; height: 16px; border-radius: 8px; background: var(--text); border: 3px solid var(--bg); box-shadow: 0 0 0 8px rgba(243, 236, 228, 0.12); }
.leaflet-container { font-family: var(--sans); background: #15111B; }
.tiles-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(185deg) brightness(0.82) contrast(0.92) saturate(0.6); }
.leaflet-control-attribution { background: rgba(21, 17, 27, 0.8) !important; color: var(--muted) !important; font-size: 0.625rem; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-div-icon { background: transparent; border: 0; }
.mini { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--surface2); color: var(--text); }
.mini:hover { background: var(--surface3); color: var(--text); }

/* Details */
.hero { position: relative; height: 200px; margin: -18px -16px 0; background: var(--ft); overflow: hidden; }
.hero svg.rings { position: absolute; inset: 0; }
.hero .bar { position: absolute; left: 16px; right: 16px; top: 14px; display: flex; justify-content: space-between; gap: 8px; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.info { display: flex; gap: 14px; align-items: flex-start; }
.info .ic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--surface); border: 1px solid var(--surface2); display: flex; align-items: center; justify-content: center; color: var(--text2); }
.info .t1 { font-size: 1rem; font-weight: 600; }
.info .t2 { font-size: 0.875rem; color: var(--muted); }
.box { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--surface2); }
.box h2 { margin: 0; font-family: var(--disp); font-size: 1.1875rem; font-weight: 700; }
.kv { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 0.875rem; line-height: 1.45; }
.kv .k { color: var(--muted); font-weight: 500; }
.tag { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px; font-size: 0.8125rem; font-weight: 700; }
.tag.closed { background: #3A2440; color: #F0D7F6; }
.tag.open { background: #23301A; color: #D4EBB8; }
.tag.reg { background: #2B2117; color: #F6D9BB; }
.bar-p { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar-p span { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: #2B2117; color: #F6D9BB; font-size: 0.8125rem; line-height: 1.45; }
.hint.limit { background: #2A1820; color: #F6C3CF; }
.hint.info { background: #1C2638; color: #CFE0FA; }
.match { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; color: var(--ok); }
.pr { display: grid; grid-template-columns: 96px minmax(0, 1fr) 92px; gap: 10px; align-items: center; font-size: 0.875rem; }
.pr .pk { color: var(--muted); font-weight: 500; }
.pr .pv { color: var(--text2); font-weight: 600; text-align: right; display: flex; flex-direction: column; gap: 1px; }
.seg5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.seg5 i { display: block; height: 10px; border-radius: 5px; background: var(--line); }
.seg5 i.f { background: var(--fc); }
.seg5 i.est { background: transparent; border: 1.5px dashed var(--fc); }
.esttag { font-size: 0.6875rem; font-weight: 700; color: #F6C3CF; }
.src { display: flex; gap: 12px; align-items: center; font-size: 0.875rem; }
.src .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface2); display: flex; align-items: center; justify-content: center; flex: none; }
.actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-width: 560px; margin: 0 auto; padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--surface2); display: flex; gap: 8px; align-items: center; }
.btn { white-space: nowrap; min-height: 52px; padding: 0 18px; border-radius: 26px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); font-size: 0.9375rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { border-color: var(--line3); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn.primary:hover { background: var(--accent-hi); color: var(--on-accent); }
.btn.outline { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); font-weight: 700; }
.btn.done { color: var(--ok); border-color: #3D4A2C; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.small { min-height: 44px; font-size: 0.875rem; padding: 0 14px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.grow { flex: 1; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lbl { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.input { min-height: 48px; width: 100%; min-width: 0; padding: 0 14px; border-radius: 14px; border: 1px solid #75677F; background: var(--surface); color: var(--text); font-size: 1rem; }
textarea.input { min-height: 140px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
select.input { 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) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 359px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.switchrow { display: flex; align-items: center; gap: 14px; }
.switchrow label { flex: 1; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.switchrow .s1 { font-size: 0.9375rem; font-weight: 600; }
.switchrow .s2 { font-size: 0.8125rem; color: var(--muted); line-height: 1.45; }
.switch { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 16px; background: #6E6079; position: relative; cursor: pointer; flex: none; margin: 0; border: 0; }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 12px; background: var(--text); transition: left 0.15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { left: 24px; }
.switch.ok:checked { background: var(--ok); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.875rem; line-height: 1.45; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.tiles { display: flex; gap: 8px; flex-wrap: wrap; }
.tile { min-height: 44px; padding: 0 15px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--text2); display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; }
.tile:hover { border-color: var(--line3); }
.tile.on { background: var(--fc); border-color: var(--fc); color: var(--bg); }
.famh { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; font-weight: 700; color: var(--text2); }
.lvl { display: flex; align-items: center; gap: 12px; min-height: 56px; width: 100%; padding: 8px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; font-size: 0.9375rem; font-weight: 600; }
.lvl .n { width: 28px; height: 28px; flex: none; border-radius: 14px; background: var(--surface2); color: var(--text2); display: flex; align-items: center; justify-content: center; font-size: 0.8125rem; font-weight: 700; }
.lvl.in .n { background: #4A2A36; color: #F7C6D2; }
.lvl.on { border-color: #EE8499; background: #2A1A22; }
.lvl.on .n { background: #EE8499; color: var(--bg); }
.lvl .sub { font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 4px; gap: 4px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.tabs button { min-height: 40px; border: 0; border-radius: 19px; background: transparent; color: #C9BFCC; font-size: 0.875rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tabs button.on { background: var(--text); color: var(--bg); }
.tabs button:disabled { color: #8F8596; cursor: default; }
.soon { font-size: 0.6875rem; font-weight: 700; padding: 2px 7px; border-radius: 9px; background: var(--surface2); color: #C9BFCC; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; border-radius: var(--radius); border: 1.5px dashed var(--line3); background: var(--surface); color: var(--muted); text-align: center; padding: 16px; cursor: pointer; }
.dropzone img { max-height: 220px; max-width: 100%; border-radius: 12px; }
.dupe { border-color: #7A5630; background: #221A14; }
.okbox { border-color: #3D4A2C; background: #1A2016; }
.people { display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; }
.person { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 64px; flex: none; font-size: 0.75rem; font-weight: 600; text-align: center; }
.person .avatar { width: 56px; height: 56px; border-radius: 28px; font-size: 1.25rem; }
.feed-item { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--surface2); }
.menu { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--surface2); overflow: hidden; }
.menu a, .menu button { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 16px; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--surface2); text-align: left; font-size: 0.9375rem; font-weight: 500; width: 100%; }
.menu > :last-child { border-bottom: 0; }
.menu a:hover, .menu button:hover { background: var(--surface2); color: var(--text); }
.menu .chev { margin-left: auto; color: var(--muted); }

/* Bottom-Sheet & Toast */
.backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 6, 11, 0.66); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.sheet { width: 100%; max-width: 560px; background: var(--surface); border-radius: 26px 26px 0 0; border-top: 1px solid var(--line); padding: 10px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; max-height: 88dvh; overflow-y: auto; }
.sheet h2 { margin: 0; font-family: var(--disp); font-size: 1.3125rem; font-weight: 700; }
.opt { min-height: 54px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 16px; white-space: normal; overflow-wrap: anywhere; border-radius: 16px; border: 1px solid var(--line2); background: var(--surface2); color: var(--text); font-size: 0.9375rem; font-weight: 600; text-align: left; }
.opt:hover { border-color: var(--line3); color: var(--text); }
.opt.on { border-color: var(--accent); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); z-index: 2000; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 22px; font-size: 0.875rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); max-width: calc(100vw - 32px); }
.loading { padding: 40px 0; text-align: center; color: var(--muted); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand span { font-family: var(--disp); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.2px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } .switch::after { transition: none; } }

@media (min-width: 900px) {
  #app { max-width: 980px; }
  .nav, .actions { max-width: 980px; }
  .fab { right: calc(50vw - 490px + 24px); }
  .list section .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .view.detail { max-width: 640px; margin: 0 auto; }
}

/* Gerätetextgröße (iOS "Größerer Text") übernehmen; alles andere skaliert über rem mit */
@supports (font: -apple-system-body) { html { font: -apple-system-body; } body { font-family: var(--sans); } }
.toolrow { display: flex; gap: 8px; align-items: center; min-width: 0; }
.toolrow .pill { min-width: 0; }
.grow { flex: 1 1 auto; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.iconbtn { position: relative; }
.iconbtn.on { border-color: var(--accent); color: var(--accent); }
.badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.searchrow .input { min-height: 48px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: #2A2016; border: 1px solid #5A4330; color: var(--accent); font-weight: 600; font-size: .9375rem; }
.banner span { flex: 1; }
.st.new { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.st.unknown { color: #F6C3CF; border-style: dashed; border-color: #5C2D36; }
.textlink { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; font-size: .875rem; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; text-align: left; }
.btn.danger { color: var(--bad); }
button.chip { border: 0; cursor: pointer; min-height: 36px; }
dl.terms { margin: 0; display: flex; flex-direction: column; gap: 4px; max-height: 60dvh; overflow: auto; }
dl.terms dt { font-weight: 700; margin-top: 10px; color: var(--text); }
dl.terms dd { margin: 0; color: var(--text2); line-height: 1.55; font-size: .9375rem; }
.actions .btn { min-width: 0; }
.actions .btn span { overflow: hidden; text-overflow: ellipsis; }
/* Schmale Geräte und große Schrift: Kalender nur als Symbol, Hauptknopf bekommt den Platz */
@media (max-width: 400px) { .actions .btn.cal { padding: 0 14px; } .actions .btn.cal .cal-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.kv > span:last-child { min-width: 0; overflow-wrap: anywhere; }

.actions .sm { display: none; }
@media (max-width: 360px) { .actions .lg { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .actions .sm { display: inline; } }

#map.no-tiles { background: radial-gradient(circle at 50% 50%, #241C2C 0, #15111B 70%); background-image: linear-gradient(#2A223322 1px, transparent 1px), linear-gradient(90deg, #2A223322 1px, transparent 1px); background-size: 40px 40px; }

.legend { flex-wrap: wrap; row-gap: 6px; }
