:root {
  --nomad-bg: #fafaf9;
  --nomad-panel: #ffffff;
  --nomad-panel-soft: #f5f5f4;
  --nomad-ink: #1c1917;
  --nomad-muted: #78716c;
  --nomad-line: #e7e5e4;
  --nomad-line-dark: #d6d3d1;
  --nomad-brand: #e51a1c;
  --nomad-brand-dark: #b91c1c;
  --nomad-brand-soft: #fee2e2;
  --nomad-dark: #1c1917;
  --nomad-shadow: 0 24px 80px rgba(28, 25, 23, 0.12);
  --row-height: 38px;
}

body > header {
  display: block;
}

body > header > div:nth-child(2) {
  display: none;
}

body > footer {
  margin-top: 0;
}

.nomad-page {
  background:
    linear-gradient(180deg, #ffffff 0, var(--nomad-bg) 220px),
    var(--nomad-bg);
  color: var(--nomad-ink);
  min-height: 100vh;
  padding: 8px 12px 14px;
}

.nomad-hero {
  position: relative;
  z-index: 200;
  display: grid;
  grid-template-columns: minmax(330px, 0.58fr) minmax(520px, 1.18fr) minmax(560px, 1fr) minmax(220px, 0.36fr);
  align-items: end;
  gap: 7px;
  margin: 0 0 8px;
  width: 100%;
}

.nomad-title-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
}

.nomad-title-copy {
  min-width: 0;
}

.nomad-eyebrow {
  margin: 0 0 3px;
  color: var(--nomad-brand);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nomad-hero h1 {
  margin: 0;
  color: var(--nomad-ink);
  font-size: clamp(24px, 2.2vw, 38px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.nomad-intro {
  display: none;
}

.nomad-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(52px, 1fr));
  gap: 6px;
}

.nomad-stats div {
  border: 1px solid var(--nomad-line);
  border-radius: 6px;
  background: #fff;
  padding: 7px 8px;
  box-shadow: 0 10px 24px rgba(28, 25, 23, 0.04);
}

.nomad-stats strong {
  display: block;
  color: var(--nomad-ink);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.nomad-stats span {
  display: block;
  margin-top: 3px;
  color: var(--nomad-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.nomad-controls {
  position: relative;
  z-index: 210;
  display: grid;
  grid-template-columns: minmax(118px, 0.75fr) minmax(150px, 0.9fr) 74px;
  gap: 5px;
  align-items: end;
  border: 1px solid var(--nomad-line);
  border-radius: 7px;
  background: var(--nomad-dark);
  padding: 8px 7px;
  box-shadow: 0 14px 36px rgba(28, 25, 23, 0.1);
}

.control-field,
.passport-panel {
  min-width: 0;
}

.control-field span,
.passport-panel > span {
  display: block;
  margin: 0 0 3px;
  color: #d6d3d1;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nomad-page button,
.nomad-page input,
.nomad-page select {
  font: inherit;
}

.nomad-page select,
.nomad-page input {
  width: 100%;
  height: 30px;
  border: 1px solid var(--nomad-line-dark);
  border-radius: 6px;
  background: #fff;
  color: var(--nomad-ink);
  padding: 0 9px;
  outline: none;
}

.nomad-page input::placeholder {
  color: #a8a29e;
}

.nomad-page select:focus,
.nomad-page input:focus,
.passport-dropdown[open] summary {
  border-color: var(--nomad-brand);
  box-shadow: 0 0 0 3px rgba(229, 26, 28, 0.14);
}

.nomad-page button {
  height: 30px;
  border: 1px solid var(--nomad-brand);
  border-radius: 6px;
  background: var(--nomad-brand);
  color: #fff;
  padding: 0 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.nomad-page button:hover {
  background: var(--nomad-brand-dark);
  border-color: var(--nomad-brand-dark);
}

.nomad-page button:active {
  transform: translateY(1px);
}

.secondary-action {
  border-color: var(--nomad-line-dark);
  background: #fff;
  color: var(--nomad-ink);
}

.secondary-action:hover {
  border-color: var(--nomad-ink);
  background: var(--nomad-panel-soft);
}

.nomad-page .pinned-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 124px;
  border-color: var(--nomad-line-dark);
  background: #fff;
  color: var(--nomad-ink);
  padding: 0 9px;
  white-space: nowrap;
}

.nomad-page .pinned-toggle:hover {
  border-color: var(--nomad-brand);
  background: #fff1f2;
  color: var(--nomad-brand);
}

.nomad-page .pinned-toggle.active {
  border-color: var(--nomad-brand);
  background: var(--nomad-brand);
  color: #fff;
}

.nomad-page .rejected-toggle.active {
  border-color: #57534e;
  background: #57534e;
  color: #fff;
}

.nomad-page .rejected-toggle:hover {
  border-color: #57534e;
  background: #f5f5f4;
  color: #292524;
}

.nomad-page .rejected-toggle.active:hover {
  border-color: #292524;
  background: #292524;
  color: #fff;
}

.nomad-page .pinned-toggle[hidden] {
  display: none;
}

.pinned-toggle .pin-icon-svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.pinned-toggle .reject-icon-svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.pinned-toggle strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.08);
  color: inherit;
  font-size: 11px;
  line-height: 1;
}

.pinned-toggle.active strong {
  background: rgba(255, 255, 255, 0.18);
}

.passport-dropdown {
  position: relative;
}

.passport-dropdown summary,
.column-chooser summary {
  display: flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--nomad-line-dark);
  border-radius: 6px;
  background: #fff;
  color: var(--nomad-ink);
  padding: 0 28px 0 9px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.passport-dropdown summary::-webkit-details-marker,
.column-chooser summary::-webkit-details-marker {
  display: none;
}

.passport-dropdown summary::after,
.column-chooser summary::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 11px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--nomad-muted);
  border-bottom: 2px solid var(--nomad-muted);
  transform: rotate(45deg);
}

.passport-menu,
.column-menu {
  position: absolute;
  z-index: 420;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 8px;
  border: 1px solid var(--nomad-line-dark);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--nomad-shadow);
  padding: 10px;
}

