/* Feed Cape — blue and white, high-contrast, phone first */
:root {
  --navy: #1E4D7A; --navy-d: #123553; --navy-l: #2B5D8C;
  --ink: #14202B; --ink-2: #2E3A45; --muted: #4A5560; --line: #E1E7ED; --line-2: #C9D3DC;
  --bg: #F4F6F9; --card: #fff; --tint: #E8F0F8;
  --orange: #A2410F; --orange-d: #8A3A0C; --orange-t: #FDF1E7;
  --green: #1E6B4F; --green-t: #EAF4EE; --yellow: #F2C14E;
  --r: 14px; --r-s: 10px;
  --font: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.45; color: var(--ink); background: var(--bg); }
a { color: var(--navy); }
a:hover { color: var(--navy-d); }
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.pre { white-space: pre-line; }
.nowrap { white-space: nowrap; }
.warn { color: var(--orange-d); }
.ok { color: var(--green); }
.ic { flex-shrink: 0; vertical-align: middle; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow, .narrow { max-width: 720px; }
.page-pad { padding-top: 20px; padding-bottom: 32px; }
.h1 { font-size: 30px; margin: 4px 0 14px; }
.lead { font-size: 19px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px;
  font-size: 16px; font-weight: 700; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; background: none; line-height: 1.1; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-d); color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: #fff; }
.btn-outline:hover { background: var(--tint); color: var(--ink); }
.btn-ghost { color: var(--navy); background: transparent; border-color: var(--line-2); }
.btn-danger { background: #fff; color: #9B2C0B; border-color: #E9B9A3; }
.btn-danger:hover { background: #FCEDE6; }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 18px; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: 14px; }
.iconbtn { width: 44px; height: 44px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2);
  background: #fff; color: var(--ink); cursor: pointer; flex-shrink: 0; }
.iconbtn.on-dark { background: rgba(255,255,255,.14); border-color: transparent; color: #fff; }
.linkbtn { background: none; border: 0; padding: 6px 4px; color: var(--navy); cursor: pointer; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.linkbtn.danger, .danger { color: #9B2C0B; }

/* ---------- public header ---------- */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 20px; margin-right: auto; }
.brand:hover { color: #fff; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.topnav { display: none; gap: 4px; }
.topnav a { color: #DCE7F2; text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 16px; }
.topnav a[aria-current] { background: rgba(255,255,255,.16); color: #fff; }
.topnav a:hover { color: #fff; }
/* hamburger menu (phones and tablets); a <details> so it works without JavaScript */
.navmenu summary { list-style: none; cursor: pointer; }
.navmenu summary::-webkit-details-marker { display: none; }
.navmenu .ic-close, .navmenu[open] .ic-open { display: none; }
.navmenu[open] .ic-close { display: inline-flex; }
.navmenu[open] summary { background: rgba(255,255,255,.28); }
.navmenu-pop { position: absolute; left: 0; right: 0; top: 100%; background: #fff; color: var(--ink); border-bottom: 1px solid var(--line-2);
  box-shadow: 0 14px 30px rgba(20,32,43,.18); padding: 8px 12px 14px; max-height: calc(100vh - 60px); overflow-y: auto; }
.navmenu-pop a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 12px; border-radius: 12px; color: var(--ink);
  text-decoration: none; font-weight: 700; font-size: 18px; }
.navmenu-pop a .ic { color: var(--navy); }
.navmenu-pop a:hover { background: var(--tint); color: var(--ink); }
.navmenu-pop a[aria-current] { background: var(--tint); color: var(--navy); }
.navmenu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 8px 12px; }
.banner { padding: 10px 0; font-size: 16px; font-weight: 700; }
.banner-info { background: var(--tint); color: var(--navy-d); }
.banner-warn { background: var(--orange-t); color: var(--orange-d); }
.flash { background: var(--tint); color: var(--navy-d); padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--line); }
.flash.inline { border-radius: var(--r-s); margin: 12px 0; border: 1px solid #C7D8EA; }
.flash-error { background: #FCEDE6; color: #8A2A0A; border-color: #F0C3AE; }
.flash-warn { background: var(--orange-t); color: var(--orange-d); border: 1px solid #F1CDB3; }
.public .flash:not(.inline) { text-align: center; }

/* ---------- hero ---------- */
.hero { background: var(--navy); color: #fff; padding: 18px 0 26px; }
.hero h1 { font-size: 32px; }
.hero p { margin: 6px 0 0; color: #DCE7F2; font-size: 17px; }
.hero-search { margin-top: 16px; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 0 16px; height: 54px; color: var(--muted); max-width: 640px; }
.hero-search input, .hero-search input:not([type]) { border: 0; min-height: 0; padding: 0; outline: 0; flex: 1; min-width: 0; font-size: 17px; color: var(--ink); background: transparent; }
.hero-img { display: block; width: 100%; max-height: 320px; object-fit: cover; background: #D5DEE7; }
.hero-venue { padding-top: 22px; }
.venue-head { display: flex; gap: 14px; align-items: center; }
.venue-head p a.on-dark, a.on-dark { color: #fff; }
.logo { width: 64px; height: 64px; border-radius: 14px; background: #fff; object-fit: contain; flex-shrink: 0; }
.logo-ph { display: inline-flex; align-items: center; justify-content: center; color: var(--navy); }

/* ---------- category tiles & week strip ---------- */
/* one row, always: swipe sideways on phones, stretch to fill on wide screens */
.tiles { display: flex; gap: 8px; margin: 16px -16px 14px; padding: 2px 16px 4px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tiles::-webkit-scrollbar { display: none; }
.tile { --c: var(--navy); --t: var(--tint); flex: 0 0 auto; scroll-snap-align: start; min-height: 46px; border-radius: 12px; background: var(--t); color: var(--ink);
  text-decoration: none; padding: 0 14px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px;
  white-space: nowrap; border: 2px solid transparent; }
.tile .ic { color: var(--c); }
.tile:hover { color: var(--ink); border-color: var(--c); }
.tile.on { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-bottom: 10px; }
.day { min-height: 70px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 0; }
.day .dw { font-size: 11px; font-weight: 700; color: var(--muted); }
.day .dn { font-size: 21px; font-weight: 700; }
.day .dc { font-size: 11px; color: var(--muted); }
.day.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.day.on .dw, .day.on .dc { color: #DCE7F2; }
.toolbar { display: flex; justify-content: flex-end; min-height: 4px; }

/* ---------- sections, cards, rows ---------- */
.sec { font-size: 15px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 22px 2px 10px; }
.sec-live { color: var(--navy); display: flex; align-items: center; gap: 8px; }
.sec-live .dot { width: 10px; height: 10px; border-radius: 5px; background: var(--navy); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sec-live .dot { animation: none; } }
.sec-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sec-ahead { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line-2); color: var(--ink); }
.sec-ahead .sec-date { color: var(--muted); font-weight: 400; letter-spacing: 0; text-transform: none; }
.subsec { font-size: 17px; margin: 16px 2px 8px; }
.more-link { margin: 16px 2px 0; font-weight: 700; }
.more-link a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.cards { display: grid; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.ev { padding: 16px; display: flex; flex-direction: column; gap: 9px; }
.ev-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 4px; }
.pill { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; }
.st { font-size: 15px; font-weight: 700; color: var(--navy); }
.st-open { color: #fff; background: var(--navy); padding: 3px 10px; border-radius: 6px; font-size: 14px; }
.st-soon { color: var(--orange-d); }
.st-cancelled { color: #fff; background: #9B2C0B; padding: 3px 10px; border-radius: 6px; font-size: 14px; }
.st-ended { color: var(--muted); }
.ev-title { font-size: 22px; }
.ev-title a { color: var(--ink); text-decoration: none; }
.ev-title a:hover { text-decoration: underline; }
.ev-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 16px; }
.ev-line a { color: var(--ink-2); }
.dist:not(:empty) { margin-left: auto; font-size: 14px; color: var(--muted); white-space: nowrap; padding-left: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 14px; padding: 4px 10px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; }
.chip-good { background: var(--tint); color: var(--navy-d); }
.chip-bring { background: var(--orange-t); color: var(--orange-d); }
.ev-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.ev-actions.big { margin: 14px 0; grid-template-columns: 1fr 1fr; }
.ev-actions.big .share { grid-column: 1 / -1; }
.ev-actions > .btn, .ev-actions > .menu > summary { width: 100%; }
.is-cancelled .ev-title a, .row.is-cancelled strong { text-decoration: line-through; color: var(--muted); }
.cancel-note { margin: 0; color: #8A2A0A; font-weight: 700; }
.note { margin: 0; color: var(--orange-d); font-weight: 700; }
.big { font-size: 18px; }
.stale { margin: 0; font-size: 14px; color: var(--orange-d); display: flex; gap: 6px; align-items: center; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; z-index: 10; right: 0; left: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(20,32,43,.14); overflow: hidden; min-width: 220px; }
.menu-pop a { display: block; padding: 14px 16px; text-decoration: none; color: var(--ink); font-weight: 700; border-top: 1px solid var(--line); }
.menu-pop a:first-child { border-top: 0; }
.menu-pop a:hover { background: var(--tint); }
.rows { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 14px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); min-height: 64px; }
.row:first-child { border-top: 0; }
.row:hover { background: #F8FAFC; color: var(--ink); }
.row-bar { width: 6px; align-self: stretch; border-radius: 3px; flex-shrink: 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main strong { font-size: 18px; }
.row-main .muted { font-size: 15px; }
.pinnum { width: 32px; height: 32px; border-radius: 16px; background: var(--tint); color: var(--navy); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.datebox { width: 56px; border-radius: 10px; background: var(--tint); padding: 6px 0; display: flex; flex-direction: column; align-items: center; font-size: 20px; font-weight: 700; flex-shrink: 0; }
.datebox b { font-size: 12px; color: var(--navy); }
.empty { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; margin: 10px 0; background: #fff; }
.empty span { color: var(--muted); }
.ended { margin: 20px 0; }
.ended summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 8px 2px; }

/* ---------- calendar ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: none; }
.fchip { white-space: nowrap; min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: center; font-size: 15px; }
.fchip.on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.cal-layout { display: grid; gap: 18px; }
.cal { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head h2 { font-size: 22px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-cell { min-height: 52px; border-radius: 10px; background: var(--tint); color: var(--ink); text-decoration: none; padding: 5px 6px;
  display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; }
.cal-cell b { font-size: 16px; }
.cal-cell span { color: var(--navy); font-weight: 700; }
.cal-cell i { font-style: normal; display: none; }
.cal-cell.blank { background: transparent; }
.cal-cell.past { background: #F7F9FB; color: #8A96A1; }
.cal-cell.past span { color: #8A96A1; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--navy); }
.cal-cell.on { background: var(--navy); color: #fff; }
.cal-cell.on span { color: #fff; }
.cal-day-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 12px; flex-wrap: wrap; }
.cal-day-head h2 { font-size: 22px; }

/* ---------- map ---------- */
.map-page .week { margin-top: 14px; }
.map { width: 100%; height: 46vh; min-height: 280px; background: #E9EEF2; position: relative; }
.map-small { height: 240px; min-height: 200px; border-radius: 12px; overflow: hidden; margin-top: 12px; }
.map-fallback { padding: 20px; margin: 0; color: var(--muted); }
.sheet { background: #fff; border-radius: 20px 20px 0 0; margin-top: -16px; position: relative; padding-top: 16px; padding-bottom: 24px; }
.sheet .rows { border: 0; border-radius: 0; }
.pinmark { width: 34px; height: 34px; border-radius: 17px 17px 17px 4px; background: var(--ink); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: pointer; font-family: var(--font); }
.maplibregl-popup-content { font-family: var(--font); font-size: 15px; border-radius: 10px; padding: 10px 12px; }
.maplibregl-popup-content a { font-weight: 700; }

/* ---------- detail & venue ---------- */
.facts { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.fact { display: flex; gap: 12px; align-items: flex-start; }
.fact .ic { color: var(--navy); margin-top: 2px; }
.fact > div { display: flex; flex-direction: column; }
.fact strong { font-size: 18px; }
.block { margin: 20px 0; }
.block h2, .block-card h2 { font-size: 19px; margin-bottom: 10px; }
.block-card { padding: 16px; margin: 14px 0; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: center; }
.checks li.bring { color: var(--orange-d); }
.datechips { display: flex; flex-wrap: wrap; gap: 8px; }
.datechip { padding: 9px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; }
.datechip.off { background: var(--orange-t); color: var(--orange-d); border-color: #F1CDB3; text-decoration: line-through; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; margin-bottom: 12px; }
.quick a, .quick button { min-height: 70px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.quick .ic { color: var(--navy); }
.plainlist { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.plainlist li { display: flex; gap: 8px; align-items: flex-start; }
.prose h2 { font-size: 22px; margin: 26px 0 10px; }
.steps { padding-left: 24px; display: flex; flex-direction: column; gap: 10px; font-size: 18px; }
.callout { padding: 18px; margin: 24px 0; background: var(--tint); border-color: #C7D8EA; }
.callout h2 { margin: 0 0 6px; }
.partners { padding-left: 20px; }
.amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin: 12px 0; }
.amt { min-height: 50px; border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff; font-size: 18px; font-weight: 700; cursor: pointer; }
.amt.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- forms (public + admin) ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--line); margin-bottom: 16px; }
.seg a, .seg label span { min-height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--muted); font-size: 16px; text-align: center; padding: 0 6px; cursor: pointer; }
.seg a.on, .seg input:checked + span { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(20,32,43,.12); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { position: relative; }
.form, .form fieldset { display: flex; flex-direction: column; gap: 14px; }
.form label, .field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; }
.field .lbl, legend { font-weight: 700; font-size: 15px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=search], input[type=date], input[type=time], input[type=number], input[type=password], input:not([type]), select, textarea {
  min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line-2); padding: 0 12px; font-size: 17px; background: #fff; color: var(--ink); width: 100%; font-weight: 400; }
textarea { padding: 10px 12px; resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: 2px solid rgba(30,77,122,.25); outline-offset: 0; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-item { position: relative; flex-direction: row !important; }
.choice-item input { position: absolute; opacity: 0; }
.choice-item span { min-height: 42px; padding: 0 14px; border-radius: 21px; border: 1.5px solid var(--line-2); background: #fff; display: inline-flex; align-items: center;
  font-size: 15px; font-weight: 400; cursor: pointer; }
.choice-item input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.choice-item.bring input:checked + span { background: var(--orange-d); border-color: var(--orange-d); }
.choice-item input:focus-visible + span { outline: 3px solid var(--yellow); }
.searchbox { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 4px 4px 4px 14px; margin-bottom: 8px; }
.searchbox input, .searchbox input:not([type]) { border: 0; min-height: 46px; padding: 0; }
.searchbox input:focus { outline: 0; }

/* ---------- footer & tab bar ---------- */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 22px 0 calc(env(safe-area-inset-bottom) + 24px); margin-top: 24px; }
.footer-in { display: flex; flex-direction: column; gap: 14px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer nav a { font-weight: 700; min-height: 32px; display: inline-flex; align-items: center; }
.footer-credit { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-cell { min-height: 72px; font-size: 13px; }
  .cal-cell i { display: inline; }
}
@media (min-width: 960px) {
  .topnav { display: flex; }
  .navmenu { display: none; }
  .footer { padding-bottom: 28px; }
  .footer-in { flex-direction: row; justify-content: space-between; align-items: center; }
  .tiles { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .tile { flex: 1 0 auto; }
  .cal-layout { grid-template-columns: minmax(380px, 1fr) minmax(0, 1.2fr); align-items: start; }
  .cal-layout .cards { grid-template-columns: 1fr; }
  .map { height: 56vh; }
}

/* ================= admin ================= */
body.admin { background: var(--bg); font-size: 16px; }
.admin-shell { display: flex; min-height: 100vh; }
.side { width: 248px; flex-shrink: 0; background: var(--ink); color: #fff; padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { font-size: 20px; font-weight: 700; padding: 4px 10px 16px; }
.side-brand span { font-size: 13px; font-weight: 400; color: #AFC0D0; }
.side-brand.dark { color: var(--ink); padding: 0 0 12px; }
.side-brand.dark span { color: var(--muted); }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #D5DEE7; text-decoration: none; font-size: 15px; width: 100%; text-align: left; }
.side-link:hover { background: #22303D; color: #fff; }
.side-link.on { background: var(--navy); color: #fff; font-weight: 700; }
.side-link .badge { margin-left: auto; background: var(--yellow); color: var(--ink); border-radius: 10px; padding: 0 8px; font-size: 13px; }
.side-link.linkbtn { font-weight: 400; color: #D5DEE7; }
.side-foot { margin-top: auto; border-top: 1px solid #2E3D4B; padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.side-role { font-size: 12px; color: #AFC0D0; padding: 6px 12px; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top { display: none; }
.admin-content { padding: 24px 28px 48px; max-width: 1320px; width: 100%; }
.ahead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.ahead h1 { font-size: 28px; }
.ahead p { margin: 4px 0 0; }
.ahead-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 14px; }
.panel h2 { font-size: 18px; }
.panel.accent { border: 2px solid var(--navy); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; }
.two { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.two > .panel { flex: 1 1 320px; min-width: 0; }
.two > .grow2 { flex: 2 1 460px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.tile-stat span { font-size: 14px; color: var(--muted); }
.tile-stat b { font-size: 30px; }
.tile-stat b.warn { color: var(--orange-d); }
.tile-stat small { font-size: 13px; color: var(--muted); }
.chart { width: 100%; height: auto; }
.attn { display: flex; flex-direction: column; gap: 8px; }
.attn a { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--tint); color: var(--ink); text-decoration: none; }
.attn a.hot { background: var(--orange-t); }
.attn a b { color: var(--navy); min-width: 22px; }
.attn a.hot b { color: var(--orange-d); }
.tablewrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 8px; border-bottom: 1px solid #EEF1F4; vertical-align: top; }
.tbl .num { text-align: right; }
.tbl tr.inactive { opacity: .6; }
.content-tbl { border: 1px solid var(--line); border-radius: var(--r); }
.admin-content > .tablewrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 10px; }
.strong { font-weight: 700; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.actions form { display: inline; }
.tag { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.tag-draft { background: var(--orange-t); color: var(--orange-d); }
.tag-admin { background: var(--ink); color: #fff; }
.tag-res { background: var(--green-t); color: var(--green); }
.tag-q { background: var(--tint); color: var(--navy); }
.dotc { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 6px; }
.filterbar { display: flex; gap: 8px; margin-bottom: 10px; max-width: 560px; }
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.subtabs a { padding: 10px 12px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subtabs a.on { color: var(--navy); border-color: var(--navy); }
.msgs { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.msg { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.msg:first-child { border-top: 0; }
.msg:hover { background: #F8FAFC; }
.msg-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
.dl dt { font-weight: 700; color: var(--muted); }
.dl dd { margin: 0; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btnrow form { display: inline; }
.narrow-form { max-width: 760px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.inline { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 400 !important; font-size: 16px !important; min-height: 36px; }
.inline input[type=checkbox], .inline input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--navy); }
.tiny { width: 76px !important; }
.short { max-width: 170px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.thumb { max-width: 220px; max-height: 140px; border-radius: 10px; object-fit: cover; }
.thumb.small { max-width: 90px; }
.danger-zone { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.rowform { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; }
.rowform input[type=text], .rowform input:not([type]) { flex: 1 1 180px; width: auto; }
.rowform select { width: auto; }
.rowform input[type=color] { width: 48px; height: 44px; padding: 2px; border-radius: 8px; border: 1.5px solid var(--line-2); }
.settings .panel { scroll-margin-top: 16px; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 12px; }
code.key { font-size: 18px; background: var(--tint); padding: 4px 8px; border-radius: 6px; letter-spacing: .04em; }
.copyrow { display: flex; gap: 8px; margin: 8px 0; }
.invite-link { font-weight: 400; }
.bare { display: flex; align-items: flex-start; justify-content: center; min-height: 100vh; padding: 48px 16px; }
.bare-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 14px; }
.bare-card h1 { font-size: 24px; }

/* editor */
.editor { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.editor-main { flex: 2 1 520px; min-width: 0; }
.editor-side { flex: 1 1 290px; min-width: 0; position: sticky; top: 16px; }
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quick-row input[type=date], .quick-row input[type=time] { width: auto; }
.qbtn { min-height: 42px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; font-size: 15px; }
.qbtn.on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.seg-admin { grid-template-columns: repeat(5, 1fr); grid-auto-flow: row; margin: 4px 0 6px; }
.rep { display: none; padding: 4px 0; }
.editor[data-freq=daily] .rep-daily, .editor[data-freq=weekly] .rep-weekly, .editor[data-freq=monthly] .rep-monthly, .editor[data-freq=interval] .rep-interval { display: flex; flex-direction: column; gap: 6px; }
.editor[data-freq=interval] .rep-interval { flex-direction: row; }
.editor:not([data-freq=once]) .rep-ends { display: flex; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.daybtn { position: relative; }
.daybtn input { position: absolute; opacity: 0; }
.daybtn span { width: 46px; height: 46px; border-radius: 23px; border: 1.5px solid var(--line-2); background: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; cursor: pointer; }
.daybtn input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.daybtn input:focus-visible + span { outline: 3px solid var(--yellow); }
.preview { border: 2px solid var(--navy); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.summary { font-size: 19px; font-weight: 700; margin: 0; }
.datelist { list-style: none; padding: 0; margin: 0; }
.datelist li { border-top: 1px solid #EEF1F4; padding: 10px 0; }
.datelist .dl-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.datelist .dl-date { font-weight: 700; }
.datelist li.off .dl-date { text-decoration: line-through; color: #8A96A1; }
.datelist li.chg .dl-date::after { content: ' · changed'; font-weight: 400; color: var(--orange-d); font-size: 14px; }
.datelist .dl-edit { display: none; gap: 8px; flex-direction: column; margin-top: 8px; }
.datelist li.open .dl-edit { display: flex; }
.datelist .dl-edit .quick-row input { width: auto; }
.combo { position: relative; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 0; list-style: none; background: #fff; border: 1.5px solid var(--navy);
  border-radius: 12px; box-shadow: 0 10px 24px rgba(20,32,43,.14); max-height: 340px; overflow-y: auto; font-weight: 400; }
.combo-list .grp { padding: 6px 12px; font-size: 12px; font-weight: 700; letter-spacing: .05em; color: var(--muted); background: var(--bg); text-transform: uppercase; }
.combo-list .opt-item { padding: 10px 12px; cursor: pointer; border-top: 1px solid #EEF1F4; display: flex; flex-direction: column; }
.combo-list .opt-item small { color: var(--muted); }
.combo-list .opt-item[aria-selected=true], .combo-list .opt-item:hover { background: var(--tint); }
.newvenue { background: var(--bg); border-radius: 12px; padding: 12px; margin-top: 8px; }

@media (max-width: 900px) {
  .admin-shell { display: block; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .side.open { transform: none; }
  .admin-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
  .admin-content { padding: 18px 14px 40px; }
  .editor-side { position: static; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .seg-admin { grid-template-columns: repeat(3, 1fr); }
}
@media print {
  .topbar, .footer, .tiles, .week, .ev-actions, .hero-search, .toolbar { display: none !important; }
  body { background: #fff; }
  .hero { background: #fff; color: #000; }
  .card { break-inside: avoid; }
}
