/* Public website theme. Existing light colors and media are intentionally untouched. */
.header-tools { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.theme-toggle {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  min-width:44px;
  width:44px;
  height:44px;
  padding:10px;
  border:1px solid #d6dfef;
  border-radius:50%;
  background:#ffffff;
  color:#34445f;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.theme-toggle[hidden] { display:none !important; }
.theme-toggle:hover { background:#edf3ff; border-color:#9eb7e1; }
.theme-toggle:focus-visible { outline:3px solid #326ce5; outline-offset:3px; }
.theme-toggle svg { display:block; width:20px; height:20px; flex:0 0 auto; }
.theme-toggle .theme-sun { display:none; }

html[data-theme="dark"] {
  color-scheme:dark;
  --paper:#0b1220;
  --ink:#eef3ff;
  --muted:#b0bdd2;
  --line:#34435e;
  --blue:#91b8ff;
  --blue-dark:#a8c7ff;
  --green:#73d49c;
  --red:#ff9e96;
  --yellow:#f5d37b;
  --theme-surface:#131e30;
  --theme-raised:#1b2a42;
  --theme-selected:#233650;
  --theme-primary:#3267d5;
  --theme-focus:#b8d1ff;
  --glass:0 20px 46px -24px #00000080;
}
html[data-theme="dark"] body { background:var(--paper); color:var(--ink); }
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-top,
html[data-theme="dark"] .site-top.is-stuck { background:#0b1220f2; border-bottom-color:var(--line); }
html[data-theme="dark"] .brand { color:var(--ink); }
html[data-theme="dark"] .brand-mark { background:#326ce5; color:#ffffff; }
html[data-theme="dark"] .brand-sub,
html[data-theme="dark"] .main-nav>a,
html[data-theme="dark"] .main-nav>button { color:var(--muted); }
html[data-theme="dark"] .main-nav .is-current,
html[data-theme="dark"] .main-nav>a:hover,
html[data-theme="dark"] .main-nav>button:hover { color:var(--blue); }
html[data-theme="dark"] .count-pill { background:var(--theme-raised); color:var(--muted); }
html[data-theme="dark"] .theme-toggle { background:var(--theme-surface); color:var(--ink); border-color:#6a81a2; }
html[data-theme="dark"] .theme-toggle:hover { background:var(--theme-raised); border-color:var(--blue); }
html[data-theme="dark"] .theme-toggle .theme-moon { display:none; }
html[data-theme="dark"] .theme-toggle .theme-sun { display:block; }
html[data-theme="dark"] .language-switcher { background:var(--theme-surface); border-color:var(--line); }
html[data-theme="dark"] .language-switcher a { color:var(--muted); }
html[data-theme="dark"] .language-switcher a:hover { background:var(--theme-raised); color:var(--blue); }
html[data-theme="dark"] .language-switcher a.is-active { background:var(--theme-primary); color:#ffffff; }
html[data-theme="dark"] .language select { color:var(--ink); }
html[data-theme="dark"] .language select option { background:var(--theme-surface); color:var(--ink); }

/* Directory surfaces, filters and controls. */
html[data-theme="dark"] .venue-card,
html[data-theme="dark"] dialog,
html[data-theme="dark"] .venue-sheet,
html[data-theme="dark"] .live-stat,
html[data-theme="dark"] .map-wrap,
html[data-theme="dark"] .search-bar,
html[data-theme="dark"] .only-open,
html[data-theme="dark"] .near-me,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .action-button,
html[data-theme="dark"] .secondary { background:var(--theme-surface); color:var(--ink); border-color:var(--line); }
html[data-theme="dark"] .venue-card:hover { border-color:#6a81a2; box-shadow:0 15px 35px -20px #000000b0; }
html[data-theme="dark"] dialog { box-shadow:0 35px 120px #000000a0; }
html[data-theme="dark"] dialog::backdrop,
html[data-theme="dark"] .sheet-backdrop { background:#020713b3; }
html[data-theme="dark"] .dialog-close,
html[data-theme="dark"] .sheet-close,
html[data-theme="dark"] .heart-button { background:var(--theme-surface); color:var(--muted); border-color:#6a81a2; }
html[data-theme="dark"] .heart-button[aria-pressed="true"] { background:var(--theme-raised); color:var(--blue); }
html[data-theme="dark"] .dialog-close:hover,
html[data-theme="dark"] .sheet-close:hover,
html[data-theme="dark"] .heart-button:hover { background:var(--theme-raised); color:var(--blue); }
html[data-theme="dark"] .view-toggle { background:var(--theme-surface); }
html[data-theme="dark"] .view-toggle button { color:var(--muted); }
html[data-theme="dark"] .view-toggle button[aria-pressed="true"] { background:var(--theme-selected); color:var(--ink); }
html[data-theme="dark"] .favorite-filter,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .badge { background:var(--theme-raised); color:var(--muted); }
html[data-theme="dark"] .favorite-filter[aria-pressed="true"] { background:var(--theme-selected); color:var(--blue); }
html[data-theme="dark"] .mood-chip { color:var(--muted); border-color:#6a81a2; }
html[data-theme="dark"] .mood-chip:hover,
html[data-theme="dark"] .chip:hover,
html[data-theme="dark"] .secondary:hover,
html[data-theme="dark"] .action-button:hover,
html[data-theme="dark"] .near-me:hover { background:var(--theme-raised); color:var(--blue); border-color:var(--blue); }
html[data-theme="dark"] .mood-chip[aria-pressed="true"] { background:var(--theme-selected); color:var(--ink); border-color:var(--blue); }
html[data-theme="dark"] .primary,
html[data-theme="dark"] .action-button.primary,
html[data-theme="dark"] .chip.is-active,
html[data-theme="dark"] .near-me.is-active { background:var(--theme-primary); color:#ffffff; border-color:transparent; }
html[data-theme="dark"] .primary:hover,
html[data-theme="dark"] .action-button.primary:hover,
html[data-theme="dark"] .chip.is-active:hover,
html[data-theme="dark"] .near-me.is-active:hover { background:#2856bc; color:#ffffff; }
html[data-theme="dark"] .search-field input,
html[data-theme="dark"] .city-field select,
html[data-theme="dark"] .type-field select,
html[data-theme="dark"] .field input { background:var(--theme-surface); color:var(--ink); border-color:#6a81a2; }
html[data-theme="dark"] .search-field input::placeholder,
html[data-theme="dark"] .field input::placeholder { color:var(--muted); }
html[data-theme="dark"] .city-field { color:var(--muted); }
html[data-theme="dark"] .search-icon { border-color:var(--muted); }
html[data-theme="dark"] .search-icon:after { background:var(--muted); }
html[data-theme="dark"] .search-field,
html[data-theme="dark"] .card-bottom,
html[data-theme="dark"] .steps article { border-color:var(--line); }
html[data-theme="dark"] .hero-stats>span>span,
html[data-theme="dark"] .card-location,
html[data-theme="dark"] .card-copy,
html[data-theme="dark"] .dialog-city,
html[data-theme="dark"] .dialog-copy,
html[data-theme="dark"] .dialog-disclaimer,
html[data-theme="dark"] .result-heading p,
html[data-theme="dark"] .local-note,
html[data-theme="dark"] .steps p,
html[data-theme="dark"] .footer p,
html[data-theme="dark"] .footer>span { color:var(--muted); }
html[data-theme="dark"] .card-art:not(.has-visual) { background:#193137; color:#8ecdc2; }
html[data-theme="dark"] .card-art:not(.has-visual)[data-mood="sea"],
html[data-theme="dark"] .card-art:not(.has-visual)[data-mood="nfc"] { background:#1b2e4b; color:#a8c7ff; }
html[data-theme="dark"] .card-art:not(.has-visual)[data-mood="music"] { background:#30273f; color:#d3b8f5; }
html[data-theme="dark"] .card-art:not(.has-visual)[data-mood="all"] { background:#332d29; color:#dac1a5; }
html[data-theme="dark"] .how-section { background:var(--theme-surface); border-top-color:var(--line); }
html[data-theme="dark"] .how-line { color:var(--muted); }
html[data-theme="dark"] .step-number { color:var(--blue); }
html[data-theme="dark"] .empty-state { background:var(--theme-surface); color:var(--muted); border-color:#6a81a2; }
html[data-theme="dark"] .empty-state>span { color:var(--blue); }
html[data-theme="dark"] .empty-state h3 { color:var(--ink); }
html[data-theme="dark"] .toast { background:var(--theme-raised); color:var(--ink); border:1px solid var(--line); }

/* Venue profile, including the read-only tobacco list and opening hours. */
html[data-theme="dark"] .crumbs,
html[data-theme="dark"] .nearby-card small,
html[data-theme="dark"] .site-foot,
html[data-theme="dark"] .city-data-attribution { color:var(--muted); }
html[data-theme="dark"] .crumbs a,
html[data-theme="dark"] .site-foot a,
html[data-theme="dark"] .detail-body a,
html[data-theme="dark"] .archive-head a,
html[data-theme="dark"] main.shell article a:not(.action-button):not(.button):not(.wp-block-button__link),
html[data-theme="dark"] .venue-menu-link { color:var(--blue); }
html[data-theme="dark"] .nearby-card { color:var(--ink); border-color:var(--line); }
html[data-theme="dark"] .venue-tobacco-menu,
html[data-theme="dark"] .detail-hours { border-color:var(--line); }
html[data-theme="dark"] .tobacco-menu-intro,
html[data-theme="dark"] .tobacco-menu-state,
html[data-theme="dark"] .tobacco-menu-brand summary>span,
html[data-theme="dark"] .tobacco-menu-brand li p { color:var(--muted); }
html[data-theme="dark"] .tobacco-menu-brand { background:var(--theme-surface); border-color:var(--line); }
html[data-theme="dark"] .tobacco-menu-brand summary { color:var(--ink); border-radius:11px; }
html[data-theme="dark"] .tobacco-menu-brand summary:hover,
html[data-theme="dark"] .tobacco-menu-brand[open] summary { background:var(--theme-raised); }
html[data-theme="dark"] .tobacco-menu-brand[open] summary { border-radius:11px 11px 0 0; }
html[data-theme="dark"] .tobacco-menu-brand li { color:var(--ink); border-top-color:var(--line); }
html[data-theme="dark"] .hours-row { color:var(--muted); }
html[data-theme="dark"] .hours-row.is-today { background:var(--theme-raised); color:var(--blue); }
html[data-theme="dark"] .badge.open,
html[data-theme="dark"] .venue-status.is-open { background:var(--theme-raised); color:var(--green); }
html[data-theme="dark"] .badge.closed { background:var(--theme-raised); color:var(--red); }
html[data-theme="dark"] .badge.featured,
html[data-theme="dark"] .badge.schedule { background:var(--theme-raised); color:var(--yellow); }
html[data-theme="dark"] .badge.rating { background:var(--theme-raised); color:var(--blue); }
html[data-theme="dark"] .near-status.is-error,
html[data-theme="dark"] #locationStatus[data-state="denied"],
html[data-theme="dark"] #locationStatus[data-state="unavailable"],
html[data-theme="dark"] #locationStatus[data-state="timeout"],
html[data-theme="dark"] #locationStatus[data-state="unsupported"],
html[data-theme="dark"] #locationStatus[data-state="insecure"] { color:var(--red); }

/* Visible keyboard focus on both the dark canvas and dark controls. */
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] a:focus-visible,
html[data-theme="dark"] input:focus-visible,
html[data-theme="dark"] select:focus-visible,
html[data-theme="dark"] summary:focus-visible { outline:3px solid var(--theme-focus); outline-offset:3px; }
html[data-theme="dark"] .language-switcher a:focus-visible { box-shadow:none; }

@media(max-width:760px) {
  .header-tools { gap:6px; }
  .theme-toggle { min-width:40px; width:40px; height:40px; padding:8px; }
  .site-header .header-inner { gap:8px; }
}
@media(max-width:360px) {
  /* Keep favorites, language and the new action usable on the narrowest phones. */
  .site-header:has(.theme-toggle:not([hidden])) .brand>span:last-child { display:none; }
}
@media(prefers-reduced-motion:reduce) {
  .theme-toggle { transition:none; }
}
