:root {
  --ink: #14213D;
  --muted: #5A6275;
  --red: #D62839;
  --blue: #1F4FBF;
  --yellow: #FFC93C;
  --line: #E3E6EE;
  --field: #C9CEDB;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #fff;
}
.page { border-top: 8px solid var(--red); min-height: 100vh; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.muted { color: var(--muted); }
.red { color: var(--red); }
a { color: var(--blue); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 20px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.city-pill { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px; font-size: 15px; font-weight: 600; }
.city-pill .muted { font-weight: 400; }

/* Hero */
.hero { padding-top: 32px; padding-bottom: 8px; }
.hero h1 { margin: 0; font-size: clamp(38px, 6vw, 68px); line-height: 1.02; font-weight: 800; letter-spacing: -0.03em; }
.hl { white-space: nowrap; background: linear-gradient(transparent 62%, var(--yellow) 62%); padding: 0 4px; }
.hero p { margin: 16px 0 0; font-size: 19px; line-height: 1.5; color: var(--muted); max-width: 620px; }

/* Search panel */
.search { margin-top: 28px; border: 2px solid var(--ink); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 22px; box-shadow: 8px 8px 0 var(--yellow); background: #fff; }
.search-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.grow2 { flex: 2 1 280px; }
.grow1 { flex: 1 1 220px; }
.field input { height: 52px; width: 100%; border: 2px solid var(--field); border-radius: 12px; padding: 0 16px; font-size: 17px; font-weight: 400; background: #fff; }
.field input:focus { border-color: var(--blue); outline: none; }
.near { display: flex; gap: 8px; }
.near input { flex: 1 1 auto; min-width: 0; }
.icon-btn { flex: 0 0 52px; height: 52px; border: 2px solid var(--blue); border-radius: 12px; background: #fff; color: var(--blue); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: #EEF2FC; }
.primary { flex: 0 1 auto; height: 52px; padding: 0 28px; border: none; border-radius: 12px; background: var(--red); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; }
.primary:hover { background: #B81F2F; }
.near-note { margin: -10px 0 0; font-size: 15px; color: var(--muted); min-height: 0; }
.near-note:empty { display: none; }

.filters { display: flex; flex-wrap: wrap; gap: 20px 40px; }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-label { font-size: 14px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--field); background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; }
.chip:hover { border-color: var(--ink); }
.chip.when[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.chip.dist[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.day-nav { display: inline-flex; align-items: center; gap: 6px; }
.arrow-btn { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; border: 2px solid var(--field); background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.arrow-btn:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.arrow-btn:disabled { opacity: 0.35; cursor: default; }
.date-chip { gap: 8px; padding: 0 6px 0 14px; font-weight: 500; cursor: default; }
.date-chip.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.date-chip input { border: none; background: transparent; font-size: 15px; }

/* Results */
.results { padding-top: 40px; padding-bottom: 24px; }
.results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 3px solid var(--red); }
.results-head h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.results-head p { margin: 4px 0 0; font-size: 16px; }

.group { padding-top: 28px; }
.group h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.morning { background: var(--yellow); }
.dot.afternoon { background: var(--red); }
.dot.evening { background: var(--blue); }

.event { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.time { flex: 0 0 84px; height: 72px; border-radius: 14px; background: var(--yellow); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.time b { font-size: 24px; font-weight: 800; }
.time small { font-size: 13px; font-weight: 700; margin-top: 4px; }
.info { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.info h4 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.info .venue { margin: 0; font-size: 16px; font-weight: 500; }
.info .addr { margin: 0; font-size: 15px; color: var(--muted); }
.actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-left: auto; }
.dist-tag { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.price { padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 700; background: #F1F3F8; max-width: 260px; }
.price.free { background: var(--blue); color: #fff; }
.details { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border: 2px solid var(--blue); border-radius: 999px; color: var(--blue); font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.details:hover { background: var(--blue); color: #fff; }

.empty { margin-top: 32px; padding: 40px 24px; border: 2px dashed var(--field); border-radius: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.empty p { margin: 0; }
.empty .big { font-size: 20px; font-weight: 700; }
.empty .muted { font-size: 16px; max-width: 440px; }

.site-footer { margin-top: 24px; padding-top: 28px; padding-bottom: 40px; border-top: 3px solid var(--red); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; font-size: 14px; line-height: 1.6; color: var(--muted); }
.site-footer p { margin: 0; max-width: 560px; }

/* Submit-my-event button */
.submit-cta { display: flex; justify-content: center; padding-top: 24px; padding-bottom: 32px; }
.cta-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: 0 32px; box-shadow: 5px 5px 0 var(--yellow); }

/* Submit page */
.submit-page { padding-top: 32px; padding-bottom: 48px; }
.submit-page h1 { margin: 0; font-size: clamp(34px, 5vw, 52px); line-height: 1.05; font-weight: 800; letter-spacing: -0.03em; }
.submit-page .intro { margin: 14px 0 0; font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 620px; }
.submit-form { margin-top: 28px; max-width: 620px; border: 2px solid var(--ink); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 18px; box-shadow: 8px 8px 0 var(--yellow); background: #fff; }
.notice { margin: 0; padding: 14px 16px; border-radius: 12px; background: #FFF6DB; border: 2px solid var(--yellow); font-size: 15px; line-height: 1.5; font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: 0; font-size: 15px; font-weight: 600; }
.form-msg.error { color: var(--red); }
.thanks { margin-top: 28px; max-width: 620px; border: 2px solid var(--ink); border-radius: 20px; padding: 32px 24px; box-shadow: 8px 8px 0 var(--yellow); }
.thanks h2 { margin: 0 0 8px; font-size: 26px; }
.thanks p { margin: 0 0 18px; color: var(--muted); font-size: 17px; line-height: 1.5; }
.back { display: inline-block; margin-top: 18px; font-weight: 600; }
.site-footer a { font-weight: 600; }

@media (max-width: 520px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .search { padding: 18px; box-shadow: 6px 6px 0 var(--yellow); }
  .primary { width: 100%; }
}

/* Compact event list on phones */
@media (max-width: 640px) {
  .results { padding-top: 28px; }
  .results-head h2 { font-size: 24px; }
  .results-head p { font-size: 14px; }
  .group { padding-top: 18px; }
  .group h3 { font-size: 12px; margin-bottom: 0; }
  .event { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 6px 12px; align-items: start; padding: 12px 0; }
  .time { width: 56px; height: 50px; border-radius: 10px; grid-row: span 2; }
  .time b { font-size: 17px; }
  .time small { font-size: 11px; margin-top: 2px; }
  .info { gap: 1px; }
  .info h4 { font-size: 16px; line-height: 1.25; }
  .info .venue { font-size: 14px; }
  .info .addr { font-size: 13px; line-height: 1.35; }
  .info .org, .info .zip { display: none; }
  .info .venue, .info .addr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .actions { grid-column: 2; margin-left: 0; gap: 8px; }
  .dist-tag { font-size: 13px; }
  .price { font-size: 12px; padding: 3px 8px; border-radius: 6px; max-width: 100%; }
  .details { height: 32px; padding: 0 12px; font-size: 13px; border-width: 1.5px; gap: 4px; margin-left: auto; }
  .details svg { width: 13px; height: 13px; }
}

/* Advertisers slideshow (below the footer) */
.ads { border-top: 3px solid var(--blue); border-bottom: 3px solid var(--yellow); margin-bottom: 40px; padding-top: 28px; padding-bottom: 36px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.ads h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ads-carousel { width: 100%; max-width: 900px; }
.ads-viewport { width: 100%; overflow: hidden; border-radius: 16px; border: 2px solid var(--ink); background: #F1F3F8; }
.ads-track { display: flex; transition: transform 0.6s ease; }
.ad-slide { flex: 0 0 100%; display: block; position: relative; aspect-ratio: 3 / 1; overflow: hidden; text-decoration: none; background: var(--ad-bg, #14213D); color: var(--ad-fg, #fff); }
.ad-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-label { position: absolute; left: 14px; bottom: 14px; max-width: calc(100% - 28px); display: flex; align-items: baseline; gap: 10px; padding: 7px 16px; border-radius: 999px; background: rgba(20, 33, 61, 0.88); color: #fff; line-height: 1.3; white-space: nowrap; overflow: hidden; }
.ad-label .ad-name { font-size: clamp(13px, 2vw, 20px); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.ad-label .ad-visit { font-size: clamp(11px, 1.5vw, 15px); font-weight: 600; opacity: 0.85; }
.ad-whole { display: flex; align-items: stretch; }
.ad-whole img { height: 100%; width: auto; max-width: 62%; object-fit: contain; display: block; flex: 0 0 auto; }
.ad-panel { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; padding: 0 clamp(12px, 4vw, 40px); text-align: left; }
.ad-panel .ad-name { font-size: clamp(16px, 4vw, 40px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.ad-visit { font-size: clamp(11px, 1.6vw, 17px); font-weight: 700; opacity: 0.92; overflow-wrap: anywhere; }
.ads-controls { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 8px; }
.ads-dot { width: 32px; height: 32px; border: none; background: transparent; cursor: pointer; position: relative; padding: 0; }
.ads-dot::after { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--field); }
.ads-dot[aria-current="true"]::after { background: var(--red); }
.ads-arrow { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--field); background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ads-arrow:hover { border-color: var(--blue); color: var(--blue); }
.ads-arrow:first-of-type { margin-left: 8px; }
.ads-pause { height: 32px; padding: 0 12px; border: 1.5px solid var(--field); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.ads .cta-btn { margin-top: 8px; }

/* Textarea and file fields */
.field textarea { min-height: 110px; width: 100%; border: 2px solid var(--field); border-radius: 12px; padding: 12px 16px; font-size: 17px; font-weight: 400; background: #fff; resize: vertical; }
.field textarea:focus { border-color: var(--blue); outline: none; }
.field input[type="file"] { height: auto; padding: 12px; font-size: 15px; }
.hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.primary:disabled { opacity: 0.85; cursor: default; }
@media (max-width: 420px) { .pick-label { display: none; } .date-chip { padding-left: 10px; } }

/* "Get the app" banner, in the red strip at the top */
.app-bar { background: var(--red); color: #fff; }
.app-bar[hidden] { display: none; }
.app-bar-inner { display: flex; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.app-bar-icon { flex: 0 0 auto; }
.app-bar p { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.app-bar-btn { flex: 0 0 auto; height: 36px; padding: 0 16px; border: none; border-radius: 999px; background: #fff; color: var(--red); font-size: 14px; font-weight: 800; cursor: pointer; }
.app-bar-btn:hover { background: var(--yellow); color: var(--ink); }
.app-bar-close { flex: 0 0 auto; width: 36px; height: 36px; margin-right: -8px; border: none; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.app-bar-close:hover { background: rgba(255, 255, 255, 0.18); }
.app-bar :focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
@media (max-width: 520px) { .app-bar p { font-size: 14px; } .app-bar-icon { display: none; } }

/* Star button on each event */
.star-btn { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.star-btn svg { fill: none; stroke: #B7BDCB; transition: transform .15s ease; }
.star-btn:hover svg { stroke: #E0A800; transform: scale(1.1); }
.star-btn[aria-pressed="true"] svg { fill: var(--yellow); stroke: #D99A00; }

/* Starred events section (below the search box) */
.starred { margin-top: 28px; }
.starred[hidden] { display: none; }
.starred-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 3px solid var(--yellow); }
.starred-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.starred-head h2 svg { fill: var(--yellow); stroke: #D99A00; width: 24px; height: 24px; }
.starred-count { font-size: 15px; color: var(--muted); font-weight: 600; }
.starred-day { margin: 18px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* Small confirmation message */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 640px) {
  .starred-head h2 { font-size: 20px; }
  .star-btn { width: 36px; height: 36px; }
}
