:root {
  --bg: #07080a;
  --bg-elev-1: #0d0f13;
  --bg-elev-2: #13161c;
  --bg-elev-3: #181b22;
  --bg-input: #0e1015;

  --bg-primary: var(--bg);
  --bg-surface: var(--bg-elev-1);
  --bg-surface-elevated: var(--bg-elev-2);

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-accent: rgba(255, 255, 255, 0.28);
  --border-subtle: var(--line);
  --border-focus: var(--line-strong);

  --text: #ffffff;
  --text-2: #9da3af;
  --text-3: #636a79;
  --text-primary: var(--text);
  --text-secondary: var(--text-2);
  --text-muted: var(--text-3);

  --dep-color: #60a5fa;
  --dep-color-soft: rgba(96, 165, 250, 0.12);
  --ret-color: #22d3ee;
  --ret-color-soft: rgba(34, 211, 238, 0.12);
  --accent: #ffffff;
  --accent-hi: #ffffff;
  --accent-2: #9da3af;
  --accent-soft: rgba(255, 255, 255, 0.06);

  --money: #10b981;
  --money-soft: rgba(16, 185, 129, 0.12);
  --warn: #f59e0b;
  --danger: #ef4444;
  --accent-emerald: var(--money);
  --accent-emerald-bg: var(--money-soft);
  --accent-gold: var(--warn);
  --accent-red: var(--danger);

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-full: 999px;
  --radius-xs: var(--r-xs);
  --radius-sm: var(--r-sm);
  --radius-md: var(--r-md);
  --radius-lg: var(--r-lg);
  --radius-full: var(--r-full);

  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --sh-md: 0 4px 16px rgba(0, 0, 0, 0.6);
  --sh-lg: 0 12px 36px rgba(0, 0, 0, 0.8);
  --sh-glow: none;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 140ms var(--ease);
  --mid: 240ms var(--ease);
  --slow: 380ms var(--ease);
  --transition: all var(--fast);

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 14px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.app-container {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px 120px;
}

::selection {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--r-full);
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 -24px 28px;
  padding: 14px 24px;
  background: rgba(7, 8, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  position: relative;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #ffffff;
  background: var(--bg-elev-2);
  border: 1px solid var(--line-strong);
}

.brand h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #ffffff;
}

.subtitle {
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.header-nav-btn {
  position: relative;
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color var(--fast), border-color var(--fast), background var(--fast), transform var(--fast);
}

.header-nav-btn:hover {
  color: #ffffff;
  border-color: var(--line-strong);
  background: var(--bg-elev-2);
  transform: translateY(-1px);
}

.header-nav-btn:active {
  transform: translateY(0);
}

.header-nav-btn .nav-btn-icon {
  font-size: 12px;
  opacity: 0.8;
  line-height: 1;
}

.header-nav-btn .star-icon {
  color: var(--warn);
  opacity: 1;
}

.starred-badge-count {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  background: none;
  border: none;
  padding: 0;
}

.starred-nav-btn .starred-badge-count {
  color: var(--warn);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev-1);
}

.status-indicator::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-indicator.searching {
  color: #ffffff;
  border-color: var(--line-strong);
}

.status-indicator.searching::before {
  animation: pulse-dot 1.4s var(--ease) infinite;
}

