/* DE Beaches Today: what's on at the Delaware beaches, all year.
   Two themes on one set of tokens:
     - Daylight: cool fog and winter sea.
     - Neon after dark: night-blue page, with section titles in their neon colours.
   Which one shows: <html data-theme="light|dark">, set by assets/js/theme.js (device setting by default,
   Rehoboth sunset, or a manual choice). Without JS, the device setting decides via the media query.
   Type colors: deals = orange crush, happy hours = golden hour, trivia & games = neon-sign rose,
   events = sea glass, music = dusk. Glows (soft halos, kept low so they're easy on the eyes) are reserved for the wordmark and page titles.

   Shape rule (applies everywhere):
     - clickable controls (buttons, chips, toggles, tabs)  -> full pill (--r-pill)
     - icon-only buttons and small markers               -> circle
     - inputs, panels, notices, tags, menus               -> 4px (--r)
     - the home page's day tabs                           -> 4px top corners only (they join the day panel below)
     - the home page's Today tiles                        -> 4px (small panels with a coloured top edge)
*/

@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  /* Bungee: lettering made for roadside and storefront signs. Used for the wordmark, page titles and the Today tiles. */
  font-family: 'Bungee';
  src: url('../fonts/bungee-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --fog: #e6ecee;
  --paper: #f8fafa;
  --ink: #16242c;
  --ink-2: #4b5b64;
  --line: #c8d2d6;
  --line-2: #dde4e7;
  --sea: #1f3440;
  --sea-2: #2c4856;
  --on-sea: #eef3f5;
  --on-sea-2: #a9bcc5;

  --deal: #ad4a0c;       /* text on paper: 5.3:1 */
  --deal-fill: #e8772e;  /* marks and fills only; text on it uses --on-accent */
  --on-accent: #16242c;  /* 5.4:1 on --deal-fill */
  --deal-tint: #fbe9dc;
  --event: #2a7a6a;
  --event-fill: #2f8574;
  --event-tint: #dcefea;
  --music: #5f4f9e;
  --music-fill: #6a58a8;
  --music-tint: #e8e4f4;
  --happy: #7a5800;       /* 6.2:1 on paper */
  --happy-fill: #b88207;  /* 3.2:1 on paper for marks */
  --happy-tint: #f6ecd0;
  --games: #a8305c;       /* 6.2:1 on paper */
  --games-fill: #c23b6e;
  --games-tint: #f8e1ea;

  --danger: #b3261e;
  --ok: #2a7a4a;
  --focus: #ad4a0c;          /* 4.7:1 on the page, 5.3:1 on panels */
  --field-line: #748690;     /* form field borders: 3.6:1 on panels, 3.2:1 on the page */
  --accent: #e8772e;
  --live: #1d6a5a;          /* "Now" label: 5.4:1 on the page, 6.2:1 on panels */
  --primary-bg: #1f3440;
  --primary-fg: #eef3f5;
  --primary-hover: #2c4856;
  --brand-color: #eef3f5;
  --brand-glow: none;
  --title-glow: none;

  --sign-glow: none;

  --font-sign: 'Bungee', 'Space Grotesk', sans-serif;
  --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r: 4px;
  --r-pill: 999px;
  --gutter: clamp(16px, 4vw, 40px);
  --head-h: 72px;            /* the sticky header's height, for anything that scrolls or sticks below it */
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fog: #12141d;
    --paper: #1a1d29;
    --ink: #eceff7;           /* 14.6:1 on paper */
    --ink-2: #a3abc2;         /* 7.3:1 */
    --line: #2e3345;
    --line-2: #242838;
    --sea: #0d0f16;
    --sea-2: #1f2331;
    --on-sea: #eceff7;
    --on-sea-2: #8f98b3;

    --deal: #ff9a57;          /* 8.0:1 */
    --deal-fill: #ff8a3d;
    --deal-tint: #3a2418;
    --event: #4ee6d6;         /* 10.9:1 */
    --event-fill: #3ee0d0;
    --event-tint: #123332;
    --music: #b9a3ff;         /* 7.8:1 */
    --music-fill: #a98bff;
    --music-tint: #2a2446;
    --happy: #ffd166;         /* 11.6:1 */
    --happy-fill: #ffc53d;
    --happy-tint: #362d14;
    --games: #ff7ab5;         /* 7.0:1 */
    --games-fill: #ff5fa2;
    --games-tint: #3a1b2c;

    --danger: #ff8a80;
    --ok: #6ee7a8;
    --on-accent: #12141d;     /* 7.8:1 on the orange fill */
    --focus: #3ee0d0;
    --field-line: #717a98;   /* 4:1 on panels */
    --accent: #ff5fa2;
    --live: #4ee6d6;
    --primary-bg: #eceff7;
    --primary-fg: #12141d;
    --primary-hover: #f7f8fc;
    --brand-color: #ff7ab5;
    --brand-glow: 0 0 8px rgb(255 95 162 / .3);
    --title-glow: 0 0 12px color-mix(in srgb, currentColor 25%, transparent);

    --sign-letter-page: #dfe9f2;
    --sign-glow: 0 0 8px rgb(62 224 208 / .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fog: #12141d;
  --paper: #1a1d29;
  --ink: #eceff7;       /* 14.6:1 on paper */
  --ink-2: #a3abc2;     /* 7.3:1 */
  --line: #2e3345;
  --line-2: #242838;
  --sea: #0d0f16;
  --sea-2: #1f2331;
  --on-sea: #eceff7;
  --on-sea-2: #8f98b3;

  --deal: #ff9a57;      /* 8.0:1 */
  --deal-fill: #ff8a3d;
  --deal-tint: #3a2418;
  --event: #4ee6d6;     /* 10.9:1 */
  --event-fill: #3ee0d0;
  --event-tint: #123332;
  --music: #b9a3ff;     /* 7.8:1 */
  --music-fill: #a98bff;
  --music-tint: #2a2446;
  --happy: #ffd166;     /* 11.6:1 */
  --happy-fill: #ffc53d;
  --happy-tint: #362d14;
  --games: #ff7ab5;     /* 7.0:1 */
  --games-fill: #ff5fa2;
  --games-tint: #3a1b2c;

  --danger: #ff8a80;
  --ok: #6ee7a8;
  --on-accent: #12141d;   /* 7.8:1 on the orange fill */
  --focus: #3ee0d0;
  --field-line: #717a98;
  --accent: #ff5fa2;
  --live: #4ee6d6;
  --primary-bg: #eceff7;
  --primary-fg: #12141d;
  --primary-hover: #f7f8fc;
  --brand-color: #ff7ab5;
  --brand-glow: 0 0 8px rgb(255 95 162 / .3);
  --title-glow: 0 0 12px color-mix(in srgb, currentColor 25%, transparent);

  --sign-letter-page: #dfe9f2;
  --sign-glow: 0 0 8px rgb(62 224 208 / .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font-body);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
/* On the dark header bar, the focus ring takes the bar's light text colour (11.6:1). */
.site-head :focus-visible { outline-color: var(--on-sea); }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0 0 .75em; }
small { font-size: .82em; }

.wrap { width: min(1440px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-2); }
.warn { color: var(--deal); }
.ok { color: var(--ok); }
[hidden] { display: none !important; }

/* ---- Header / footer ---------------------------------------------------- */

.site-head { background: var(--sea); color: var(--on-sea); }
/* The public header stays at the top while the page scrolls (plain CSS, no scroll listeners).
   Jump links land below it thanks to scroll-padding. */
.site-head:not(.site-head--admin) { position: sticky; top: 0; z-index: 40; box-shadow: 0 1px 0 rgb(0 0 0 / .12); }
html { scroll-padding-top: calc(var(--head-h) + 12px); }
.site-head__inner { display: flex; align-items: center; gap: 1rem 1.25rem; flex-wrap: wrap; padding-block: 14px; }
.site-head__tools { display: flex; align-items: center; gap: .6rem; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand__name { font: 400 1.45rem/1.1 var(--font-sign); color: var(--brand-color); text-shadow: var(--brand-glow); letter-spacing: .02em; word-spacing: .3em; }
.brand__tag { font-size: .8rem; color: var(--on-sea-2); margin-top: 4px; }
.nav { display: flex; align-items: center; gap: .25rem 1.25rem; flex-wrap: wrap; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 3px solid transparent; color: var(--on-sea); }
.nav a:hover { border-bottom-color: var(--on-sea-2); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav .nav__submit { border: 1px solid var(--on-sea-2); border-radius: var(--r-pill); padding: 5px 14px; }
.nav .nav__submit:hover, .nav .nav__submit[aria-current="page"] { background: var(--on-sea); color: var(--sea); border-color: var(--on-sea); }
.nav__form { display: inline; margin: 0; }

/* Theme picker (details/summary popover). Hidden until the theme script has run. */
html:not([data-mode]) .theme { display: none; }
.theme { position: relative; }
.theme__btn {
  list-style: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--on-sea-2);
  display: grid; place-items: center; cursor: pointer; color: var(--on-sea);
}
.theme__btn::-webkit-details-marker { display: none; }
.theme__btn:hover { border-color: var(--on-sea); }
.theme__btn:active { transform: translateY(1px); }
.theme__btn .icon { width: 18px; height: 18px; }
.theme__day { display: grid; }
.theme__night { display: none; }
:root[data-theme="dark"] .theme__day { display: none; }
:root[data-theme="dark"] .theme__night { display: grid; color: var(--brand-color); }
.theme__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; margin: 0; min-width: 240px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r);
  padding: .35rem; box-shadow: 0 14px 30px -14px rgb(0 0 0 / .5);
}
.theme__legend { padding: .35rem .6rem .25rem; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.theme__opt { position: relative; display: flex; align-items: center; gap: .65rem; padding: .55rem .6rem; border-radius: var(--r); cursor: pointer; font-weight: 500; }
.theme__opt:hover { background: var(--line-2); }
.theme__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.theme__opt:has(input:checked) { background: var(--line-2); font-weight: 700; }
.theme__opt:has(input:checked)::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.theme__opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -3px; }
.theme__opt small { display: block; font-size: .78rem; font-weight: 400; color: var(--ink-2); }
/* Menu button: phones only (see the 760px block). Shows a close icon while the menu is open. */
.menu-btn { display: none; background: none; padding: 0; font: inherit; }
.menu-btn__close, .is-open .menu-btn__open { display: none; }
.is-open .menu-btn__close { display: contents; }
.menu-btn__open { display: contents; }
@keyframes menu-drop { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .site-head.is-open .nav { animation: none !important; } }

