:root {
  --bg: #f5f4ef; --surface: #fff; --sunk: #eeece5; --ink: #1c1e1f; --muted: #686c6e; --line: #dcd9d0; --line2: #c9c5ba;
  --accent: #1f5c4d; --on-accent: #fff; --tint: #e6eee9;
  --ok: #24724a; --near: #96610a; --over: #b23a22;
  --g-house: #35495c; --g-travel: #3f8f80; --g-food: #d0a13f; --g-other: #b3aea2;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --r: 6px; --pad: 14px;
  color-scheme: light;
}
:root[data-accent="marine"] { --accent: #1f4e86; --tint: #e5ecf5; }
:root[data-accent="terrakotta"] { --accent: #a9492a; --tint: #f5e9e3; }
:root[data-accent="aubergine"] { --accent: #5c3b6e; --tint: #eee8f2; }
:root[data-accent="graphit"] { --accent: #33383c; --tint: #e8e8e6; }
:root[data-theme="dunkel"] {
  --bg: #16181a; --surface: #1e2124; --sunk: #25292c; --ink: #e9e7e1; --muted: #9a9d9c; --line: #33383b; --line2: #474d50;
  --accent: #6fbfa6; --on-accent: #10201b; --tint: #23332e; --ok: #6cc592; --near: #e0b25a; --over: #f08a70;
  --g-house: #8aa3bb; --g-travel: #57b3a2; --g-food: #d9b05a; --g-other: #6e6c66; color-scheme: dark;
}
:root[data-theme="dunkel"][data-accent="marine"] { --accent: #86b3ea; --on-accent: #0e1b2b; --tint: #222e3d; }
:root[data-theme="dunkel"][data-accent="terrakotta"] { --accent: #eb9d7f; --on-accent: #2b130a; --tint: #3a2a23; }
:root[data-theme="dunkel"][data-accent="aubergine"] { --accent: #c7a3dc; --on-accent: #22122b; --tint: #322a38; }
:root[data-theme="dunkel"][data-accent="graphit"] { --accent: #c9cdd0; --on-accent: #1a1c1e; --tint: #2c3033; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #16181a; --surface: #1e2124; --sunk: #25292c; --ink: #e9e7e1; --muted: #9a9d9c; --line: #33383b; --line2: #474d50;
    --accent: #6fbfa6; --on-accent: #10201b; --tint: #23332e; --ok: #6cc592; --near: #e0b25a; --over: #f08a70;
    --g-house: #8aa3bb; --g-travel: #57b3a2; --g-food: #d9b05a; --g-other: #6e6c66; color-scheme: dark;
  }
  :root[data-theme="auto"][data-accent="marine"] { --accent: #86b3ea; --on-accent: #0e1b2b; --tint: #222e3d; }
  :root[data-theme="auto"][data-accent="terrakotta"] { --accent: #eb9d7f; --on-accent: #2b130a; --tint: #3a2a23; }
  :root[data-theme="auto"][data-accent="aubergine"] { --accent: #c7a3dc; --on-accent: #22122b; --tint: #322a38; }
  :root[data-theme="auto"][data-accent="graphit"] { --accent: #c9cdd0; --on-accent: #1a1c1e; --tint: #2c3033; }
}
.dense { --pad: 9px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1 { font: 600 1.75rem/1.15 var(--serif); letter-spacing: -.01em; }
h2 { font: 600 1.05rem/1.3 var(--sans); margin: 28px 0 10px; }
h2 small { font-weight: 400; font-size: .85rem; margin-left: 4px; }
h3 { font: 600 .95rem/1.3 var(--sans); margin: 18px 0 8px; }
a { color: var(--accent); text-underline-offset: 2px; }
small { font-size: .82rem; }
.muted { color: var(--muted); } .small { font-size: .84rem; } .grow { flex: 1; }
.ok { color: var(--ok); } .near { color: var(--near); } .over, .bad { color: var(--over); }
.kicker { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

button, input, select, textarea { font: inherit; color: inherit; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line2); background: var(--surface); border-radius: var(--r);
  padding: 7px 12px; cursor: pointer; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .92rem; line-height: 1.3; min-height: 36px; white-space: nowrap; }
button:hover, .btn:hover { border-color: var(--ink); }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.primary:hover { border-color: var(--accent); filter: brightness(1.08); }
button.danger { color: var(--over); }
button.plain { border: 0; background: none; padding: 4px 6px; min-height: 0; color: var(--muted); font-weight: 400; text-decoration: underline; text-underline-offset: 2px; }
button.plain:hover { color: var(--ink); }
button:disabled { opacity: .55; cursor: default; }
input, select, textarea { width: 100%; border: 1px solid var(--line2); border-radius: var(--r); padding: 7px 9px; background: var(--surface); min-height: 36px; }
textarea { resize: vertical; line-height: 1.4; }
label { display: block; font-size: .82rem; color: var(--muted); }
label > input, label > select, label > textarea, label > .seg, label > .swatches, label > span { margin-top: 4px; color: var(--ink); font-size: .95rem; }
.chk { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: .92rem; min-height: 36px; }
.chk input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--accent); flex: none; }
.seg { display: inline-flex; max-width: 100%; border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg button { border: 0; border-radius: 0; background: none; min-height: 34px; }
.seg button + button { border-left: 1px solid var(--line2); }
.seg button.on { background: var(--ink); color: var(--bg); }
.swatches { display: flex; gap: 8px; }
.sw { width: 34px; height: 34px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line2); }
.sw.on { box-shadow: 0 0 0 2px var(--ink); }
.sw-tanne { background: #1f5c4d; } .sw-marine { background: #1f4e86; } .sw-terrakotta { background: #a9492a; } .sw-aubergine { background: #5c3b6e; } .sw-graphit { background: #33383c; }
.range span { display: flex; align-items: center; gap: 10px; }
.range input { padding: 0; border: 0; min-height: 28px; accent-color: var(--accent); background: none; }
.range b { width: 1.2em; text-align: right; font-variant-numeric: tabular-nums; }

/* Anmeldung */
#login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login { width: min(360px, 100%); display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px 24px; }
.login h1 { margin-top: -8px; }
.err { color: var(--over); min-height: 1.4em; font-size: .9rem; }

/* Rahmen */
#app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 22px; padding: 22px 14px 16px; border-right: 1px solid var(--line); background: var(--surface); }
.brand { padding: 0 8px; } .tripTitle { font: 600 1.25rem/1.2 var(--serif); margin: 6px 0 4px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r); color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--sunk); }
.nav a.on { background: var(--tint); color: var(--accent); }
.nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav em { margin-left: auto; font-style: normal; font-size: .75rem; font-weight: 600; background: var(--over); color: #fff; border-radius: 9px; padding: 0 6px; line-height: 18px; }
.sidefoot { margin-top: auto; display: grid; gap: 8px; }
#who { display: block; text-align: left; text-decoration: none; color: var(--ink); font-weight: 600; padding: 6px 8px; white-space: normal; }
#who small { display: block; font-weight: 400; color: var(--muted); }
.mtop { display: none; }
main { padding: 28px 32px 60px; max-width: 1500px; width: 100%; }
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.phead p { margin-top: 4px; }
.pacts, .bar, .tools, .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bar { margin: 12px 0; } .bar.end { justify-content: space-between; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.tools { align-items: flex-end; gap: 10px 14px; margin-bottom: 12px; padding: 12px var(--pad); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tools label:not(.chk) { min-width: 150px; }
.crumb { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.empty { color: var(--muted); padding: 28px 4px; }
.banner { background: var(--tint); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 var(--r) var(--r) 0; margin-bottom: 18px; }
.banner.quiet { background: var(--sunk); border-color: var(--line2); color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0 40px; align-items: start; }
.two.rev { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.two h2:first-child { margin-top: 8px; }
.scroll { overflow-x: auto; }

/* Übersicht */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 18px; }
.stat { padding: 14px 16px; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat small { display: block; color: var(--muted); }
.stat b { display: block; font: 600 1.55rem/1.25 var(--serif); font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: .84rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 8px; }
.rank li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 58px 84px auto; gap: 12px; align-items: center; padding: var(--pad); border-top: 1px solid var(--line); }
.rank li:first-child { border-top: 0; }
.rk { font: 600 1.05rem var(--serif); color: var(--muted); text-align: center; }
.hl { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); text-decoration: none; }
.hl span { min-width: 0; } .hl b, .hl small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl small, .sc small, .pr small { color: var(--muted); font-weight: 400; display: block; font-size: .76rem; }
.hl:hover b { text-decoration: underline; }
.sc, .pr { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; flex: none; background: var(--sunk); }
.none { display: grid; place-items: center; background: var(--sunk); color: var(--muted); font: 600 1.1rem var(--serif); }
.vote { gap: 8px; } .vote b { font-variant-numeric: tabular-nums; background: var(--sunk); border-radius: 9px; padding: 0 7px; font-size: .82rem; line-height: 19px; }
.vote.on { background: var(--tint); border-color: var(--accent); color: var(--accent); } .vote.on b { background: var(--accent); color: var(--on-accent); }
.checks li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.checks li:first-child { border-top: 0; }
.checks li.bad, .checks li.warn, .checks li.okay { color: var(--ink); }
.checks b { flex: 0 0 68px; white-space: nowrap; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; color: var(--muted); }
.checks .bad b { color: var(--over); } .checks .warn b { color: var(--near); } .checks .okay b { color: var(--ok); }
.log li { display: flex; gap: 12px; font-size: .86rem; padding: 4px 0; color: var(--muted); }
.log time { flex: 0 0 100px; white-space: nowrap; font-variant-numeric: tabular-nums; } .log b { color: var(--ink); font-weight: 500; }

/* Karte */
.map { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); margin: 12px 0; }
.map img { position: absolute; width: 256px; height: 256px; max-width: none; }
:root[data-theme="dunkel"] .map img { filter: brightness(.8) contrast(1.05); }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map line { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .7; }
.pin { position: absolute; translate: -50% -50%; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: .8rem; text-decoration: none;
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .35); white-space: nowrap; }
.pin.origin { background: #1c1e1f; color: #fff; } .pin.beach { background: #fff; color: #1c1e1f; border-color: #1c1e1f; }
.attr { position: absolute; right: 0; bottom: 0; background: rgb(255 255 255 / .8); color: #333; font-size: .68rem; padding: 0 5px; }

/* Vergleich */
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--muted); margin: 10px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .lines th i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.legend i.mark { width: 2px; height: 13px; border-radius: 0; background: var(--ink); }
.g-house { background: var(--g-house); } .g-travel { background: var(--g-travel); } .g-food { background: var(--g-food); } .g-other { background: var(--g-other); }
.ruler { position: relative; display: flex; height: 10px; background: var(--sunk); border-radius: 2px; }
.ruler i:first-child { border-radius: 2px 0 0 2px; }
.ruler .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.ctable { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.crow { border-top: 1px solid var(--line); } .crow:first-child { border-top: 0; }
.compare .col { container-type: inline-size; min-width: 0; }
.chead { display: grid; grid-template-columns: minmax(160px, 2.2fr) repeat(3, 64px) minmax(100px, 1.5fr) 124px 50px 58px; gap: 12px; align-items: center; width: 100%;
  padding: var(--pad) 14px; border: 0; border-radius: 0; background: none; text-align: left; font-weight: 400; white-space: normal; min-height: 0; }
button.chead:hover { background: var(--sunk); }
.chdr .chead { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 9px; padding-bottom: 9px; }
.c-name { min-width: 0; } .c-name b { display: block; font-weight: 600; font-size: .96rem; } .c-name small { display: block; color: var(--muted); }
.c-num { text-align: right; font-variant-numeric: tabular-nums; }
.c-pp { text-align: right; } .c-pp b { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; } .c-pp small { display: block; font-size: .76rem; color: var(--muted); }
.crow.near .c-pp b { color: var(--near); } .crow.over .c-pp b { color: var(--over); }
.crow.ok, .crow.near, .crow.over, .vrow.ok, .vrow.near, .vrow.over { color: var(--ink); }
.crow.sel > .chead { background: var(--tint); box-shadow: inset 3px 0 0 var(--accent); }
.compare.split { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 20px; align-items: start; }
@container (max-width: 790px) { .chead { grid-template-columns: minmax(0, 1fr) minmax(90px, 150px) 124px; } .c-x { display: none; } }
.compare aside { position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.crow > .detail { padding: 4px 14px 16px; }
.detail { display: grid; gap: 10px; }
.detail h2 { margin: 0; font: 600 1.25rem/1.2 var(--serif); } .detail h2 a { color: inherit; text-decoration: none; } .detail h2 a:hover { text-decoration: underline; }
.big b { display: block; font: 600 2.1rem/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.big span { display: block; color: var(--muted); font-size: .86rem; margin-top: 2px; }
.lines { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.lines th { text-align: left; font-weight: 400; padding: 4px 0 4px 16px; }
.lines th small { display: block; color: var(--muted); font-size: .76rem; }
.lines td { text-align: right; padding: 4px 0 4px 12px; white-space: nowrap; vertical-align: top; }
.lines thead td { color: var(--muted); font-size: .76rem; }
.lines .g th { padding-left: 0; font-weight: 600; } .lines .g th i { margin-right: 6px; } .lines .g td { font-weight: 600; }
.lines .g th, .lines .g td { border-top: 1px solid var(--line); padding-top: 8px; }
.lines .total th, .lines .total td { border-top: 2px solid var(--ink); }
.matrix { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; background: var(--surface); border: 1px solid var(--line); }
.matrix th, .matrix td { padding: 8px 10px; border-top: 1px solid var(--line); text-align: center; white-space: nowrap; }
.matrix thead th, .matrix thead td { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 400; border-top: 0; }
.matrix th { text-align: left; min-width: 190px; white-space: normal; } .matrix th small { display: block; color: var(--muted); font-weight: 400; }
.matrix th a { color: var(--ink); }
.cell { width: 100%; min-width: 84px; font-weight: 600; border-color: transparent; }
.cell.ok { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); } .cell.near { background: color-mix(in srgb, var(--near) 22%, var(--surface)); }
.cell.over { background: color-mix(in srgb, var(--over) 16%, var(--surface)); } .cell.sel { border-color: var(--ink); }

/* Häuser */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.house { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.house.raus { opacity: .55; }
.photo { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--sunk); }
.ph { width: 100%; height: 100%; object-fit: cover; display: block; font-size: 2.4rem; }
.photo { text-decoration: none; } .ph.none { display: grid; place-items: center; }
.photo em, .photo u { position: absolute; font-style: normal; text-decoration: none; font-size: .76rem; font-weight: 600; padding: 2px 8px; border-radius: 3px; }
.photo em { top: 10px; left: 10px; background: #fff; color: #1c1e1f; } .photo em.st-gebucht { background: var(--accent); color: var(--on-accent); }
.photo u { right: 10px; bottom: 10px; background: rgb(0 0 0 / .65); color: #fff; font-weight: 400; }
.hb { padding: 14px; display: grid; gap: 8px; flex: 1; align-content: start; }
.hrow { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.hb h3 { margin: 0; font: 600 1.12rem/1.25 var(--serif); } .hb h3 a { color: var(--ink); text-decoration: none; } .hb h3 a:hover { text-decoration: underline; }
.score { font-weight: 600; font-variant-numeric: tabular-nums; border: 1px solid var(--line2); border-radius: 4px; padding: 0 7px; font-size: .86rem; }
.facts { font-size: .87rem; line-height: 1.55; } .facts.auto { color: var(--muted); } .facts.big { font-size: .95rem; margin-top: 14px; }
.hprice { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; }
.hprice b { font: 600 1.3rem var(--serif); font-variant-numeric: tabular-nums; } .hprice small { display: block; color: var(--muted); }
.hb .acts { margin-top: auto; padding-top: 4px; }

.hpage { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
.gmain { padding: 0; border: 0; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; cursor: zoom-in; background: var(--sunk); }
.gmain img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gthumbs { display: flex; gap: 6px; margin-top: 6px; overflow-x: auto; padding-bottom: 2px; }
.gthumbs button { flex: none; width: 84px; height: 58px; padding: 0; border: 2px solid transparent; overflow: hidden; opacity: .7; min-height: 0; }
.gthumbs button.on { border-color: var(--ink); opacity: 1; } .gthumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hpage .noimg { aspect-ratio: 16 / 6; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--sunk); border-radius: var(--r); color: var(--muted); }
.notes { color: var(--muted); max-width: 70ch; margin-top: 8px; white-space: pre-line; }
.procon { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.procon ul { list-style: disc; padding-left: 18px; font-size: .92rem; } .procon .pro h3 { color: var(--ok); } .procon .con h3 { color: var(--over); }
.dl > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.dl > div:first-child { border-top: 0; }
.dl dt { color: var(--muted); font-size: .88rem; } .dl dd small { display: block; color: var(--muted); }
.hside { display: grid; gap: 14px; position: sticky; top: 16px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; }
.box h3 { margin: 0; }
.vrows { display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.vrow { display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 9px 12px; text-align: left; white-space: normal; background: none; font-weight: 400; }
.vrow:first-child { border-top: 0; }
.vrow span b { display: block; font-weight: 600; } .vrow small { color: var(--muted); display: block; }
.vrow > b { font-variant-numeric: tabular-nums; font-size: 1.02rem; white-space: nowrap; } .vrow.near > b { color: var(--near); } .vrow.over > b { color: var(--over); }
.vrow.sel { background: var(--tint); box-shadow: inset 3px 0 0 var(--accent); }
.parts li { display: grid; grid-template-columns: 118px 1fr 28px; gap: 10px; align-items: center; font-size: .86rem; padding: 3px 0; }
.parts i { height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; } .parts i b { display: block; height: 100%; background: var(--accent); }
.parts span:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.comments li { padding: 10px 0; border-top: 1px solid var(--line); } .comments li:first-child { border-top: 0; }
.comments time { color: var(--muted); font-size: .8rem; margin: 0 6px; }
#commentForm { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin-top: 8px; }

/* Planung */
.members { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); }
.members th, .members td { padding: 6px 10px; border-top: 1px solid var(--line); text-align: left; }
.members thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 400; border-top: 0; }
.members td:nth-child(3) { width: 130px; } .members input:not([type=checkbox]) { min-width: 100px; } .members tfoot th { font-variant-numeric: tabular-nums; }
.members .chk { min-height: 0; }
.addrow { display: flex; gap: 8px; margin: 10px 0 6px; } .addrow input { flex: 1; min-width: 0; }
.tasks { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tasks li { display: grid; grid-template-columns: 18px minmax(0, 1fr) 118px auto; gap: 10px; align-items: center; padding: 5px 10px; border-top: 1px solid var(--line); }
.tasks li:first-child { border-top: 0; } .tasks li.muted { display: block; padding: 10px; }
.tasks input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.tasks input:not([type=checkbox]) { border-color: transparent; background: none; padding-left: 4px; } .tasks input:not([type=checkbox]):hover { border-color: var(--line2); }
.tasks .done input:not([type=checkbox]) { text-decoration: line-through; color: var(--muted); }
.tasks label { margin: 0; } .tasks select { margin: 0; font-size: .86rem; }

/* Einstellungen und Formulare */
.plainset { border: 0; padding: 0; margin: 0; min-width: 0; }
.set { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 12px 32px; padding: 22px 0; border-top: 1px solid var(--line); }
.set h2, .set h3:first-child { margin-top: 0; } .sethead h2 { margin-bottom: 4px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 14px; align-items: end; }
.fields.one { grid-template-columns: 1fr; } .fields.halves { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 12px; align-items: start; }
.inline { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.cust { display: grid; grid-template-columns: 2fr 1fr 1.4fr 1.4fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
fieldset.travel { border: 1px solid var(--line2); border-radius: var(--r); margin: 14px 0; padding: 10px 14px 12px; min-width: 0; }
fieldset.travel legend { font-weight: 600; padding: 0 6px; font-size: .92rem; }
.calc { margin-top: 10px; font-size: .85rem; color: var(--muted); }
.calc li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-top: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.calc b { color: var(--ink); white-space: nowrap; }

/* Dialog */
dialog { border: 1px solid var(--line); border-radius: 10px; padding: 0 20px 20px; width: min(900px, calc(100vw - 16px)); max-height: calc(100dvh - 24px); overflow: auto; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgb(0 0 0 / .5); }
.dhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 0; background: var(--surface); padding: 16px 0 12px; z-index: 2; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.dhead h2 { margin: 0; font: 600 1.3rem/1.2 var(--serif); }
.pics { display: flex; flex-wrap: wrap; gap: 8px; }
.pics figure { position: relative; width: 132px; height: 92px; }
.pics img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.pics figure button { position: absolute; top: 4px; right: 4px; padding: 0 8px; min-height: 24px; font-size: .8rem; }
.pics figure .first { top: auto; bottom: 4px; left: 4px; right: auto; }
.addpic { width: 132px; height: 92px; display: grid; place-items: center; text-align: center; border: 1px dashed var(--line2); border-radius: 4px; color: var(--ink); cursor: pointer; }
#toast { position: fixed; left: 50%; bottom: 28px; translate: -50% 20px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r); opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s; max-width: calc(100vw - 32px); z-index: 50; font-size: .92rem; }
#toast.on { opacity: 1; translate: -50% 0; }

/* Präsentation */
#show { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: #121415; color: #e9e7e1;
  --bg: #16181a; --surface: #1e2124; --sunk: #2a2e31; --ink: #e9e7e1; --muted: #a3a6a5; --line: #33383b; --line2: #474d50; --ok: #6cc592; --near: #e0b25a; --over: #f08a70;
  --g-house: #8aa3bb; --g-travel: #57b3a2; --g-food: #d9b05a; --g-other: #6e6c66; --tint: #2a2e31; --accent: #e9e7e1; --on-accent: #121415; }
.slide { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.6fr 1fr; }
.stage { position: relative; min-height: 0; background: #000; }
.stage > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage .noimg { height: 100%; display: grid; place-content: center; text-align: center; padding: 24px; color: var(--muted); }
.thumbs { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; gap: 8px; overflow-x: auto; }
.thumbs button { flex: none; width: 92px; height: 62px; padding: 0; overflow: hidden; border: 2px solid transparent; background: none; opacity: .75; }
.thumbs button.on { border-color: #fff; opacity: 1; } .thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.info { overflow: auto; padding: clamp(18px, 3vw, 48px); display: grid; gap: 14px; align-content: start; }
.info h1 { font-size: clamp(1.8rem, 3vw, 3.2rem); }
.lead { font-size: 1.1rem; color: var(--muted); }
#show .big b { font-size: clamp(2.6rem, 4.6vw, 4.6rem); } #show .facts { font-size: 1rem; } #show .legend { margin: 0; }
.shownav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 10px; background: #0b0c0d; }
.shownav span { color: var(--muted); padding: 0 8px; font-variant-numeric: tabular-nums; }
.rankslide { display: block; overflow: auto; padding: clamp(20px, 5vw, 72px); }
.rankslide h1 { font-size: clamp(2rem, 4vw, 3.6rem); margin-bottom: 8px; }
.rankslide ol { margin-top: 28px; display: grid; gap: 14px; max-width: 1100px; }
.rankslide li { display: grid; grid-template-columns: minmax(180px, 1.2fr) 2fr auto; gap: 6px 18px; align-items: center; font-size: 1.15rem; }
.rankslide li small { display: block; color: var(--muted); font-size: .9rem; } .rankslide .names { grid-column: 2 / 4; }
.vbar { height: 14px; border-radius: 2px; background: rgb(255 255 255 / .1); }
.vbar i { display: block; height: 100%; border-radius: 2px; background: #e9e7e1; transition: width .4s; }

/* Schmalere Bildschirme */
@media (max-width: 1179px) {
  .chead { grid-template-columns: minmax(0, 1fr) 150px 128px; }
  .c-x { display: none; }
  .hpage { grid-template-columns: 1fr; } .hside { position: static; }
  .two { grid-template-columns: 1fr; }
  .set { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  #app { display: block; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 20; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); display: block; }
  .brand, .sidefoot { display: none; }
  .nav { grid-template-columns: repeat(5, 1fr); gap: 0; }
  .nav a { flex-direction: column; gap: 3px; padding: 7px 2px 5px; font-size: .68rem; position: relative; }
  .nav a.on { background: none; } .nav svg { width: 22px; height: 22px; }
  .nav em { position: absolute; top: 3px; left: calc(50% + 6px); margin: 0; }
  .mtop { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
  .mtop b { display: block; font: 600 1.05rem/1.2 var(--serif); } .mtop small { display: block; }
  .mtop div { min-width: 0; } .mtop b, .mtop small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main { padding: 18px 16px 32px; }
  h1 { font-size: 1.45rem; }
  button, .btn, input, select, textarea { min-height: 42px; }
  .seg button { min-height: 40px; } .chk input, .tasks input[type=checkbox] { min-height: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat b { font-size: 1.3rem; } .stat span { white-space: normal; }
  .rank li { grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px 10px; }
  .rank .sc { display: none; } .rank .vote { grid-column: 2 / 4; justify-self: start; }
  .tools label:not(.chk) { flex: 1 1 140px; min-width: 0; }
  .compare .col { container-type: normal; }
  .chead { grid-template-columns: minmax(0, 1fr) auto !important; gap: 8px 12px; padding: 12px; }
  .chdr { display: none; } .c-bar { grid-column: 1 / 3; grid-row: 2; }
  .lines th { padding-left: 0; } .lines th small { display: none; }
  .grid { grid-template-columns: 1fr; }
  .dl > div { grid-template-columns: 1fr; gap: 0; }
  .procon { grid-template-columns: 1fr; }
  .cust { grid-template-columns: 1fr 1fr; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
  .tasks li { grid-template-columns: 18px minmax(0, 1fr) auto; } .tasks li label { grid-column: 2; } .tasks li > button { grid-column: 3; grid-row: 1; }
  .fields { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; padding: 0 14px 20px; }
  #toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .slide { grid-template-columns: 1fr; grid-template-rows: 38vh 1fr; }
  .rankslide li { grid-template-columns: 1fr auto; } .rankslide .vbar, .rankslide .names { grid-column: 1 / 3; }
  .phead { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { #toast, .vbar i { transition: none; } }
@media print {
  .side, .mtop, .tools, .pacts, .bar, #toast, .compare aside { display: none !important; }
  #app { display: block; } main { padding: 0; max-width: none; } body { background: #fff; font-size: 11pt; }
  .compare.split { display: block; } .c-x { display: block; }
}

@media (max-width: 1179px) { .two.rev { grid-template-columns: 1fr; } }