.status-indicator.ready {
  color: var(--money);
  border-color: rgba(16, 185, 129, 0.3);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

.radar-toggle-btn {
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
}

.radar-toggle-btn:hover {
  border-color: var(--line-strong);
  color: #ffffff;
  background: var(--bg-elev-2);
}

.radar-toggle-btn.active {
  border-color: var(--line-strong);
  background: var(--bg-elev-2);
  color: #ffffff;
}

.radar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.hero {
  text-align: center;
  padding: 24px 0 28px;
  animation: rise 500ms var(--ease) both;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.hero-eyebrow b {
  color: var(--text-2);
  font-weight: 700;
}

.hero h2 {
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #ffffff;
}

.hero h2 em {
  font-style: normal;
  color: var(--text-2);
}

.hero p {
  margin: 12px auto 0;
  max-width: 600px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.search-section {
  position: relative;
  z-index: 40;
  animation: rise 550ms var(--ease) 50ms both;
}

.search-form {
  position: relative;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  box-shadow: var(--sh-md);
}

.top-controls-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.control-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  transition: border-color var(--fast), background var(--fast);
}

.control-dropdown:hover {
  background: var(--bg-elev-3);
  border-color: var(--line-strong);
}

.control-dropdown:focus-within {
  border-color: #ffffff;
}

.control-icon {
  display: inline-flex;
  color: var(--text-3);
  flex: none;
}

.control-dropdown:hover .control-icon {
  color: #ffffff;
}

.control-dropdown select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding-right: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%23636a79' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-position: calc(100% - 2px) center;
  background-repeat: no-repeat;
}

.control-dropdown select option {
  background: var(--bg-elev-2);
  color: var(--text);
}

.alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-elev-2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 13px;
  font-weight: 500;
  animation: rise 200ms var(--ease) both;
}

.alert-banner::before {
  content: "!";
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--danger);
  color: #000000;
  font-size: 11px;
  font-weight: 800;
}

.unified-search-bar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.route-segment {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  border-radius: var(--r-md);
  background: var(--bg-input);
  border: 1px solid var(--line);
  transition: border-color var(--fast);
}

.route-segment:focus-within {
  border-color: var(--line-strong);
}

.airport-box {
  position: relative;
  padding: 12px 16px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  transition: background var(--fast);
}

.origin-box {
  border-radius: var(--r-md) 0 0 var(--r-md);
}

.dest-box {
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.airport-box:hover {
  background: rgba(255, 255, 255, 0.02);
}

.box-label-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: none;
  border: none;
  padding: 0;
}

.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tag-input-container input {
  flex: 1 1 130px;
  min-width: 110px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 2px 0;
}

.tag-input-container input::placeholder {
  color: var(--text-3);
  font-weight: 500;
}

.airport-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px 3px 8px;
  border-radius: var(--r-xs);
  background: var(--bg-elev-2);
  border: 1px solid var(--line-strong);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  animation: pop 160ms var(--ease) both;
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: none; }
}

.airport-tag:hover {
  border-color: #ffffff;
}

.airport-tag button {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: var(--r-xs);
  background: transparent;
  color: inherit;
  opacity: 0.6;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.airport-tag button:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.swap-btn {
  position: relative;
  z-index: 3;
  align-self: center;
  width: 32px;
  height: 32px;
  margin: 0 -16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev-3);
  color: var(--text-2);
  cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: transform var(--mid), color var(--fast), border-color var(--fast);
}

.swap-btn:hover {
  color: #ffffff;
  border-color: #ffffff;
  transform: rotate(180deg);
}

.search-second-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: stretch;
}

.date-cards-container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.date-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 12px 15px;
  min-height: 72px;
  border-radius: var(--r-md);
  background: var(--bg-input);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color var(--fast), background var(--fast), transform var(--fast);
}

.date-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-elev-1);
}

.date-card.active {
  border-color: #ffffff;
  background: var(--bg-elev-2);
}

.date-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.date-card-label-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.card-icon {
  display: inline-flex;
  color: var(--text-3);
}

.dep-icon {
  color: var(--dep-color);
}

.ret-icon {
  color: var(--ret-color);
}

.card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-days-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  background: none;
  border: none;
  padding: 0;
}

.dep-badge {
  color: var(--dep-color);
}

.ret-badge {
  color: var(--ret-color);
}

