/* ============================================================ Tokens */
:root {
  --bg: #0b1020;
  --bg-2: #121a33;
  --surface: rgba(255, 255, 255, .06);
  --surface-2: rgba(255, 255, 255, .1);
  --border: rgba(255, 255, 255, .12);
  --text: #eef1fb;
  --muted: #9aa3c0;
  --accent: #ff7a59;
  --accent-2: #7c5cff;
  --accent-3: #22d3b6;
  --dream: #a78bfa;
  --planned: #38bdf8;
  --visited: #34d399;
  --danger: #f87171;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  --radius: 20px;
  --radius-sm: 12px;
  --aurora-opacity: .55;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f4ef;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, .7);
  --surface-2: rgba(255, 255, 255, .95);
  --border: rgba(20, 24, 40, .1);
  --text: #171a26;
  --muted: #646b82;
  --shadow: 0 20px 40px -24px rgba(30, 30, 60, .35);
  --aurora-opacity: .3;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f4ef;
    --bg-2: #ffffff;
    --surface: rgba(255, 255, 255, .7);
    --surface-2: rgba(255, 255, 255, .95);
    --border: rgba(20, 24, 40, .1);
    --text: #171a26;
    --muted: #646b82;
    --shadow: 0 20px 40px -24px rgba(30, 30, 60, .35);
    --aurora-opacity: .3;
    color-scheme: light;
  }
}

/* ============================================================ Base */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.spacer { flex: 1; }

/* Hintergrund-Aurora */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; opacity: var(--aurora-opacity); }
.aurora span { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(90px); animation: drift 26s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { background: var(--accent-2); top: -20vmax; left: -15vmax; }
.aurora span:nth-child(2) { background: var(--accent); bottom: -25vmax; right: -15vmax; animation-delay: -8s; }
.aurora span:nth-child(3) { background: var(--accent-3); top: 30%; left: 40%; width: 35vmax; height: 35vmax; animation-delay: -16s; opacity: .6; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .aurora span { animation: none !important; } }

.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ============================================================ Buttons & Inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  border: 1px solid transparent; border-radius: 999px; padding: .7em 1.25em;
  font-weight: 600; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 30px -10px var(--accent); }
.btn-primary:hover { box-shadow: 0 14px 34px -8px var(--accent); }
.btn-ghost { background: var(--surface); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-small { padding: .5em .9em; font-size: .9em; background: var(--surface-2); border-color: var(--border); }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; text-decoration: none; font-size: 1.05rem;
}
.icon-btn:hover { background: var(--surface-2); }

input, select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .7em .9em; outline: none; transition: border-color .2s, box-shadow .2s;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2em; }
select option { background: var(--bg-2); color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 25%, transparent); }
textarea { resize: vertical; }

/* ============================================================ Login */
.login-body { display: grid; place-items: center; padding: 16px; }
.login-card { width: min(400px, 100%); padding: 40px 28px; text-align: center; }
.login-card h1 { font-size: 2.4rem; }
.login-card form { display: grid; gap: 12px; margin-top: 24px; }
.login-globe { font-size: 3.5rem; animation: float 4s ease-in-out infinite; }
.login-error { color: var(--danger); margin: 16px 0 0; }
@keyframes float { 50% { transform: translateY(-8px) rotate(8deg); } }

/* ============================================================ Layout */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: Fraunces, serif; font-weight: 700; font-size: 1.25rem; }
.brand-mark { font-size: 1.4rem; }
.topbar-actions { display: flex; gap: 8px; }
.topbar-actions form { margin: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 16px 80px; }

