/* Conshy.xyz house style: the Conshy.xyz design system, version 1.
 *
 * Token names and values follow the design system's tokens.json. Component
 * rules follow its component bundle (Button, Tag, DateTile, EventRow,
 * PromoBanner, SiteHeader, StoryCard) and are written for this site's
 * markup. Rules the design system does not cover (weather, alerts, ledger
 * tables, the radio dock) are built from the same tokens.
 *
 * Loaded after Basecoat so the tokens below replace Basecoat's defaults.
 * Tailwind utilities handle page layout. Every page links this file, so
 * edits here restyle the whole archive without a re-render.
 */

:root {
  /* Brand */
  --aubergine: #302039;
  --violet: #942bff;
  --cyan: #00c9de;
  --pink: #ff00b8;
  --ink: #17131c;
  --paper: #f7f5f1;

  /* Roles, light theme */
  --bg: var(--paper);
  --surface: #ffffff;
  --surface-sunken: #efecf3;
  --border: #e4e0e8;
  --border-strong: #8a8095;
  --text: var(--ink);
  --text-heading: var(--aubergine);
  --text-muted: #5e5668;
  --primary: var(--aubergine);
  --on-primary: #ffffff;
  --on-violet: #ffffff;
  --on-cyan: var(--ink);
  --on-pink: var(--ink);
  --link: #942bff;
  --pink-tint: #ffe3f5;
  --pink-text: #b0008a;
  --focus: #942bff;
  --shadow-card: 0 1px 2px rgba(23, 19, 28, 0.06);

  /* Type */
  --font-display: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Spacing and shape */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-pill: 999px;

  /* Basecoat tokens, mapped onto the roles above */
  --radius: var(--radius-md);
  --background: var(--bg);
  --foreground: var(--text);
  --card: var(--surface);
  --card-foreground: var(--text);
  --popover: var(--surface);
  --popover-foreground: var(--text);
  --primary-foreground: var(--on-primary);
  --secondary: var(--surface-sunken);
  --secondary-foreground: var(--text-heading);
  --muted: var(--surface-sunken);
  --muted-foreground: var(--text-muted);
  --accent: var(--surface-sunken);
  --accent-foreground: var(--text-heading);
  --destructive: var(--pink-text);
  --input: var(--border-strong);
  --ring: var(--focus);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ink);
    --surface: #221b2a;
    --surface-sunken: #2b2235;
    --border: #3a3045;
    --border-strong: #7c7189;
    --text: var(--paper);
    --text-heading: var(--paper);
    --text-muted: #a99fb4;
    --primary: var(--paper);
    --on-primary: var(--aubergine);
    --link: #c084ff;
    --pink-tint: #3a1a33;
    --pink-text: #ff5ccf;
    --focus: #c084ff;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */

html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--violet); color: var(--on-violet); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@layer base {
  a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
}