/* Breadcrumbs above a page title. */
.crumbs { font-size: .88rem; color: var(--ink-2); margin-bottom: .9rem; display: flex; flex-wrap: wrap; gap: .1rem .45rem; }
.crumbs a { color: var(--ink-2); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

.linkish { background: none; border: 0; color: inherit; font: inherit; font-weight: 500; cursor: pointer; padding: 6px 0; }

.site-foot { margin-top: 4rem; border-top: 1px solid var(--line); padding-block: 2rem 3rem; color: var(--ink-2); font-size: .92rem; }
.site-foot__inner { max-width: 72ch; }
.site-foot__small { font-size: .85rem; }

/* ---- Hero: headline, a line of text and Where -------------------------------- */

/* A slim banner, so the week and the day's listings come first. */
.hero { padding-block: clamp(20px, 3vw, 40px) clamp(16px, 2vw, 28px); }
.hero__copy h1 { font: 700 clamp(1.5rem, 2.2vw, 2rem)/1.1 var(--font-display); letter-spacing: -.02em; margin-bottom: .35em; }
.hero__copy p { color: var(--ink-2); max-width: 46ch; }
.hero__town { margin-top: .75rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }

/* Kind tiles in the calendar bar: the day's count per kind, each one switching that kind on or off. */
.todaytiles { display: grid; grid-template-columns: repeat(5, minmax(5.8rem, 1fr)); gap: .45rem; min-width: 0; }
.todaytile {
  display: flex; flex-direction: column; gap: .2rem; padding: .45rem .7rem .5rem; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--r);
}
.todaytile strong { font: 400 1.55rem/1 var(--font-sign); color: var(--t); }
.todaytile span { font-size: .84rem; font-weight: 600; color: var(--ink-2); line-height: 1.2; }
.todaytile:hover { border-color: var(--c); }
.todaytile:active { transform: translateY(1px); }
/* Switched off: no fill, a dashed edge, the number greyed. */
.todaytile[aria-pressed="false"] { background: transparent; border-style: dashed; border-top-color: var(--field-line); }
.todaytile[aria-pressed="false"] strong { color: var(--ink-2); }
.todaytile--none strong { color: var(--ink-2); }
.todaytile--deal { --c: var(--deal-fill); --t: var(--deal); }
.todaytile--happyhour { --c: var(--happy-fill); --t: var(--happy); }
.todaytile--games { --c: var(--games-fill); --t: var(--games); }
.todaytile--music { --c: var(--music-fill); --t: var(--music); }
.todaytile--event { --c: var(--event-fill); --t: var(--event); }

/* ---- Buttons, chips, fields -------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: .4em;
  font: 600 .95rem/1 var(--font-body); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: .7em 1.2em; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--ink-2); }
.btn--primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-fg); }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--quiet { background: transparent; }
.btn--small { font-size: .82rem; padding: .5em .75em; }
.btn--danger { color: var(--danger); }
.btn--danger:hover { border-color: var(--danger); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); cursor: pointer; display: grid; place-items: center; padding: 0;
}
.icon-btn svg, .icon { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--ink-2); }
/* Press feedback: a 1px push on anything clickable. */
.btn:active, .icon-btn:active, .tabs a:active, .nav__submit:active,
.chip:active > span, .seg__opt:active span, .days__d:active span { transform: translateY(1px); }

