/* ==========================================================================
   Häuser-Ranking – vFOC-Design-System (Tokens/Komponenten aus FOC-orm feat/ui)
   mit der Markenfarbe von kuehn-dienstleistungen.de (Violett → Cyan).
   Standard Dunkel, Hell nach Systemeinstellung. Komponenten nutzen nur Tokens.
   ========================================================================== */

:root {
	color-scheme: dark;
	/* Flächen */
	--bg: #080c16;
	--surface: #0f172a;
	--surface-2: #131d33;
	--border: #1e293b;
	--border-strong: #334155;
	/* Text */
	--text: #f1f5f9;
	--text-muted: #94a3b8;
	--text-dim: #64748b;
	/* Akzent (Marke: Violett, Verlauf zu Cyan) */
	--accent: #a78bfa;
	--accent-strong: #7c3aed;
	--accent-hover: #6d28d9;
	--accent-2: #22d3ee;
	--accent-soft: rgb(167 139 250 / .14);
	--accent-border: rgb(167 139 250 / .45);
	--on-accent: #ffffff;
	--gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
	/* Status */
	--ok: #34d399;
	--ok-soft: rgb(52 211 153 / .14);
	--warn: #fbbf24;
	--warn-soft: rgb(251 191 36 / .14);
	--danger: #f87171;
	--danger-strong: #dc2626;
	--danger-soft: rgb(248 113 113 / .14);
	/* Effekte */
	--shadow-lg: 0 30px 80px rgb(0 0 0 / .55);
	--header-bg: rgb(8 12 22 / .85);
	--glow: radial-gradient(700px 320px at 80% -10%, rgb(167 139 250 / .14), transparent 70%);
	/* Form */
	--radius-sm: 6px;
	--radius: 10px;
	--radius-lg: 16px;
	--radius-pill: 999px;
	/* Typografie (Systemschriften – keine externen Dienste) */
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
	--fs-xs: .78rem;
	--fs-sm: .9rem;
	/* Abstände */
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	--page-max: 1440px;
	--ease: cubic-bezier(.4, 0, .2, 1);
	--select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2394a3b8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: light) {
	:root {
		color-scheme: light;
		--bg: #f8fafc;
		--surface: #ffffff;
		--surface-2: #f1f5f9;
		--border: #e2e8f0;
		--border-strong: #cbd5e1;
		--text: #0f172a;
		--text-muted: #475569;
		--text-dim: #64748b;
		--accent: #6d28d9;
		--accent-strong: #7c3aed;
		--accent-hover: #6d28d9;
		--accent-2: #0891b2;
		--accent-soft: #ede9fe;
		--accent-border: #c4b5fd;
		--ok: #15803d;
		--ok-soft: #dcfce7;
		--warn: #b45309;
		--warn-soft: #fef3c7;
		--danger: #b91c1c;
		--danger-strong: #dc2626;
		--danger-soft: #fee2e2;
		--shadow-lg: 0 24px 60px rgb(15 23 42 / .18);
		--header-bg: rgb(255 255 255 / .88);
		--glow: radial-gradient(700px 320px at 80% -10%, rgb(124 58 237 / .08), transparent 70%);
		--select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23475569' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	}
}

/* ---- Basis ---- */
*, *::before, *::after { box-sizing: border-box; }
* { min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
	background: var(--glow) no-repeat, var(--bg); color: var(--text);
	font: 1rem/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: break-word; }
h1 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
[hidden] { display: none !important; }

.muted { color: var(--text-muted); }
.small { font-size: var(--fs-sm); }
.eyebrow { color: var(--accent); font-weight: 700; font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .8em; }
.mt-4 { margin-top: var(--space-4); } .mt-5 { margin-top: var(--space-5); } .mb-0 { margin-bottom: 0; }
.msg { font-size: var(--fs-sm); color: var(--text-muted); }
.msg:empty { display: none; }

/* Layout-Helfer */
.page { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: var(--space-5) max(20px, 3vw) 64px; flex: 1 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3) var(--space-4); margin-bottom: var(--space-5); }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--text-muted); max-width: 70ch; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin: var(--space-6) 0 var(--space-3); }
.section-title h3 { margin: 0; }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-2); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.spread { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.grid-auto { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.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; }

/* ---- App-Header ---- */
.app-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--header-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
.app-header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; min-height: 60px; max-width: var(--page-max); margin: 0 auto; padding: 0 max(20px, 3vw); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.brand span:last-child { white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 18px rgb(167 139 250 / .3); flex: none; display: block; }
.app-nav { display: flex; align-items: center; gap: 2px; align-self: stretch; }
/* Aktiver Bereich: gerade Linie an der Unterkante des Headers (keine Rundungen) */
.nav-link {
	position: relative; color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: .93rem;
	padding: 0 12px; display: inline-flex; align-items: center; align-self: stretch; min-height: 44px;
}
.nav-link:hover { color: var(--text); }
.nav-link[aria-current="page"] { color: var(--text); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--gradient); }
.who { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Kleine Knöpfe im Header (Online, Benutzer) mit Popover */
.pop-wrap { position: relative; }
.pill-btn {
	display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 12px; border-radius: var(--radius-pill);
	border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 600 var(--fs-sm) var(--font); cursor: pointer; white-space: nowrap;
}
.pill-btn:hover, .pill-btn[aria-expanded="true"] { border-color: var(--border-strong); }
.user-btn { padding-left: 4px; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gradient); color: #0b1020; font-weight: 800; font-size: .85rem; }
.caret { color: var(--text-muted); font-size: .7rem; }
.dot-ok { color: var(--ok); }
.dot-bad { color: var(--danger); }
.popover {
	position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 240px; max-width: min(340px, calc(100vw - 24px)); max-height: 70vh; overflow: auto;
	background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px;
}
.pop-head { padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.pop-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: 500 var(--fs-sm) var(--font); text-decoration: none; cursor: pointer; }
.pop-item:hover { background: var(--surface-2); }
.online-list { list-style: none; margin: 0; padding: 0; }
.online-list li { padding: 6px 10px; border-radius: var(--radius-sm); }
.online-list li.busy b { color: var(--accent); }
.online-list a { color: var(--text); }

/* ---- Buttons ---- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 18px; min-height: 42px; border-radius: 8px; border: 1px solid transparent;
	font: 600 .95rem/1.2 var(--font); text-decoration: none; white-space: nowrap;
	cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
	background: none; color: var(--text);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent-strong); color: var(--on-accent); }
.btn-primary:not(:disabled):hover { background: var(--accent-hover); }
.btn-secondary { border-color: var(--border-strong); color: var(--text); }
.btn-secondary:not(:disabled):hover { border-color: var(--accent); }
.btn-ghost { color: var(--text-muted); }
.btn-ghost:not(:disabled):hover { color: var(--text); background: var(--surface-2); }
.btn-danger { background: var(--danger-strong); color: #fff; }
.btn-danger:not(:disabled):hover { filter: brightness(1.1); }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-sm { padding: 6px 12px; min-height: 34px; font-size: .85rem; }

/* ---- Karten, Badges, Hinweise ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); }
.card > :last-child { margin-bottom: 0; }
.badge {
	display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--radius-pill);
	font-size: var(--fs-xs); font-weight: 700; line-height: 1.6; white-space: nowrap;
	background: var(--accent-soft); color: var(--accent);
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-neutral { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.callout { border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 var(--space-4); font-size: var(--fs-sm); }
.callout-muted { border-left-color: var(--border-strong); background: var(--surface-2); }
.callout-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.callout-danger { border-left-color: var(--danger); background: var(--danger-soft); margin: var(--space-4) 0 0; }
.ko { color: var(--danger); font-weight: 700; }

/* ---- Formulare ---- */
.field { display: grid; gap: 6px; align-content: start; }
label, .field label { font-weight: 600; font-size: var(--fs-sm); color: var(--text); }
.input, .select, .textarea, input[type=file] {
	width: 100%; padding: 9px 12px; min-height: 42px; border-radius: 8px;
	border: 1px solid var(--border-strong); background: var(--bg); color: var(--text);
	font: inherit; line-height: 1.4; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-dim); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input:disabled, .select:disabled, .textarea:disabled { opacity: .6; cursor: not-allowed; border-color: var(--border); }
/* Selects: eigener Pfeil statt Browser-Optik */
.select {
	appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer; text-overflow: ellipsis;
	background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}
.select option { background: var(--surface); color: var(--text); }
.textarea { min-height: 96px; resize: vertical; }
input[type=file] { padding: 6px; }
input[type=file]::file-selector-button { margin-right: 12px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: 600 .9rem var(--font); cursor: pointer; }
.input-group { display: flex; align-items: stretch; }
.input-group > * { border-radius: 0; margin: 0; }
.input-group > :first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.input-group > :last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.input-group > * + * { margin-left: -1px; }
.input-group > .input { flex: 1 1 0; width: auto; }
.input-group > .btn { flex: none; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--accent-strong); margin: 0; }
.fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4); margin: 0 0 var(--space-4); min-width: 0; }
/* Legende als Überschrift im Rahmen statt auf der Linie */
.fieldset > legend { float: left; width: 100%; padding: 0; margin: 0 0 6px; font-weight: 700; font-size: 1rem; }
.fieldset > legend + * { clear: both; }
.form-sections { display: grid; gap: 0; margin-top: var(--space-4); }
.form-sections .fieldset { display: grid; gap: var(--space-3); }
.form-sections .fieldset > legend + * { margin-top: 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.pair { display: grid; gap: var(--space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pair.street { grid-template-columns: minmax(0, 1fr) 6.5em; }
.pair.town { grid-template-columns: 6.5em minmax(0, 1fr); }
.price-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sumline { font-size: var(--fs-sm); margin: var(--space-3) 0 0; color: var(--text-muted); }
.sumline:empty { display: none; }
.sumline b { color: var(--text); font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.filters .field { width: 220px; max-width: 100%; }

/* Kriterien im Bewertungsbogen */
.f { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.fieldset > legend + .f, #personFields > .f:first-child { border-top: 0; padding-top: 4px; }
.f > label { font-size: .95rem; }
.f .pts { font-weight: 700; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--accent); background: var(--accent-soft); padding: 1px 9px; border-radius: var(--radius-pill); }
.f .full, .f .hint { grid-column: 1 / -1; }
.f .hint { font-size: var(--fs-xs); color: var(--text-dim); }

/* Akkordeon (details/summary) */
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: var(--space-4); }
.accordion-item > summary { cursor: pointer; list-style: none; font-weight: 700; display: flex; align-items: baseline; gap: 10px; }
.accordion-item > summary::-webkit-details-marker { display: none; }
.accordion-item > summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; margin-left: auto; }
.accordion-item[open] > summary::after { content: "–"; }
.accordion-item .fieldset:last-child { margin-bottom: 0; }

/* ---- Tabellen ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-dim); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-hover tbody tr:hover { background: var(--surface-2); }
.rank { font-weight: 800; color: var(--accent); }
.hb { background: none; border: 0; color: var(--text); padding: 0; font: 700 1rem var(--font); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 4px; }
.hb:hover { color: var(--accent); text-decoration-color: currentColor; }
.flag { margin-top: 6px; }
tr.out td { color: var(--text-muted); }
tr.out .hb { text-decoration: line-through; color: var(--text-muted); }
.meter { height: 6px; background: var(--surface-2); border-radius: 3px; margin-top: 6px; min-width: 60px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--gradient); border-radius: 3px; }
tr.out .meter i { background: var(--border-strong); }

/* ---- Bewerten ---- */
.grid { display: grid; grid-template-columns: minmax(0, 34fr) minmax(0, 66fr); gap: clamp(16px, 3vw, 32px); align-items: start; }
.side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: var(--space-4); max-height: calc(100dvh - 92px); overflow-y: auto; scrollbar-width: thin; }
.side > .card { flex: none; }

/* Sprungnavigation im Bewerten-Bereich */
.jump { padding: var(--space-4); }
.jump .eyebrow { margin-bottom: 6px; }
.jump ul { list-style: none; margin: 0; padding: 0; }
.jump ul ul { padding-left: 12px; margin: 2px 0 4px; border-left: 1px solid var(--border); }
.jump button {
	display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: var(--radius-sm);
	padding: 3px 8px; font: 500 var(--fs-sm)/1.5 var(--font); color: var(--text-muted); cursor: pointer;
}
.jump button:hover { color: var(--text); background: var(--surface-2); }
.jump button[aria-current="true"] { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
#jumpCats { display: contents; }
[id^="s-"], #hinfo, #availBox, #travelBox, #houseF, #evF, #notesBox, #evBox, .crit { scroll-margin-top: 84px; }

/* Fehlende Stammdaten: Hinweis, kein Fehler */
.input.missing { border-color: var(--warn); border-style: dashed; }
.accordion-item > summary .badge { align-self: center; }

/* Verfügbarkeit */
.avail { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.av { font-size: var(--fs-xs); font-weight: 700; padding: 1px 8px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.av-frei { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.av-anfrage { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.av-belegt { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.period { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 8px 0; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.period:first-child { border-top: 0; }
.period .count { color: var(--text-muted); }

/* Verfügbarkeit in der Hausansicht */
.avrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.avrow:first-child { border-top: 0; }
.avrow .meta { grid-column: 1 / -1; color: var(--text-muted); font-size: var(--fs-xs); }
.avrow .plans { grid-column: 1 / -1; color: var(--text-muted); }
.avrow b { margin-right: 6px; }

/* Modal im Stil der Seite (statt Browser-Dialog) */
.modal { border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(560px, calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 24px); }
.modal::backdrop { background: rgb(2 6 23 / .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal-card { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-lg); }
.modal-card .spread { margin-bottom: 4px; }
.modal-card dl.facts { margin-top: var(--space-3); }
.modal-x { min-height: 34px; padding: 4px 10px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; vertical-align: -3px; margin-right: 8px; }
@media (prefers-reduced-motion: no-preference) {
	.spinner { animation: spin .8s linear infinite; }
	.modal[open] .modal-card { animation: pop .18s var(--ease); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.big { font-size: clamp(64px, 9vw, 108px); font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.of { font-size: 1.1rem; color: var(--text-muted); margin-left: 6px; }
.strip { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 4.5em; gap: 8px; align-items: center; margin-top: 10px; font-size: var(--fs-sm); }
.strip .meter { margin: 0; height: 8px; }
.strip b { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.here { font-size: var(--fs-sm); margin: 12px 0 0; color: var(--accent); }
.here:empty, #roLock:empty { display: none; }
#roLock { color: var(--text-dim); margin: 4px 0 0; }
dl.facts { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 6px 14px; margin: var(--space-4) 0 0; font-size: var(--fs-sm); }
dl.facts dt { color: var(--text-muted); }
dl.facts dd { margin: 0; }
.travel dd b { font-variant-numeric: tabular-nums; }
.veto { border-color: var(--danger-soft); }
.veto-row { border-top: 1px solid var(--border); padding: var(--space-3) 0; }
.veto-row .spread { margin-bottom: 8px; }
.veto-row p { margin: 0 0 8px; }
.ev { border-top: 1px solid var(--border); padding: 12px 0; }
.ev:first-child { border-top: 0; padding-top: 0; }
.conflict { border: 1px solid var(--danger); border-radius: var(--radius); padding: 12px; margin-top: 10px; background: var(--danger-soft); }
.conflict pre { white-space: pre-wrap; font: inherit; background: var(--surface); padding: 10px; border-radius: var(--radius-sm); max-height: 200px; overflow: auto; }

/* ---- Login, Richtlinien ---- */
.login { max-width: 520px; margin: 10vh auto; padding: var(--space-6); }

/* Hausseite */
.house-bar { margin-bottom: var(--space-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.house-bar .btn { padding-left: 6px; }
.house-pick { flex: 1 1 260px; }
.house-title { font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
#houseMain { gap: var(--space-4); }

/* Verwaltung */
.filter-sm { width: 240px; max-width: 100%; }
.ko-fields { display: grid; gap: 0; }
.ko-row { display: grid; grid-template-columns: minmax(0, 1fr) 6.5em minmax(0, 19em); align-items: center; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.ko-row:first-child { border-top: 0; }
.ko-row > .check { grid-column: 1; }
.ko-row > span { grid-column: 2 / -1; }
.ko-val { display: contents; }
@media (max-width: 720px) { .ko-row { grid-template-columns: 6.5em minmax(0, 1fr); } .ko-row > .check { grid-column: 1 / -1; } .ko-row > span { grid-column: 1 / -1; } }
code { font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.rules ol { padding-left: 1.3em; margin: 0; display: grid; gap: 8px; }
.rules li { max-width: 80ch; }

/* ---- Responsiv ---- */
@media (max-width: 960px) {
	.grid { grid-template-columns: minmax(0, 1fr); }
	.side { position: static; max-height: none; overflow: visible; }
	/* Auf schmalen Bildschirmen: Sprungleiste als waagerechte Chips */
	.jump { padding: 10px 12px; }
	.jump .eyebrow { display: none; }
	.jump ul, .jump ul ul { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; border: 0; }
	.jump li { display: contents; }
	.jump button { width: auto; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 2px 10px; }
}
@media (max-width: 720px) {
	.app-header { position: static; }
	.app-header-inner { padding-top: 8px; row-gap: 4px; }
	.app-nav { order: 3; width: 100%; overflow-x: auto; }
	.who { margin-left: auto; }
	.user-name { display: none; }
	.popover { position: fixed; top: var(--pop-top, 64px); right: 12px; left: 12px; max-width: none; }
	.card { padding: var(--space-4); }
	.price-grid, .pair.even { grid-template-columns: minmax(0, 1fr); }
	dl.facts { grid-template-columns: minmax(0, 1fr); gap: 0 }
	dl.facts dd { margin-bottom: 8px; }
	.input-group { flex-wrap: wrap; gap: 8px; }
	.input-group > * { border-radius: 8px !important; margin-left: 0 !important; }
	.input-group > .input { flex-basis: 100%; }
	/* Ranking als gestapelte Karten */
	.stack-table thead { display: none; }
	.stack-table tr { display: grid; padding-block: 10px; border-bottom: 1px solid var(--border); }
	.stack-table td { display: flow-root; border: 0; padding: 3px 14px; padding-inline-start: 8em; text-align: start !important; }
	.stack-table td::before { content: attr(data-l); float: inline-start; width: 7.5em; margin-inline-start: -8em; color: var(--text-dim); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
	.stack-table td:empty { display: none; }
}
@media (prefers-reduced-motion: no-preference) { .meter i { transition: width .35s var(--ease); } }