.passport-menu {
  right: auto;
  width: min(360px, 90vw);
  max-height: min(520px, calc(100vh - 170px));
  overflow: auto;
}

.passport-list,
.column-toggle-list {
  display: grid;
  gap: 4px;
  max-height: min(420px, calc(100vh - 240px));
  overflow: auto;
}

.passport-option,
.column-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border-radius: 6px;
  padding: 4px 6px;
  color: var(--nomad-ink);
  cursor: pointer;
}

.passport-option:hover,
.column-toggle:hover {
  background: var(--nomad-brand-soft);
}

.passport-option input,
.column-toggle input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--nomad-brand);
}

.passport-option span,
.column-toggle span {
  margin: 0;
  color: var(--nomad-muted);
  font-size: 12px;
}

.passport-option em {
  color: #a8a29e;
  font-style: normal;
}

.passport-option strong {
  display: inline-flex;
  min-width: 28px;
  color: var(--nomad-ink);
  font-size: 12px;
}

.table-panel {
  position: relative;
  z-index: 1;
  margin-top: 0;
  width: 100%;
  max-width: none;
  border: 1px solid var(--nomad-line);
  border-radius: 8px;
  background: var(--nomad-panel);
  box-shadow: 0 18px 50px rgba(28, 25, 23, 0.08);
  overflow: hidden;
}

.table-tools {
  position: relative;
  z-index: 220;
  display: flex;
  flex-wrap: nowrap;
  justify-content: end;
  min-width: 0;
  gap: 7px;
  align-items: end;
}

#destinationFilter {
  height: 38px;
  width: min(360px, 100%);
  min-width: 180px;
  border: 2px solid var(--nomad-brand);
  border-radius: 7px;
  box-shadow: 0 10px 28px rgba(229, 26, 28, 0.12);
  font-size: 15px;
  font-weight: 800;
}