.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip > span {
  display: inline-flex; align-items: center; gap: .5em; padding: .45em .85em .45em .7em;
  border: 1px solid var(--line); border-radius: var(--r-pill); font-weight: 600; font-size: .9rem; background: var(--paper); color: var(--ink-2);
}
.chip > span::before { content: ''; width: .75em; height: .75em; border-radius: 50%; border: 2px solid var(--c); }
.chip input:checked + span { color: var(--ink); border-color: var(--c); }
.chip input:checked + span::before { background: var(--c); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip .chip__short { display: none; }
.chip--deal { --c: var(--deal-fill); }
.chip--event { --c: var(--event-fill); }
.chip--music { --c: var(--music-fill); }
.chip--happyhour { --c: var(--happy-fill); }
.chip--games { --c: var(--games-fill); }

.field { display: flex; flex-direction: column; gap: .35rem; margin: 0 0 1.1rem; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 600; font-size: .92rem; }
.field legend { padding: 0; margin-bottom: .5rem; }
.field small { font-weight: 400; color: var(--ink-2); }
.field--inline { flex-direction: row; align-items: center; gap: .6rem; margin: 0; }
.field__hint { color: var(--ink-2); font-size: .9rem; margin-top: -.25rem; }
.field__error { color: var(--danger); font-size: .88rem; font-weight: 500; }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=date], input[type=time],
input[type=search], input[type=password], select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--field-line); border-radius: var(--r); padding: .6em .7em; width: 100%; min-width: 0;
}
.field--inline select, .field--inline input { width: auto; }
textarea { resize: vertical; }
::placeholder { color: var(--ink-2); opacity: 1; }
[aria-invalid="true"] { border-color: var(--danger); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 1rem; }
.check { display: flex; gap: .5rem; align-items: center; margin-bottom: .6rem; }

.seg { display: flex; flex-wrap: wrap; gap: .5rem; }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg__opt span { display: block; padding: .6em 1.1em; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--paper); font-weight: 500; }
.seg__opt input:checked + span { border-color: var(--c, var(--ink)); box-shadow: inset 0 0 0 1px var(--c, var(--ink)); background: var(--t, var(--paper)); }
.seg__opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg__opt--deal { --c: var(--deal-fill); --t: var(--deal-tint); }
.seg__opt--event { --c: var(--event-fill); --t: var(--event-tint); }
.seg__opt--music { --c: var(--music-fill); --t: var(--music-tint); }
.seg__opt--happyhour { --c: var(--happy-fill); --t: var(--happy-tint); }
.seg__opt--games { --c: var(--games-fill); --t: var(--games-tint); }
.seg--small .seg__opt span { padding: .45em .8em; font-size: .92rem; }

.days { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 1rem; }
.days__d { position: relative; }
.days__d input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.days__d span { display: grid; place-items: center; width: 3.1rem; height: 2.5rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--paper); font-weight: 600; font-size: .9rem; }
.days__d input:checked + span { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg); }
.days__d input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.days .field__error { flex-basis: 100%; }
.days__nth { margin-left: .5rem; }

.notice { border-left: 4px solid var(--ink-2); background: var(--paper); padding: .9rem 1.1rem .2rem; margin-bottom: 1.25rem; border-radius: 0 var(--r) var(--r) 0; }
.notice--ok { border-color: var(--ok); }
.notice--error { border-color: var(--danger); }
.empty { color: var(--ink-2); padding: 1.25rem 0; }

.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15em .55em; border-radius: var(--r-pill); vertical-align: .1em; }
.badge--now { background: var(--deal-fill); color: var(--on-accent); }
.badge--soon { background: transparent; color: var(--event); box-shadow: inset 0 0 0 1.5px var(--event-fill); }
.badge--ending { background: var(--happy-tint); color: var(--happy); box-shadow: inset 0 0 0 1.5px var(--happy-fill); }
/* Live status under a listing's time (Tonight, and today in the calendar): coloured text with a status dot. */
.item__time .badge {
  display: inline-flex; align-items: center; gap: .4em; margin-top: .3rem; padding: 0;
  background: none; box-shadow: none; border-radius: 0; font-size: .82rem; font-weight: 700; line-height: 1.2;
}
.item__time .badge::before { content: ''; width: .5em; height: .5em; border-radius: 50%; background: currentColor; flex: none; }
.item__time .badge--now { color: var(--live); }
.item__time .badge--soon { color: var(--happy); }
.item__time .badge--ending { color: var(--deal); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: .12em .5em; border-radius: var(--r); vertical-align: .12em; }
.tag--deal { background: var(--deal-tint); color: var(--deal); }
.tag--event { background: var(--event-tint); color: var(--event); }
.tag--music { background: var(--music-tint); color: var(--music); }
.tag--happyhour { background: var(--happy-tint); color: var(--happy); }
.tag--games { background: var(--games-tint); color: var(--games); }
/* Paid placement label: outlined in ink so it never reads as one of the listing-type colours. */
.tag--featured { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); text-decoration: none; letter-spacing: .02em; }
.tag--featured:hover { background: var(--ink); color: var(--paper); }
.item__title .tag--featured { margin-left: .35rem; vertical-align: .15em; }

/* ---- Calendar ----------------------------------------------------------- */