.date-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.date-card-value {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-expand-icon {
  flex: none;
  color: var(--text-3);
  font-size: 11px;
  transition: transform var(--mid);
}

.date-card.active .card-expand-icon {
  transform: rotate(180deg);
  color: #ffffff;
}

.submit-btn {
  position: relative;
  min-width: 180px;
  padding: 0 20px;
  border: none;
  border-radius: var(--r-md);
  background: #ffffff;
  color: #000000;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--sh-sm);
  transition: background var(--fast), transform var(--fast);
}

.submit-btn:hover {
  background: #e4e4e7;
  transform: translateY(-1px);
}

.submit-btn:active {
  background: #d4d4d8;
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-icon {
  display: inline-flex;
}

.btn-kbd {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: var(--r-xs);
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #000000;
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 90;
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--bg-elev-2);
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-lg);
  animation: dropIn 140ms var(--ease) both;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: background var(--fast);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item.active,
.autocomplete-item:hover {
  background: var(--bg-elev-3);
}

.autocomplete-code {
  flex: none;
  width: 44px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--r-xs);
  background: var(--bg-input);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.autocomplete-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.autocomplete-city {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-name {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-metro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  background: var(--bg-elev-3);
  border: 1px solid var(--line-strong);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.autocomplete-metro-header:hover {
  border-color: #ffffff;
}

.simple-calendar-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 95;
  width: 320px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--bg-elev-2);
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-lg);
  animation: dropIn 150ms var(--ease) both;
}

.simple-calendar-popover.position-right {
  left: auto;
  right: 0;
}

.popover-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.popover-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.popover-picker-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.popover-picker-dates {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.popover-close-btn,
.close-drawer-btn {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--text-3);
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition);
}

.popover-close-btn:hover,
.close-drawer-btn:hover {
  color: #ffffff;
  border-color: var(--line-strong);
  background: var(--bg-elev-3);
}

.cal-presets-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.cal-preset-btn {
  flex: 1;
  padding: 5px 0;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: var(--bg-elev-1);
  color: var(--text-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.cal-preset-btn:hover {
  background: var(--bg-elev-3);
  border-color: var(--line-strong);
  color: #ffffff;
}

.simple-month-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cal-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cal-month-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.cal-nav-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.cal-nav-btn:hover {
  color: #ffffff;
  background: var(--bg-elev-3);
  border-color: var(--line-strong);
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-weekdays span {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-bottom: 2px;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day-cell {
  position: relative;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-xs);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background var(--fast), color var(--fast);
}

.cal-day-cell.empty {
  cursor: default;
}

.cal-day-cell.disabled {
  color: #353942;
  cursor: not-allowed;
  pointer-events: none;
}

.cal-day-cell:hover:not(.disabled):not(.empty):not(.range-start):not(.range-end):not(.selected-anchor) {
  background: var(--bg-elev-3);
  color: #ffffff;
}

.cal-day-cell.is-today::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
}

.cal-day-cell.in-selected-range,
.cal-day-cell.in-hover-range {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border-radius: 0 !important;
}

.cal-day-cell.range-start {
  border-radius: var(--r-xs) 0 0 var(--r-xs) !important;
  background: #ffffff !important;
  color: #000000 !important;
  font-weight: 700 !important;
}

.cal-day-cell.range-end {
  border-radius: 0 var(--r-xs) var(--r-xs) 0 !important;
  background: #ffffff !important;
  color: #000000 !important;
  font-weight: 700 !important;
}

.cal-day-cell.selected-anchor,
.cal-day-cell.range-start.range-end {
  border-radius: var(--r-xs) !important;
  background: #ffffff !important;
  color: #000000 !important;
  font-weight: 700 !important;
}

.popover-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.popover-helper-tip {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.35;
}

.popover-done-btn {
  flex: none;
  padding: 6px 14px;
  border: none;
  border-radius: var(--r-xs);
  background: #ffffff;
  color: #000000;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.popover-done-btn:hover {
  background: #e4e4e7;
}

.corridor-section {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  animation: rise 350ms var(--ease) both;
}

.corridor-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
}

.corridor-airport-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 70px;
}

.corridor-code {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.corridor-sub {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.corridor-stream-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.corridor-meta-top,
.corridor-meta-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.corridor-active-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.corridor-track {
  position: relative;
  height: 4px;
}

.corridor-track-rail {
  position: absolute;
  inset: 0;
  border-radius: var(--r-full);
  background: var(--bg-elev-3);
  overflow: hidden;
}

.corridor-laser-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: var(--r-full);
  background: #ffffff;
  transition: width 400ms var(--ease);
}

.corridor-glider {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: left 400ms var(--ease);
  z-index: 2;
}

.corridor-plane-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-elev-3);
  border: 1px solid var(--line-strong);
  color: #ffffff;
  transform: rotate(45deg);
}

