/* Brussels 2026: Art Nouveau curves, comic-strip ink, iris blue & frites gold */
:root {
  --paper: #fbf7ef;
  --card: #ffffff;
  --ink: #15182b;
  --muted: #676b80;
  --line: #e7e1d3;
  --blue: #1f3fa6;        /* Brussels iris blue */
  --blue-soft: #e7ecfb;
  --gold: #f5b700;        /* frites & gables */
  --red: #e0413a;         /* Belgian red */
  --moss: #2f7d5b;        /* Horta green */
  --sun: #ffd24d;
  --sun2: #ff8a5c;
  --night: #121633;
  --night2: #2a1f5c;
  --r: 20px;
  --shadow: 0 1px 2px rgb(21 24 43 / .06), 0 8px 24px -8px rgb(21 24 43 / .14);
  --display: "Fraunces", Georgia, serif;
  --body: "Inter Tight", system-ui, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1020; --card: #171a30; --ink: #eef0fa; --muted: #9a9fb8; --line: #2a2e4a;
    --blue: #8ea8ff; --blue-soft: #1f2748; --sun: #ffb938; --sun2: #e2566b;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px -10px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px);
  background-size: 22px 22px; /* comic halftone */
}
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h3 { font-size: 1.15rem; margin-bottom: .35rem; }
a { color: var(--blue); text-underline-offset: 3px; }
p { margin: .3rem 0; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; color: var(--red); margin: 0 0 .3rem; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .7rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.brand svg { width: 34px; height: 34px; color: var(--blue); }
.skyline .mp { fill: var(--ink); }
.skyline .mp .limb { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skyline .stream { fill: none; stroke: #4aa8ff; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 2.2 1.8; }
@media (prefers-reduced-motion: no-preference) {
  .skyline .stream { animation: flow .9s linear infinite; }
  @keyframes flow { to { stroke-dashoffset: -8; } }
}
.brand .core { fill: var(--gold); }
.brand b { color: var(--gold); padding: 0 .15rem; }
.nav { display: flex; gap: .2rem; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; padding: .4rem .8rem; border-radius: 999px; }
.nav a:hover { background: var(--blue-soft); color: var(--blue); }
.controls { display: flex; align-items: center; gap: .4rem; }
.seg.lang { margin-left: 0; padding: 2px; gap: 1px; }
.seg.lang button { font-size: .72rem; padding: .28rem .55rem; letter-spacing: .03em; }
@media (max-width: 820px) { .controls { margin-left: auto; } }
@media (max-width: 420px) { .top { gap: .5rem; } .controls { gap: .25rem; } .controls .btn { padding-left: .6rem; padding-right: .6rem; } .brand span { font-size: 1rem; } }

/* ---------- Buttons ---------- */
.btn, .btn-small {
  font: 600 .9rem var(--body); cursor: pointer; border-radius: 999px;
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: .5rem 1.1rem; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover, .btn-small:hover { transform: translateY(-1px); box-shadow: 3px 3px 0 var(--gold); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-small { padding: .25rem .75rem; font-size: .8rem; background: var(--card); color: var(--ink); }
.btn-small:hover { background: var(--gold); color: #15182b; border-color: #15182b; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; gap: 2rem;
  max-width: 1240px; margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem) 0;
}
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); font-weight: 700; }
.hero h1 em { font-style: italic; color: var(--blue); position: relative; }
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .18em; z-index: -1;
  background: var(--gold); border-radius: 99px; transform: skew(-12deg);
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34rem; margin: 1.2rem 0 1.6rem; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; }
.hero-cta .label { font-weight: 600; }
#days { display: inline-flex; padding: 5px; gap: 4px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px; box-shadow: 4px 4px 0 var(--ink); }
#days button { font: 700 .95rem var(--body); border: 0; background: transparent; color: var(--ink); padding: .55rem 1.2rem; border-radius: 999px; cursor: pointer; transition: background .2s; }
#days button:hover { background: var(--blue-soft); }
#days button.active { background: var(--blue); color: #fff; }
.stats { display: flex; gap: 2rem; list-style: none; padding: 0; margin: 2rem 0 0; }
.stats li { color: var(--muted); font-size: .88rem; }
.stats b { display: block; font: 700 2rem var(--display); color: var(--ink); }
.skyline { width: 100%; height: auto; display: block; }
.skyline .city { fill: var(--ink); }
.skyline .win { fill: var(--paper); }
.skyline .gold, .skyline .atom-balls .core { fill: var(--gold); }
.skyline .atom line { stroke: var(--ink); stroke-width: 4; }
.skyline .atom .column { stroke-width: 7; }
.skyline .atom-balls circle { fill: var(--card); stroke: var(--ink); stroke-width: 4.5; }
@media (prefers-reduced-motion: no-preference) {
  .skyline .sun { animation: float 7s ease-in-out infinite; }
  @keyframes float { 50% { transform: translateY(-6px); } }
}
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .skyline { max-width: 460px; margin: 0 auto; } .nav { display: none; } }

