/* Plum palette (owner pick, 2026-10-18). Dark values apply when the phone is in dark mode. */
:root {
  --bg: #efe7f5; --surface: #ffffff; --ink: #241532; --muted: #5f4d70; --accent: #5a2d82; --on-accent: #ffffff; --line: #dccdea;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #160d1f; --surface: #211530; --ink: #eadff3; --muted: #b09cc4; --accent: #bf94e4; --on-accent: #160d1f; --line: #35264a;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5;
}
.site-header { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.header-tools { display: flex; align-items: center; gap: 14px; }
.header-tools .search { flex: 1 1 auto; min-width: 0; }
.header-tools .checkbox { flex: none; white-space: nowrap; }
@media (min-width: 640px) { .site-header { grid-template-columns: auto 1fr; align-items: center; gap: 24px; max-width: 720px; margin: 0 auto; } .search { max-width: 420px; } }
.brand { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.title { font-size: 1.4rem; line-height: 1.25; margin: 8px 0 16px; }
a { color: var(--accent); }
.muted, .count, .bar-addr { color: var(--muted); }
.search { position: relative; width: 100%; }
.search-icon { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 13px 18px 13px 46px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); background: color-mix(in srgb, var(--surface) 55%, var(--bg)); color: var(--ink);
  -webkit-appearance: none; appearance: none; outline: none; transition: border-color .15s, background-color .15s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); background: var(--surface); }
.search input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.count { font-size: 0.9rem; margin: 8px 0; }
.toggle-form { display: inline; }
.checkbox {
  font: inherit; font-size: 0.9rem; color: var(--ink); background: none; border: 0; padding: 0;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
}
.checkbox::before {
  content: ""; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--muted);
  background: var(--surface); box-sizing: border-box; flex: none;
}
.checkbox { position: relative; }
.checkbox[aria-pressed="true"]::before { border-color: var(--accent); background: var(--accent); }
/* The tick is drawn with borders, not an image: the CSP allows no data: images. */
.checkbox[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 6px; top: 50%; width: 5px; height: 9px;
  border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: translateY(-62%) rotate(45deg);
}
.checkbox:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.bar-list { list-style: none; margin: 0; padding: 0; }
.bar-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.bar-list a { text-decoration: none; color: var(--ink); }
.bar-name { font-weight: 600; }
.bar-addr { display: block; font-size: 0.9rem; }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--muted); color: var(--muted); vertical-align: middle; }
.ratings h2 { font-size: 1.1rem; margin: 24px 0 4px; }
.site-footer { text-align: center; padding: 32px 16px 48px; border-top: 1px solid var(--line); margin-top: 32px; color: var(--muted); }
.site-footer p { margin: 0 0 8px; }
.invite {
  display: inline-block; margin-top: 8px; padding: 12px 22px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600;
}
.invite:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Map / List switch */
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); margin: 4px 0 12px; }
.seg { padding: 6px 18px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.seg.on { background: var(--accent); color: var(--on-accent); }

/* Map */
.map-wrap { position: relative; margin: 0 -16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f7f1e6; }
.map { display: block; width: 100%; height: calc(100dvh - 190px); min-height: 360px; max-height: 820px; user-select: none; -webkit-user-select: none; }
.map.live { cursor: grab; touch-action: none; }
.map:not(.live) ~ .zoom, .map:not(.live) ~ .map-hint { display: none; }
.map.live:active { cursor: grabbing; }
.dot .pin { fill: var(--accent); stroke: #fff; stroke-width: 2.5; paint-order: stroke; }
.dot .hit { fill: transparent; }
.dot.closed .pin { fill: #fff; stroke: var(--accent); }
.dot:hover .pin { fill: #241532; }
.dot:focus { outline: none; }
.dot:focus-visible .pin { stroke: #241532; stroke-width: 5; }
.map-hint { position: absolute; left: 12px; bottom: 8px; margin: 0; font-size: 0.75rem; color: #5f4d70; background: rgba(247, 241, 230, 0.85); padding: 2px 8px; border-radius: 6px; pointer-events: none; }
.zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.zoom button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.25rem; line-height: 1; cursor: pointer; }
@media (max-width: 639px) { .map-hint { display: none; } }