.cal { padding-bottom: 2rem; }
.cal__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: .5rem 1rem; }
.cal__nav { display: flex; align-items: center; gap: .6rem; }
.cal__month { font: 700 clamp(1.25rem, 1.9vw, 1.55rem)/1 var(--font-display); min-width: 6.5em; text-align: center; }
.cal__types, .kindchips { display: flex; gap: .5rem; border: 0; padding: 0; margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.cal__types::-webkit-scrollbar, .kindchips::-webkit-scrollbar { display: none; }
/* A fieldset won't shrink below its contents unless told to; the chip row scrolls instead. */
.cal__types { min-inline-size: 0; }
.cal__bar > * { min-width: 0; }
.cal__types .chip, .kindchips .chip { flex: none; }
/* Link chips (Today's kind filter): the current one looks like a ticked chip. */
.chip--all { --c: var(--ink-2); }
a.chip { text-decoration: none; }
a.chip[aria-current="page"] > span { color: var(--ink); border-color: var(--c); }
a.chip[aria-current="page"] > span::before { background: var(--c); }
a.chip:hover > span { border-color: var(--ink-2); }
.cal__body { display: block; }
/* One week by default (the selected day's), expandable to the whole month. */
.cell__num small { font-size: .7em; font-weight: 600; color: var(--ink-2); }
/* Week view: the days are tabs (weekday, date, type ticks) and the selected one joins the day panel below,
   so the strip reads as "pick a day of this list". */
.cal__grid--week .cal__cells { background: none; border: 0; gap: 6px; position: relative; z-index: 1; }
.cal__grid--week .cell {
  min-height: 0; gap: 5px; padding: .55rem .7rem .6rem; border: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0;
  background: color-mix(in srgb, var(--paper) 45%, var(--fog));
}
.cal__grid--week .cell:hover { background: color-mix(in srgb, var(--paper) 80%, var(--fog)); }
.cal__grid--week .cell--sel { background: var(--paper); border-bottom-color: var(--paper); box-shadow: inset 0 3px 0 var(--ink); margin-bottom: -1px; }
.cal__grid--week .cell__ticks { display: flex; gap: 3px; width: 100%; margin-top: 2px; }
.cell__dow { font-size: .78rem; font-weight: 600; color: var(--ink-2); }
/* Every tab's date sits in the same box as today's circle, so the ticks line up across the week. */
.cal__grid--week .cell__num { display: inline-flex; align-items: center; height: 1.7em; }
.cal__grid--week .cell--today .cell__num { margin: 0; justify-content: center; }
/* The panel the day tabs open into (home week tabs, and Today / Tomorrow / This weekend). */
.daypanel { padding: 1.1rem clamp(14px, 2vw, 28px) 1.5rem; background: var(--paper); border: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }
.daypanel .tonight__cols { margin-top: .75rem; }
.daypanel .tonight__colh { font-size: 1.25rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line); }
.daypanel .tonight__sub { margin-top: 1rem; }
.daypanel .tonight__sub > .tonight__h { font-size: .95rem; border-bottom-color: var(--line-2); }
.daytabs__date { font-weight: 500; font-size: .85em; color: var(--ink-2); }
.day__date a { color: inherit; display: inline-block; padding-block: 3px; }
/* Today / Tomorrow / This weekend: link tabs with the same shape as the home week tabs. */
.daytabs { display: flex; gap: 6px; position: relative; z-index: 1; overflow-x: auto; scrollbar-width: none; }
.daytabs::-webkit-scrollbar { display: none; }
.daytabs a {
  flex: none; padding: .6rem 1.15rem; border: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; text-decoration: none;
  font-weight: 600; color: var(--ink-2); background: color-mix(in srgb, var(--paper) 45%, var(--fog));
}
.daytabs a:hover { color: var(--ink); background: color-mix(in srgb, var(--paper) 80%, var(--fog)); }
.daytabs a[aria-current="page"] { color: var(--ink); background: var(--paper); border-bottom-color: var(--paper); box-shadow: inset 0 3px 0 var(--ink); margin-bottom: -1px; }
.daytabs + .daypanel { border-top-left-radius: 0; }

.cal__grid { transition: opacity .15s; }
.cal__grid.is-loading { opacity: .45; }
.cal__cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }

.cell {
  all: unset; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 3px;
  min-height: 124px; padding: 6px 8px 8px; background: var(--paper); cursor: pointer; position: relative; min-width: 0;
}
.cell:hover { background: color-mix(in srgb, var(--paper) 88%, var(--ink)); }
.cell:active .cell__num { transform: translateY(1px); }
.cell:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; z-index: 1; }
.cell__num { font: 700 1.25rem/1 var(--font-display); }
.cell--today .cell__num { display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; margin: -3px 0 0 -4px; border-radius: 50%; background: var(--primary-bg); color: var(--primary-fg); width: max-content; }
.cell--sel { box-shadow: inset 0 0 0 2px var(--ink); z-index: 1; }
.cell--past .cell__num, .cell--past .cell__num small { color: var(--ink-2); }
.cell__ticks { display: none; }
.tick { display: block; height: 4px; border-radius: var(--r-pill); flex: 1; }
.tick--deal { background: var(--deal); }
.tick--event { background: var(--event-fill); }
.tick--music { background: var(--music-fill); }
.tick--happyhour { background: var(--happy-fill); }
.tick--games { background: var(--games-fill); }

/* Day details: the main content under the calendar, the same timeline as the Today page (src/daypage.php). */
.day { transition: opacity .15s; }
.day.is-loading { opacity: .45; }
.day__date { font: 700 1.15rem/1.2 var(--font-display); color: var(--ink-2); margin-bottom: .25rem; }

.item { border-top: 1px solid var(--line-2); }
.item summary { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: .6rem; padding: .6rem 0; cursor: pointer; list-style: none; }
.item summary::-webkit-details-marker { display: none; }
.item summary:hover .item__title { text-decoration: underline; text-decoration-color: var(--line); }
.item__time { display: flex; flex-direction: column; align-items: flex-start; font-size: .8rem; color: var(--ink-2); padding-top: .1rem; }
.item__body { display: flex; flex-direction: column; min-width: 0; }
.item__title { font-weight: 600; line-height: 1.3; }
.item__price { display: block; font: 700 1.05rem/1.15 var(--font-display); color: var(--t); margin: .1rem 0 .05rem; }
.item__where { font-size: .86rem; color: var(--ink-2); }
.item__more {
  /* Expanded details: a panel tinted with the listing's type colour, aligned with the title column. */
  margin: 0 0 .8rem 6.8rem; padding: .8rem 1rem .7rem; font-size: .92rem;
  background: color-mix(in srgb, var(--c, var(--ink-2)) 10%, var(--paper));
  border-radius: var(--r);
}
.item[open] > .item__more { animation: item-open .18s ease-out; }
@keyframes item-open { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .item[open] > .item__more { animation: none; } }
.item__more > :last-child { margin-bottom: 0; }
.item__more p { margin-bottom: .4rem; }
.item__performer { font-weight: 600; }
.item__facts { color: var(--ink-2); font-size: .85rem; }
.item__verify { color: var(--ink-2); font-size: .85rem; font-style: italic; }
.item__links { display: flex; gap: 1rem; font-weight: 600; font-size: .88rem; }

/* ---- Content pages ------------------------------------------------------ */

.page { padding-top: clamp(24px, 4vw, 48px); }
.page--narrow { max-width: 820px; }
.page__head { margin-bottom: 1.5rem; max-width: 68ch; }
.page__head h1 { font: 400 clamp(1.9rem, 4.2vw, 3rem)/1.2 var(--font-sign); margin-bottom: .35em; color: var(--sect, var(--ink)); text-shadow: var(--title-glow); letter-spacing: .02em; }
/* Section colour for page titles: the neon tube colour after dark, plain ink by day. */
:root[data-theme="dark"] .sect-deals { --sect: var(--deal); }
:root[data-theme="dark"] .sect-happyhour { --sect: var(--happy); }
:root[data-theme="dark"] .sect-games { --sect: var(--games); }
:root[data-theme="dark"] .sect-events { --sect: var(--event); }
:root[data-theme="dark"] .sect-music { --sect: var(--music); }
:root[data-theme="dark"] .sect-submit, :root[data-theme="dark"] .sect-venue { --sect: var(--event); }
:root[data-theme="dark"] .sect-today { --sect: var(--games); }
:root[data-theme="dark"] .sect-tomorrow { --sect: var(--event); }
.page__head p { color: var(--ink-2); }
.page__count { color: var(--ink-2); margin: -.25rem 0 1.25rem; }
.page__head--row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; max-width: none; }
.page__head--row h1 { margin: 0; }