/* ---------- Layout & sections ---------- */
.layout, .wide { max-width: 1240px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem); }
.layout > *, .wide > * { min-width: 0; } /* grid/flex children may shrink below their content (swipe rows scroll instead of widening the page) */
.layout {
  display: grid; gap: 2rem; grid-template-columns: 1fr;
  padding-top: 2.5rem; padding-bottom: 2rem;
  border-top: 3px solid var(--ink);
}
@media (min-width: 960px) { .layout { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); } }
.wide section { margin: 3.5rem 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.sec-head .num {
  font: 700 1.1rem var(--display); display: grid; place-items: center;
  width: 3rem; height: 3rem; border-radius: 50%; flex: none;
  background: var(--gold); color: #15182b; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}

.card, .panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 1.2rem 1.3rem;
}
.panel { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; }
.panel h2 { font-size: 1.4rem; margin-bottom: .8rem; }

/* ---------- Schedule timeline ---------- */
.day { margin-bottom: 1.5rem; padding: 1.4rem 1.4rem 1.4rem 1.2rem; }
.day h2 {
  display: inline-flex; align-items: center; gap: .6rem; font-size: 1.5rem; margin-bottom: 1rem;
}
.day h2::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); box-shadow: 16px 0 0 var(--gold), 32px 0 0 var(--red); margin-right: 34px; }
#schedule .item {
  position: relative; margin-left: 1.6rem; padding: .9rem 2.6rem .9rem 1.1rem;
  border-radius: 14px; background: var(--paper); border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
}
#schedule .item:hover { transform: translateX(3px); box-shadow: var(--shadow); }
#schedule .item::before { /* timeline dot */
  content: ""; position: absolute; left: -1.6rem; top: 1.15rem; width: 14px; height: 14px; margin-left: -1px;
  border-radius: 50%; background: var(--card); border: 3px solid var(--blue);
}
.day { /* timeline rail behind the dots */
  background: linear-gradient(var(--line), var(--line)) no-repeat calc(1.2rem + 9px) 4.6rem / 2px calc(100% - 7rem), var(--card);
}
.item .time {
  display: inline-block; font: 700 .78rem var(--body); letter-spacing: .03em;
  background: var(--blue); color: #fff; padding: .15rem .6rem; border-radius: 999px; margin: 0 .6rem .3rem 0;
}
.item .title { font: 700 1.08rem var(--display); }
.item .meta { color: var(--muted); font-size: .86rem; margin-top: .15rem; }
.item .remove {
  position: absolute; top: .7rem; right: .7rem; width: 28px; height: 28px; padding: 0;
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--muted); font-size: .75rem; box-shadow: none;
}
.item .remove:hover { background: var(--red); border-color: var(--red); color: #fff; transform: rotate(90deg); box-shadow: none; }
.nearby { font-size: .84rem; color: var(--moss); font-weight: 500; margin-top: .45rem; }
.nearby:empty { display: none; }
@media (prefers-color-scheme: dark) { .nearby { color: #6fd0a3; } }

/* View switch: Detailed / Compact */
.seg { margin-left: auto; display: inline-flex; padding: 4px; gap: 3px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px; }
.seg button { font: 700 .82rem var(--body); border: 0; background: transparent; color: var(--ink); padding: .4rem .9rem; border-radius: 999px; cursor: pointer; }
.seg button.active { background: var(--ink); color: var(--paper); }

/* Compact = the timeline without photos/blurbs */
#schedule.compact .media, #schedule.compact .desc { display: none; }

/* Detailed = photo card */
#schedule.detailed .item { display: grid; grid-template-columns: 210px 1fr; gap: 1.1rem; padding: .8rem 2.8rem .8rem .8rem; }
#schedule.detailed .item::before { top: 1.6rem; }
.media {
  position: relative; border-radius: 12px; overflow: hidden; min-height: 150px; aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--blue-soft), color-mix(in srgb, var(--gold) 35%, var(--paper)));
}
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s, transform .6s; }
.media img[src] { opacity: 1; }
#schedule .item:hover .media img { transform: scale(1.05); }
.media.noimg img { display: none; }
.media.noimg::after { content: attr(data-icon); position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; color: var(--blue); opacity: .6; }
.evening-item .media { background: linear-gradient(135deg, #3b2c80, #1b1f45); }
.evening-item .media.noimg::after { color: var(--gold); }
.desc { font-size: .93rem; color: var(--ink); margin: .35rem 0 .2rem; max-width: 60ch; }
.evening-item .desc { color: #e6e8f7; }
@media (max-width: 640px) {
  #schedule.detailed .item { grid-template-columns: 1fr; }
  .media { aspect-ratio: 16 / 9; min-height: 0; }
}

.leg {
  position: relative; margin: .35rem 0 .35rem 1.6rem; padding: .35rem .8rem;
  font-size: .8rem; font-weight: 600; color: var(--muted);
  display: inline-block; background: var(--card); border: 1.5px dashed var(--line); border-radius: 999px;
}

.evening-item {
  color: #fff; border-color: transparent !important;
  background-image: radial-gradient(#fff 1px, transparent 1.5px), linear-gradient(135deg, var(--night), var(--night2)) !important;
  background-size: 40px 40px, auto !important;
}
.evening-item::before { border-color: var(--gold) !important; background: var(--night) !important; }
.evening-item .time { background: var(--gold); color: #15182b; }
.evening-item .meta { color: #c8cbe6; }
.evening-item a { color: var(--sun); }

/* Cards with no leg/gap row between them (e.g. a meal slot right after a stop) need breathing room */
#schedule .item + .item { margin-top: .75rem; }

/* Lunch & dinner: empty slot + chosen restaurant */
#schedule .meal-slot {
  display: block !important; border: 2px dashed var(--gold);
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--gold) 9%, var(--card)) 0 10px, var(--card) 10px 20px);
}
#schedule .meal-slot::before, #schedule .meal-item::before { border-color: var(--gold); }
.meal-slot .time, .meal-item .time { background: var(--gold); color: #15182b; }
.avg { display: inline-block; margin-left: .5rem; font-size: .75rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .05rem .5rem; }
.slot-hint { font-size: .88rem; color: var(--muted); margin: .45rem 0 .5rem; }
.slot-hint b { color: var(--ink); }
.slot-picks { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.pick {
  font: 600 .84rem var(--body); cursor: pointer; padding: .35rem .8rem; border-radius: 999px;
  border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); transition: all .15s;
}
.pick small { font-weight: 500; color: var(--muted); }
.pick:hover { background: var(--gold); color: #15182b; box-shadow: 3px 3px 0 var(--ink); transform: translateY(-1px); }
.pick:hover small { color: #15182b; }
.pick-more { font-size: .84rem; font-weight: 700; margin-left: .3rem; }
.pick-walk { display: block; font-size: .74rem; font-weight: 600; color: var(--blue); margin-top: .1rem; }
.pick { border-radius: 14px; text-align: left; }
.walk-from { font-size: .82rem !important; font-weight: 600; color: var(--blue) !important; }
.gap {
  margin: .35rem 0 .35rem 1.6rem; padding: .35rem .8rem; display: inline-block;
  font-size: .8rem; font-weight: 600; color: var(--moss);
  background: color-mix(in srgb, var(--moss) 9%, var(--card)); border-radius: 999px;
}
@media (prefers-color-scheme: dark) { .gap { color: #6fd0a3; } }
.meal-item { border-left: 4px solid var(--gold) !important; }
.meal-tag { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin-bottom: .15rem; }
.meal-item .media { background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 40%, var(--paper)), color-mix(in srgb, var(--red) 25%, var(--paper))); }

/* Restaurants: add-to-schedule */
.hint {
  display: flex; gap: .8rem; align-items: flex-start; margin: 0 0 1.2rem; padding: .9rem 1.1rem;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--gold);
  font-size: .95rem; color: var(--muted); max-width: 60rem;
}
.hint > span:first-child { font-size: 1.5rem; line-height: 1; }
.hint b { color: var(--ink); }
.add-meal {
  appearance: none; width: 100%; margin-top: .7rem; cursor: pointer;
  font: 700 .86rem var(--body); color: var(--ink); background: var(--card);
  border: 1.5px solid var(--ink); border-radius: 999px; padding: .5rem 1rem; text-align: center;
  transition: all .15s;
}
.add-meal:hover, .add-meal:focus-visible { background: var(--gold); color: #15182b; box-shadow: 3px 3px 0 var(--ink); outline: none; }
.in-plan { color: var(--moss) !important; font-weight: 700; font-size: .82rem !important; margin-top: .5rem !important; }
#restaurants .card.planned { outline: 2px solid var(--moss); outline-offset: -2px; }
@media (prefers-color-scheme: dark) { .in-plan { color: #6fd0a3 !important; } }

/* Suggestions */
#suggestions { display: grid; gap: .6rem; }
#suggestions .item { padding: .8rem .9rem; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
#suggestions .item .title { display: block; font-size: 1rem; }
.type-badge {
  display: inline-block; margin-bottom: .35rem; padding: .12rem .55rem; border-radius: 999px;
  font: 700 .7rem var(--body); letter-spacing: .05em; text-transform: uppercase;
  background: var(--blue-soft); color: var(--blue);
}
button.type-badge { border: 0; cursor: pointer; transition: background .15s, color .15s; }
button.type-badge:hover, button.type-badge:focus-visible { background: var(--blue); color: var(--paper); }
.sug-filter { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .8rem; }
.chip.chip-sm { font-size: .75rem; padding: .25rem .6rem; }
.chip.chip-sm.active { box-shadow: 2px 2px 0 var(--gold); }
#schedule .type-badge { display: table; } /* own line above the time pill */
#schedule.compact .type-badge { display: none; }
#suggestions .item .muted { font-size: .8rem; }
#suggestions .item div { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }

/* ---------- Filters & card grids ---------- */
#cuisine-filter, #evening-filter, #markets-filter { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.3rem; }
.chip {
  font: 600 .88rem var(--body); cursor: pointer; padding: .45rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); transition: all .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 3px 3px 0 var(--gold); }

#restaurants, #evening, #tips, #markets { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
#restaurants .card, #evening .card, #tips .card, #markets .card { position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
#restaurants .card:hover, #evening .card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -16px rgb(21 24 43 / .35); }
#restaurants .card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--ink) 33%, var(--gold) 33% 66%, var(--red) 66%); }
.badge {
  display: inline-block; font: 700 .72rem var(--body); letter-spacing: .05em; text-transform: uppercase;
  padding: .2rem .6rem; border-radius: 999px; background: var(--blue-soft); color: var(--blue); margin-bottom: .3rem;
}
.card p { font-size: .9rem; color: var(--muted); }

/* Day header with editable start time */
.day-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 1rem; }
.day-head h2 { margin-bottom: 0 !important; }
.day-start { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 700; color: var(--muted); }
.day-start-input {
  font: 700 .95rem var(--body); color: var(--ink); background: var(--paper); cursor: pointer;
  border: 1.5px solid var(--ink); border-radius: 999px; padding: .3rem .8rem; box-shadow: 3px 3px 0 var(--gold);
}
.day-start-input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pick.hotel { margin-left: .4rem; background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.pick.hotel:hover { background: var(--blue); color: #fff; }
.meal-slot .slot-hint + .slot-hint { margin-top: -.2rem; }

/* Restaurants: tabs, sort + paging */
.rest-tabs { margin: 0 0 1.1rem; }
.rest-tabs button { font-size: .9rem; padding: .5rem 1.1rem; }
.opens { font-size: .82rem !important; }
.rest-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; margin: -.3rem 0 1rem; font-size: .9rem; }
.sort { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; }
.sort select {
  appearance: none; font: 600 .88rem var(--body); color: var(--ink); cursor: pointer;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2315182b'/%3E%3C/svg%3E") no-repeat right .9rem center;
  border: 1.5px solid var(--ink); border-radius: 999px; padding: .45rem 2.2rem .45rem 1rem;
}
.sort select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: 1.4rem; }
.pager:empty { display: none; }
.pager .page-info { align-self: center; padding: 0 .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) { .pager { flex-wrap: nowrap; justify-content: space-between; align-items: center; } }
.page-btn {
  font: 700 .88rem var(--body); min-width: 2.4rem; padding: .45rem .8rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
}
.page-btn:hover:not(:disabled) { border-color: var(--ink); }
.page-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 3px 3px 0 var(--gold); }
.page-btn:disabled { opacity: .4; cursor: default; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; white-space: nowrap; line-height: 1.2; }
/* prev/next chevrons drawn with borders: same on every device (our font has no ← →) */
.page-prev::before, .page-next::after { content: ""; width: .42em; height: .42em; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(45deg); margin-left: .15em; }
.page-next::after { transform: rotate(-135deg); margin: 0 .15em 0 0; }
.night .page-btn { background: rgb(255 255 255 / .08); color: #fff; border-color: rgb(255 255 255 / .3); }
.night .page-btn:hover:not(:disabled) { border-color: #fff; background: rgb(255 255 255 / .14); }
.night .page-btn:disabled { opacity: .35; }

/* Night section */
.night {
  background: radial-gradient(circle at 85% 10%, #6a3fd1 0, transparent 40%), linear-gradient(160deg, var(--night), var(--night2));
  color: #fff; border-radius: 32px; padding: clamp(1.4rem, 4vw, 2.6rem);
  margin-left: calc(-1 * clamp(0rem, 2vw, 1.5rem)) !important; margin-right: calc(-1 * clamp(0rem, 2vw, 1.5rem)) !important;
}
.night .eyebrow { color: var(--sun); }
.night .chip { background: rgb(255 255 255 / .08); color: #fff; border-color: rgb(255 255 255 / .2); }
.night .chip.active { background: var(--gold); color: #15182b; border-color: var(--gold); box-shadow: none; }
.night .card { background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .12); color: #fff; backdrop-filter: blur(6px); box-shadow: none; }
.night .card p { color: #c8cbe6; }
.night .badge { background: var(--gold); color: #15182b; }
.night a { color: var(--sun); }
.night .btn-small { background: transparent; color: #fff; border-color: rgb(255 255 255 / .4); margin-top: .3rem; }
.night .btn-small:hover { background: var(--gold); color: #15182b; border-color: var(--gold); }

/* Tips & fares */
#tips .card { border-left: 5px solid var(--gold); }
#tips .card:nth-child(3n+2) { border-left-color: var(--blue); }
#tips .card:nth-child(3n) { border-left-color: var(--red); }
.tip h3 { display: flex; align-items: center; gap: .55rem; margin-bottom: .7rem; }
.tip-icon { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; flex: none; border-radius: 50%; background: var(--blue-soft); font-size: 1.05rem; }
.tip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.tip li { position: relative; padding-left: 1.2rem; font-size: .9rem; line-height: 1.45; color: var(--muted); }
.tip li::before { content: ""; position: absolute; left: .15rem; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.tip:nth-child(3n+2) li::before { background: var(--blue); }
.tip:nth-child(3n) li::before { background: var(--red); }
.tip li b { color: var(--ink); font-weight: 700; }
.table-wrap { margin-top: 1.4rem; overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
#fares { border-collapse: collapse; width: 100%; font-size: .92rem; }
#fares th { text-align: left; font: 700 .75rem var(--body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: .9rem 1.1rem; border-bottom: 2px solid var(--ink); }
#fares td { padding: .75rem 1.1rem; border-bottom: 1px solid var(--line); }
#fares td:nth-child(2) { font-weight: 700; color: var(--blue); white-space: nowrap; }
#fares tr:last-child td { border-bottom: 0; }
#fares tbody tr:hover { background: var(--blue-soft); }

.foot { text-align: center; color: var(--muted); font-size: .82rem; padding: 2rem 1rem 3rem; }
.foot p { margin: .4rem 0; }

/* Tip buttons (Buy Me a Coffee) */
[hidden] { display: none !important; }
.tip-line {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem 1rem;
  margin: .5rem 0 0; padding: 1rem 1.2rem; border-radius: var(--r);
  border: 1.5px dashed var(--line); color: var(--muted); font-weight: 600;
}
.tip-btn {
  display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
  font: 700 .92rem var(--body); color: #15182b; background: var(--gold);
  border: 1.5px solid var(--ink); border-radius: 999px; padding: .5rem 1.1rem;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.tip-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.tip-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.tip-btn-small { font-size: .82rem; padding: .3rem .85rem; box-shadow: 2px 2px 0 var(--ink); margin-left: .3rem; }
.foot-tip { font-size: .9rem; font-weight: 600; }
@media (prefers-color-scheme: dark) { .tip-btn { border-color: #15182b; } }

/* Scroll-driven reveal (2026 CSS), progressive */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .card, .sec-head { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
    @keyframes rise { from { opacity: 0; transform: translateY(24px); } }
  }
}

/* ================= Polish pass v2 ================= */
body { overflow-x: clip; } /* full-bleed bands below never cause sideways scroll */

/* Header: current section + compact controls on phones */
.nav a.active { background: var(--ink); color: var(--paper); }
@media (max-width: 640px) {
  .top { gap: .5rem; padding-block: .55rem; }
  .brand span { font-size: 1rem; }
  #print-btn, #reset-btn { font-size: 0; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; }
  #print-btn::before { content: "🖨️"; font-size: 1rem; }
  #reset-btn::before { content: "↺"; font-size: 1.25rem; font-weight: 700; line-height: 1; }
}

/* Phones: the header scrolls away (brand + language stay at the top of the page); the section tabs stick.
   One section at a time (index.html sets body[data-tab] + .on on the matching [data-pane]). */
.tabs { display: none; }
@media (max-width: 640px) {
  .top { position: static; backdrop-filter: none; background: var(--paper); border-bottom: 0; }
  .tabs {
    position: sticky; top: 0; z-index: 10; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none;
    padding: .45rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 85%, transparent); backdrop-filter: blur(14px) saturate(1.4);
  }
  .tabs a { flex: 1 0 auto; text-align: center; text-decoration: none; color: var(--ink); font-weight: 650; font-size: .9rem; padding: .45rem .7rem; border-radius: 999px; }
  .tabs a.active { background: var(--ink); color: var(--paper); }
  body[data-tab] [data-pane]:not(.on) { display: none; }
  [data-pane], [data-pane] [id] { scroll-margin-top: 64px; } /* jumps land below the sticky tabs */
  /* nearby restaurants live in the sight popup on phones */
  #schedule .nearby { display: none; }
  /* filter chips: one swipeable row instead of a wall of chips */
  #cuisine-filter, #evening-filter, #markets-filter, .sug-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * clamp(1rem, 4vw, 3rem)); padding-inline: clamp(1rem, 4vw, 3rem); }
  #cuisine-filter .chip, #evening-filter .chip, #markets-filter .chip, .sug-filter > * { flex: none; }
  /* compact schedule on phones: restaurant picks in one swipeable row; a sight's hours/price are in its popup */
  .slot-picks { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .slot-picks .pick { flex: none; max-width: 70vw; }
  #schedule.compact .item:has(.title-btn) .meta { display: none; }
}
@media print { .tabs { display: none; } body[data-tab] [data-pane]:not(.on) { display: revert; } }

/* Sight names open the info popup too (the only way in, in the compact view without photos) */
.title-btn { all: unset; cursor: pointer; font: inherit; }
.title-btn .info-i {
  display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; margin-left: .3em; vertical-align: .1em;
  border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-family: var(--sans, system-ui); font-size: .7em; font-weight: 700;
}
.title-btn:hover .info-i, .title-btn:focus-visible .info-i { background: var(--blue); color: #fff; }
.title-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* Day cards: a colour per day (blue · red · gold) on the header band and timeline dots */
.day { --day: var(--blue); overflow: hidden; }
.day-2 { --day: var(--red); }
.day-3 { --day: var(--gold); }
.day-head {
  position: relative; margin: -1.4rem -1.4rem 1.2rem -1.2rem; padding: 1.1rem 1.4rem 1rem 1.6rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--day) 13%, var(--card)), var(--card) 80%);
  border-bottom: 1px solid var(--line);
}
.day-head::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--day); }
.day-sum { flex-basis: 100%; margin: 0; font-size: .86rem; font-weight: 600; color: var(--muted); }
#schedule .day .item:not(.meal-item):not(.meal-slot):not(.evening-item)::before { border-color: var(--day); }

.overbooked {
  margin: 1rem 0 0; padding: .75rem 1rem; border-radius: 12px; font-size: .88rem; font-weight: 600;
  color: #8a1c17; background: color-mix(in srgb, var(--red) 12%, var(--card)); border: 1.5px solid color-mix(in srgb, var(--red) 45%, transparent);
}
@media (prefers-color-scheme: dark) { .overbooked { color: #ffb4ae; } }

/* Moving stops: ⠿ drag handle, ↑ ↓, day menu (subtle until hovered/focused on desktop; always visible on touch) */
.move-ctl { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; justify-content: flex-end; margin-top: .55rem; }
.drag-handle {
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  display: grid; place-items: center; width: 30px; height: 28px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 1.05rem; line-height: 1;
}
.drag-handle:hover { border-color: var(--ink); color: var(--ink); }
.move-ctl .mv { width: 30px; height: 28px; padding: 0; border-radius: 8px; border-color: var(--line); font-size: .9rem; }
.move-day { font: 600 .78rem var(--body); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .55rem; cursor: pointer; }
.move-day:focus-visible, .move-ctl .mv:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
@media (hover: hover) {
  #schedule .move-ctl { opacity: .45; transition: opacity .15s; }
  #schedule .item:hover .move-ctl, #schedule .item:focus-within .move-ctl { opacity: 1; }
}
.evening-item .drag-handle, .evening-item .move-day { background: rgb(255 255 255 / .1); color: #fff; border-color: rgb(255 255 255 / .25); }
#schedule .item.dragging { z-index: 20; opacity: .93; box-shadow: 0 22px 44px -14px rgb(0 0 0 / .4); transition: none; cursor: grabbing; }
body.is-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.drop-line { height: 4px; margin: .45rem 0 .45rem 1.6rem; border-radius: 4px; background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 28%, transparent); }

/* Sight photos open an info popup */
#schedule .media[data-sight] { cursor: zoom-in; }
#schedule .media[data-sight]::before {
  content: "ⓘ"; position: absolute; right: .45rem; bottom: .45rem; z-index: 1; display: grid; place-items: center;
  width: 1.7rem; height: 1.7rem; border-radius: 50%; background: rgb(21 24 43 / .72); color: #fff; font-size: .95rem;
  opacity: .85; transition: opacity .15s, transform .15s;
}
#schedule .media[data-sight]:hover::before, #schedule .media[data-sight]:focus-visible::before { opacity: 1; transform: scale(1.08); }
#schedule .media[data-sight]:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
#schedule.compact .media { display: none; } /* (compact view has no photos) */
.pcredit {
  position: absolute; left: 0; bottom: 0; z-index: 1; max-width: calc(100% - 2.6rem); padding: .15rem .45rem;
  border-top-right-radius: 6px; background: rgb(21 24 43 / .6); color: #fff; font-size: .62rem; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media.noimg .pcredit { display: none; }

.sight-dlg {
  width: min(680px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: 22px;
  background: var(--card); color: var(--ink); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .5); overflow: auto;
}
.sight-dlg::backdrop { background: rgb(21 24 43 / .55); backdrop-filter: blur(3px); }
@media (prefers-reduced-motion: no-preference) {
  .sight-dlg[open] { animation: dlg-in .22s cubic-bezier(.2, .8, .2, 1); }
  @keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
}
.dlg-body { position: relative; }
.dlg-close {
  position: absolute; top: .8rem; right: .8rem; z-index: 2; width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font-size: .95rem; box-shadow: 3px 3px 0 var(--gold);
}
.dlg-close:hover { background: var(--gold); color: #15182b; }
.dlg-photo { margin: 0; }
.dlg-photo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.dlg-credit { margin: 0; padding: .4rem 1.4rem; font-size: .74rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.dlg-content { padding: 1.2rem 1.4rem 1.5rem; }
.dlg-content h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin: .2rem 0 .4rem; }
.dlg-content h3 { font-size: 1.05rem; margin: 1.2rem 0 .45rem; }
.dlg-lede { color: var(--muted); font-size: 1rem; }
.dlg-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; margin: 1rem 0 0; }
.dlg-facts div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .55rem .75rem; }
.dlg-facts dt { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dlg-facts dd { margin: .15rem 0 0; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.dlg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .9rem; }
.dlg-list li { padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.linklike { font: 700 .92rem var(--body); color: var(--blue); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.4rem; }

/* Plan changes animate (schedule.js wraps them in view transitions) */
::view-transition-group(*) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }

/* Restaurants: a lighter band to break up the long cream page */
#restaurants-sec { position: relative; padding-block: 2.8rem; }
#restaurants-sec::before {
  content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw);
  background: color-mix(in srgb, var(--card) 65%, var(--paper)); border-block: 1px solid var(--line);
}

/* Restaurant cards: cuisine icon, price scale, button aligned to the bottom */
.rcard { display: flex; flex-direction: column; }
.rc-top { display: flex; justify-content: space-between; align-items: center; margin: .15rem 0 .65rem; }
.rc-ico { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--blue-soft); font-size: 1.3rem; }
.rc-price { font: 700 .95rem var(--body); letter-spacing: .08em; color: color-mix(in srgb, var(--muted) 40%, transparent); }
.rc-price b { color: var(--ink); }
.rc-area { font-size: .86rem !important; }
.rcard .badge { align-self: flex-start; }
.rcard .add-meal { margin-top: auto; width: auto; align-self: flex-start; padding: .4rem 1rem; font-size: .82rem; border-color: var(--line); background: var(--paper); }
.rcard .add-meal:hover, .rcard .add-meal:focus-visible { border-color: var(--ink); }
.rcard > p:has(+ .add-meal) { margin-bottom: .8rem; }

/* Footer: dark ink band with gold accents */
.foot { background: #15182b; color: #c8cbe6; padding: 2.4rem 1rem 2.8rem; margin-top: 3.5rem; border-top: 4px solid var(--gold); }
.foot a:not(.tip-btn) { color: #ffd24d; }
.foot .foot-tip { color: #fff; font-size: 1rem; }
.foot .tip-btn { border-color: #fff; box-shadow: 3px 3px 0 #000; }
@media (prefers-color-scheme: dark) { .foot { background: #07080f; } }

/* ---------- Print: schedule only ---------- */
@media print {
  @page { margin: 12mm; }
  .top, .hero, .side-col, #restaurants-sec, #evening-sec, #tips-sec, #markets-sec, .foot, button, .remove, #view, .sec-head .num { display: none !important; }
  body { background: #fff; background-image: none; color: #000; font-size: 10.5pt; }
  .layout { display: block; border: 0; padding: 0; }
  .sec-head { margin-bottom: .5rem; }
  .card, .item, .leg, .gap, .evening-item, .sec-head { background: #fff !important; color: #000 !important; box-shadow: none !important; animation: none !important; opacity: 1 !important; transform: none !important; }
  /* A day is usually taller than a page: let it flow across pages, keep single stops intact. */
  .day { break-inside: auto; border: 0 !important; padding: 0 !important; background: none !important; margin-bottom: 1.2rem; }
  .day-head { break-after: avoid; margin: 0 0 .5rem; padding: 0; background: none; border: 0; }
  .day-head::before { display: none; }
  .day-start-input { border: 0; box-shadow: none; padding: 0; background: none; font: inherit; }
  .item { border: 1px solid #999 !important; break-inside: avoid; }
  .item *, .leg { color: #000 !important; }
  .item .time { background: none; border: 1px solid #000; }
  #schedule.detailed .item { grid-template-columns: 120px 1fr; }
  .media { min-height: 0; } .media.noimg { display: none; }
  .media img { opacity: 1; }
  .slot-picks, .slot-hint, .tip-line, .move-ctl, .drop-line { display: none !important; }
  #schedule .meal-slot { background: #fff !important; border: 1px dashed #999 !important; }
}

/* ---------- Markets ---------- */
.chip.today { position: relative; }
.chip.today::after { content: ""; position: absolute; top: 5px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.mcard { border-top: 5px solid var(--gold); }
.mcard h3 { margin-bottom: .4rem; }
.mcard p { margin: .3rem 0; overflow-wrap: anywhere; }
.badge-open { background: var(--moss); color: #fff; }
.badge-season { background: var(--gold); color: #15182b; }
.m-unc { font-size: .78rem !important; font-style: italic; opacity: .85; }
.markets-more { margin-top: 1.4rem; font-weight: 700; }

/* Google Maps links: a small map-pin icon in the Maps colours (drawn here, not Google's file) */
.gm { display: inline-flex; align-items: center; gap: .4em; }
.gm::before {
  content: ""; flex: none; width: .95em; height: 1.35em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 34'%3E%3CclipPath id='p'%3E%3Cpath d='M12 0C5.4 0 0 5.2 0 11.6 0 20 12 33 12 33s12-13 12-21.4C24 5.2 18.6 0 12 0z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23p)'%3E%3Cpath fill='%2334A853' d='M-1-1h26v36H-1z'/%3E%3Cpath fill='%23FBBC04' d='M-1-1 25 25H-1z'/%3E%3Cpath fill='%23EA4335' d='M-1-1h14L-1 13z'/%3E%3Cpath fill='%234285F4' d='M-1-1h26v26z'/%3E%3Cpath fill='%231A73E8' d='M12-1h13v12z'/%3E%3C/g%3E%3Ccircle cx='12' cy='11.5' r='4.3' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn.gm { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; box-shadow: 0 1px 2px rgb(0 0 0 / .08); text-decoration: none; }
.btn.gm:hover { background: #f8f9fa; }
.btn.gm::before { width: 1.05em; height: 1.5em; }
.night .pager .page-info { color: rgb(255 255 255 / .8); }