#destinationFilter::placeholder {
  color: #8b817b;
  font-weight: 700;
}

.table-tools .column-chooser summary,
.table-actions-menu summary,
.table-tools button {
  min-height: 38px;
  white-space: nowrap;
}

.view-toggle {
  display: inline-flex;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid var(--nomad-line-dark);
  border-radius: 7px;
  background: #fff;
}

.view-toggle button {
  min-height: 36px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--nomad-ink);
  padding: 0 12px;
}

.view-toggle button.active {
  background: var(--nomad-brand);
  color: #fff;
}

.table-actions-menu {
  position: relative;
  z-index: 230;
  flex: 0 0 auto;
}

.table-actions-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--nomad-line-dark);
  border-radius: 7px;
  background: #fff;
  color: var(--nomad-ink);
  padding: 0 10px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.table-actions-menu > summary::-webkit-details-marker {
  display: none;
}

.table-actions-menu > summary svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.table-actions-menu[open] > summary,
.table-actions-menu > summary:hover {
  border-color: var(--nomad-brand);
  color: var(--nomad-brand);
}

.table-actions-panel {
  position: absolute;
  z-index: 430;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 10px;
  width: min(760px, calc(100vw - 24px));
  border: 1px solid var(--nomad-line-dark);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--nomad-shadow);
  padding: 10px;
  overflow: visible;
}

.table-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.group-tools {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 1fr) repeat(4, max-content);
  gap: 6px;
  align-items: end;
}

.group-tools label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.group-tools label span {
  color: var(--nomad-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.group-tools select,
.group-tools input {
  height: 38px;
}

.group-tools select {
  width: 100%;
}

.group-tools input {
  width: 100%;
}

.group-tools button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.column-chooser {
  position: relative;
}

.column-menu {
  width: min(340px, 80vw);
  left: auto;
}

.table-actions-panel .column-chooser {
  width: 100%;
}

.table-actions-panel .column-chooser summary {
  justify-content: flex-start;
  width: 100%;
}

.table-actions-panel .column-menu {
  position: static;
  width: 100%;
  margin-top: 8px;
  box-shadow: none;
}

.table-shell {
  overflow: auto;
  max-height: calc(100vh - 104px);
  min-height: 420px;
  background:
    linear-gradient(90deg, rgba(245, 245, 244, 0.9), rgba(245, 245, 244, 0)),
    #fff;
}

.table-shell[hidden],
.destination-cards[hidden] {
  display: none;
}

.table-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid var(--nomad-line);
  background: #fff;
  padding: 10px;
  color: var(--nomad-muted);
  font-size: 12px;
  font-weight: 800;
}

.table-more button[hidden] {
  display: none;
}

.table-source-note {
  margin: 8px 4px 0;
  max-width: 1120px;
  color: var(--nomad-muted);
  font-size: 11px;
  line-height: 1.45;
}

.table-source-note a {
  color: var(--nomad-brand-dark);
  font-weight: 800;
  text-decoration: none;
}

.table-source-note a:hover {
  text-decoration: underline;
}

.nomad-page table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 13px;
}

.nomad-page thead {
  position: sticky;
  top: 0;
  z-index: 25;
}

