/* SB12 Daily - wide two-column layout: dark top bar, Don't-miss banner, photo hero, section cards,
   schedule + sidebar. Large type and high contrast for older eyes; dark mode supported. */
:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --ink: #172230;
    --muted: #55616f;
    --line: #dfe3e8;
    --bar: #13283d;
    --bar-ink: #ffffff;
    --bar-muted: #d2dde7;
    --accent: #b4471a;            /* sunset clay: times, active items */
    --accent-ink: #ffffff;
    --banner: #f2a65a;
    --banner-ink: #2a1606;
    --hero: #2b4157;
    --sb1: #1f5f9e;
    --sb1-soft: #e3eef9;
    --sb2: #2f7a4b;
    --sb2-soft: #e2f3e8;
    --warn-bg: #fff4d6;
    --warn-ink: #6b4b00;
    --radius: 14px;
    --gutter: 16px;
    --head: "Outfit", system-ui, sans-serif;
}

/* Theme: "System" (no data-theme) follows the device; the Theme menu sets data-theme="light"|"dark" on <html>.
   The dark tokens appear twice - once for System on a dark device, once for an explicit Dark choice. */
:root { color-scheme: light; }
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #12161b;
    --surface: #1b2129;
    --ink: #eef1f4;
    --muted: #aab4bf;
    --line: #303842;
    --bar: #0b1824;
    --bar-muted: #b9c6d2;
    --accent: #f08a5d;
    --accent-ink: #1a0b04;
    --banner: #c9772f;
    --banner-ink: #1a0b04;
    --hero: #1f2f40;
    --sb1: #8bbcef;
    --sb1-soft: #1c2c3d;
    --sb2: #84cfa2;
    --sb2-soft: #1a3324;
    --warn-bg: #3a2f12;
    --warn-ink: #f5d98a;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #12161b;
        --surface: #1b2129;
        --ink: #eef1f4;
        --muted: #aab4bf;
        --line: #303842;
        --bar: #0b1824;
        --bar-muted: #b9c6d2;
        --accent: #f08a5d;
        --accent-ink: #1a0b04;
        --banner: #c9772f;
        --banner-ink: #1a0b04;
        --hero: #1f2f40;
        --sb1: #8bbcef;
        --sb1-soft: #1c2c3d;
        --sb2: #84cfa2;
        --sb2-soft: #1a3324;
        --warn-bg: #3a2f12;
        --warn-ink: #f5d98a;
    }
}

* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }   /* 18px base */
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }

.wrap { max-width: 1480px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 700px) { :root { --gutter: 24px; } }

/* Top bar */
/* The top bar is pinned to the top of the screen; the page starts below it. */
:root { --bar-h: 64px; --bar-total: var(--bar-h); }
.topbar { background: var(--bar); color: var(--bar-ink); position: fixed; top: 0; left: 0; right: 0; z-index: 40; }
body { padding-top: var(--bar-total); }
/* Links to an event on the page (#e-...) stop below the top bar. */
html { scroll-padding-top: calc(var(--bar-total) + 12px); }
.topbar-in { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; height: var(--bar-h); }
.bar-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 1.45rem; color: var(--bar-ink); text-decoration: none; letter-spacing: -0.01em; }
.logo img { width: 28px; height: 28px; flex: none; }
/* Member logins are a convenience, not a call to action: quiet text links that brighten on hover. */
.logins { display: flex; gap: 2px; align-items: center; }
.login { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 10px; border-radius: 8px; font-weight: 500; font-size: 0.85rem; text-decoration: none; color: var(--bar-muted); }
.login:hover { color: var(--bar-ink); text-decoration: underline; text-underline-offset: 3px; }
.login:focus-visible { outline: 3px solid #f2a65a; outline-offset: 0; color: var(--bar-ink); }

/* Theme menu (in the top bar) */
.theme-menu { position: relative; }
.theme-menu > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: var(--bar-muted); cursor: pointer; }
.theme-menu > summary:hover { color: var(--bar-ink); background: rgba(255,255,255,0.1); }
.theme-menu > summary::-webkit-details-marker { display: none; }
.theme-menu > summary:focus-visible { outline: 3px solid #f2a65a; outline-offset: 2px; }
.theme-menu[open] > summary { background: rgba(255,255,255,0.14); }
.theme-options { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 170px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.22); display: flex; flex-direction: column; }
.theme-options button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 0.92rem; text-align: left; cursor: pointer; }
.theme-options button:hover { background: var(--bg); }
.theme-options button[aria-checked="true"] { font-weight: 700; }
.theme-options button[aria-checked="true"]::after { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--accent); }

