/* Liège après-midi — brand v3, anchored to the team's reference (a city-walk app):
   soft sky-tinted page, chunky serif titles, pill controls, rounded floating cards,
   one ink action. Gold = dry / outdoor, blue = rain / covered.
   Type: Young Serif for titles (the reference's display serif),
         Hanken Grotesk for controls and reading. */
@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&family=Young+Serif&display=swap");

:root {
  --ink: #17181c;
  --ink-2: #62666f;
  --paper: #ffffff;
  --wash: #e9f0fb;     /* sky tint */
  --line: #e3e6ec;
  --gold: #ffd100;     /* dry / outdoor */
  --rain: #2f6fd0;     /* rain / covered */
  --rain-wash: #e4edfb;
  --red: var(--ink);   /* legacy name: the action colour is ink */
  --red-dark: #000000;
  --r: 20px;           /* cards and panels */
  --pill: 999px;       /* chips, buttons, tags */
  --shadow: 0 8px 28px rgba(23, 24, 28, .09);
  --display: "Young Serif", Georgia, serif;
  --ui: "Hanken Grotesk", "Segoe UI", sans-serif;
  --body: "Hanken Grotesk", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--wash); color: var(--ink);
  font: 400 16px/1.5 var(--body);
}
/* The one gradient in the system: the sky tint fading into the page, as in the reference. */
.page { max-width: 480px; margin: 0 auto; min-height: 100vh; background: linear-gradient(var(--wash), var(--paper) 280px); }
.page.wide { max-width: 1080px; }
.pad { padding: 20px; }

/* Header: serif wordmark with the two-tone mark */
.band { background: var(--wash); color: var(--ink); padding: 18px 20px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page .band { background: none; }
.band .name { display: inline-flex; align-items: center; gap: 9px; font: 400 20px/1 var(--display); letter-spacing: -.01em; color: inherit; text-decoration: none; }
.band .name::before { content: ""; width: 22px; height: 22px; flex: none; background: url("logo.svg") center / contain no-repeat; }
.band .meta { font: 500 13px/1 var(--ui); color: var(--ink-2); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 32px; }
h2 { font-size: 25px; }
h3 { font-size: 19px; }
p { margin: 0 0 12px; }
a { color: var(--ink); text-underline-offset: 3px; }
.label { font: 600 14px/1.2 var(--ui); color: var(--ink-2); display: block; margin: 0 0 8px; }
.muted { color: var(--ink-2); font-size: 15px; }

.lang { min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--paper); color: var(--ink); font: 600 13px/1 var(--ui); cursor: pointer; }
.lang:hover { background: var(--wash); }
.lang:focus-visible { outline: 2px solid var(--rain); outline-offset: 2px; }

/* Form */
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
legend { padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span { display: block; padding: 10px 16px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--paper); font: 600 15px/1.5 var(--ui); cursor: pointer; user-select: none; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 2px solid var(--rain); outline-offset: 2px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--paper); }
.seg .chip span { border: 0; text-align: center; min-height: 40px; padding: 8px 6px; background: none; }
select, input[type="range"] { font: inherit; }
select { min-height: 48px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--paper); color: var(--ink); font: 600 15px/1.4 var(--ui); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 12px 24px; border: 0; border-radius: var(--pill); background: var(--ink); color: #fff; font: 700 16px/1 var(--ui); text-decoration: none; cursor: pointer; box-shadow: var(--shadow); }
.btn:hover { background: #000; }
.btn:focus-visible { outline: 2px solid var(--rain); outline-offset: 2px; }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); min-height: 48px; box-shadow: none; }
.btn.ghost:hover { background: var(--wash); }

/* Result cards: rounded, floating; the tag carries the colour */
.pick { border: 0; border-radius: var(--r); padding: 18px; margin: 0 0 14px; background: var(--paper); box-shadow: var(--shadow); }
.pick .rank { font: 600 13px/1 var(--ui); color: var(--ink-2); margin-bottom: 8px; }
.pick .reason { margin: 10px 0 12px; }
.pick .links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; font-weight: 700; }
.tag { display: inline-block; padding: 4px 11px; font: 700 12px/1.4 var(--ui); border-radius: var(--pill); }
.tag.outdoor { background: var(--gold); color: var(--ink); }
.tag.indoor { background: var(--rain); color: #fff; }

/* Map with numbered pins */
.map .leaflet-tile-pane { filter: saturate(.55) brightness(1.04); }
.map { height: 230px; border-radius: var(--r); overflow: hidden; margin: 0 0 16px; box-shadow: var(--shadow); background: var(--line); z-index: 0; }
.pin { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; font: 700 14px/1 var(--ui); box-shadow: 0 3px 10px rgba(23, 24, 28, .3); }
.pin.outdoor { background: var(--gold); color: var(--ink); }
.pin.indoor { background: var(--rain); color: #fff; }

/* Hour-by-hour rain strip */
.rainstrip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; margin: 0 0 8px; }
.rainstrip .h { text-align: center; font: 700 12px/1 var(--ui); padding: 9px 0 7px; border-radius: 9px; background: var(--gold); color: var(--ink); }
.rainstrip .h.wet { background: var(--rain); color: #fff; }
.rainstrip .h.out { opacity: .35; }
.rainstrip .h small { display: block; font: 500 10px/1.3 var(--ui); margin-top: 3px; }
.key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 18px; }
.key i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.key .dry { background: var(--gold); } .key .wetk { background: var(--rain); }

.notice { background: var(--rain-wash); border-radius: 14px; padding: 12px 16px; font-size: 15px; margin: 0 0 16px; }
.foot { padding: 16px 20px 28px; font-size: 13px; color: var(--ink-2); }

/* Loading: the rain strip fills hour by hour while the forecast and places are fetched */
.rainstrip.loading .h { height: 38px; padding: 0; opacity: .3; }
.skel { background: var(--wash); box-shadow: none; }
.pick.skel { height: 150px; } .pick.skel.short { height: 96px; }
@media (prefers-reduced-motion: no-preference) {
  .rainstrip.loading .h { animation: fill 1.4s ease-in-out infinite; animation-delay: calc(var(--i) * .09s); }
  .skel { animation: breathe 1.4s ease-in-out infinite; }
}
@keyframes fill { 0%, 100% { background: var(--gold); opacity: .3; } 45% { background: var(--rain); opacity: 1; } }
@keyframes breathe { 50% { opacity: .55; } }

@media (prefers-reduced-motion: no-preference) { .chip span, .btn { transition: background-color .12s; } }

/* Chat assistant: floating pill and (when embedding is allowed) a panel */
.chatfab { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: var(--pill); background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); font: 700 14px/1 var(--ui); text-decoration: none; }
.chatfab:hover { background: var(--wash); }
.chatfab:focus-visible { outline: 2px solid var(--rain); outline-offset: 2px; }
.has-bar .chatfab { bottom: calc(13px + env(safe-area-inset-bottom)); box-shadow: none; }
.has-bar .bar { padding-right: 80px; }
.chatpanel { position: fixed; right: 16px; bottom: 76px; z-index: 900; width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100vh - 110px)); border: 0; border-radius: var(--r); background: var(--paper); box-shadow: 0 16px 48px rgba(23, 24, 28, .22); }
@media (max-width: 520px) { .chatfab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .chatfab { padding: 0; width: 52px; height: 52px; justify-content: center; } }
@media (min-width: 760px) { .has-bar .chatfab { bottom: 16px; box-shadow: var(--shadow); } .has-bar .bar { padding-right: 36px; } }
