/* Conwy Town Council colours (navy and gold from the crest), with festive touches.
   Santa's marker is navy with a gold ring; his trail is navy with a white edge so it shows
   clearly for everyone, including people with red-green colour blindness. */
:root {
  --pine: #1b2a5e;          /* crest navy: header band, selected tab */
  --pine-deep: #111c44;
  --on-pine: #ffffff;
  --on-pine-soft: #c8d1ec;
  --gold: #d4a72c;          /* crest gold: buttons, "Tonight" */
  --on-gold: #111c44;
  --gold-ink: #8a6510;      /* gold dark enough to read as text on white */
  --berry: #c8372a;         /* Santa red: marker, ribbon, error messages */
  --trail: #1b2a5e;         /* Santa's trail on the map */
  --holly: #5b8ed6;         /* crest blue: focus outlines */
  --bg: #f1f3f8;
  --surface: #ffffff;
  --ink: #141c33;
  --muted: #56607a;
  --line: #d9deea;
  --past: #8a93ab;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1330;
    --surface: #151f45;
    --ink: #e8ecf7;
    --muted: #a3add0;
    --line: #27325e;
    --past: #6f79a0;
    --gold: #e0b744;
    --gold-ink: #e6c25a;
    --berry: #e4584a;
    /* --trail stays navy: the map is always light, even in dark mode */
    --holly: #7ea8e6;
    color-scheme: dark;
  }
}

/* ---------- Festive header: navy with gently falling snow and a ribbon ---------- */
.bar {
  background-color: var(--pine);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='none' stroke='white' stroke-opacity='.28' stroke-width='1.6' stroke-linecap='round'%3E%3Cg transform='translate(25 30)'%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5M-2.5-7L0-4.5L2.5-7M-2.5 7L0 4.5L2.5 7'/%3E%3C/g%3E%3Cg transform='translate(100 75) scale(.7)'%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3C/g%3E%3Cg transform='translate(55 115) scale(.5)'%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cg fill='white' fill-opacity='.35'%3E%3Ccircle cx='15' cy='20' r='1.6'/%3E%3Ccircle cx='60' cy='45' r='1.2'/%3E%3Ccircle cx='35' cy='75' r='1.4'/%3E%3Ccircle cx='80' cy='10' r='1'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 140px 140px, 90px 90px;
  animation: snowfall 26s linear infinite;
  border-bottom: 6px solid var(--gold);
  border-image: repeating-linear-gradient(135deg, var(--berry) 0 10px, #ffffff 10px 14px, var(--gold) 14px 24px, #ffffff 24px 28px) 6;
}
@keyframes snowfall {
  from { background-position: 0 0, 30px 0; }
  to   { background-position: 0 140px, 30px 180px; }
}
@media (prefers-reduced-motion: reduce) { .bar { animation: none; } }

.mark { border: 2px solid var(--gold); }
.bar h1 { letter-spacing: .01em; }

/* Header buttons */
.lang-btn { border-color: var(--gold); }
.lang-btn:hover { background: var(--pine-deep); }
.lang-btn[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }

/* ---------- Page: a faint snowflake pattern behind the cards ---------- */
.panel, .driver {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='none' stroke='%231b2a5e' stroke-opacity='.06' stroke-width='1.6' stroke-linecap='round'%3E%3Cg transform='translate(40 40)'%3E%3Cpath d='M0-12V12M-10.4-6L10.4 6M-10.4 6L10.4-6M-3-9L0-6L3-9M-3 9L0 6L3 9'/%3E%3C/g%3E%3Cg transform='translate(120 115) scale(.7)'%3E%3Cpath d='M0-12V12M-10.4-6L10.4 6M-10.4 6L10.4-6'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  .panel, .driver {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='none' stroke='white' stroke-opacity='.06' stroke-width='1.6' stroke-linecap='round'%3E%3Cg transform='translate(40 40)'%3E%3Cpath d='M0-12V12M-10.4-6L10.4 6M-10.4 6L10.4-6M-3-9L0-6L3-9M-3 9L0 6L3 9'/%3E%3C/g%3E%3Cg transform='translate(120 115) scale(.7)'%3E%3Cpath d='M0-12V12M-10.4-6L10.4 6M-10.4 6L10.4-6'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  }
}

/* Cards get a thin gold top edge, like a gift tag */
.card { border-top: 3px solid var(--gold); }

/* ---------- Buttons, labels, timetable ---------- */
.btn { background: var(--gold); color: var(--on-gold); }
.btn.go { background: var(--ok); color: #fff; }
.btn.secondary { background: transparent; color: var(--ink); }
.chip { background: var(--berry); color: #fff; }
.next-time { color: var(--gold-ink); }
.stops time { color: var(--pine); }
@media (prefers-color-scheme: dark) { .stops time { color: var(--gold-ink); } }
.stops li.next { background: color-mix(in srgb, var(--gold) 18%, transparent); outline: 2px solid var(--gold); outline-offset: -2px; }
.stops li.next span::after { color: var(--gold-ink); }
.linkbtn { color: var(--gold-ink); }

/* Santa marker: crest navy with a gold ring */
.sleigh-pin { background: #1b2a5e; border-color: #d4a72c; }