.tabs { display: flex; gap: .4rem; overflow-x: auto; margin-bottom: 1.25rem; padding-bottom: 2px; scrollbar-width: thin; }
.tabs a { text-decoration: none; padding: .55rem 1rem; font-weight: 600; white-space: nowrap; display: flex; align-items: baseline; gap: .35rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--paper); }
.tabs a:hover { border-color: var(--ink-2); }
.tabs a[aria-current="page"] { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg); }
.tabs__today { font-size: .72rem; font-weight: 500; opacity: .75; }
.tabs__short { display: none; }

.filters { display: flex; gap: .75rem 1.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem; }
.filters .field > span { font-size: .88rem; color: var(--ink-2); }

/* Menu board: dotted leaders from the deal to its price. */
.board { margin-bottom: 2rem; }
.board__title { font: 700 1.7rem/1 var(--font-display); display: flex; align-items: baseline; gap: .6rem; padding-bottom: .5rem; border-bottom: 2px solid var(--ink); margin-bottom: .25rem; }
/* Deals for one day, grouped by town, flowing into two balanced columns. */
.board-groups { columns: 2 460px; column-gap: clamp(24px, 4vw, 56px); }
.board-groups .board { break-inside: avoid-column; }
.board-groups .board__title { font-size: 1.45rem; }
.board__count { font: 600 .9rem/1 var(--font-body); color: var(--ink-2); }
.row { padding: .85rem 0; border-top: 1px solid var(--line-2); }
.row:first-of-type { border-top: 0; }
.row__title { display: flex; align-items: baseline; gap: .5rem; font: 600 1.08rem/1.3 var(--font-body); }
.row__name { min-width: 0; }
.row__leader { flex: 1; min-width: 1.5rem; border-bottom: 2px dotted var(--line); transform: translateY(-.25em); }
.row__price { font: 700 1.35rem/1 var(--font-display); white-space: nowrap; color: var(--t); max-width: 45%; text-align: right; white-space: normal; }
/* Long prices ("$5 drinks; 50% off daily item") get their own line instead of squeezing the name. */
.row--longprice .row__title { flex-wrap: wrap; }
.row--longprice .row__leader { display: none; }
.row--longprice .row__price { flex-basis: 100%; max-width: none; text-align: left; font-size: 1.2rem; }
.row--deal { --t: var(--deal); }
.row--event { --t: var(--event); }
.row--music { --t: var(--music); }
.row--happyhour { --t: var(--happy); }
.row--games { --t: var(--games); }
/* Featured (paid) rows: a light wash of the type colour and an edge, with room so the text clears it. */
.row--featured, .item--featured { background: color-mix(in srgb, var(--c, var(--t)) 8%, transparent); }
.row.row--featured { padding-inline: .9rem .75rem; box-shadow: inset 3px 0 0 var(--t); border-top-color: transparent; }
.row__meta { color: var(--ink-2); font-size: .93rem; margin: .2rem 0 .3rem; display: flex; flex-wrap: wrap; gap: .2rem .9rem; align-items: center; }
.row__when { font-weight: 600; color: var(--ink); }
.row__performer { font-weight: 600; margin-bottom: .2rem; }
.row__desc { max-width: 70ch; margin-bottom: .3rem; }
.row__links { display: flex; gap: 1rem; font-size: .85rem; font-weight: 600; margin: 0; flex-wrap: wrap; }
.row__links:empty { display: none; }
.row__verify { color: var(--ink-2); font-weight: 400; font-style: italic; }

