:root {
  --bg: #0b1220;
  --bg-elev: #121a2b;
  --line: #2a3650;
  --text: #e8eefc;
  --muted: #9aa8c3;
  --primary: #5b8cff;
  --primary-2: #3dd6c6;
  --danger: #ff6b7a;
  --ok: #3ecf8e;
  --warn: #f0b429;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 10% -10%, rgba(91, 140, 255, 0.18), transparent 55%),
    radial-gradient(700px 400px at 90% 0%, rgba(61, 214, 198, 0.12), transparent 50%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  box-sizing: border-box;
  width: 100%;
  max-width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px 18px 24px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: clip;
  transition: max-width 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.app:has(.results-wrap.map-open) {
  max-width: min(1680px, 100%);
}

@media (prefers-reduced-motion: reduce) {
  .app {
    transition: none;
  }
}

.app > main {
  flex: 1 0 auto;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 22px;
}

.brand-mark {
  color: var(--primary-2);
}

.brand-plus {
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links .active {
  color: var(--text);
}

.session-group {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.session {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.session.ok {
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.35);
}

.session.bad {
  color: var(--danger);
  border-color: rgba(255, 107, 122, 0.35);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.lede {
  margin: 0 0 22px;
  color: var(--muted);
  max-width: 62ch;
}

.lede a {
  color: var(--primary-2);
}

.search-card {
  background:
    linear-gradient(165deg, rgba(61, 214, 198, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 55%),
    var(--bg-elev);
  border: 1px solid rgba(91, 140, 255, 0.22);
  border-radius: 20px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 22px 50px rgba(0, 0, 0, 0.28);
  padding: 14px;
  display: grid;
  gap: 12px;
  margin-bottom: 8px;
}

.search-mode-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-mode {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(8, 12, 22, 0.55);
  border: 1px solid rgba(42, 54, 80, 0.9);
  width: fit-content;
}

.search-mode-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
}

.search-mode-btn:hover {
  color: var(--text);
}

.search-mode-btn.is-active {
  background: rgba(91, 140, 255, 0.16);
  color: var(--text);
}

.flight-fields .field {
  min-width: 0;
}

.flight-fields .flight-date-field {
  padding-left: 12px;
  padding-right: 12px;
}

.flight-search-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 10px 2px;
}

.flight-trip-type {
  display: inline-flex;
  gap: 2px;
  margin: 0;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(42, 54, 80, 0.9);
}

.flight-trip-type-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.flight-trip-type-btn:hover {
  color: var(--text);
}

.flight-trip-type-btn.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.flight-fields .flight-date-field .date-ranges-field {
  width: 100%;
}

.flight-fields .flight-trips-field {
  min-width: 0;
}

.flight-fields .flight-date-field .date-ranges-surface {
  padding-top: 0;
  min-height: 24px;
}

.flight-fields .flight-date-field .date-ranges-trigger {
  font-size: 14px;
}

.flight-fields .flight-date-field .date-ranges-value {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.flight-fields .flight-date-field .date-ranges-value[hidden] {
  display: none !important;
}

.date-single-panel {
  padding: 12px;
}

.flight-fields input[type="date"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-size: 14px;
  font-weight: 550;
  box-sizing: border-box;
}

.flight-fields input[type="date"]::-webkit-calendar-picker-indicator {
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
}

.flight-fields .search-btn,
.flight-fields .stop-btn {
  min-width: 100px;
  max-width: 120px;
  justify-self: stretch;
}

.flight-recent-wrap {
  position: relative;
}

.flight-recent-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: #64748b;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.flight-recent-btn:hover {
  background: #738297;
}

.flight-recent-btn[aria-expanded="true"] {
  background: #556379;
}

.flight-recent-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-top: 1px;
}

.flight-recent-panel {
  left: 0;
  right: auto;
  min-width: min(340px, 80vw);
  max-height: min(360px, 60vh);
  overflow: auto;
}

.flight-results {
  margin: 28px 0 20px;
  /* Allow filter dropdowns to escape the card; table still scrolls below. */
  overflow: visible;
  position: relative;
  z-index: 3;
}

/* Award travel heading sits directly above the card — don't double-space. */
.hotel-results-heading + .flight-results,
#flightResultsHeading + #flightResults,
#flightResultsHeading + #statusBar + .progress + #flightResults {
  margin-top: 0;
}

#flightResultsHeading + #statusBar {
  margin-top: 8px;
}

#flightResultsHeading + #statusBar + .progress {
  margin-bottom: 12px;
}

.flight-results .results-meta {
  border-radius: var(--radius) var(--radius) 0 0;
}

.flight-results .table-scroll {
  border-radius: 0 0 var(--radius) var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
}

.flight-leg-section + .flight-leg-section {
  border-top: 1px solid var(--line);
}

.flight-leg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px 8px;
}

.flight-leg-header .flight-results-title {
  margin: 0;
}

.flight-leg-header .results-pager {
  margin-left: auto;
}

.flight-results .flight-leg-section .table-scroll {
  border-radius: 0;
}

.hotel-results-heading:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 8px;
}

.hotel-results-heading[hidden],
#flightResultsHeading[hidden],
#hotelResultsHeading[hidden],
#flightResults[hidden],
#hotelResults[hidden] {
  display: none !important;
}

#flightResults:not([hidden]),
#hotelResults:not([hidden]) {
  display: block !important;
}

.best-combo-notice {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(210, 160, 70, 0.45);
  background: rgba(210, 160, 70, 0.12);
  color: #f0e2c4;
  font-size: 13px;
  line-height: 1.4;
}

.best-combo-notice[hidden] {
  display: none !important;
}

.flight-results-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 15px;
}

.flight-filter-bar {
  display: grid;
  gap: 8px;
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 12, 22, 0.35);
  overflow: visible;
  position: relative;
  z-index: 5;
}

.flight-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
}

.flight-filter {
  position: relative;
  z-index: 1;
}

.flight-filter:has(.flight-filter-trigger[aria-expanded="true"]),
.flight-filter:focus-within {
  z-index: 30;
}

.flight-filter-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(91, 140, 255, 0.45);
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.flight-filter-trigger:hover,
.flight-filter-trigger[aria-expanded="true"],
.flight-filter-trigger.has-filter {
  background: rgba(91, 140, 255, 0.1);
}

.flight-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #0b1220;
  font-size: 11px;
  font-weight: 800;
}

.flight-filter-chevron {
  opacity: 0.8;
  font-size: 11px;
}

.flight-filter-panel {
  position: fixed;
  z-index: 120;
  min-width: 220px;
  max-width: min(320px, 80vw);
  max-height: min(280px, 60vh);
  overflow: auto;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f1728;
  box-shadow: var(--shadow);
}

.flight-filter-panel-sm {
  min-width: 200px;
}

.flight-filter-panel-times {
  min-width: 280px;
  max-width: min(360px, 90vw);
  max-height: min(420px, 70vh);
}

.flight-filter-panel-datetime {
  width: min(340px, 92vw);
  max-width: min(340px, 92vw);
  max-height: min(520px, 75vh);
}