.corridor-progress-text {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.corridor-percent {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.corridor-stat-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  min-width: 120px;
}

.corridor-stat-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.corridor-stat-price {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--money);
  font-variant-numeric: tabular-nums;
}

.corridor-actions {
  margin-top: 2px;
}

.stop-btn {
  padding: 4px 10px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: var(--bg-elev-2);
  color: var(--text-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.stop-btn:hover {
  border-color: var(--danger);
  color: #ffffff;
  background: rgba(239, 68, 68, 0.2);
}

.hud-counter-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.insights-section {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  animation: rise 350ms var(--ease) both;
}

.savings-card {
  position: relative;
  overflow: hidden;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--money);
}

.savings-content h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--money);
  margin-bottom: 4px;
}

.savings-content p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

.savings-content p strong {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 700;
}

.results-section {
  position: relative;
  z-index: 1;
  margin-top: 32px;
}

.results-header,
.deals-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.deals-header {
  margin-top: 36px;
}

.results-title-group h2,
.deals-header h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.results-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
}

.export-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev-1);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.action-btn:hover {
  color: #ffffff;
  border-color: var(--line-strong);
  background: var(--bg-elev-2);
  transform: translateY(-1px);
}

.matrix-container {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-elev-1);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}

.matrix-legend-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev-2);
}

.legend-scale {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-dot.dot-green {
  background: var(--money);
}

.legend-dot.dot-red {
  background: var(--danger);
}

.legend-gradient-line {
  width: 60px;
  height: 2px;
  border-radius: var(--r-full);
  background: var(--line-strong);
}

.legend-text {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.legend-hint {
  font-size: 11px;
  color: var(--text-3);
}

.matrix-container > .matrix-table {
  display: table;
}

.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  padding: 6px;
}

.matrix-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px;
  background: var(--bg-elev-2);
  border-radius: var(--r-xs);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.matrix-table th.outbound-header-th {
  left: 0;
  z-index: 3;
  text-align: left;
  min-width: 120px;
  width: 1%;
}

.matrix-table td {
  position: relative;
  padding: 8px;
  min-width: 100px;
  border-radius: var(--r-xs);
  background: var(--bg-input);
  border: 1px solid var(--line);
  text-align: center;
  cursor: pointer;
  vertical-align: middle;
  transition: transform var(--fast), filter var(--fast);
}

.matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  cursor: default;
  background: var(--bg-elev-2);
  font-size: 12px;
  min-width: 120px;
  width: 1%;
  white-space: nowrap;
}

.matrix-table td:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
  z-index: 4;
}

.matrix-table td.is-cheapest-overall {
  border: 1.5px solid var(--money) !important;
}

.matrix-table td.is-selected-cell {
  border: 1.5px solid #ffffff !important;
  z-index: 3;
}

.cell-price {
  display: block;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.cheapest-label {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  vertical-align: middle;
  color: var(--money);
}

.cell-route {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.cell-badge {
  display: none !important;
}

.deals-header-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.deals-filter-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  border-radius: var(--r-sm);
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.deals-filter-badges button {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--text-3);
  font-size: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.deals-filter-badges button:hover {
  color: #ffffff;
  background: var(--bg-elev-3);
}

.sort-bar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: var(--r-sm);
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
}

.sort-chip {
  padding: 5px 11px;
  border: none;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--text-3);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

.sort-chip.active {
  background: #ffffff;
  color: #000000;
  font-weight: 700;
}

.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}

.deal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  transition: transform var(--mid), border-color var(--fast);
  animation: rise 350ms var(--ease) both;
}

.deal-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.deal-card.cheapest-deal {
  border-color: rgba(16, 185, 129, 0.35);
  background: #0b1110;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card-route {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card-top-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.card-type-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-3);
  background: none;
  border: none;
  padding: 0;
  white-space: nowrap;
}

.card-type-tag.split {
  color: var(--warn);
}

.star-deal-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.star-deal-btn:hover {
  color: var(--warn);
  border-color: var(--line-strong);
  background: var(--bg-elev-2);
}