.agenda-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: clamp(16px, 2.5vw, 32px); align-items: start; }
.agenda-cols > :only-child { grid-column: 1 / -1; }
.agenda__title { font: 700 1.7rem/1 var(--font-display); padding-bottom: .5rem; border-bottom: 2px solid var(--ink); }
.agenda__jump { margin: .9rem 0 0; }
.agenda__jump a { padding: .4rem .85rem; font-size: .92rem; }
.agenda__month { font: 700 1.25rem/1 var(--font-display); color: var(--ink-2); padding: 1.6rem 0 .5rem; border-bottom: 1px solid var(--line); }
.agenda__day { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 1rem; border-bottom: 1px solid var(--line); padding: 1rem 0; }
.agenda__date { display: flex; flex-direction: column; align-items: center; margin: 0; line-height: 1; padding-top: .2rem; }
.agenda__dow { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.agenda__dnum { font: 700 2.2rem/1 var(--font-display); }
.agenda__mon { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.agenda__items .row:first-child { padding-top: 0; }
.board--side { position: sticky; top: calc(var(--head-h) + 12px); max-height: calc(100vh - var(--head-h) - 24px); overflow: auto; }

.venue-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: clamp(20px, 4vw, 56px); align-items: start; margin-bottom: 1.5rem; }
.venue-top .page__head { margin-bottom: 0; }
.venue-top > :only-child { grid-column: 1 / -1; }
.hours { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.2rem; }
.hours__h { font: 700 1.2rem/1.1 var(--font-display); margin-bottom: .4rem; }
.hours__state { font-weight: 700; margin-bottom: .6rem; }
.hours__state--open { color: var(--event); }
.hours__state--closed { color: var(--deal); }
.hours__table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours__table th, .hours__table td { text-align: left; padding: .28rem 0; border-bottom: 1px solid var(--line-2); font-weight: 400; }
.hours__table td { text-align: right; }
.hours__today th, .hours__today td { font-weight: 700; }
.hours__note { font-size: .9rem; margin: .7rem 0 0; }
.hours__src { font-size: .8rem; color: var(--ink-2); margin: .6rem 0 0; }
.venue-head__facts { font-weight: 600; color: var(--ink) !important; }
.venue-head__contact { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-direction: column; gap: .55rem; font-weight: 500; }
.venue-head__contact li { display: flex; align-items: center; gap: .6rem; }
.venue-head__contact .icon { width: 20px; height: 20px; flex: none; color: var(--ink-2); }

.form { background: var(--paper); border: 1px solid var(--line); padding: clamp(16px, 3vw, 32px); }
.form .field-row + .field-row { margin-top: 0; }
.form__legal { font-size: .85rem; color: var(--ink-2); max-width: 65ch; margin: .75rem 0 0; }
.form__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.form fieldset.field { border-top: 1px solid var(--line-2); padding-top: 1rem; }
.form fieldset.field:first-of-type { border-top: 0; padding-top: 0; }

/* Event page: kind, title and a date tile with when and where up top; a side card (website, calendar,
   share) beside it on desktop and right under it on phones; then the description and a light facts list. */
.event--event { --c: var(--event-fill); --t: var(--event); }
.event--music { --c: var(--music-fill); --t: var(--music); }
.event--games { --c: var(--games-fill); --t: var(--games); }
.event--deal { --c: var(--deal-fill); --t: var(--deal); }
.event--happyhour { --c: var(--happy-fill); --t: var(--happy); }
.event__price { font: 700 clamp(1.3rem, 2.4vw, 1.7rem)/1.15 var(--font-display); color: var(--t); margin: -.5rem 0 1rem; }
.event__menu .menuphoto { width: 100%; margin: 0 0 .6rem; }
.event__menu .menuphoto img { max-height: 220px; }
.event-top {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); grid-template-rows: auto 1fr;
  grid-template-areas: "head side" "body side"; gap: 0 clamp(20px, 4vw, 56px); align-items: start;
}
.event__head { grid-area: head; margin-bottom: 1.5rem; }
.event__side { grid-area: side; display: grid; gap: 1.1rem; }
.event__body { grid-area: body; }
.event__kind { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 0 0 .5rem; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
/* Event names are often long, so the title is set in the text face rather than the neon one; after dark it takes the kind's colour and glow. */
.event__title { font: 700 clamp(1.9rem, 4vw, 2.8rem)/1.08 var(--font-display); letter-spacing: -.015em; margin-bottom: 1rem; }
:root[data-theme="dark"] .event__title { color: var(--t); text-shadow: var(--title-glow); }
.event__when { display: flex; gap: 1rem; align-items: flex-start; }
.event__tile {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0;
  width: 4.6rem; padding: .45rem 0 .5rem; border: 2px solid var(--c); border-radius: var(--r); background: var(--paper); line-height: 1;
}
.event__tile span { font-size: .78rem; font-weight: 700; color: var(--t); }
.event__tile span:last-child { color: var(--ink-2); font-weight: 600; }
.event__tile strong { font: 700 2rem/1.05 var(--font-display); margin: .15rem 0; }
.event__whenwhere { min-width: 0; }
.event__date { font: 700 1.3rem/1.2 var(--font-display); margin: .1rem 0 .1rem; }
.event__time { font-weight: 600; color: var(--t); margin: 0 0 .35rem; }
.event__where { margin: .35rem 0 0; }
.event__addr { display: block; color: var(--ink-2); font-size: .93rem; }
.event__dir { display: inline-flex; align-items: center; gap: .3rem; margin-top: .35rem; font-size: .9rem; font-weight: 600; }
.event__dir .icon { width: 16px; height: 16px; }
.event__site { justify-content: center; }
.event__action + .event__action, .event__site + .event__action { padding-top: 1rem; border-top: 1px solid var(--line-2); }
.event__actionh { font: 700 1.1rem/1.1 var(--font-display); margin-bottom: .6rem; }
.event__note { font-size: .88rem; color: var(--ink-2); margin: .45rem 0 0; }
/* Texting a link only works from a phone: hide it where there's a mouse. */
@media (hover: hover) and (pointer: fine) { .share__sms { display: none; } }
.event__desc { max-width: 65ch; font-size: 1.08rem; margin-bottom: 1.25rem; }
.event__facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .9rem 1.5rem; margin: 0 0 1.1rem; max-width: 65ch; padding-top: 1rem; border-top: 1px solid var(--line-2); }
.event__facts dt { color: var(--ink-2); font-weight: 600; font-size: .85rem; }
.event__facts dd { margin: .1rem 0 0; font-weight: 500; }
.event__meta { font-size: .88rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.event__meta a { font-weight: 600; }
.event__more { margin-top: 2.75rem; }
.thisweek__list.event__morelist { columns: 3 280px; }

/* Town hub: today's timeline on the left, the town's places in a card on the right. */
.town-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: clamp(20px, 3vw, 40px); align-items: start; margin-top: 1.5rem; }
.town-top > :only-child { grid-column: 1 / -1; }
.town__upcoming { margin-top: 2.25rem; }
.town__upcoming .thisweek__list { columns: 2 300px; }
.town__places .vlist__item:last-child { border-bottom: 0; }

/* Menu photo popup (<dialog>): the photo fitted to the screen, with links to the full size and to send an update. */
.menudlg { width: min(94vw, 760px); max-height: 94vh; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink); }
.menudlg::backdrop { background: rgb(8 12 16 / .7); }
.menudlg__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .9rem .75rem 1.1rem; border-bottom: 1px solid var(--line-2); }
.menudlg__title { font: 700 1.05rem/1.25 var(--font-display); }
.menudlg__img { display: block; width: 100%; height: auto; max-height: calc(94vh - 9rem); object-fit: contain; background: var(--fog); }
.menudlg__links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; padding: .8rem 1.1rem 1rem; font-weight: 600; font-size: .92rem; }

/* Menu photos: a thumbnail linking to the full photo. */
.menuphoto { display: block; width: min(100%, 240px); margin: .35rem 0 .5rem; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; line-height: 0; }
.menuphoto img { width: 100%; height: auto; max-height: 300px; object-fit: cover; object-position: top; }
.menuphoto:hover { border-color: var(--ink-2); }
.photoq { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.photoq img { width: 200px; height: auto; border-radius: var(--r); border: 1px solid var(--line); }
@media (max-width: 760px) { .photoq { grid-template-columns: minmax(0, 1fr); } }

/* Venue page: other places in the same town. */
.nearby { margin-top: 2.5rem; }

/* Advertise page */
.advertise__block { margin-top: 2rem; }
.advertise__block > p { max-width: 65ch; }
.advertise__list { margin: .25rem 0 0; padding-left: 1.2rem; max-width: 65ch; }
.advertise__list li { margin-bottom: .4rem; }
.nearby__list { list-style: none; margin: .5rem 0 1rem; padding: 0; columns: 3 220px; column-gap: 2rem; }
.nearby__list li { break-inside: avoid; padding: .35rem 0; }
.nearby__list .muted { display: block; font-size: .85rem; }

/* Home: this week's events and shows, readable without JavaScript. */
.thisweek { margin-top: 1rem; }
.thisweek__list { list-style: none; margin: .5rem 0 1rem; padding: 0; columns: 2 420px; column-gap: clamp(24px, 4vw, 56px); }
.thisweek__item { break-inside: avoid; display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .1rem 1rem; padding: .6rem 0 .6rem .75rem; border-left: 3px solid var(--c); margin-bottom: .35rem; }
.thisweek__when { grid-row: span 2; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.thisweek__title { font-weight: 600; text-decoration: none; }
.thisweek__title:hover { text-decoration: underline; }
.thisweek__where { font-size: .88rem; color: var(--ink-2); }
.thisweek__more { display: flex; gap: 1.25rem; font-weight: 600; }

/* ---- Where picker: areas + towns ----------------------------------------------------- */

.where { position: relative; display: inline-block; }
.where__btn {
  list-style: none; display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  padding: .55rem 1rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--paper); font-weight: 500;
}
.where__btn::-webkit-details-marker { display: none; }
.where__btn:hover { border-color: var(--ink-2); }
.where__btn:active { transform: translateY(1px); }
.where__lbl { color: var(--ink-2); font-size: .9rem; }
.where__btn .icon { width: 14px; height: 14px; color: var(--ink-2); }
.where[open] .where__btn .icon { transform: rotate(180deg); }
.where__panel {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; width: min(420px, calc(100vw - 32px));
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r);
  padding: .6rem .8rem .8rem; box-shadow: 0 14px 30px -14px rgb(0 0 0 / .5);
}
.where__area { border: 0; margin: 0; padding: .5rem 0; border-bottom: 1px solid var(--line-2); }
.where__areaname { display: flex; align-items: center; gap: .5rem; font-weight: 700; cursor: pointer; }
.where__towns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem .75rem; padding: .35rem 0 0 1.6rem; }
.where__town { display: flex; align-items: center; gap: .45rem; font-size: .93rem; cursor: pointer; padding: .15rem 0; }
.where input[type=checkbox] { width: 1rem; height: 1rem; accent-color: var(--accent); }
.where__actions { display: flex; justify-content: flex-end; gap: .5rem; padding-top: .7rem; }

