/* Escapada — a quiet fare sheet: paper ground, one sea-green accent, a photo of
   each place, condensed place names and tabular fares. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ground: #f6f4ef;
  --surface: #ffffff;
  --ink: #22303c;
  --ink-2: #5b6875;
  --rule: #e2ded6;
  --accent: #0f766e;
  --on-accent: #ffffff;
  --tint: #e2f0ee;
  --flight: #0f766e;
  --hotel: #cdb89a;
  --good: #0a7a3e;
  --bad: #b3261e;
  --bad-ground: #fdeceb;
  --control: #ffffff;
  --control-border: #8d949c;
  --shadow: 0 1px 2px rgb(34 48 60 / 0.06), 0 8px 24px -12px rgb(34 48 60 / 0.25);

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: 1.25rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  interpolate-size: allow-keywords;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--control-border) var(--ground);
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.45;
  font-stretch: 100%;
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--tint); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, p, ol, ul, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ol, ul { list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- Masthead ---------- */

.masthead {
  color: var(--ink);
  padding: calc(env(safe-area-inset-top, 0px) + 0.625rem) var(--gutter) 0.625rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
  /* The header is a strip of sky, as in the iPhone app: the name is written on it in cloud. */
  background: linear-gradient(#54a1cc, #99cfe6);
  border-bottom: 1px solid #73b3d1;
}

.wordmark { display: grid; gap: 0.125rem; margin-right: auto; text-decoration: none; line-height: 1; }
/* Which edition this is: the cities it knows are Europe's and its neighbours'. Other editions would say so here. */
.edition { font-size: 0.5rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; white-space: nowrap; color: #124061; }

/* The name, written in the sky. Its first letter is the app's icon: a plane seen from above flying to the left,
   whose wings are the upright of the E and whose three trails of cloud are its arms. When the page opens the plane
   crosses from the right leaving one long white trail; the trail then gathers into the name, in white letters soft
   as clouds, with the plane as its E. */
.title-mark { --size: 1.4375rem; --reach: 22.5rem; display: flex; align-items: baseline; gap: calc(var(--size) * 0.06); font-size: var(--size); }
.title-e { position: relative; flex: none; display: block; width: calc(0.78em * 780 / 632); height: 0.78em; animation: title-cross 1.3s cubic-bezier(0, 0, 0.58, 1) 0.3s both; }
/* Sizes, shadow and the clouds' arrival are kept to what every browser does alike: Safari drew nothing of the E when
   its box came from an aspect ratio and its clouds from a clip. */
.title-e svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1px 0.8px rgb(51 115 158 / 0.45)); }
.title-clouds { fill: #fff; animation: title-clouds 0.9s ease-in-out 1.5s both; }
.title-plane { fill: #eddec2; stroke: rgb(107 92 66 / 0.7); stroke-width: 22; stroke-linejoin: round; }
/* The long trail: it starts where the plane started and its near end follows the plane's tail. */
.title-trail { position: absolute; left: 80%; top: 50%; width: var(--reach); height: max(3px, 0.16em); margin-top: calc(max(3px, 0.16em) / -2); border-radius: 999px;
  background: linear-gradient(to right, #fff, rgb(255 255 255 / 0.75)); transform-origin: right; pointer-events: none;
  animation: title-trail 1.3s cubic-bezier(0, 0, 0.58, 1) 0.3s both, title-trail-gone 0.9s ease-in-out 1.5s forwards; }
.title-rest { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif; font-weight: 900; font-stretch: 100%; letter-spacing: 0.01em; text-transform: uppercase; color: #fff;
  text-shadow: 0 0 2.5px rgb(255 255 255 / 0.9), 0 1.2px 0.8px rgb(51 115 158 / 0.45); animation: title-rest 0.9s ease-in-out 1.5s both; }
@keyframes title-cross { from { translate: var(--reach) 0; } }
@keyframes title-trail { from { translate: var(--reach) 0; scale: 0 1; } to { translate: 0 0; scale: 1 1; } }
@keyframes title-trail-gone { to { opacity: 0; filter: blur(5px); } }
@keyframes title-clouds { from { opacity: 0; } }
/* No blur on the letters: Safari leaves them soft after one. They gather out of the trail by fading in from its side. */
@keyframes title-rest { from { opacity: 0; translate: 0.35em 0; letter-spacing: 0.12em; } }
@media (prefers-reduced-motion: reduce) {
  .title-e, .title-clouds, .title-rest { animation: none; }
  .title-trail { display: none; }
}
/* A small plane crosses the header from left to right along its rule, then waits before the next crossing. */
.masthead { position: relative; overflow-x: clip; }
.masthead-plane { position: absolute; left: 0; bottom: -0.5625rem; z-index: 1; width: 1.125rem; height: 1.125rem; color: var(--accent); pointer-events: none; animation: cross 16s linear 1.2s infinite both; }
.masthead-plane svg { display: block; width: 100%; height: 100%; fill: currentColor; stroke: #cfe6f0; stroke-width: 1.2; stroke-linejoin: round; paint-order: stroke; }
@keyframes cross {
  0% { translate: -2rem 0; }
  55%, 100% { translate: calc(100vw + 2rem) 0; }
}
@media (prefers-reduced-motion: reduce) {
  .masthead-plane { animation: none; left: auto; right: var(--gutter); }
}

.masthead-note {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  text-align: right;
}
/* Empty, it would still take a gap of the row. */
.masthead-note:empty { display: none; }

/* Each view rises into place when it is shown. */
.signin, .search, .results { animation: enter 420ms var(--ease-out) both; }
@keyframes enter { from { opacity: 0; translate: 0 0.75rem; } }

main {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 3rem);
}

/* The header's buttons are white pills on the sky, on one line with the name; they never wrap. */
.masthead-action {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.875rem;
  padding: 0 0.5625rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
  color: var(--ink);
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
@media (hover: hover) { .masthead-action:hover { border-color: var(--accent); background: var(--tint); } }
/* A finger's reach beyond the pill itself. */
.masthead-action { position: relative; }
.masthead-action::after { content: ""; position: absolute; inset: -0.4375rem -0.125rem; }

/* Sign out: a door with an arrow going out; on a phone the sign alone, so it keeps its place on the header's line. */
#signout svg { width: 1rem; height: 1rem; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 520px) {
  #signout { justify-content: center; width: 1.875rem; padding: 0; }
  #signout .signout-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* With sign-out on the line too, a phone keeps the profile's sign, without the word. */
@media (max-width: 440px) {
  #profile-open:has(~ #signout:not([hidden])) { justify-content: center; width: 1.875rem; padding: 0; }
  #profile-open:has(~ #signout:not([hidden])) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .masthead:has(#signout:not([hidden])) { gap: 0.25rem; padding-inline: 1rem; }
}

/* The way to the profile: a pill with a person and the word. */
#profile-open {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.625rem 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 750;
}
#profile-open svg { width: 1rem; height: 1rem; fill: var(--accent); }
@keyframes bump { 35% { scale: 1.35; } }

/* ---------- Sign in ---------- */

.signin { display: grid; gap: 1rem; padding: 2.5rem var(--gutter) 0; justify-items: start; }
.signin h1 {
  font-stretch: 72%;
  font-weight: 800;
  font-size: clamp(1.875rem, 8.5vw, 2.375rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.signin p { color: var(--ink-2); max-width: 36ch; }
.signin .form-error { color: var(--bad); }
.google-button { min-height: 44px; margin-top: 0.5rem; color-scheme: light; }

/* ---------- Search form ---------- */

.search {
  display: grid;
  gap: 1.25rem;
  padding: 1.75rem var(--gutter) 0;
}

.search h1 {
  font-stretch: 72%;
  font-weight: 800;
  font-size: clamp(1.875rem, 8.5vw, 2.375rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin-bottom: 0.25rem;
}

.field { display: grid; gap: 0.375rem; min-width: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.75rem; }

label, .label, legend {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--ink);
}
legend { margin-bottom: 0.375rem; }

.hint { font-size: 0.8125rem; color: var(--ink-2); }

input[type="text"], input[type="date"] {
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: 0.625rem 0.75rem;
  background: var(--control);
  border: 1.5px solid var(--control-border);
  border-radius: 6px;
  font-size: 1.0625rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  appearance: none;
  -webkit-appearance: none;
}
input[type="date"] { display: block; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
@media (hover: hover) { input:hover { border-color: var(--ink); } }
input:focus-visible { outline-offset: 0; border-color: var(--accent); border-radius: 6px; }
input[aria-invalid="true"] { border-color: var(--bad); }

.combo { position: relative; }
.combo-list {
  position: absolute;
  z-index: 5;
  inset: calc(100% + 4px) 0 auto;
  background: var(--surface);
  border: 1.5px solid var(--control-border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  max-height: 17rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.combo-list {
  transition: opacity 160ms var(--ease-out), translate 160ms var(--ease-out);
  @starting-style { opacity: 0; translate: 0 -0.375rem; }
}
.combo-list li {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--rule);
}
.combo-list li:last-child { border-bottom: 0; }
.combo-list li[aria-selected="true"] { background: var(--tint); }
@media (hover: hover) { .combo-list li:hover { background: var(--tint); } }
.combo-list .code { font-stretch: 75%; font-weight: 800; font-size: 1.0625rem; letter-spacing: 0.02em; }
.combo-list .place { font-weight: 600; }
.combo-list .airport { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--ink-2); }
.combo-list .none { display: block; cursor: default; color: var(--ink-2); font-size: 0.9375rem; }
@media (hover: hover) { .combo-list .none:hover { background: none; } }

/* A budget: a slider with the amount beside its label. The track is filled up to the thumb. */
.budget-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
/* Beside the title, what the budget covers: a plane and a bed. */
.budget-title { display: inline-flex; align-items: center; gap: 0.5rem; }
.budget-for { display: inline-flex; align-items: center; gap: 0.1875rem; color: var(--ink-2); }
.budget-for svg { width: 1.0625rem; height: 1.0625rem; fill: var(--accent); }
.budget-for svg .line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.budget-for i { font-style: normal; font-size: 0.75rem; font-weight: 700; }
/* Flights only: the budget is for the flight, so the plane stands alone. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.budget-head output { font-stretch: 75%; font-weight: 800; font-size: 1.375rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.budget-live { display: grid; gap: 0.125rem; padding: 0 var(--gutter) 0.75rem; }
input[type="range"] {
  --fill: 100%;
  width: 100%;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  touch-action: pan-y;
  appearance: none;
  -webkit-appearance: none;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--accent) var(--fill), var(--rule) var(--fill));
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--rule); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: calc(3px - 0.875rem);
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: 0 2px 6px -2px rgb(34 48 60 / 0.45);
  transition: scale 120ms var(--ease-out);
}
input[type="range"]::-moz-range-thumb {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: 0 2px 6px -2px rgb(34 48 60 / 0.45);
}
input[type="range"]:active::-webkit-slider-thumb { scale: 1.12; }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--accent); outline-offset: 2px; }
input[type="range"]:focus-visible::-moz-range-thumb { outline: 3px solid var(--accent); outline-offset: 2px; }

/* The budget line: thicker, with its ends and middle in money, and above the
   results a mark for each trip found. The thumb stays a plain white knob. */
.budget-slider { position: relative; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--fill), var(--rule) var(--fill)); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 4px; }
input[type="range"]::-webkit-slider-thumb { margin-top: calc(4px - 0.875rem); }
.budget-scale { display: flex; justify-content: space-between; margin-top: -0.3125rem; font-size: 0.75rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.budget-marks { position: absolute; inset: 0 0 auto; height: 2.75rem; pointer-events: none; }
.budget-marks i {
  position: absolute;
  top: 0.125rem;
  left: calc(0.875rem + (100% - 1.75rem) * var(--p));
  width: 4px;
  height: 0.625rem;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--good);
  font-style: normal;
  transition: background-color 160ms var(--ease-out);
  animation: wx-drip 360ms var(--ease-out) backwards;
}
.budget-marks i.is-over { background: var(--control-border); }
.budget-marks i:not(:empty) { top: -0.25rem; width: 1.125rem; height: 1.125rem; margin-left: -0.5625rem; display: grid; place-items: center; border-radius: 50%; font-size: 0.6875rem; font-weight: 800; color: #fff; }
.budget-live .hint { margin-top: 0.125rem; }

/* Several cities: the cities to include, round line drawings of their landmarks.
   A chosen one is painted in colour. On a touch screen they are a row that
   scrolls sideways with the names below; under a mouse they are a dock (below). */
.picks { position: relative; grid-template-columns: minmax(0, 1fr); animation: enter 320ms var(--ease-out) both; }
/* A small way to empty the selection, level with the title. */
.picks-clear { position: absolute; z-index: 3; top: -1.9375rem; right: 0; min-height: 1.75rem; padding: 0.125rem 0.625rem; background: none; border: 1px solid var(--control-border); border-radius: 999px; font-size: 0.75rem; font-weight: 650; color: var(--ink-2); transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out); }
@media (hover: hover) { .picks-clear:hover { border-color: var(--accent); color: var(--accent); } }
.picks-clear:disabled { visibility: hidden; }
.pick-grid {
  margin: 0 calc(-1 * var(--gutter));
  padding: 0.25rem var(--gutter) 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.dock-track { --dock: 3.5rem; display: flex; gap: 0.625rem; width: max-content; }
.pick { flex: none; display: grid; justify-items: center; align-content: start; gap: 0.3125rem; padding: 0; background: none; border: 0; scroll-snap-align: center; }
.pick-art {
  display: grid;
  place-items: center;
  width: var(--dock);
  height: var(--dock);
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--control-border);
  color: var(--ink);
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.pick-art svg { width: 66%; height: 66%; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.pick-name { font-size: 0.8125rem; font-weight: 600; line-height: 1.2; color: var(--ink-2); text-align: center; white-space: nowrap; }
/* A chosen city is painted: sky behind, its materials filled in (classes from public/city-icons.js), and an accent ring. */
.pick[aria-pressed="true"] .pick-art { background: var(--sky, var(--tint)); border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }
.pick[aria-pressed="true"] svg { stroke-width: 1.4; }

/* The same painted drawing, small, inside the "Leaving from" field when the starting city has one. */
.origin-badge {
  position: absolute;
  z-index: 1;
  left: 0.375rem;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--sky, var(--tint));
  box-shadow: 0 0 0 1.5px var(--accent);
  color: var(--ink);
  pointer-events: none;
  animation: pop 260ms var(--ease-out);
}
.origin-badge svg { width: 70%; height: 70%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
input.has-badge { padding-left: 3.125rem; }
/* And beside the title of the results, once the search is done. */
.trip-summary h1:has(.title-badge) { display: flex; align-items: center; gap: 0.625rem; }
.title-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--sky, var(--tint));
  box-shadow: 0 0 0 1.5px var(--accent);
  color: var(--ink);
  animation: pop 320ms var(--ease-out);
}
.title-badge svg { width: 70%; height: 70%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.pick[aria-pressed="true"] .a, .is-painted .a { fill: var(--a); }
.pick[aria-pressed="true"] .b, .is-painted .b { fill: var(--b); }
.pick[aria-pressed="true"] .o, .is-painted .o { fill: color-mix(in oklab, var(--ink) 62%, var(--a)); }
.pick[aria-pressed="true"] .s, .is-painted .s { fill: #f6d77a; }
.pick[aria-pressed="true"] .w, .is-painted .w { stroke: #2f80b7; }
.pick[aria-pressed="true"] .pick-name { color: var(--ink); font-weight: 750; }
.pick:disabled { opacity: 0.4; cursor: not-allowed; }
.pick:focus-visible { outline: none; }
.pick:focus-visible .pick-art { outline: 3px solid var(--accent); outline-offset: 2px; }

/* The dock: a panel as wide as the form, right under its title, that shows six
   cities; the rest wait beyond its ends, and a fade with an arrow marks an end
   that has more. app.js gives each drawing its size (--s) and its shift (--x)
   and the row its slide (--offset). The panel holds only the drawings, with room above
   and below for the one under the pointer to grow inside it, with a longer
   shadow as it grows; the line under the panel names that city. A chosen city has a dot below,
   like a running app. */
@media (hover: hover) and (pointer: fine) {
  .pick-grid {
    --pad: 14px;
    --gap: 12px;
    position: relative;
    container-type: inline-size;
    margin: 0;
    padding: 32px 0 30px;
    overflow: visible;
    scroll-snap-type: none;
  }
  .dock {
    overflow: clip;
    background: linear-gradient(to bottom, rgb(255 255 255 / 0.95), rgb(255 255 255 / 0.7));
    border: 1px solid var(--rule);
    border-radius: 22px;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9), var(--shadow);
  }
  .picks legend { margin-bottom: 0.5rem; }
  .dock + .hint {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    transition: color 140ms var(--ease-out);
  }
  .dock.is-pointed + .hint { color: var(--ink); font-weight: 650; }
  .dock-track {
    --dock: calc((100cqw - 2 * var(--pad) - 5 * var(--gap)) / 6);
    position: relative;
    align-items: flex-end;
    gap: var(--gap);
    padding: 0 var(--pad);
    translate: calc(-1 * var(--offset, 0px)) 0;
  }
  .pick {
    position: relative;
    translate: var(--x, 0px) 0;
    scale: var(--s, 1);
    transform-origin: 50% 60%;
    will-change: translate, scale;
  }
  .pick-art {
    border-width: 1px;
    border-color: color-mix(in oklab, var(--control-border) 70%, transparent);
    box-shadow: 0 calc((var(--s, 1) - 1) * 18px + 1px) calc((var(--s, 1) - 1) * 26px + 2px) -6px rgb(34 48 60 / 0.4);
  }
  .pick[aria-pressed="true"] .pick-art { box-shadow: 0 0 0 1.5px var(--accent), 0 calc((var(--s, 1) - 1) * 18px + 1px) calc((var(--s, 1) - 1) * 26px + 2px) -6px rgb(34 48 60 / 0.4); }
  @media (hover: hover) { .pick:hover:not(:disabled) .pick-art { border-color: var(--accent); } }
  .pick-name { display: none; }
  .pick::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    background: var(--accent);
    scale: calc(1 / var(--s, 1));
    opacity: 0;
    transition: opacity 160ms var(--ease-out);
  }
  .pick[aria-pressed="true"]::after { opacity: 1; }

  /* An end with more cities beyond it: a fade of the shelf and a small arrow. */
  .pick-grid::before, .pick-grid::after {
    content: "";
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    width: 2.75rem;
    background-repeat: no-repeat;
    background-size: 0.875rem 0.875rem, 100% 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms var(--ease-out);
  }
  .pick-grid::before {
    left: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322303c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E"),
      linear-gradient(to right, rgb(255 255 255 / 0.96) 30%, transparent);
    background-position: 0.375rem 50%, 0 0;
  }
  .pick-grid::after {
    right: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322303c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E"),
      linear-gradient(to left, rgb(255 255 255 / 0.96) 30%, transparent);
    background-position: calc(100% - 0.375rem) 50%, 0 0;
  }
  .pick-grid.can-left::before, .pick-grid.can-right::after { opacity: 1; }
}

.segmented { display: grid; grid-template-columns: 1fr 1fr; }
.segmented legend { grid-column: 1 / -1; float: left; width: 100%; }
.segmented label { position: relative; display: block; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  height: 100%;
  padding: 0.5rem 0.625rem;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  background: var(--control);
  border: 1.5px solid var(--control-border);
  color: var(--ink-2);
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.segmented label:first-of-type span { border-radius: 6px 0 0 6px; }
.segmented label:last-of-type span { border-radius: 0 6px 6px 0; margin-left: -1.5px; }
.segmented input:checked + span { position: relative; }
@media (hover: hover) { .segmented input:hover + span { color: var(--ink); } }
.segmented input:disabled { cursor: not-allowed; }
/* What may be asked of the hotel: two small chips, each on or off by itself. Like a city's badge, the drawing in a
   chip is a plain line drawing on white until it is chosen; then it is painted on its sky, with the accent ring. */
.legend-note { font-weight: 500; font-size: 0.8125rem; color: var(--ink-2); }
.want-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.want { position: relative; display: inline-block; }
.want input { position: absolute; inset: 0; z-index: 1; opacity: 0; margin: 0; cursor: pointer; }
.want-chip { display: inline-flex; align-items: center; gap: 0.4375rem; min-height: 2.5rem; padding: 0.25rem 0.75rem 0.25rem 0.3125rem; background: var(--surface); border: 1px solid var(--control-border); border-radius: 999px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.want-art { display: grid; place-items: center; width: 1.875rem; height: 1.875rem; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--control-border); transition: background-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.want-art svg { width: 76%; height: 76%; fill: none; stroke: var(--ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .want input:hover + .want-chip { border-color: var(--accent); color: var(--ink); } }
.want input:checked + .want-chip { background: color-mix(in oklab, var(--tint) 55%, var(--surface)); border-color: var(--accent); font-weight: 750; color: var(--ink); }
.want input:checked + .want-chip .want-art { background: #d3e9f6; box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 2.5px var(--accent); animation: want-pop 320ms var(--ease-out); }
.want input:checked + .want-chip .a { fill: var(--a); }
.want input:checked + .want-chip .b { fill: var(--b); }
.want input:checked + .want-chip .k { stroke: var(--good); stroke-width: 3.2; }
/* The plane of "After 11:00": a filled shape, in ink, and in the accent when asked for. */
.want-art .plane { fill: var(--ink); stroke: var(--surface); stroke-width: 1.2; }
.want input:checked + .want-chip .plane { fill: var(--accent); }
.want input:focus-visible + .want-chip { outline: 3px solid var(--accent); outline-offset: 2px; }
@keyframes want-pop { from { scale: 0.7; } 60% { scale: 1.12; } }
.segmented input:disabled + span, .segmented:disabled span { opacity: 0.45; }
.segmented input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
/* In the form the two choices (trip, dates) are compact: a low row each, with a small title. */
.search .segmented legend { margin-bottom: 0.25rem; font-size: 0.8125rem; }
.search .segmented span { min-height: 2.25rem; padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.search .segmented .seg-icon { width: 1rem; height: 1rem; margin-right: 0.375rem; }
.search .segmented + .segmented { margin-top: -0.375rem; }

.stepper-field { grid-template-columns: 1fr auto; align-items: center; }
.stepper { display: grid; grid-template-columns: 3rem auto 3rem; align-items: center; }
/* Where the trip starts and who goes share one line: the city takes the room, the travellers a compact stepper level with its field. */
.start-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0.75rem; align-items: start; }
.travellers-field .stepper { justify-content: start; }
.travellers-field .stepper { min-height: 3rem; }
.travellers-field .stepper { grid-template-columns: 1.75rem auto 1.75rem; }
.travellers-field .stepper button { width: 1.75rem; height: 1.75rem; border-radius: 50%; border-width: 1px; }
.travellers-field .stepper output { padding: 0 0.375rem; gap: 0.0625rem; }
.travellers-field .stepper output i { width: 0.9375rem; height: 0.9375rem; }
.travellers-field .stepper button svg { width: 0.8125rem; height: 0.8125rem; }
/* The travellers drawn as figures: one lit for each, the rest faint. */
.stepper output { display: flex; align-items: flex-end; gap: 0.125rem; padding: 0 0.5rem; }
.stepper output i { display: block; width: 1.125rem; height: 1.125rem; opacity: 0.2; transition: opacity 180ms var(--ease-out), translate 180ms var(--ease-out); }
.stepper output i.is-on { opacity: 1; translate: 0 -2px; }
.stepper output svg { display: block; width: 100%; height: 100%; fill: var(--accent); stroke: none; }

/* The two dates: one strip of two calendar leaves with the nights as moons
   between them. Under it, when open, the app's own calendar. Two months side by side (one above the other on a narrow
   screen); the stay is a band of tint from the day of going, a disc in the
   accent, to the day of coming back, a disc in ink. Today has a dot. */
.date-strip { display: flex; align-items: flex-end; gap: 0.5rem; }
.date-end { flex: none; display: grid; justify-items: center; gap: 0.25rem; }
/* The small planes over the dates: one runs along the runway and climbs away, the other comes down and rolls to a stop. */
.date-plane { display: block; width: 3.75rem; height: 2.0625rem; }
.date-plane svg { display: block; width: 100%; height: 100%; overflow: visible; }
.date-plane .runway { fill: none; stroke: var(--control-border); stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 3 2.5; }
.date-plane .craft { fill: var(--accent); offset-rotate: auto; }
.date-plane.is-down .craft { fill: var(--ink); }
.date-plane.is-off .craft { animation: take-off 3.6s cubic-bezier(0.5, 0, 0.8, 0.6) infinite; }
.date-plane.is-down .craft { animation: touch-down 3.6s cubic-bezier(0.2, 0.5, 0.3, 1) 1.2s infinite backwards; }
@keyframes take-off { 0% { offset-distance: 0%; opacity: 0; } 10% { opacity: 1; } 62% { opacity: 1; } 75%, 100% { offset-distance: 100%; opacity: 0; } }
@keyframes touch-down { 0% { offset-distance: 0%; opacity: 0; } 12% { opacity: 1; } 70% { offset-distance: 100%; opacity: 1; } 88% { offset-distance: 100%; opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }

/* A date is a calendar leaf with its arrows inside: weekday on the band, then the day and month between a step earlier and a step later. */
.date-card.leaf { width: 6.5rem; padding: 0; border: 1.5px solid var(--control-border); border-radius: 10px; animation: none; transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.date-card .leaf-day { padding: 0.1875rem 0; font-size: 0.6875rem; }
.date-ctl { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) 1.75rem; align-items: center; width: 100%; }
.date-step { width: 100%; height: 3rem; display: grid; place-items: center; padding: 0; background: none; border: 0; color: var(--ink-2); transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.date-step svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .date-step:hover:not(:disabled) { background: var(--tint); color: var(--accent); } }
.date-step:active:not(:disabled) svg { scale: 0.85; }
.date-step:disabled { opacity: 0.25; cursor: default; }
.date-leaf { display: grid; justify-items: center; gap: 0.0625rem; padding: 0.25rem 0 0.3125rem; background: none; border: 0; line-height: 1.1; cursor: pointer; }
.date-leaf b { margin: 0; font-stretch: 80%; font-size: 1.5rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.date-leaf .leaf-month { font-size: 0.6875rem; font-weight: 600; white-space: nowrap; color: var(--ink-2); }
@media (hover: hover) { .date-leaf:hover b { color: var(--accent); } }
@media (hover: hover) { .date-card:hover { border-color: var(--ink); } }
.date-card.is-picking { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 1px 2px rgb(34 48 60 / 0.08); }
.date-card:has(.date-leaf[aria-invalid="true"]) { border-color: var(--bad); }
.date-card.is-turned { animation: leaf 320ms var(--ease-out) 0s; }
.date-nights { flex: 1; min-width: 0; padding-bottom: 0.875rem; }
.date-nights .stay-span { width: 100%; }

.calendar { margin-top: -0.25rem; padding: 0.875rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); animation: enter 260ms var(--ease-out) both; }
.cal-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.5rem; }
.cal-ask { text-align: center; font-size: 0.9375rem; font-weight: 700; color: var(--ink); }
.cal-step { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; background: var(--control); border: 1.5px solid var(--control-border); border-radius: 50%; }
.cal-step svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .cal-step:hover:not(:disabled) { border-color: var(--accent); background: var(--tint); } }
.cal-step:disabled { opacity: 0.3; cursor: default; }
.cal-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem 1.25rem; margin-top: 0.75rem; }
.cal-month h3 { margin: 0 0 0.375rem; font-stretch: 80%; font-size: 1.0625rem; font-weight: 800; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; }
.cal-weekday { padding: 0.25rem 0; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; text-align: center; color: var(--ink-2); }
.cal-cell { position: relative; display: grid; place-items: center; }
/* The band of the stay: full width between the two days, half a cell at each end. */
.cal-cell.is-between { background: var(--tint); }
.cal-cell.is-start:has(~ .is-end), .cal-cell.is-start:has(~ .is-between) { background: linear-gradient(to right, transparent 50%, var(--tint) 50%); }
.cal-cell.is-end { background: linear-gradient(to left, transparent 50%, var(--tint) 50%); }
.cal-day {
  position: relative;
  width: 100%;
  max-width: 2.5rem;
  aspect-ratio: 1;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background-color 120ms var(--ease-out), color 120ms var(--ease-out), scale 120ms var(--ease-out);
}
@media (hover: hover) { .cal-day:hover:not(:disabled) { background: color-mix(in oklab, var(--accent) 18%, transparent); } }
.cal-day:active:not(:disabled) { scale: 0.9; }
.cal-day:disabled { color: color-mix(in oklab, var(--ink-2) 45%, transparent); cursor: default; }
.cal-cell.is-start .cal-day { background: var(--accent); color: var(--on-accent); font-weight: 800; }
.cal-cell.is-end .cal-day { background: var(--ink); color: var(--surface); font-weight: 800; }
.cal-cell.is-today .cal-day::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); }
.cal-count { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.cal-count svg { width: 0.9375rem; height: 0.9375rem; fill: #47549b; }
.cal-done { min-height: 2.5rem; }

/* The form's other pictures: a sign on each choice, the stay under the dates,
   the rules as chips, a plane on the button. */
.seg-icon { flex: none; width: 1.125rem; height: 1.125rem; margin-right: 0.4375rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.seg-icon .solid { fill: currentColor; stroke: none; }
.seg-icon .hole { fill: var(--control); stroke: none; }
.segmented input:checked + span .hole { fill: var(--accent); }
.rule-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
.rule-note .fact { animation: none; }
.rule-note .fact > svg { width: 0.9375rem; height: 0.9375rem; fill: var(--accent); }
.rule-text { flex: 1 1 100%; font-size: 0.8125rem; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem; }
.primary svg { width: 1.375rem; height: 1.375rem; fill: currentColor; transition: translate 220ms var(--ease-out), rotate 220ms var(--ease-out); }
@media (hover: hover) { .primary:hover svg { translate: 5px -3px; rotate: -6deg; } }
.stepper button {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  background: var(--control);
  border: 1.5px solid var(--control-border);
  border-radius: 6px;
}
@media (hover: hover) { .stepper button:hover:not(:disabled) { border-color: var(--ink); } }
.stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
.stepper svg, .chevron { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.stepper output { text-align: center; font-size: 1.25rem; font-weight: 750; font-variant-numeric: tabular-nums; }

.rule-note {
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--ink-2);
  min-height: 2.9rem;
}
.rule-note strong { color: var(--ink); font-weight: 700; }

.form-error {
  padding: 0.75rem 0.875rem;
  background: var(--bad-ground);
  color: var(--bad);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.primary {
  min-height: 3.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  border-radius: 6px;
  font-stretch: 85%;
  font-size: 1.1875rem;
  font-weight: 750;
  letter-spacing: 0.005em;
  transition: transform 120ms var(--ease-out), background-color 160ms var(--ease-out);
}
@media (hover: hover) { .primary:hover { background: color-mix(in oklab, var(--accent) 88%, black); } }
.primary:active { transform: scale(0.985); }

.quiet {
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  background: transparent;
  border: 1.5px solid var(--control-border);
  border-radius: 6px;
  font-weight: 650;
  font-size: 0.9375rem;
}

.quiet, .stepper button, input { transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out); }
@media (hover: hover) { .quiet:hover { background: var(--tint); border-color: var(--accent); } }

/* ---------- Results ---------- */

.trip-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--gutter) 1rem;
}
.trip-summary h1 {
  font-stretch: 72%;
  font-weight: 800;
  font-size: 1.625rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  outline: none;
}
.trip-summary p { font-size: 0.9375rem; color: var(--ink-2); margin-top: 0.25rem; }

/* Under the results title, the search as a picture: the dates as calendar
   leaves, then a chip per fact. */
#results-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.625rem; }
#results-sub .stay { flex: 1 1 100%; }
.fact {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  min-height: 1.875rem;
  padding: 0.1875rem 0.625rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--ink);
  animation: pop 320ms var(--ease-out) 380ms backwards;
}
.fact > svg { flex: none; width: 0.9375rem; height: 0.9375rem; fill: var(--accent); }
.fact > svg .line { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fact > svg .hole { fill: var(--surface); }
.fact.people { gap: 0.125rem; }
.fact.people > svg { fill: var(--ink); }
.fact.via { padding-right: 0.25rem; }
.mini { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-left: -0.125rem; border-radius: 50%; background: var(--sky, var(--tint)); box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 2.5px var(--accent); color: var(--ink); }
.mini + .mini { margin-left: -0.3125rem; }
.mini svg { width: 72%; height: 72%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.status { padding: 0 var(--gutter) 0.875rem; }
.status p { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.progress { height: 4px; margin-top: 0.5rem; background: var(--rule); border-radius: 2px; overflow: hidden; }
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 400ms var(--ease-out);
}
.status.is-done .progress { display: none; }

/* A finished route summed up as a picture: the total large, chips for cities,
   nights and travellers, and a meter of the price per traveller against the
   budget, with a mark where the budget is. */
/* What a search found, as signs with their numbers. */
.tally { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.tally-item { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.25rem; padding: 0.1875rem 0.75rem 0.1875rem 0.3125rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); animation: enter 320ms var(--ease-out) both; }
.tally-item:nth-child(2) { animation-delay: 80ms; }
.tally-item:nth-child(3) { animation-delay: 160ms; }
.tally-item:nth-child(4) { animation-delay: 240ms; }
.tally-item svg { width: 1.625rem; height: 1.625rem; padding: 0.3125rem; border-radius: 50%; background: var(--tint); fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tally-item b { font-stretch: 80%; font-size: 1.125rem; font-weight: 800; color: var(--ink); }
.tally-item.is-missed svg { background: color-mix(in oklab, var(--bad) 12%, var(--surface)); stroke: var(--bad); }
.tally-item.is-far svg { background: #dcebf4; stroke: #1f6f9c; }
.status p.is-summary { display: grid; gap: 0.625rem; justify-items: start; padding: 0.875rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; animation: arrive 480ms var(--ease-out); }
.sum-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.125rem 0.625rem; }
.sum-total b { font-stretch: 75%; font-size: 2rem; font-weight: 800; line-height: 1; color: var(--ink); }
.sum-total span { font-size: 0.8125rem; font-weight: 600; }
.sum-facts { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.sum-facts .fact { background: var(--ground); animation-delay: 160ms; }
.sum-budget { display: grid; gap: 0.3125rem; width: 100%; }
.meter { position: relative; display: block; height: 10px; border-radius: 5px; background: var(--rule); }
.meter i { display: block; height: 100%; border-radius: 5px; background: var(--good); transform-origin: left; animation: grow 700ms var(--ease-out) 200ms backwards; }
.meter u { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.sum-budget.is-over .meter i { background: linear-gradient(to right, var(--good), #e0a321 60%, var(--bad)); }
.meter-text { font-size: 0.8125rem; font-weight: 700; color: var(--good); }
.sum-budget.is-over .meter-text { color: var(--bad); }
.sum-note { font-size: 0.8125rem; font-weight: 600; }
.sum-note.is-good { color: var(--good); }

/* While a search runs: a strip of sky where a plane comes in from the left,
   hops from badge to badge and leaves on the right, again and again. A badge
   is a line drawing until the plane touches it; then it pops, fills with its
   colours and slowly fades back before the next lap. --lap is the time of one
   lap and --at each badge's share of the way (set in app.js). */
.loader {
  --lap: 6s;
  margin: 0 var(--gutter) 0.875rem;
  background: linear-gradient(170deg, #c4e0e6 0%, #d9ecef 55%, #eef6f3 100%);
  border: 1px solid #c3d6d6;
  border-radius: 14px;
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.55);
  overflow: clip;
  animation: enter 420ms var(--ease-out) both;
}
.loader > svg { display: block; width: 100%; height: auto; }
.loader .cloud { fill: #fff; opacity: 0.85; animation: drift 26s linear infinite; }
.loader .cloud.one { translate: 0 6px; }
.loader .cloud.two { translate: 0 30px; scale: 0.7; opacity: 0.6; animation-duration: 38s; animation-delay: -14s; }
.loader .cloud.three { translate: 0 14px; scale: 1.25; opacity: 0.7; animation-duration: 31s; animation-delay: -22s; }
@keyframes drift { from { transform: translateX(430px); } to { transform: translateX(-80px); } }
.loader .ground { stroke: #fff; stroke-width: 5; stroke-linecap: round; opacity: 0.7; }
.loader .hops { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 0.5 5; opacity: 0.6; animation: trail 1.2s linear infinite; }
@keyframes trail { to { stroke-dashoffset: -5.5; } }

.loader .stop { transform-box: fill-box; transform-origin: 50% 100%; fill-opacity: 0; animation: visit var(--lap) linear infinite backwards; animation-delay: calc(var(--at, 0) * var(--lap)); }
.loader .stop svg { overflow: visible; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.loader .plate { fill: var(--surface); fill-opacity: 1; }
.loader .sky { fill: var(--sky); }
.loader .ring { fill: none; stroke: var(--control-border); stroke-width: 1.2; animation: ring var(--lap) linear infinite backwards; animation-delay: inherit; }
.loader .here { fill: var(--ink); fill-opacity: 1; }
.loader .stop.is-home { fill-opacity: 1; animation-name: hop; }
.loader .stop.is-home .ring { stroke: var(--accent); stroke-width: 1.6; animation: none; }
@keyframes visit {
  0% { fill-opacity: 0; scale: 1; }
  3% { fill-opacity: 1; scale: 1.24; }
  9% { scale: 0.96; }
  14% { scale: 1; }
  72% { fill-opacity: 1; }
  100% { fill-opacity: 0; scale: 1; }
}
@keyframes hop { 0%, 14%, 100% { scale: 1; } 3% { scale: 1.2; } 9% { scale: 0.96; } }
@keyframes ring { 0%, 100% { stroke: var(--control-border); } 3%, 72% { stroke: var(--accent); } }

.loader .flyer {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 0.9;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 1.5px rgb(34 48 60 / 0.3));
  offset-rotate: auto;
  offset-distance: 0%;
  animation: lap var(--lap) linear infinite;
  will-change: offset-distance;
}
@keyframes lap { to { offset-distance: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .loader .stop { fill-opacity: 1; }
  .loader .flyer { offset-distance: 50%; }
}

/* Trips over the budget: how many are hidden, and a way to see them. */
.budget-note { margin: 0 var(--gutter) 0.875rem; padding: 0.625rem 0.75rem; background: var(--tint); border-radius: 8px; font-size: 0.875rem; font-weight: 600; }
.link { padding: 0; background: none; border: 0; font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 0.2em; }
@media (hover: hover) { .link:hover { text-decoration-thickness: 2px; } }
.tag.is-over { background: none; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--control-border); }
.tag + .tag { margin-left: 0.25rem; }
/* The hotel shown with a trip is a recommendation: a small tag says so, and its price stays out of the trip's. */
.rec {
  display: inline-block;
  margin-right: 0.3125rem;
  padding: 0.0625rem 0.375rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--good) 14%, var(--surface));
  color: var(--good);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  vertical-align: 0.0625rem;
}

.trips { display: grid; gap: 0.75rem; padding: 0 var(--gutter); }
.trips:empty { display: none; }

.trip { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; overflow: clip; }
/* A trip unfolds into the list when it is first found: its photo settles and its price bar grows. */
.trip.is-new { animation: arrive 480ms var(--ease-out); }
.trip.is-new .split-bar i { animation: grow 480ms var(--ease-out) both; transform-origin: left; }
@keyframes arrive {
  from { opacity: 0; clip-path: inset(0 0 100% 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes grow { from { transform: scaleX(0); } }
/* Opening a trip swaps its badge for the photo of the place, which unrolls and settles. */
.photo.is-opening { animation: unroll 380ms var(--ease-out); }
.photo.is-opening .view { animation: settle 380ms var(--ease-out); }
@keyframes unroll { from { height: 0; opacity: 0; } }
@keyframes settle { from { scale: 1.12; } }
.trip.is-new .badge { animation: pop 300ms var(--ease-out) 160ms both; }
@keyframes pop { from { scale: 0.5; opacity: 0; } }

/* A trip that takes first place is wiped in from the left. */
.trip.is-crowned { animation: crown 560ms var(--ease-out); }
@keyframes crown {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.trip-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 0.75rem;
  row-gap: 0.5rem;
  align-items: start;
  padding: 0.875rem 0.875rem 0.875rem 0.75rem;
  background: none;
  border: 0;
  text-align: left;
}
@media (hover: hover) { .trip-row:hover { background: color-mix(in oklab, var(--accent) 5%, transparent); } }

/* Open, the photo of the place runs across the top of the row. */
.photo {
  grid-column: 1 / -1;
  display: block;
  aspect-ratio: 4 / 1;
  border-radius: 8px;
  overflow: clip;
  background: var(--rule);
}
.photo .view { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Closed, the landmark of the place sits in a round badge with the rank on its edge. */
.badge {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--rule);
}
.tag {
  display: inline-block;
  margin-bottom: 0.25rem;
  padding: 0.125rem 0.4375rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
}
.trip-row:focus-visible { outline-offset: -3px; }

.rank {
  display: grid;
  justify-items: center;
  gap: 0.375rem;
  font-stretch: 68%;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  text-align: center;
}

.rank { min-width: 2.25rem; }
.rank.has-badge { position: relative; grid-row: span 2; }
.rank.has-badge .rank-number {
  position: absolute;
  inset: -0.25rem auto auto -0.25rem;
  min-width: 1.375rem;
  height: 1.375rem;
  padding: 0 0.25rem;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.8125rem;
  line-height: 1;
  color: var(--ink);
}
.rank .chevron { width: 1rem; height: 1rem; opacity: 0.75; }
.trip-row[aria-expanded="true"] .chevron { rotate: 180deg; }

.place { min-width: 0; }
.city {
  display: block;
  font-stretch: 72%;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}
.country { display: block; font-size: 0.875rem; color: var(--ink-2); margin-top: 0.125rem; }

.price { text-align: right; white-space: nowrap; }
.total {
  display: block;
  font-stretch: 75%;
  font-weight: 800;
  font-size: 1.625rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.price-note { display: block; font-size: 0.8125rem; color: var(--ink-2); margin-top: 0.125rem; }

.split { grid-column: 2 / -1; display: grid; gap: 0.375rem; }
/* The price as a picture: a thick bar split between flight and hotel with a
   small plane riding the split, and under it each half with its sign, a plane
   for the flight and a bed for the hotel. */
.split-bar { position: relative; display: flex; height: 8px; gap: 2px; margin: 0.25rem 0 0.125rem; }
.split-bar i { display: block; height: 100%; min-width: 4px; }
.split-bar .f { border-radius: 4px 1px 1px 4px; }
.split-bar .h { border-radius: 1px 4px 4px 1px; }
.split-bar .join {
  position: absolute;
  top: 50%;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 0;
  margin: -0.625rem 0 0 -0.625rem;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1.5px solid var(--flight);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgb(34 48 60 / 0.2);
}
.split-bar .join svg { width: 0.8125rem; height: 0.8125rem; fill: var(--flight); }
.trip.is-new .split-bar .join { animation: taxi 480ms var(--ease-out) both; }
@keyframes taxi { from { left: 0; opacity: 0; } }
.cost { display: inline-flex; align-items: center; gap: 0.375rem; }
.cost b { font-size: 0.9375rem; font-weight: 750; color: var(--ink); }
.cost-note { color: var(--ink-2); }
.cost-icon { flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; }
.cost-icon svg { width: 0.9375rem; height: 0.9375rem; }
.cost.f .cost-icon { background: var(--tint); }
.cost.f .cost-icon svg { fill: var(--flight); }
.cost.h .cost-icon { background: color-mix(in oklab, var(--hotel) 35%, var(--surface)); }
.cost.h .cost-icon svg { fill: #8a6d3f; }
.cost.h .cost-icon .line { fill: none; stroke: #8a6d3f; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.split-bar .f { background: var(--flight); }
.split-bar .h { background: var(--hotel); }
.split-text {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.125rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.split-text b { font-weight: 650; color: var(--ink); }
.key { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 1px; margin-right: 0.375rem; }
.key.f { background: var(--flight); }
.key.h { background: var(--hotel); }

.saved-line { grid-column: 2 / -1; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }

/* The dates of a stay as a picture: two calendar leaves joined by a line that
   draws itself, with a moon for each night rising above it. */
.stay { grid-column: 2 / -1; display: flex; align-items: center; gap: 0.5rem; max-width: 19rem; color: var(--ink-2); }
.leaf {
  flex: none;
  display: grid;
  justify-items: center;
  width: 2.625rem;
  padding-bottom: 0.1875rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 7px;
  box-shadow: 0 1px 2px rgb(34 48 60 / 0.08);
  overflow: clip;
  line-height: 1.1;
  animation: leaf 420ms var(--ease-out) backwards;
}
.leaf.is-out { animation-delay: 520ms; }
.leaf-day { width: 100%; padding: 0.125rem 0; background: var(--accent); color: var(--on-accent); font-size: 0.625rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; }
.leaf.is-out .leaf-day { background: var(--ink); }
.leaf b { margin-top: 0.125rem; font-stretch: 80%; font-size: 1.125rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.leaf-month { font-size: 0.6875rem; font-weight: 600; }
@keyframes leaf { from { opacity: 0; translate: 0 -5px; rotate: -6deg; } }

.stay-span { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 0.1875rem; }
.moons { display: flex; gap: 0.25rem; min-height: 0.625rem; }
.moons i {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: radial-gradient(circle at 72% 30%, transparent 0 46%, #47549b 49%);
  animation: moon 380ms var(--ease-out) backwards;
  animation-delay: calc(240ms + var(--n) * 70ms);
}
@keyframes moon { from { opacity: 0; translate: 0 5px; scale: 0.4; } }
.stay-line {
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(to right, var(--accent), var(--ink));
  transform-origin: left;
  animation: span 520ms var(--ease-out) 120ms backwards;
}
@keyframes span { from { scale: 0 1; } }
.stay-count { font-size: 0.75rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
/* The usual weather of a stay, as a picture: a moving sky, night and day
   temperatures at the ends of a cold-to-warm bar, and a drop per day, filled
   for the days it usually rains. */
.weather { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; font-size: 0.8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.saved-on { grid-column: 2 / -1; font-size: 0.8125rem; color: var(--ink-2); }
.wx { flex: none; width: 1.875rem; height: 1.875rem; overflow: visible; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wx-sun circle { fill: #f6c445; stroke: #e0a321; }
.wx-rays { stroke: #e9ae2b; animation: wx-spin 14s linear infinite; }
.wx-sun { animation: wx-glow 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.wx-cloud { fill: #fff; stroke: #8f9ba8; animation: wx-float 4.5s ease-in-out infinite; }
.wx-drop { stroke: #2f80b7; animation: wx-fall 1.1s linear infinite; }
.wx-flake { fill: #9db8d6; animation: wx-snow 2.4s linear infinite; }
.wx-drop.two, .wx-flake.two { animation-delay: -0.4s; }
.wx-drop.three, .wx-flake.three { animation-delay: -0.75s; }
@keyframes wx-spin { to { rotate: 360deg; } }
@keyframes wx-glow { 50% { scale: 1.08; } }
@keyframes wx-float { 50% { translate: 1.5px 0; } }
@keyframes wx-fall { from { translate: 1px -2px; opacity: 0; } 25% { opacity: 1; } to { translate: -1.5px 5px; opacity: 0; } }
@keyframes wx-snow { from { translate: 0 -2px; opacity: 0; } 20% { opacity: 1; } 50% { translate: 1.5px 2px; } to { translate: -1px 6px; opacity: 0; } }

.wx-temps { display: inline-flex; align-items: center; gap: 0.375rem; }
.wx-low { color: #3d7fbf; font-weight: 650; }
.wx-high { color: var(--ink); font-weight: 750; }
.wx-bar { position: relative; width: 4.5rem; height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.wx-bar i {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #4a90d9 0%, #6fc3c8 30%, #f2c14e 58%, #ee8a2c 78%, #dc4a1f 100%);
  clip-path: inset(0 calc(100% - var(--to)) 0 var(--from) round 3px);
  animation: wx-warm 900ms var(--ease-out) 200ms backwards;
}
@keyframes wx-warm { from { clip-path: inset(0 calc(100% - var(--from)) 0 var(--from) round 3px); } }

.wx-days { display: inline-flex; align-items: center; gap: 3px; }
.wx-days i {
  width: 8px;
  height: 11px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  clip-path: polygon(50% 0, 100% 62%, 85% 92%, 50% 100%, 15% 92%, 0 62%);
  background: var(--rule);
  animation: wx-drip 420ms var(--ease-out) backwards;
  animation-delay: calc(300ms + var(--n) * 70ms);
}
.wx-days i.is-wet { background: #2f80b7; }
.wx-days span { margin-left: 0.25rem; }
@keyframes wx-drip { from { opacity: 0; translate: 0 -6px; } }

/* Saving: a button at the foot of an open trip and below a route; the saved list reuses the trip cards. */
.save { justify-self: start; }
.save[aria-pressed="true"], .save-route[aria-pressed="true"] { background: var(--tint); border-color: var(--accent); }
.save-route { display: block; margin: 0.75rem var(--gutter) 0; }
.profile { animation: enter 420ms var(--ease-out) both; }
@media (hover: hover) { .saved-row:hover { background: none; } }
/* The saved list as a comparison: a bar of each price against the dearest one
   saved, the dates as leaves, a route as a chain of its cities. */
.saved-compare { grid-column: 2 / -1; display: grid; gap: 0.25rem; font-size: 0.8125rem; font-weight: 650; color: var(--ink-2); }
.saved-bar { display: block; height: 8px; border-radius: 4px; background: var(--rule); overflow: hidden; }
.saved-bar i { display: block; height: 100%; border-radius: 4px; background: var(--hotel); transform-origin: left; animation: grow 700ms var(--ease-out) 150ms backwards; }
.trip.is-best .saved-bar i { background: var(--good); }
.trip.is-best .saved-compare { color: var(--good); }
.saved-chain { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.375rem; font-size: 0.875rem; font-weight: 650; color: var(--ink); }
.chain-stop { display: inline-flex; align-items: center; gap: 0.3125rem; }
.chain-stop .mini { margin-left: 0; }
.chain-arrow { color: var(--accent); font-weight: 800; }
.saved-costs { grid-column: 2 / -1; justify-content: flex-start; gap: 0.25rem 1rem; }
.saved-costs .cost-note { overflow-wrap: anywhere; }
.saved-facts { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.saved-facts .fact { animation: none; background: var(--ground); }
.saved-actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
.quiet:disabled { opacity: 0.55; cursor: default; }
@media (hover: hover) { .quiet:disabled:hover { background: transparent; border-color: var(--control-border); } }

.moved {
  grid-column: 2 / -1;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--good);
}

/* Several cities: the deck. The city on top and the next two peeking out below
   it. A card slides with the finger and leans as it goes. Below: arrows and a
   numbered dot per city. */
.deck { display: grid; gap: 0.75rem; padding: 0 var(--gutter); }
.deck-stage { display: grid; padding-bottom: 1.5rem; }
.deck-stage > .trip {
  grid-area: 1 / 1;
  position: relative;
  z-index: 3;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  box-shadow: var(--shadow);
  transform: translateX(var(--dx, 0px)) rotate(var(--turn, 0deg));
  transition: transform 240ms var(--ease-out), opacity 240ms var(--ease-out);
}
.deck-stage > .trip.is-sliding { transition: none; cursor: grabbing; will-change: transform; }
/* A photo or a badge under the finger must not start a drag of its own: that would end the slide. */
.deck-stage img { -webkit-user-drag: none; user-select: none; }
.deck-stage > .trip.is-leaving { opacity: 0; }
.deck-stage > .trip.is-arriving { animation: deck-in 320ms var(--ease-out); }
@keyframes deck-in { from { opacity: 0.4; transform: translateY(14px) scale(0.955); } }
.deck-stage > .trip[data-pos="1"] { z-index: 2; align-self: end; transform: translateY(12px) scale(0.955); opacity: 0.92; }
.deck-stage > .trip[data-pos="2"] { z-index: 1; align-self: end; transform: translateY(24px) scale(0.91); opacity: 0.75; }
.deck-stage > .trip[data-pos="1"], .deck-stage > .trip[data-pos="2"] { max-height: 9rem; }
/* The cards behind show only their edge, not a strip of their contents. */
.deck-stage > .trip[data-pos="1"] > *, .deck-stage > .trip[data-pos="2"] > * { visibility: hidden; }

/* A ranking's deck: an open card can be kept (slid left) or discarded (slid right); it shows a stamp for what letting go would do, and a kept card is outlined in green. */
.deck-stage > .trip[data-verdict="keep"] { border-color: var(--good); box-shadow: 0 0 0 1px var(--good), var(--shadow); }
.tag.verdict.is-keep { background: var(--good); }
.deck-stage > .trip.is-deciding[data-lean]::before {
  position: absolute;
  z-index: 2;
  top: 1.25rem;
  padding: 0.25rem 0.75rem;
  border: 3px solid currentColor;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.92);
  font-stretch: 75%;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* The whole card takes the colour of what letting go would do, so it reads from anywhere on the screen: green to keep, red to discard. */
.deck-stage > .trip.is-deciding[data-lean] { transition: none; }
.deck-stage > .trip.is-deciding[data-lean="left"] { background: color-mix(in oklab, var(--good) 26%, var(--surface)); border-color: var(--good); box-shadow: 0 0 0 3px var(--good), var(--shadow); }
.deck-stage > .trip.is-deciding[data-lean="right"] { background: color-mix(in oklab, var(--bad) 22%, var(--surface)); border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad), var(--shadow); }
.deck-stage > .trip.is-deciding[data-lean] .detail, .deck-stage > .trip.is-deciding[data-lean] .boarding, .deck-stage > .trip.is-deciding[data-lean] .hotel-card { background: transparent; }
.deck-stage > .trip.is-deciding[data-lean="left"]::before { content: "Keep"; right: 1.25rem; rotate: 10deg; color: var(--good); }
.deck-stage > .trip.is-deciding[data-lean="right"]::before { content: "Discard"; left: 1.25rem; rotate: -10deg; color: var(--bad); }

.deck-nav { display: flex; align-items: center; justify-content: center; gap: 0.625rem; }
.deck-step { flex: none; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; background: var(--control); border: 1.5px solid var(--control-border); border-radius: 50%; }
.deck-step svg, .deck-choice svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .deck-step:hover:not(:disabled) { border-color: var(--accent); background: var(--tint); } }
.deck-step:disabled { opacity: 0.35; cursor: default; }
.deck-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.375rem; }
.deck-dot { width: 1.75rem; height: 1.75rem; padding: 0; background: var(--surface); border: 1.5px solid var(--control-border); border-radius: 50%; font-size: 0.8125rem; font-weight: 750; color: var(--ink-2); transition: scale 160ms var(--ease-out), background-color 160ms var(--ease-out); }
.deck-dot.is-on { scale: 1.2; border-color: var(--ink); color: var(--ink); }
.deck-choices { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.625rem; animation: enter 260ms var(--ease-out) both; }
.deck-choices.is-closed { grid-template-columns: auto; justify-content: center; }
/* The super like: a round star between keep and discard that books the trip at once. */
.deck-super { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; padding: 0; border: 1.5px solid #1f6f9c; border-radius: 50%; background: var(--surface); color: #1f6f9c; cursor: pointer; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out); }
.deck-super svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }
@media (hover: hover) { .deck-super:hover { background: #1f6f9c; color: #fff; } }
.deck-super:active { transform: scale(0.92); }
.deck-choice { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 3rem; padding: 0.5rem 0.75rem; background: var(--surface); border: 1.5px solid currentColor; border-radius: 8px; font-weight: 700; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.deck-choice.is-skip { color: var(--bad); }
.deck-choice.is-keep { color: var(--good); }
.deck-choice.is-skip[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (hover: hover) { .deck-choice.is-skip:hover { background: var(--bad); border-color: var(--bad); color: #fff; } }
.deck-choice.is-keep[aria-pressed="true"] { background: var(--good); border-color: var(--good); color: #fff; }
@media (hover: hover) { .deck-choice.is-keep:hover { background: var(--good); border-color: var(--good); color: #fff; } }
.deck-count { min-width: 4.5rem; text-align: center; font-size: 0.9375rem; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--ink); }
.deck-hint { font-size: 0.8125rem; color: var(--ink-2); text-align: center; }
.deck-go { min-height: 3rem; font-size: 1.0625rem; }


/* The cheapest trip is outlined in the accent and tagged above its name. */
.trip.is-best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.trip.is-best .rank-number { border-color: var(--accent); }

/* ---------- Several cities: route tabs and map ---------- */

.route-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; padding: 0 var(--gutter) 0.75rem; }
.route-tab {
  display: grid;
  gap: 0.125rem;
  min-height: 3.25rem;
  padding: 0.375rem 0.5rem;
  background: var(--control);
  border: 1.5px solid var(--control-border);
  border-radius: 6px;
  text-align: center;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.route-name { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.route-price { font-stretch: 80%; font-size: 1.0625rem; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .route-tab:hover:not(:disabled) { border-color: var(--accent); } }
.route-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.route-tab[aria-selected="true"] .route-name { color: inherit; }
.route-tab:disabled { opacity: 0.55; cursor: default; }

/* A tab is the route's name over its price; the cheapest finished route carries a tag. */
.route-tab { position: relative; justify-items: center; padding: 0.4375rem 0.375rem 0.5rem; border-radius: 10px; color: var(--ink); }
.route-tab.is-searching .route-price { font-size: 0.8125rem; font-weight: 650; color: var(--ink-2); }
.route-tab[aria-selected="true"].is-searching .route-price { color: inherit; }
.route-note {
  position: absolute;
  top: -0.5rem;
  right: -0.25rem;
  padding: 0.0625rem 0.375rem;
  background: var(--surface);
  border: 1px solid var(--control-border);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink-2);
}
.route-note.is-best { background: var(--good); border-color: var(--good); color: #fff; }
.route-tabs { padding-top: 0.5rem; }
.route-tab.is-over:not([aria-selected="true"]) .route-price { color: var(--ink-2); }

/* The map: sea, land, a dotted trail, one arc per flight, a numbered dot per
   city and an airliner. With .is-flying the flights play one after the other:
   flight --i starts after --i steps, eases out of one city and into the next,
   draws its arc behind the plane, and the city lights up as the plane lands. */
.map {
  --leg: 1.5s;
  --pause: 0.35s;
  --step: calc(var(--leg) + var(--pause));
  --start: 0.5s;
  --glide: cubic-bezier(0.5, 0, 0.2, 1);
  display: block;
  width: calc(100% - 2 * var(--gutter));
  margin: 0 var(--gutter) 0.75rem;
  padding: 0;
  aspect-ratio: 3 / 2;
  background: linear-gradient(165deg, #c4e0e6 0%, #d7ebee 45%, #e6f2f0 100%);
  border: 1px solid #c3d6d6;
  border-radius: 14px;
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.55), 0 6px 18px -12px rgb(34 48 60 / 0.45);
  overflow: clip;
  cursor: pointer;
}
.map svg { display: block; width: 100%; height: 100%; }
.map .land { fill: #fdfcf8; stroke: #aac4c4; stroke-width: 0.75; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0.6px 0.9px rgb(34 72 80 / 0.28)); }
/* Dressing: ripples on the sea, a grid of latitude and longitude, the shadow
   of each flight on the ground, a compass, two slow clouds. Cities with a
   drawing show it painted, with their number on a chip. */
.map .wave { fill: none; stroke: #fff; stroke-width: 0.8; opacity: 0.5; vector-effect: non-scaling-stroke; }
.map .grat { fill: none; stroke: #7fa8b3; stroke-width: 0.6; stroke-dasharray: 2 5; opacity: 0.35; vector-effect: non-scaling-stroke; }
.map .shade { fill: none; stroke: var(--ink); stroke-linecap: round; opacity: 0.1; }
.map .rose { opacity: 0.6; }
.map .rose circle { fill: rgb(255 255 255 / 0.6); stroke: var(--ink-2); stroke-width: 0.6; }
.map .rose path { fill: var(--ink-2); }
.map .rose text { fill: var(--ink-2); font-weight: 800; text-anchor: middle; }
.map .cloud { fill: #fff; opacity: 0.6; animation: map-drift 46s linear infinite; }
@keyframes map-drift { from { transform: translateX(-40px); } to { transform: translateX(var(--span)); } }
.map .dot svg, .map .home svg { overflow: visible; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.map .spot.is-art { fill: var(--sky); }
.map .chip { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.map .home-plate { fill: var(--sky); stroke: var(--ink); stroke-width: 2.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0.5px 0.8px rgb(34 48 60 / 0.3)); }
/* With a drawing at the start, the plane does not stay parked on top of it. */
.map.has-home-art:not(.is-flying) .plane.is-last { opacity: 0; }
.map.has-home-art.is-flying .plane.is-last { animation-fill-mode: both, none; }
.map .trail { fill: none; stroke: var(--accent); stroke-linecap: round; opacity: 0.45; }
/* No non-scaling stroke on the arcs: it would measure the dash that draws them in screen pixels. */
.map .leg { fill: none; stroke: var(--accent); stroke-linecap: round; }
.map .origin { fill: var(--ink); }
.map .home-ring { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.map .spot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0.5px 0.8px rgb(34 48 60 / 0.3)); }
.map .ping { fill: var(--accent); opacity: 0; }
.map .dot text { fill: var(--ink); font-stretch: 80%; font-weight: 800; text-anchor: middle; }
.map .dot, .map .ping { transform-box: fill-box; transform-origin: center; }
/* City names, with a light outline so they read over land, sea and lines. */
.map .name { fill: var(--ink); stroke: #fdfcf8; stroke-linejoin: round; paint-order: stroke; font-stretch: 85%; font-weight: 700; }
.map .name.is-home { font-weight: 800; }
.map .plane {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1.2px 1.2px rgb(34 48 60 / 0.35));
  offset-rotate: auto;
  offset-distance: 100%;
  opacity: 0;
  will-change: offset-distance;
}
.map:not(.is-flying) .plane.is-last { opacity: 1; }

.map.is-flying .leg {
  stroke-dasharray: 1;
  animation: draw var(--leg) var(--glide) both;
  animation-delay: calc(var(--start) + var(--i) * var(--step));
}
/* A plane is visible from its take-off until the next one takes over; the last one stays, parked at home. */
.map.is-flying .plane {
  animation: fly var(--leg) var(--glide) both, aloft var(--step) linear;
  animation-delay: calc(var(--start) + var(--i) * var(--step));
}
.map.is-flying .plane.is-last { animation-fill-mode: both, forwards; }
.map.is-flying .dot {
  animation: land 420ms var(--ease-out) both;
  animation-delay: calc(var(--start) + var(--i) * var(--step) + var(--leg) - 260ms);
}
.map.is-flying .ping {
  animation: ping 900ms var(--ease-out) both;
  animation-delay: calc(var(--start) + var(--i) * var(--step) + var(--leg) - 120ms);
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fly { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes aloft { from, to { opacity: 1; } }
.map.is-flying .name:not(.is-home) {
  animation: name 420ms var(--ease-out) both;
  animation-delay: calc(var(--start) + var(--i) * var(--step) + var(--leg) - 160ms);
}
@keyframes name { from { opacity: 0; } }
@keyframes land { from { opacity: 0; scale: 0.2; } 60% { scale: 1.15; } }
@keyframes ping { from { opacity: 0.45; scale: 1; } to { opacity: 0; scale: 2.6; } }

/* The flight home closes a route. */
.home-leg { margin: 0.75rem var(--gutter) 0; animation: arrive 480ms var(--ease-out); }
.home-leg .detail { padding-top: 0; }
.home-leg .legs { margin-top: 0; }
.home-leg { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.home-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 0.75rem; align-items: start; padding: 0.875rem 0.875rem 0.75rem 0.75rem; }
.home-badge {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--sky, var(--tint));
  box-shadow: 0 0 0 1.5px var(--accent);
  color: var(--ink);
  animation: pop 300ms var(--ease-out) 160ms both;
}
.home-badge svg { width: 70%; height: 70%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tag.is-home { background: var(--ink); }
/* A far place that is among the cheapest of a long stay: the blue of the sky it is flown through. */
.tag.is-far { background: #1f6f9c; }
.home-cost { justify-content: flex-end; margin-top: 0.25rem; font-size: 0.8125rem; }

/* ---------- Trip detail ---------- */

.detail {
  padding: 0.25rem 0.875rem 1rem;
  display: grid;
  gap: 1rem;
}
.detail.is-opening { animation: unfold 380ms var(--ease-out); overflow: clip; }
@keyframes unfold {
  from { height: 0; padding-block: 0; opacity: 0; }
}

.detail h2 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.875rem;
  font-weight: 700;
}
.detail h2 span { font-variant-numeric: tabular-nums; }
.detail h2 .rec { margin: 0 auto 0 0.4375rem; }

.legs { display: grid; gap: 0.625rem; margin-top: 0.625rem; }
/* A flight as a picture: day and airline above; the two airports large at the
   ends with their times below; between them a dotted line with a dot at each
   end, and a plane that flies to its middle when the details open. */
.detail .leg { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.25rem 0.75rem; padding: 0.625rem 0.75rem 0.6875rem; background: var(--ground); border-radius: 10px; }
.leg-head { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.8125rem; color: var(--ink-2); }
.leg-date { font-weight: 700; color: var(--ink); }
.leg-who { text-align: right; overflow-wrap: anywhere; }
.leg-end { display: grid; gap: 0.0625rem; }
.leg-end.is-to { text-align: right; }
.leg-end b { font-stretch: 75%; font-size: 1.5rem; font-weight: 800; line-height: 1.05; letter-spacing: 0.01em; color: var(--ink); }
.leg-time { font-size: 0.9375rem; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.leg-time sup { margin-left: 0.125rem; font-size: 0.6875rem; font-weight: 700; color: var(--accent); }
.leg-path { display: grid; gap: 0.3125rem; justify-items: center; min-width: 0; }
.leg-track {
  position: relative;
  width: 100%;
  height: 1.25rem;
  background:
    radial-gradient(circle, var(--accent) 0 3.5px, transparent 4px) left center / 8px 8px no-repeat,
    radial-gradient(circle, var(--ink) 0 3.5px, transparent 4px) right center / 8px 8px no-repeat,
    radial-gradient(circle, var(--control-border) 0 1px, transparent 1.3px) 12px center / 7px 3px repeat-x;
}
.leg-plane { position: absolute; top: 50%; left: 50%; width: 1.375rem; height: 1.375rem; margin: -0.6875rem 0 0 -0.6875rem; display: grid; place-items: center; background: var(--ground); border-radius: 50%; animation: cruise 1100ms var(--ease-out) 120ms backwards; }
.leg-plane svg { width: 1.125rem; height: 1.125rem; fill: var(--accent); }
@keyframes cruise { from { left: 0.6875rem; opacity: 0.2; } }
.leg-dur { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.hotel { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.75rem; margin-top: 0.625rem; }
.hotel img, .hotel .no-photo {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 4px;
  background: var(--rule);
}
.hotel-name { font-weight: 750; font-size: 1.0625rem; line-height: 1.2; overflow-wrap: anywhere; }
/* The pictures of the room and the hotel: rows that slide sideways and stop on each picture. */
.hotel-pictures { margin-top: 0.625rem; animation: enter 280ms var(--ease-out) both; }
.picture-title { margin: 0.5rem 0 0.375rem; font-size: 0.8125rem; color: var(--ink-2); }
.picture-title b { color: var(--ink); font-weight: 750; }
.picture-strip { display: flex; gap: 0.5rem; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: 12px; touch-action: pan-x; }
.picture-strip::-webkit-scrollbar { display: none; }
.picture-strip img { flex: none; width: 86%; aspect-ratio: 3 / 2; object-fit: cover; scroll-snap-align: start; background: var(--rule); border-radius: 12px; -webkit-user-drag: none; }
.picture-strip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Where the hotel stands: a line to press under the hotel, and the street map it opens. */
.hotel.is-pressable { cursor: pointer; }
.hotel-where { display: flex; align-items: center; gap: 0.4375rem; width: 100%; min-height: 2.75rem; margin-top: 0.625rem; padding: 0.375rem 0.75rem; background: var(--surface); border: 1px solid var(--control-border); border-radius: 999px; font-size: 0.875rem; font-weight: 650; color: var(--ink); text-align: left; transition: border-color 160ms var(--ease-out); }
@media (hover: hover) { .hotel-where:hover { border-color: var(--accent); } }
.hotel-where svg { flex: none; width: 1.125rem; height: 1.125rem; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
.hotel-where span { flex: 1; min-width: 0; }
.hotel-where b { flex: none; font-weight: 750; color: var(--accent); }
.hotel-place { margin-top: 0.625rem; animation: enter 280ms var(--ease-out) both; }
.hotel-map { position: relative; aspect-ratio: 3 / 2; overflow: clip; background: #e8eeec; border: 1px solid #c3d6d6; border-radius: 14px; }
.hotel-map svg { display: block; width: 100%; height: 100%; }
.hotel-map-picture { width: 100%; height: 100%; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.hotel-map-picture:active { cursor: grabbing; }
.hotel-map image { -webkit-user-drag: none; }
/* Closer, wider, and back to the whole view: three small buttons down the right side. */
.map-controls { position: absolute; top: 0.5rem; right: 0.5rem; display: grid; gap: 0.375rem; }
.map-zoom { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; background: rgb(255 255 255 / 0.94); border: 1px solid var(--control-border); border-radius: 10px; box-shadow: 0 1px 3px rgb(34 48 60 / 0.25); color: var(--ink); }
.map-zoom svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .map-zoom:hover { border-color: var(--accent); color: var(--accent); } }
.map-zoom:disabled { opacity: 0.4; }
/* The streets are quietened a little so the app's own marks lead. */
.hotel-map .tiles { filter: saturate(0.7) contrast(0.95); }
.hotel-map .span-edge { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; opacity: 0.85; }
.hotel-map .span { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 9; }
.hotel-map .centre circle { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.hotel-map .centre .dot { fill: var(--ink); stroke: none; }
.hotel-map .centre-name { fill: var(--ink); stroke: #fff; stroke-width: 5; stroke-linejoin: round; paint-order: stroke; font-size: 18px; font-weight: 800; text-anchor: middle; }
.hotel-map .pin path { fill: var(--accent); stroke: #fff; stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 2px 2px rgb(34 48 60 / 0.4)); }
.hotel-map .pin .bed { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; filter: none; }
.hotel-map .span-label rect { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.hotel-map .span-label text { fill: var(--ink); font-size: 17px; font-weight: 800; text-anchor: middle; font-variant-numeric: tabular-nums; }
.map-credit { position: absolute; right: 0; bottom: 0; padding: 0.0625rem 0.375rem; background: rgb(255 255 255 / 0.8); border-top-left-radius: 6px; font-size: 0.625rem; color: var(--ink-2); text-decoration: none; }
.hotel-place-words { margin-top: 0.5rem; font-size: 0.875rem; color: var(--ink-2); }
.hotel-place-words b { color: var(--ink); font-weight: 750; }
.hotel-place-key { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.25rem; font-size: 0.75rem; color: var(--ink-2); }
.hotel-place-key .key-centre { width: 0.75rem; height: 0.75rem; border: 2px solid var(--ink); border-radius: 50%; background: radial-gradient(var(--ink) 35%, #fff 40%); }
.hotel-place-key .key-hotel { width: 0.75rem; height: 0.75rem; margin-left: 0.625rem; border-radius: 50% 50% 50% 0; rotate: -45deg; background: var(--accent); }
.hotel p { font-size: 0.8125rem; color: var(--ink-2); margin-top: 0.125rem; }

/* The hotel as a picture: a larger photo, stars drawn, the guest rating as a
   gauge that fills, and a chip with a sign for the room, board and cancellation. */
.detail .hotel { grid-template-columns: 5.75rem minmax(0, 1fr); gap: 0.625rem 0.875rem; padding: 0.625rem; background: var(--ground); border-radius: 10px; }
.detail .hotel img, .detail .hotel .no-photo { width: 5.75rem; height: 5.75rem; border-radius: 8px; }
.hotel-body { display: grid; align-content: center; gap: 0.3125rem; min-width: 0; }
.stars { font-size: 0.875rem; line-height: 1; letter-spacing: 0.08em; color: #e9ae2b; }
.stars i { font-style: normal; color: var(--rule); }
.score { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--ink-2); }
.gauge { position: relative; flex: none; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; }
.gauge svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-width: 3.5; stroke-linecap: round; }
.gauge-rest { stroke: var(--rule); }
.gauge-fill { stroke: var(--accent); animation: gauge 900ms var(--ease-out) 150ms backwards; }
.score.is-high .gauge-fill { stroke: var(--good); }
.score.is-low .gauge-fill { stroke: #d98a1c; }
@keyframes gauge { from { stroke-dasharray: 0 10; } }
.gauge b { position: relative; font-stretch: 80%; font-size: 0.9375rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.score-words { display: grid; line-height: 1.2; }
.score-words b { font-size: 0.875rem; font-weight: 700; color: var(--ink); }
.amenities { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.amenity {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  min-height: 1.75rem;
  padding: 0.1875rem 0.625rem 0.1875rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.amenity svg { flex: none; width: 1rem; height: 1rem; fill: none; stroke: var(--ink-2); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.amenity.is-good { border-color: color-mix(in oklab, var(--good) 45%, var(--rule)); color: var(--good); }
.amenity.is-good svg { stroke: var(--good); }
.amenity.is-fixed { color: var(--ink-2); }

.detail-note { font-size: 0.8125rem; color: var(--ink-2); }

/* ---------- Empty and footnote ---------- */

.empty { padding: 2rem var(--gutter); display: grid; gap: 0.625rem; justify-items: start; }
.empty h2 { font-stretch: 72%; font-weight: 800; font-size: 1.5rem; line-height: 1.1; }
.empty p { color: var(--ink-2); max-width: 34ch; margin-bottom: 0.5rem; }

/* The notes under the results: a quiet card, one row per note with its sign. */
.footnote { margin: 1.25rem var(--gutter) 0; font-size: 0.8125rem; color: var(--ink-2); animation: enter 420ms var(--ease-out) both; }
/* Closed, only a small button shows; pressed, the card of notes opens under it. */
.notes-more summary { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.25rem; padding: 0.25rem 0.75rem 0.25rem 0.5rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; font-size: 0.8125rem; font-weight: 650; color: var(--ink); cursor: pointer; list-style: none; }
.notes-more summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .notes-more summary:hover { border-color: var(--accent); background: var(--tint); } }
.notes-more summary svg { width: 1.125rem; height: 1.125rem; padding: 0; background: none; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; }
.notes-more[open] summary { border-color: var(--accent); }
.notes-more .notes { margin-top: 0.625rem; padding: 0.875rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; animation: enter 260ms var(--ease-out) both; }
.notes { display: grid; gap: 0.5625rem; }
.notes li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: 0.625rem; align-items: start; }
.notes svg { width: 1.75rem; height: 1.75rem; padding: 0.375rem; border-radius: 50%; background: var(--tint); fill: var(--accent); }
.notes svg .line { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.notes svg .hole { fill: var(--tint); }
.notes span { padding-top: 0.25rem; }
.notes b { font-weight: 700; color: var(--ink); }
.footnote a, .credits a { color: var(--accent); text-underline-offset: 0.2em; }

/* ---------- Photo credits page ---------- */

.credits { padding: 1.75rem var(--gutter) 0; display: grid; gap: 1rem; }
.credits h1 { font-stretch: 72%; font-weight: 800; font-size: 1.875rem; line-height: 1.05; }
.credits p { color: var(--ink-2); max-width: 60ch; }
.credits li { padding: 0.625rem 0; border-top: 1px solid var(--rule); font-size: 0.875rem; color: var(--ink-2); overflow-wrap: anywhere; }
.credits li b { display: block; color: var(--ink); font-size: 1rem; }

@media (min-width: 40rem) {
  main { padding-top: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Your cities: the ones chosen as chips under the dock (pressing one takes it out), and a field that finds the cities the dock does not show. */
.chosen { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chosen:empty { display: none; }
.chosen-city { display: inline-flex; align-items: center; gap: 0.4375rem; min-height: 2.75rem; padding: 0.25rem 0.625rem 0.25rem 0.4375rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out); animation: enter 240ms var(--ease-out) both; }
@media (hover: hover) { .chosen-city:hover { border-color: var(--bad); } }
.chosen-city .mini { width: 1.875rem; height: 1.875rem; margin: 0; }
.chosen-city b { font-size: 0.9375rem; font-weight: 700; }
.chosen-x { width: 0.875rem; height: 0.875rem; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; }
@media (hover: hover) { .chosen-city:hover .chosen-x { stroke: var(--bad); } }
.combo-list .city-option { grid-template-columns: auto 1fr; align-items: center; gap: 0.75rem; }
.combo-list .city-option .mini { width: 2.25rem; height: 2.25rem; margin: 0; }

/* The carousel of a ranking: kept cards show green on their dot, and the last card says so. */
.deck-dot.is-keep { background: var(--good); border-color: var(--good); color: #fff; }
.deck-last { padding: 0 0.5rem; font-size: 0.9375rem; font-weight: 750; color: var(--accent); }

/* The trip that won. Confetti in the app's own colours falls once over the top;
   the city's painted badge pops in with its name; below, the trip's card and
   the things to see, each entering in turn. No coins and no gold. */
.winner { position: relative; display: grid; gap: 1rem; }
.confetti { position: absolute; inset: -1rem 0 auto; height: 26rem; overflow: clip; pointer-events: none; z-index: 4; }
.confetti i { position: absolute; top: -1rem; left: var(--x); width: 0.5rem; height: 0.875rem; border-radius: 2px; opacity: 0; animation: confetti var(--time) cubic-bezier(0.3, 0.5, 0.6, 1) var(--delay) both; }
.confetti .c0 { background: var(--accent); }
.confetti .c1 { background: var(--hotel); }
.confetti .c2 { background: #8cc3dd; }
.confetti .c3 { background: var(--good); width: 0.4375rem; height: 0.4375rem; border-radius: 50%; }
.confetti .c4 { background: #e2a866; height: 0.5rem; }
@keyframes confetti {
  0% { opacity: 0; translate: 0 0; rotate: 0deg; }
  8% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; translate: var(--sway) 25rem; rotate: var(--turn); }
}
.winner-head { display: grid; justify-items: center; gap: 0.25rem; padding-top: 0.5rem; text-align: center; }
.winner-badge { display: grid; place-items: center; width: 7rem; height: 7rem; margin-bottom: 0.375rem; border-radius: 50%; background: var(--sky, var(--tint)); box-shadow: 0 0 0 3px var(--accent), 0 14px 30px -14px rgb(34 48 60 / 0.55); color: var(--ink); }
.winner-badge svg { width: 68%; height: 68%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.winner-tag { padding: 0.125rem 0.625rem; background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: 0.8125rem; font-weight: 750; letter-spacing: 0.02em; }
.winner-city { font-stretch: 72%; font-size: 2.75rem; font-weight: 900; line-height: 1; letter-spacing: -0.01em; }
.winner-city:focus { outline: none; }
.winner-facts { font-size: 1rem; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.winner.is-new .winner-badge { animation: win-pop 700ms var(--ease-out) 150ms both; }
.winner.is-new .winner-tag { animation: enter 420ms var(--ease-out) 600ms both; }
.winner.is-new .winner-city { animation: win-rise 620ms var(--ease-out) 700ms both; }
.winner.is-new .winner-facts { animation: enter 420ms var(--ease-out) 950ms both; }
.winner.is-new .winner-card, .winner.is-new .sights h3, .winner.is-new .winner-foot { animation: enter 480ms var(--ease-out) 1150ms both; }
.winner.is-new .sight { animation: enter 460ms var(--ease-out) both; animation-delay: calc(1400ms + var(--n) * 140ms); }
@keyframes win-pop { from { opacity: 0; scale: 0.3; rotate: -14deg; } 60% { scale: 1.12; rotate: 3deg; } }
@keyframes win-rise { from { opacity: 0; translate: 0 0.75rem; scale: 0.9; } }
.winner-card { display: grid; }
.winner-card > .trip { box-shadow: var(--shadow); border-color: var(--good); }
.sights { display: grid; gap: 0.625rem; }
.sights h3 { margin: 0; font-stretch: 80%; font-size: 1.375rem; font-weight: 800; line-height: 1.2; }
.sight-list { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.sight { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.75rem; padding: 0.625rem 0.875rem 0.625rem 0.625rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
.sight > svg { width: 2.5rem; height: 2.5rem; padding: 0.5rem; border-radius: 50%; background: var(--tint); fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* A sight with a photo: the picture at the left of its row, square with soft corners. */
.sight.has-photo { padding: 0.5rem 0.875rem 0.5rem 0.5rem; }
.sight-photo { width: 5rem; height: 5rem; border-radius: 9px; object-fit: cover; background: var(--tint); }
.sight-words { display: grid; gap: 0.0625rem; }
.sight-words b { font-size: 1rem; font-weight: 750; line-height: 1.25; }
.sight-words span { font-size: 0.875rem; color: var(--ink-2); line-height: 1.3; }
.winner-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
}

/* The levels of route: how each sits against the budget. */
.route-share { font-size: 0.6875rem; font-weight: 650; line-height: 1.2; opacity: 0.85; }

/* ---------- The city panel of the wait ---------- */

.showcase { margin: 0 var(--gutter) 0.875rem; padding: 0.875rem; overflow: hidden; border: 1px solid #c2d6d6; border-radius: 16px; background: linear-gradient(#b8dbeb, #e6f2f2); }
.showcase-city { display: grid; gap: 0.75rem; animation: showcase-in 900ms var(--ease-out) both; }
@keyframes showcase-in { from { opacity: 0; translate: 2.5rem 0; } }
.showcase-head { display: flex; align-items: center; gap: 0.75rem; }
/* The badge lands with a little turn. */
.showcase-badge { flex: none; width: 3.875rem; height: 3.875rem; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 2.5px var(--accent), 0 3px 5px rgb(34 48 60 / 0.2); animation: showcase-badge 600ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.showcase-badge svg { display: block; width: 100%; height: 100%; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@keyframes showcase-badge { from { scale: 0.4; rotate: -18deg; } }
.showcase-words { min-width: 0; display: grid; gap: 0.0625rem; margin-right: auto; animation: showcase-words 450ms ease-out 120ms both; }
@keyframes showcase-words { from { opacity: 0; translate: 0.875rem 0; } }
.showcase-label { font-size: 0.625rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #124061; }
.showcase-label.is-found { color: var(--good, #0a7a3e); }
.showcase-words b { font-stretch: 72%; font-weight: 800; font-size: 1.75rem; line-height: 1.05; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.showcase-line { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.showcase-price { flex: none; display: grid; justify-items: end; animation: showcase-price 500ms cubic-bezier(0.34, 1.56, 0.64, 1) 300ms both; }
@keyframes showcase-price { from { opacity: 0; scale: 0.7; } }
.showcase-price b { font-stretch: 72%; font-weight: 800; font-size: 1.375rem; font-variant-numeric: tabular-nums; color: var(--accent); }
.showcase-price span { font-size: 0.6875rem; font-weight: 600; color: var(--ink-2); }
/* Three things to see, each arriving in its turn. */
.showcase-sights { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.showcase-sights li { min-width: 0; display: grid; gap: 0.25rem; align-content: start; animation: showcase-sight 700ms cubic-bezier(0.34, 1.3, 0.64, 1) calc(700ms + var(--n) * 600ms) both; }
@keyframes showcase-sight { from { opacity: 0; translate: 0 1rem; } }
.showcase-photo { display: grid; place-items: center; aspect-ratio: 1.35; overflow: hidden; border-radius: 10px; border: 1.5px solid rgb(255 255 255 / 0.8); background: rgb(255 255 255 / 0.65); box-shadow: 0 2px 3px rgb(34 48 60 / 0.15); }
.showcase-photo img { width: 100%; height: 100%; object-fit: cover; }
.showcase-photo svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.showcase-sight { min-height: 2.5em; font-size: 0.75rem; font-weight: 600; line-height: 1.25; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .showcase-city, .showcase-badge, .showcase-words, .showcase-price, .showcase-sights li { animation: none; }
}

/* ---------- As the iPhone app ----------
   The web page follows the app's look: the system's own letters, the sky up to the top of the screen, its segmented
   switches, its traveller stepper, its date cards, its dock of cities on a card, its sign-in screen. */

:root { --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Archivo", "Helvetica Neue", Arial, sans-serif; }
.masthead { padding: calc(env(safe-area-inset-top, 0px) + 0.75rem) var(--gutter) 0.8125rem; }

/* Sign in: the film close under the header, then everything centred. */
.signin { padding-top: 0.75rem; justify-items: center; text-align: center; }
.signin .mission { text-align: left; }
.signin h1 { margin-top: 1.5rem; font-size: 1.875rem; }
.signin p { max-width: 34ch; }

/* The two-way switches are the system's: a grey trough, the chosen side a white pill. No signs in them. */
.segmented { grid-template-columns: 1fr 1fr; padding: 0; }
.segmented label { background: #e9e7e2; padding: 2px; }
.segmented label:first-of-type { border-radius: 999px 0 0 999px; padding-right: 0; }
.segmented label:last-of-type { border-radius: 0 999px 999px 0; padding-left: 0; }
.segmented span, .segmented label:first-of-type span, .segmented label:last-of-type span { min-height: 2.5rem; margin: 0; background: none; border: 0; border-radius: 999px; font-size: 0.9375rem; font-weight: 500; color: var(--ink); }
.segmented span svg { display: none; }
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.14), 0 0 0 0.5px rgb(0 0 0 / 0.04); }
.segmented input:disabled + span, .segmented:disabled span { opacity: 0.35; }

/* Travellers: the four figures, then the system's stepper, one grey capsule with minus and plus. */
.travellers-field .stepper { grid-template-columns: auto 2.75rem 2.75rem; justify-content: space-between; gap: 0; }
.travellers-field .stepper output { order: -1; padding: 0 0.375rem 0 0; gap: 0.25rem; }
.travellers-field .stepper output i { width: 1.0625rem; height: 1.0625rem; }
.travellers-field .stepper button { width: 2.75rem; height: 2.25rem; border: 0; border-radius: 999px 0 0 999px; background: #e9e7e2; color: var(--ink); }
.travellers-field .stepper #adults-more { border-radius: 0 999px 999px 0; box-shadow: inset 1px 0 0 #cfcbc3; }
.travellers-field .stepper button svg { width: 1.125rem; height: 1.125rem; }
.start-row { grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; }
#origin-hint { display: none; }

/* The date cards stand alone: no runway over them. */
.date-plane { display: none; }
.date-nights { padding-bottom: 1.5rem; }

/* The dock of cities sits on a white card. */
.dock { margin: 0; padding: 0.875rem 0.875rem 0.75rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; }
/* Sizes as the app's: its labels, its lower switches, its wider date cards. */
label, .label, legend { font-size: 0.9375rem; font-weight: 600; }
.segmented span, .segmented label:first-of-type span, .segmented label:last-of-type span { min-height: 1.875rem; padding: 0.25rem 0.5rem; font-size: 0.8125rem; }
.date-card.leaf { width: 7.25rem; }
.date-leaf b { font-size: 1.625rem; font-weight: 900; }
.date-leaf .leaf-month { font-size: 0.8125rem; }
.date-card .leaf-day { font-size: 0.75rem; padding: 0.125rem 0; }
/* The budget's slider is the system's: a thin line, green as far as the thumb, and a white lozenge to hold. */
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; }
input[type="range"]::-moz-range-track, input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; }
input[type="range"]::-webkit-slider-thumb { width: 2.375rem; height: 1.5rem; margin-top: calc(2px - 0.75rem); border: 0; border-radius: 999px; background: #fff; box-shadow: 0 0.5px 4px rgb(0 0 0 / 0.12), 0 4px 10px rgb(0 0 0 / 0.14); }
input[type="range"]::-moz-range-thumb { width: 2.375rem; height: 1.5rem; border: 0; border-radius: 999px; background: #fff; box-shadow: 0 0.5px 4px rgb(0 0 0 / 0.12), 0 4px 10px rgb(0 0 0 / 0.14); }
.budget-head output { font-weight: 900; }
.budget-scale { margin-top: 0.125rem; font-size: 0.8125rem; font-weight: 500; }

/* Results as the app's. The head: the title, one line of words under it, "Change" beside. */
.title-badge { display: none; }
#sub.is-line, .is-line { font-size: 1.0625rem; line-height: 1.4; color: var(--ink-2); }
#change { min-height: 2.875rem; padding: 0 1.0625rem; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--surface); font-size: 1.0625rem; font-weight: 500; color: var(--ink); }
/* While it searches there is one thing to look at, the city panel: no strip with a hopping plane. (Only the
   results' own strip: the introduction's third scene is drawn with the same class and must stay.) */
#loader { display: none; }
/* A card: no arrow under its picture; open, no number beside its name. */
.rank .chevron { display: none; }
.trip-row[aria-expanded="true"] .rank { display: none; }
.trip-row[aria-expanded="true"] .place, .trip-row[aria-expanded="true"] .split, .trip-row[aria-expanded="true"] .weather, .trip-row[aria-expanded="true"] .stay { grid-column: 1 / -1; }
.trip-row[aria-expanded="true"] .place { grid-column: 1 / -2; }
/* The split between flight and hotel is a thick band, its plane a white knob on it. */
.split-bar { height: 1.125rem; gap: 0; margin: 0.375rem 0 0.25rem; }
.split-bar .f { border-radius: 999px 0 0 999px; }
.split-bar .h { border-radius: 0 999px 999px 0; }
.split-bar .join { width: 1.125rem; height: 1.125rem; margin: -0.5625rem 0 0 -0.5625rem; border-width: 1.5px; }
/* The two prices under it: a plain sign, the figure, a note. */
.cost-icon, .cost.f .cost-icon, .cost.h .cost-icon { width: auto; height: auto; background: none; border-radius: 0; }
.cost-icon svg { width: 1.125rem; height: 1.125rem; }
.cost b { font-size: 1rem; font-weight: 700; }
/* The weather: a sign, the low in blue, a band from sky to sand, the high, and the rain in words. */
.wx { width: 1.375rem; height: 1.375rem; }
.wx-low { font-size: 1rem; font-weight: 600; color: #3378bf; }
.wx-high { font-size: 1rem; }
.wx-bar { width: 3.5rem; height: 5px; border-radius: 999px; background: linear-gradient(to right, #8cc3dd, #e2a866); }
.wx-bar i { display: none; }
.wx-days i { display: none; }
/* The deck's pager: two round arrows and where it is. */
.deck-nav { gap: 2rem; }
.deck-count { font-size: 1.125rem; font-weight: 500; }

/* A closed card: the split and the weather run the card's whole width, under the picture too. */
.split, .weather { grid-column: 1 / -1; }
/* A flight's line has no dots at its ends. */
.leg-track { background: radial-gradient(circle, var(--control-border) 0 1px, transparent 1.3px) 2px center / 7px 3px repeat-x; }
/* A route's total, large. */
.sum-total b { font-size: 2.5rem; font-weight: 900; }
.sum-total span { font-size: 1.0625rem; font-weight: 400; }

/* The calendar is a sheet over the page, as the app's: its name and "Done", the stay in words, the week's letters,
   then a year of months to scroll. */
.calendar { position: fixed; z-index: 40; inset: calc(env(safe-area-inset-top, 0px) + 2.75rem) 0 0; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--ground); border: 0; border-radius: 28px 28px 0 0; box-shadow: 0 0 0 100vmax rgb(20 60 90 / 0.35), 0 -8px 30px rgb(0 0 0 / 0.2); animation: cal-up 380ms var(--ease-out) both; }
@keyframes cal-up { from { translate: 0 100%; } }
.calendar[hidden] { display: none; }
.cal-top { flex: none; padding: 1rem var(--gutter) 0.5rem; border-bottom: 1px solid var(--rule); }
.cal-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.cal-ask { grid-column: 2; font-size: 1.0625rem; font-weight: 600; }
.cal-done { justify-self: end; min-height: 2.75rem; padding: 0 1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; font-size: 1.0625rem; font-weight: 600; color: var(--ink); }
.cal-count { display: block; margin: 0.875rem 0 0.375rem; text-align: center; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.cal-count.is-asking { color: var(--accent); }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekday { padding: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0; }
.cal-months { flex: 1; min-height: 0; display: block; margin: 0; padding: 1.25rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 2rem); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.cal-month { margin-bottom: 1.375rem; scroll-margin-top: 1.25rem; }
.cal-month h3 { margin: 0 0 0.5rem; font-size: 1.375rem; font-weight: 900; text-align: left; }
.cal-day { font-size: 1.0625rem; }
@media (prefers-reduced-motion: reduce) { .calendar { animation: none; } }

/* Sign in with Google: Google's own button, seen and untouched (hidden or stretched, Chrome ignores a press on it). */
.google-button { justify-self: stretch; display: grid; place-items: center; min-height: 2.75rem; margin-top: 0.5rem; color-scheme: light; }
.google-real { display: grid; place-items: center; }

/* The wait: the game's place, and the button that swaps it with the city panel. */
.game { margin: 0 var(--gutter) 0.875rem; }
.wait-switch { justify-self: start; display: inline-flex; align-items: center; gap: 0.375rem; height: 2.25rem; margin: 0 var(--gutter) 0.875rem; padding: 0 0.75rem 0 0.625rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.wait-switch svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wait-switch[hidden], .game[hidden] { display: none; }

/* The saved list as the app's. */
.saved-compare, .saved-stay, .saved-line, .saved-on, .saved-actions { grid-column: 1 / -1; }
.saved-compare { font-size: 0.8125rem; font-weight: 600; }
.saved-compare .is-cheapest { color: var(--good); }
.saved-compare.is-cheapest .saved-bar i { background: var(--good); }
.saved-stay { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.saved-stay svg { flex: none; width: 1.125rem; height: 1.125rem; margin-top: 0.125rem; fill: var(--ink); }
.saved-line { font-size: 0.9375rem; color: var(--ink-2); }
.saved-on { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.saved-on svg { width: 0.9375rem; height: 0.9375rem; fill: var(--ink-2); }
.saved-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.saved-actions button { min-height: 2.875rem; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 10px; font-size: 1.0625rem; font-weight: 500; color: var(--ink); }
.saved-row .rank.has-badge { grid-row: auto; }

/* The hotel's part of a card as the app's. Its block: a larger photo, the name, the stars, the rating in words. */
.hotel { grid-template-columns: 5.25rem minmax(0, 1fr); }
.hotel img, .hotel .no-photo { width: 5.25rem; height: 5.25rem; }
.score.is-words { font-size: 0.9375rem; font-weight: 600; color: var(--accent); }
.amenities { margin-top: 0.625rem; }
/* The two pills that open the map and the pictures say their thing on one line. */
.hotel-where { border-color: var(--rule); font-size: 0.9375rem; font-weight: 600; }
.hotel-where span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(0.6875rem, 3.1vw, 0.9375rem); }
/* The map: how far, in a pill at its top; "Move the map" and the way back in its lower corners; a round mark for the hotel. */
.hotel-map-picture { cursor: default; touch-action: auto; }
.hotel-map.is-moving .hotel-map-picture { cursor: grab; touch-action: none; }
.map-far { position: absolute; top: 0.5rem; left: 50%; translate: -50% 0; padding: 0.125rem 0.625rem; background: #fff; border: 1.5px solid var(--accent); border-radius: 999px; font-size: 0.875rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); pointer-events: none; }
.map-move { position: absolute; left: 0.5rem; bottom: 0.5rem; display: inline-flex; align-items: center; gap: 0.375rem; height: 2.25rem; padding: 0 0.625rem; background: rgb(255 255 255 / 0.94); border: 1px solid rgb(91 104 117 / 0.4); border-radius: 10px; font-size: 0.8125rem; font-weight: 700; color: var(--ink); }
.map-move svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.map-move[hidden] { display: none; }
.hotel-map > .map-zoom { position: absolute; right: 0.5rem; bottom: 0.5rem; }
.map-credit { right: 3.25rem; bottom: 0.5rem; border-radius: 6px; }
.hotel-map .span { stroke-width: 7; stroke-dasharray: 0.1 15; }
.hotel-map .span-edge { display: none; }
.hotel-map .pin circle { fill: var(--accent); stroke: #fff; stroke-width: 3; filter: drop-shadow(0 2px 2px rgb(34 48 60 / 0.4)); }
.hotel-map .centre-name { font-size: 19px; font-weight: 600; }
.map-open { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.375rem; font-size: 0.9375rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.map-open svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* The pictures: wide ones to slide through, as the app's. */
.picture-strip img { width: 16.5rem; max-width: 86%; height: 11rem; aspect-ratio: auto; }
/* A long line in a pill must not widen the card it is in. */
.detail, .detail section { min-width: 0; max-width: 100%; }
.hotel-where { min-width: 0; max-width: 100%; overflow: hidden; }
.amenities { display: flex; flex-wrap: wrap; gap: 0.375rem; }

/* While the introduction plays, the header's way to it is not shown (its place is kept), as in the app. */
body:has(#intro:not([hidden])) #intro-open { visibility: hidden; }

/* A city of a route keeps its number when its card is open: a ring beside its name, as in the app. */
.trip-row.is-route[aria-expanded="true"] .rank { display: block; min-width: 0; grid-row: auto; }
.trip-row.is-route[aria-expanded="true"] .rank .rank-number { position: static; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; padding: 0; background: var(--surface); border: 2px solid var(--accent); border-radius: 50%; font-size: 0.875rem; font-weight: 800; color: var(--ink); }
.trip-row.is-route[aria-expanded="true"] .place { grid-column: 2 / -2; }
/* The pills of an open card: letters small enough for both halves to be read on a phone. */
.hotel-where { gap: 0.375rem; padding: 0.375rem 0.625rem; }
.hotel-where span { font-size: clamp(0.6875rem, 3.2vw, 0.8125rem); }
.hotel-where b { font-size: clamp(0.75rem, 3.4vw, 0.875rem); }
#search-form:focus { outline: none; }
/* The signs of what was asked, in the colours of their switches on the form. */
.fact.is-breakfast > svg .line { stroke: #a3703d; }
.fact.is-free > svg .line { stroke: var(--good); }
/* The picture of the search takes the whole width under the title, so "Change" beside the title does not squeeze it. */
#results .trip-summary { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 0.75rem; }
#results .trip-summary > div { display: contents; }
#results .trip-summary #results-sub { grid-column: 1 / -1; }
#results .trip-summary h1 { grid-area: 1 / 1; }
#results .trip-summary #change { grid-area: 1 / 2; width: auto; }
#results .trip-summary #results-sub { grid-row: 2; }
/* The winner's own button to book it, under its price and dates. */
.winner-book { width: min(100%, 22rem); margin-top: 0.75rem; }
.winner.is-new .winner-book { animation: enter 420ms var(--ease-out) 1050ms both; }
/* The calendar leaves keep a row to themselves at every width; the chips follow under them. */
#results-sub { display: grid; justify-items: start; gap: 0.5rem; }
#results-sub .stay { width: min(100%, 19rem); }
.sub-facts { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* The one-place form made to fit a phone's screen (fitForm in app.js makes the rem smaller): what is typed into keeps
   16 px, or Safari zooms the page on a press; and the search's rules stand side by side on one line. */
html.is-fit input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), html.is-fit select, html.is-fit textarea { font-size: 16px !important; }
@media (max-width: 520px) {
  .rule-note { min-width: 0; max-width: 100%; }
  .rule-note.is-line { flex-wrap: nowrap; overflow: hidden; }
  .rule-note.is-line .fact { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rule-note .rule-text { display: none; }
}
/* Nothing makes the page wider than the screen: a page that can be dragged sideways looks out of shape on a phone. */
html, body { overflow-x: clip; max-width: 100%; }
}

/* The form's options on one line: flights after 11:00, a hotel or none, and what may be asked of the hotel (breakfast,
   free cancellation). Each is a small tile, its sign above its name, painted when it is on. Without a hotel the two
   that ask something of it are dimmed where they stand, so nothing moves. A route has its own hours and always has
   hotels: only the last two show. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.option-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; align-items: stretch; }
.option-row .want { display: block; }
/* The sign at the top; its name in the middle of the room between the sign and the foot of the tile. */
.option-row .want-chip { display: grid; grid-template-rows: auto 1fr; justify-items: center; gap: 0.125rem; width: 100%; height: 100%; min-height: 4.75rem; padding: 0.4375rem 0.1875rem 0.25rem; border-radius: 12px; text-align: center; }
.option-row .want-art { width: 2.125rem; height: 2.125rem; }
.option-row .want-words { align-self: center; font-size: 0.6875rem; font-weight: 650; line-height: 1.15; overflow-wrap: normal; word-break: keep-all; hyphens: none; }
.wants.is-off .needs-hotel { opacity: 0.38; pointer-events: none; }
.wants.is-route .only-one { display: none; }
/* The form's button is a little lower, which leaves the rest of a one-place form more room. */
#search-form #submit { min-height: 2.875rem; padding-block: 0.5rem; }
/* The hotel's name is the switch's own words: its legend is for a screen reader only. */
#wants-field > legend { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The list under "Leaving from" is as wide as a city's row needs, not as narrow as its field. */
#origin-list { width: max(100%, min(19rem, calc(100vw - 2 * var(--gutter)))); }
/* A route's three rules: short, a little smaller, side by side on one line where they fit (they wrap where they do not). */
.rule-note.is-three { gap: 0.25rem; }
.rule-note.is-three .fact { gap: 0.1875rem; min-height: 1.75rem; padding: 0.125rem 0.3125rem; font-size: 0.65625rem; letter-spacing: -0.005em; white-space: nowrap; }
.rule-note.is-three .fact > svg { width: 0.75rem; height: 0.75rem; }

