:root {
  --forest: #2f4a3a;
  --forest-2: #3e5f4b;
  --forest-deep: #2a4433;
  --amber: #d98e2b;
  --amber-soft: #f3d9a8;
  --cream: #f6efe2;
  --paper: #fffaf0;
  --ink: #2a2620;
  --ink-2: #5d564b;
  --line: #e2d6c0;
  --rust: #a5432a;
  --rust-soft: #f4dcd3;
  --ok: #3d7a4f;
  --caution: #c27c12;
  --closed: #a5432a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(42, 38, 32, .06), 0 4px 14px rgba(42, 38, 32, .06);
  --slab: "Roboto Slab", Rockwell, "Courier New", Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #1b1e1b;
    --paper: #242824;
    --ink: #efe8da;
    --ink-2: #b4ab9b;
    --line: #363b36;
    --rust-soft: #3a2420;
    --amber-soft: #3a2f1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--forest);
  color: #f6efe2;
}
.brand { display: flex; align-items: center; gap: 4px; line-height: 0; text-decoration: none; }
.brand-wrap { position: relative; }
.brand-caret { fill: none; stroke: #f6efe2; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; opacity: .75; transition: transform .15s; }
.brand[aria-expanded="true"] .brand-caret { transform: rotate(180deg); }
.brand:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; border-radius: 6px; }
.town-menu { position: absolute; top: calc(100% + 10px); left: -6px; z-index: 20; width: min(340px, calc(100vw - 20px));
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 8px; }
.town-menu[hidden] { display: none; }
.town-menu-title { margin: 4px 8px 8px; font: 600 12px var(--sans, inherit); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.town-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.town-opt { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; text-decoration: none; }
.town-opt:hover, .town-opt:focus-visible { background: var(--cream); outline: none; }
.town-opt[aria-current] { background: var(--cream); }
.town-logo { flex: none; background: var(--forest); border-radius: 8px; padding: 6px 8px; line-height: 0; }
.logo-sm { height: 34px; }
.town-all { display: block; margin: 6px 0 0; padding: 10px 8px 4px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.town-all strong { color: var(--forest-2); font-weight: 600; }
@media (prefers-color-scheme: dark) { .town-all strong { color: var(--amber); } }
.town-all:hover strong, .town-all:focus-visible strong { text-decoration: underline; }
.town-txt { display: grid; gap: 2px; line-height: 1.25; min-width: 0; }
.town-txt strong { font-weight: 600; }
.town-txt small { color: var(--ink-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { height: 48px; width: auto; display: block; }
.logo-name { font: 700 70px var(--slab); fill: #f6efe2; }
.logo-dot { fill: #5aa3d6; }
.logo-ink { fill: #1a4360; }
.logo-buzz { font: 700 50px var(--slab); }
.logo-thetown { font: 700 27px var(--slab); }
.logo-rock .logo-dot { fill: #d9784a; }
.logo-rock .logo-ink { fill: #4a1c0a; }
.logo-ridge { fill: #1a4360; }
.logo-rail line { stroke: #f6efe2; stroke-width: 5; stroke-linecap: round; }
.logo-rail line:first-child { stroke-width: 6; }
.logo-wave { fill: none; stroke: #f6efe2; stroke-width: 9; stroke-linecap: round; }
.status { display: flex; align-items: center; gap: 7px; font-size: 13px; opacity: .9; white-space: nowrap; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #7fd18f; box-shadow: 0 0 0 0 rgba(127, 209, 143, .6); animation: pulse 2.4s infinite; }
.status.stale .pulse { background: var(--amber); animation: none; }
.status.offline .pulse { background: #c9c2b4; animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(127, 209, 143, .6); } 70% { box-shadow: 0 0 0 8px rgba(127, 209, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 209, 143, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }


main { max-width: 720px; margin: 0 auto; padding: 12px 16px 8px; }

/* ---------- alert banner ---------- */
.alerts:empty { display: none; }
.alerts { display: grid; gap: 8px; margin-bottom: 12px; }
.alert {
  background: var(--rust); color: #fff6f0;
  border-radius: var(--radius); padding: 12px 14px;
  box-shadow: var(--shadow);
}
.alert.notice { background: var(--amber); color: #2a1d08; }
.alert summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.alert summary::-webkit-details-marker { display: none; }
.alert-icon { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.alert-title { font: 700 16px/1.3 var(--slab); }
.alert-meta { font-size: 12.5px; opacity: .85; margin-top: 2px; }
.alert-body { margin: 10px 0 2px 32px; font-size: 14.5px; white-space: pre-line; }
.alert-body a { font-weight: 600; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  text-align: left; border: 1px solid var(--line); background: var(--paper);
  border-radius: var(--radius); padding: 12px; min-height: 148px;
  box-shadow: var(--shadow); cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .15s, transform .1s;
}
.tile:active { transform: scale(.985); }
.tile[aria-pressed="true"] { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber); }
.tile:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.tile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.tile-title { font: 700 13px var(--slab); text-transform: uppercase; letter-spacing: .8px; color: var(--forest-2); }
@media (prefers-color-scheme: dark) { .tile-title { color: var(--amber); } }
.tile-age { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.tile-age.stale { color: var(--rust); font-weight: 600; }
.tile { position: relative; }
.tile-src { position: absolute; left: 12px; right: 44px; bottom: 9px; font-size: 11px; line-height: 1.3; color: var(--ink-2); }
.tile-src b { display: block; font-weight: 600; }
.tile-body { font-size: 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.big { font: 700 34px/1 var(--slab); }
.big small { font-size: 16px; font-weight: 500; color: var(--ink-2); }
.muted { color: var(--ink-2); font-size: 13px; }
.snowline { display: inline-block; margin-top: 2px; background: var(--amber-soft); border-radius: 6px; padding: 2px 6px; font-size: 12.5px; font-weight: 600; }
.route { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; line-height: 1.3; }
.route b { font-weight: 600; white-space: nowrap; }
.route span.st { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; background: var(--ok); }
.dot.caution { background: var(--caution); }
.dot.closed { background: var(--closed); }
.dot.unknown { background: transparent; border: 1.5px solid var(--ink-2); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.stat b { display: block; font: 700 22px/1.1 var(--slab); }
.stat span { font-size: 11.5px; color: var(--ink-2); }
.event { font-size: 13px; line-height: 1.3; }
.event time { display: block; font-size: 11.5px; font-weight: 600; color: var(--forest-2); text-transform: uppercase; letter-spacing: .3px; }
@media (prefers-color-scheme: dark) { .event time { color: var(--amber); } }
.event + .event { margin-top: 5px; }
.tile-error { color: var(--ink-2); font-size: 13px; }
.skeleton { height: 60px; border-radius: 8px; background: linear-gradient(90deg, var(--line), transparent, var(--line)); background-size: 200% 100%; animation: sk 1.4s infinite; opacity: .6; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- push ---------- */
.push-btn { flex: none; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--forest); color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; }

/* ---------- feed ---------- */
.feed-wrap { margin-top: 18px; }
.feed-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.feed-head h2 { font: 700 18px var(--slab); margin: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex: 1; margin-right: 10px; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; white-space: nowrap; font: 700 18px var(--slab); color: var(--ink-2); text-decoration: none; padding: 6px 4px 8px; margin: 0 10px -1px 0; border-bottom: 3px solid transparent; }
@media (max-width: 600px) { .tab { font-size: 16px; margin-right: 6px; } }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--amber); }
.tab:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
.res-tab { padding-top: 6px; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.feed { list-style: none; margin: 0; padding: 0; }
.post { padding: 13px 2px; border-bottom: 1px solid var(--line); }
.post-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); margin-bottom: 3px; }
.src {
  font-weight: 600; font-size: 11.5px; letter-spacing: .2px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; color: var(--ink);
}
.src.weather { border-color: #8fb3c9; }
.src.roads { border-color: var(--amber); }
.src.lifts { border-color: #a9c2d8; }
.src.events { border-color: var(--forest-2); }
.post.sev-1 .src { background: var(--amber-soft); }
.post.sev-2 .src, .post.sev-3 .src { background: var(--rust-soft); border-color: var(--rust); }
.post-title { font: 600 16px/1.35 var(--sans); margin: 0; }
.post-title a { text-decoration: none; }
.post-title a:hover { text-decoration: underline; }
.post-sum { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.post.open .post-sum { -webkit-line-clamp: unset; }
.post-actions { margin-top: 6px; display: flex; gap: 14px; font-size: 13px; }
.post-actions a, .post-actions button { color: var(--forest-2); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
@media (prefers-color-scheme: dark) { .post-actions a, .post-actions button { color: var(--amber); } }
.empty { padding: 24px 4px; color: var(--ink-2); text-align: center; }
.more { display: block; width: 100%; margin: 12px 0; padding: 10px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); cursor: pointer; }
.new-posts { position: sticky; top: 64px; z-index: 5; display: block; margin: 0 auto 8px; background: var(--forest); color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; font-size: 13px; box-shadow: var(--shadow); cursor: pointer; }

/* ---------- footer ---------- */
.foot { max-width: 720px; margin: 8px auto 24px; padding: 0 16px; font-size: 12.5px; color: var(--ink-2); }
.mission { font: 500 14px/1.4 var(--slab); color: var(--ink); }
.disclaimer:empty { display: none; }

@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tile { min-height: 168px; }
}

/* ---------- about ---------- */
.back { color: #f6efe2; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.back:hover { text-decoration: underline; }
.about { padding-top: 18px; }
.about h1 { font: 700 26px/1.2 var(--slab); margin: 0 0 10px; }
.about h2 { font: 700 18px var(--slab); margin: 26px 0 8px; }
.about p { margin: 0 0 10px; }
.about .lede { font: 500 17px/1.45 var(--slab); }
.preview-box { background: var(--amber-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; margin: 14px 0; }
.sources { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sources th, .sources td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.sources th { font: 700 12px var(--slab); text-transform: uppercase; letter-spacing: .6px; color: var(--ink-2); }
.sources tr:last-child td { border-bottom: 0; }
.sources td:last-child { white-space: nowrap; color: var(--ink-2); }
.feedback { display: inline-block; text-decoration: none; }
@media (max-width: 520px) {
  .sources thead { display: none; }
  .sources tr { display: block; padding: 8px 10px; border-bottom: 1px solid var(--line); }
  .sources tr:last-child { border-bottom: 0; }
  .sources td { display: block; padding: 0; border: 0; }
  .sources td:first-child { font-weight: 600; }
  .sources td:last-child { font-size: 12.5px; margin-top: 2px; }
}

/* ---------- expandable tiles ---------- */
.tile-wrap { position: relative; display: flex; }
.tile-wrap > .tile { flex: 1; width: 100%; padding-bottom: 48px; }
.tile-expand {
  position: absolute; right: 6px; bottom: 6px; width: 34px; height: 34px;
  display: grid; place-items: center; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.tile-expand:hover { background: var(--cream); color: var(--ink); }
.tile-expand:focus-visible, .panel-close:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; }
.tile-expand svg, .panel-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.panel {
  width: min(760px, 100vw); max-width: 100vw; height: calc(100dvh - 24px); max-height: none;
  margin: auto auto 0; padding: 0; border: 0; border-radius: 18px 18px 0 0;
  background: var(--cream); color: var(--ink); box-shadow: 0 -6px 30px rgba(0, 0, 0, .25);
  overflow: hidden; display: none; flex-direction: column;
}
.panel[open] { display: flex; animation: sheet-up .22s ease-out; }
.panel.closing { animation: sheet-down .18s ease-in forwards; }
.panel::backdrop { background: rgba(20, 24, 20, .55); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-down { to { transform: translateY(60px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .panel[open], .panel.closing { animation: none; } }
@media (min-width: 720px) {
  .panel { height: min(88dvh, 900px); margin: auto; border-radius: 18px; }
  .panel-grab { display: none !important; }
}
.panel-grab { display: flex; justify-content: center; padding: 8px 0 2px; touch-action: none; cursor: grab; }
.panel-grab span { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.panel-head {
  display: flex; align-items: center; gap: 10px; padding: 6px 12px 10px 18px;
  border-bottom: 1px solid var(--line); touch-action: none;
}
.panel-head h2 { flex: 1; margin: 0; font: 700 20px var(--slab); }
.panel-close { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; }
.panel-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 18px calc(24px + env(safe-area-inset-bottom)); }
.panel-body h3 { font: 700 13px var(--slab); text-transform: uppercase; letter-spacing: .8px; color: var(--ink-2); margin: 20px 0 8px; }
.panel-body h3:first-child { margin-top: 2px; }
.p-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.p-card + .p-card { margin-top: 8px; }
.p-now { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.p-now .big { font-size: 52px; }
.p-now-text { font-size: 15px; }
.hourly { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.hour { flex: none; width: 64px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; scroll-snap-align: start; }
.hour time { display: block; font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.hour b { display: block; font: 700 20px/1.2 var(--slab); margin: 3px 0; }
.hour span { display: block; font-size: 11px; color: var(--ink-2); line-height: 1.25; min-height: 28px; }
.hour .pop { color: #3f7fae; font-weight: 600; min-height: 0; }
.period { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.period b { font-weight: 600; }
.period .t { font: 700 20px var(--slab); text-align: right; }
.period .t.night { color: var(--ink-2); }
.period p { grid-column: 1 / -1; margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.p-route-head { display: flex; align-items: center; gap: 8px; }
.p-route-head .dot { margin-top: 0; width: 11px; height: 11px; }
.p-route-head b { font: 700 17px var(--slab); }
.p-route-head .note { color: var(--ink-2); font-size: 13px; }
.p-route .status { margin: 4px 0 0 19px; font-weight: 600; }
.p-route ul { margin: 6px 0 0 19px; padding: 0; list-style: none; font-size: 14px; }
.p-route li { padding: 6px 0; border-top: 1px solid var(--line); }
.p-route li small { display: block; color: var(--ink-2); margin-top: 2px; }
.p-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.p-stats .p-card { margin: 0; }
.p-stats b { display: block; font: 700 32px/1.1 var(--slab); }
.p-stats span { font-size: 13px; color: var(--ink-2); }
.meter { height: 6px; border-radius: 3px; background: var(--line); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--forest-2); border-radius: 3px; }
.p-day { font: 700 13px var(--sans); color: var(--forest-2); margin: 16px 0 6px; }
@media (prefers-color-scheme: dark) { .p-day { color: var(--amber); } .meter i { background: var(--amber); } }
.p-event { display: grid; grid-template-columns: 74px 1fr; gap: 10px; }
.p-event time { font-weight: 600; font-size: 13px; color: var(--ink-2); padding-top: 1px; }
.p-event a { font-weight: 600; text-decoration: none; }
.p-event a:hover { text-decoration: underline; }
.p-event small { display: block; color: var(--ink-2); font-size: 13px; }
.p-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.p-actions a, .p-actions button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; }
.p-fine { font-size: 11.5px; color: var(--ink-2); margin-top: 18px; }
html.panel-open { overflow: hidden; }
.p-route-head b { white-space: nowrap; }
.p-route ul li:first-child { border-top: 0; }
.p-day:first-child { margin-top: 2px; }

/* ---------- roads map ---------- */
.roads-map-wrap { margin-bottom: 12px; }
.roads-map { height: 280px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--paper); z-index: 0; }
@media (min-width: 720px) { .roads-map { height: 380px; } }
.map-err { padding: 16px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; margin-top: 6px; align-items: center; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { display: inline-block; width: 16px; height: 4px; border-radius: 2px; background: var(--ok); }
.lg.caution { background: var(--caution); }
.lg.closed { background: var(--closed); }
.leaflet-popup-content { font: 13.5px/1.4 var(--sans); margin: 10px 12px; }
.leaflet-container a.leaflet-popup-close-button { width: 28px; height: 28px; font-size: 20px; }

/* ---------- events calendar ---------- */
.cal { margin-bottom: 6px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head b { font: 700 15px var(--slab); }
.cal-head button { width: 36px; height: 32px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: 18px; line-height: 1; cursor: pointer; }
.cal-head button:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow span { font-size: 11px; font-weight: 600; color: var(--ink-2); padding: 2px 0; }
.cal-grid > span, .cal-grid > button { position: relative; height: 38px; display: grid; place-items: center; font-size: 14px; border-radius: 10px; border: 0; background: none; }
.cal-grid > .past { color: var(--ink-2); opacity: .5; }
.cal-grid > button { cursor: pointer; font-weight: 700; color: var(--ink); }
.cal-grid > button:hover { background: var(--cream); }
.cal-grid > button i { position: absolute; bottom: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--amber); }
.cal-grid > .today { box-shadow: inset 0 0 0 2px var(--forest-2); }
@media (prefers-color-scheme: dark) { .cal-grid > .today { box-shadow: inset 0 0 0 2px var(--amber); } }

/* ---------- header right ---------- */
.top-right { display: flex; align-items: center; gap: 10px; }
.prefs-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(246, 239, 226, .35); border-radius: 10px; background: transparent; color: #f6efe2; cursor: pointer; }
.prefs-btn:hover { background: rgba(255, 255, 255, .1); }
.prefs-btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; }
.prefs-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- preferences ---------- */
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-opt { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.theme-opt[aria-checked="true"] { border-color: var(--forest-2); box-shadow: 0 0 0 2px var(--forest-2); }
@media (prefers-color-scheme: dark) { .theme-opt[aria-checked="true"] { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber); } }
.theme-opt b { font: 700 15px var(--slab); }
.theme-opt small { color: var(--ink-2); font-size: 12.5px; }
.swatch { display: flex; height: 30px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.swatch i { flex: 1; }
.sw-trailhead i:nth-child(1) { background: #2f4a3a; } .sw-trailhead i:nth-child(2) { background: #d98e2b; } .sw-trailhead i:nth-child(3) { background: #f6efe2; }
.sw-lake i:nth-child(1) { background: #1f4e6e; } .sw-lake i:nth-child(2) { background: #e3a33a; } .sw-lake i:nth-child(3) { background: #eef3f6; }
.sw-aspen i:nth-child(1) { background: #8a3f12; } .sw-aspen i:nth-child(2) { background: #f0b232; } .sw-aspen i:nth-child(3) { background: #faf0e4; }
.sw-columbine i:nth-child(1) { background: #4a3570; } .sw-columbine i:nth-child(2) { background: #e6b23e; } .sw-columbine i:nth-child(3) { background: #f4f0f8; }
.prefs-note { font-size: 13px; color: var(--ink-2); margin-top: 14px; }

/* ---------- color themes ----------
   Each theme changes the brand colors and backgrounds. Status colors (--ok,
   --caution, --closed, --rust) stay the same in every theme so road and alert
   colors always mean the same thing. */
html[data-palette="lake"] {
  --forest: #1f4e6e; --forest-2: #2e6a8e; --forest-deep: #1a4360;
  --amber: #e3a33a; --amber-soft: #f6e3b4;
  --cream: #eef3f6; --paper: #fbfdfe; --line: #d3dfe7;
}
html[data-palette="aspen"] {
  --forest: #8a3f12; --forest-2: #9c4a17; --forest-deep: #763510;
  --amber: #f0b232; --amber-soft: #f9e1b5;
  --cream: #faf0e4; --paper: #fffaf3; --line: #ecd8c0;
}
html[data-palette="columbine"] {
  --forest: #4a3570; --forest-2: #5e4689; --forest-deep: #3e2c60;
  --amber: #e6b23e; --amber-soft: #eadff5;
  --cream: #f4f0f8; --paper: #fdfbff; --line: #dfd5ea;
}
@media (prefers-color-scheme: dark) {
  html[data-palette="lake"] {
    --cream: #161c21; --paper: #1e262d; --line: #2f3a44; --ink: #e6edf2; --ink-2: #a5b2bd;
    --amber-soft: #3a2f1c; --forest-2: #6fa6cc;
  }
  html[data-palette="aspen"] {
    --cream: #1f1915; --paper: #29211b; --line: #3d3128; --ink: #f3e9de; --ink-2: #bba997;
    --amber-soft: #3d2c16; --forest-2: #e0925a;
  }
  html[data-palette="columbine"] {
    --cream: #1a1720; --paper: #231f2b; --line: #373042; --ink: #ece6f3; --ink-2: #b1a7bf;
    --amber-soft: #2f2640; --forest-2: #b29ad9;
  }
}

/* ---------- hidden sections (Preferences) ---------- */
html[data-hide~="weather"] [data-show="weather"],
html[data-hide~="roads"] [data-show="roads"],
html[data-hide~="lifts"] [data-show="lifts"],
html[data-hide~="events"] [data-show="events"],
html[data-hide~="feed"] [data-show="feed"] { display: none !important; }
html[data-hide~="weather"][data-hide~="roads"][data-hide~="lifts"][data-hide~="events"] .tiles { display: none; }
.toggles { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.toggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.toggle:first-child { border-top: 0; }
.toggle span { flex: 1; }
.toggle span small { display: block; color: var(--ink-2); font-size: 12.5px; }
.switch { flex: none; position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--line); transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.toggle[aria-checked="true"] .switch { background: var(--forest-2); }
@media (prefers-color-scheme: dark) { .toggle[aria-checked="true"] .switch { background: var(--amber); } }
.toggle[aria-checked="true"] .switch::after { transform: translateX(18px); }
.toggle:disabled { cursor: default; opacity: .75; }
.push-status.warn { color: var(--alert, #b3261e); }
.toggle:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }

/* ---------- thetown.buzz home (hub.html) ---------- */
.hub main { max-width: 860px; }
.hub-hero { padding: 22px 0 6px; }
.hub-hero h1 { font: 700 clamp(28px, 6vw, 42px)/1.12 var(--slab); margin: 0 0 10px; color: var(--ink); }
.hub-hero p { font-size: 17px; color: var(--ink-2); margin: 0; max-width: 560px; }
.hub-h2 { font: 700 13px var(--slab); text-transform: uppercase; letter-spacing: .8px; color: var(--forest-2); margin: 26px 0 10px; }
@media (prefers-color-scheme: dark) { .hub-h2 { color: var(--amber); } }
.hub-towns { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .hub-towns { grid-template-columns: 1fr 1fr; } }
.hub-town { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: border-color .15s, transform .1s; }
.hub-town:hover { border-color: var(--amber); }
.hub-town:active { transform: scale(.99); }
.hub-town:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.hub-town-logo { background: var(--forest); padding: 14px 16px; line-height: 0; }
.hub-town-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 14px; flex: 1; }
.hub-town-body strong { font: 700 18px var(--slab); }
.hub-live { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hub-live li { font-size: 13px; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.hub-live li b { font-weight: 700; }
.hub-live .hub-live-alert { background: var(--rust-soft); border-color: transparent; color: var(--rust); }
@media (prefers-color-scheme: dark) { .hub-live .hub-live-alert { color: #f2b6a6; } }
.hub-live-none { margin: 0; font-size: 13px; color: var(--ink-2); }
.hub-town-go { margin-top: auto; font-weight: 600; font-size: 14.5px; color: var(--forest-2); }
@media (prefers-color-scheme: dark) { .hub-town-go { color: var(--amber); } }
.hub-town-go > span::after { content: " →"; }
.hub-town-go small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-2); }
.hub-how { display: grid; gap: 14px; margin: 30px 0 8px; }
@media (min-width: 640px) { .hub-how { grid-template-columns: repeat(3, 1fr); } }
.hub-how h3 { font: 700 15px var(--slab); margin: 0 0 4px; }
.hub-how p { margin: 0; font-size: 14px; color: var(--ink-2); }
.hub-ask { margin: 26px 0 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.hub-ask h2 { font: 700 20px var(--slab); margin: 0 0 6px; }
.hub-ask p { margin: 0 0 14px; color: var(--ink-2); font-size: 14.5px; }
.hub-ask .push-btn { display: inline-block; text-decoration: none; padding: 10px 18px; font-size: 14.5px; }
.hub .foot { max-width: 860px; }

/* ---------- Lifts & Snow: which mountain ---------- */
.mountain { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: -2px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtn-row { display: grid; gap: 1px; padding: 5px 0; border-top: 1px solid var(--line); line-height: 1.25; }
.mtn-row:first-child { border-top: 0; padding-top: 0; }
.mtn-row b { font-weight: 600; font-size: 14px; }
.mtn-row span { font-size: 13px; color: var(--ink-2); }
.panel-body h3.p-mountain { font: 700 18px var(--slab); text-transform: none; letter-spacing: 0; color: var(--ink); margin: 28px 0 4px; }
.panel-body h3.p-mountain:first-child { margin-top: 2px; }
.panel-body h3.p-mountain .muted { font: 400 13px var(--sans); }
.panel-body h4 { font: 700 13px var(--slab); text-transform: uppercase; letter-spacing: .8px; color: var(--ink-2); margin: 14px 0 8px; }

/* ---------- resources ---------- */
a.prefs-btn { text-decoration: none; }
.resources .res-list { list-style: none; margin: 0; padding: 0; }
.res { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 10px; box-shadow: var(--shadow); }
.res p { margin: 0 0 4px; }
.res-name { font-weight: 600; }
.res-note { font-size: 14px; }
.res-meta { font-size: 13px; color: var(--ink-2); }
.res-hours { font-size: 14px; font-weight: 600; color: var(--ink); }
.res-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px !important; }
.res-btn { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--cream); min-height: 20px; }
.res-btn:hover { border-color: var(--forest-2); }
.res-call { background: var(--forest); border-color: var(--forest); color: #f6efe2; }
.res-call::before { content: "☎ "; }
.res-emergency { background: var(--rust-soft); border: 0; border-radius: var(--radius); padding: 0 12px; margin: 16px 0; }
.res-emergency[open] { padding-bottom: 2px; }
.res-emergency summary h2 { color: var(--rust); }
.res-emergency summary::before { color: var(--rust); }
.res-911 { margin-left: auto; padding: 5px 14px; }
.res-emergency .res-call { background: var(--rust); border-color: var(--rust); }
.res-cat { border-top: 1px solid var(--line); }
.res-cat summary { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 12px 0; list-style: none; }
.res-cat summary::-webkit-details-marker { display: none; }
.res-cat summary::before { content: "▸"; color: var(--ink-2); transition: transform .15s; }
.res-cat[open] summary::before { transform: rotate(90deg); }
.res-cat summary h2 { margin: 0 !important; font-size: 17px !important; }
.res-count { font-size: 12px; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.resources .small { font-size: 12.5px; }

.res-tools { padding: 8px 0 6px; margin-bottom: 6px; }
.res-search { width: 100%; box-sizing: border-box; font: 16px var(--sans); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.res-search:focus { outline: 3px solid var(--amber); outline-offset: 0; }
.res-subtabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.res-subtabs::-webkit-scrollbar { display: none; }
.res-sub { flex: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--paper); text-decoration: none; white-space: nowrap; }
.res-sub[aria-current="true"] { background: var(--forest); border-color: var(--forest); color: #f6efe2; }
.res-sub[data-cat="emergency"] { color: var(--rust); border-color: var(--rust); }
.res-sub[data-cat="emergency"][aria-current="true"] { background: var(--rust); color: #f6efe2; }
.res-empty { margin: 12px 0; }
.res-tags { font-size: 13px; font-weight: 600; color: var(--ink-2); }
/* Local businesses come after the civic list, under their own heading. */
.res-group { font-family: var(--slab, inherit); font-size: 15px !important; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 28px 0 4px !important; padding-top: 14px; border-top: 3px double var(--line); }
/* Sponsored listings: clearly labelled, first in their category, never in Emergency. */
.res-sponsored { background: var(--amber-soft); border-radius: var(--radius); padding: 10px 12px !important; margin: 6px 0; border: 1px solid var(--amber); }
.res-sponsor-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.res-sponsor-head { display: flex; align-items: center; gap: 10px; }
.res-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; background: #fff; flex: none; }
.res-tagline { font-size: 14px; font-style: italic; }
:root {
  --i-food: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2M7 2v20M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3zm0 0v7%22/%3E%3C/svg%3E");
  --i-bag: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4zM3 6h18M16 10a4 4 0 0 1-8 0%22/%3E%3C/svg%3E");
  --i-wrench: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.8-3.8a6 6 0 0 1-7.9 7.9l-6.9 6.9a2.1 2.1 0 0 1-3-3l6.9-6.9a6 6 0 0 1 7.9-7.9z%22/%3E%3C/svg%3E");
  --i-bed: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M2 4v16M2 8h18a2 2 0 0 1 2 2v10M2 17h20M6 8v9%22/%3E%3C/svg%3E");
}
.res-sub[data-cat="food"], #food summary h2 { --ico: var(--i-food); }
.res-sub[data-cat="shops"], #shops summary h2 { --ico: var(--i-bag); }
.res-sub[data-cat="services"], #services summary h2 { --ico: var(--i-wrench); }
.res-sub[data-cat="lodging"], #lodging summary h2 { --ico: var(--i-bed); }
#tab-eat { --ico: var(--i-food); }
#tab-shop { --ico: var(--i-bag); }
#tab-stay { --ico: var(--i-bed); }
#tab-eat, #tab-shop, #tab-stay { display: inline-flex; align-items: center; gap: .4em; }
#tab-eat::before, #tab-shop::before, #tab-stay::before { content: ""; flex: none; width: 1.15em; height: 1.15em; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.res-sub[data-cat="food"], #food summary h2, .res-sub[data-cat="shops"], #shops summary h2,
.res-sub[data-cat="services"], #services summary h2, .res-sub[data-cat="lodging"], #lodging summary h2 { display: inline-flex; align-items: center; gap: .4em; }
.res-sub[data-cat="food"]::before, #food summary h2::before, .res-sub[data-cat="shops"]::before, #shops summary h2::before,
.res-sub[data-cat="services"]::before, #services summary h2::before, .res-sub[data-cat="lodging"]::before, #lodging summary h2::before {
  content: ""; flex: none; width: 1.15em; height: 1.15em; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.feed-pills { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.feed-pills::-webkit-scrollbar { display: none; }
.feed-pill { cursor: pointer; font-family: var(--sans); }
.feed-pill:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; }
.feed-pill[data-cat="alerts"] { color: var(--rust); border-color: var(--rust); }
.feed-pill[data-cat="alerts"][aria-current="true"] { background: var(--rust); color: #f6efe2; }

/* ---------- icons ----------
   One small line-icon set, drawn in CSS masks so each icon takes the colour of its text
   (light, dark and every theme). Hooks are existing ids, classes and data-cat values. */
:root {
  --i-live: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%222%22/%3E%3Cpath d=%22M16.2 7.8a6 6 0 0 1 0 8.4M7.8 16.2a6 6 0 0 1 0-8.4M19.1 4.9a10 10 0 0 1 0 14.2M4.9 19.1a10 10 0 0 1 0-14.2%22/%3E%3C/svg%3E");
  --i-phone: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z%22/%3E%3C/svg%3E");
  --i-all: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%223%22 width=%227%22 height=%227%22 rx=%221.5%22/%3E%3Crect x=%2214%22 y=%223%22 width=%227%22 height=%227%22 rx=%221.5%22/%3E%3Crect x=%223%22 y=%2214%22 width=%227%22 height=%227%22 rx=%221.5%22/%3E%3Crect x=%2214%22 y=%2214%22 width=%227%22 height=%227%22 rx=%221.5%22/%3E%3C/svg%3E");
  --i-alert: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z%22/%3E%3Cpath d=%22M12 9v4M12 17h.01%22/%3E%3C/svg%3E");
  --i-road: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 21 9 3M19 21 15 3M12 5v2M12 11v2M12 17v2%22/%3E%3C/svg%3E");
  --i-weather: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M17.5 17H7a5 5 0 1 1 .9-9.9A6 6 0 0 1 19 9a4 4 0 0 1-1.5 8z%22/%3E%3Cpath d=%22M8 21h.01M12 21h.01M16 21h.01%22/%3E%3C/svg%3E");
  --i-mountain: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22m8 4 4 7 3-3 7 12H2z%22/%3E%3Cpath d=%22m6.2 8 2.3 2.5L10 9%22/%3E%3C/svg%3E");
  --i-calendar: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%224%22 width=%2218%22 height=%2218%22 rx=%222%22/%3E%3Cpath d=%22M16 2v4M8 2v4M3 10h18%22/%3E%3C/svg%3E");
  --i-news: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9c0-1.1.9-2 2-2h2%22/%3E%3Cpath d=%22M18 14h-8M15 18h-5M10 6h8v4h-8z%22/%3E%3C/svg%3E");
  --i-town: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 22h18M5 18v-7M9.7 18v-7M14.3 18v-7M19 18v-7M12 2l9 5H3z%22/%3E%3C/svg%3E");
  --i-siren: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M7 18v-6a5 5 0 0 1 10 0v6%22/%3E%3Cpath d=%22M5 21h14v-3H5zM12 2v2M4.2 5.2l1.4 1.4M19.8 5.2l-1.4 1.4%22/%3E%3C/svg%3E");
  --i-medical: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M9 3h6v6h6v6h-6v6H9v-6H3V9h6z%22/%3E%3C/svg%3E");
  --i-bus: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%224%22 y=%223%22 width=%2216%22 height=%2215%22 rx=%222%22/%3E%3Cpath d=%22M4 11h16M7 21v-3M17 21v-3M8 15h.01M16 15h.01%22/%3E%3C/svg%3E");
  --i-bolt: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M13 2 3 14h9l-1 8 10-12h-9z%22/%3E%3C/svg%3E");
  --i-tree: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 2 5 12h4l-3 5h12l-3-5h4zM12 17v5%22/%3E%3C/svg%3E");
  --i-book: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 19.5A2.5 2.5 0 0 1 6.5 17H20V3H6.5A2.5 2.5 0 0 0 4 5.5zM4 19.5A2.5 2.5 0 0 0 6.5 22H20v-5%22/%3E%3C/svg%3E");
}
#tab-feed { --ico: var(--i-live); }
#tab-essentials { --ico: var(--i-phone); }
.feed-pill[data-cat=""] { --ico: var(--i-all); }
.feed-pill[data-cat="alerts"] { --ico: var(--i-alert); }
.feed-pill[data-cat="roads"] { --ico: var(--i-road); }
.feed-pill[data-cat="weather"] { --ico: var(--i-weather); }
.feed-pill[data-cat="lifts"] { --ico: var(--i-mountain); }
.feed-pill[data-cat="events"] { --ico: var(--i-calendar); }
.feed-pill[data-cat="news"] { --ico: var(--i-news); }
.feed-pill[data-cat="town"] { --ico: var(--i-town); }
.cat-alerts { --ico: var(--i-alert); }
.cat-roads { --ico: var(--i-road); }
.cat-weather { --ico: var(--i-weather); }
.cat-lifts { --ico: var(--i-mountain); }
.cat-events { --ico: var(--i-calendar); }
.cat-news { --ico: var(--i-news); }
.cat-town { --ico: var(--i-town); }
[data-tile="weather"] .tile-title { --ico: var(--i-weather); }
[data-tile="roads"] .tile-title { --ico: var(--i-road); }
[data-tile="lifts"] .tile-title { --ico: var(--i-mountain); }
[data-tile="events"] .tile-title { --ico: var(--i-calendar); }
.res-sub[data-cat=""] { --ico: var(--i-all); }
.res-sub[data-cat="emergency"] { --ico: var(--i-siren); }
#emergency summary h2 { --ico: var(--i-siren); }
.res-sub[data-cat="medical"] { --ico: var(--i-medical); }
#medical summary h2 { --ico: var(--i-medical); }
.res-sub[data-cat="government"] { --ico: var(--i-town); }
#government summary h2 { --ico: var(--i-town); }
.res-sub[data-cat="transit"] { --ico: var(--i-bus); }
#transit summary h2 { --ico: var(--i-bus); }
.res-sub[data-cat="utilities"] { --ico: var(--i-bolt); }
#utilities summary h2 { --ico: var(--i-bolt); }
.res-sub[data-cat="roads"] { --ico: var(--i-road); }
#roads summary h2 { --ico: var(--i-road); }
.res-sub[data-cat="outdoors"] { --ico: var(--i-tree); }
#outdoors summary h2 { --ico: var(--i-tree); }
.res-sub[data-cat="schools"] { --ico: var(--i-book); }
#schools summary h2 { --ico: var(--i-book); }
#tab-feed,
#tab-essentials,
.feed-pill[data-cat=""],
.feed-pill[data-cat="alerts"],
.feed-pill[data-cat="roads"],
.feed-pill[data-cat="weather"],
.feed-pill[data-cat="lifts"],
.feed-pill[data-cat="events"],
.feed-pill[data-cat="news"],
.feed-pill[data-cat="town"],
.cat-alerts,
.cat-roads,
.cat-weather,
.cat-lifts,
.cat-events,
.cat-news,
.cat-town,
[data-tile="weather"] .tile-title,
[data-tile="roads"] .tile-title,
[data-tile="lifts"] .tile-title,
[data-tile="events"] .tile-title,
.res-sub[data-cat=""],
.res-sub[data-cat="emergency"],
#emergency summary h2,
.res-sub[data-cat="medical"],
#medical summary h2,
.res-sub[data-cat="government"],
#government summary h2,
.res-sub[data-cat="transit"],
#transit summary h2,
.res-sub[data-cat="utilities"],
#utilities summary h2,
.res-sub[data-cat="roads"],
#roads summary h2,
.res-sub[data-cat="outdoors"],
#outdoors summary h2,
.res-sub[data-cat="schools"],
#schools summary h2 { display: inline-flex; align-items: center; gap: .4em; }
#tab-feed::before,
#tab-essentials::before,
.feed-pill[data-cat=""]::before,
.feed-pill[data-cat="alerts"]::before,
.feed-pill[data-cat="roads"]::before,
.feed-pill[data-cat="weather"]::before,
.feed-pill[data-cat="lifts"]::before,
.feed-pill[data-cat="events"]::before,
.feed-pill[data-cat="news"]::before,
.feed-pill[data-cat="town"]::before,
.cat-alerts::before,
.cat-roads::before,
.cat-weather::before,
.cat-lifts::before,
.cat-events::before,
.cat-news::before,
.cat-town::before,
[data-tile="weather"] .tile-title::before,
[data-tile="roads"] .tile-title::before,
[data-tile="lifts"] .tile-title::before,
[data-tile="events"] .tile-title::before,
.res-sub[data-cat=""]::before,
.res-sub[data-cat="emergency"]::before,
#emergency summary h2::before,
.res-sub[data-cat="medical"]::before,
#medical summary h2::before,
.res-sub[data-cat="government"]::before,
#government summary h2::before,
.res-sub[data-cat="transit"]::before,
#transit summary h2::before,
.res-sub[data-cat="utilities"]::before,
#utilities summary h2::before,
.res-sub[data-cat="roads"]::before,
#roads summary h2::before,
.res-sub[data-cat="outdoors"]::before,
#outdoors summary h2::before,
.res-sub[data-cat="schools"]::before,
#schools summary h2::before {
  content: ""; flex: none; width: 1.15em; height: 1.15em; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.tab::before { opacity: .85; }
.post-meta .cat::before { width: 1.2em; height: 1.2em; opacity: .8; }
.res-cat summary h2::before { width: .95em; height: .95em; color: var(--ink-2); }
.res-emergency summary h2::before { color: var(--rust); }
.tile-title::before { width: 1.25em; height: 1.25em; }

/* ---------- wide desktop layout ----------
   Phones and tablets keep the single column above. On a wide screen the page widens to
   1400px: alerts and the four tiles run across the top, then the alerts prompt, then the
   Live feed | Resources tabs, same as on a phone but using the full width. */
@media (min-width: 1100px) {
  main { max-width: 1400px; padding: 20px 32px 8px; }
  .alerts { margin-bottom: 14px; }
  .tiles { gap: 14px; }
  .tile { min-height: 180px; padding: 14px 16px; }
  .tile-body { font-size: 15px; }
  .tile-src { left: 16px; }
  .tile .stats { max-width: 260px; }
  .feed-head .tabs { margin-right: 0; }
  .post-sum { max-width: 110ch; }
  .res-subtabs, .feed-pills { flex-wrap: wrap; overflow: visible; }
  .res-tools .res-search { max-width: 560px; }
  .foot { max-width: 1400px; padding: 0 32px; }
  .foot .disclaimer, .foot .mission, .foot .fine { max-width: 1100px; }
}

/* Guide pages (/food-drink, /shops, /lodging, /essentials): links between them. */
.guide-nav { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; scrollbar-width: none; }
.guide-nav::-webkit-scrollbar { display: none; }
.guide-nav a { flex: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--paper); text-decoration: none; white-space: nowrap; }
.guide-nav a[aria-current="page"] { background: var(--forest); border-color: var(--forest); color: #f6efe2; }

/* ---------- header message area (right of the town picker; see src/notice.js) ---------- */
.notes { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 8px; }
.note { position: relative; min-width: 0; max-width: 100%; }
.note > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; line-height: 1.3;
  background: rgba(255, 255, 255, .1); color: #f6efe2; border: 1px solid rgba(246, 239, 226, .28);
}
.note > summary::-webkit-details-marker { display: none; }
.note > summary:hover { background: rgba(255, 255, 255, .16); }
.note > summary:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.note strong { font-weight: 600; white-space: nowrap; }
.note-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; opacity: .92; }
.note-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #c9c2b4; }
.note-preview .note-dot { background: var(--amber-soft); }
.note-info .note-dot { background: #9cc9e6; }
.note-warn .note-dot { background: var(--amber); }
.note-urgent > summary, .note-urgent > summary:hover { background: var(--rust); border-color: var(--rust); }
.note-urgent .note-dot { background: #fff; }
.note-full {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 20;
  width: min(420px, calc(100vw - 24px)); padding: 12px 14px; border-radius: var(--radius);
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  font-size: 14px; line-height: 1.45;
}
.note-preview .note-full { background: var(--amber-soft); }
.note-urgent .note-full { border-color: var(--rust); border-width: 2px; }
/* Phones: each message is a small pill; tapping it opens the full text under the header.
   The most important one keeps its label; the rest are a dot (their label stays for screen readers). */
@media (max-width: 640px) {
  .notes { justify-content: flex-end; gap: 4px; }
  .note { position: static; flex: none; }
  .note:first-child { flex: 0 1 auto; min-width: 0; }
  /* Room for the messages: the live dot stays, its word goes (screen readers still hear it). */
  .top:has(.notes) #status-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .top:has(.notes) .top-right { gap: 8px; }
  .note:first-child strong { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .note > summary { padding: 5px 9px; gap: 5px; font-size: 12px; }
  .note-text { display: none; }
  .note + .note > summary { padding: 8px; }
  .note + .note strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .note-full { left: 12px; right: 12px; width: auto; transform: none; top: calc(100% - 2px); }
}
@media (max-width: 360px) {
  .note strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .note > summary { padding: 8px; }
}

/* ---------- towns without roads or a ski resort (body class from brand.js tileGaps) ---------- */
.no-roads [data-show="roads"], .no-roads .feed-pill[data-cat="roads"], .no-roads [data-toggle="roads"], .no-roads [data-toggle="feed-roads"],
.no-lifts [data-show="lifts"], .no-lifts .feed-pill[data-cat="lifts"], .no-lifts [data-toggle="lifts"], .no-lifts [data-toggle="feed-lifts"] { display: none !important; }
/* Phones: an odd number of tiles lets the last one take the full row. */
.no-roads:not(.no-lifts) .tile-wrap[data-show="events"], .no-lifts:not(.no-roads) .tile-wrap[data-show="events"] { grid-column: 1 / -1; }
@media (min-width: 720px) {
  .no-roads .tiles, .no-lifts .tiles { grid-template-columns: repeat(3, 1fr); }
  .no-roads.no-lifts .tiles { grid-template-columns: repeat(2, 1fr); }
  .no-roads:not(.no-lifts) .tile-wrap[data-show="events"], .no-lifts:not(.no-roads) .tile-wrap[data-show="events"] { grid-column: auto; }
}