.hero { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-bottom: 24px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.6rem); }
.hero h1 em { font-style: italic; background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hero-ring { position: relative; width: 170px; height: 170px; padding: 14px; border-radius: 50%; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--border); }
.ring-fg { stroke: var(--visited); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label strong { font-family: Fraunces, serif; font-size: 2rem; }
.ring-label span { color: var(--muted); font-size: .85rem; margin-top: -4px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { padding: 16px; }
.stat .k { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.stat .v { font-family: Fraunces, serif; font-size: 1.7rem; font-weight: 700; }
.stat-btn { text-align: left; cursor: pointer; color: inherit; font: inherit; transition: transform .15s, border-color .2s; background: linear-gradient(135deg, color-mix(in srgb, #22c55e 18%, transparent), color-mix(in srgb, #facc15 18%, transparent)), var(--surface); }
.stat-btn:hover { transform: translateY(-2px); border-color: #22c55e; }
.stat-sub { font-size: .75rem; color: var(--muted); }

.next-trip { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 20px; cursor: pointer; }
.next-trip .count { font-family: Fraunces, serif; font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1; }
.next-trip .count small { display: block; font-family: Inter, sans-serif; font-size: .75rem; color: var(--muted); font-weight: 500; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.toolbar-right input { max-width: 220px; }
.toolbar-right select { width: auto; }
.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; gap: 2px; overflow-x: auto; max-width: 100%; }
.segmented button { border: 0; background: transparent; padding: .45em .95em; border-radius: 999px; cursor: pointer; white-space: nowrap; color: var(--muted); font-weight: 500; }
.segmented button.active { background: var(--text); color: var(--bg); }

.tag-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; padding: .3em .8em; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; color: var(--muted); }
.chip.active { background: color-mix(in srgb, var(--accent-2) 25%, transparent); border-color: var(--accent-2); color: var(--text); }

/* ============================================================ Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card {
  position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; box-shadow: var(--shadow);
  animation: rise .5s both cubic-bezier(.2, .8, .2, 1);
}
.card:hover { transform: translateY(-4px); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.card-img { aspect-ratio: 4 / 3; background-size: cover; background-position: center; position: relative; }
.card-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 8, 20, .85), rgba(5, 8, 20, .1) 55%, transparent); }
.card-img .fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 4rem; }
.card-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; z-index: 2; gap: 6px; }
.card-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; z-index: 2; color: #fff; }
.card-body h3 { font-size: 1.45rem; margin: 0; }
.card-body .loc { opacity: .85; font-size: .9rem; }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; padding: .3em .7em; border-radius: 999px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; white-space: nowrap; }
.pill.dream { background: color-mix(in srgb, var(--dream) 75%, transparent); }
.pill.planned { background: color-mix(in srgb, var(--planned) 75%, transparent); }
.pill.visited { background: color-mix(in srgb, var(--visited) 75%, transparent); }
.match { font-weight: 700; }
.card-progress { height: 4px; background: rgba(255, 255, 255, .2); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.card-progress > i { display: block; height: 100%; background: var(--accent-3); }

.empty { text-align: center; padding: 60px 16px; }
.empty-emoji { font-size: 3.5rem; }

/* ============================================================ Weltkarte */
#worldMap { flex: 1; min-height: 300px; width: 100%; }
.world-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 20px; font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--border); }
.world-legend span { display: inline-flex; align-items: center; gap: 6px; }
.world-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.world-legend b { color: var(--text); }
.leaflet-container { font-family: Inter, sans-serif; }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 12px 14px; min-width: 160px; }
.popup-list { display: grid; gap: 4px; margin-top: 8px; }
.popup-item { text-align: left; border: 1px solid #e5e7eb; background: #f9fafb; color: #111; border-radius: 10px; padding: .45em .7em; cursor: pointer; font: inherit; font-size: .88rem; }
.popup-item:hover { border-color: var(--accent-2); }
.world-tip { font-weight: 600; }
#worldMap .leaflet-interactive:focus { outline: none; }
.popup-note { font-size: .85rem; color: #6b7280; margin-top: 6px; }
.popup-mark { display: block; width: 100%; margin-top: 10px; border: 0; border-radius: 999px; padding: .5em .9em; background: #22c55e; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.popup-link { display: block; margin-top: 6px; border: 0; background: none; padding: 0; color: #6b7280; font: inherit; font-size: .8rem; text-decoration: underline; cursor: pointer; }

/* ============================================================ Dialogs / Sheets */
dialog.sheet {
  padding: 0; border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  width: min(760px, 100%); max-height: 92vh; border-radius: 24px; box-shadow: var(--shadow); overflow: hidden;
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheetIn .35s cubic-bezier(.2, .8, .2, 1); }
dialog::backdrop { background: rgba(5, 8, 20, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(30px) scale(.98); } }
dialog.sheet-small { width: min(460px, 100%); }
dialog.sheet-full { width: min(1200px, 100%); height: min(860px, 94vh); max-height: 94vh; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.sheet-head h2 { margin: 0; font-size: 1.4rem; }
.sheet-foot { display: flex; gap: 8px; align-items: center; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--bg-2); }
.dest-form { display: flex; flex-direction: column; min-height: 0; flex: 1; margin: 0; }
.form-body { overflow-y: auto; padding: 8px 20px 20px; flex: 1; }
.fs { border: 0; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.fs legend { font-family: Fraunces, serif; font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; padding: 0; }
.fs label, .label-text { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); font-weight: 500; }
.fs label > input, .fs label > select, .fs label > textarea, .fs > textarea { color: var(--text); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row .grow { grid-column: 1 / -1; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; }
.file-btn { display: inline-flex !important; cursor: pointer; color: var(--text) !important; width: fit-content; }
.hint { font-size: .8rem; color: var(--muted); margin: -4px 0 0; }
.geo-results { display: grid; gap: 6px; }
.geo-results button { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6em .8em; cursor: pointer; font-size: .9rem; }
.geo-results button:hover { border-color: var(--accent-2); }

.months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.months button { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: .5em 0; cursor: pointer; font-size: .85rem; }
.months button.on { background: linear-gradient(135deg, var(--accent-3), var(--planned)); color: #062018; border-color: transparent; font-weight: 600; }

.vote-field { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); font-weight: 500; }
.hearts, .stars { display: flex; gap: 4px; }
.hearts button, .stars button { border: 0; background: none; font-size: 1.5rem; cursor: pointer; padding: 0; filter: grayscale(1); opacity: .35; transition: transform .15s; line-height: 1; }
.hearts button.on, .stars button.on { filter: none; opacity: 1; }
.hearts button:hover, .stars button:hover { transform: scale(1.2); }

.list-editor { display: grid; gap: 8px; }
.list-item { display: flex; gap: 8px; align-items: center; }
.list-item input[type=text] { flex: 1; }
.list-item input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent-3); flex: none; }
.list-item .rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.1rem; }

.cost-preview { padding: 14px 16px; border-radius: var(--radius-sm); background: linear-gradient(135deg, color-mix(in srgb, var(--accent-2) 18%, transparent), color-mix(in srgb, var(--accent) 14%, transparent)); border: 1px solid var(--border); font-size: .9rem; }
.cost-preview strong { font-family: Fraunces, serif; font-size: 1.4rem; }

.photo-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-strip .ph { position: relative; width: 84px; height: 84px; border-radius: 12px; background-size: cover; background-position: center; }
.photo-strip .ph button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; font-size: .7rem; }

/* Detail */
.detail-hero { position: relative; min-height: 240px; background-size: cover; background-position: center; display: flex; align-items: flex-end; flex: none; }
.detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 8, 20, .88), rgba(5, 8, 20, .2) 60%, rgba(5, 8, 20, .45)); }
.detail-hero-inner { color: #fff; }
.detail-hero-inner .loc { opacity: .85; }
.detail-body { padding-top: 16px !important; }
.detail-hero .fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 6rem; }
.detail-hero-inner { position: relative; z-index: 2; padding: 20px; width: 100%; }
.detail-hero h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0; }
.detail-actions { position: absolute; top: 14px; right: 14px; z-index: 3; display: flex; gap: 8px; }
.detail-actions .icon-btn { background: rgba(0, 0, 0, .4); color: #fff; border-color: rgba(255, 255, 255, .2); }
.detail-body { overflow-y: auto; padding: 4px 20px calc(24px + env(safe-area-inset-bottom)); }
.detail-summary { font-size: 1.05rem; margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.fact .k { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.fact .v { font-weight: 600; word-break: break-word; }
.section { margin-top: 22px; }
.section h3 { font-size: 1.15rem; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.checklist input { width: 20px; height: 20px; accent-color: var(--accent-3); flex: none; }
.checklist .done span { text-decoration: line-through; color: var(--muted); }
.month-bar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.month-bar div { text-align: center; font-size: .7rem; padding: 6px 0; border-radius: 6px; background: var(--surface); color: var(--muted); }
.month-bar div.on { background: var(--accent-3); color: #062018; font-weight: 700; }
.savings { height: 10px; border-radius: 10px; background: var(--surface-2); overflow: hidden; margin: 8px 0 4px; }
.savings i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-3), var(--planned)); border-radius: 10px; transition: width .8s; }
.cost-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cost-table td { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.cost-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.cost-table tr.total td { font-weight: 700; border-bottom: 0; padding-top: 10px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.gallery a { aspect-ratio: 1; border-radius: 12px; background-size: cover; background-position: center; display: block; }
.status-switch { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.status-switch button { border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .3); color: #fff; border-radius: 999px; padding: .35em .9em; font-size: .8rem; cursor: pointer; backdrop-filter: blur(6px); }
.status-switch button.active { background: #fff; color: #111; }
.links a { display: block; color: var(--accent-2); text-decoration: none; word-break: break-all; padding: 2px 0; }
.prewrap { white-space: pre-wrap; margin: 0; }

.confetti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 101; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 150%); background: var(--text); color: var(--bg); padding: .7em 1.2em; border-radius: 999px; font-weight: 600; transition: transform .3s; z-index: 200; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast { visibility: hidden; }

/* ============================================================ Responsive */
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .toolbar-right { justify-content: flex-start; }
  .toolbar-right input { max-width: none; flex: 1; min-width: 140px; }
}
@media (max-width: 600px) {
  .hero { grid-template-columns: 1fr; }
  .hero-ring { position: absolute; right: 0; top: 0; width: 96px; height: 96px; padding: 8px; }
  .ring-label strong { font-size: 1.15rem; }
  .ring-label span { font-size: .7rem; }
  .hero-text { padding-right: 100px; }
  .hero .hero-buttons { margin-right: -100px; }
  .hero .hero-buttons .btn { flex: 1; }
  .stat { padding: 12px; }
  .stat .v { font-size: 1.35rem; }
  .row { grid-template-columns: 1fr; }
  .months { grid-template-columns: repeat(4, 1fr); }
  .toolbar { flex-direction: column; align-items: stretch; }
  .segmented { justify-content: space-between; }
  .segmented button { padding: .45em .7em; flex: 1; }
  .view-toggle { flex: none; }
  .view-toggle button { flex: none; }
  .grid { grid-template-columns: 1fr; }
  dialog.sheet { max-height: 94vh; margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 24px 24px 0 0; border-bottom: 0; }
  @keyframes sheetIn { from { transform: translateY(100%); } }
  .sheet-foot .btn { padding: .65em 1em; }
}

/* ============================================================ Benutzer */
.avatar {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  font-size: .7rem; font-weight: 700; color: #fff; flex: none; line-height: 1;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
}
.avatar[data-user="1"] { background: linear-gradient(135deg, var(--accent-2), var(--accent-3)); }
.avatar-lg { width: 56px; height: 56px; font-size: 1.5rem; font-family: Fraunces, serif; }
.avatar-md { width: 30px; height: 30px; font-size: .85rem; }
.who { border: 0; padding: 0; margin: 0 0 4px; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.who-opt { position: relative; display: grid; justify-items: center; gap: 8px; padding: 16px 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; transition: border-color .2s, transform .15s, box-shadow .2s; }
.who-opt input { position: absolute; opacity: 0; pointer-events: none; }
.who-opt:hover { transform: translateY(-2px); }
.who-opt:has(input:checked) { border-color: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 30%, transparent); }
.who-opt:has(input:focus-visible) { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.me { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; margin-right: 4px; }
.pill .avatar { width: 18px; height: 18px; font-size: .62rem; margin-left: -4px; }
.creator { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); margin: 0 0 14px; flex-wrap: wrap; }
.vote-field.readonly .hearts { opacity: .6; }
.vote-field.readonly .hearts button { cursor: default; }
.vote-field.readonly .hearts button:hover { transform: none; }
.vote-note { font-size: .75rem; color: var(--muted); font-weight: 400; }
@media (max-width: 600px) { .me-name { display: none; } }

/* ============================================================ Flaggen */
.flag { display: inline-block; width: 1.35em; height: 1em; object-fit: cover; border-radius: 3px; vertical-align: -0.12em; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.card-img.is-flag, .detail-hero.is-flag { background-size: cover; background-position: center; }
.card-img.is-flag::after { background: linear-gradient(to top, rgba(5, 8, 20, .88), rgba(5, 8, 20, .35) 45%, rgba(5, 8, 20, 0) 75%); }