/* ---- Search: header panel, autocomplete, results ------------------------------ */

.hsearch { position: relative; }
.hsearch > summary { list-style: none; }
.hsearch > summary::-webkit-details-marker { display: none; }
.hsearch__panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 21; width: min(360px, calc(100vw - 32px));
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: .5rem;
  box-shadow: 0 14px 30px -14px rgb(0 0 0 / .5);
}
.suggest { position: relative; flex: 1; min-width: 0; }
.suggest input { width: 100%; }
.suggest__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 22; margin: 0; padding: .3rem; list-style: none;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 14px 30px -14px rgb(0 0 0 / .5); max-height: 60vh; overflow: auto;
}
.suggest__list [role="option"] { display: flex; flex-direction: column; padding: .5rem .6rem; border-radius: var(--r); cursor: pointer; }
.suggest__list [role="option"]:hover, .suggest__list [aria-selected="true"] { background: var(--line-2); }
.suggest__name { font-weight: 600; }
.suggest__meta { font-size: .82rem; color: var(--ink-2); }
.suggest__all { font-weight: 600; color: var(--accent); }
.search__form { display: flex; gap: .75rem; align-items: stretch; max-width: 760px; margin-bottom: 1.25rem; }
.search__input { font-size: 1.1rem; padding: .75em .9em; }
.search__form .btn .icon { width: 18px; height: 18px; }
.search__types { margin-bottom: .5rem; }
.search__days { margin-bottom: 1.5rem; }
.search__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: clamp(24px, 4vw, 56px); align-items: start; }
.search__cols--single { grid-template-columns: minmax(0, 1fr); }
.search__venues { position: sticky; top: calc(var(--head-h) + 12px); }
.vlist { list-style: none; margin: 0; padding: 0; }
.vlist__item { display: flex; flex-direction: column; padding: .7rem 0; border-bottom: 1px solid var(--line-2); }
.vlist__name { font-weight: 600; }
.vlist__meta { font-size: .88rem; color: var(--ink-2); }
.vlist__open { font-size: .82rem; font-weight: 600; margin-top: .1rem; }
.vlist__open--yes { color: var(--event); }
.vlist__open--no { color: var(--ink-2); }

/* ---- On tonight: phone-first timeline --------------------------------------- */