.nomad-page th,
.nomad-page td {
  border-right: 1px solid var(--nomad-line);
  border-bottom: 1px solid var(--nomad-line);
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.nomad-page th {
  position: relative;
  height: 72px;
  background: #292524;
  color: #fff;
  overflow: visible;
  padding: 8px 10px;
  text-align: left;
  user-select: none;
}

.nomad-page th.active {
  background: #3f3a37;
}

.nomad-page th.sticky,
.nomad-page td.sticky {
  position: sticky;
  z-index: 12;
  box-shadow: 1px 0 0 var(--nomad-line);
}

.nomad-page th.sticky {
  z-index: 30;
}

.nomad-page td {
  height: var(--row-height);
  max-height: var(--row-height);
  padding: 6px 10px;
  color: #292524;
  text-align: left;
}

tbody tr:nth-child(even) td {
  background: #fafaf9;
}

tbody tr:hover td {
  background: #fff7ed;
}

tbody tr.pinned-row td {
  background: #fff7f7;
  border-top-color: rgba(229, 26, 28, 0.2);
  border-bottom-color: rgba(229, 26, 28, 0.2);
}

tbody tr.pinned-row td:first-child {
  box-shadow:
    inset 5px 0 0 var(--nomad-brand),
    1px 0 0 var(--nomad-line);
}

tbody tr.pinned-row:hover td {
  background: #fff1f2;
}

tbody tr.rejected-row td {
  background: #f5f5f4;
  color: #57534e;
  border-top-color: #d6d3d1;
  border-bottom-color: #d6d3d1;
}

tbody tr.rejected-row td:first-child {
  box-shadow:
    inset 5px 0 0 #78716c,
    1px 0 0 var(--nomad-line);
}

tbody tr.rejected-row:hover td {
  background: #ede9e4;
}

td.numeric {
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.number-explain {
  display: block;
}

.nomad-page th.wrapped,
.nomad-page td.wrapped {
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.nomad-page td.wrapped .number-explain {
  white-space: normal;
}

.filter-row th {
  height: 42px;
  background: #f5f5f4;
  padding: 5px;
}

.filter-cell input {
  height: 30px;
  border-radius: 5px;
  font-size: 12px;
}

.range-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.th-tools {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  margin-bottom: 6px;
}

.drag-handle {
  display: inline-flex;
  width: 18px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  cursor: grab;
  color: #a8a29e;
}

.drag-handle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.drag-handle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nomad-page .freeze-button,
.nomad-page .sort-button {
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex: 0 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #e7e5e4;
  padding: 0;
}

.freeze-button .pin-icon-svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.freeze-button.active,
.freeze-button:hover,
.sort-button.active,
.sort-button:hover {
  border-color: var(--nomad-brand);
  background: var(--nomad-brand);
  color: #fff;
}

.sort-button .sort-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sort-button .sort-down {
  opacity: 0.4;
}

.sort-button .sort-up {
  opacity: 0.4;
}

.sort-button .sort-icon.sort-asc .sort-up,
.sort-button .sort-icon.sort-desc .sort-down {
  opacity: 1;
}

.header-menu {
  position: relative;
  margin-left: auto;
}

.header-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #e7e5e4;
  cursor: pointer;
  list-style: none;
}

.header-menu-button::-webkit-details-marker {
  display: none;
}

.header-menu-button::before {
  content: "\22EF";
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.header-menu[open] .header-menu-button,
.header-menu-button:hover {
  border-color: var(--nomad-brand);
  background: var(--nomad-brand);
  color: #fff;
}

.header-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1000;
  width: max-content;
  min-width: 190px;
  padding: 5px;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(28, 25, 23, 0.2);
  color: var(--nomad-ink);
}

.header-menu-panel button {
  display: flex;
  width: 100%;
  min-height: 32px;
  align-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--nomad-ink);
  padding: 7px 9px;
  text-align: left;
  font-size: 12px;
  font-weight: 750;
}

.nomad-page .header-menu-button {
  min-height: 22px;
}

.nomad-page .header-menu-panel button {
  min-height: 32px;
  justify-content: flex-start;
}

.header-menu-panel button:hover,
.header-menu-panel button:focus-visible {
  background: #fff1f2;
  color: var(--nomad-brand);
  outline: none;
}

.th-label {
  display: block;
  min-width: 0;
  white-space: normal;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.18;
}

.th-label-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: start;
  gap: 6px;
}

.nomad-page th:has(.header-menu[open]) {
  z-index: 1001;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 7px;
  height: 100%;
  cursor: col-resize;
}

.row-resizer {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 5px;
  cursor: row-resize;
}

.city-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}

.city-link,
.country-link {
  color: var(--nomad-text);
  font-weight: 900;
  text-decoration: none;
}

