:root {
  /* Traditional Christmas: evergreen, cranberry red, gold, and snow white */
  --bg: #0c2117;
  --bg-2: #12301f;
  --card: #163826;
  --line: #2b5a3f;
  --text: #fdf8ec;
  --muted: #c4d6c7;
  --gold: #f2c14e;
  --red: #c8102e;
  --red-bright: #ff6b7d;
  --green: #86dc95;
  --blue: #9fd3ff;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(ellipse at top, #1f4d34 0%, var(--bg) 60%);
  background-attachment: fixed;
  color: var(--text);
}
a { color: var(--gold); }
a:hover { color: #ffd97a; }
body::before { content: ''; display: block; height: 6px; background: repeating-linear-gradient(-45deg, var(--red) 0 12px, var(--text) 12px 24px); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 16px; max-width: 1200px; margin: 0 auto; flex-wrap: wrap;
}
.brand { color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.1rem; display: flex; align-items: center; gap: .55rem; }
.bulbs { display: inline-flex; gap: 4px; }
.bulbs i { width: 10px; height: 14px; border-radius: 50% 50% 45% 45%; display: block; box-shadow: 0 0 10px currentColor; }
.bulbs i:nth-child(1) { background: var(--red); color: var(--red); }
.bulbs i:nth-child(2) { background: var(--gold); color: var(--gold); }
.bulbs i:nth-child(3) { background: var(--green); color: var(--green); }
.site-header nav { display: flex; gap: 1rem; align-items: center; }
.site-header nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.site-header nav a:not(.btn):hover { color: var(--text); }

main { max-width: 1200px; margin: 0 auto; padding: 0 16px 3rem; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 1.5rem 16px 2.5rem; text-align: center; }
.site-footer a { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  background: var(--red); color: #fff; border: 0; border-radius: 999px;
  padding: .7rem 1.2rem; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  min-height: 44px;
}
.btn:hover { background: #e0243f; color: #fff; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-small { padding: .4rem .9rem; min-height: 36px; font-size: .92rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }
.btn-danger { background: transparent; color: var(--red-bright); border: 1px solid #7a2a35; }
.btn-danger:hover { background: #3a1419; color: var(--red-bright); }
.vote.voted { border-color: var(--gold); color: var(--gold); }

.hero { padding: 1.5rem 0 1rem; }
.lede { color: var(--muted); font-size: 1.08rem; max-width: 46rem; margin: 0 0 1.2rem; }
.search { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.search input[type=search], .search input[name=q] {
  flex: 1 1 240px; min-width: 0; min-height: 48px; padding: .6rem 1rem; font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
}
.filters { flex-basis: 100%; color: var(--muted); }
.filters summary { cursor: pointer; padding: .3rem 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: .75rem 1.2rem; padding-top: .5rem; }
.filter-row label { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; }
.filter-row label.check { flex-direction: row; align-items: center; }
select, input, textarea { font: inherit; }
.filter-row select, .form select, .form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form textarea, .admin-search input {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; min-height: 44px; width: 100%;
}
.filter-row select { width: auto; }
.geo-msg { color: var(--muted); min-height: 1.2em; margin: .4rem 0 0; }

.results-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin: 1rem 0 .8rem; }
.count { color: var(--muted); margin: 0; }
.split { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .split .map { position: sticky; top: 1rem; height: calc(100vh - 2rem); max-height: 760px; }
}
.map { height: 340px; border-radius: var(--radius); border: 1px solid var(--line); background: #0f281b; z-index: 0; }
.map-small { height: 280px; }
.pin span { display: block; width: 18px; height: 18px; margin: 2px; border-radius: 50%; background: var(--gold); border: 2px solid #fff6d8; box-shadow: 0 0 12px 3px rgba(242, 193, 78, .65); }
.pin-featured span { background: var(--red); border-color: #ffd6dc; box-shadow: 0 0 14px 4px rgba(200, 16, 46, .75); }
.leaflet-popup-content a { font-weight: 650; color: #9e0c24; }
.popup-meta { color: #4a5d50; font-size: .85rem; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.card a { display: grid; grid-template-columns: 96px 1fr; gap: .9rem; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; }
.card a:hover { border-color: var(--gold); }
.card.featured a { border-color: #8f2a37; box-shadow: inset 4px 0 0 var(--red); }
.card h3 { font-size: 1.05rem; margin: .1rem 0 .2rem; }
.thumb { width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--bg-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-empty { display: block; width: 100%; height: 100%; background: radial-gradient(circle at 30% 35%, rgba(230, 40, 70, .75) 0 5px, transparent 6px), radial-gradient(circle at 55% 60%, rgba(242, 193, 78, .8) 0 5px, transparent 6px), radial-gradient(circle at 75% 30%, rgba(253, 248, 236, .7) 0 5px, transparent 6px), var(--bg-2); }
.meta { color: var(--muted); margin: 0; font-size: .92rem; }
.tags { margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.badge { display: inline-block; font-size: .78rem; padding: .12rem .55rem; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); }
.badge-free { color: var(--green); border-color: #3a7a50; }
.badge-featured { color: #fff; background: var(--red); border-color: var(--red); }
.badge-votes { color: var(--gold); border-color: #7a6326; }
.empty { color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.2rem; margin: 0; }
.add-cta { color: var(--muted); }

.crumbs { color: var(--muted); font-size: .9rem; margin: .8rem 0; }
.crumbs a { color: var(--muted); }
.listing header { margin-bottom: 1rem; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(78%, 1fr); gap: .6rem; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 1.2rem; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery img { width: 100%; height: 320px; object-fit: cover; border-radius: var(--radius); display: block; }
.gallery figcaption { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
@media (min-width: 900px) { .gallery { grid-auto-columns: minmax(45%, 1fr); } .gallery img { height: 380px; } }
.no-photo { border: 1px dashed var(--line); border-radius: var(--radius); padding: 1rem; color: var(--muted); margin-bottom: 1.2rem; }
.listing-grid { display: grid; gap: 1.2rem; }
@media (min-width: 900px) { .listing-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.desc { font-size: 1.08rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 1rem 0 1.3rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.etiquette { background: var(--card); border-left: 3px solid var(--gold); padding: .7rem .9rem; border-radius: 6px; font-size: .95rem; }
.small { font-size: .88rem; color: var(--muted); }
.notice { background: #2e2a12; border: 1px solid #7a6326; color: #ffe8a8; padding: .7rem 1rem; border-radius: 10px; }

.narrow { max-width: 720px; margin: 1.5rem auto; }
.narrow.wide { max-width: 1000px; }
.prose li { margin-bottom: .5rem; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; display: grid; gap: .8rem; background: rgba(22, 56, 38, .55); min-width: 0; }
.form legend { font-weight: 700; padding: 0 .4rem; }
.form label { display: grid; gap: .3rem; }
.form label.check { display: flex; gap: .55rem; align-items: flex-start; }
.form label.check input { margin-top: .3rem; width: 18px; height: 18px; flex: none; }
.row2, .row3 { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 2fr 1.3fr 1fr; } }
.hint { color: var(--muted); font-size: .9rem; margin: 0; }
.hint.warn { color: #ffb4bc; }
.errors { background: #3a1419; border: 1px solid #7a2a35; border-radius: var(--radius); padding: .6rem 1rem; margin-bottom: 1rem; }
.errors p { margin: .3rem 0; font-weight: 650; }
.hp { position: absolute; left: -9999px; }
.cf-turnstile { margin: .5rem 0 1rem; min-height: 0; }

.state-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .4rem; }
.state-grid li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .8rem; display: flex; justify-content: space-between; }
.state-grid a { text-decoration: none; color: var(--text); }
.n { color: var(--muted); font-size: .85rem; }
.city-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.city-links a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .75rem; text-decoration: none; color: var(--text); font-size: .9rem; }

.admin { margin-top: 1rem; }
.admin-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs a { padding: .55rem .9rem; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--text); border-color: var(--gold); }
.admin-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.admin-photos { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.admin-photos img { width: 140px; height: 105px; object-fit: cover; border-radius: 8px; display: block; }
form.inline { display: inline; margin: 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
.admin-table th, .admin-table td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-search { margin-bottom: 1rem; }
.admin-search input { max-width: 320px; }