.serif { font-family: var(--font-serif); }
.muted { color: var(--text-muted); }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.text-link { color: var(--link); font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Component rules live in the components layer (the same layer as
   Basecoat's) so Tailwind utilities such as `hidden` can still override
   them. The tokens and base rules above stay unlayered so they win over
   Basecoat's defaults. */
@layer components {

  /* ---------- Type scale ---------- */
  .t-display,
  .t-headline {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-heading);
    text-wrap: balance;
  }
  .t-display { font-size: 56px; line-height: 58px; }
  .t-headline { font-size: 40px; line-height: 44px; }
  @media (max-width: 599.98px) {
    .t-display { font-size: 40px; line-height: 44px; }
    .t-headline { font-size: 32px; line-height: 36px; }
  }
  .t-sub { font-family: var(--font-display); font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-heading); }
  .t-title { font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 700; color: var(--text-heading); }
  .t-label { font-family: var(--font-display); font-size: 12px; line-height: 16px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
  .dek { font-family: var(--font-serif); font-size: 20px; line-height: 28px; color: var(--text-muted); }
  .meta { font-family: var(--font-serif); font-size: 14px; line-height: 20px; color: var(--text-muted); }
  .num { font-variant-numeric: tabular-nums; }

  /* ---------- Logo ---------- */
  .logo { display: inline-flex; flex: none; border-radius: var(--radius-sm); }
  .logo img { display: block; height: 36px; width: auto; }
  .logo-sm .logo img { height: 28px; }

  /* ---------- SiteHeader ---------- */
  .site-head { background: var(--surface); border-bottom: 1px solid var(--border); }
  .site-head-in {
    max-width: 76rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
  }
  .site-nav { display: flex; flex-wrap: wrap; gap: var(--space-4); flex: 1; }
  .site-nav a {
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border-radius: 4px;
    white-space: nowrap;
  }
  .site-nav a:hover { color: var(--text-heading); box-shadow: inset 0 -3px 0 var(--border); }
  .site-nav a[aria-current="page"] { color: var(--text-heading); box-shadow: inset 0 -3px 0 var(--violet); }
  .icon-btn {
    display: inline-flex;
    padding: var(--space-2);
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-heading);
    cursor: pointer;
  }
  .icon-btn:hover { background: var(--surface-sunken); }
  .icon, .icon-btn svg { width: 20px; height: 20px; flex: none; }
  .menu-btn { display: none; }
  @media (max-width: 719.98px) {
    .site-head-in { gap: var(--space-2) var(--space-3); padding: var(--space-3); }
    .site-head-in > .logo { margin-right: auto; }
    .menu-btn { display: inline-flex; }
    .site-nav { display: none; order: 9; flex: 1 0 100%; flex-direction: column; gap: 0; padding-top: var(--space-2); }
    .site-head[data-open] .site-nav { display: flex; }
    .site-nav a { padding: var(--space-2) 0; border-top: 1px solid var(--border); border-radius: 0; }
    .site-nav a:hover { box-shadow: none; }
    .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--violet); padding-left: var(--space-3); }
  }

  /* ---------- Button (on Basecoat's .btn) ---------- */
  .btn,
  .btn[data-size] {
    height: auto;
    gap: var(--space-2);
    padding: 10px 20px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: none;
  }
  .btn[data-size="sm"] { padding: 8px 16px; font-size: 14px; line-height: 20px; }
  .btn:not([data-variant]),
  .btn[data-variant="primary"] { background: var(--primary); color: var(--on-primary); }
  .btn:not([data-variant]):hover,
  .btn[data-variant="primary"]:hover { background: color-mix(in srgb, var(--primary) 92%, #fff); }
  .btn[data-variant="outline"] { background: transparent; color: var(--text-heading); border-color: var(--text-heading); }
  .btn[data-variant="outline"]:hover { background: var(--surface-sunken); }
  .btn[data-variant="ghost"] { background: transparent; color: var(--text-heading); }
  .btn[data-variant="ghost"]:hover { background: var(--surface-sunken); }

  /* ---------- Tag ---------- */
  .tag {
    display: inline-block;
    padding: var(--space-1) 12px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 12px;
    line-height: 16px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .tag-violet, .tone-violet { background: var(--violet); color: var(--on-violet); }
  .tag-cyan, .tone-cyan { background: var(--cyan); color: var(--on-cyan); }
  .tag-pink, .tone-pink { background: var(--pink); color: var(--on-pink); }

  /* ---------- Weather strip under the hero ---------- */
  .wx-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1) var(--space-3);
    padding: 12px var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    color: var(--text);
    text-decoration: none;
  }
  .wx-strip:hover { border-color: var(--border-strong); }
  .wx-strip .icon { color: var(--text-heading); }
  .wx-strip b { font-weight: 700; color: var(--text-heading); }

  /* ---------- Day filter ---------- */
  .days { display: flex; flex-wrap: wrap; gap: var(--space-2); }
  .day-chip {
    display: inline-flex;
    align-items: baseline;
    gap: var(--space-1);
    padding: var(--space-2) 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    font-family: var(--font-display);
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
  }
  .day-chip:hover { border-color: var(--border-strong); }
  .day-chip .n { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--text-muted); }
  .day-chip[aria-pressed="true"] {
    background: var(--surface-sunken);
    border-color: var(--text-heading);
    box-shadow: inset 0 0 0 1px var(--text-heading);
    color: var(--text-heading);
  }

  /* ---------- DateTile ---------- */
  .datebox {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
  }
  .datebox .mo { font-size: 12px; line-height: 14px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
  .datebox .dd { font-size: 26px; line-height: 28px; font-weight: 800; }
  .datebox.tone-pink .dd { color: #fff; }
  .datebox.tbd .dd { font-size: 14px; line-height: 16px; letter-spacing: 0.04em; }

  /* ---------- EventRow ---------- */
  .ev-list { display: grid; gap: var(--space-3); }
  .ev-list + .ev-list { margin-top: var(--space-3); }
  .ev {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto auto;
    grid-template-areas: "tile body cal chev";
    align-items: center;
    column-gap: var(--space-3);
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
  }
  .ev:has(a.ev-title):hover { border-color: var(--border-strong); }
  .ev:has(a.ev-title:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
  .ev > .datebox { grid-area: tile; }
  .ev-body { grid-area: body; min-width: 0; }
  .ev-title {
    display: block;
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 24px;
    font-weight: 700;
    color: var(--text-heading);
    text-decoration: none;
  }
  a.ev-title:focus-visible { outline: none; }
  a.ev-title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  .ev-meta { font-family: var(--font-serif); font-size: 14px; line-height: 20px; color: var(--text-muted); }
  .ev-cal {
    grid-area: cal;
    position: relative;
    z-index: 1;
    padding: var(--space-1) 0;
    font-family: var(--font-display);
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--link);
    text-decoration: none;
    white-space: nowrap;
  }
  .ev-cal:hover { text-decoration: underline; }
  .ev > .chev { grid-area: chev; color: var(--text-heading); }
  @media (max-width: 639.98px) {
    .ev { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "tile body chev" ". cal ."; }
    .ev-cal { justify-self: start; }
  }

  /* ---------- Rail ---------- */
  .rail { display: flex; flex-direction: column; gap: var(--space-4); }
  .panel {
    padding: var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
  }
  .panel > h2 { font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 700; color: var(--text-heading); margin-bottom: var(--space-2); }
  .panel-sunken { padding: var(--space-4); background: var(--surface-sunken); border-color: transparent; box-shadow: none; }
  .panel-sunken .panel-title { font-size: 20px; line-height: 26px; font-weight: 800; }
  .panel p.serif,
  .panel dd,
  .alerts li,
  .brief li { font-family: var(--font-serif); font-size: 16px; line-height: 24px; }

  /* ---------- Game teaser (landing page) ---------- */
  .game-teaser { display: block; color: inherit; text-decoration: none; }
  .game-teaser:hover { border-color: var(--border-strong); }
  .game-teaser img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); }

  /* ---------- PromoBanner ---------- */
  .promo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--pink-tint);
    border-radius: var(--radius-md);
    color: var(--pink-text);
    text-decoration: none;
  }
  .promo .icon-lg { width: 28px; height: 28px; flex: none; }
  .promo-body { flex: 1; min-width: 0; }
  .promo-title { display: block; font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 800; }
  .promo-sub { display: block; font-family: var(--font-display); font-size: 14px; line-height: 20px; font-weight: 600; }

  /* ---------- Weather, alerts, quick bites ---------- */
  .wx-condition { font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 700; color: var(--text-heading); }
  .wx dl { display: grid; grid-template-columns: 4.5rem 1fr; gap: var(--space-2); align-items: baseline; }
  .wx dt { font-size: 12px; line-height: 16px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }

  .alerts li { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
  .alerts li:last-child { border-bottom: 0; padding-bottom: 0; }
  .alerts .tag { margin-right: var(--space-1); vertical-align: 0.1em; }

  .brief { counter-reset: brief; }
  .brief li {
    counter-increment: brief;
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border);
  }
  .brief li:nth-child(3n) { border-bottom-color: var(--border-strong); }
  .brief li:last-child { border-bottom: 0; padding-bottom: 0; }
  .brief li::before {
    content: counter(brief, decimal-leading-zero);
    font-family: var(--font-display);
    font-size: 12px;
    line-height: 24px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
  }

  .bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
  .bars i { width: 3px; height: 45%; border-radius: 2px; background: currentColor; }
  .bars i:nth-child(2) { height: 85%; }
  .bars i:nth-child(3) { height: 60%; }
  .bars i:nth-child(4) { height: 100%; }
  .bars.on i { animation: bar 0.9s ease-in-out infinite; }
  .bars.on i:nth-child(2) { animation-delay: -0.3s; }
  .bars.on i:nth-child(3) { animation-delay: -0.6s; }
  .bars.on i:nth-child(4) { animation-delay: -0.15s; }
  @keyframes bar { 0%, 100% { height: 25%; } 50% { height: 100%; } }
  @media (prefers-reduced-motion: reduce) { .bars.on i { animation: none; height: 70%; } }

  /* ---------- StoryCard (stories carry their text; no photos yet) ---------- */
  .stories-top { display: grid; gap: var(--space-5) var(--space-4); }
  .story-stack { display: flex; flex-direction: column; gap: var(--space-5); }
  .stories-more { display: grid; gap: var(--space-5) var(--space-4); margin-top: var(--space-5); }
  @media (min-width: 768px) { .stories-more { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 1024px) {
    .stories-top { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
    .stories-more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  .story { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--border); }
  .story-title { font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -0.01em; color: var(--text-heading); text-wrap: balance; }
  .story-lead .story-title { font-size: 40px; line-height: 44px; letter-spacing: -0.02em; }
  @media (max-width: 599.98px) { .story-lead .story-title { font-size: 32px; line-height: 36px; } }
  .body { font-family: var(--font-serif); font-size: 18px; line-height: 28px; color: var(--text); max-width: 65ch; }
  .story .body { font-size: 16px; line-height: 24px; }
  .story-lead .body { font-size: 18px; line-height: 28px; }
  .body p + p { margin-top: 0.75em; }
  .body a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); }
  .body a:hover { text-decoration-color: currentColor; }
  .body details { margin-top: 0.75em; }
  .body details > p:first-of-type { margin-top: 0.75em; }
  .body summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-family: var(--font-display);
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--link);
  }
  .body summary::-webkit-details-marker { display: none; }
  .body summary::after { content: "+"; }
  .body details[open] summary::after { content: "\2212"; }

  /* ---------- Ledger tables (landing + back issues) ---------- */
  .ledger { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 20px; }
  .ledger th,
  .ledger td { padding: 6px 8px; vertical-align: top; white-space: normal; }
  .ledger th:first-child,
  .ledger td:first-child { padding-left: 0; }
  .ledger th:last-child,
  .ledger td:last-child { padding-right: 0; }
  .ledger thead th {
    text-align: left;
    font-size: 12px;
    line-height: 16px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--text-heading);
  }
  .ledger tbody tr { border-bottom: 1px solid var(--border); }
  .ledger tbody tr:nth-child(3n) { border-bottom-color: var(--border-strong); }
  .ledger tbody tr:last-child { border-bottom: 0; }
  .ledger .num {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    text-align: right;
    white-space: nowrap;
    color: var(--text-muted);
  }
  .ledger thead th.num { text-align: right; font-family: var(--font-display); font-size: 12px; color: var(--text-muted); }
  .ledger .num b { font-weight: 500; color: var(--text); }
  .ledger a { text-decoration: none; }
  .ledger a:hover { color: var(--link); text-decoration: underline; }
  .ledger tr.month th {
    padding-top: var(--space-4);
    text-align: left;
    font-size: 18px;
    line-height: 24px;
    font-weight: 700;
    color: var(--text-heading);
    border-bottom: 1px solid var(--text-heading);
  }

  /* ---------- Radio dock ---------- */
  .dock {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
  }
  .dock .btn.play { width: 40px; height: 40px; padding: 0; }
  .dock .time { font-size: 12px; width: 2.6rem; }
  .dock input[type="range"] { --primary: var(--violet); --slider-track-height: 4px; --slider-thumb-size: 0.85rem; height: 1rem; }
  .dock input[type="range"]::-webkit-slider-runnable-track { height: 4px; }
  .dock input[type="range"]::-moz-range-track { height: 4px; }
  .dock input[type="range"]::-webkit-slider-thumb { background: var(--violet); border-color: var(--violet); }
  .dock input[type="range"]::-moz-range-thumb { background: var(--violet); border-color: var(--violet); }

  /* ---------- Camps and sports guide ---------- */
  /* Status tags take their color from data-tone so the page script can
     change it without stacking classes. */
  .tag[data-tone="violet"] { background: var(--violet); color: var(--on-violet); }
  .tag[data-tone="cyan"] { background: var(--cyan); color: var(--on-cyan); }
  .tag[data-tone="pink"] { background: var(--pink); color: var(--on-pink); }
  .tag[data-tone="muted"] { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border-strong); }

  .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--text-heading); }
  .stats > div { padding: var(--space-2) var(--space-3) 0 0; }
  .stats > div + div { padding-left: var(--space-3); border-left: 1px solid var(--border); }
  .stats dt { font-size: 12px; line-height: 16px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
  .stats dd { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 32px; line-height: 40px; font-weight: 500; color: var(--text-heading); }
  @media (max-width: 599.98px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-3); }
    .stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  }

  .plan-month + .plan-month { margin-top: var(--space-5); }
  .plan-head {
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-1);
    border-bottom: 1px solid var(--text-heading);
    font-size: 18px;
    line-height: 24px;
    font-weight: 700;
    color: var(--text-heading);
  }
  .ev-kicker { display: block; font-size: 12px; line-height: 16px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }

  /* Page nav: sticks to the top while the guide scrolls. */
  .guide-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .guide-nav-in {
    max-width: 76rem;
    margin: 0 auto;
    display: flex;
    gap: var(--space-4);
    padding: 0 var(--space-4);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .guide-nav-in::-webkit-scrollbar { display: none; }
  .guide-nav a {
    flex: none;
    padding: 12px 0 10px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    box-shadow: inset 0 -3px 0 transparent;
  }
  .guide-nav a:hover { color: var(--text-heading); box-shadow: inset 0 -3px 0 var(--border); }
  .guide-nav a.on { color: var(--text-heading); box-shadow: inset 0 -3px 0 var(--violet); }
  .guide-nav a.near { font-weight: 600; color: var(--text-muted); }
  .guide-nav .n { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-muted); }
  @media (max-width: 719.98px) { .guide-nav-in { padding: 0 var(--space-3); gap: var(--space-3); } }

  /* Open now panel beside the guide's headline */
  .open-now { align-self: start; }
  .open-now > div > h2 { font-size: 20px; line-height: 26px; font-weight: 800; color: var(--text-heading); }
  .open-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border);
  }
  .open-list li:last-child { border-bottom: 0; }
  .open-list .o-body { min-width: 0; }
  .open-list a { display: block; font-weight: 700; color: var(--text-heading); text-decoration: none; }
  .open-list a:hover { color: var(--link); text-decoration: underline; }
  .open-list .meta { display: block; font-size: 13px; line-height: 18px; }
  .open-list .tag { flex: none; }
  .open-sub { margin-top: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--text-heading); font-size: 12px; line-height: 16px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }

  .areas dt { margin-top: var(--space-2); font-weight: 700; }
  .areas dt:first-child { margin-top: 0; }
  .areas dt a { color: var(--text-heading); text-decoration: none; }
  .areas dt a:hover { color: var(--link); text-decoration: underline; }
  .areas .n { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-muted); }
  .areas dd { font-family: var(--font-serif); font-size: 14px; line-height: 20px; color: var(--text-muted); }

  /* Last season's dates, listed compactly under each calendar month */
  .ref-block { margin-top: var(--space-3); }
  .ev-list + .ref-block { margin-top: var(--space-4); }
  .ref-label { margin-bottom: var(--space-1); font-family: var(--font-serif); font-size: 13px; line-height: 18px; font-style: italic; color: var(--text-muted); }
  .ref-list li { display: grid; grid-template-columns: 3.75rem minmax(0, 1fr); gap: var(--space-3); padding: 6px 0; border-bottom: 1px solid var(--border); }
  .ref-list li:nth-child(3n) { border-bottom-color: var(--border-strong); }
  .ref-list li:last-child { border-bottom: 0; }
  .ref-list .d { font-size: 13px; line-height: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-muted); }
  .ref-list a { font-size: 14px; line-height: 20px; font-weight: 700; color: var(--text-heading); text-decoration: none; }
  .ref-list a:hover { color: var(--link); text-decoration: underline; }
  .ref-list .meta { font-size: 13px; line-height: 20px; }

  .toggle { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); cursor: pointer; }
  .toggle input { width: 16px; height: 16px; accent-color: var(--violet); }

  .legend { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2) var(--space-3); align-items: baseline; }
  .legend dd { font-family: var(--font-serif); font-size: 15px; line-height: 22px; }

  .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
  .filters { margin-bottom: var(--space-3); padding: var(--space-2) 0; background: var(--bg); }
  @media (min-width: 720px) {
    /* Filters stay in view under the page nav while the table scrolls. */
    .filters { position: sticky; top: 43px; z-index: 20; border-bottom: 1px solid var(--border); }
  }
  .field-inline { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
  .field-inline .select { width: auto; min-width: 5.5rem; }
  .toolbar .search { flex: 1 1 14rem; width: auto; min-width: 12rem; }

  .guide-table td { font-size: 14px; line-height: 20px; }
  @media (min-width: 720px) {
    .guide-table { table-layout: fixed; }
    .guide-table .c-age { width: 5.5rem; }
    .guide-table .c-date { width: 6.25rem; }
    .guide-table .c-cost { width: 9.5rem; }
    .guide-table .c-status { width: 10.5rem; }
  }
  .guide-table .prog-org { font-weight: 700; color: var(--text-heading); }
  .guide-table .prog-meta { font-family: var(--font-serif); font-size: 13px; line-height: 18px; color: var(--text-muted); }
  .guide-table .prog-note { max-width: 62ch; margin-top: 2px; font-family: var(--font-serif); font-size: 13px; line-height: 18px; color: var(--text); }
  .guide-table .prog-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-3); margin-top: 2px; font-size: 13px; line-height: 18px; }
  .guide-table .prog-links .text-link { color: var(--link); }
  .guide-table .prog-more[open] { flex-basis: 100%; }
  .guide-table .prog-more summary { display: inline-flex; gap: 4px; list-style: none; cursor: pointer; font-weight: 700; color: var(--text-muted); }
  .guide-table .prog-more summary::-webkit-details-marker { display: none; }
  .guide-table .prog-more summary::after { content: "+"; }
  .guide-table .prog-more[open] summary::after { content: "\2212"; }
  .guide-table .prog-more p { margin-top: 2px; }
  .guide-table .src { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--border-strong); }
  .guide-table tbody tr { scroll-margin-top: 12rem; }
  .guide-table tr:target { background: color-mix(in srgb, var(--violet) 10%, transparent); }
  .guide-table .ref { color: var(--text-muted); opacity: 0.7; }
  .guide-table .txt { font-family: var(--font-display); font-size: 12px; line-height: 16px; white-space: normal; }
  .guide-table td.cost { font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; white-space: normal; }
  @media (max-width: 719.98px) {
    .guide-table thead { display: none; }
    .guide-table, .guide-table tbody { display: block; }
    .guide-panel { padding: 0 var(--space-3); }
    .guide-table tr.month, .guide-table tr.month th { display: block; height: auto; }
    .guide-table tbody tr:not(.month) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2) var(--space-3); padding: 12px 0; }
    .guide-table td { padding: 0; }
    .guide-table td.prog, .guide-table td.cost { grid-column: 1 / -1; max-width: none; }
    .guide-table td.cost { order: 1; }
    .guide-table td[data-label="Status"] { grid-column: span 2; }
    .guide-table td.num { text-align: left; }
    .guide-table td[data-label]:not(.prog)::before {
      content: attr(data-label);
      display: block;
      font-family: var(--font-display);
      font-size: 11px;
      line-height: 14px;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
  }

  /* Sign-up dates in the edition rail */
  .dl-list li { display: grid; grid-template-columns: 3.75rem minmax(0, 1fr); gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
  .dl-list li:nth-child(3n) { border-bottom-color: var(--border-strong); }
  .dl-list li:last-child { border-bottom: 0; padding-bottom: 0; }
  .dl-list .d { font-size: 14px; line-height: 24px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-heading); }
  .dl-list a { font-weight: 700; color: var(--text-heading); text-decoration: none; }
  .dl-list a:hover { color: var(--link); text-decoration: underline; }
  .dl-list .meta { display: block; }


  /* ---------- Edition page: events first ---------- */
  /* The layout follows the family events format: a hero with the
     edition's counts, the highlights, a sticky filter bar, then event
     cards grouped by day. The news column, radio and rail sit at the
     foot. Class names differ from the EventRow rules above (.ev, .days,
     .filters), which the camps guide and the back issues still use. */
  .skip-link { position: absolute; left: -999px; top: var(--space-2); z-index: 60; padding: var(--space-1) 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); font-weight: 700; }
  .skip-link:focus { left: var(--space-2); }

  .ed-hero { padding-top: var(--space-5); padding-bottom: var(--space-4); }
  @media (min-width: 768px) { .ed-hero { padding-top: var(--space-6); } }
  .ed-hero h1 a { color: inherit; text-decoration: none; }
  .ed-hero h1 a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--border-strong); }
  .hero-greet { margin-top: var(--space-3); min-height: 24px; font-family: var(--font-display); font-size: 16px; line-height: 24px; font-weight: 700; color: var(--text-heading); }
  .hero-greet .linkbtn { margin-left: var(--space-1); }
  .ed-stats { margin-top: var(--space-4); max-width: 44rem; }
  @media (max-width: 599.98px) {
    .ed-hero { padding-top: var(--space-4); padding-bottom: var(--space-3); }
    .ed-hero .dek { font-size: 17px; line-height: 24px; }
    .stats.ed-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 0; margin-top: var(--space-3); }
    .stats.ed-stats > div { padding-right: var(--space-2); }
    .stats.ed-stats > div + div { padding-left: var(--space-2); border-left: 1px solid var(--border); }
    .stats.ed-stats dt { font-size: 10px; line-height: 14px; }
    .stats.ed-stats dd { font-size: 24px; line-height: 30px; }
    .ed-hero .wx-strip { margin-top: var(--space-3); padding: var(--space-2) 12px; }
  }
  .ed-hero .wx-strip { margin-top: var(--space-4); max-width: 48rem; }

  .notes-card { margin-bottom: var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
  .notes-card > summary { display: flex; align-items: center; gap: var(--space-2); padding: 12px var(--space-3); list-style: none; cursor: pointer; font-weight: 700; color: var(--text-heading); }
  .notes-card > summary::-webkit-details-marker { display: none; }
  .notes-card > summary::after { content: "+"; margin-left: auto; font-weight: 800; color: var(--text-muted); }
  .notes-card[open] > summary::after { content: "\2212"; }
  .notes-body { padding: 0 var(--space-3) var(--space-3); font-family: var(--font-serif); font-size: 16px; line-height: 24px; max-width: 72ch; }
  .notes-body h3 { margin-top: 12px; color: var(--text-muted); }
  .notes-body ul { margin-top: var(--space-1); padding-left: 1.2em; list-style: disc; }
  .notes-body li + li { margin-top: var(--space-1); }

  /* Filter bar: sticks to the top of the screen while the agenda scrolls. */
  .agenda-filters {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: 0 -16px;
    padding: var(--space-2) 0 6px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }
  @media (min-width: 640px) { .agenda-filters { margin: 0 -24px; } }
  .chip-row { display: flex; gap: 6px; overflow-x: auto; padding: 2px 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .chip-row::-webkit-scrollbar { display: none; }
  @media (min-width: 640px) { .chip-row { padding: 2px 24px; } }
  @media (min-width: 768px) { .chip-row { flex-wrap: wrap; overflow: visible; } }
  .agenda-filters .day-chip { flex: none; align-items: center; padding: 6px 10px; white-space: nowrap; }
  .agenda-filters .day-chip .icon { width: 16px; height: 16px; }
  .day-chip:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
  .day-chip.is-past { opacity: 0.55; }
  .chip-select { width: auto; height: auto; min-height: 34px; padding-top: 4px; padding-bottom: 4px; font-family: var(--font-display); font-size: 14px; font-weight: 600; flex: none; }
  .filter-panel { display: none; margin-top: 6px; }
  .agenda-filters.is-open .filter-panel { display: block; }
  .filter-toggle[aria-expanded="true"] { border-color: var(--text-heading); }
  .filter-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--violet); color: var(--on-violet); font-size: 11px; font-weight: 800; line-height: 1; }
  @media (min-width: 768px) {
    .filter-panel { display: block; }
    .filter-toggle { display: none !important; }
  }
  .filter-status { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); padding: 4px 16px 0; font-family: var(--font-serif); font-size: 13px; line-height: 18px; color: var(--text-muted); }
  @media (min-width: 640px) { .filter-status { padding: 4px 24px 0; } }
  .filter-status .num { font-family: var(--font-mono); font-weight: 500; color: var(--text); }
  .linkbtn { padding: 0; border: 0; background: none; font: inherit; font-family: var(--font-display); font-weight: 700; color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
  .note-bar { margin-top: var(--space-3); padding: 10px var(--space-3); border-radius: var(--radius-md); background: var(--surface-sunken); font-family: var(--font-serif); font-size: 15px; line-height: 22px; }
  .empty { margin-top: var(--space-4); padding: var(--space-5) var(--space-3); text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); font-family: var(--font-serif); color: var(--text-muted); }
  .empty strong { display: block; margin-bottom: var(--space-1); font-family: var(--font-display); font-size: 18px; line-height: 24px; color: var(--text-heading); }

  /* Days and event cards */
  .agenda { padding-bottom: var(--space-3); scroll-margin-top: 0; }
  .aday { margin-top: var(--space-4); scroll-margin-top: 5rem; }
  .aday-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) 12px; margin-bottom: 12px; }
  .aday-head .datebox { width: 44px; height: 44px; }
  .aday-head .datebox .dd { font-size: 20px; line-height: 22px; }
  .aday-head .datebox .mo { font-size: 10px; line-height: 12px; }
  .aday-head .count { margin-left: auto; font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--text-muted); }
  .today-tag { background: var(--violet); color: var(--on-violet); }
  .ecards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
  @media (min-width: 640px) { .ecards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 1100px) { .ecards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

  .ecard {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 12px 12px 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    scroll-margin-top: 9rem;
  }
  .ecard:hover { border-color: var(--border-strong); }
  .ecard:target { border-color: var(--text-heading); box-shadow: inset 0 0 0 1px var(--text-heading); }
  .ecard.is-saved { border-color: var(--text-heading); }
  .ecard.is-over { opacity: 0.6; }
  .ecard-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--space-2); min-height: 28px; padding-right: 40px; }
  .ecard-when { font-family: var(--font-display); font-size: 15px; line-height: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-heading); white-space: nowrap; }
  .ecard-top .tag { padding: 2px 8px; font-size: 11px; line-height: 14px; }
  .ecard-live { font-family: var(--font-display); font-size: 12px; line-height: 16px; font-weight: 800; color: var(--text-heading); }
  .ecard-live::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; background: var(--cyan); vertical-align: 0; }
  .ecard-live.soon::before { background: var(--violet); }
  .ecard-live.over { font-weight: 600; color: var(--text-muted); }
  .ecard-live.over::before { display: none; }
  .ecard-title { margin-top: 6px; font-family: var(--font-display); font-size: 18px; line-height: 23px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-heading); text-wrap: balance; }
  .ecard-title a { color: inherit; text-decoration: none; }
  .ecard-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  .ecard-title a:focus-visible { outline: none; }
  .ecard:has(.ecard-title a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
  .ecard:hover .ecard-title a { text-decoration: underline; text-decoration-color: var(--border-strong); }
  .ecard-where { margin-top: 2px; font-family: var(--font-serif); font-size: 14px; line-height: 20px; color: var(--text-muted); }
  .ecard-where b { font-family: var(--font-display); font-weight: 700; color: var(--text); }
  .ecard-sum { margin-top: 6px; font-family: var(--font-serif); font-size: 15px; line-height: 22px; color: var(--text); }
  .ecard-meta { margin-top: 6px; font-family: var(--font-serif); font-size: 14px; line-height: 20px; color: var(--text-muted); }
  .ecard-meta .tag { margin-right: 6px; padding: 2px 8px; font-size: 11px; line-height: 14px; vertical-align: 1px; }
  .ecard-note { margin-top: 4px; font-family: var(--font-serif); font-size: 13px; line-height: 18px; font-style: italic; color: var(--text-muted); }

  /* The heart saves the event to My plan; it sits above the title's link. */
  .save { position: absolute; z-index: 2; top: 6px; right: 6px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text-muted); cursor: pointer; }
  .save:hover { background: var(--surface-sunken); color: var(--text-heading); }
  .save[aria-pressed="true"] { color: var(--text-heading); }
  .save[aria-pressed="true"] .icon path,
  .plan-item .remove .icon path { fill: currentColor; }
  .save .icon { width: 22px; height: 22px; }
  .save.pop { animation: heart-pop 0.35s ease-out; }
  @keyframes heart-pop { 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

  /* The card's buttons: calendar, directions and share. */
  .ecard-actions { position: relative; z-index: 2; display: flex; margin: 12px -12px 0; border-top: 1px solid var(--border); }
  .ecard-actions > * { flex: 1 1 0; min-width: 0; }
  .ecard .ecard-actions > * + * { border-left: 1px solid var(--border); }
  .act { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 40px; padding: 0 var(--space-2); border: 0; background: none; font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text-heading); text-decoration: none; white-space: nowrap; cursor: pointer; list-style: none; }
  .act::-webkit-details-marker { display: none; }
  .act .icon { width: 17px; height: 17px; color: var(--link); }
  .act:hover { background: var(--surface-sunken); }
  .ecard-actions > :first-child .act { border-bottom-left-radius: var(--radius-md); }
  .ecard-actions > :last-child.act, .ecard-actions > :last-child .act { border-bottom-right-radius: var(--radius-md); }
  .cal-menu { position: relative; }
  .cal-menu[open] > summary { background: var(--surface-sunken); }
  .cal-list { position: absolute; z-index: 5; left: var(--space-2); bottom: calc(100% + 4px); min-width: 13.5rem; padding: 4px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
  .cal-list a { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 10px; border-radius: var(--radius-sm); font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text-heading); text-decoration: none; }
  .cal-list a:hover { background: var(--surface-sunken); }
  .cal-list .icon { width: 17px; height: 17px; color: var(--link); }

  /* Subscribe to the calendar feed */
  .feed-card { display: grid; gap: 12px var(--space-4); align-items: center; margin-top: var(--space-5); padding: var(--space-3) var(--space-4); background: var(--surface-sunken); border-radius: var(--radius-md); }
  .feed-card p { margin-top: var(--space-1); font-size: 15px; line-height: 22px; }
  .feed-card .btn .icon { width: 17px; height: 17px; }
  @media (min-width: 900px) { .feed-card { grid-template-columns: minmax(0, 1fr) auto; } }

  /* The news column and the rail beside it */
  .news-grid { display: grid; gap: var(--space-5); margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--text-heading); }
  @media (min-width: 1024px) { .news-grid { grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--space-6); } }
  .news-col { max-width: 44rem; }
  .brief-story { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
  .brief-story:nth-of-type(3n) { border-bottom-color: var(--border-strong); }
  .brief-story:last-of-type { border-bottom: 0; }
  .brief-story .story-title { font-size: 20px; line-height: 26px; }
  .brief-story .body { font-size: 16px; line-height: 24px; }

  .sources { margin-top: var(--space-5); padding: 12px var(--space-3); background: var(--surface-sunken); border-radius: var(--radius-md); font-family: var(--font-serif); font-size: 13px; line-height: 19px; }
  .sources > summary { cursor: pointer; font-family: var(--font-display); font-size: 12px; line-height: 16px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
  .sources > summary .n { font-family: var(--font-mono); font-weight: 500; }
  .sources > p { margin: var(--space-2) 0; }
  .sources ol { padding-left: 1.4em; list-style: decimal; }
  .sources li + li { margin-top: 2px; }
  .sources a { color: var(--link); overflow-wrap: anywhere; }

  /* A short message at the bottom of the screen, such as "Link copied". */
  .toast { position: fixed; left: 50%; bottom: calc(5.5rem + env(safe-area-inset-bottom)); z-index: 60; transform: translate(-50%, 8px); opacity: 0; pointer-events: none; padding: 10px var(--space-3); border-radius: var(--radius-md); background: var(--text-heading); color: var(--bg); font-family: var(--font-display); font-size: 14px; font-weight: 700; white-space: nowrap; transition: opacity 0.2s, transform 0.2s; }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }
  @media (min-width: 1024px) { .toast { bottom: 6rem; } }

  /* A count beside My plan, filled by docs/assets/plan.js. */
  .plan-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--violet); color: var(--on-violet); font-family: var(--font-display); font-size: 11px; font-weight: 800; line-height: 1; vertical-align: 2px; }

  /* The tab bar along the bottom of a phone or tablet screen */
  .tabbar { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 45; max-width: 32rem; margin: 0 auto; background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
  .tabbar ul { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 2px; padding: 4px; }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; padding: 6px 0 4px; border: 0; border-radius: var(--radius-sm); background: none; font-family: var(--font-display); font-size: 11px; line-height: 14px; font-weight: 700; color: var(--text-muted); text-decoration: none; cursor: pointer; }
  .tabbar .icon { width: 22px; height: 22px; }
  .tabbar [aria-current] { color: var(--text-heading); background: var(--surface-sunken); }
  .tabbar .plan-count { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; }
  body.has-tabbar { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  body.has-tabbar.radio-on { padding-bottom: calc(10rem + env(safe-area-inset-bottom)); }
  @media (max-width: 1023.98px) {
    .radio-dock { bottom: calc(4.9rem + env(safe-area-inset-bottom)) !important; }
    .radio-dock:not(.is-on) { display: none !important; }
  }
  @media (min-width: 1024px) {
    .tabbar { display: none; }
    body.has-tabbar { padding-bottom: 0; }
    body.has-radio, body.has-tabbar.has-radio { padding-bottom: 7rem; }
  }

  /* My plan */
  .plan-tools { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
  .plan-tools .btn .icon { width: 17px; height: 17px; }
  .plan-list { display: grid; gap: 12px; }
  @media (min-width: 768px) { .plan-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .plan-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-2); padding: 12px 6px 6px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
  .plan-item .ecard-title { margin-top: 2px; font-size: 17px; line-height: 22px; }
  .plan-item .ecard-title a:hover { text-decoration: underline; }
  .plan-item .ecard-title a::after { display: none; }
  .plan-item .links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 6px -6px 0; }
  .plan-item .links > a, .plan-item .links > button, .plan-item .links summary { display: inline-flex; align-items: center; gap: 6px; padding: 6px var(--space-2); border: 0; border-radius: var(--radius-sm); background: none; font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text-heading); text-decoration: none; cursor: pointer; list-style: none; }
  .plan-item .links summary::-webkit-details-marker { display: none; }
  .plan-item .links > a:hover, .plan-item .links > button:hover, .plan-item .links summary:hover { background: var(--surface-sunken); }
  .plan-item .links .icon { width: 17px; height: 17px; color: var(--link); }
  .plan-item .cal-list { left: 0; }
  .plan-item .remove { align-self: start; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--radius-md); background: none; color: var(--text-heading); cursor: pointer; }
  .plan-item .remove:hover { background: var(--surface-sunken); }
  .plan-past { opacity: 0.6; }
  .plan-past .ecard-title { text-decoration: line-through; text-decoration-color: var(--border-strong); }

  /* ---------- Footer ---------- */
  .colophon { border-top: 1px solid var(--border); font-family: var(--font-serif); font-size: 14px; line-height: 20px; color: var(--text-muted); }
  .colophon a { text-decoration: underline; text-decoration-color: var(--border-strong); }
  .colophon a:hover { color: var(--link); text-decoration-color: currentColor; }

  @media print {
    .dock, .site-nav, .menu-btn, .days, .ev-cal, .ev > .chev, .toolbar, .toggle,
    .agenda-filters, .tabbar, .save, .ecard-actions, .feed-card, .toast { display: none !important; }
    body { background: #fff; color: #000; padding-bottom: 0 !important; }
  }
}