.flight-datetime-presets {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.flight-datetime-presets input,
.flight-datetime-presets select {
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  width: 100%;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background-color: #172033;
  color: var(--text);
  color-scheme: dark;
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
}

.flight-datetime-presets select {
  padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa8c3' d='M2.2 4.2 6 8l3.8-3.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
}

.flight-datetime-presets input::placeholder {
  color: rgba(154, 168, 195, 0.7);
}

.flight-datetime-presets input:focus,
.flight-datetime-presets select:focus {
  outline: none;
  border-color: var(--primary);
}

.flight-datetime-presets .ghost-btn {
  height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 12px;
}

.flight-datetime-preset-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.flight-datetime-filter {
  display: grid;
  gap: 12px;
  padding: 0 2px 4px;
}

.flight-datetime-section {
  display: grid;
  gap: 6px;
}

.flight-datetime-pairs {
  display: grid;
  gap: 8px;
}

.flight-datetime-pair {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 6px;
  align-items: end;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  box-sizing: border-box;
}

.flight-datetime-pair-top {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.flight-datetime-kind {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  width: 100%;
  max-width: 180px;
}

.flight-datetime-kind-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  line-height: 28px;
}

.flight-datetime-kind-btn + .flight-datetime-kind-btn {
  border-left: 1px solid var(--line);
}

.flight-datetime-kind-btn.is-active {
  background: rgba(125, 170, 255, 0.18);
  color: var(--text);
}

.flight-datetime-kind-btn:hover:not(.is-active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.flight-datetime-pair label,
.flight-datetime-date {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.flight-datetime-date {
  grid-column: 1 / -1;
}

.flight-datetime-pair select,
.flight-datetime-pair input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0 6px;
  font: inherit;
  font-size: 12px;
  line-height: 28px;
}

.flight-datetime-pair input[data-datetime-from],
.flight-datetime-pair input[data-datetime-to] {
  font-variant-numeric: tabular-nums;
  text-align: center;
  letter-spacing: 0.02em;
}

.flight-datetime-which {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
  align-self: end;
}

.flight-datetime-which-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 8px;
  min-width: 36px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  line-height: 28px;
}

.flight-datetime-which-btn + .flight-datetime-which-btn {
  border-left: 1px solid var(--line);
}

.flight-datetime-which-btn.is-active {
  background: rgba(125, 170, 255, 0.18);
  color: var(--text);
}

.flight-datetime-which-btn:hover:not(.is-active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.flight-datetime-pair-remove {
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  width: 30px;
  height: 30px;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.flight-datetime-pair-remove:hover {
  color: var(--text);
  border-color: var(--text);
}

.flight-datetime-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 2px 0;
}

.flight-datetime-add {
  justify-self: start;
  padding: 4px 8px;
  font-size: 12px;
}

.results th.select-col-th,
.results td.select-col {
  text-align: center;
  width: 5.5rem;
  padding-left: 8px;
  padding-right: 8px;
}

.results.hide-select-col th.select-col-th,
.results.hide-select-col td.select-col {
  display: none;
}

.results td.select-col {
  vertical-align: middle;
}

.trip-select-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.trip-select-btn:hover {
  color: var(--text);
  border-color: rgba(125, 170, 255, 0.45);
}

.trip-select-btn.is-selected {
  color: #dce9ff;
  border-color: rgba(96, 149, 255, 0.8);
  background: rgba(59, 112, 214, 0.28);
}

.results tr.result-row.is-trip-selected td {
  background: rgba(59, 112, 214, 0.12);
}

.most-optimal-tag {
  display: inline-block;
  margin: 3px 0 1px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(46, 160, 90, 0.55);
  background: rgba(46, 160, 90, 0.16);
  color: #b7e6c6;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  white-space: nowrap;
  cursor: default;
  vertical-align: middle;
}

.results tr.result-row.is-best-combo:hover td {
  background: rgba(46, 160, 90, 0.18);
}

.results tr.result-row.is-best-combo.is-trip-selected:hover td,
.results tr.result-row.is-best-combo.open:hover td {
  background: rgba(46, 160, 90, 0.24);
}

.trip-summary {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 70;
  width: auto;
  max-width: 440px;
  margin-inline: auto;
  pointer-events: none;
  box-sizing: border-box;
}

.trip-summary[hidden] {
  display: none !important;
}

body:has(#tripSummary:not([hidden])) {
  padding-bottom: 132px;
}

body:has(#tripSummaryTimeline:not([hidden])) {
  padding-bottom: 200px;
}

.trip-summary-inner {
  pointer-events: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) auto;
  grid-template-areas:
    "main lines actions"
    "timeline timeline timeline";
  gap: 6px 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(96, 149, 255, 0.35);
  background: rgba(12, 18, 32, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
  min-width: 0;
}

.trip-summary-main {
  grid-area: main;
}

.trip-summary-lines {
  grid-area: lines;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.trip-summary-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  align-self: center;
}

.trip-timeline {
  grid-area: timeline;
  min-width: 0;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.trip-timeline[hidden] {
  display: none !important;
}

.trip-timeline-flow {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 18px minmax(0, 0.9fr) 18px minmax(0, 1.2fr);
  align-items: stretch;
  gap: 0 2px;
  min-width: 0;
}

.trip-timeline-flow[data-stages="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.trip-timeline-flow[data-stages="2"] {
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
}

.trip-timeline-stage {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 5px;
  padding: 2px 2px 0;
}

.trip-timeline-stage-label {
  color: rgba(154, 168, 195, 0.85);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.trip-timeline-stage.is-ret .trip-timeline-stage-label,
.trip-timeline-stage.is-ret .trip-timeline-stage-day {
  text-align: right;
}

.trip-timeline-stage.is-stay .trip-timeline-stage-label,
.trip-timeline-stage.is-stay .trip-timeline-stage-day {
  text-align: center;
}

.trip-timeline-stage-graphic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(28px, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-height: 34px;
}

.trip-timeline-end {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.trip-timeline-end.is-arr {
  text-align: right;
}

.trip-timeline-code {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.trip-timeline-time {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trip-timeline-flight-line {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 36px;
  height: 22px;
  padding-bottom: 5px;
  box-sizing: border-box;
}

.trip-timeline-duration {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
}

.trip-timeline-flight-track {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7daaff, rgba(125, 170, 255, 0.35));
}

.trip-timeline-stage.is-ret .trip-timeline-flight-track {
  background: linear-gradient(90deg, #9ee0b5, rgba(158, 224, 181, 0.35));
}

.trip-timeline-flight-dot {
  position: absolute;
  bottom: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-sizing: border-box;
  z-index: 1;
}

.trip-timeline-flight-dot.is-dep {
  left: 0;
  background: #7daaff;
  box-shadow: 0 0 0 2px rgba(12, 18, 32, 0.95);
}

.trip-timeline-flight-dot.is-arr {
  right: 0;
  background: rgba(12, 18, 32, 0.95);
  border: 2px solid #7daaff;
}

.trip-timeline-stage.is-ret .trip-timeline-flight-dot.is-dep {
  background: #9ee0b5;
}

.trip-timeline-stage.is-ret .trip-timeline-flight-dot.is-arr {
  border-color: #9ee0b5;
}

.trip-timeline-stage-day {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.25em;
}

.trip-timeline-stay-chip {
  display: grid;
  gap: 2px;
  align-content: center;
  justify-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(96, 149, 255, 0.12);
  border: 1px solid rgba(125, 170, 255, 0.28);
  box-sizing: border-box;
}

.trip-timeline-stage.is-gap .trip-timeline-stay-chip {
  background: rgba(255, 255, 255, 0.03);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.16);
}

.trip-timeline-stay-nights {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.trip-timeline-stay-range {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.trip-timeline-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 18px;
}

.trip-timeline-connector span {
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.trip-save-btn {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #f2a4b4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.trip-save-btn:hover:not(:disabled) {
  background: rgba(242, 164, 180, 0.12);
  border-color: rgba(242, 164, 180, 0.35);
}

.trip-save-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.trip-save-btn.is-saved {
  color: #ff6b8a;
  background: rgba(255, 107, 138, 0.14);
  border-color: rgba(255, 107, 138, 0.4);
}

.trip-save-btn.is-saved .trip-save-icon path {
  fill: currentColor;
  stroke: currentColor;
}

.trip-summary-heading {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.trip-summary-total {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.trip-summary-line {
  display: grid;
  grid-template-columns: 3.75rem minmax(0, 1fr) auto;
  gap: 6px;
  align-items: baseline;
  min-width: 0;
}

.trip-summary-line > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-summary-line strong {
  color: var(--text);
  font-weight: 650;
}

.trip-summary-line .trip-summary-price {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trip-summary-line.is-missing {
  opacity: 0.7;
}

@media (max-width: 800px) {
  .trip-summary {
    max-width: min(360px, 100%);
  }

  .trip-summary-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main actions"
      "lines lines"
      "timeline timeline";
    gap: 4px 8px;
    padding: 8px 10px;
  }

  .trip-summary-actions {
    justify-self: end;
    align-self: start;
  }

  .trip-summary-lines {
    font-size: 11px;
  }

  .trip-summary-total {
    font-size: 14px;
  }

  body:has(#tripSummary:not([hidden])) {
    padding-bottom: 118px;
  }

  body:has(#tripSummaryTimeline:not([hidden])) {
    padding-bottom: 168px;
  }

  .trip-timeline-flow,
  .trip-timeline-flow[data-stages="2"],
  .trip-timeline-flow[data-stages="3"] {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .trip-timeline-connector {
    padding-top: 0;
    height: 8px;
  }

  .trip-timeline-connector span {
    width: 1px;
    height: 100%;
  }

  .trip-timeline-stage.is-ret .trip-timeline-stage-label,
  .trip-timeline-stage.is-ret .trip-timeline-stage-day,
  .trip-timeline-stage.is-stay .trip-timeline-stage-label,
  .trip-timeline-stage.is-stay .trip-timeline-stage-day {
    text-align: left;
  }

  .trip-timeline-stay-chip {
    justify-items: start;
  }
}

.saved-panel {
  margin-top: 8px;
}

.saved-body {
  display: grid;
  gap: 14px;
  padding: 4px 0 28px;
}

.saved-itinerary {
  display: grid;
  gap: 8px;
}

.saved-itinerary.is-expanded {
  gap: 12px;
}

.saved-itinerary .flight-results {
  margin-top: 4px;
  margin-bottom: 8px;
}

.saved-itinerary .hotel-results-heading {
  margin-top: 4px;
}

.saved-itinerary .results-wrap {
  margin-bottom: 0;
}

.saved-trip-banner {
  position: relative;
  width: 100%;
  margin: 0;
  pointer-events: auto;
  cursor: pointer;
}

.saved-trip-banner:hover {
  border-color: rgba(96, 149, 255, 0.55);
}

.saved-itinerary.is-expanded .saved-trip-banner {
  border-color: rgba(96, 149, 255, 0.55);
}

.saved-trip-banner .saved-card-when {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.saved-expand-hint {
  margin-left: 8px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.saved-expand-caret {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  padding: 0 4px;
}

.saved-itinerary-details {
  display: grid;
  gap: 8px;
}

.saved-add-hotel-btn {
  appearance: none;
  display: grid;
  gap: 2px;
  justify-items: center;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed rgba(125, 170, 255, 0.35);
  border-radius: 10px;
  background: rgba(96, 149, 255, 0.06);
  color: inherit;
  text-align: center;
  cursor: pointer;
}

.saved-add-hotel-btn:hover {
  background: rgba(96, 149, 255, 0.12);
  border-color: rgba(125, 170, 255, 0.55);
}

.saved-add-hotel-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.saved-add-hotel-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.flight-time-filter {
  display: grid;
  gap: 14px;
}

.flight-dow-filter {
  display: grid;
  gap: 12px;
  padding: 0 2px 4px;
}

.flight-dow-section {
  display: grid;
  gap: 4px;
}

.flight-dow-section .col-filter-list {
  max-height: none;
}

.flight-time-section-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 2px 0 6px;
}

.flight-time-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
  padding: 0 2px 4px;
}

.flight-time-range label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.flight-time-range input[type="time"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}

.flight-filter-number {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  padding: 4px 2px 8px;
}

.flight-filter-number input {
  width: 110px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}

.flight-row .hotel-code {
  margin-top: 2px;
}

.flight-next-day {
  margin-left: 1px;
  font-size: 0.7em;
  font-weight: 650;
  line-height: 0;
  vertical-align: super;
  color: var(--muted);
}

.search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.search-footer .map-footer-credit {
  margin-left: auto;
}

.search-primary {
  background: rgba(8, 12, 22, 0.55);
  border: 1px solid rgba(42, 54, 80, 0.9);
  border-radius: 16px;
  padding: 6px;
  overflow: visible;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0;
  align-items: stretch;
}

.fields.flight-fields {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 1.7fr) auto;
}

.flight-hotel-near {
  border-top: 1px solid rgba(42, 54, 80, 0.85);
}

.flight-hotel-near[hidden] {
  display: none !important;
}

.flight-hotel-near-field {
  padding: 10px 14px;
}

.flight-hotel-near-field:not(:last-child)::after {
  display: none;
}

.seats-api-cost {
  margin: 0;
  padding: 4px 14px 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.seats-api-cost[hidden] {
  display: none !important;
}

.field {
  display: grid;
  gap: 4px;
  padding: 10px 14px;
  position: relative;
  color: var(--muted);
  min-width: 0;
}

.field:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: rgba(42, 54, 80, 0.85);
}

.field-sm {
  max-width: none;
}

.field-label {
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.destination-field {
  position: relative;
}

.iata-field .suggest-panel {
  z-index: 50;
}

.iata-tag-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  cursor: text;
}

.iata-tags {
  display: contents;
}

.iata-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  padding: 2px 4px 2px 8px;
  border-radius: 999px;
  background: rgba(94, 129, 244, 0.16);
  border: 1px solid rgba(94, 129, 244, 0.35);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.iata-tag-remove {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.iata-tag-remove:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.iata-tag-input {
  flex: 1 1 4.5rem;
  min-width: 4.5rem;
  width: auto !important;
}

.iata-code {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary-2);
}

.destination-field:focus-within,
.field:focus-within {
  background: rgba(91, 140, 255, 0.06);
  border-radius: 12px;
}

.destination-field:focus-within::after,
.field:focus-within::after {
  opacity: 0;
}

.suggest-panel {
  position: absolute;
  left: 8px;
  right: 8px;
  top: calc(100% + 8px);
  z-index: 40;
  background: #0f1728;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.suggest-section {
  padding: 8px 0 4px;
}

.suggest-section-title {
  padding: 4px 12px 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.suggest-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 9px 12px;
  cursor: pointer;
  display: grid;
  gap: 2px;
  font: inherit;
}

.suggest-item:hover,
.suggest-item.active {
  background: rgba(91, 140, 255, 0.12);
}

.suggest-primary {
  font-size: 14px;
  font-weight: 650;
}

.suggest-secondary {
  font-size: 12px;
  color: var(--muted);
}

.suggest-item-country .suggest-primary {
  color: #d7e3ff;
}

.suggest-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.recent-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
}

.recent-row .suggest-item {
  min-width: 0;
}

.recent-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 36px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.recent-remove:hover {
  color: var(--danger);
  background: rgba(255, 107, 122, 0.1);
}

.field input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 0;
  padding: 2px 0 0;
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  font-weight: 550;
  min-width: 0;
}

.field input::placeholder {
  color: rgba(154, 168, 195, 0.7);
  font-weight: 450;
}

.field input:focus {
  outline: none;
}

.field input[type="date"],
.field input[type="number"] {
  color-scheme: dark;
}

.chip input,
.chip select {
  width: auto;
  min-width: 0;
  max-width: 6.5rem;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.chip input:focus,
.chip select:focus {
  outline: none;
}

.chip select {
  cursor: pointer;
  max-width: 9rem;
}

.search-btn {
  align-self: stretch;
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  margin: 2px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: #061018;
  background: linear-gradient(160deg, #5ef0d8 0%, var(--primary-2) 45%, #6ea0ff 120%);
  cursor: pointer;
  min-height: 56px;
  min-width: 108px;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.search-btn:hover {
  filter: brightness(1.05);
}

.search-btn:active {
  transform: translateY(1px);
}

.search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

.stop-btn {
  align-self: stretch;
  border: 1px solid rgba(255, 107, 122, 0.45);
  border-radius: 12px;
  padding: 0 22px;
  margin: 2px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  color: var(--danger);
  background: rgba(255, 107, 122, 0.12);
  cursor: pointer;
  min-height: 56px;
  min-width: 108px;
}

.stop-btn:hover {
  background: rgba(255, 107, 122, 0.2);
}

.search-filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 2px 4px;
  min-width: 0;
}

.search-filters[hidden] {
  display: none !important;
}

.filters-label {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(154, 168, 195, 0.75);
  text-align: center;
  padding: 0;
}

.filters-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 0;
  min-width: 0;
  width: 100%;
}

.chip,
.dow-filter {
  flex: 1 1 0;
  min-width: 0;
}

.dow-filter {
  position: relative;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(42, 54, 80, 0.95);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(8, 12, 22, 0.45);
  min-height: 40px;
}

.chip:focus-within {
  border-color: rgba(91, 140, 255, 0.55);
  background: rgba(91, 140, 255, 0.08);
}

.chip-label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.chip.check {
  flex: 0 1 auto;
  cursor: pointer;
  gap: 8px;
}

.chip.check input {
  width: auto;
  max-width: none;
  accent-color: var(--primary-2);
}

.chip-sm {
  flex: 0 0 auto;
  padding: 8px 8px;
  gap: 5px;
}

.chip-sm input {
  width: 3.25rem;
  max-width: 3.25rem;
  text-align: center;
}


.dow-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 1px solid rgba(42, 54, 80, 0.95);
  border-radius: 12px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  background: rgba(8, 12, 22, 0.45);
  cursor: pointer;
  min-height: 40px;
}

.dow-trigger[aria-expanded="true"],
.dow-trigger.has-filter {
  border-color: rgba(91, 140, 255, 0.55);
  color: var(--text);
  background: rgba(91, 140, 255, 0.08);
}

.dow-trigger-meta:not(:empty)::before {
  content: "·";
  margin-right: 6px;
  opacity: 0.5;
}

.dow-chevron {
  font-size: 10px;
  opacity: 0.7;
}

.dow-panel {
  position: fixed;
  z-index: 120;
  width: min(280px, 80vw);
  max-height: min(320px, 60vh);
  overflow: auto;
  background: #0f1728;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px;
  user-select: none;
  -webkit-user-select: none;
}

.dow-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.dow-hint {
  font-size: 12px;
  color: var(--muted);
}

.dow-reset {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.dow-days {
  display: grid;
  gap: 2px;
}

.dow-days label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.dow-days label * {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.dow-days label input {
  pointer-events: none;
}

.dow-days label:hover {
  background: rgba(91, 140, 255, 0.08);
}

.dow-days input {
  width: auto;
  accent-color: var(--primary);
}

.status-bar {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 13px;
  min-height: 1.4em;
}

.status-bar.warn {
  color: var(--warn);
}

.status-bar.bad {
  color: var(--danger);
}

.status-bar.ok {
  color: var(--ok);
}

.session.reauth {
  padding: 0;
  overflow: hidden;
}

.session-reauth {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  color: var(--danger);
  font-weight: 650;
  white-space: nowrap;
}

.session-reauth:hover {
  background: rgba(255, 107, 122, 0.12);
  color: #ff8a96;
}

.progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.progress[hidden] {
  display: none !important;
}

.progress-track {
  flex: 1 1 auto;
  min-width: 0;
  height: 4px;
  background: #1c2740;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-2), var(--primary));
  transition: width 0.2s ease;
}

.progress-pct {
  flex: 0 0 auto;
  min-width: 3.25ch;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: right;
  line-height: 1;
}

.results-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 16, 28, 0.75);
  overflow: hidden;
}

.results-wrap.flight-results {
  overflow: visible;
}

.results-map-split {
  display: flex;
  align-items: stretch;
  min-height: 0;
  height: auto;
  width: 100%;
  transition:
    height 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    min-height 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.results-map-split > .table-scroll {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.results-map-pane {
  flex: 0 0 auto;
  width: 0;
  max-width: 0;
  min-width: 0;
  min-height: 0;
  opacity: 0;
  overflow: hidden;
  border-right: 0 solid var(--line);
  background: #e5e3df;
  transform: translateX(-18px) scale(0.985);
  transform-origin: left center;
  pointer-events: none;
  transition:
    width 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    max-width 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    min-width 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    min-height 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease,
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    border-right-width 0.48s ease;
}

.results-map-pane[hidden] {
  display: none !important;
}

.results-map-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  opacity: 0;
  transition: opacity 0.35s ease 0.12s;
}

.results-wrap.map-open .results-map-split {
  min-height: min(72vh, 780px);
  height: min(72vh, 780px);
}

.results-wrap.map-open .results-map-pane {
  width: 48%;
  max-width: 52%;
  min-width: 360px;
  min-height: 100%;
  height: 100%;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  border-right-width: 1px;
}

.results-wrap.map-open .results-map-frame {
  height: 100%;
  min-height: 0;
  opacity: 1;
}

.results-wrap.map-open .table-scroll {
  flex: 1 1 52%;
  min-width: 420px;
  height: 100%;
  max-height: none;
  overflow: auto;
  transition: flex-basis 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

#mapViewBtn.map-view-animating {
  animation: map-view-btn-pulse 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes map-view-btn-pulse {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(0.94);
  }
  70% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 960px) {
  .results-wrap.map-open .results-map-split {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  .results-wrap.map-open .results-map-pane {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: min(42vh, 360px);
    min-height: min(42vh, 360px);
    border-right-width: 0;
    border-bottom: 1px solid var(--line);
    transform: none;
  }

  .results-wrap.map-open .results-map-frame {
    height: 100%;
    min-height: min(42vh, 360px);
  }

  .results-wrap.map-open .table-scroll {
    flex: 1 1 auto;
    height: auto;
    max-height: min(50vh, 480px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .results-map-split,
  .results-map-pane,
  .results-map-frame,
  .results-wrap.map-open .table-scroll {
    transition: none !important;
  }

  #mapViewBtn.map-view-animating {
    animation: none !important;
  }
}

.results-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.results-meta #resultsLabel {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.results-failed {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  color: #e8a0a0;
  cursor: help;
  outline: none;
}

.results-failed-label {
  border-bottom: 1px dotted rgba(232, 160, 160, 0.7);
}

.results-failed-tip {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 80;
  min-width: 220px;
  max-width: min(420px, 70vw);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(232, 160, 160, 0.35);
  background: #1a1216;
  box-shadow: var(--shadow);
  color: var(--text);
  white-space: normal;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}

.results-failed:hover .results-failed-tip,
.results-failed:focus .results-failed-tip,
.results-failed:focus-within .results-failed-tip {
  display: block;
}

.results-failed-group + .results-failed-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.results-failed-msg {
  font-weight: 550;
}

.results-failed-msg strong {
  color: #e8a0a0;
  font-variant-numeric: tabular-nums;
}

.results-failed-hotels {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.results-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.results-tools .results-tool.dow-filter {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 240px;
}

.results-tools .dow-trigger {
  min-height: 34px;
  padding: 6px 10px;
}

.results-meta .ghost-btn {
  flex: 0 0 auto;
}

.results-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.results-pager {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: max-content;
}

.page-size-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.page-size-field select {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 28px 6px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 10px) calc(50% - 2px);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}

.page-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.page-jump {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.page-jump-input {
  width: 3.4rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 8px;
  padding: 4px 6px;
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  -moz-appearance: textfield;
}

.page-jump-input::-webkit-outer-spin-button,
.page-jump-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.page-jump-input:focus {
  outline: none;
  border-color: rgba(91, 140, 255, 0.65);
}

.pager-btn {
  padding: 6px 10px;
  min-width: 52px;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.ghost-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.price-optimal-btn-wrap {
  display: inline-flex;
  vertical-align: middle;
}

.price-optimal-btn-wrap[hidden] {
  display: none !important;
}

.price-optimal-btn-wrap.is-disabled {
  cursor: not-allowed;
}

.price-optimal-btn-wrap.is-disabled .ghost-btn:disabled {
  pointer-events: none;
}

.table-scroll {
  overflow: auto;
}

.results {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.results th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: #0e1626;
  position: sticky;
  top: 0;
}

.sort-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 4px 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sort-btn::after {
  content: "↕";
  opacity: 0.35;
  font-size: 10px;
}

.sort-btn.active {
  color: var(--text);
}

.sort-btn.active[data-dir="asc"]::after {
  content: "↑";
  opacity: 0.9;
}

.sort-btn.active[data-dir="desc"]::after {
  content: "↓";
  opacity: 0.9;
}

.sort-btn:hover {
  color: var(--text);
}

.col-filter-th {
  min-width: 88px;
}

.col-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
}

.col-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 4px 2px 4px 4px;
  cursor: pointer;
}

.col-filter-trigger:disabled {
  opacity: 0.45;
  cursor: default;
}

.col-filter-trigger:hover,
.col-filter-trigger[aria-expanded="true"],
.col-filter-trigger.has-filter {
  color: var(--text);
}

.col-filter-label {
  white-space: nowrap;
}

.col-filter-meta:not(:empty)::before {
  content: "·";
  margin-right: 4px;
  opacity: 0.5;
}

.col-filter-meta {
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
}

.col-filter .col-sort-btn {
  padding: 4px 2px;
  min-width: 1.1em;
  justify-content: center;
}

.col-filter .col-sort-btn:not(.active)::after {
  opacity: 0.35;
}

.col-filter-panel {
  position: fixed;
  z-index: 120;
  background: #0f1728;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px;
  max-height: min(320px, 60vh);
  overflow: auto;
  user-select: none;
  -webkit-user-select: none;
}

.col-filter-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.col-filter-hint {
  font-size: 12px;
  color: var(--muted);
}

.col-filter-mode {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  height: 30px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.col-filter-mode-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  line-height: 28px;
}

.col-filter-mode-btn + .col-filter-mode-btn {
  border-left: 1px solid var(--line);
}

.col-filter-mode-btn.is-active {
  background: rgba(125, 170, 255, 0.18);
  color: var(--text);
}

.col-filter-mode-btn:hover:not(.is-active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.col-filter-trigger.is-exclude.has-filter {
  color: #f0a0a0;
}

.col-filter-reset {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.col-filter-list {
  display: grid;
  gap: 2px;
}

.col-filter-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.col-filter-list label span {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.col-filter-list label input {
  pointer-events: none;
}

.col-filter-list label:hover {
  background: rgba(255, 255, 255, 0.04);
}

.col-filter-list input {
  accent-color: var(--primary);
}

.col-filter-empty {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  padding: 6px 4px;
}

.results td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(42, 54, 80, 0.65);
  vertical-align: middle;
}

.results tr:hover td {
  background: rgba(91, 140, 255, 0.05);
}

.results tr.result-row.map-jump-flash td {
  animation: map-jump-flash 0.9s ease;
}

@keyframes map-jump-flash {
  0% {
    background: rgba(91, 140, 255, 0.28);
  }
  100% {
    background: transparent;
  }
}

.results tr.result-row.open td {
  background: rgba(91, 140, 255, 0.08);
  border-bottom: 1px solid rgba(42, 54, 80, 0.45);
}

.results tr.detail-row > td {
  padding: 0 12px 20px;
  background: rgba(91, 140, 255, 0.04);
  border-bottom: 1px solid rgba(42, 54, 80, 0.65);
}

.results tr.detail-row[hidden] {
  display: none;
}

.detail-panel {
  margin-top: 10px;
  padding: 16px 14px 12px;
  border: 1px solid rgba(42, 54, 80, 0.55);
  border-radius: 12px;
  background: rgba(8, 12, 22, 0.35);
}

.detail-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 14px;
}

.detail-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(42, 54, 80, 0.65);
}

.detail-section-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.detail-grid-prices {
  margin-bottom: 12px;
}

.detail-grid-rates {
  margin-top: 0;
}

.detail-item dt {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.detail-item dd {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-top: 12px;
}

.rooms-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(42, 54, 80, 0.65);
}

.rooms-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.rooms-title-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.rooms-title-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(42, 54, 80, 0.65);
}

.rooms-section.collapsed .rooms-title-btn {
  margin-bottom: 0;
}

.rooms-title-chevron {
  flex: 0 0 12px;
  width: 12px;
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
}

.rooms-title-label {
  min-width: 0;
}

.rooms-body {
  margin-top: 0;
}

.rooms-status {
  font-size: 13px;
  color: var(--muted);
  padding: 2px 0 6px;
}

.rooms-status.bad {
  color: var(--danger);
}

.inventory-rooms-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0 0 8px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  border-radius: 6px;
}

.rooms-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 13px;
  table-layout: fixed;
}

.rooms-table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #0e1626;
}

.rooms-table th:nth-child(1) {
  width: 20%;
}

.rooms-table th:nth-child(2) {
  width: 36%;
}

.rooms-table th:nth-child(3) {
  width: 8%;
}

.rooms-table th:nth-child(4) {
  width: 26%;
}

.rooms-table th:nth-child(5) {
  width: 10%;
}

.results .rooms-table td {
  padding: 12px;
  border: 0;
  border-bottom: 1px solid rgba(42, 54, 80, 0.5);
  vertical-align: middle;
  line-height: 1.35;
  background: transparent;
}

.results .rooms-table .room-group-row td {
  padding: 12px;
  border-bottom: 1px solid rgba(42, 54, 80, 0.5);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.results .rooms-table .room-group-row:hover td {
  background: rgba(91, 140, 255, 0.08);
}

.results .rooms-table .room-group-row.open td {
  background: rgba(91, 140, 255, 0.1);
  border-bottom-color: rgba(42, 54, 80, 0.35);
}

.results .rooms-table .room-group-row + .room-rate-row td {
  background: rgba(8, 12, 22, 0.35);
}

.results .rooms-table .room-rate-row td {
  padding: 10px 12px;
  background: rgba(8, 12, 22, 0.35);
  border-bottom: 1px solid rgba(42, 54, 80, 0.5);
}

.results .rooms-table .room-rate-row:last-child td,
.results .rooms-table .room-rate-row:has(+ .room-group-row) td {
  border-bottom-color: rgba(42, 54, 80, 0.55);
}

.results .rooms-table .rate {
  white-space: normal;
}

.room-group-cell {
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

.room-group-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.room-group-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.room-group-code {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.room-group-meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 2px;
}

.room-group-meta-empty {
  font-style: italic;
  opacity: 0.75;
}

.room-group-tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.room-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(42, 54, 80, 0.7);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.room-desc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.room-desc-toggle:hover {
  color: var(--primary-2);
}

.room-desc-chevron {
  width: 10px;
  color: var(--muted);
}

.results .rooms-table .room-desc-row td {
  padding: 0 10px 10px;
  border-bottom: 1px solid rgba(42, 54, 80, 0.5);
  vertical-align: top;
}

.room-group-row.open + .room-desc-row td,
.room-desc-row + .room-rate-row td {
  border-top: 0;
}

.room-desc-body {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(42, 54, 80, 0.55);
  border-radius: 10px;
  background: rgba(8, 12, 22, 0.45);
}

.room-desc-p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.room-desc-p:last-child {
  margin-bottom: 0;
}

.rooms-table .plan-count {
  color: var(--muted);
  font-size: 12px;
}

.rooms-table .room-rate-spacer {
  padding-left: 20px;
}

.room-rate-branch {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-left: 1px solid rgba(154, 168, 195, 0.35);
  border-bottom: 1px solid rgba(154, 168, 195, 0.35);
  vertical-align: middle;
}

.rooms-table .rooms-plan {
  line-height: 1.25;
}

.rooms-table .rooms-plan > * {
  vertical-align: middle;
}

.rooms-table .rooms-plan .badge {
  margin-right: 6px;
}

.rooms-table .plan-name {
  color: var(--muted);
  font-size: 12px;
}

.rooms-table .rooms-avail {
  font-variant-numeric: tabular-nums;
}

.rooms-table .rooms-book {
  text-align: right;
  white-space: nowrap;
}

.rooms-table .rate-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-width: 0;
}

.rooms-table .rate-pair-std,
.rooms-table .rate-pair-honors {
  min-width: 0;
  padding: 0 10px;
}

.rooms-table .rate-pair-std {
  padding-left: 0;
  border-right: 1px solid rgba(42, 54, 80, 0.65);
}

.rooms-table .rate-pair-honors {
  padding-right: 0;
}

.rooms-table .honors-discount-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #9ec1ff;
  margin-bottom: 4px;
}

.rooms-table .rate-pair-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.rooms-table .rate-pair-col .book-link {
  margin-top: 2px;
}

.rooms-table .rate-pair-empty {
  color: var(--muted);
}

.rooms-table .room-rate-pair-row td.rate {
  vertical-align: top;
}

.results .empty td {
  text-align: center;
  color: var(--muted);
  padding: 28px 16px;
}

.results .empty .empty-msg {
  margin-bottom: 0;
}

.results .empty:has(.scan-errors) .empty-msg {
  margin-bottom: 12px;
}

.scan-errors {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 52rem;
  text-align: center;
  display: grid;
  gap: 8px;
}

.scan-errors li {
  padding: 10px 12px;
  border: 1px solid rgba(240, 180, 41, 0.28);
  border-radius: 10px;
  background: rgba(240, 180, 41, 0.08);
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.scan-errors strong {
  color: var(--warn);
  margin-right: 4px;
}

.scan-error-title {
  margin-bottom: 4px;
}

.scan-error-hotels {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.rate {
  font-weight: 700;
  color: var(--primary-2);
  white-space: nowrap;
  line-height: 1.25;
}

.rate-nightly {
  font-weight: 700;
}

.rate-per {
  margin-left: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.rate-stay {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 550;
  color: var(--muted);
}

.rate-was {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.date-cell {
  white-space: nowrap;
}

.cache-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 6px;
  vertical-align: -2px;
}

.cache-controls .cache-icon {
  margin-right: 0;
}

.cache-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  vertical-align: -2px;
  cursor: pointer;
}

.cache-icon:hover:not(:disabled) {
  color: var(--primary);
}

.cache-delete-icon:hover:not(:disabled) {
  color: var(--danger);
}

.cache-icon:disabled {
  cursor: wait;
  opacity: 0.7;
}

.cache-icon[aria-disabled="true"] {
  cursor: default;
}

.cache-icon.refreshing svg {
  animation: cache-spin 0.9s linear infinite;
  transform-origin: 8px 8px;
}

@keyframes cache-spin {
  to {
    transform: rotate(360deg);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge.go {
  color: #b8ffe0;
  border-color: rgba(62, 207, 142, 0.35);
  background: rgba(62, 207, 142, 0.1);
}

.badge.cabin-biz {
  color: #e4d4ff;
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(139, 92, 246, 0.18);
}

.badge.cabin-premium {
  color: #c9ddff;
  border-color: rgba(96, 149, 255, 0.5);
  background: rgba(59, 112, 214, 0.18);
}

.metrics-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.cache-folder-panel {
  margin: 0 0 18px;
  overflow: visible;
}

.cache-folder-meta {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px 16px;
  border-bottom: none;
}

.cache-folder-title {
  color: var(--text);
  font-weight: 650;
  font-size: 15px;
  margin-bottom: 4px;
}

.cache-folder-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  max-width: 52ch;
}

.cache-folder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.cache-folder-help {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  max-width: 72ch;
}

.metric-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 26, 43, 0.72);
  box-shadow: var(--shadow);
}

.metric-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.metrics-panel {
  margin-top: 0;
}

.metrics-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0 8px;
}

.metrics-empty {
  padding: 28px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.metrics-session {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px 12px;
}

.metrics-session.current {
  border-color: rgba(62, 207, 142, 0.45);
  background: rgba(62, 207, 142, 0.06);
  box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.12);
}

.metrics-session.previous {
  opacity: 0.92;
}

.metrics-session-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 4px 4px 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.metrics-session-toggle:hover .metrics-session-title {
  color: var(--primary-2);
}

.metrics-session-chevron {
  flex: 0 0 12px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.metrics-session-toggle-main {
  flex: 1;
  min-width: 0;
}

.metrics-session-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 650;
  font-size: 15px;
}

.metrics-current-badge {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metrics-session-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.metrics-session-id-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 4px 0 26px;
  min-width: 0;
}

.metrics-session-id-label {
  flex: 0 0 auto;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.metrics-session-id {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.35;
  color: var(--text);
  word-break: break-all;
  user-select: all;
}

.metrics-copy-id,
.metrics-export {
  flex: 0 0 auto;
  padding: 3px 10px;
  font-size: 12px;
}

.metrics-copy-id.copied,
.metrics-export.copied {
  color: var(--ok, #3ecf8e);
}

.metrics-session-total {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 2px;
}

.metrics-session-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(42, 54, 80, 0.55);
}

.metrics-session.collapsed {
  padding-bottom: 10px;
}

.metrics-session.collapsed .metrics-session-body {
  display: none;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metrics-breakdown-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.metrics-breakdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metrics-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.metrics-breakdown li span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metrics-breakdown li strong {
  font-variant-numeric: tabular-nums;
}

.metrics-events {
  overflow-x: auto;
}

.metrics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.metrics-table th,
.metrics-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(42, 54, 80, 0.55);
  vertical-align: top;
}

.metrics-table th {
  color: var(--muted);
  font-weight: 600;
}

.metrics-table .mono {
  font-family: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  font-size: 11px;
  word-break: break-all;
}

.metrics-table .metrics-detail {
  color: var(--muted);
  max-width: 42ch;
  word-break: break-word;
}

.metrics-table tr.metrics-row-error td {
  color: #c45b5b;
}

.metrics-table tr.metrics-row-scan td {
  opacity: 0.85;
}

@media (max-width: 900px) {
  .metrics-summary,
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.book-link {
  color: var(--primary);
  font-weight: 650;
  font-size: 12px;
}

.flight-segments {
  margin-top: 14px;
}

.flight-segments-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.flight-segments-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.flight-segments-table th,
.flight-segments-table td {
  text-align: left;
  padding: 6px 8px;
  border-top: 1px solid rgba(42, 54, 80, 0.55);
  vertical-align: top;
}

.flight-segments-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-top: 0;
}

.results tr.flight-row {
  cursor: pointer;
}

.results tr.flight-row:hover {
  background: rgba(91, 140, 255, 0.06);
}

.hotel-name {
  font-weight: 650;
}

.hotel-code {
  color: var(--muted);
  font-size: 11px;
}

.rate-plan-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.rate-plan-cell .hotel-code {
  margin-top: 0;
}

.site-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(42, 54, 80, 0.55);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  flex: 0 0 auto;
}

.site-footer a {
  color: var(--text);
  font-weight: 650;
}

.site-footer a:hover {
  color: var(--primary-2);
}

@media (max-width: 900px) {
  .app {
    padding: 12px 12px 28px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  .app:has(.results-wrap.map-open) {
    max-width: 100%;
  }

  .topnav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
    align-items: center;
    margin-bottom: 16px;
  }

  .brand {
    font-size: 20px;
  }

  .nav-links {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
    margin: 0;
    padding: 2px 0 4px;
    max-width: 100%;
  }

  .nav-links a {
    flex: 0 1 auto;
    padding: 8px 12px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    max-width: 100%;
  }

  .nav-links .active {
    color: var(--text);
    border-color: rgba(91, 140, 255, 0.45);
    background: rgba(91, 140, 255, 0.14);
  }

  /* Keep the strip short on phones */
  .nav-links a[href*="hilton.com"] {
    display: none;
  }

  .session-group {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
    width: auto;
    max-width: 100%;
    justify-content: flex-end;
    justify-self: end;
    gap: 6px;
  }

  .session {
    font-size: 11px;
    padding: 5px 8px;
    max-width: min(46vw, 11.5rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .session.reauth,
  .session.bad {
    max-width: min(52vw, 13rem);
  }

  .session-reauth {
    display: inline;
  }

  .hero h1 {
    font-size: clamp(24px, 7vw, 32px);
    margin-bottom: 6px;
  }

  .lede {
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.45;
  }

  .search-card {
    padding: 12px;
    border-radius: 16px;
    gap: 10px;
  }

  .search-mode-row {
    gap: 8px;
  }

  .search-mode {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
  }

  .search-mode-btn {
    flex: 1 1 calc(33.33% - 4px);
    min-height: 44px;
    padding: 10px 12px;
    white-space: nowrap;
    touch-action: manipulation;
  }

  .dates-field,
  .date-ranges-field,
  .date-ranges-surface {
    width: 100%;
    min-width: 0;
  }

  .date-ranges-trigger {
    min-height: 44px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    background: rgba(255, 255, 255, 0.03);
  }

  .date-ranges-surface.is-empty .date-ranges-trigger {
    width: 100%;
  }

  .flight-search-toggles {
    margin: 4px 0 0;
    gap: 8px;
  }

  .flight-trip-type {
    width: 100%;
  }

  .flight-trip-type-btn {
    flex: 1 1 0;
    min-height: 40px;
    text-align: center;
  }

  .fields {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .fields.flight-fields {
    grid-template-columns: 1fr 1fr;
  }

  .fields.flight-fields .search-btn,
  .fields.flight-fields .stop-btn {
    max-width: none;
  }

  .field {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
  }

  .field:not(:last-child)::after {
    display: none;
  }

  .search-btn,
  .stop-btn {
    grid-column: 1 / -1;
    min-height: 48px;
    margin: 0;
  }

  .progress {
    gap: 8px;
    margin-bottom: 12px;
  }

  .progress-pct {
    font-size: 12px;
  }

  .results-wrap,
  .flight-results {
    margin-top: 8px;
  }

  .table-scroll,
  .results-meta,
  .flight-results-tools,
  .flight-results,
  .results-wrap,
  .search-card {
    max-width: 100%;
    min-width: 0;
  }

  .results-meta,
  .flight-results-tools {
    flex-wrap: wrap;
  }

  .results-pager {
    min-width: 0;
    flex-wrap: wrap;
  }

  .table-scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }

  .search-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-footer .map-footer-credit {
    margin-left: 0;
    text-align: center;
  }

  .map-key-panel,
  .web-sync-panel {
    flex-direction: column;
    align-items: stretch;
    max-width: none;
  }

  .map-key-panel .ghost-btn,
  .web-sync-panel .ghost-btn {
    width: 100%;
    min-height: 44px;
  }

  .status-bar {
    font-size: 13px;
    line-height: 1.4;
  }
}

@media (max-width: 560px) {
  .fields {
    grid-template-columns: 1fr;
  }

  .fields.flight-fields {
    grid-template-columns: 1fr;
  }

  .search-mode-btn {
    flex: 1 1 100%;
  }

  .session-group {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
    justify-content: stretch;
  }

  .session {
    flex: 1 1 calc(50% - 6px);
    max-width: none;
    text-align: center;
  }

  /* Shorter nav labels */
  .nav-links a[href="stays.html"] {
    font-size: 0;
  }
  .nav-links a[href="stays.html"]::after {
    content: "Stays";
    font-size: 13px;
  }
  .nav-links a[href="metrics.html"] {
    font-size: 0;
  }
  .nav-links a[href="metrics.html"]::after {
    content: "Stats";
    font-size: 13px;
  }

  .hotel-params,
  .advanced-params {
    grid-template-columns: 1fr 1fr;
  }
}

/* Multi-range dates + calendar (shadcn Calendar–inspired) */
.dates-field {
  min-width: 0;
}

.date-ranges-field {
  width: 100%;
  min-width: 0;
}

.date-ranges-surface {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 2px 0 0;
  cursor: pointer;
}

.date-ranges-surface.is-empty .date-ranges-trigger {
  flex: 1 1 auto;
  width: 100%;
  justify-content: flex-start;
  color: rgba(154, 168, 195, 0.7);
  font-weight: 450;
}

.date-ranges-trigger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}

.date-ranges-trigger:focus {
  outline: none;
}

.date-ranges-placeholder {
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.date-ranges-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.date-ranges-chips[hidden] {
  display: none !important;
}

.date-range-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
  padding: 2px 4px 2px 8px;
  border-radius: 999px;
  background: rgba(94, 129, 244, 0.16);
  border: 1px solid rgba(94, 129, 244, 0.35);
  color: var(--text);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.2;
  cursor: pointer;
}

.date-range-chip.is-editing {
  background: rgba(94, 129, 244, 0.28);
  border-color: rgba(94, 129, 244, 0.7);
  box-shadow: 0 0 0 1px rgba(94, 129, 244, 0.35);
}

.date-range-chip-label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.date-range-chip-remove {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.date-range-chip-remove:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.date-range-chip.is-window {
  border-color: rgba(61, 214, 198, 0.45);
  background: rgba(61, 214, 198, 0.1);
}

.date-ranges-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.date-ranges-mode[hidden] {
  display: none !important;
}

.date-ranges-mode-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  cursor: pointer;
}

.date-ranges-mode-btn:hover {
  color: var(--text);
  border-color: rgba(91, 140, 255, 0.35);
}

.date-ranges-mode-btn.is-active {
  color: var(--text);
  background: rgba(91, 140, 255, 0.14);
  border-color: rgba(91, 140, 255, 0.45);
}

.date-ranges-window-opts {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 10px;
  min-width: 0;
}

.date-ranges-window-opts[hidden] {
  display: none !important;
}

.date-ranges-nights {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.date-ranges-nights > span {
  flex: 0 0 auto;
}

.date-ranges-nights-toggles {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}

.date-ranges-nights-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 1.55rem;
  padding: 0 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #121a2b;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  line-height: 1;
}

.date-ranges-nights-btn:hover {
  color: var(--text);
  border-color: rgba(91, 140, 255, 0.45);
}

.date-ranges-nights-btn.is-active,
.date-ranges-nights-btn[aria-pressed="true"] {
  color: var(--text);
  background: rgba(91, 140, 255, 0.16);
  border-color: rgba(91, 140, 255, 0.5);
}

.date-ranges-panel {
  padding: 12px;
  width: 300px;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
}

.date-ranges-icon {
  flex: 0 0 auto;
  color: var(--muted);
  display: inline-flex;
  margin-left: auto;
}

.date-picker-panel {
  position: fixed;
  z-index: 90;
  background: #0f1728;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px;
}

.ui-calendar {
  --cell-size: 2.25rem;
  width: 100%;
  color: var(--text);
  user-select: none;
}

.ui-calendar-hint {
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
  margin-bottom: 8px;
}

.ui-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ui-calendar-nav {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.ui-calendar-nav:hover {
  background: rgba(91, 140, 255, 0.12);
  border-color: rgba(91, 140, 255, 0.35);
}

.ui-calendar-caption {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
}

.ui-calendar-month,
.ui-calendar-year {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121a2b;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 6px;
  cursor: pointer;
  color-scheme: dark;
}

.ui-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, var(--cell-size));
  justify-content: space-between;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ui-calendar-weekdays span {
  width: var(--cell-size);
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ui-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, var(--cell-size));
  justify-content: space-between;
  gap: 2px 0;
}

.ui-calendar-day,
.ui-calendar-day-spacer {
  width: var(--cell-size);
  height: var(--cell-size);
}

.ui-calendar-day {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}

.ui-calendar-day:hover {
  background: rgba(91, 140, 255, 0.14);
}

.ui-calendar-day.outside {
  color: rgba(154, 168, 195, 0.45);
}

.ui-calendar-day.today:not(.selected) {
  box-shadow: inset 0 0 0 1px rgba(91, 140, 255, 0.65);
}

.ui-calendar-day.selected {
  background: var(--primary);
  color: #fff;
}

.ui-calendar-day.selected:hover {
  background: #6b98ff;
}

.ui-calendar-day.in-range {
  background: rgba(91, 140, 255, 0.18);
  border-radius: 0;
}

.ui-calendar-day.range-start {
  border-radius: 10px 0 0 10px;
}

.ui-calendar-day.range-end {
  border-radius: 0 10px 10px 0;
}

.ui-calendar-day.range-start.range-end {
  border-radius: 10px;
}

.ui-calendar-day.existing-range {
  background: rgba(154, 168, 195, 0.12);
}

.ui-calendar-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(42, 54, 80, 0.8);
}

.ui-calendar-today-btn,
.ui-calendar-clear-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.ui-calendar-clear-btn {
  color: var(--muted);
}

.ui-calendar-clear-btn:hover {
  color: var(--danger);
}

/* —— Cache coverage map —— */
.map-app {
  max-width: 1440px;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 12px;
}

.map-app .topnav {
  margin-bottom: 12px;
}

.map-app .site-footer {
  padding-top: 10px;
  margin-top: 10px;
}

.map-app > .map-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}

.map-hero {
  margin-bottom: 0;
}

.map-hero h1 {
  font-size: clamp(20px, 2.5vw, 26px);
  margin-bottom: 4px;
}

.map-hero .lede {
  margin: 0;
  font-size: 13px;
}

.map-summary {
  margin: 0;
  gap: 8px;
}

.map-summary .metric-card {
  padding: 6px 10px;
  border-radius: 10px;
  box-shadow: none;
}

.map-summary .metric-label {
  font-size: 10px;
  margin-bottom: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.map-summary .metric-value {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.map-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0;
}

.map-panel .results-meta {
  flex: 0 0 auto;
  padding: 8px 12px;
}

.map-toolbar #mapLabel {
  flex: 1 1 auto;
  min-width: 0;
}

.map-toolbar .ghost-btn {
  margin-left: auto;
}

.map-body {
  flex: 1 1 auto;
  min-height: 0;
  height: 0;
  display: flex;
  align-items: stretch;
}

.map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.map-footer-credit {
  flex: 0 0 auto;
  margin-left: auto;
}

.map-key-details {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  color: var(--muted);
}

.map-key-details summary {
  cursor: pointer;
  list-style: none;
  width: fit-content;
  opacity: 0.55;
  user-select: none;
}

.map-key-details summary::-webkit-details-marker {
  display: none;
}

.map-key-details summary:hover,
.map-key-details[open] summary {
  opacity: 0.9;
  color: var(--text);
}

.map-key-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  max-width: 420px;
}

.map-api-tip {
  margin: 8px 0 0;
  max-width: 420px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.map-key-panel .map-api-field {
  flex: 1 1 auto;
}

.map-key-panel .ghost-btn {
  flex: 0 0 auto;
}

.web-sync-panel {
  flex-wrap: wrap;
  max-width: 560px;
}

.web-sync-panel .map-api-field {
  flex: 1 1 160px;
  min-width: 140px;
}

.web-sync-status {
  flex: 1 1 100%;
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.web-sync-status.ok {
  color: var(--ok);
}

.web-sync-status.bad {
  color: var(--danger);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.map-api-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 280px;
  min-width: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.map-api-field input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  letter-spacing: normal;
  text-transform: none;
}

.map-api-field input:focus {
  outline: none;
  border-color: rgba(91, 140, 255, 0.65);
}

.map-canvas {
  flex: 1 1 auto;
  height: auto;
  min-height: 240px;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
  background: #0a101c;
}

.map-frame {
  display: block;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  min-height: 240px;
  height: auto;
  border: 0;
  border-top: 1px solid var(--line);
}

.map-hotel-list {
  flex: 0 0 min(340px, 38vw);
  width: min(340px, 38vw);
  min-width: 240px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.map-hotel-list-head {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.map-hotel-list-count {
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.map-hotel-list-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.map-hotel-list-empty {
  padding: 16px 12px;
  color: var(--muted);
  font-size: 13px;
}

.map-hotel-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.map-hotel-item:hover,
.map-hotel-item.is-active {
  background: rgba(91, 140, 255, 0.08);
}

.map-hotel-item-name {
  grid-column: 1;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-hotel-item-meta {
  grid-column: 1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-hotel-item-dist {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.map-hotel-item.has-coords .map-hotel-item-dist {
  color: var(--text);
  opacity: 0.85;
}

.map-popup {
  color: #102033;
  font-size: 13px;
  line-height: 1.35;
}

.map-popup strong {
  display: block;
  margin-bottom: 2px;
}

.map-popup-meta {
  color: #4d5d78;
  font-size: 12px;
}

@media (max-width: 820px) {
  .map-body {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  .map-frame,
  .map-canvas {
    flex: 0 0 auto;
    height: min(52vh, 420px);
    min-height: 220px;
  }

  .map-hotel-list {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 220px;
    border-left: 0;
  }
}

.stays-toolbar {
  margin-top: 4px;
}

.stays-toolbar .results-meta {
  border-bottom: 0;
}

.stays-toolbar .stays-stop-btn {
  min-height: 34px;
  min-width: auto;
  padding: 0 14px;
  margin: 0;
  align-self: center;
  font-size: 13px;
  border-radius: 999px;
}

.stays-progress {
  margin: 0 0 8px;
}

.stays-progress[hidden] {
  display: none;
}

.stays-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
  padding: 12px 0 28px;
  align-items: stretch;
}

.stays-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 2px 12px;
}

.stay-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  min-height: 0;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.stay-card.is-save-green {
  border-color: rgba(62, 207, 142, 0.55);
}

.stay-card-open {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.stay-card-open:hover,
.stay-card-open:focus-visible {
  color: var(--text);
  border-color: rgba(91, 140, 255, 0.45);
  background: rgba(91, 140, 255, 0.12);
  outline: none;
}

.stay-card-name {
  font-weight: 650;
  font-size: 15px;
  line-height: 1.3;
  padding-right: 36px;
}

.stay-card-city,
.stay-card-conf,
.stay-card-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.stay-card-when {
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
}

.stay-card-booked-block {
  margin-top: 10px;
}

.stay-card-rates-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(42, 54, 80, 0.55);
}

.stay-card-rates {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stay-rate-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.35;
}

.stay-rate-name {
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stay-rate-price {
  flex: 0 0 auto;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.stay-rate-booked .stay-rate-name {
  color: var(--text);
  font-weight: 550;
}

.stay-rate-cheapest .stay-rate-price {
  color: var(--ok);
}

.stay-rate-fnf .stay-rate-price {
  color: #9ec1ff;
}

.stay-rate-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.stay-rate-note.save-green {
  color: var(--ok);
  font-weight: 650;
}

.stay-rate-note.save {
  color: var(--warn);
  font-weight: 650;
}

.stay-rate-note.higher {
  color: var(--danger);
  font-weight: 600;
}

/* Tint the alternative rate prices to match the verdict. */
.stay-card-rates.save-green .stay-rate-fnf .stay-rate-price,
.stay-card-rates.save-green .stay-rate-cheapest .stay-rate-price {
  color: var(--ok);
}

.stay-card-rates.save .stay-rate-fnf .stay-rate-price,
.stay-card-rates.save .stay-rate-cheapest .stay-rate-price {
  color: var(--warn);
}

.stay-card-rates.higher .stay-rate-fnf .stay-rate-price,
.stay-card-rates.higher .stay-rate-cheapest .stay-rate-price {
  color: var(--danger);
}

.stay-rate-note.bad {
  color: var(--danger);
  font-weight: 600;
}

.stay-rate-scan-time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.stay-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: auto;
  padding-top: 10px;
}

.stay-card-actions .ghost-btn,
.stay-modal-actions .ghost-btn {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stay-card-actions a.ghost-btn,
.stay-modal-actions a.ghost-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

body.stay-modal-open {
  overflow: hidden;
}

.stay-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 10, 18, 0.72);
  backdrop-filter: blur(4px);
}

.stay-modal[hidden] {
  display: none !important;
}

.stay-modal-panel {
  position: relative;
  width: min(90vw, 780px);
  max-width: 90vw;
  max-height: none;
  overflow: visible;
  padding: 22px 24px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-elev);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.stay-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.stay-modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.stay-modal-header {
  padding-right: 36px;
  margin-bottom: 14px;
}

.stay-modal-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.stay-modal-sub,
.stay-modal-when {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.stay-modal-when {
  margin-top: 4px;
  color: var(--text);
  font-weight: 550;
}

.stay-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px 24px;
  align-items: start;
}

.stay-modal-section h3 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}

.stay-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

.stay-detail-item {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.stay-detail-item dt {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stay-detail-item dd {
  margin: 0;
  font-size: 14px;
  font-weight: 550;
  overflow-wrap: anywhere;
}

.stay-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(42, 54, 80, 0.55);
}

.stay-modal .stay-card-rates {
  gap: 8px;
}

.stay-modal .stay-rate-row {
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(8, 12, 22, 0.35);
}

.stay-modal .stay-rate-note {
  margin-top: 4px;
  font-size: 13px;
}

@media (max-width: 700px) {
  .stay-modal {
    padding: 12px;
  }

  .stay-modal-panel {
    width: 100%;
    max-width: none;
    max-height: none;
    border-radius: 16px;
    padding: 18px 16px 14px;
  }

  .stay-modal-body {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .stays-grid {
    grid-template-columns: 1fr;
  }
}