/* Don't miss banner */
.dontmiss { background: var(--banner); color: var(--banner-ink); }
.dontmiss-in { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: center; padding-top: 10px; padding-bottom: 10px; }
.dontmiss .tag { display: inline-block; margin-right: 6px; padding: 0 6px; border: 1px solid currentColor; border-radius: 5px; font-size: 0.72rem; font-weight: 700; vertical-align: 1px; }
.dontmiss-label { font-family: var(--head); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; }

/* Hero - illustrated desert sunset (same idea as the SB1 Villas site): a brown-to-sand sunset gradient,
   the Catalinas-and-plants silhouette on the right, faint grain, and a curved edge into the page. */
.hero { position: relative; color: #ffffff; min-height: 440px; display: flex; align-items: center; overflow: hidden; }
.hero-art {
    background:
        /* Saguaro Sun: the art is 5:1 with the scene at its right edge and sky + ground running left,
           so scaling it to the hero's height keeps the saguaro in view at every width. */
        url('/images/hero-saguaro.svg') right bottom / auto 100% no-repeat,
        #13283d;
}
/* Shade + grain behind the text so white and sand lettering stays readable over the bright part of the sunset. */
.hero-art::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
        linear-gradient(90deg, rgba(10,22,34,0.55) 0%, rgba(10,22,34,0.25) 40%, rgba(10,22,34,0) 62%);
}
.hero-photo { background: var(--hero); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(8,18,28,0.75), rgba(8,18,28,0.2) 70%); }
/* Curved bottom edge melting into the page background (follows light/dark theme). */
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 64px; background: var(--bg); clip-path: ellipse(58% 100% at 50% 100%); z-index: 1; }
.hero-in { position: relative; z-index: 2; width: 100%; padding-top: 52px; padding-bottom: 84px; }
.hero-eyebrow { margin: 0 0 10px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #f1e2c6; }
.hero h1 { margin: 0 0 6px; font-family: var(--head); font-size: clamp(2.1rem, 5.5vw, 3.4rem); line-height: 1.05; letter-spacing: -0.02em; text-shadow: 0 2px 20px rgba(10,22,34,0.45); }
.hero h1 span { color: #f1e2c6; }
.hero-date { margin: 0 0 20px; font-size: 1.15rem; color: #f5ede0; }
@media (max-width: 640px) {
    /* Phones: text sits over the art, so the shade runs top to bottom instead of left to right. */
    .hero-art::before { background: linear-gradient(180deg, rgba(10,22,34,0.62) 0%, rgba(10,22,34,0.35) 50%, rgba(10,22,34,0) 75%); }
}
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-link { display: inline-flex; gap: 10px; align-items: baseline; background: #ffffff; color: #13283d; text-decoration: none; padding: 12px 16px; border-radius: 10px; font-weight: 600; min-height: 44px; }
.hero-link span { color: #b4471a; font-weight: 700; }

/* Section cards */
.cards-area { padding-top: 28px; }
.section-h { font-family: var(--head); font-size: 1.5rem; margin: 0 0 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); min-height: 132px; }
.card:hover { border-color: var(--accent); }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.card-title { font-family: var(--head); font-size: 1.25rem; font-weight: 600; }
.card-count { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.card-next-label { font-size: 0.85rem; color: var(--muted); }
.card-next { font-weight: 600; }

/* Two columns */
.columns { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding-top: 28px; padding-bottom: 40px; }
.main-col { flex: 999 1 560px; min-width: 0; }
.side-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.page-h { font-family: var(--head); font-size: 2rem; margin: 0 0 12px; }

.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab { flex: 1; max-width: 220px; text-align: center; padding: 11px; border-radius: 10px; text-decoration: none; font-weight: 700; color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.tab.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); font-size: 0.88rem; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.empty { opacity: 0.55; }
.chip .count { font-size: 0.72rem; opacity: 0.8; }
.chips.sub .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; align-self: flex-start; background: var(--surface); }
.seg a { padding: 8px 14px; text-decoration: none; color: var(--ink); font-size: 0.88rem; min-height: 44px; display: inline-flex; align-items: center; }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.on { background: var(--ink); color: var(--bg); }

/* Restaurant card */
.place-card { display: flex; flex-wrap: wrap; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 18px; }
.place-photo { width: 200px; height: 130px; object-fit: cover; border-radius: 10px; }
.place-card h2 { margin: 0 0 4px; font-family: var(--head); font-size: 1.2rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.place-card p { margin: 4px 0; color: var(--muted); }
.place-links { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 600; }
.place-links a { min-height: 44px; display: inline-flex; align-items: center; }

/* Days + events */
.day { margin-bottom: 22px; }
.day-head { font-family: var(--head); font-size: 1.3rem; margin: 0 0 8px; display: flex; gap: 10px; align-items: baseline; }
.day-head span { color: var(--muted); font-weight: 500; font-size: 0.95rem; font-family: "Inter", sans-serif; }
.event { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; scroll-margin-top: 16px; }
.when { font-weight: 700; font-size: 0.95rem; color: var(--accent); }
.what { min-width: 0; }
.what h3 { margin: 0 0 4px; font-size: 1.12rem; line-height: 1.3; }
.meta { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 0.9rem; align-items: center; }
.price { color: var(--ink); font-weight: 600; }
.venue { color: var(--ink); font-weight: 500; }
.venue::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-right: 0.4em; border-radius: 50%; background: var(--accent); vertical-align: 0.1em; }
.desc { margin: 0 0 6px; }
.warn { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: 0.9rem; }
.source { font-size: 0.85rem; }
.flyer { position: relative; display: block; width: 150px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); cursor: zoom-in; align-self: start; }
.flyer img { display: block; width: 100%; height: auto; }
.flyer-hint { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 0.72rem; font-weight: 600; text-align: center; color: #ffffff; background: rgba(12,22,34,0.72); }

.badge { display: inline-block; margin-right: 6px; vertical-align: 2px; padding: 1px 8px; border-radius: 6px; font-size: 0.72rem; font-weight: 700; }
.badge.hoa1 { background: var(--sb1-soft); color: var(--sb1); }
.badge.hoa2 { background: var(--sb2-soft); color: var(--sb2); }
.badge.both { background: var(--line); color: var(--ink); }

.empty-state { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; text-align: center; color: var(--muted); }
.updated { color: var(--muted); font-size: 0.85rem; text-align: center; }

/* Sidebar panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.panel h2 { font-family: var(--head); font-size: 1.15rem; margin: 0 0 10px; }
.panel-row { display: flex; flex-direction: column; padding: 8px 0; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); min-height: 44px; }
.panel-row:first-of-type { border-top: 0; }
.panel-row:hover .panel-row-title { color: var(--accent); }
.panel-row-title { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.panel-row-sub { font-size: 0.88rem; color: var(--muted); }
.panel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; }

/* Flyer viewer */
.flyer-view { border: 0; padding: 0; background: transparent; max-width: min(820px, 94vw); width: 100%; }
.flyer-view::backdrop { background: rgba(8,16,26,0.82); }
.flyer-view-in { background: var(--surface); color: var(--ink); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.flyer-view-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.flyer-view-head form { margin: 0; }
.flyer-view img { width: 100%; height: auto; border-radius: 8px; }
.btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; min-height: 44px; cursor: pointer; }

.site-foot { background: var(--bar); color: var(--bar-muted); font-size: 0.85rem; padding: 18px 0 28px; }
.site-foot a { color: #ffffff; }

/* Phones */
@media (max-width: 640px) {
    .event { grid-template-columns: 1fr; gap: 6px; }
    .flyer { width: 100%; max-width: 260px; }
    .hero { min-height: 280px; }
    .logo { font-size: 1.2rem; gap: 8px; }
    .logo img { width: 24px; height: 24px; }
    .login { padding: 8px 6px; }
    .tab { max-width: none; }
}

/* /review: residents' submissions awaiting approval */
.review { max-width: 760px; padding-top: 20px; padding-bottom: 48px; }
.review h1 { font-family: var(--head); margin: 0 0 4px; }
.review-lead, .review-empty { color: var(--muted); }
.review-msg { padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.review-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.review-item h2 { font-size: 1.15rem; margin: 0; }
.review-item .meta { color: var(--muted); font-size: 0.9rem; margin: 4px 0 8px; overflow-wrap: anywhere; }
.review-count { font-weight: 600; margin: 12px 0 4px; }
.review-when { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }
.review-text pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.85rem; background: var(--bg); padding: 10px; border-radius: 8px; max-height: 360px; overflow: auto; }
.review-actions { display: flex; gap: 10px; margin-top: 12px; }
.review-actions button { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; min-height: 44px; }
.btn-approve { background: var(--accent); color: var(--accent-ink); border-color: var(--accent) !important; }
.btn-reject { background: var(--surface); color: var(--ink); }
.review-sub { font-size: 1.05rem; margin-top: 28px; }
.review-decided { list-style: none; padding: 0; }
.review-decided li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.review-decided form.inline { display: inline; }
.btn-link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; padding: 0 4px; }
.badge-approved, .badge-rejected { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; background: var(--bg); }
.badge-approved { color: var(--accent); }

/* Installable app (PWA) */
.install { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; }
.install { font-size: 0.8rem; }
.install .btn { background: transparent; color: var(--bar-ink); border-color: rgba(255,255,255,0.35); min-height: 32px; padding: 4px 12px; font-size: 0.8rem; font-weight: 600; border-radius: 999px; }
.install .btn:hover { border-color: #f2a65a; color: #f2a65a; }
.install-ios { margin-top: 14px; }
.offline-note { margin: 0; padding: 10px var(--gutter); background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; text-align: center; }
/* Installed on iPhone the status bar is see-through, so the top bar pads below it. */
@media (display-mode: standalone) {
    :root { --bar-total: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); }
    .topbar { padding-top: env(safe-area-inset-top, 0px); }
}

/* Phones: Don't-miss banner and hero dining pills 30% smaller so they don't crowd the screen. */
@media (max-width: 640px) {
    .dontmiss-in { font-size: 0.7rem; gap: 4px 18px; padding-top: 8px; padding-bottom: 8px; }
    .dontmiss-label { font-size: 0.85em; }
    .dontmiss .tag { font-size: 0.8em; padding: 0 4px; margin-right: 4px; }
    .hero-links { gap: 7px; }
    .hero-link { font-size: 0.7rem; gap: 7px; padding: 8px 11px; min-height: 36px; border-radius: 8px; }
}

/* Search */
.search-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: var(--bar-muted); }
.search-link:hover { color: var(--bar-ink); background: rgba(255,255,255,0.1); }
.search-link:focus-visible { outline: 3px solid #f2a65a; outline-offset: 2px; color: var(--bar-ink); }
.search-page { padding-top: 18px; padding-bottom: 28px; max-width: 900px; }
.search-form { display: flex; gap: 8px; margin: 0 0 14px; }
.search-form input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.search-form input:focus-visible { outline: 3px solid #f2a65a; outline-offset: 1px; }
.search-hint, .search-count { color: var(--muted); margin: 0 0 16px; }
.repeat-note { margin: 0 0 4px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.search-form .btn { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Search fly-in from the right */
.flyin { position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; border: 0; width: min(560px, 90vw); max-width: none; height: 100vh; height: 100dvh; max-height: none;
         background: var(--bg); color: var(--ink); box-shadow: -12px 0 32px rgba(0,0,0,0.3); overscroll-behavior: contain; }
.flyin::backdrop { background: rgba(8,16,26,0.55); }
.flyin[open] { animation: flyin-in 0.22s ease-out; }
@keyframes flyin-in { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .flyin[open] { animation: none; } }
.flyin-in { padding: max(12px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
.flyin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.flyin-head h2 { font-family: var(--head); font-size: 1.4rem; margin: 0; }
.flyin-head form { margin: 0; }
.flyin-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.flyin-close:hover { background: var(--surface); color: var(--ink); }
.flyin-close:focus-visible { outline: 3px solid #f2a65a; outline-offset: 0; }
.flyin .event { grid-template-columns: 1fr; gap: 6px; }
.flyin .flyer { width: 100%; max-width: 220px; }
.flyin .day-head { font-size: 1.1rem; }
body:has(.flyin[open]) { overflow: hidden; }

/* Phones: the top bar stays one slim row, since it is fixed at the top. */
@media (max-width: 640px) {
    .logo { font-size: 1.05rem; gap: 7px; white-space: nowrap; }
    .logo img { width: 22px; height: 22px; }
    :root { --bar-h: 54px; }
    /* The heading sits just under the bar and the hero is only as tall as its content plus the saguaro,
       so Don't miss and the top of the first card show on the first screen: a cue that there's more below. */
    .home-hero { min-height: 400px; align-items: flex-start; }
    .home-hero .hero-in { padding-top: 22px; padding-bottom: 76px; }
}

/* Menu button and panel (phones and tablets) */
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -6px; border: 0; border-radius: 50%; background: transparent; color: var(--bar-ink); cursor: pointer; }
.nav-toggle:hover { background: rgba(255,255,255,0.1); }
.nav-toggle:focus-visible { outline: 3px solid #f2a65a; outline-offset: 2px; }
.nav-toggle .nav-close-icon, .nav-toggle[aria-expanded="true"] .nav-open-icon { display: none; }
.nav-toggle[aria-expanded="true"] .nav-close-icon { display: inline; }
.nav-panel { background: var(--bar); border-top: 1px solid rgba(255,255,255,0.1); box-shadow: 0 14px 28px rgba(0,0,0,0.35);
             max-height: calc(100vh - var(--bar-total)); max-height: calc(100dvh - var(--bar-total)); overflow-y: auto; }
.nav-panel[hidden] { display: none; }
.nav-panel-in { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; padding-bottom: 18px; }
.nav-pages, .nav-group { display: flex; flex-direction: column; }
.nav-panel a { display: flex; align-items: center; min-height: 46px; color: var(--bar-ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.08); }
.nav-panel a:hover { color: #f2a65a; }
.nav-panel a:focus-visible, .theme-seg button:focus-visible { outline: 3px solid #f2a65a; outline-offset: 2px; }
.nav-group a { font-weight: 500; color: var(--bar-muted); }
.nav-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bar-muted); margin-bottom: 2px; }
.theme-seg { display: flex; margin-top: 6px; border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; overflow: hidden; align-self: flex-start; }
.theme-seg button { min-height: 40px; padding: 6px 16px; border: 0; background: transparent; color: var(--bar-muted); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.theme-seg button + button { border-left: 1px solid rgba(255,255,255,0.25); }
.theme-seg button[aria-checked="true"] { background: #f2a65a; color: #13283d; }
@media (max-width: 839px) {
    .logins { display: none; }
    .nav-toggle { display: inline-flex; }
}
@media (min-width: 840px) { .nav-panel { display: none !important; } }

/* Long email addresses and links in listings wrap instead of widening the page on phones. */
.event .what { min-width: 0; overflow-wrap: anywhere; }

/* Venue finder */
.venue-link { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.venue-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.places { padding-top: 18px; padding-bottom: 32px; max-width: 980px; }
.places-lead, .place-sub { color: var(--muted); margin: 0 0 18px; }
.crumb { margin: 0 0 6px; font-size: 0.9rem; }
.crumb a { color: var(--muted); }
.places-group { margin-bottom: 24px; }
.place-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.place-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.place-tile:hover { border-color: var(--accent); }
.place-tile-name { font-family: var(--head); font-weight: 600; font-size: 1.1rem; }
.place-tile-rooms { color: var(--muted); font-size: 0.88rem; }
.place-tile-dir { color: var(--accent); font-size: 0.82rem; font-weight: 600; }
.outdoor-tag { display: inline-block; margin-left: 8px; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; font-family: "Inter", sans-serif; font-size: 0.72rem; font-weight: 600; color: var(--muted); vertical-align: 2px; }
.place-facts { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.place-facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.place-facts dl:empty { display: none; }
.place-facts dt { font-weight: 700; }
.place-facts dd { margin: 0; }
.place-photo-lg { width: 100%; max-width: 520px; border-radius: var(--radius); }
.place-pending { color: var(--muted); margin: 0; }
.btn.directions { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); text-decoration: none; }
.room-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.room { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.room:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.room-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.room-head .outdoor-tag { margin-left: 0; }
.room-level { color: var(--muted); font-size: 0.85rem; }
.room p { margin: 6px 0 0; }
.room .room-note { color: var(--muted); font-size: 0.9rem; }
.room .btn.directions { margin-top: 10px; min-height: 38px; padding: 6px 12px; font-size: 0.85rem; }
.place-events { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.place-events li { display: grid; grid-template-columns: 11em 1fr; gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pe-when { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.pe-room { color: var(--muted); }
@media (max-width: 640px) { .place-events li { grid-template-columns: 1fr; } }
.place-hits { margin-bottom: 18px; }
.place-hit { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.place-hit svg { color: var(--accent); flex: none; }
.place-hit:hover { border-color: var(--accent); }
.place-hit-in { color: var(--muted); }