.city-link:hover,
.country-link:hover {
  color: var(--nomad-brand);
  text-decoration: underline;
}

.nomad-page .row-pin-button,
.nomad-page .row-reject-button,
.nomad-page .row-group-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid #d6d3d1;
  border-radius: 999px;
  background: #fff;
  color: #57534e;
  padding: 0;
  box-shadow: 0 1px 0 rgba(28, 25, 23, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nomad-page .row-pin-button:hover,
.nomad-page .row-reject-button:hover,
.nomad-page .row-group-button:hover {
  border-color: var(--nomad-brand);
  color: var(--nomad-brand);
  background: #fff1f2;
}

.nomad-page .row-pin-button.active {
  width: 30px;
  min-width: 30px;
  border-color: var(--nomad-brand);
  background: var(--nomad-brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(229, 26, 28, 0.22);
}

.nomad-page .row-pin-button.active:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.nomad-page .row-reject-button.active {
  width: 30px;
  min-width: 30px;
  border-color: #57534e;
  background: #57534e;
  color: #fff;
  box-shadow: 0 4px 12px rgba(87, 83, 78, 0.2);
}

.nomad-page .row-reject-button.active:hover {
  background: #292524;
  border-color: #292524;
  color: #fff;
}

.nomad-page .row-group-button.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.nomad-page .row-group-button.active:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
}

.pin-icon-svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reject-icon-svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.group-icon-svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nomad-page .row-pin-button.active .pin-icon-svg {
  fill: rgba(255, 255, 255, 0.16);
}

.fare-link,
.video-link,
.cell-links a,
.scenic-info-cell a {
  color: var(--nomad-brand-dark);
  font-weight: 800;
  text-decoration: none;
}

.fare-link:hover,
.video-link:hover,
.cell-links a:hover,
.scenic-info-cell a:hover {
  text-decoration: underline;
}

.scenic-info-cell,
.cell-links {
  display: grid;
  gap: 3px;
}

.scenic-image-cell {
  display: block;
}

.scenic-gallery {
  display: grid;
  grid-template-columns: 24px minmax(88px, 1fr) 24px;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.nomad-page .gallery-preview {
  display: block;
  width: 100%;
  height: 62px;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.nomad-page .gallery-preview:hover,
.nomad-page .gallery-preview:focus-visible {
  border-color: transparent;
  background: transparent;
  outline: 2px solid var(--nomad-brand);
  outline-offset: 2px;
}

.scenic-gallery img,
.scenic-gallery .scenic-fallback {
  width: 100%;
  height: 62px;
  border-radius: 6px;
  object-fit: cover;
  background: linear-gradient(135deg, #292524, #e51a1c);
  transition: transform 160ms ease;
}

.gallery-preview:hover img {
  transform: scale(1.03);
}

.gallery-nav {
  width: 24px;
  height: 28px;
  border-radius: 5px;
  padding: 0;
}

.gallery-count {
  color: var(--nomad-muted);
  font-size: 10px;
}

.map-preview-cell {
  display: grid;
  gap: 6px;
}

.map-preview-frame {
  position: relative;
  height: 112px;
  overflow: hidden;
  border: 1px solid var(--nomad-line);
  border-radius: 6px;
  background: #e7e5e4;
}

.map-preview-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.94) contrast(0.98);
}

.map-preview-frame > button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.map-preview-frame > button:hover,
.map-preview-frame > button:focus-visible {
  outline: 2px solid var(--nomad-brand);
  outline-offset: -2px;
}

.map-cell-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 900;
}

.map-cell-actions button {
  min-height: 26px;
  border-radius: 5px;
  padding: 0 8px;
  font-size: 11px;
}

.map-cell-actions a {
  color: var(--nomad-brand-dark);
  text-decoration: none;
}

.map-cell-actions a:hover {
  text-decoration: underline;
}

.destination-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 14px;
  background: #fafaf9;
}