.star-deal-btn.is-starred {
  color: var(--warn);
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
}

.flight-legs-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flight-leg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  background: var(--bg-input);
  border: 1px solid var(--line);
}

.leg-airline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leg-dir {
  font-family: var(--font);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.leg-dir.out {
  color: var(--dep-color);
}

.leg-dir.back {
  color: var(--ret-color);
}

.leg-meta {
  flex: none;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

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

.total-price-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.total-price-val {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.cheapest-deal .total-price-val {
  color: var(--money);
}

.savings-badge {
  margin-top: 3px;
  color: var(--money);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  background: none;
  border: none;
  padding: 0;
}

.book-btn {
  flex: none;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-elev-2);
  border: 1px solid var(--line-strong);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.book-btn:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
  transform: translateY(-1px);
}

.state-block {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.state-block strong {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
  grid-column: 1 / -1;
}

.skeleton-card {
  height: 190px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-elev-1);
  animation: pulse-card 1.6s ease-in-out infinite;
}

@keyframes pulse-card {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.3; }
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade 180ms var(--ease) both;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.side-drawer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 90vw);
  display: flex;
  flex-direction: column;
  background: var(--bg-elev-1);
  border-left: 1px solid var(--line-strong);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8);
  animation: slideIn 260ms var(--ease) both;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: none; }
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-title-group h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.drawer-count-label {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-3);
}

.drawer-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.drawer-action-btn {
  padding: 4px 10px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-3);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.drawer-action-btn:hover {
  color: #ffffff;
  border-color: var(--line-strong);
}

.drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-card,
.starred-card {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: var(--transition);
}

.history-card:hover,
.starred-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-elev-3);
  transform: translateX(-2px);
}

.history-card-top,
.starred-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.history-card-route,
.starred-route {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.history-card-time {
  flex: none;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
}

.history-card-details,
.starred-dates {
  font-size: 12px;
  color: var(--text-2);
}

.history-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--text-3);
  text-transform: capitalize;
}

.starred-card-meta {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: var(--text-2);
}

.starred-card-meta strong {
  color: var(--text-3);
  font-weight: 600;
}

.starred-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.starred-price-val {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--money);
  font-variant-numeric: tabular-nums;
}

.starred-card-actions {
  display: inline-flex;
  gap: 6px;
}

.starred-book-btn,
.restore-search-btn {
  padding: 6px 10px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line-strong);
  background: var(--bg-elev-1);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.starred-book-btn:hover,
.restore-search-btn:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

.unstar-btn {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: var(--r-xs);
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: var(--warn);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.unstar-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.starred-empty-state {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

@media (max-width: 1080px) {
  .corridor-card {
    grid-template-columns: auto 1fr;
    row-gap: 14px;
  }
  .corridor-stat-block {
    grid-column: 1 / -1;
    align-items: flex-start;
    padding-left: 0;
    padding-top: 12px;
    border-left: none;
    border-top: 1px solid var(--line);
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 860px) {
  .app-container {
    padding: 0 16px 80px;
  }
  .app-header {
    margin: 0 -16px 20px;
    padding: 12px 16px;
  }
  .subtitle {
    display: none;
  }
  .search-second-row {
    grid-template-columns: 1fr;
  }
  .submit-btn {
    height: 48px;
    width: 100%;
  }
  .simple-calendar-popover {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(320px, calc(100vw - 32px));
  }
  .simple-calendar-popover.position-right {
    left: 50%;
    right: auto;
  }
  .deals-grid,
  .skeleton-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .route-segment {
    grid-template-columns: 1fr;
  }
  .origin-box,
  .dest-box {
    border-radius: var(--r-md) var(--r-md) 0 0;
  }
  .dest-box {
    border-radius: 0 0 var(--r-md) var(--r-md);
    border-top: 1px solid var(--line);
  }
  .swap-btn {
    margin: -16px auto;
    justify-self: center;
  }
  .date-cards-container {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 16px 0 20px;
  }
  .corridor-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .corridor-airport-block {
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    align-items: baseline;
  }
  .card-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .book-btn {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
