:root {
  --bg: #fbf7ef; --card: #ffffff; --ink: #2a2520; --muted: #7a7064; --line: #e8dfd0;
  --yolk: #f5b700; --yolk-d: #d99a00; --brand: #c8410b; --ok: #2e7d32; --err: #b3261e; --info: #1f5f8b;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1b1815; --card: #26221e; --ink: #f3ece1; --muted: #a99d8d; --line: #3a342d; --yolk: #ffc933; --brand: #ff7a45; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .2em 0 .4em; }
h2 { font-size: 1.2rem; margin: 1.6em 0 .6em; }
main { max-width: 860px; margin: 0 auto; padding: 8px 16px 40px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: .9rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { position: sticky; top: 0; z-index: 1000; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.top nav a { text-decoration: none; color: var(--ink); padding: 4px 0; font-size: .95rem; }
.top nav a.on { color: var(--brand); font-weight: 600; }
.top nav a.cta { background: var(--yolk); color: #2a2520; padding: 6px 12px; border-radius: 999px; font-weight: 700; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.narrow { max-width: 520px; margin-inline: auto; }
.hero { text-align: center; padding: 28px 0 8px; }
.hero h1 { font-size: 1.9rem; }
.empty { text-align: center; }

.btn { display: inline-block; background: var(--yolk); color: #2a2520; border: 0; border-radius: 999px; padding: 11px 22px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--yolk-d); }
.btn.small { padding: 6px 14px; font-size: .9rem; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.linkbtn { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; font-size: .9rem; padding: 2px 6px; }
.linkbtn.danger { color: var(--err); }

.flash { padding: 10px 14px; border-radius: 10px; margin: 12px 0; background: #e6f4e7; color: #1b4d1f; }
.flash.err { background: #fbe4e2; color: #7a1a15; }
.flash.info { background: #e3f0f9; color: #14435f; }
@media (prefers-color-scheme: dark) {
  .flash { background: #1d3a20; color: #bfe5c2; } .flash.err { background: #4a1f1c; color: #f5c6c2; } .flash.info { background: #17364a; color: #bcdcf0; }
}

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .95rem; }
.form label .muted { font-weight: 400; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--yolk); border-color: transparent; }
select { width: auto; max-width: 100%; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; }
.check input { width: auto; }
.del { margin-top: 18px; text-align: center; }
.visit-head { font-size: 1.05rem; }

/* Eier-Bewertung */
.eggs { position: relative; display: inline-block; white-space: nowrap; line-height: 1.2; vertical-align: middle; }
.eggs-bg { filter: grayscale(1); opacity: .28; }
.eggs-fg { position: absolute; left: 0; top: 0; overflow: hidden; }
.big-eggs { font-size: 1.5rem; }
.egg-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; font-size: 2.4rem; }
.egg-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.egg-input label { cursor: pointer; filter: grayscale(1); opacity: .3; transition: opacity .1s, transform .1s; line-height: 1.2; }
.egg-input input:checked ~ label, .egg-input label:hover, .egg-input label:hover ~ label { filter: none; opacity: 1; }
.egg-input input:focus-visible + label { outline: 2px solid var(--yolk); border-radius: 8px; }
.egg-input label:active { transform: scale(1.15); }

/* Podium */
.podium { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.pod { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: transform .12s; }
.pod:hover { transform: translateY(-2px); }
.pod1 { grid-column: 1 / -1; border-color: var(--yolk); box-shadow: 0 0 0 2px var(--yolk) inset; }
.pod-photo { position: relative; aspect-ratio: 16/10; background: #f6e8bd center/cover; display: grid; place-items: center; font-size: 3rem; }
.pod1 .pod-photo { aspect-ratio: 16/8; }
.medal { position: absolute; top: 8px; left: 8px; background: var(--card); border-radius: 999px; min-width: 38px; height: 38px; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; box-shadow: 0 1px 4px #0003; }
.pod-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.score { font-weight: 700; } .score small { font-weight: 400; color: var(--muted); }
@media (min-width: 700px) {
  .podium { grid-template-columns: repeat(6, 1fr); }
  .pod1 { grid-column: span 6; } .pod2, .pod3 { grid-column: span 3; } .pod4, .pod5 { grid-column: span 3; }
  .pod1 .pod-photo { aspect-ratio: 21/7; }
}

/* Balkendiagramm */
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-head h2 { margin-top: 1.4em; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bars li > a, .bars li > .row { display: grid; grid-template-columns: 28px 1fr 46px; grid-template-areas: "rank label val" ". bar bar" ". meta meta";
  gap: 2px 10px; align-items: center; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; }
.bars li[hidden] { display: none; }
.rank { grid-area: rank; font-weight: 800; color: var(--muted); text-align: center; }
.bar-label { grid-area: label; min-width: 0; overflow-wrap: anywhere; }
.bar { grid-area: bar; height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffe27a, var(--yolk) 60%, #e08a00); border-radius: 99px; }
.bar-val { grid-area: val; font-weight: 800; text-align: right; font-size: 1.1rem; }
.bar-meta { grid-area: meta; font-size: .8rem; }

/* Karten */
.map { height: 420px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.small-map { height: 240px; }
.pin { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--yolk); border: 2px solid #fff; box-shadow: 0 2px 6px #0005; }
.pin span { transform: rotate(45deg); font-weight: 800; font-size: .8rem; color: #2a2520; }
.pin.lo { background: #e57368; } .pin.mid { background: #f3c14b; } .pin.hi { background: #8fd18f; }
.leaflet-container { font: inherit; }

/* Listen */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; }
.crumb { margin: 0 0 4px; }
.reviews { display: flex; flex-direction: column; gap: 12px; }
.review { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.review img { width: 140px; height: 140px; object-fit: cover; border-radius: 10px; display: block; }
.review-body { min-width: 0; flex: 1; }
.review-body p { margin: .4em 0 0; }
.review-top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
@media (max-width: 520px) { .review { flex-direction: column; } .review img { width: 100%; height: 200px; } }
.preview { max-width: 100%; max-height: 260px; border-radius: 10px; }
.current-photo { display: flex; align-items: center; gap: 12px; }
.current-photo img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.locate { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.table th, .table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table .actions form { display: flex; flex-wrap: wrap; gap: 2px; }
.tag { background: var(--yolk); color: #2a2520; font-size: .7rem; padding: 1px 7px; border-radius: 99px; font-weight: 700; }
textarea.mono { resize: vertical; }

footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 24px 16px 40px; }
#karte { scroll-margin-top: 70px; }