.destination-card {
  overflow: hidden;
  border: 1px solid var(--nomad-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(28, 25, 23, 0.08);
}

.destination-card.pinned-card {
  box-shadow:
    inset 5px 0 0 var(--nomad-brand),
    0 14px 34px rgba(229, 26, 28, 0.12);
}

.destination-card.rejected-card {
  opacity: 0.62;
}

.nomad-page .destination-card-image {
  display: block;
  width: 100%;
  height: 260px;
  min-height: 260px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #171412;
  padding: 0;
  cursor: zoom-in;
}

.destination-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.destination-card-image:hover img,
.destination-card-image:focus-visible img {
  transform: scale(1.03);
}

.destination-card-body {
  display: grid;
  gap: 11px;
  padding: 13px;
}

.destination-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--nomad-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.destination-card-topline strong {
  color: var(--nomad-brand);
  font-size: 16px;
}

.destination-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.destination-card h2 a {
  color: var(--nomad-ink);
  text-decoration: none;
}

.destination-card h2 a:hover {
  color: var(--nomad-brand);
  text-decoration: underline;
}

.destination-card p {
  min-height: 38px;
  margin: 0;
  color: #57534e;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.destination-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.destination-card-metrics div {
  min-width: 0;
  border: 1px solid var(--nomad-line);
  border-radius: 6px;
  background: #fafaf9;
  padding: 8px;
}

.destination-card-metrics dt {
  color: var(--nomad-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.destination-card-metrics dd {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--nomad-ink);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-map-preview {
  position: relative;
  height: 150px;
  overflow: hidden;
  border: 1px solid var(--nomad-line);
  border-radius: 7px;
  background: #e7e5e4;
}

.card-map-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.card-map-preview button {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-height: 30px;
  border-radius: 6px;
  padding: 0 10px;
  box-shadow: 0 8px 20px rgba(28, 25, 23, 0.18);
}

.destination-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.destination-card-actions a,
.destination-card-actions .card-group-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--nomad-line-dark);
  border-radius: 6px;
  background: #fff;
  color: var(--nomad-ink);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.destination-card-actions .card-group-button.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.destination-card-actions a:hover,
.destination-card-actions .card-group-button:hover {
  border-color: var(--nomad-brand);
  color: var(--nomad-brand);
}

.map-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 42px);
  background: rgba(18, 15, 14, 0.82);
}

.map-modal[hidden] {
  display: none;
}

.map-modal-panel {
  display: grid;
  grid-template-rows: auto minmax(360px, 74vh);
  width: min(1180px, 96vw);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

.map-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--nomad-line);
  padding: 12px 14px;
}

.map-modal-header strong,
.map-modal-header span {
  display: block;
}

.map-modal-header strong {
  font-size: 18px;
  font-weight: 900;
}

.map-modal-header span {
  color: var(--nomad-muted);
  font-size: 12px;
  font-weight: 800;
}

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

.map-modal-actions a,
.map-modal-actions button {
  min-height: 34px;
  border-radius: 6px;
  padding: 0 12px;
}

.map-modal-actions a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--nomad-line-dark);
  color: var(--nomad-ink);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.map-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

body.is-lightbox-open {
  overflow: hidden;
}

body.is-map-modal-open {
  overflow: hidden;
}

.scenic-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 18px;
  padding: 58px clamp(14px, 3vw, 44px) 34px;
  background: rgba(18, 15, 14, 0.94);
  color: #fff;
}

.scenic-lightbox[hidden] {
  display: none;
}

.scenic-lightbox figure {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-width: 0;
  margin: 0;
}

.scenic-lightbox img {
  width: min(100%, 1320px);
  height: min(72vh, 760px);
  max-height: calc(100vh - 184px);
  border-radius: 8px;
  object-fit: contain;
  background: #111;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.scenic-lightbox figcaption {
  display: grid;
  justify-items: center;
  gap: 4px;
  max-width: min(760px, 92vw);
  text-align: center;
}

.scenic-lightbox figcaption strong {
  font-size: 18px;
  line-height: 1.25;
}