.tonight__head { margin-bottom: 1rem; max-width: none; }
/* Two-line heading: "Today" in the section's neon, then the place in the billboard's lettering. */
.daytitle__day { display: block; }
.daytitle__place {
  display: block; margin-top: .15em; font-size: .52em; line-height: 1.2;
  color: var(--sign-letter-page, var(--ink)); text-shadow: var(--sign-glow);
}
/* Day, place and kind on one toolbar row on desktop; it wraps on phones (the kinds scroll sideways). */
.tonight__bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-bottom: 1.75rem; }
.tonight__bar > * { margin: 0; max-width: 100%; }
.tonight__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); align-items: start; }
.tonight__cols--single { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.tonight__colh { font: 700 1.6rem/1.1 var(--font-display); padding-bottom: .5rem; border-bottom: 2px solid var(--ink); }
.tonight__sub { margin-top: 1.25rem; }
.tonight__h { font: 700 1.1rem/1.1 var(--font-display); display: inline-flex; align-items: baseline; gap: .5rem; }
.tonight__sub > .tonight__h { display: flex; color: var(--ink-2); padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.tonight__none { color: var(--ink-2); margin: 1.1rem 0 0; }
/* Rows reuse the calendar's expandable .item; a coloured edge tells the kinds apart in mixed columns. */
.tonight .item { border-left: 3px solid var(--c); padding-left: .75rem; }
.tonight .item summary { grid-template-columns: 7.2rem minmax(0, 1fr); padding: .75rem 0; }
.tonight .item__more { margin-left: 7.8rem; }
.item__time strong { display: block; font: 700 .98rem/1.2 var(--font-display); color: var(--ink); }
.item__time > span:not(.badge) { display: block; font-size: .8rem; color: var(--ink-2); }
.tonight .item__title { font-size: 1.05rem; }
.item__warn { color: var(--deal); font-weight: 600; font-size: .88rem; }
.item--deal { --c: var(--deal-fill); --t: var(--deal); }
.item--happyhour { --c: var(--happy-fill); --t: var(--happy); }
.item--games { --c: var(--games-fill); --t: var(--games); }
.item--music { --c: var(--music-fill); --t: var(--music); }
.item--event { --c: var(--event-fill); --t: var(--event); }

/* ---- Admin -------------------------------------------------------------- */

.admin .site-head--admin { background: var(--sea-2); }
.admin .page { padding-bottom: 4rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 0 0 2rem; }
.stats__item { background: var(--paper); padding: .9rem 1rem; border-top: 4px solid var(--c, var(--ink-2)); }
.stats__item--deal { --c: var(--deal-fill); }
.stats__item--event { --c: var(--event-fill); }
.stats__item--music { --c: var(--music-fill); }
.stats__item--happyhour { --c: var(--happy-fill); }
.stats__item--games { --c: var(--games-fill); }
.stats dt { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.stats dd { margin: 0; font: 700 1.5rem/1.1 var(--font-display); }
.queue { display: grid; gap: 1rem; }
.queue__item { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--c); padding: 1rem 1.2rem; }
.queue__item--deal { --c: var(--deal-fill); }
.queue__item--event { --c: var(--event-fill); }
.queue__item--music { --c: var(--music-fill); }
.queue__item--happyhour { --c: var(--happy-fill); }
.queue__item--games { --c: var(--games-fill); }
.queue__item h2 { font: 700 1.15rem/1.3 var(--font-body); margin-bottom: .3rem; }
.queue__meta, .queue__from { color: var(--ink-2); font-size: .92rem; }
.queue__item--done { opacity: .6; }
.queue__warn { font-size: .9rem; color: var(--deal); }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin: 0; }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table th { font-size: .82rem; color: var(--ink-2); font-weight: 600; background: var(--fog); }
.table td:first-child { min-width: 240px; }
.danger-zone { margin-top: 2rem; }
.login { max-width: 380px; margin: 12vh auto; padding-inline: 16px; }
.login h1 { font: 400 2.2rem/1.2 var(--font-sign); margin-bottom: 1rem; text-shadow: var(--title-glow); }

/* ---- Responsive ---------------------------------------------------------- */

/* Narrower desktops (down to 1024): keep the brand and the whole nav on one row. */
@media (max-width: 1180px) and (min-width: 1001px) {
  .site-head__inner { gap: .5rem 1rem; padding-inline: 20px; }
  .brand__name { font-size: 1.15rem; }
  .brand__tag { display: none; }
  .nav { gap: .25rem .7rem; }
  .nav a, .linkish { font-size: .92rem; }
  .nav .nav__submit { padding: 4px 11px; }
}

@media (max-width: 1000px) {
  .agenda-cols, .tonight__cols, .venue-top, .search__cols, .town-top { grid-template-columns: minmax(0, 1fr); }
  .event-top { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "head" "side" "body"; }
  .event__side { margin-bottom: 1.5rem; }
  .event__menu .menuphoto { display: none; }
  .search__venues { position: static; }
  .board--side { position: static; max-height: none; }
}

@media (max-width: 760px) {
  .hero__copy p { display: none; }  /* phones: the headline and Where are enough; the week comes sooner */
  .todaytiles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .35rem; }
  .todaytile { padding: .45rem .4rem .5rem; align-items: center; text-align: center; }
  .todaytile strong { font-size: 1.35rem; }
  .todaytile span { font-size: .7rem; }
  .cal__bar { flex-direction: column; align-items: stretch; }
  .cal__nav { justify-content: space-between; }
  .cal__month { min-width: 0; flex: 1; }
  .cal__nav { flex-wrap: wrap; row-gap: .6rem; }
  .cell, .cal__grid--week .cell { min-height: 58px; padding: 5px 4px 6px; align-items: center; }
  .cell__num small { display: none; }
  .cell__num { font-size: 1.1rem; }
  .cell--today .cell__num { margin: -2px 0 0; }
  .cell__ticks { display: flex; gap: 2px; width: 100%; margin-top: auto; padding-inline: 2px; }
  .site-head--admin .theme__menu { right: auto; left: 0; }
  /* Header: brand and the search/theme/menu buttons on one row. The nav drops down from the menu button;
     without JavaScript (no data-mode on <html>) it's a sideways-scrolling row under the brand instead. */
  .site-head:not(.site-head--admin) .site-head__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding-block: 12px; }
  .site-head:not(.site-head--admin) .brand__tag { display: none; }
  .site-head:not(.site-head--admin) .brand__name { font-size: clamp(.85rem, 4.4vw, 1.1rem); white-space: nowrap; }
  .site-head__tools { grid-row: 1; grid-column: 2; }
  .site-head__tools .theme__btn { width: 40px; height: 40px; }
  .site-head:not(.site-head--admin) .nav {
    grid-row: 2; grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; gap: 1.1rem;
  }
  .site-head:not(.site-head--admin) .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; flex: none; }
  html[data-mode] .menu-btn { display: grid; }
  html[data-mode] .site-head:not(.site-head--admin) .nav { display: none; }
  html[data-mode] .site-head.is-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0; overflow: visible;
    position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin: 0;
    background: var(--sea); padding: .25rem var(--gutter) 1.25rem;
    border-top: 1px solid color-mix(in srgb, var(--on-sea) 14%, transparent);
    box-shadow: 0 24px 40px -20px rgb(0 0 0 / .55);
    animation: menu-drop .16s ease-out;
  }
  html[data-mode] .site-head.is-open .nav a {
    padding: 13px 0 13px 14px; font-size: 1.1rem; border-bottom: 1px solid color-mix(in srgb, var(--on-sea) 10%, transparent); border-left: 3px solid transparent;
  }
  html[data-mode] .site-head.is-open .nav a[aria-current="page"] { border-bottom-color: color-mix(in srgb, var(--on-sea) 10%, transparent); border-left-color: var(--accent); }
  html[data-mode] .site-head.is-open .nav .nav__submit { margin-top: 1rem; text-align: center; padding: 12px; border: 1px solid var(--on-sea-2); }
  .cal__month { white-space: nowrap; font-size: 1.3rem; }
  /* Phones: all five chips on one row. The dot goes; each chip's outline still carries its colour. */
  .cal__types .chip > span, .kindchips .chip > span { padding: .4em .42em .4em .4em; font-size: .78rem; gap: .28em; }
  .cal__types .chip > span::before, .kindchips .chip > span::before { width: .55em; height: .55em; border-width: 1.5px; }
  .chip .chip__long { display: none; }
  .chip .chip__short { display: inline; }
  .cal__types .chip input:checked + span, a.chip[aria-current="page"] > span { background: color-mix(in srgb, var(--c) 14%, var(--paper)); }
  .cal__types, .kindchips { gap: .2rem; }
  .daytabs a { padding: .55rem .8rem; font-size: .92rem; }
  .thisweek__item { grid-template-columns: minmax(0, 1fr); }
  .thisweek__when { grid-row: auto; }
  .tabs__long { display: none; }
  .tabs__short { display: inline; }
  .item__more { margin-left: 0; }
  .item summary { grid-template-columns: 3.9rem minmax(0, 1fr); }
  .row__title { flex-wrap: wrap; }
  .row__leader { display: none; }
  .row__price { max-width: none; flex-basis: 100%; text-align: left; font-size: 1.2rem; }
  .agenda__day { grid-template-columns: 3.2rem minmax(0, 1fr); gap: .75rem; }
  .tonight .item summary { grid-template-columns: 6rem minmax(0, 1fr); }
  .tonight .item__more { margin-left: 0; }
  .field--inline { flex-direction: column; align-items: stretch; gap: .25rem; }
  .filters { gap: .75rem; }
  .filters .field--inline { flex: 1 1 140px; }
  .field--inline select, .field--inline input { width: 100%; }
}