.scenic-lightbox figcaption span,
.scenic-lightbox figcaption small {
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 800;
}

.scenic-lightbox-close,
.scenic-lightbox-arrow {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.scenic-lightbox-close:hover,
.scenic-lightbox-arrow:hover,
.scenic-lightbox-close:focus-visible,
.scenic-lightbox-arrow:focus-visible {
  border-color: #fff;
  background: var(--nomad-brand);
  outline: none;
}

.scenic-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  height: 36px;
  padding: 0 14px;
}

.scenic-lightbox-arrow {
  width: 56px;
  height: 56px;
  padding: 0;
  font-size: 38px;
  line-height: 1;
}

.number-explain {
  cursor: help;
}

.is-dragging {
  opacity: 0.55;
}

body.is-resizing .nomad-page,
body.is-row-resizing .nomad-page {
  cursor: col-resize;
  user-select: none;
}

@media (max-width: 1400px) {
  .nomad-hero {
    grid-template-columns: minmax(360px, 0.58fr) minmax(500px, 1fr) minmax(210px, 0.36fr);
  }

  .nomad-controls {
    grid-column: 1 / -1;
    grid-template-columns: minmax(130px, 0.75fr) minmax(160px, 0.9fr) 86px;
  }
}

@media (max-width: 1100px) {
  .nomad-hero {
    grid-template-columns: 1fr;
  }

  .nomad-stats {
    width: 100%;
  }

  .nomad-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-tools {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .nomad-page {
    padding: 10px 8px 14px;
  }

  .nomad-controls {
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  .nomad-controls .passport-panel {
    grid-column: 1 / -1;
  }

  .table-tools {
    justify-content: stretch;
  }

  #destinationFilter {
    flex: 1 1 auto;
  }

  .view-toggle,
  .table-actions-menu {
    flex: 0 0 auto;
  }

  .group-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-tools select,
  .group-tools input {
    width: 100%;
  }

  .nomad-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .column-chooser,
  .table-tools button,
  .table-actions-menu > summary {
    min-width: 0;
  }

  .column-chooser summary,
  .table-tools button {
    width: 100%;
    justify-content: center;
  }

  .table-actions-menu > summary span {
    display: none;
  }

  .table-actions-panel {
    right: -8px;
    width: calc(100vw - 16px);
  }

  .table-shell {
    max-height: calc(100vh - 220px);
    min-height: 360px;
  }

  .destination-cards {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 220px);
    padding: 8px;
  }

  .destination-card-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nomad-page .destination-card-image {
    height: 235px;
    min-height: 235px;
  }

  .map-modal-panel {
    grid-template-rows: auto minmax(320px, 72vh);
    width: 98vw;
  }

  .map-modal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nomad-hero {
    gap: 8px;
  }

  .nomad-hero h1 {
    font-size: 28px;
    white-space: normal;
  }

  .nomad-controls {
    padding: 8px;
    border-radius: 8px;
  }

  .nomad-page select,
  .nomad-page input,
  .passport-dropdown summary,
  .column-chooser summary,
  .nomad-page button {
    min-height: 42px;
    font-size: 15px;
  }

  .table-tools {
    gap: 6px;
  }

  .nomad-page table {
    font-size: 14px;
  }

  .nomad-page th {
    height: 78px;
    padding: 8px;
  }

  .scenic-lightbox {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
    padding: 54px 10px 24px;
  }

  .scenic-lightbox img {
    max-height: calc(100vh - 188px);
    border-radius: 6px;
  }

  .scenic-lightbox-arrow {
    width: 42px;
    height: 48px;
    font-size: 30px;
  }

  .scenic-lightbox figcaption strong {
    font-size: 15px;
  }

  .nomad-page td {
    padding: 7px 8px;
  }

  .freeze-button,
  .drag-handle,
  .col-resizer,
  .row-resizer {
    display: none;
  }

  .th-tools {
    margin-bottom: 0;
  }

  .table-more {
    position: sticky;
    bottom: 0;
    z-index: 15;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }
}
