:root {
  color-scheme: light;
  --bg: #f0f0f0;
  --panel: #ffffff;
  --ink: #202020;
  --muted: #747474;
  --line: #d8d8d8;
  --soft: #f7f7f7;
  --green: #36a852;
  --green-dark: #167c35;
  --yellow: #f3bc31;
  --orange: #dd7d2b;
  --red: #4f98c7;
  --blue: #3575c9;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.22), 0 8px 22px rgba(0, 0, 0, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 14px;
}

body.dark-mode {
  --bg: #0f0f0f;
  --panel: #171717;
  --ink: #f2f2f2;
  --muted: #b9b9b9;
  --line: #333333;
  --soft: #202020;
  color: var(--ink);
  background: #0f0f0f;
}

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

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  border-radius: 6px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: none;
  grid-template-columns: auto auto minmax(420px, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 56px;
  padding: 8px 14px;
  border-bottom: 1px solid #cfcfcf;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.nav-tabs,
.brand,
.header-actions,
.quick-filters,
.view-switch,
.compare-strip,
.card-title,
.review-line,
.card-footer,
.filter-head,
.range-label,
.passport-select,
.avatar-row {
  display: flex;
  align-items: center;
}

.nav-tabs {
  gap: 4px;
}

.nav-tabs a,
.view-button,
.quick-chip,
.side-filter,
.compare-strip button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: #3a3a3a;
  cursor: pointer;
  font-weight: 700;
}

.nav-tabs a {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.nav-tabs a.active,
.view-button.active,
.side-filter.active,
.quick-chip.active {
  border-color: #222;
  color: white;
  background: #222;
}

.brand {
  gap: 7px;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  aspect-ratio: 1;
  border-radius: 6px;
  color: white;
  background: #222;
  font-weight: 900;
}

.top-search {
  position: relative;
}

.page-header {
  position: fixed;
  z-index: 90;
  top: 14px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  pointer-events: auto;
}

.page-header-logo,
.page-header-avatar {
  border: 0;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-weight: 1000;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.page-header-logo {
  display: grid;
  place-items: center;
  width: 52px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.page-header-logo .brand-mark {
  width: auto;
  border-radius: 0;
  color: white;
  background: transparent;
  font-size: 23px;
}

.page-header-search {
  width: min(400px, 34vw);
}

.page-header-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 999px;
  padding: 0 18px;
  color: #202020;
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.page-header-avatar {
  display: grid;
  place-items: center;
  position: relative;
  width: 48px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  color: #202020;
  background: #ffffff;
  pointer-events: auto;
  font-size: 20px;
}

.page-header-avatar .avatar-photo-layer {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.dark-mode.profile-open .page-header-search input {
  border-color: rgba(255, 255, 255, 0.12);
  color: #e7e7e7;
  background: rgba(12, 12, 12, 0.78);
}

body:not(.dark-mode).profile-open .page-header-search input {
  border-color: rgba(0, 0, 0, 0.14);
  color: #202020;
  background: rgba(255, 255, 255, 0.92);
}

body.dark-mode .page-header-search input {
  border-color: rgba(255, 255, 255, 0.16);
  color: #f2f2f2;
  background: rgba(16, 16, 16, 0.9);
}

@media (max-width: 720px) {
  .page-header {
    top: 10px;
    left: 12px;
    right: 12px;
  }

  .page-header-search {
    width: min(250px, 48vw);
  }

  .page-header-search input {
    min-height: 42px;
    font-size: 15px;
  }

  .page-header-logo,
  .page-header-avatar {
    width: 44px;
  }
}

.top-search label {
  position: absolute;
  left: 12px;
  top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  pointer-events: none;
  text-transform: uppercase;
}

.top-search input {
  width: 100%;
  min-height: 40px;
  padding: 15px 12px 4px;
  border: 1px solid var(--line);
  background: #f9f9f9;
  outline: none;
}

.top-search input:focus {
  border-color: #888;
  background: white;
}

.language-button {
  min-height: 38px;
  border: 1px solid #222;
  cursor: pointer;
  font-weight: 900;
}

.language-button,
.theme-button {
  width: 100%;
  color: #222;
  background: white;
}

.theme-button {
  min-width: 0;
  padding: 0 12px;
}

body.dark-mode .topbar {
  border-bottom-color: #2e2e2e;
  background: rgba(16, 16, 16, 0.96);
}

body.dark-mode .brand-mark,
body.dark-mode .nav-tabs a.active {
  background: #4f98c7;
}

body.dark-mode .nav-tabs a,
body.dark-mode .language-button,
body.dark-mode .theme-button,
body.dark-mode .top-search input {
  border-color: #313131;
  color: #ddd;
  background: #181818;
}

.intro-hero {
  --guest-intro-photo-a: url("https://images.unsplash.com/photo-1540959733332-eab4deabeeaf?auto=format&fit=crop&w=1800&q=76");
  --guest-intro-photo-b: url("https://images.unsplash.com/photo-1590253230532-a67f6bc61c9e?auto=format&fit=crop&w=1800&q=76");
  position: relative;
  display: none;
  min-height: clamp(240px, 30vw, 340px);
  overflow: hidden;
  color: #1f2a2f;
  background: #1e5667;
}

body.show-guest-intro:not(.page-header-open) .intro-hero {
  display: block;
}

.hero-bg,
.hero-dim {
  position: absolute;
  inset: 0;
}

.hero-bg {
  overflow: hidden;
}

.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.2) 56%, rgba(0, 0, 0, 0.12)),
    var(--guest-intro-photo-a);
  background-position: center;
  background-size: cover;
  transform: scale(1.035);
  transition: opacity 1200ms ease;
}

.hero-bg::after {
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.2) 56%, rgba(0, 0, 0, 0.12)),
    var(--guest-intro-photo-b);
  opacity: 0;
}

.intro-hero.is-alt-photo .hero-bg::before {
  opacity: 0;
}

.intro-hero.is-alt-photo .hero-bg::after {
  opacity: 1;
}

.hero-dim {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.34));
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  min-height: clamp(240px, 30vw, 340px);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 58px) 0;
}

.hero-copy {
  position: relative;
  max-width: 680px;
  width: clamp(300px, 66%, 640px);
  overflow: visible;
  border: 1px solid rgba(91, 75, 48, 0.24);
  border-radius: 8px;
  padding: clamp(82px, 7vw, 104px) clamp(20px, 3vw, 30px) clamp(16px, 2.3vw, 22px);
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(79, 152, 199, 0.12) 40px),
    linear-gradient(145deg, rgba(255, 255, 250, 0.98), rgba(248, 241, 224, 0.94));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  transform: rotate(-1.1deg);
}

.postcard-logo {
  position: absolute;
  left: 18px;
  top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  aspect-ratio: 1;
  border: 2px solid rgba(31, 42, 47, 0.74);
  border-radius: 50%;
  color: #1d2d35;
  background: rgba(255, 255, 255, 0.34);
  font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  font-size: 10px;
  font-weight: 900;
  line-height: 0.95;
  text-align: center;
  white-space: pre-line;
  transform: rotate(-7deg);
}

.hero-copy::after {
  content: none;
}

.hero-copy h1 {
  max-width: 100%;
  margin: 0 0 12px;
  color: #1d2d35;
  font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  font-size: clamp(28px, 3.7vw, 48px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0;
  text-shadow: none;
  white-space: nowrap;
}

.postcard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(10px, 2.2vw, 22px);
  align-items: end;
  max-width: 100%;
}

.hero-subtitle {
  max-width: 520px;
  margin: 0;
  color: #33464f;
  font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  font-size: clamp(16px, 1.8vw, 23px);
  font-weight: 750;
  line-height: 1.38;
  text-shadow: none;
  white-space: pre-line;
}

.postcard-members {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: clamp(132px, 22vw, 230px);
  min-height: 48px;
  margin: 0 0 3px;
  padding-left: 2px;
}

.postcard-member-bubble {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(34px, 4.2vw, 46px);
  aspect-ratio: 1;
  margin-right: -10px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  color: #1d2d35;
  background:
    var(--portrait, none) center / cover no-repeat,
    linear-gradient(160deg, #ffffff, #eef3f5);
  box-shadow: 0 8px 22px rgba(28, 33, 36, 0.2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  overflow: visible;
}

.postcard-member-bubble:first-child {
  margin-left: 0;
}

.postcard-member-bubble:hover,
.postcard-member-bubble:focus-visible {
  z-index: 2;
  transform: translateY(-2px);
}

.postcard-member-bubble.is-placeholder {
  background: linear-gradient(160deg, #ffffff, #f3f6f8);
}

.postcard-member-bubble .member-profile-popover {
  --popover-overhang: 72px;
  position: absolute;
  left: 50%;
  top: auto;
  bottom: calc(100% + 18px);
  width: 250px;
  min-height: 194px;
  padding: 72px 20px 20px;
  transform: translateX(-50%) translateY(8px) scale(0.96) rotate(1.1deg);
}

.postcard-member-bubble:hover .member-profile-popover,
.postcard-member-bubble:focus-visible .member-profile-popover {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1) rotate(1.1deg);
  visibility: visible;
}

.postcard-member-bubble .member-popover-avatar {
  width: 132px;
  border-width: 5px;
  font-size: 34px;
}

.postcard-join-button.guest-join-button {
  position: absolute;
  top: 18px;
  right: 22px;
  left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(150px, 33%, 300px);
  min-height: 48px;
  margin-top: 0;
  border-radius: 999px;
  padding: 0 30px;
  font-size: 16px;
  box-shadow: 0 8px 20px rgba(79, 152, 199, 0.24);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  width: calc(100% - 40px);
  margin: 0 auto;
  padding: 28px 0 56px;
}

.community-rail {
  position: sticky;
  top: 76px;
  align-self: start;
  display: grid;
  gap: 14px;
}

.member-tile {
  position: relative;
  display: grid;
  grid-template-rows: 1fr;
  container-type: inline-size;
  aspect-ratio: 1;
  min-height: 0;
  border: 1px solid #303030;
  border-radius: 13px;
  overflow: visible;
  color: #e7e7e7;
  background: #161616;
  box-shadow: var(--shadow);
  z-index: 8;
}

.member-tile:has(.community-avatar:hover),
.member-tile:has(.community-avatar:focus-visible) {
  z-index: 80;
}

.member-bubble {
  display: grid;
  align-content: start;
  gap: 16px;
  border: 1px solid #303030;
  border-radius: 8px;
  padding: 0 0 14px;
  overflow: hidden;
  color: #e7e7e7;
  background: #1b1b1b;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.member-tile .member-bubble {
  position: relative;
  min-height: 0;
  border: 0;
  border-radius: 12px;
  padding-bottom: 14px;
  overflow: visible;
  box-shadow: none;
}

.member-tile .member-bubble + .member-bubble {
  border-top: 1px solid #303030;
}

.member-bubble header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-height: 0;
  padding: 14px 16px 2px;
  border-bottom: 0;
}

.member-tile .member-bubble header {
  min-height: 0;
  padding: 14px 14px 2px;
}

.member-bubble h2 {
  display: grid;
  gap: 3px;
  margin: 0;
  color: #dcdcdc;
  font-size: 17px;
  font-weight: 1000;
  line-height: 1;
}

.member-tile .member-bubble h2 {
  font-size: 16px;
}

.member-bubble header strong {
  align-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  color: #ffffff;
  background: #202020;
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.community-avatar-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 9px;
  align-content: start;
  align-items: start;
  padding: 0 14px;
  overflow: visible;
  z-index: 3;
}

.member-tile .community-avatar-grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: start;
  padding: 0 12px;
}

.community-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: white;
  background:
    radial-gradient(circle at 32% 28%, hsla(var(--avatar-hue), 80%, 82%, 0.95), transparent 38%),
    linear-gradient(135deg, hsl(var(--avatar-hue), 60%, 42%), hsl(calc(var(--avatar-hue) + 52), 64%, 28%));
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font-size: clamp(10px, 1.2vw, 13px);
  font-weight: 1000;
  isolation: isolate;
}

.community-avatar.is-empty-avatar {
  color: transparent;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #d8dce2, 0 6px 16px rgba(0, 0, 0, 0.12);
}

.member-tile .community-avatar {
  max-width: 56px;
  justify-self: center;
}

.community-avatar:hover,
.community-avatar:focus-visible {
  border-color: rgba(255, 255, 255, 0.74);
  outline: none;
  z-index: 120;
}

.community-avatar.is-empty-avatar:hover,
.community-avatar.is-empty-avatar:focus-visible {
  border-color: #d8dce2;
}

.community-avatar-initials {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.member-profile-popover {
  --popover-left: 50vw;
  --popover-top: 50vh;
  --popover-overhang: 88px;
  position: fixed;
  left: var(--popover-left);
  top: var(--popover-top);
  z-index: 200;
  display: grid;
  justify-items: center;
  width: 270px;
  min-height: 218px;
  border: 1px solid #343434;
  border-radius: 16px;
  padding: 88px 22px 24px;
  color: #d4d4d4;
  background: #151515;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translateY(8px) scale(0.96);
  transform-origin: top center;
  visibility: hidden;
  transition: opacity 140ms ease, transform 140ms ease;
}

.community-avatar:hover .member-profile-popover,
.community-avatar:focus-visible .member-profile-popover {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

@media (hover: none), (pointer: coarse), (max-width: 700px) {
  .community-avatar:hover .member-profile-popover,
  .community-avatar:focus-visible .member-profile-popover {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    visibility: hidden;
  }
}

.member-popover-avatar {
  position: absolute;
  top: calc(var(--popover-overhang) * -1);
  display: grid;
  place-items: center;
  width: 164px;
  aspect-ratio: 1;
  border: 6px solid #151515;
  border-radius: 50%;
  color: white;
  background:
    radial-gradient(circle at 32% 28%, hsla(var(--avatar-hue), 80%, 82%, 0.95), transparent 38%),
    linear-gradient(135deg, hsl(var(--avatar-hue), 60%, 42%), hsl(calc(var(--avatar-hue) + 52), 64%, 28%));
  box-shadow: 0 0 0 4px #282828, inset 0 -22px 34px rgba(0, 0, 0, 0.2);
  font-size: 42px;
  font-weight: 1000;
}

.member-popover-avatar.is-empty-avatar {
  color: transparent;
  background: #ffffff;
  box-shadow: 0 0 0 4px #282828, inset 0 0 0 1px #d8dce2, 0 18px 34px rgba(0, 0, 0, 0.24);
}

.community-avatar .profile-avatar-flag,
.community-avatar .profile-avatar-visa {
  bottom: -5px;
  width: 24px;
  border-color: rgba(0, 0, 0, 0.1);
}

.community-avatar .profile-avatar-flag {
  left: -5px;
}

.community-avatar .profile-avatar-visa {
  right: -5px;
}

.member-popover-avatar .profile-avatar-flag,
.member-popover-avatar .profile-avatar-visa {
  bottom: -4px;
  width: 31px;
  border-color: rgba(0, 0, 0, 0.12);
  font-size: 17px;
}

.member-popover-avatar .profile-avatar-flag {
  left: 13px;
}

.member-popover-avatar .profile-avatar-visa {
  right: 13px;
}

.member-profile-popover strong {
  color: #d8d8d8;
  font-size: 21px;
  font-weight: 1000;
  line-height: 1;
}

.member-profile-popover > span:last-child {
  margin-top: 12px;
  color: #c6c6c6;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.42;
}

.member-bubble p {
  margin: -3px 14px 0;
  color: #a9a9a9;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.member-tile .member-bubble p {
  display: -webkit-box;
  margin: 0 12px;
  overflow: hidden;
  color: #aaa;
  font-size: 10px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.member-bubble.is-muted {
  opacity: 0.78;
}

.routes-page {
  display: grid;
  gap: 18px;
  width: min(1280px, calc(100% - 80px));
  margin: 28px auto 64px;
  padding-bottom: 56px;
}

body.page-header-open .routes-page {
  margin-top: 92px;
}

.routes-page-hero {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.routes-page-hero span {
  color: #4f98c7;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.routes-page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.95;
  letter-spacing: 0;
}

.routes-page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.routes-page .target-panel {
  margin: 0;
}

.profile-page {
  min-height: calc(100vh - 56px);
  color: #d6d6d6;
  background: #0f0f0f;
}

.profile-map-hero {
  position: sticky;
  top: 0;
  z-index: 0;
  min-height: clamp(540px, 52vh, 690px);
  overflow: hidden;
  background: #c9d1d3;
}

.profile-map-hero::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: -64px;
  z-index: 2;
  display: block;
  height: 146px;
  border-radius: 50% 50% 0 0 / 42% 42% 0 0;
  background: #0f0f0f;
}

.profile-map-lines {
  display: none;
}

.profile-country-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #c7d0d2;
}

.profile-country-map .maplibregl-map,
.profile-country-map .maplibregl-canvas-container,
.profile-country-map .maplibregl-canvas {
  width: 100%;
  height: 100%;
}

.profile-country-map .maplibregl-canvas {
  filter: saturate(0.72) contrast(0.92) brightness(1.04);
}

.profile-country-map.is-maplibre-missing::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 36%, rgba(255, 255, 255, 0.92) 0 11%, transparent 12%),
    radial-gradient(circle at 54% 32%, rgba(255, 255, 255, 0.92) 0 19%, transparent 20%),
    radial-gradient(circle at 70% 58%, rgba(255, 255, 255, 0.92) 0 11%, transparent 12%),
    #c7d0d2;
  opacity: 0.82;
}

.profile-map-badge {
  position: absolute;
  right: 18px;
  bottom: 132px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  border-radius: 999px;
  padding: 8px 12px;
  color: #202020;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  font-size: 13px;
  font-weight: 1000;
}

.profile-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.profile-map-legend-dot {
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--legend-color, #4f98c7);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.profile-map-badge.is-empty {
  max-width: min(320px, calc(100% - 36px));
  white-space: normal;
}

.profile-nav {
  position: absolute;
  z-index: 4;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.page-header-open .profile-nav {
  display: none;
}

.profile-home-button,
.profile-home-search,
.profile-mini-avatar {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: white;
  cursor: pointer;
  font-weight: 1000;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.profile-home-button {
  display: grid;
  place-items: center;
  width: 52px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #4f98c7;
}

.profile-home-button .brand-mark {
  width: auto;
  color: white;
  background: transparent;
  font-size: 23px;
}

.profile-home-search {
  display: flex;
  align-items: center;
  min-height: 48px;
  width: min(360px, 32vw);
  border-radius: 999px;
  padding: 0 20px;
  color: #d8d8d8;
  background: rgba(16, 16, 16, 0.82);
  text-align: left;
  font-size: 17px;
}

.profile-mini-avatar {
  display: grid;
  place-items: center;
  position: relative;
  width: 48px;
  aspect-ratio: 1;
  margin-left: auto;
  border-radius: 50%;
  overflow: hidden;
  color: #222;
  background: #f5f5f5;
  font-size: 21px;
}

.profile-map-actions {
  position: absolute;
  z-index: 2;
  left: 18px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.profile-map-actions button,
.profile-follow,
.profile-identity button,
.profile-route-actions button {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-size: 18px;
  font-weight: 1000;
}

.profile-map-zoom {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(15, 15, 15, 0.9);
}

.profile-map-zoom span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 52px;
  color: #d7d7d7;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 34px;
  font-weight: 1000;
}

.profile-map-zoom span:last-child {
  border-bottom: 0;
}

.profile-map-location {
  position: absolute;
  z-index: 2;
  right: 110px;
  bottom: 78px;
  color: white;
  font-size: 18px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.profile-panel {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 26px;
  justify-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: -138px auto 0;
  padding: 0 0 72px;
}

.profile-action-stack {
  position: absolute;
  right: 0;
  top: 132px;
  display: grid;
  gap: 14px;
  width: 190px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.profile-secondary {
  min-height: 48px;
  border: 1px solid #4f98c7;
  border-radius: 12px;
  color: #4f98c7;
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  font-weight: 1000;
}

.profile-follow.is-following {
  color: #ffffff;
  background: #202020;
}

.profile-identity {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    padding 180ms ease;
}

.profile-avatar-wrap {
  position: relative;
  width: 230px;
  aspect-ratio: 1;
}

.profile-big-avatar {
  display: grid;
  place-items: center;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 4px solid #0a0a0a;
  border-radius: 50%;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 50% 36%, #d3d3d3 0 22%, transparent 23%),
    radial-gradient(circle at 50% 92%, #cfcfcf 0 38%, transparent 39%),
    #f5f5f5;
  font-size: 0;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.profile-big-avatar.is-editable {
  cursor: pointer;
}

.profile-big-avatar.is-editable::before,
.profile-big-avatar.is-editable::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  aspect-ratio: 1;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #4f98c7;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 2;
}

.profile-big-avatar.is-editable::after {
  background:
    linear-gradient(#ffffff, #ffffff) center / 18px 6px no-repeat,
    linear-gradient(#ffffff, #ffffff) center / 6px 18px no-repeat,
    #4f98c7;
  z-index: 3;
}

.profile-big-avatar.is-editable:hover::before,
.profile-big-avatar.is-editable:hover::after,
.profile-big-avatar.is-editable:focus-visible::before,
.profile-big-avatar.is-editable:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.profile-big-avatar:disabled {
  cursor: default;
}

.profile-big-avatar:not(:empty) {
  color: #222;
  background: #f5f5f5;
  font-size: 68px;
  font-weight: 1000;
}

.profile-identity h1 {
  margin: 0;
  color: #d0d0d0;
  font-size: 32px;
  line-height: 1;
}

.profile-social-link {
  display: block;
  max-width: min(420px, calc(100vw - 48px));
  overflow: hidden;
  border: 1px solid #333333;
  border-radius: 999px;
  padding: 8px 12px;
  color: #4f98c7;
  background: #181818;
  font-size: 14px;
  font-weight: 1000;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-social-link[hidden] {
  display: none;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-content: center;
  gap: 26px 18px;
  margin: 0;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    padding 180ms ease;
}

body.profile-map-scrolled .profile-identity,
body.profile-map-scrolled .profile-stats,
body.profile-map-scrolled .profile-intro,
body.profile-map-scrolled .profile-action-stack {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 18, 18, 0.62);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

body.profile-map-scrolled .profile-identity {
  border-radius: 28px;
  padding: 22px 32px;
}

body.profile-map-scrolled .profile-stats {
  border-radius: 22px;
  padding: 14px 28px;
}

body.profile-map-scrolled .profile-intro {
  border-radius: 18px;
  padding: 14px 20px;
}

body.profile-map-scrolled .profile-action-stack {
  border-radius: 18px;
  padding: 14px;
}

.profile-stats div {
  display: grid;
  grid-column: span 2;
  justify-items: center;
  gap: 5px;
  min-width: 86px;
  text-align: center;
}

.profile-stats div:nth-child(4) {
  grid-column: 1 / span 3;
}

.profile-stats div:nth-child(5) {
  grid-column: 4 / span 3;
}

.profile-stats dt {
  color: #d8d8d8;
  font-size: 30px;
  font-weight: 1000;
  line-height: 1.05;
  white-space: nowrap;
}

.profile-stats dd {
  margin: 0;
  color: #9d9d9d;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}

.profile-intro {
  width: min(760px, 100%);
  margin: -4px 0 4px;
  color: #d2d2d2;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  white-space: pre-wrap;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    padding 180ms ease;
}

.profile-intro.is-empty {
  color: #8a8a8a;
}

.profile-route-card {
  display: grid;
  gap: 12px;
  width: min(760px, 100%);
  margin-top: 18px;
  border: 1px solid #2b2b2b;
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  background: #151515;
}

.profile-places-card {
  display: grid;
  gap: 22px;
  width: min(1180px, 100%);
  border: 1px solid #2b2b2b;
  border-radius: 14px;
  padding: 24px;
  color: #d8d8d8;
  background: #151515;
}

.profile-places-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.profile-places-card header span {
  color: #4f98c7;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.profile-places-card h2 {
  margin: 4px 0 0;
  color: white;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
}

.profile-places-card header strong {
  border-radius: 999px;
  padding: 6px 11px;
  color: white;
  background: #202020;
  font-size: 16px;
  font-weight: 1000;
  line-height: 1;
}

.profile-place-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(360px, 1fr);
  gap: 16px 14px;
  align-items: end;
}

.profile-place-form[hidden] {
  display: none;
}

.profile-place-form label {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: left;
}

.profile-place-form span {
  color: #8f8f8f;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.profile-place-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.profile-place-status legend {
  grid-column: 1 / -1;
  color: #8f8f8f;
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
}

.profile-place-status label {
  display: grid;
}

.profile-place-status input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-place-status span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid #303030;
  border-radius: 12px;
  padding: 0 10px;
  color: #d8d8d8;
  background: #202020;
  cursor: pointer;
  font-size: 14px;
  font-weight: 1000;
  text-align: center;
  text-transform: none;
}

.profile-place-status input:checked + span {
  border-color: #4f98c7;
  color: #ffffff;
  background: #4f98c7;
}

.profile-place-duration {
  display: grid;
  grid-column: 1 / 3;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  min-width: 0;
}

.profile-place-duration[hidden] {
  display: none;
}

.profile-place-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #303030;
  border-radius: 12px;
  padding: 0 14px;
  color: white;
  background: #202020;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
}

.profile-place-form button {
  grid-column: 3;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-size: 14px;
  font-weight: 1000;
  white-space: nowrap;
}

.profile-place-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  overflow: hidden;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.profile-place-suggestions[hidden] {
  display: none;
}

.profile-place-suggestions button {
  display: grid;
  justify-items: start;
  gap: 4px;
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 11px 14px;
  color: #202020;
  background: #ffffff;
  text-align: left;
  font-size: 14px;
  line-height: 1.1;
  white-space: normal;
  box-shadow: none;
}

.profile-place-suggestions button:hover,
.profile-place-suggestions button:focus-visible {
  background: #f3f3f3;
  outline: none;
}

.profile-place-suggestions strong {
  color: #202020;
  font-size: 14px;
  font-weight: 1000;
}

.profile-place-suggestions span {
  color: #555555;
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
}

.profile-places-empty {
  margin: 0;
  color: #9d9d9d;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
}

.profile-places-list {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.profile-trip-year {
  display: grid;
  place-items: center;
  margin: 4px 0 -1px;
  border-top: 1px solid #2d2d2d;
  min-height: 18px;
  color: #aaaaaa;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.profile-trip-row {
  display: grid;
  grid-template-columns: 78px 52px 78px 104px minmax(150px, 1fr) minmax(130px, 0.8fr) minmax(160px, auto) minmax(145px, auto) auto;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  border-top: 1px solid #2d2d2d;
  padding: 18px 0;
  color: #d8d8d8;
  text-align: left;
}

.profile-trip-row:not(.has-dates) {
  grid-template-columns: 104px minmax(220px, 1fr) minmax(170px, 0.75fr) minmax(160px, auto) minmax(176px, auto) auto;
}

.profile-trip-row:not(.has-dates) .profile-trip-date,
.profile-trip-row:not(.has-dates) .profile-trip-duration {
  display: none;
}

.profile-trip-row:first-of-type {
  border-top: 0;
}

.profile-trip-date,
.profile-trip-duration,
.profile-trip-country {
  min-width: 0;
  overflow: hidden;
  color: #cfcfcf;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-trip-duration {
  text-align: center;
}

.profile-trip-thumb {
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1.45;
  border-radius: 8px;
  color: #202020;
  background: var(--trip-photo) center / cover no-repeat, #f2f2f2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 4px 12px rgba(0, 0, 0, 0.14);
  font-size: 24px;
}

.profile-trip-city {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.profile-trip-city strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #f4f4f4;
  font-size: 20px;
  font-weight: 1000;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-trip-people {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  grid-column: 8;
  min-width: 0;
  padding-left: 10px;
}

.profile-trip-review {
  grid-column: 7;
  justify-self: start;
  border: 1px solid #4f98c7;
  border-radius: 999px;
  padding: 8px 12px;
  color: #ffffff;
  background: #4f98c7;
  cursor: pointer;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.1;
  text-align: center;
}

.profile-trip-review:hover,
.profile-trip-review:focus-visible {
  filter: brightness(1.04);
}

.profile-trip-row:not(.has-dates) .profile-trip-review {
  grid-column: 4;
}

.profile-trip-row:not(.has-dates) .profile-trip-people {
  grid-column: 5;
}

.profile-trip-people .community-avatar {
  flex: 0 0 46px;
  width: 46px;
  margin-left: -9px;
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.profile-trip-people .community-avatar:first-child {
  margin-left: 0;
}

.profile-trip-people .community-avatar .profile-avatar-flag,
.profile-trip-people .community-avatar .profile-avatar-visa {
  width: 18px;
  bottom: -4px;
}

.profile-trip-people .community-avatar .profile-avatar-flag {
  left: -4px;
}

.profile-trip-people .community-avatar .profile-avatar-visa {
  right: -4px;
}

.profile-trip-more {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  aspect-ratio: 1;
  margin-left: -9px;
  border: 1px solid #3a3a3a;
  border-radius: 50%;
  color: #cfcfcf;
  background: #191919;
  font-size: 13px;
  font-weight: 1000;
}

.profile-place-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto minmax(160px, auto) auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  padding: 9px 10px;
  background: #1d1d1d;
  text-align: left;
}

.profile-place-row .profile-trip-review {
  grid-column: auto;
}

.profile-travel-row .profile-place-remove {
  grid-column: 6;
}

.profile-place-row.is-current {
  border-color: rgba(47, 214, 111, 0.45);
}

.profile-place-flag {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  font-size: 20px;
}

.profile-place-row strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #f4f4f4;
  font-size: 17px;
  font-weight: 1000;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-place-row small {
  display: block;
  margin-top: 3px;
  color: #a8a8a8;
  font-size: 13px;
  font-weight: 800;
}

.profile-place-row time,
.profile-place-row b {
  color: #cfcfcf;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.profile-place-row time {
  display: block;
  margin-top: 5px;
}

.profile-place-row b {
  border-radius: 999px;
  padding: 5px 8px;
  color: white;
  background: #2fd66f;
}

.profile-place-row b.is-lived {
  color: #202020;
  background: #f6d667;
}

.profile-place-row b.is-visited {
  color: #ffffff;
  background: #58b8ff;
}

.profile-place-row b.is-planned {
  color: #ffffff;
  background: #7a5cff;
}

.profile-place-remove {
  display: grid;
  place-items: center;
  width: 32px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  color: #4f98c7;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  font-weight: 1000;
  line-height: 1;
}

.profile-place-remove[hidden] {
  display: none;
}

.profile-following-card {
  width: min(1180px, 100%);
  min-height: 190px;
  padding-bottom: 18px;
}

.profile-following-card .community-avatar-grid {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  padding: 0 16px;
}

.profile-following-card p {
  margin: 0 16px;
}

.profile-following-card p[hidden] {
  display: none;
}

@media (max-width: 720px) {
  .profile-following-card .community-avatar-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.profile-route-card span {
  color: #4f98c7;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.profile-route-card h2 {
  margin: 0;
  color: white;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.profile-route-card p {
  margin: 0 auto;
  max-width: 600px;
  color: #bdbdbd;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.profile-route-card p.is-complete {
  display: inline-grid;
  place-items: center;
  justify-self: center;
  border-radius: 999px;
  padding: 8px 14px;
  color: #ffffff;
  background: #2fd66f;
  line-height: 1;
}

.profile-route-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(680px, 100%);
  margin: 6px auto 2px;
}

.profile-route-meta span {
  display: grid;
  gap: 5px;
  border: 1px solid #303030;
  border-radius: 10px;
  padding: 12px;
  color: #d9d9d9;
  background: #202020;
  text-transform: none;
}

.profile-route-meta span.is-complete {
  border-color: rgba(47, 214, 111, 0.5);
  background: rgba(47, 214, 111, 0.16);
}

.profile-route-meta small {
  color: #8d8d8d;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.profile-route-meta strong {
  min-width: 0;
  color: white;
  font-size: 16px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-route-meta select {
  width: 100%;
  min-height: 32px;
  border: 1px solid #3b3b3b;
  border-radius: 8px;
  padding: 0 28px 0 10px;
  color: white;
  background: #171717;
  font: inherit;
  font-size: 16px;
  font-weight: 1000;
  cursor: pointer;
}

.profile-route-meta select:focus {
  outline: 2px solid rgba(79, 152, 199, 0.45);
  outline-offset: 2px;
}

.profile-route-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-sidebar {
  display: none;
}

.filter-sidebar {
  position: sticky;
  top: 82px;
  align-self: start;
  display: grid;
  gap: 10px;
}

.filter-sidebar {
  display: none;
}

.filter-sidebar {
  max-height: calc(100vh - 80px);
  overflow: auto;
  padding-right: 2px;
}

.filter-head,
.filter-group,
.passport-box,
.rail-card,
.ranking-toolbar,
.quick-filters,
.compare-strip,
.map-panel,
.chart-panel,
.empty {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.filter-head {
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
}

.filter-head strong {
  font-size: 18px;
}

.filter-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-group,
.passport-box,
.rail-card {
  padding: 10px;
}

.filter-group h2,
.passport-box h2,
.rail-card h2 {
  margin: 0 0 8px;
  color: #555;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.side-filter {
  display: block;
  width: 100%;
  min-height: 32px;
  margin-top: 6px;
  padding: 0 9px;
  text-align: left;
}

.filter-group.compact {
  display: grid;
  gap: 9px;
}

.filter-spacer {
  min-height: 270px;
}

.range-label {
  justify-content: space-between;
  color: var(--muted);
  font-weight: 800;
}

.range-label strong {
  color: var(--ink);
}

input[type="range"] {
  width: 100%;
  accent-color: #222;
}

.passport-select {
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.passport-select span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 24px;
  border-radius: 4px;
  color: white;
  background: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.passport-box p,
.rail-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.news-tag {
  width: fit-content;
  border-radius: 4px;
  padding: 4px 8px;
  color: white;
  background: #4f98c7;
  font-size: 12px;
  font-weight: 1000;
}

.content-panel {
  min-width: 0;
}

.member-controls {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(220px, 285px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding-top: 82px;
  padding-left: 0;
  margin-bottom: 16px;
}

.profile-stack {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 55;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto;
  column-gap: 8px;
  align-items: center;
  justify-items: start;
  min-width: 54px;
}

.guest-join-button {
  position: absolute;
  left: 68px;
  top: 14px;
  min-height: 42px;
  border: 1px solid #4f98c7;
  border-radius: 8px;
  padding: 0 16px;
  color: #ffffff;
  background: #4f98c7;
  cursor: pointer;
  font-weight: 900;
  white-space: nowrap;
}

.guest-join-button[hidden] {
  display: none;
}

.profile-setup-prompt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 0 0 18px;
  border: 1px solid #303030;
  border-radius: 12px;
  padding: 18px 20px;
  color: #eeeeee;
  background: #171717;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.profile-setup-prompt[hidden] {
  display: none;
}

.profile-setup-prompt span {
  display: block;
  margin-bottom: 6px;
  color: #4f98c7;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-setup-prompt h2 {
  margin: 0;
  color: #ffffff;
  font-size: 28px;
  font-weight: 1000;
  line-height: 1;
}

.profile-setup-prompt p {
  max-width: 680px;
  margin: 8px 0 0;
  color: #b8b8b8;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.profile-setup-prompt button {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  padding: 0 22px;
  color: #ffffff;
  background: #4f98c7;
  cursor: pointer;
  font-size: 17px;
  font-weight: 1000;
  white-space: nowrap;
}

.filter-toggle {
  grid-column: 1;
  position: static;
  min-width: 108px;
}

.member-controls > .compare-button {
  grid-column: 2;
}

.member-search {
  grid-column: 3;
}

.member-avatar {
  display: grid;
  grid-row: 1;
  place-items: center;
  position: relative;
  width: 62px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: visible;
  border: 1px solid #444;
  background: #f2f2f2;
  font-size: 34px;
}

.profile-name {
  display: none;
  max-width: 92px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 1000;
  line-height: 1.1;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-name.is-admin {
  color: #9b7418;
}

.profile-target {
  max-width: 112px;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 7px;
  color: var(--muted);
  background: var(--panel);
  cursor: pointer;
  font-size: 10px;
  font-weight: 1000;
  line-height: 1.15;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-avatar-flag,
.profile-avatar-visa {
  position: absolute;
  z-index: 3;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 24px;
  aspect-ratio: 1;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  background: #ffffff;
  color: #202020;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.profile-avatar-flag {
  left: -5px;
}

.profile-avatar-visa {
  right: -5px;
}

.profile-target.has-target {
  display: none;
}

.profile-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 35;
  display: grid;
  width: 190px;
  gap: 8px;
  border: 1px solid #343434;
  border-radius: 12px;
  padding: 10px;
  background: rgba(24, 24, 24, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.profile-menu.is-global-menu {
  position: fixed;
  top: 74px;
  right: 18px;
  left: auto;
  z-index: 100;
}

.profile-menu button {
  min-height: 38px;
  border: 1px solid #3b3b3b;
  border-radius: 8px;
  padding: 0 11px;
  color: #f4f4f4;
  background: #202020;
  cursor: pointer;
  font-weight: 900;
  text-align: left;
}

.profile-menu .language-button,
.profile-menu .theme-button {
  padding: 0 11px;
  color: #f4f4f4;
  background: #202020;
  border-color: #3b3b3b;
  font-weight: 900;
}

.profile-menu .profile-menu-logout {
  border-color: #4f98c7;
  color: #4f98c7;
  background: transparent;
}

.filter-toggle,
.compare-button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid #343434;
  border-radius: 10px;
  padding: 0 12px;
  color: #d6d6d6;
  background: #171717;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.filter-toggle {
  border-color: #4f98c7;
  color: white;
  background: #4f98c7;
  min-width: 86px;
  padding-inline: 10px;
}

.compare-button.is-compare-active {
  border-color: #4f98c7;
  color: white;
  background: #4f98c7;
}

.member-search {
  position: relative;
  width: 100%;
  min-width: 0;
}

.member-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #343434;
  border-radius: 22px;
  padding: 0 15px;
  color: #ddd;
  background: #171717;
  outline: none;
  font-size: 15px;
  font-weight: 800;
}

.crumb {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(21px, 2.55vw, 32px);
  line-height: 1.05;
  letter-spacing: 0;
}

.toolbar-controls {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
  justify-content: start;
  grid-column: 4 / -1;
  width: 100%;
  min-width: 0;
  padding-left: 0;
}

.toolbar-controls label {
  display: grid;
  gap: 0;
  min-width: 0;
  flex: 0 0 128px;
  margin-right: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.toolbar-controls label > span {
  display: none;
}

.toolbar-controls select {
  min-height: 40px;
  width: 128px;
  min-width: 0;
  border: 1px solid #343434;
  border-radius: 10px;
  background: #171717;
  padding: 0 22px 0 10px;
  color: #d6d6d6;
  font-size: 14px;
  font-weight: 900;
}

.visa-key {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: start;
  gap: 4px;
  margin-left: auto;
  min-height: 40px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #343434;
  border-radius: 10px;
  padding: 4px;
  color: #d6d6d6;
  background: #171717;
  font-weight: 900;
}

.visa-key-item {
  display: flex;
  align-items: center;
  min-height: 30px;
  gap: 4px;
  min-width: 0;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  padding: 0 7px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.visa-key-item:hover,
.visa-key-item:focus-visible,
.visa-key-item.active {
  color: white;
  background: #4f98c7;
  outline: none;
}

.visa-key b {
  font-size: 15px;
  line-height: 1;
}

.visa-key small {
  color: inherit;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.view-switch {
  display: flex;
  flex: 0 0 auto;
  gap: 0;
  padding: 0;
  border: 1px solid #343434;
  border-radius: 10px;
  background: #171717;
}

.view-button {
  min-height: 44px;
  min-width: 76px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: #d6d6d6;
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
}

.quick-filters {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
}

.quick-chip {
  min-height: 29px;
  padding: 0 9px;
  font-size: 13px;
}

.compare-strip {
  display: none;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 7px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compare-strip button {
  min-height: 30px;
  padding: 0 12px;
}

.target-panel {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.target-panel > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.target-panel header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.target-panel h2,
.route-checklist h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.target-panel button,
.wechat-panel button {
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  padding: 0 14px;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-weight: 1000;
}

.target-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.target-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.target-controls select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--soft);
  font-weight: 900;
}

.target-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--soft);
}

.target-summary-main {
  display: grid;
  gap: 4px;
}

.target-summary-main strong {
  font-size: 18px;
}

.target-summary-main span,
.target-summary > b {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.route-community {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--panel);
}

.route-community header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.route-community h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.route-community p,
.route-community small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.route-community-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.route-community-steps article {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: var(--soft);
}

.route-community-steps strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.route-community-steps span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.2;
}

.route-stage-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}

.route-stage-avatars .community-avatar {
  flex: 0 0 34px;
  width: 34px;
  max-width: 34px;
  font-size: 10px;
}

.route-stage-more {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.08);
  font-size: 11px;
  font-weight: 1000;
}

.route-checklist header button {
  border: 1px solid #4f98c7;
  color: #4f98c7;
  background: transparent;
}

.route-checklist header .route-complete-button:not(:disabled) {
  border-color: #4f98c7;
  color: #ffffff;
  background: #4f98c7;
}

.route-checklist header .route-complete-button:disabled {
  border-color: var(--line);
  color: var(--muted);
  background: var(--soft);
  cursor: default;
}

.route-checklist {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.route-checklist header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.route-checklist header span {
  color: var(--muted);
  font-size: 13px;
  text-transform: none;
}

.checklist-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.checklist-items label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--soft);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.checklist-items input {
  width: 18px;
  height: 18px;
  margin-top: 0;
  accent-color: #4f98c7;
}

.results-area {
  margin-top: 8px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

@media (min-width: 2200px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
    gap: 28px;
  }
}

@media (max-width: 1320px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.see-more-routes {
  display: grid;
  place-items: center;
  min-height: 58px;
  width: min(320px, 100%);
  margin: 34px auto 26px;
  border: 1px solid #343434;
  border-radius: 16px;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
}

.pathway-section {
  display: grid;
  gap: 16px;
  margin-top: 42px;
}

.pathway-section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #343434;
  padding-bottom: 12px;
}

.pathway-section h2 {
  margin: 0;
  color: #f1f1f1;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1;
}

.pathway-section header span {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 34px;
  border-radius: 999px;
  color: #111;
  background: #d7d7d7;
  font-size: 16px;
  font-weight: 900;
}

.city-card {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1;
  min-height: 0;
  border: 1px solid #383838;
  border-radius: 13px;
  overflow: hidden;
  color: white;
  background: #333;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.news-tile {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  aspect-ratio: 1;
  min-height: 0;
  border: 1px solid #d8d8d8;
  border-radius: 13px;
  overflow: hidden;
  color: #202020;
  background: white;
  box-shadow: var(--shadow);
}

.news-tile header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e3e3e3;
  padding: 13px 16px;
}

.news-tile header div {
  display: grid;
  gap: 2px;
}

.news-tile header strong {
  color: #202020;
  font-size: 17px;
  font-weight: 1000;
  line-height: 1;
}

.news-tile header span {
  display: none;
}

.news-tile time {
  border-radius: 999px;
  padding: 4px 8px;
  color: white;
  background: #202020;
  font-size: 10px;
  font-weight: 1000;
}

.news-tile-content {
  display: grid;
  align-content: start;
  gap: 0;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  scrollbar-color: rgba(0, 0, 0, 0.22) transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.news-tile-content::-webkit-scrollbar {
  width: 7px;
}

.news-tile-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.news-story {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid #ececec;
  padding: clamp(9px, 2.7cqw, 13px) 16px;
  color: #202020;
}

.news-story:last-child {
  border-bottom: 0;
}

.news-story:hover,
.news-story:focus-visible {
  color: #4f98c7;
}

.news-story-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.news-story-meta time {
  padding: 0;
  color: #777;
  background: transparent;
  font-size: 11px;
}

.news-story strong {
  display: -webkit-box;
  margin: 0;
  color: #202020;
  font-size: clamp(14px, 4.2cqw, 18px);
  line-height: 1.08;
  overflow: hidden;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-story:hover strong,
.news-story:focus-visible strong {
  color: #4f98c7;
}

.city-card:hover .photo-layer,
.city-card:focus-visible .photo-layer,
.city-card.is-touch-preview .photo-layer {
  transform: scale(1.07);
}

.city-card:focus-visible,
.list-row:focus-visible,
.map-pin:focus-visible,
.chart-point:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #222, var(--shadow);
}

.photo-layer,
.card-shade,
.card-content {
  position: absolute;
  inset: 0;
}

.photo-layer {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.02)),
    var(--photo);
  background-color: var(--fallback);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 180ms ease;
}

.photo-layer::after {
  display: none;
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background:
    linear-gradient(90deg, transparent 0 4%, rgba(0, 0, 0, 0.52) 4% 10%, transparent 10% 14%, rgba(0, 0, 0, 0.5) 14% 22%, transparent 22% 27%, rgba(0, 0, 0, 0.58) 27% 34%, transparent 34% 40%, rgba(0, 0, 0, 0.48) 40% 49%, transparent 49% 55%, rgba(0, 0, 0, 0.56) 55% 63%, transparent 63% 68%, rgba(0, 0, 0, 0.5) 68% 76%, transparent 76% 82%, rgba(0, 0, 0, 0.54) 82% 92%, transparent 92%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.66));
  clip-path: polygon(0 72%, 5% 58%, 10% 64%, 14% 43%, 22% 52%, 28% 28%, 34% 62%, 40% 50%, 48% 68%, 56% 34%, 63% 48%, 68% 60%, 76% 38%, 82% 66%, 91% 46%, 100% 70%, 100% 100%, 0 100%);
}

.card-shade {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.16) 38%, rgba(0, 0, 0, 0.74)),
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.18), transparent 25%);
}

.card-content {
  display: block;
  padding: 0;
}

.card-title {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 48%;
  display: block;
  text-align: center;
  transform: translateY(-50%);
}

.country {
  margin: 0 0 2px;
  color: white;
  font-size: clamp(14px, 6.2cqw, 18px);
  font-weight: 700;
  line-height: 1.05;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.74);
}

.city-card h2 {
  margin: 0 0 3px;
  font-size: clamp(25px, 12cqw, 34px);
  line-height: 0.96;
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.78);
  text-wrap: balance;
}

.flag-code {
  display: none;
}

.review-line {
  display: none;
}

.badge {
  padding: 5px 7px;
  border-radius: 5px;
  background: var(--green);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.summary {
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.score-grid {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  pointer-events: none;
}

.score-grid div {
  min-height: 47px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(5px);
}

.score-grid dt {
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 900;
}

.score-grid dd {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[lang="en"] .community-score-row {
  display: none !important;
}

.card-open-button {
  position: absolute;
  left: clamp(16px, 6cqw, 26px);
  right: clamp(16px, 6cqw, 26px);
  bottom: clamp(12px, 5cqw, 18px);
  z-index: 5;
  display: none;
  min-height: clamp(34px, 10cqw, 42px);
  border: 0;
  border-radius: 999px;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-size: clamp(16px, 6.8cqw, 22px);
  font-weight: 1000;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.card-footer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding-top: 0;
  font-weight: 900;
}

.temperature {
  min-width: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.main-score {
  width: auto;
  color: white;
  background: transparent;
  box-shadow: none;
  font-size: clamp(20px, 9cqw, 27px);
  line-height: 1;
  white-space: nowrap;
  text-align: right;
}

.main-score::after {
  content: "/mo";
  margin-left: 4px;
  font-size: 0.68em;
}

.rank-number {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  color: white;
  font-size: clamp(23px, 9cqw, 31px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.rank-number::after {
  content: "";
  display: block;
  width: 26px;
  height: 3px;
  margin-top: 6px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.route-stat {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  max-width: min(56%, 160px);
  border-radius: 13px;
  padding: 8px 11px;
  color: #202020;
  background: rgba(255, 255, 255, 0.94);
  font-family: inherit;
  font-weight: 1000;
  text-align: left;
  text-shadow: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.route-stat small {
  position: relative;
  z-index: 1;
  display: block;
  color: inherit;
  font-family: inherit;
  font-size: 8px;
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.route-stat strong {
  position: relative;
  z-index: 1;
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: clamp(17px, 6.4cqw, 22px);
  font-weight: 1000;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
}

.rail-card {
  min-height: 220px;
  border-color: #343434;
  border-radius: 14px;
  background: #1b1b1b;
  color: #d7d7d7;
}

.rail-card h2 {
  color: #d7d7d7;
  font-size: 22px;
  text-align: center;
  text-transform: none;
}

.rail-card p,
.rail-card a {
  color: #bdbdbd;
  font-size: 18px;
  font-weight: 850;
}

.rail-card a {
  border-color: #343434;
  background: #222;
}

.ad-like {
  min-height: 398px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.78)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=900&q=70");
  background-position: center;
  background-size: cover;
}

.list-view {
  display: grid;
  gap: 8px;
}

.list-row {
  display: grid;
  grid-template-columns: 54px minmax(160px, 1.4fr) repeat(6, minmax(84px, 1fr));
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  cursor: pointer;
}

.list-row:hover {
  border-color: #222;
}

.list-row strong {
  font-size: 17px;
}

.list-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.list-score {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: white;
  background: #222;
  font-weight: 900;
}

.map-panel,
.chart-panel {
  min-height: 600px;
  position: relative;
  overflow: hidden;
}

.map-browse {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 16px;
  align-items: start;
}

.map-panel {
  min-height: 680px;
  border: 1px solid #323232;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 26% 42%, rgba(72, 87, 78, 0.92) 0 12%, transparent 13%),
    radial-gradient(ellipse at 50% 35%, rgba(72, 87, 78, 0.82) 0 16%, transparent 17%),
    radial-gradient(ellipse at 72% 49%, rgba(72, 87, 78, 0.78) 0 15%, transparent 16%),
    radial-gradient(ellipse at 34% 70%, rgba(72, 87, 78, 0.72) 0 10%, transparent 11%),
    linear-gradient(180deg, #171a1c, #111);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.map-browse .map-panel {
  position: sticky;
  top: 78px;
  min-height: min(760px, calc(100vh - 104px));
}

.map-results-list {
  display: grid;
  gap: 8px;
  max-height: min(760px, calc(100vh - 104px));
  overflow: auto;
  padding-right: 4px;
}

.map-result-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-areas:
    "rank name score"
    "rank meta score";
  gap: 3px 10px;
  align-items: center;
  min-height: 72px;
  border: 1px solid #343434;
  border-radius: 10px;
  padding: 10px 12px;
  color: #e8e8e8;
  background: #1a1a1a;
  cursor: pointer;
  text-align: left;
}

.map-result-row:hover,
.map-result-row:focus-visible {
  border-color: #4f98c7;
  outline: 0;
}

.map-result-rank {
  grid-area: rank;
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: white;
  background: #4f98c7;
  font-weight: 1000;
}

.map-result-row strong {
  grid-area: name;
  min-width: 0;
  font-size: 18px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-result-row small {
  grid-area: meta;
  min-width: 0;
  color: #aaa;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-result-row b {
  grid-area: score;
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #111;
  background: #31db73;
  font-size: 16px;
  font-weight: 1000;
}

.map-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 49%, rgba(255, 255, 255, 0.035) 50%, transparent 51%),
    linear-gradient(0deg, transparent 0 49%, rgba(255, 255, 255, 0.032) 50%, transparent 51%);
  background-size: 96px 96px;
  pointer-events: none;
}

.map-grid-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(32deg, transparent 0 44%, rgba(255, 138, 43, 0.42) 45%, transparent 46%),
    linear-gradient(124deg, transparent 0 54%, rgba(33, 126, 166, 0.5) 55%, transparent 56%),
    repeating-linear-gradient(28deg, transparent 0 92px, rgba(67, 67, 67, 0.55) 94px, transparent 98px);
  opacity: 0.78;
  transform: scale(var(--map-scale, 1));
  transform-origin: center;
  transition: transform 160ms ease;
}

.map-zoom {
  position: absolute;
  z-index: 3;
  left: 16px;
  top: 16px;
  overflow: hidden;
  border: 1px solid #363636;
  border-radius: 8px;
  background: #1e1e1e;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.map-zoom button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 36px;
  border: 0;
  border-bottom: 1px solid #363636;
  color: #f0f0f0;
  background: transparent;
  font-size: 22px;
  font-weight: 900;
}

.map-zoom button:last-child {
  border-bottom: 0;
}

.map-legend {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid #363636;
  border-radius: 12px;
  background: rgba(28, 28, 28, 0.92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d7d7d7;
  font-size: 12px;
  font-weight: 900;
}

.map-legend i {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #31db73;
}

.map-legend span[data-tone="okay"] i {
  background: #ffcf35;
}

.map-legend span[data-tone="bad"] i {
  background: #4f98c7;
}

.map-marker-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
  transform: scale(var(--map-scale, 1));
  transform-origin: center;
  transition: transform 160ms ease;
}

.map-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  border: 0;
  color: white;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.map-pin-score {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 8px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: #31db73;
  font-size: 13px;
  font-weight: 1000;
}

.map-pin[data-tone="okay"] .map-pin-score {
  background: #ffcf35;
}

.map-pin[data-tone="bad"] .map-pin-score {
  background: #4f98c7;
}

.map-pin-label {
  display: grid;
  gap: 1px;
  margin-left: -7px;
  padding: 7px 10px 7px 14px;
  border: 1px solid #3b3b3b;
  border-radius: 0 8px 8px 0;
  color: #e9e9e9;
  background: rgba(26, 26, 26, 0.95);
  text-align: left;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.map-pin-label strong {
  font-size: 13px;
  line-height: 1;
}

.map-pin-label small {
  color: #a9a9a9;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.map-pin:hover,
.map-pin:focus-visible {
  z-index: 5;
  transform: translate(-50%, -50%) scale(1.06);
}

.map-pin:hover .map-pin-label,
.map-pin:focus-visible .map-pin-label,
.map-pin:nth-child(-n + 8) .map-pin-label {
  opacity: 1;
  transform: translateX(0);
}

.map-brand,
.map-tip {
  position: absolute;
  z-index: 3;
  left: 16px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.map-brand {
  bottom: 18px;
}

.map-tip {
  top: 18px;
  left: 68px;
}

.chart-panel {
  padding: 48px 42px 42px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(0, 0, 0, 0.08) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(0, 0, 0, 0.08) 50%, transparent 51%),
    white;
  background-size: 120px 120px;
}

.chart-point {
  position: absolute;
  left: var(--x);
  bottom: var(--y);
  transform: translate(-50%, 50%);
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 900;
}

.axis-label {
  position: absolute;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.axis-label.x {
  right: 16px;
  bottom: 12px;
}

.axis-label.y {
  left: 14px;
  top: 12px;
}

.rail-card {
  display: grid;
  gap: 8px;
}

.rail-card a {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: #333;
  font-size: 12px;
  font-weight: 800;
}

.avatar-row {
  flex-wrap: wrap;
  gap: 6px;
}

.avatar-row span {
  display: grid;
  place-items: center;
  width: 32px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: white;
  background: #222;
  font-size: 11px;
  font-weight: 900;
}

.ad-like {
  border-style: dashed;
}

.ad-like > span {
  justify-self: start;
  padding: 3px 6px;
  border-radius: 4px;
  color: white;
  background: #999;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.empty {
  padding: 42px;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.modal-open {
  overflow: hidden;
}

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

.city-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(5px);
}

.modal-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1fr);
  width: min(980px, 100%);
  max-height: min(760px, 92vh);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.62);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.modal-photo {
  min-height: 520px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.54)),
    var(--photo);
  background-color: var(--fallback);
  background-position: center;
  background-size: cover;
}

.modal-body {
  display: grid;
  align-content: start;
  gap: 14px;
  max-height: 92vh;
  overflow: auto;
  padding: 28px;
}

.modal-kicker,
.modal-scoreline,
.modal-tags {
  display: flex;
  align-items: center;
}

.modal-kicker {
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-code {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 26px;
  border-radius: 5px;
  color: white;
  background: #222;
}

.modal-panel h2 {
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.95;
  letter-spacing: 0;
}

.modal-summary {
  margin: 0;
  color: #3a3a3a;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}

.modal-scoreline {
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 7px;
  color: white;
  background: #222;
}

.modal-score {
  font-size: 24px;
}

.modal-pathway {
  text-align: right;
  font-weight: 900;
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.modal-metrics div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.modal-metrics dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-metrics dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 900;
}

.modal-tags {
  flex-wrap: wrap;
  gap: 7px;
}

.modal-tags span {
  padding: 7px 9px;
  border-radius: 6px;
  color: #222;
  background: #e9e9e9;
  font-size: 12px;
  font-weight: 900;
}

.modal-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

body.filters-open .app-shell {
  grid-template-columns: 560px minmax(0, 1fr);
  align-items: start;
}

body.filters-open .community-rail {
  display: none;
}

body.filters-open .filter-sidebar {
  display: grid;
  gap: 16px;
  padding: 0 10px 18px 0;
}

body.filters-open .filter-toggle {
  min-width: 170px;
}

body.filters-open .content-panel {
  padding-top: 4px;
}

.filter-head {
  display: none;
}

body.filters-open .filter-group,
body.filters-open .passport-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.filters-open .filter-group h2,
body.filters-open .passport-box h2 {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: #d2d2d2;
  font-size: 17px;
  letter-spacing: 0;
}

body.filters-open .side-filter,
body.filters-open .passport-select {
  display: grid;
  place-items: center;
  min-height: 58px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #363636;
  border-radius: 14px;
  color: #cfcfcf;
  background: #1e1e1e;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

body.filters-open .side-filter.active {
  border-color: #4f98c7;
  color: white;
  background: #2a2020;
}

body.filters-open .filter-group.compact {
  grid-template-columns: 1fr;
}

body.filters-open .range-label {
  font-size: 18px;
}

body.filters-open .passport-select {
  grid-template-columns: auto 1fr;
  justify-items: start;
}

body.filters-open .passport-box p {
  grid-column: 1 / -1;
  margin: 0;
  color: #9d9d9d;
  font-size: 14px;
}

.favorite-button {
  position: absolute;
  left: 22px;
  top: 18px;
  z-index: 9;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: transparent;
  opacity: 0;
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
  cursor: pointer;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.favorite-button:hover,
.favorite-button:focus-visible,
.favorite-button.is-favorite {
  color: #4f98c7;
}

.favorite-button:focus-visible {
  outline: 3px solid white;
  outline-offset: 2px;
}

.city-card:hover .favorite-button,
.city-card:focus-within .favorite-button,
.city-card.is-compare-selected .favorite-button {
  opacity: 1;
  pointer-events: auto;
}

.city-card:hover .card-title,
.city-card:focus-visible .card-title,
.city-card.is-touch-preview .card-title,
.city-card.is-compare-selected .card-title,
.city-card:hover .card-footer,
.city-card:focus-visible .card-footer,
.city-card.is-touch-preview .card-footer,
.city-card.is-compare-selected .card-footer,
.city-card:hover .route-stat,
.city-card:focus-visible .route-stat,
.city-card.is-touch-preview .route-stat,
.city-card.is-compare-selected .route-stat,
.city-card:hover .rank-number,
.city-card:focus-visible .rank-number,
.city-card.is-touch-preview .rank-number,
.city-card.is-compare-selected .rank-number {
  opacity: 0;
  pointer-events: none;
}

.city-card:hover .score-grid,
.city-card:focus-visible .score-grid,
.city-card.is-touch-preview .score-grid,
.city-card.is-compare-selected .score-grid {
  position: absolute;
  left: clamp(12px, 4cqw, 18px);
  right: clamp(12px, 4cqw, 18px);
  top: clamp(86px, 28cqw, 128px);
  bottom: clamp(62px, 17cqw, 86px);
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr;
  align-content: space-between;
  gap: clamp(10px, 4.2cqw, 18px);
  pointer-events: none;
}

.city-card:hover .score-grid div,
.city-card:focus-visible .score-grid div,
.city-card.is-touch-preview .score-grid div,
.city-card.is-compare-selected .score-grid div {
  display: grid;
  grid-template-columns: minmax(0, clamp(86px, 42%, 134px)) minmax(0, 1fr);
  column-gap: clamp(8px, 3cqw, 16px);
  align-items: center;
  min-width: 0;
  min-height: clamp(30px, 8.8cqw, 38px);
  padding: 0;
  border: 0;
  background: transparent;
}

.city-card:hover .score-grid dt,
.city-card:focus-visible .score-grid dt,
.city-card.is-touch-preview .score-grid dt,
.city-card.is-compare-selected .score-grid dt {
  color: white;
  font-size: clamp(13px, 5.6cqw, 17px);
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  text-transform: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-card:hover .score-grid dd,
.city-card:focus-visible .score-grid dd,
.city-card.is-touch-preview .score-grid dd,
.city-card.is-compare-selected .score-grid dd {
  position: relative;
  height: clamp(30px, 8.8cqw, 38px);
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 999px;
  color: transparent;
  background: rgba(255, 255, 255, 0.18);
}

.city-card:hover .score-grid dd::before,
.city-card:focus-visible .score-grid dd::before,
.city-card.is-touch-preview .score-grid dd::before,
.city-card.is-compare-selected .score-grid dd::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 50%);
  background: #31db73;
}

.city-card:hover .score-grid div[data-tone="okay"] dd::before,
.city-card:focus-visible .score-grid div[data-tone="okay"] dd::before,
.city-card.is-touch-preview .score-grid div[data-tone="okay"] dd::before,
.city-card.is-compare-selected .score-grid div[data-tone="okay"] dd::before {
  background: #ffcf35;
}

.city-card:hover .score-grid div[data-tone="bad"] dd::before,
.city-card:focus-visible .score-grid div[data-tone="bad"] dd::before,
.city-card.is-touch-preview .score-grid div[data-tone="bad"] dd::before,
.city-card.is-compare-selected .score-grid div[data-tone="bad"] dd::before {
  background: #ff4545;
}

.city-card:hover .card-shade,
.city-card:focus-visible .card-shade,
.city-card.is-touch-preview .card-shade,
.city-card.is-compare-selected .card-shade {
  background: rgba(0, 0, 0, 0.58);
}

.city-card.is-touch-preview .card-open-button {
  display: block;
  pointer-events: auto;
}

@container (max-width: 280px) {
  .city-card:hover .score-grid div:nth-child(n + 4),
  .city-card:focus-visible .score-grid div:nth-child(n + 4),
  .city-card.is-touch-preview .score-grid div:nth-child(n + 4),
  .city-card.is-compare-selected .score-grid div:nth-child(n + 4) {
    display: none;
  }
}

.city-card.is-compare-selected {
  border-color: #4f98c7;
  box-shadow: 0 0 0 4px #4f98c7, 0 18px 40px rgba(79, 152, 199, 0.22);
}

.compare-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: grid;
  min-height: 58px;
  place-items: center;
  color: white;
  background: #4f98c7;
  font-size: 20px;
  font-weight: 1000;
  text-align: center;
}

.compare-bar[hidden],
.compare-modal[hidden] {
  display: none;
}

body.compare-mode {
  padding-bottom: 58px;
}

.compare-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
}

.compare-modal-panel {
  position: relative;
  width: min(1490px, calc(100vw - 230px));
  max-height: min(990px, calc(100vh - 110px));
  overflow: hidden;
  border: 1px solid #333;
  border-radius: 6px;
  color: #d6d6d6;
  background: #171717;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

.compare-modal-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.compare-modal-close {
  right: -76px;
  top: -34px;
}

.compare-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: calc(100vh - 116px);
  overflow: auto;
}

.compare-city-panel {
  display: grid;
  grid-template-rows: 260px auto minmax(0, 1fr);
  min-width: 0;
  border-right: 1px solid #343434;
  background: #171717;
}

.compare-city-panel:last-child {
  border-right: 0;
}

.compare-city-panel .modal-hero-title h3 {
  margin: 0;
  color: white;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.7);
}

.compare-score-list {
  margin: 0;
}

.compare-city-panel .modal-tabs {
  min-height: 58px;
}

.compare-modal-body {
  max-height: none;
  overflow: hidden;
}

.compare-city-panel .modal-scoreline,
.compare-city-panel .modal-metrics div {
  grid-template-columns: minmax(160px, 0.42fr) minmax(240px, 1fr);
  column-gap: 20px;
}

.compare-city-panel .modal-metrics dt {
  font-size: 18px;
}

.compare-city-panel .modal-scoreline {
  font-size: 18px;
}

@media (max-width: 900px) {
  .compare-modal-panel {
    width: min(100%, calc(100vw - 28px));
    max-height: calc(100vh - 42px);
  }

  .compare-modal-close {
    right: 10px;
    top: 10px;
  }

  .compare-columns {
    grid-template-columns: 1fr;
  }

  .compare-city-panel {
    border-right: 0;
    border-bottom: 1px solid #343434;
  }
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: none;
}

.modal-panel {
  grid-template-columns: 1fr;
  grid-template-rows: 280px auto minmax(0, 1fr);
  width: min(1490px, calc(100vw - 230px));
  max-height: min(990px, calc(100vh - 110px));
  border-color: #333;
  border-radius: 6px;
  background: #171717;
  color: #d6d6d6;
}

.modal-close {
  right: -76px;
  top: -34px;
  width: 54px;
  color: white;
  background: transparent;
  font-size: 72px;
  font-weight: 300;
}

.modal-photo {
  position: relative;
  min-height: 280px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.42)),
    var(--photo);
  background-position: center;
  background-size: cover;
}

.modal-crumbs {
  position: absolute;
  left: 18px;
  bottom: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.modal-hero-title {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(720px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.78);
}

.modal-panel h2 {
  margin: 0;
  font-size: 46px;
  line-height: 1;
}

.modal-country-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.modal-hero-title button {
  min-height: 56px;
  border: 0;
  border-radius: 13px;
  padding: 0 24px;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
}

.modal-photo-meta {
  position: absolute;
  right: 20px;
  bottom: 18px;
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  font-weight: 800;
  text-align: right;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.modal-tabs {
  display: flex;
  align-items: center;
  min-height: 58px;
  overflow-x: auto;
  border-top: 1px solid #2f2f2f;
  border-bottom: 1px solid #2f2f2f;
  background: #1f1f1f;
}

.modal-tabs button {
  flex: 1 1 0;
  min-width: 0;
  align-self: stretch;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0 18px;
  color: #bdbdbd;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.modal-tabs button.active {
  color: #4f98c7;
  border-bottom-color: #4f98c7;
}

.modal-body {
  grid-template-columns: 1fr;
  gap: 0;
  max-height: none;
  overflow: hidden;
  padding: 0;
}

.modal-score-list {
  min-height: 0;
  overflow: auto;
  border-right: 0;
  background: #171717;
}

.modal-kicker {
  padding: 18px 20px 8px;
}

.modal-summary {
  margin: 0;
  padding: 0 20px 16px;
  color: #cfcfcf;
  font-size: 17px;
}

.modal-scoreline {
  display: grid;
  grid-template-columns: minmax(210px, 0.42fr) minmax(320px, 1fr);
  column-gap: 28px;
  align-items: center;
  margin: 0;
  padding: 18px 28px;
  border-top: 1px solid #2f2f2f;
  border-radius: 0;
  color: #d7d7d7;
  background: transparent;
  font-size: 20px;
}

.modal-scoreline .modal-score {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 46px;
  overflow: hidden;
  border-radius: 999px;
  color: white;
  background: #2d2d2d;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.modal-scoreline .modal-score::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: var(--fill, 50%);
  background: #31db73;
}

.modal-scoreline[data-tone="okay"] .modal-score::before {
  background: #ffcf35;
}

.modal-scoreline[data-tone="bad"] .modal-score::before {
  background: #ff4545;
}

.modal-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.modal-metrics div {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 0.42fr) minmax(320px, 1fr);
  column-gap: 28px;
  align-items: center;
  min-height: 72px;
  padding: 0 28px;
  border-width: 1px 0 0;
  border-radius: 0;
  border-color: #2f2f2f;
  background: transparent;
}

.modal-metrics dt {
  color: #cfcfcf;
  font-size: 22px;
  line-height: 1.1;
  text-transform: none;
}

.modal-metrics dd {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 46px;
  margin: 0;
  overflow: hidden;
  border-radius: 999px;
  color: white;
  background: #2d2d2d;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.modal-metrics dd::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: var(--fill, 50%);
  background: #31db73;
}

.modal-metrics div[data-tone="okay"] dd::before {
  background: #ffcf35;
}

.modal-metrics div[data-tone="bad"] dd::before {
  background: #ff4545;
}

.modal-tags {
  padding: 16px 20px;
}

.modal-tags span {
  color: #d7d7d7;
  background: #2a2a2a;
}

.modal-note {
  padding: 0 20px 20px;
}

.modal-map-panel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-left: 1px solid #2f2f2f;
  background:
    radial-gradient(circle at var(--map-x, 50%) var(--map-y, 50%), color-mix(in srgb, var(--map-color, #316b77) 45%, transparent), transparent 18%),
    linear-gradient(33deg, transparent 0 45%, rgba(244, 136, 37, 0.72) 46% 47%, transparent 48%),
    linear-gradient(112deg, transparent 0 38%, rgba(244, 136, 37, 0.65) 39% 40%, transparent 41%),
    linear-gradient(18deg, transparent 0 68%, rgba(244, 136, 37, 0.45) 69% 70%, transparent 71%),
    repeating-linear-gradient(0deg, transparent 0 49px, rgba(255, 255, 255, 0.05) 50px),
    repeating-linear-gradient(90deg, transparent 0 57px, rgba(255, 255, 255, 0.045) 58px),
    #232323;
}

.modal-map-grid {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(28deg, transparent 0 78px, rgba(43, 124, 160, 0.6) 80px, transparent 84px),
    repeating-linear-gradient(153deg, transparent 0 112px, rgba(69, 69, 69, 0.95) 114px, transparent 117px);
  opacity: 0.8;
}

.modal-map-zoom {
  position: absolute;
  z-index: 4;
  left: 16px;
  top: 16px;
  overflow: hidden;
  border: 1px solid #3c3c3c;
  border-radius: 8px;
  background: rgba(26, 26, 26, 0.95);
}

.modal-map-zoom span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 34px;
  border-bottom: 1px solid #3c3c3c;
  color: white;
  font-size: 21px;
  font-weight: 900;
}

.modal-map-zoom span:last-child {
  border-bottom: 0;
}

.modal-map-water {
  position: absolute;
  left: 16%;
  top: 12%;
  width: 80%;
  height: 76%;
  border: 20px solid rgba(0, 124, 166, 0.8);
  border-left-color: transparent;
  border-radius: 48% 30% 42% 34%;
  transform: rotate(18deg);
}

.modal-map-pin {
  position: absolute;
  z-index: 4;
  left: var(--map-x, 50%);
  top: var(--map-y, 52%);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.modal-map-pin-dot {
  width: 38px;
  aspect-ratio: 1;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #4f98c7;
  box-shadow: 0 0 0 8px rgba(79, 152, 199, 0.18), 0 12px 28px rgba(0, 0, 0, 0.5);
}

.modal-map-label {
  margin-left: -5px;
  padding: 8px 11px 8px 14px;
  border: 1px solid #3c3c3c;
  border-radius: 0 8px 8px 0;
  color: white;
  background: rgba(25, 25, 25, 0.96);
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.modal-map-caption {
  position: absolute;
  z-index: 4;
  right: 16px;
  bottom: 16px;
  padding: 8px 10px;
  border: 1px solid #3c3c3c;
  border-radius: 8px;
  color: #bfbfbf;
  background: rgba(25, 25, 25, 0.92);
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto auto minmax(280px, 1fr);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .app-shell {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 980px);
  }

  .community-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: 1;
  }

  .content-panel {
    order: 2;
  }

  .routes-page {
    width: min(100% - 28px, 980px);
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 22px;
  }

  .member-controls {
    grid-template-columns: auto auto minmax(180px, 260px) minmax(0, 1fr);
    padding-left: 0;
  }

  .filter-toggle {
    position: static;
    min-width: 0;
  }

  .member-controls > .compare-button {
    grid-column: 2;
  }

  .member-search {
    grid-column: 3;
  }

  .member-controls .toolbar-controls {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    min-width: 0;
  }

  .visa-key {
    flex: 1 1 100%;
    justify-content: start;
    margin-left: 0;
  }

  .map-browse {
    grid-template-columns: 1fr;
  }

  .map-browse .map-panel {
    position: relative;
    top: auto;
    min-height: 620px;
  }

  .map-results-list {
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 0;
  }
}

@media (max-width: 860px) {
  .intro-hero {
    min-height: 250px;
  }

  .hero-inner {
    min-height: 250px;
    padding-top: 34px;
    padding-bottom: 36px;
  }

  .hero-copy h1 {
    font-size: clamp(27px, 6.4vw, 40px);
  }

  .hero-subtitle {
    font-size: clamp(15px, 3.4vw, 20px);
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .top-search {
    grid-column: 1 / -1;
  }

  .nav-tabs {
    order: 1;
  }

  .brand {
    order: 2;
  }

  .header-actions {
    order: 3;
  }

  .top-search {
    order: 4;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .community-rail {
    grid-template-columns: 1fr;
  }

  .content-panel {
    order: 1;
  }

  .filter-sidebar {
    display: none;
    order: 2;
    position: static;
    max-height: none;
    display: flex;
    gap: 8px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .filter-head,
  .filter-group,
  .passport-box {
    flex: 0 0 190px;
  }

  .filter-head {
    align-content: center;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .filter-group,
  .passport-box {
    padding: 8px;
  }

  .side-filter {
    min-height: 29px;
    margin-top: 4px;
  }

  .filter-group h2,
  .passport-box h2 {
    margin-bottom: 5px;
  }

  .toolbar-controls {
    justify-content: start;
  }
}

@media (max-width: 560px) {
  .intro-hero {
    min-height: 230px;
  }

  .hero-inner {
    width: calc(100% - 28px);
    min-height: 230px;
    padding: 28px 0;
  }

  .hero-copy {
    width: min(92vw, 520px);
    padding: 72px 16px 16px;
  }

  .postcard-logo {
    left: 14px;
    top: 13px;
    width: 42px;
    font-size: 8px;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(27px, 7vw, 34px);
    white-space: normal;
  }

  .hero-subtitle {
    max-width: calc(100% - 8px);
    font-size: 15px;
    line-height: 1.34;
  }

  .postcard-lower {
    display: block;
  }

  .postcard-members {
    justify-content: flex-end;
    width: 126px;
    min-height: 36px;
    margin: -28px 2px 0 auto;
  }

  .postcard-member-bubble {
    width: 32px;
    margin-right: -10px;
    font-size: 10px;
  }

  .postcard-member-bubble:nth-child(n+5) {
    display: none;
  }

  .postcard-member-bubble:hover .member-profile-popover,
  .postcard-member-bubble:focus-visible .member-profile-popover {
    opacity: 0;
    transform: translateX(-50%) translateY(8px) scale(0.96) rotate(1.1deg);
    visibility: hidden;
  }

  .postcard-join-button.guest-join-button {
    top: 14px;
    right: 14px;
    left: auto;
    width: clamp(128px, 34%, 190px);
    min-height: 40px;
    margin-top: 0;
    padding: 0 20px;
    font-size: 13px;
  }

  .topbar,
  .app-shell,
  .routes-page {
    padding: 8px;
  }

  .brand {
    font-size: 16px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .member-controls {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 0;
    padding-left: 0;
  }

  .filter-toggle {
    position: static;
    min-width: 0;
  }

  .member-controls .toolbar-controls {
    grid-column: auto;
    flex-wrap: wrap;
  }

  .member-search {
    grid-column: auto;
    width: 100%;
  }

  .map-results-list {
    grid-template-columns: 1fr;
  }

  .member-avatar {
    display: none;
  }

  .profile-stack {
    justify-items: stretch;
    min-width: 0;
  }

  .profile-target {
    max-width: 100%;
    width: 100%;
  }

  .city-card,
  .news-tile {
    aspect-ratio: 1;
    min-height: 0;
  }

  .list-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .list-row span:nth-child(n + 3) {
    display: none;
  }

  .modal-panel {
    grid-template-columns: 1fr;
  }

  .modal-photo {
    min-height: 220px;
  }

  .modal-body {
    padding: 18px;
  }

  .modal-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  body.filters-open .app-shell {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 980px);
  }

  body:not(.filters-open) .filter-sidebar {
    display: none;
  }

  body.filters-open .filter-sidebar {
    position: static;
    max-height: none;
    order: 1;
    padding-right: 0;
  }

  body.filters-open .content-panel {
    order: 2;
  }

  .modal-panel {
    width: min(100% - 28px, 980px);
  }

  .modal-close {
    right: 4px;
    top: 4px;
    width: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.46);
    font-size: 42px;
  }

  .modal-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .modal-score-list {
    border-right: 0;
  }

  .modal-map-panel {
    min-height: 360px;
  }
}

@media (max-width: 720px) {
  body.filters-open .filter-group,
  body.filters-open .passport-box {
    grid-template-columns: 1fr;
  }

  .modal-panel {
    grid-template-rows: 230px auto minmax(0, 1fr);
    max-height: calc(100vh - 28px);
  }

  .modal-photo {
    min-height: 230px;
  }

  .modal-panel h2 {
    font-size: 34px;
  }

  .modal-country-title,
  .modal-hero-title button {
    font-size: 18px;
  }

  .modal-scoreline,
  .modal-metrics div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .visa-detail-page {
    width: min(100% - 24px, 1180px);
    padding-top: 28px;
  }

  .visa-detail-stats {
    grid-template-columns: 1fr;
  }

  .visa-route-grid {
    grid-template-columns: 1fr;
  }
}

body.filters-open .filter-sidebar {
  display: grid !important;
}

body:not(.filters-open) .filter-sidebar {
  display: none !important;
}

body {
  overflow-x: hidden;
}

.city-modal {
  padding: clamp(14px, 3vw, 32px);
}

.modal-panel {
  grid-template-rows: clamp(220px, 28vh, 300px) 58px minmax(0, 1fr);
  width: min(1500px, calc(100vw - clamp(28px, 6vw, 96px)));
  max-width: 100%;
  max-height: calc(100vh - clamp(28px, 6vw, 96px));
  overflow: hidden;
}

.modal-close {
  right: 14px;
  top: 14px;
  width: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  font-size: 48px;
}

.modal-photo {
  min-height: 0;
}

.modal-tabs {
  min-width: 0;
  scrollbar-width: thin;
}

.modal-tabs button {
  min-width: 0;
}

.modal-body {
  min-width: 0;
  min-height: 0;
  height: 100%;
  grid-template-columns: 1fr;
}

.modal-score-list,
.modal-map-panel {
  min-width: 0;
  min-height: 0;
}

.modal-score-list {
  overflow-x: hidden;
}

.modal-scoreline,
.modal-metrics div {
  grid-template-columns: minmax(210px, 0.42fr) minmax(320px, 1fr);
  column-gap: 28px;
  padding-inline: 28px;
}

.modal-metrics dt,
.modal-scoreline strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.modal-metrics dd,
.modal-scoreline .modal-score {
  min-width: 0;
  width: 100%;
  padding-inline: 10px;
  white-space: normal;
}

.modal-map-panel {
  height: 100%;
  max-height: 100%;
}

.modal-map-water {
  left: 20%;
  top: 16%;
  width: 68%;
  height: 62%;
  border-width: 16px;
}

.modal-tab-panel {
  display: none;
}

.modal-body.tab-detail {
  display: block;
  overflow: auto;
  background: #171717;
}

.modal-body.tab-detail .modal-score-list,
.modal-body.tab-detail .modal-map-panel {
  display: none;
}

.modal-body.tab-detail .modal-tab-panel {
  display: grid;
  gap: 22px;
  padding: clamp(24px, 4vw, 54px);
}

.modal-body.tab-scores .modal-tab-panel {
  display: none;
}

.modal-tab-panel h3 {
  margin: 0;
  color: white;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
}

.modal-tab-panel p {
  max-width: 860px;
  margin: 0;
  color: #cfcfcf;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.45;
}

.modal-tab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.people-tab {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  padding: 8px 0 28px;
}

.people-group {
  display: grid;
  justify-items: center;
  gap: clamp(22px, 3vw, 34px);
  text-align: center;
}

.people-group h3 {
  max-width: 980px;
  margin: 0;
  color: #f3f3f3;
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 1000;
  line-height: 1.12;
}

.people-avatar-cloud {
  display: grid;
  grid-template-columns: repeat(auto-fit, 64px);
  justify-content: center;
  gap: 22px 28px;
  width: min(1180px, 100%);
  overflow: visible;
}

.people-avatar-cloud .community-avatar {
  width: 64px;
  max-width: none;
  justify-self: center;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 20px rgba(0, 0, 0, 0.18);
}

.modal-tab-grid article {
  display: grid;
  gap: 8px;
  min-height: 130px;
  padding: 18px;
  border: 1px solid #333;
  border-radius: 10px;
  background: #202020;
}

.modal-tab-grid strong {
  color: #a8a8a8;
  font-size: 15px;
  text-transform: uppercase;
}

.modal-tab-grid span {
  color: white;
  font-size: 24px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.visa-route-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.visa-route-card {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 18px;
  border: 1px solid #333;
  border-radius: 10px;
  color: #f4f4f4;
  background: #202020;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.visa-route-card header {
  display: grid;
  gap: 6px;
}

.visa-route-card header span,
.visa-route-card dt {
  color: #4f98c7;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.visa-route-card header strong {
  color: inherit;
  font-size: 28px;
  line-height: 1.05;
}

.visa-route-card p {
  margin: 0;
  color: #d6d6d6;
  font-size: 17px;
}

.visa-route-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.visa-route-card dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid #333;
  padding-top: 8px;
}

.visa-route-card dd {
  margin: 0;
  color: #fff;
  font-weight: 900;
  text-align: right;
}

.visa-route-cta {
  align-self: end;
  color: #4f98c7;
  font-weight: 1000;
}

.visa-detail-page {
  width: min(100% - 40px, 1180px);
  margin: 0 auto;
  padding: 70px 0 64px;
}

body.page-header-open .visa-detail-page {
  padding-top: 94px;
}

.visa-detail-page[hidden] {
  display: none;
}

.visa-detail-hero {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 330px;
  overflow: hidden;
  border-radius: 10px;
  padding: clamp(28px, 5vw, 58px);
  color: white;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.72)),
    var(--photo);
  background-color: var(--fallback);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.visa-detail-hero button,
.visa-detail-actions button {
  width: fit-content;
  min-height: 44px;
  border: 1px solid #4f98c7;
  border-radius: 10px;
  padding: 0 18px;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-size: 17px;
  font-weight: 1000;
}

.visa-detail-hero h1 {
  max-width: 760px;
  color: white;
  font-size: clamp(42px, 8vw, 84px);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.visa-detail-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 24px;
  font-weight: 900;
}

.visa-detail-hero > strong {
  width: fit-content;
  border-radius: 999px;
  padding: 10px 14px;
  color: #111;
  background: #31db73;
  font-size: 18px;
}

.visa-detail-body {
  display: grid;
  gap: 14px;
  padding: 22px 0 0;
}

.visa-detail-body article,
.visa-detail-stats article {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.visa-detail-body h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 26px;
}

.visa-detail-body p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.visa-detail-body a {
  color: #4f98c7;
  font-weight: 1000;
  text-decoration: none;
}

.visa-detail-body a:hover {
  text-decoration: underline;
}

.visa-fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.visa-fact-card {
  display: grid;
  gap: 7px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--panel);
}

.visa-fact-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.visa-fact-card strong,
.visa-fact-card a {
  align-self: end;
  color: var(--ink);
  font-size: 19px;
  font-weight: 1000;
  line-height: 1.18;
}

.visa-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.visa-source-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid #4f98c7;
  border-radius: 10px;
  padding: 0 16px;
  color: white;
  background: #4f98c7;
  line-height: 1;
}

.visa-source-links a + a {
  color: #4f98c7;
  background: transparent;
}

.visa-detail-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.visa-detail-stats article {
  display: grid;
  gap: 6px;
}

.visa-detail-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.visa-detail-stats strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.05;
}

.visa-detail-body ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.visa-difficulty-feedback {
  display: grid;
  gap: 12px;
}

.visa-difficulty-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.visa-difficulty-choices button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--soft);
  cursor: pointer;
  font-size: 15px;
  font-weight: 1000;
}

.visa-difficulty-choices button.is-selected {
  border-color: #4f98c7;
  color: white;
  background: #4f98c7;
}

.visa-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.visa-detail-actions button + button {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
}

.news-detail-page {
  width: min(100% - 40px, 980px);
  margin: 0 auto;
  padding: 70px 0 64px;
}

body.page-header-open .news-detail-page {
  padding-top: 94px;
}

.news-detail-page[hidden] {
  display: none;
}

.news-article-hero {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(26px, 5vw, 54px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.news-back-button {
  width: fit-content;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--soft);
  cursor: pointer;
  font-size: 15px;
  font-weight: 1000;
}

.news-article-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 15px;
  font-weight: 1000;
}

.news-article-eyebrow span {
  border-radius: 7px;
  padding: 6px 10px;
  color: white;
  background: #4f98c7;
}

.news-article-hero h1 {
  max-width: 860px;
  color: var(--ink);
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
}

.news-article-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900;
  line-height: 1.25;
}

.news-source-button,
.news-article-content a {
  width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #4f98c7;
  border-radius: 10px;
  padding: 0 18px;
  color: white;
  background: #4f98c7;
  font-weight: 1000;
  text-decoration: none;
}

.news-article-content {
  display: grid;
  gap: 14px;
  padding-top: 18px;
}

.news-article-content article,
.news-article-empty {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.news-article-content h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 28px;
}

.news-article-content p,
.news-article-empty {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 750;
  line-height: 1.55;
}

.news-article-content p + p {
  margin-top: 12px;
}

.admin-news-page {
  width: min(100% - 40px, 1280px);
  margin: 0 auto;
  padding: 70px 0 64px;
}

body.page-header-open .admin-news-page {
  padding-top: 94px;
}

.admin-news-page[hidden] {
  display: none;
}

.admin-news-workspace {
  display: grid;
  gap: 16px;
}

.admin-news-page-head,
.admin-news-editor-card,
.admin-news-list-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-news-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: clamp(22px, 4vw, 38px);
}

.admin-news-page-head h1 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(44px, 6vw, 72px);
  line-height: 0.95;
}

.admin-news-page-head p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.admin-news-page-head button {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  padding: 0 20px;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-size: 17px;
  font-weight: 1000;
}

.admin-news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

.admin-news-editor-card,
.admin-news-list-card {
  padding: clamp(18px, 3vw, 26px);
}

.admin-news-list-card {
  position: sticky;
  top: 94px;
  max-height: calc(100vh - 118px);
  overflow: auto;
}

.admin-news-list-card h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 24px;
}

.admin-news-page .admin-news-form {
  gap: 14px;
}

.admin-news-page .admin-news-form label {
  font-size: 13px;
}

.admin-news-page .admin-news-form input,
.admin-news-page .admin-news-form textarea {
  border-radius: 10px;
  padding: 12px 13px;
}

.admin-news-page .admin-news-form textarea {
  min-height: 132px;
}

.admin-news-page #adminNewsBodyEn,
.admin-news-page #adminNewsBodyZh {
  min-height: 260px;
}

.admin-news-page .admin-news-form button {
  min-height: 48px;
  border-radius: 10px;
  font-size: 16px;
}

body:not(.dark-mode) {
  --bg: #f2f2f2;
  --panel: #ffffff;
  --ink: #202020;
  --muted: #747474;
  --line: #d8d8d8;
  --soft: #f7f7f7;
  color: var(--ink);
  background: var(--bg);
}

body:not(.dark-mode) .topbar {
  border-bottom-color: #d6d6d6;
  background: rgba(255, 255, 255, 0.96);
}

body:not(.dark-mode) .nav-tabs a,
body:not(.dark-mode) .language-button,
body:not(.dark-mode) .theme-button,
body:not(.dark-mode) .top-search input,
body:not(.dark-mode) .member-search input,
body:not(.dark-mode) .toolbar-controls select,
body:not(.dark-mode) .visa-key,
body:not(.dark-mode) .view-switch,
body:not(.dark-mode) .compare-button,
body:not(.dark-mode) .filter-sidebar,
body:not(.dark-mode) .filter-group,
body:not(.dark-mode) .passport-box,
body:not(.dark-mode) .side-filter,
body:not(.dark-mode) .passport-select {
  border-color: #d7d7d7;
  color: #202020;
  background: #ffffff;
}

body:not(.dark-mode) .brand,
body:not(.dark-mode) .top-search label,
body:not(.dark-mode) .toolbar-controls label,
body:not(.dark-mode) .member-search input,
body:not(.dark-mode) .toolbar-controls select,
body:not(.dark-mode) .view-button,
body:not(.dark-mode) .filter-group h2,
body:not(.dark-mode) .passport-box h2,
body:not(.dark-mode) .range-label,
body:not(.dark-mode) .passport-box p,
body:not(.dark-mode) .pathway-section > header h2 {
  color: #202020;
}

body:not(.dark-mode) .city-card h2,
body:not(.dark-mode) .city-card .country {
  color: #ffffff;
}

body:not(.dark-mode) .nav-tabs a.active,
body:not(.dark-mode) .brand-mark,
body:not(.dark-mode) .filter-toggle {
  border-color: #4f98c7;
  color: #ffffff;
  background: #4f98c7;
}

body:not(.dark-mode) .page-header-logo .brand-mark,
body:not(.dark-mode) .profile-home-button .brand-mark {
  width: auto;
  border-color: transparent;
  background: transparent;
}

body:not(.dark-mode) .content-panel,
body:not(.dark-mode) .rail-card {
  color: #202020;
  background: transparent;
}

body:not(.dark-mode) .profile-setup-prompt {
  border-color: #d8d8d8;
  color: #202020;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

body:not(.dark-mode) .profile-setup-prompt h2 {
  color: #202020;
}

body:not(.dark-mode) .profile-setup-prompt p {
  color: #666666;
}

body:not(.dark-mode) .member-bubble {
  border-color: #d8d8d8;
  color: #202020;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

body:not(.dark-mode) .member-tile {
  border-color: #d8d8d8;
  color: #202020;
  background: #ffffff;
  box-shadow: var(--shadow);
}

body:not(.dark-mode) .member-tile .member-bubble {
  box-shadow: none;
}

body:not(.dark-mode) .member-tile .member-bubble + .member-bubble {
  border-top-color: #e5e5e5;
}

body:not(.dark-mode) .member-bubble header {
  border-bottom-color: #e5e5e5;
}

body:not(.dark-mode) .member-bubble h2,
body:not(.dark-mode) .member-bubble header strong {
  color: #202020;
}

body:not(.dark-mode) .member-bubble header strong {
  color: #ffffff;
  background: #202020;
}

body:not(.dark-mode) .member-bubble p {
  color: #666666;
}

body:not(.dark-mode) .profile-route-meta span {
  border-color: #dddddd;
  color: #202020;
  background: #f5f5f5;
}

body:not(.dark-mode) .profile-route-meta small {
  color: #777777;
}

body:not(.dark-mode) .profile-route-meta strong {
  color: #202020;
}

body:not(.dark-mode) .profile-page {
  color: #202020;
  background: #f2f2f2;
}

body:not(.dark-mode) .profile-map-hero::after {
  background: #f2f2f2;
}

body:not(.dark-mode).profile-map-scrolled .profile-identity,
body:not(.dark-mode).profile-map-scrolled .profile-stats,
body:not(.dark-mode).profile-map-scrolled .profile-intro,
body:not(.dark-mode).profile-map-scrolled .profile-action-stack {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

body:not(.dark-mode) .profile-home-search {
  border-color: rgba(0, 0, 0, 0.14);
  color: #202020;
  background: rgba(255, 255, 255, 0.9);
}

body:not(.dark-mode) .profile-map-zoom {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.92);
}

body:not(.dark-mode) .profile-map-zoom span {
  color: #202020;
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .profile-big-avatar {
  border-color: #f2f2f2;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

body:not(.dark-mode) .profile-identity h1,
body:not(.dark-mode) .profile-stats dt,
body:not(.dark-mode) .profile-route-card h2,
body:not(.dark-mode) .profile-places-card h2,
body:not(.dark-mode) .profile-trip-city strong,
body:not(.dark-mode) .profile-place-row strong {
  color: #202020;
}

body:not(.dark-mode) .profile-stats dd,
body:not(.dark-mode) .profile-intro,
body:not(.dark-mode) .profile-route-card p,
body:not(.dark-mode) .profile-places-empty,
body:not(.dark-mode) .profile-trip-date,
body:not(.dark-mode) .profile-trip-duration,
body:not(.dark-mode) .profile-trip-country,
body:not(.dark-mode) .profile-trip-year,
body:not(.dark-mode) .profile-place-row small,
body:not(.dark-mode) .profile-place-row time {
  color: #666666;
}

body:not(.dark-mode) .profile-intro:not(.is-empty) {
  color: #3f3f3f;
}

body:not(.dark-mode) .profile-social-link {
  border-color: #d8d8d8;
  background: #ffffff;
}

body:not(.dark-mode) .profile-route-card,
body:not(.dark-mode) .profile-places-card {
  border-color: #d8d8d8;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

body:not(.dark-mode) .profile-places-card header strong {
  color: #ffffff;
  background: #202020;
}

body:not(.dark-mode) .profile-place-form input,
body:not(.dark-mode) .profile-place-row {
  border-color: #dddddd;
  color: #202020;
  background: #f5f5f5;
}

body:not(.dark-mode) .profile-trip-row,
body:not(.dark-mode) .profile-trip-year {
  border-color: #e6e6e6;
}

body:not(.dark-mode) .profile-trip-more {
  border-color: #dddddd;
  color: #555555;
  background: #ffffff;
}

body:not(.dark-mode) .profile-place-status span {
  border-color: #dddddd;
  color: #202020;
  background: #f5f5f5;
}

body:not(.dark-mode) .profile-place-status input:checked + span {
  border-color: #4f98c7;
  color: #ffffff;
  background: #4f98c7;
}

body:not(.dark-mode) .profile-route-meta select {
  border-color: #dddddd;
  color: #202020;
  background: #ffffff;
}

body:not(.dark-mode) .profile-place-form span {
  color: #777777;
}

body:not(.dark-mode) .profile-place-remove {
  background: transparent;
}

body:not(.dark-mode) .profile-secondary {
  border-color: #4f98c7;
  color: #4f98c7;
  background: transparent;
}

body:not(.dark-mode) .member-avatar {
  border-color: #d6d6d6;
  background: #ffffff;
}

body:not(.dark-mode) .view-button {
  background: transparent;
}

body:not(.dark-mode) .view-button.active,
body:not(.dark-mode) .quick-chip.active,
body:not(.dark-mode) .side-filter.active {
  border-color: #4f98c7;
  color: #ffffff;
  background: #4f98c7;
}

body:not(.dark-mode) .profile-menu {
  border-color: #d7d7d7;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

body:not(.dark-mode) .profile-menu button {
  border-color: #d7d7d7;
  color: #202020;
  background: #ffffff;
}

body:not(.dark-mode) .pathway-section header {
  border-bottom-color: #d0d0d0;
}

body:not(.dark-mode) .pathway-section header span {
  color: #ffffff;
  background: #202020;
}

body:not(.dark-mode) .map-panel {
  border-color: #d0d0d0;
  background:
    radial-gradient(ellipse at 26% 42%, rgba(146, 169, 153, 0.78) 0 12%, transparent 13%),
    radial-gradient(ellipse at 50% 35%, rgba(146, 169, 153, 0.68) 0 16%, transparent 17%),
    radial-gradient(ellipse at 72% 49%, rgba(146, 169, 153, 0.64) 0 15%, transparent 16%),
    radial-gradient(ellipse at 34% 70%, rgba(146, 169, 153, 0.6) 0 10%, transparent 11%),
    linear-gradient(180deg, #e7ece9, #d9e3e5);
}

body:not(.dark-mode) .map-zoom,
body:not(.dark-mode) .map-legend,
body:not(.dark-mode) .map-pin-label,
body:not(.dark-mode) .map-result-row {
  border-color: #d0d0d0;
  color: #202020;
  background: rgba(255, 255, 255, 0.94);
}

body:not(.dark-mode) .map-zoom button,
body:not(.dark-mode) .map-legend span,
body:not(.dark-mode) .map-brand,
body:not(.dark-mode) .map-tip {
  color: #202020;
  text-shadow: none;
}

body:not(.dark-mode) .map-pin-label small {
  color: #666;
}

body:not(.dark-mode) .map-result-row small {
  color: #666;
}

body:not(.dark-mode) .modal-panel,
body:not(.dark-mode) .modal-score-list,
body:not(.dark-mode) .modal-tabs,
body:not(.dark-mode) .modal-body.tab-detail,
body:not(.dark-mode) .modal-tab-grid article,
body:not(.dark-mode) .visa-route-card {
  color: #202020;
  background: #ffffff;
}

body:not(.dark-mode) .modal-tabs {
  border-color: #d0d0d0;
}

body:not(.dark-mode) .modal-tabs button {
  color: #666;
}

body:not(.dark-mode) .modal-summary,
body:not(.dark-mode) .modal-kicker,
body:not(.dark-mode) .modal-metrics dt,
body:not(.dark-mode) .modal-scoreline,
body:not(.dark-mode) .modal-tab-panel p,
body:not(.dark-mode) .modal-tab-grid strong {
  color: #333;
}

body:not(.dark-mode) .modal-scoreline,
body:not(.dark-mode) .modal-metrics div,
body:not(.dark-mode) .modal-score-list {
  border-color: #d8d8d8;
}

body:not(.dark-mode) .modal-scoreline .modal-score,
body:not(.dark-mode) .modal-metrics dd {
  background: #e8e8e8;
}

body:not(.dark-mode) .modal-tags span {
  color: #202020;
  background: #eeeeee;
}

body:not(.dark-mode) .modal-tab-panel h3,
body:not(.dark-mode) .people-group h3,
body:not(.dark-mode) .modal-tab-grid span,
body:not(.dark-mode) .visa-route-card header strong,
body:not(.dark-mode) .visa-route-card dd {
  color: #202020;
}

body:not(.dark-mode) .visa-route-card p {
  color: #555;
}

@media (max-width: 1100px) {
  .modal-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .modal-score-list {
    max-height: none;
    border-right: 0;
  }

  .modal-map-panel {
    height: 360px;
    min-height: 360px;
  }

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

@media (max-width: 700px) {
  .modal-panel {
    grid-template-rows: 230px 56px minmax(0, 1fr);
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .modal-crumbs,
  .modal-photo-meta {
    display: none;
  }

  .modal-scoreline,
  .modal-metrics div {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-block: 12px;
  }

  .modal-tab-grid {
    grid-template-columns: 1fr;
  }
}

.member-avatar {
  border: 1px solid #444;
  cursor: pointer;
  color: #222;
  font-weight: 900;
}

.member-avatar.is-signed-in {
  color: white;
  background: #4f98c7;
  font-size: 22px;
}

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

.account-open,
.membership-open {
  overflow: hidden;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 22px;
}

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

.membership-modal {
  position: fixed;
  inset: 0;
  z-index: 74;
  display: grid;
  place-items: center;
  padding: 22px;
}

.membership-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.membership-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.membership-close {
  position: absolute;
  right: 12px;
  top: 8px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
}

.membership-header {
  display: grid;
  gap: 9px;
  padding-right: 32px;
}

.membership-header h2,
.membership-header p,
.membership-status {
  margin: 0;
}

.membership-header h2 {
  font-size: 34px;
  line-height: 1;
}

.membership-header p,
.membership-panel small,
.membership-status {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
}

.membership-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--soft);
}

.membership-plan div {
  display: grid;
  gap: 4px;
}

.membership-plan span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.membership-plan strong {
  font-size: 22px;
}

.membership-benefits {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
  color: var(--ink);
  font-weight: 800;
}

.membership-guest-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.membership-guest-fields[hidden] {
  display: none;
}

.membership-guest-fields label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 900;
}

.membership-guest-fields input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: var(--soft);
  outline: none;
}

.membership-guest-fields input:focus {
  border-color: #4f98c7;
  background: var(--panel);
}

.membership-auth-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.55fr);
  gap: 10px;
}

.membership-auth-actions[hidden],
.hosted-auth-only[hidden] {
  display: none;
}

.membership-login {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 18px;
  color: var(--ink);
  background: var(--soft);
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
}

.turnstile-shell {
  display: grid;
  gap: 6px;
}

.membership-checkout {
  border: 1px solid #4f98c7;
  border-radius: 7px;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-weight: 900;
}

.membership-checkout {
  min-height: 52px;
  padding: 0 18px;
  font-size: 17px;
}

.membership-checkout:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

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

.onboarding-open {
  overflow: hidden;
}

.onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 76;
  display: grid;
  place-items: center;
  padding: 22px;
}

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

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

.onboarding-map-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #c7d0d2;
}

.onboarding-map-backdrop::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -72px;
  z-index: 2;
  display: block;
  height: 170px;
  border-radius: 50% 50% 0 0 / 42% 42% 0 0;
  background: rgba(244, 244, 244, 0.96);
}

.onboarding-country-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #c7d0d2;
}

.onboarding-country-map .maplibregl-map,
.onboarding-country-map .maplibregl-canvas-container,
.onboarding-country-map .maplibregl-canvas {
  width: 100%;
  height: 100%;
}

.onboarding-country-map .maplibregl-canvas {
  filter: saturate(0.72) contrast(0.92) brightness(1.04);
}

.onboarding-country-map.is-maplibre-missing::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 36%, rgba(255, 255, 255, 0.92) 0 11%, transparent 12%),
    radial-gradient(circle at 54% 32%, rgba(255, 255, 255, 0.92) 0 19%, transparent 20%),
    radial-gradient(circle at 70% 58%, rgba(255, 255, 255, 0.92) 0 11%, transparent 12%),
    #c7d0d2;
  opacity: 0.82;
}

.onboarding-map-key {
  position: absolute;
  right: 24px;
  bottom: 26px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
  max-width: min(520px, calc(100% - 48px));
  border-radius: 999px;
  padding: 9px 13px;
  color: #202020;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
  font-size: 13px;
  font-weight: 1000;
}

.onboarding-map-key.is-empty {
  max-width: min(360px, calc(100% - 48px));
  white-space: normal;
}

.onboarding-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.58);
}

.onboarding-modal.is-map-step .onboarding-backdrop {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(1px);
}

.onboarding-panel {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 18px;
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.onboarding-modal.is-map-step .onboarding-panel {
  border-color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.onboarding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.onboarding-header strong {
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--soft);
  font-size: 13px;
  font-weight: 1000;
}

.onboarding-copy {
  display: grid;
  gap: 8px;
}

.onboarding-copy h2,
.onboarding-copy p {
  margin: 0;
}

.onboarding-copy h2 {
  font-size: clamp(30px, 6vw, 46px);
  line-height: 0.98;
}

.onboarding-copy p {
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.onboarding-form,
.onboarding-step-body,
.onboarding-field {
  display: grid;
  gap: 12px;
}

.onboarding-field span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
}

.onboarding-field input,
.onboarding-field select,
.onboarding-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--soft);
  outline: none;
  font: inherit;
  font-weight: 850;
}

.onboarding-field textarea {
  min-height: 126px;
  resize: vertical;
  line-height: 1.35;
}

.onboarding-field input:focus,
.onboarding-field select:focus,
.onboarding-field textarea:focus {
  border-color: #4f98c7;
  background: var(--panel);
}

.onboarding-photo-field {
  display: grid;
  justify-items: center;
  gap: 14px;
  cursor: pointer;
  text-align: center;
}

.onboarding-photo-field > span:first-child {
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
}

.onboarding-photo-preview {
  display: grid;
  place-items: center;
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #4f98c7;
  background: center / cover no-repeat, var(--soft);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
  font-size: 54px;
  font-weight: 1000;
  line-height: 1;
}

.onboarding-photo-field strong {
  display: grid;
  min-height: 44px;
  place-items: center;
  border-radius: 999px;
  padding: 0 20px;
  color: #ffffff;
  background: #4f98c7;
  font-size: 15px;
  font-weight: 1000;
}

.onboarding-photo-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.onboarding-travel-shell {
  display: grid;
  gap: 16px;
}

.onboarding-travel-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.onboarding-place-location-field {
  position: relative;
}

.onboarding-status-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.onboarding-status-grid legend {
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
}

.onboarding-status-grid label {
  display: grid;
}

.onboarding-status-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.onboarding-status-grid span {
  display: grid;
  min-height: 50px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  color: var(--muted);
  background: var(--soft);
  font-weight: 1000;
  text-align: center;
}

.onboarding-status-grid input:checked + span {
  border-color: #4f98c7;
  color: #ffffff;
  background: #4f98c7;
}

.onboarding-date-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.onboarding-travel-add {
  grid-column: 1 / -1;
  min-height: 48px;
  border: 0;
  border-radius: 9px;
  color: #ffffff;
  background: #4f98c7;
  cursor: pointer;
  font-size: 16px;
  font-weight: 1000;
}

.onboarding-error {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: #ff4545;
  font-size: 14px;
  font-weight: 900;
}

.onboarding-error[hidden] {
  display: none;
}

.onboarding-travel-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.onboarding-travel-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.onboarding-travel-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  background: var(--soft);
}

.onboarding-travel-thumb {
  display: grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1.45;
  border-radius: 8px;
  background: var(--trip-photo) center / cover no-repeat, #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  font-size: 22px;
}

.onboarding-travel-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.onboarding-travel-row strong,
.onboarding-travel-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.onboarding-travel-row strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 1000;
}

.onboarding-travel-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.onboarding-travel-row b {
  border-radius: 999px;
  padding: 7px 10px;
  color: #ffffff;
  background: #4f98c7;
  font-size: 12px;
  font-weight: 1000;
  white-space: nowrap;
}

.onboarding-travel-row button {
  display: grid;
  width: 32px;
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ff4545;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  font-weight: 1000;
  line-height: 1;
}

.onboarding-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.onboarding-actions button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 1000;
}

.onboarding-skip {
  justify-self: start;
  color: var(--muted);
  background: transparent;
}

.onboarding-back {
  color: var(--ink);
  background: var(--soft);
}

.onboarding-next {
  color: #ffffff;
  background: #4f98c7;
}

@media (max-width: 560px) {
  .membership-panel {
    padding: 20px;
  }

  .membership-header h2 {
    font-size: 29px;
  }

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

  .membership-auth-actions {
    grid-template-columns: 1fr;
  }

  .onboarding-panel {
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
    padding: 20px;
  }

  .onboarding-modal.is-map-step {
    align-items: start;
    padding: 14px;
  }

  .onboarding-map-backdrop::after {
    bottom: -48px;
    height: 118px;
  }

  .onboarding-map-key {
    right: 14px;
    bottom: 14px;
    left: 14px;
    justify-content: center;
    max-width: none;
    border-radius: 16px;
    font-size: 12px;
  }

  .onboarding-map-key.is-empty {
    max-width: none;
  }

  .onboarding-status-grid,
  .onboarding-travel-form,
  .onboarding-date-grid,
  .onboarding-actions {
    grid-template-columns: 1fr;
  }

  .onboarding-travel-list {
    max-height: 220px;
  }

  .onboarding-travel-row {
    grid-template-columns: 62px minmax(0, 1fr) auto;
  }

  .onboarding-travel-row b {
    grid-column: 2;
    justify-self: start;
  }

  .onboarding-travel-row button {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .onboarding-skip,
  .onboarding-back,
  .onboarding-next {
    justify-self: stretch;
  }
}

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

.wechat-open {
  overflow: hidden;
}

.wechat-modal {
  position: fixed;
  inset: 0;
  z-index: 72;
  display: grid;
  place-items: center;
  padding: 22px;
}

.wechat-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.wechat-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(190px, 0.75fr) minmax(260px, 1fr);
  gap: 22px;
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.wechat-close {
  position: absolute;
  right: 12px;
  top: 8px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
}

.wechat-qr {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 12px solid white;
  border-radius: 10px;
  color: #111;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px 22px, #111 22px 34px, transparent 34px),
    linear-gradient(#111 10px, transparent 10px 22px, #111 22px 34px, transparent 34px),
    #f4f4f4;
  background-size: 44px 44px;
  box-shadow: inset 0 0 0 1px #ddd;
  font-size: 32px;
  font-weight: 1000;
}

.wechat-copy {
  display: grid;
  gap: 12px;
  align-content: center;
  padding-right: 24px;
}

.wechat-copy h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
}

.wechat-copy p,
.wechat-copy small {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.wechat-id {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--soft);
}

.wechat-id span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.wechat-id strong {
  font-size: 18px;
}

.account-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.account-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(760px, 100%);
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.account-close {
  position: absolute;
  right: 12px;
  top: 8px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
}

.account-header {
  display: grid;
  gap: 8px;
  padding-right: 34px;
}

.account-badge {
  width: max-content;
  border-radius: 5px;
  padding: 5px 8px;
  color: white;
  background: #4f98c7;
  font-size: 12px;
  font-weight: 900;
}

.account-header h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
}

.account-note,
.account-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.account-form {
  display: grid;
  gap: 12px;
}

.account-form label,
.review-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 900;
}

.account-form input,
.account-form textarea,
.review-form input,
.review-form select,
.review-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: var(--soft);
  outline: none;
}

.account-form input:focus,
.account-form textarea:focus,
.review-form input:focus,
.review-form select:focus,
.review-form textarea:focus {
  border-color: #4f98c7;
  background: var(--panel);
}

.account-form textarea {
  min-height: 118px;
  resize: vertical;
  font: inherit;
  line-height: 1.35;
}

.account-photo-field input {
  padding: 10px 12px;
  cursor: pointer;
}

.account-save,
.account-logout,
.review-form button,
.review-locked button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-weight: 900;
}

.account-logout {
  color: #4f98c7;
  background: transparent;
  border: 1px solid #4f98c7;
}

.account-debug-return {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--soft);
  cursor: pointer;
  font-weight: 900;
}

.account-debug-return[hidden] {
  display: none;
}

.admin-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.admin-panel[hidden] {
  display: none;
}

.admin-panel header,
.admin-user {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.admin-panel h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.admin-panel header button,
.admin-user-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--soft);
  cursor: pointer;
  font-weight: 900;
}

.admin-status,
.admin-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.admin-users {
  display: grid;
  gap: 8px;
}

.admin-news-panel,
.admin-debug-panel,
.admin-invite-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--soft);
}

.admin-news-panel h4,
.admin-debug-panel h4,
.admin-invite-panel h4 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
}

.admin-invite-head,
.admin-invite-copy,
.admin-invite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-invite-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-invite-head button,
.admin-invite-copy button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-weight: 900;
}

.admin-debug-panel[hidden] {
  display: none;
}

.admin-invite-copy[hidden] {
  display: none;
}

.admin-invite-copy input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
}

.admin-invite-list {
  display: grid;
  gap: 8px;
}

.admin-invite-row {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.admin-invite-row strong,
.admin-invite-row span {
  display: block;
}

.admin-invite-row strong {
  color: var(--ink);
  font-size: 14px;
}

.admin-invite-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-invite-row button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
  font-weight: 900;
}

.admin-news-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-news-form label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 1000;
}

.admin-news-form input,
.admin-news-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
  outline: none;
}

.admin-news-form textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.35;
}

.admin-news-wide {
  grid-column: 1 / -1;
}

.admin-news-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.admin-news-check input {
  width: auto;
}

.admin-news-form button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: #4f98c7;
  cursor: pointer;
  font-weight: 900;
}

.admin-news-form button[type="button"] {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
}

.admin-news-list {
  display: grid;
  gap: 8px;
}

.admin-news-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.admin-news-row.is-draft {
  opacity: 0.62;
}

.admin-news-row strong,
.admin-news-row span {
  display: block;
}

.admin-news-row strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.admin-news-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-user {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--soft);
}

.admin-user.is-disabled {
  opacity: 0.62;
}

.admin-user strong,
.admin-user span {
  display: block;
}

.admin-user strong {
  color: var(--ink);
  font-size: 16px;
}

.admin-user span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.admin-user-tags,
.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.admin-user-tags b {
  border-radius: 999px;
  padding: 5px 8px;
  color: white;
  background: #222;
  font-size: 11px;
  font-weight: 1000;
}

.admin-user-actions {
  grid-column: 1 / -1;
}

.admin-user-actions button[data-admin-action="delete"] {
  color: #4f98c7;
  background: transparent;
  border-color: #4f98c7;
}

.reviews-tab {
  display: grid;
  gap: 18px;
  max-width: 1040px;
}

.reviews-intro {
  display: grid;
  gap: 8px;
}

.reviews-intro h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.reviews-intro p,
.review-locked p,
.review-card p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.reviews-intro span {
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: var(--soft);
  font-size: 12px;
  font-weight: 900;
}

.review-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1.3fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--panel);
}

.review-form-text,
.review-form button,
.review-form output {
  grid-column: 1 / -1;
}

.review-form textarea {
  min-height: 132px;
  resize: vertical;
}

.review-form output {
  min-height: 20px;
  color: #4f98c7;
  font-weight: 900;
}

.review-locked {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--panel);
}

.review-locked button {
  flex: 0 0 auto;
  padding: 0 18px;
}

.review-list {
  display: grid;
  gap: 12px;
}

.reviews-empty {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 18px;
  color: var(--muted);
  background: var(--soft);
  font-size: 16px;
  font-weight: 900;
}

.review-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--panel);
}

.review-card.is-mine {
  border-color: #4f98c7;
  box-shadow: inset 4px 0 0 #4f98c7;
}

.review-card header,
.review-card footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.review-card header strong {
  color: var(--ink);
  font-size: 18px;
}

.review-author {
  display: flex;
  align-items: center;
  min-width: 0;
}

.review-author .community-avatar {
  width: 58px;
  flex: 0 0 58px;
}

.review-card header span,
.review-card footer span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.review-card footer b {
  border-radius: 999px;
  padding: 5px 8px;
  color: white;
  background: #4f98c7;
  font-size: 12px;
}

.review-delete {
  min-height: 32px;
  border: 1px solid #4f98c7;
  border-radius: 7px;
  padding: 0 10px;
  color: #4f98c7;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.member-avatar.is-admin {
  border-color: #d9a324;
  color: #111;
  background: #f7c948;
}

.member-avatar.has-photo,
.profile-mini-avatar.has-photo,
.community-avatar.has-photo,
.member-popover-avatar.has-photo,
.profile-big-avatar.has-photo {
  color: transparent;
  background: var(--avatar-photo) center / cover no-repeat;
  text-shadow: none;
}

.member-avatar.has-photo,
.profile-mini-avatar.has-photo,
.profile-big-avatar.has-photo,
.member-popover-avatar.has-photo {
  font-size: 0;
}

.avatar-photo-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.community-avatar.has-photo .community-avatar-initials {
  opacity: 0;
}

.pathway-grid .city-card {
  min-height: 0;
}

.pathway-grid .card-title {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 44%;
  display: block;
  text-align: center;
  transform: translateY(-50%);
}

.pathway-grid .country {
  margin: 0;
  color: #ffffff;
  font-size: clamp(14px, 6.2cqw, 18px);
  font-weight: 700;
  line-height: 1.05;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.74);
}

.pathway-grid .city-card h2 {
  margin: 0 0 3px;
  color: #ffffff;
  font-size: clamp(25px, 12cqw, 34px);
  line-height: 0.96;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.78);
  text-wrap: balance;
}

.pathway-grid .flag-code,
.pathway-grid .review-line {
  display: none;
}

body.dark-mode .account-panel,
body.dark-mode .wechat-panel,
body.dark-mode .routes-page-hero,
body.dark-mode .target-panel,
body.dark-mode .route-community,
body.dark-mode .route-community-steps article,
body.dark-mode .checklist-items label,
body.dark-mode .admin-user,
body.dark-mode .admin-news-panel,
body.dark-mode .admin-invite-panel,
body.dark-mode .review-form,
body.dark-mode .review-locked,
body.dark-mode .review-card {
  border-color: #333;
  color: #f2f2f2;
  background: #171717;
}

body.dark-mode .account-form input,
body.dark-mode .account-form textarea,
body.dark-mode .target-controls select,
body.dark-mode .target-summary,
body.dark-mode .route-community-steps article,
body.dark-mode .wechat-id,
body.dark-mode .review-form input,
body.dark-mode .review-form select,
body.dark-mode .review-form textarea,
body.dark-mode .reviews-empty,
body.dark-mode .reviews-intro span,
body.dark-mode .admin-panel header button,
body.dark-mode .admin-news-form input,
body.dark-mode .admin-news-form textarea,
body.dark-mode .admin-news-form button[type="button"],
body.dark-mode .admin-invite-copy input,
body.dark-mode .admin-invite-row button,
body.dark-mode .admin-user-actions button {
  border-color: #333;
  color: #f2f2f2;
  background: #202020;
}

body.dark-mode .reviews-intro h3,
body.dark-mode .account-header h2,
body.dark-mode .wechat-copy h2,
body.dark-mode .routes-page-hero h1,
body.dark-mode .target-panel h2,
body.dark-mode .route-checklist h3,
body.dark-mode .account-form label,
body.dark-mode .admin-panel h3,
body.dark-mode .admin-news-panel h4,
body.dark-mode .admin-invite-panel h4,
body.dark-mode .admin-news-form label,
body.dark-mode .admin-news-row strong,
body.dark-mode .admin-invite-row strong,
body.dark-mode .admin-user strong,
body.dark-mode .review-form label,
body.dark-mode .review-card header strong {
  color: #f2f2f2;
}

body.dark-mode .reviews-intro p,
body.dark-mode .review-locked p,
body.dark-mode .review-card p,
body.dark-mode .wechat-copy p,
body.dark-mode .wechat-copy small,
body.dark-mode .routes-page-hero p,
body.dark-mode .account-note,
body.dark-mode .account-footnote,
body.dark-mode .admin-status,
body.dark-mode .admin-empty,
body.dark-mode .admin-news-row span,
body.dark-mode .admin-invite-head p,
body.dark-mode .admin-invite-row span,
body.dark-mode .admin-user span {
  color: #cfcfcf;
}

body.dark-mode .route-stage-more {
  color: #d6d6d6;
  background: #2a2a2a;
}

@media (max-width: 1180px) {
  .profile-place-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-place-status,
  .profile-place-duration {
    grid-column: 1 / -1;
  }

  .profile-place-form > button {
    grid-column: 1 / -1;
    justify-self: start;
    width: min(320px, 100%);
  }

  .profile-trip-row {
    grid-template-columns: 72px 48px 72px 86px minmax(0, 1fr) minmax(138px, auto) auto;
  }

  .profile-trip-row:not(.has-dates) {
    grid-template-columns: 86px minmax(0, 1fr) minmax(128px, 0.65fr) minmax(138px, auto) auto;
  }

  .profile-trip-thumb {
    width: 76px;
  }

  .profile-trip-country {
    display: block;
    grid-column: 5;
    grid-row: 2;
    font-size: 12px;
  }

  .profile-trip-row:not(.has-dates) .profile-trip-country {
    grid-column: 3;
    grid-row: 1;
  }

  .profile-trip-people {
    grid-column: 6;
    grid-row: 2;
    justify-content: flex-end;
    padding-left: 0;
  }

  .profile-trip-row:not(.has-dates) .profile-trip-people {
    grid-column: 4;
    grid-row: 1;
  }

  .profile-trip-review {
    grid-column: 6;
    grid-row: 1;
    justify-self: end;
    max-width: 180px;
  }

  .profile-trip-row:not(.has-dates) .profile-trip-review {
    grid-column: 4;
    grid-row: 2;
    justify-self: end;
  }

  .profile-trip-row .profile-place-remove {
    grid-column: 7;
    grid-row: 1;
    justify-self: end;
  }

  .profile-trip-row:not(.has-dates) .profile-place-remove {
    grid-column: 5;
    grid-row: 1;
  }
}

@media (max-width: 700px) {
  .profile-map-hero {
    min-height: 390px;
  }

  .profile-map-badge {
    right: 12px;
    bottom: 98px;
    max-width: calc(100% - 24px);
    font-size: 12px;
  }

  .account-modal {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px calc(env(safe-area-inset-bottom, 0px) + 108px);
    -webkit-overflow-scrolling: touch;
  }

  .account-panel {
    width: min(100%, 560px);
    max-height: none;
    margin: 0 auto;
    overflow: visible;
    padding: 20px;
  }

  .account-close {
    position: sticky;
    top: 8px;
    z-index: 5;
    display: grid;
    place-items: center;
    justify-self: end;
    width: 44px;
    height: 44px;
    margin: -8px -8px 0 auto;
    border-radius: 50%;
    background: var(--panel);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    line-height: 1;
  }

  .review-form {
    grid-template-columns: 1fr;
  }

  .target-panel > header,
  .target-controls,
  .route-checklist header,
  .wechat-panel {
    grid-template-columns: 1fr;
  }

  .target-panel > header,
  .route-community header,
  .route-checklist header {
    align-items: stretch;
    flex-direction: column;
  }

  .route-community-steps,
  .checklist-items {
    grid-template-columns: 1fr;
  }

  .wechat-copy {
    padding-right: 0;
  }

  .review-locked,
  .review-card header,
  .review-card footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-panel {
    margin-top: -104px;
  }

  .profile-action-stack {
    position: static;
    grid-template-columns: 1fr;
    width: min(420px, 100%);
    order: 3;
  }

  .profile-avatar-wrap {
    width: 180px;
  }

  .profile-stats {
    gap: 20px 10px;
  }

  .profile-stats dt {
    font-size: 26px;
  }

  .profile-stats dd {
    font-size: 16px;
  }

  .profile-route-meta {
    grid-template-columns: 1fr;
  }

  .profile-place-form {
    grid-template-columns: 1fr;
  }

  .profile-place-duration {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .profile-place-duration label,
  .profile-place-duration input {
    min-width: 0;
  }

  .profile-place-duration span {
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .profile-place-form > button {
    width: 100%;
  }

  .profile-place-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .profile-place-row .profile-trip-review {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .profile-travel-row .profile-place-remove {
    grid-column: 3;
  }

  .profile-place-row time {
    white-space: normal;
  }

  .profile-trip-row {
    grid-template-columns: 66px 62px minmax(0, 1fr) 34px;
    grid-template-rows: auto auto auto;
    gap: 6px 10px;
    align-items: center;
    min-height: 116px;
    padding: 14px 0;
  }

  .profile-trip-row:not(.has-dates) {
    grid-template-columns: 66px minmax(0, 1fr) 34px;
    min-height: 108px;
  }

  .profile-trip-thumb {
    display: grid;
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 62px;
  }

  .profile-trip-row:not(.has-dates) .profile-trip-thumb {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 64px;
  }

  .profile-trip-date,
  .profile-trip-duration {
    font-size: 12px;
  }

  .profile-trip-date {
    justify-self: end;
    max-width: 62px;
    line-height: 1.16;
    text-align: right;
    white-space: normal;
  }

  .profile-trip-date.is-from {
    grid-column: 1;
    grid-row: 2;
  }

  .profile-trip-date.is-to {
    grid-column: 1;
    grid-row: 1;
  }

  .profile-trip-duration {
    display: none;
  }

  .profile-trip-city {
    grid-column: 3;
    grid-row: 1;
  }

  .profile-trip-row:not(.has-dates) .profile-trip-city {
    grid-column: 2;
  }

  .profile-trip-country {
    grid-column: 3;
    grid-row: 2;
    font-size: 12px;
  }

  .profile-trip-row:not(.has-dates) .profile-trip-country {
    grid-column: 2;
    grid-row: 2;
  }

  .profile-trip-people {
    grid-column: 2 / -1;
    grid-row: 3;
    justify-content: flex-end;
    padding-left: 0;
  }

  .profile-trip-row:not(.has-dates) .profile-trip-people {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .profile-trip-row.has-review .profile-trip-people,
  .profile-trip-row.has-review:not(.has-dates) .profile-trip-people {
    grid-row: 4;
  }

  .profile-trip-review {
    grid-column: 3;
    grid-row: 3;
    justify-self: start;
    padding: 7px 10px;
    font-size: 11px;
  }

  .profile-trip-row:not(.has-dates) .profile-trip-review {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
  }

  .profile-trip-people .community-avatar {
    flex-basis: 36px;
    width: 36px;
  }

  .profile-trip-more {
    flex-basis: 36px;
    width: 36px;
    font-size: 12px;
  }

  .profile-trip-row .profile-place-remove {
    grid-column: 4;
    grid-row: 2;
    justify-self: end;
  }

  .profile-trip-row:not(.has-dates) .profile-place-remove {
    grid-column: 3;
    grid-row: 2;
  }
}

@media (max-width: 720px) {
  .visa-detail-page,
  .news-detail-page,
  .admin-news-page {
    width: min(100% - 24px, 1180px);
    padding-top: 28px;
  }

  .admin-news-page-head,
  .admin-news-layout,
  .admin-news-form,
  .admin-news-page .admin-news-form {
    grid-template-columns: 1fr;
  }

  .admin-news-page-head {
    align-items: start;
    padding: 22px;
  }

  .admin-news-page-head h1 {
    font-size: 42px;
  }

  .admin-news-page-head button {
    width: 100%;
  }

  .admin-news-list-card {
    position: static;
    max-height: none;
  }

  .admin-news-row {
    grid-template-columns: 1fr;
  }

  .news-article-hero,
  .news-article-content article,
  .news-article-empty {
    border-radius: 8px;
    padding: 22px;
  }

  .news-article-hero h1 {
    font-size: 40px;
  }

  .news-article-content h2 {
    font-size: 24px;
  }

  .news-article-content p,
  .news-article-empty {
    font-size: 17px;
  }

  .visa-detail-stats,
  .visa-fact-grid,
  .visa-route-grid {
    grid-template-columns: 1fr;
  }
}

body.filters-open {
  --filter-panel-width: 170px;
  overflow-x: hidden;
}

body.filters-open .app-shell {
  display: block;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0 18px 56px calc(var(--filter-panel-width) + 14px);
}

body.filters-open .profile-stack {
  left: 0;
  top: 0;
}

body.filters-open .member-controls {
  padding-left: 0;
}

body.filters-open .filter-sidebar {
  position: fixed;
  left: 0;
  right: auto;
  top: 0;
  z-index: 45;
  display: grid !important;
  width: var(--filter-panel-width);
  margin: 0;
  gap: 14px;
  min-height: 100vh;
  max-height: 100vh;
  overflow: auto;
  padding: 18px 10px 20px 12px;
  color: #d4d4d4;
  background: #101010;
  box-shadow: inset -1px 0 0 #2e2e2e;
  transform: none;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #555 #191919;
}

body.filters-open .filter-sidebar::-webkit-scrollbar {
  width: 10px;
}

body.filters-open .filter-sidebar::-webkit-scrollbar-track {
  background: #191919;
}

body.filters-open .filter-sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #555;
}

body.filters-open .filter-head {
  display: none;
}

body.filters-open .filter-group,
body.filters-open .passport-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #d4d4d4;
  background: transparent;
}

body.filters-open .filter-group h2,
body.filters-open .passport-box h2 {
  grid-column: 1 / -1;
  margin: 0 0 1px;
  color: #a9a9a9;
  font-size: 10px;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.filters-open .side-filter,
body.filters-open .passport-select {
  display: grid;
  place-items: center;
  min-height: 34px;
  margin: 0;
  border: 1px solid #343434;
  border-radius: 8px;
  padding: 4px 8px;
  color: #bdbdbd;
  background: #1d1d1d;
  box-shadow: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.12;
  text-align: center;
}

body.filters-open .side-filter:hover,
body.filters-open .side-filter:focus-visible {
  border-color: #525252;
  color: #f2f2f2;
  background: #252525;
}

body.filters-open .side-filter.active {
  border-color: #4f98c7;
  color: white;
  background: #4f98c7;
}

body.filters-open .filter-group.compact {
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 2px 0 4px;
}

body.filters-open .budget-filter {
  gap: 7px;
}

body.filters-open .filter-spacer {
  min-height: 0;
}

body.filters-open .range-label {
  display: grid;
  gap: 2px;
  min-height: 28px;
  border: 1px solid #343434;
  border-radius: 8px;
  padding: 6px 8px;
  color: #bdbdbd;
  background: #1d1d1d;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
}

body.filters-open .range-label strong {
  color: #f2f2f2;
  font-size: 13px;
  line-height: 1;
}

body.filters-open input[type="range"] {
  width: 100%;
  min-width: 0;
  margin: 0;
  accent-color: #4f98c7;
}

body.filters-open .passport-select {
  grid-template-columns: auto 1fr;
  grid-column: 1 / -1;
  justify-items: start;
  gap: 12px;
  text-align: left;
}

body.filters-open .passport-select span {
  border-radius: 6px;
  background: #4f98c7;
}

body.filters-open .passport-box p {
  grid-column: 1 / -1;
  margin: 0;
  color: #8e8e8e;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

body.filters-open .content-panel {
  min-width: 0;
  max-width: 100%;
  padding-top: 10px;
  width: 100%;
}

body.filters-open .card-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
  grid-auto-rows: auto;
  justify-content: stretch;
  align-items: start;
  gap: 22px;
}

body.filters-open .news-tile,
body.filters-open .member-tile,
body.filters-open .rail-card {
  grid-column: auto !important;
  grid-row: auto !important;
  aspect-ratio: 1;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

body.filters-open .news-tile-content {
  min-height: 0;
  overflow-y: auto;
}

body.filters-open .member-tile .member-bubble {
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 1180px) {
  body.filters-open {
    --filter-panel-width: 150px;
  }

  body.filters-open .app-shell {
    display: block;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0 12px 56px calc(var(--filter-panel-width) + 12px);
  }

  body.filters-open .filter-sidebar {
    position: fixed;
    width: var(--filter-panel-width);
    min-height: 100vh;
    max-height: 100vh;
    order: initial;
    margin: 0;
    padding: 16px 8px 18px 10px;
    transform: none;
  }

  body.filters-open .profile-stack {
    left: 0;
    top: 0;
  }

  body.filters-open .member-controls {
    padding-left: 0;
  }

  body.filters-open .content-panel {
    order: initial;
  }

  body.filters-open .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  }
}

@media (max-width: 720px) {
  body.filters-open .filter-group,
  body.filters-open .passport-box {
    grid-template-columns: 1fr;
  }

  body.filters-open .side-filter,
  body.filters-open .passport-select {
    min-height: 32px;
    font-size: 11px;
  }

  body.filters-open .filter-spacer {
    min-height: 0;
  }
}

body.filters-open .member-controls {
  grid-template-columns: auto auto minmax(220px, 1fr);
  align-items: start;
  row-gap: 10px;
}

body.filters-open .filter-toggle {
  grid-column: 1;
}

body.filters-open .member-controls > .compare-button {
  grid-column: 2;
}

body.filters-open .member-search {
  grid-column: 3;
}

body.filters-open .toolbar-controls {
  grid-column: 1 / -1;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-top: 0;
}

body.filters-open .toolbar-controls label {
  margin-right: 0;
}

body.filters-open .visa-key {
  flex: 0 1 auto;
  justify-content: flex-start;
  margin-left: auto;
  overflow: visible;
}

body.filters-open:not(.dark-mode) .filter-sidebar {
  color: #202020;
  background: #f2f2f2;
  box-shadow: inset -1px 0 0 #d8d8d8;
  scrollbar-color: #bdbdbd #e7e7e7;
}

body.filters-open:not(.dark-mode) .filter-sidebar::-webkit-scrollbar-track {
  background: #e7e7e7;
}

body.filters-open:not(.dark-mode) .filter-sidebar::-webkit-scrollbar-thumb {
  background: #bdbdbd;
}

body.filters-open:not(.dark-mode) .filter-group h2,
body.filters-open:not(.dark-mode) .passport-box h2 {
  color: #202020;
}

body.filters-open:not(.dark-mode) .side-filter,
body.filters-open:not(.dark-mode) .passport-select,
body.filters-open:not(.dark-mode) .range-label {
  border-color: #d4d4d4;
  color: #202020;
  background: #ffffff;
}

body.filters-open:not(.dark-mode) .side-filter:hover,
body.filters-open:not(.dark-mode) .side-filter:focus-visible {
  border-color: #c4c4c4;
  color: #202020;
  background: #f7f7f7;
}

body.filters-open:not(.dark-mode) .side-filter.active {
  border-color: #4f98c7;
  color: #ffffff;
  background: #4f98c7;
}

body.filters-open:not(.dark-mode) .range-label strong {
  color: #202020;
}

body.filters-open:not(.dark-mode) .passport-box p {
  color: #666666;
}

@media (max-width: 1180px) {
  body.filters-open .member-controls {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  body.filters-open .filter-toggle,
  body.filters-open .member-controls > .compare-button,
  body.filters-open .member-search,
  body.filters-open .toolbar-controls {
    grid-column: auto;
  }

  body.filters-open .toolbar-controls {
    grid-column: 1 / -1;
  }

  body.filters-open .visa-key {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

.city-modal {
  padding: 70px clamp(28px, 8vw, 180px) 54px;
  place-items: center;
  z-index: 110;
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: none;
}

.modal-panel {
  grid-template-columns: 1fr;
  grid-template-rows: 272px 58px minmax(0, 1fr);
  width: min(1490px, calc(100vw - clamp(260px, 18vw, 360px)));
  max-width: calc(100vw - 56px);
  max-height: calc(100vh - 120px);
  border: 1px solid #272727;
  border-radius: 6px;
  overflow: visible;
  color: #d8d8d8;
  background: #111111;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.62);
}

.modal-close {
  right: -78px;
  top: -42px;
  width: 64px;
  border-radius: 0;
  color: white;
  background: transparent;
  font-size: 74px;
  font-weight: 300;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: transparent;
}

.modal-photo {
  min-height: 0;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
}

.modal-tabs {
  min-height: 58px;
  border-color: #292929;
  color: #bdbdbd;
  background: #171717;
}

.modal-tabs button {
  color: #bdbdbd;
  font-size: 16px;
}

.modal-body.tab-scores {
  display: grid;
  grid-template-columns: minmax(560px, 740px) minmax(260px, 1fr);
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 0 0 6px 6px;
  background: #111111;
}

.modal-score-list {
  min-height: 0;
  max-height: none;
  overflow: visible;
  border-right: 1px solid #292929;
  color: #d8d8d8;
  background: #171717;
}

.modal-kicker,
.modal-metrics dt,
.modal-scoreline {
  color: #cfcfcf;
}

.modal-scoreline,
.modal-metrics div {
  grid-template-columns: minmax(210px, 0.52fr) minmax(250px, 1fr);
  column-gap: 22px;
  border-color: #292929;
}

.modal-metrics dd {
  background: #2d2d2d;
}

.modal-tags span {
  color: #d8d8d8;
  background: #2a2a2a;
}

.modal-note {
  color: #858585;
}

@media (max-width: 1320px) {
  .city-modal {
    padding-inline: 34px;
  }

  .modal-panel {
    width: min(1180px, calc(100vw - 68px));
  }

  .modal-close {
    right: 10px;
    top: 10px;
    width: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.48);
    font-size: 48px;
  }
}

@media (max-width: 980px) {
  .modal-body.tab-scores {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .modal-score-list {
    border-right: 0;
  }
}

body:not(.dark-mode) .modal-panel {
  border-color: #d8d8d8;
  color: #202020;
  background: #ffffff;
}

body:not(.dark-mode) .compare-modal-panel,
body:not(.dark-mode) .compare-city-panel {
  border-color: #d8d8d8;
  color: #202020;
  background: #ffffff;
}

body:not(.dark-mode) .modal-tabs {
  border-color: #d0d0d0;
  color: #666666;
  background: #ffffff;
}

body:not(.dark-mode) .modal-tabs button {
  color: #666666;
}

body:not(.dark-mode) .modal-body.tab-scores {
  background: #ffffff;
}

body:not(.dark-mode) .modal-score-list {
  border-right-color: #d8d8d8;
  color: #202020;
  background: #ffffff;
}

body:not(.dark-mode) .modal-kicker,
body:not(.dark-mode) .modal-metrics dt,
body:not(.dark-mode) .modal-scoreline {
  color: #333333;
}

body:not(.dark-mode) .modal-scoreline,
body:not(.dark-mode) .modal-metrics div {
  border-color: #d8d8d8;
}

body:not(.dark-mode) .modal-scoreline .modal-score,
body:not(.dark-mode) .modal-metrics dd {
  background: #e8e8e8;
}

body:not(.dark-mode) .modal-tags span {
  color: #202020;
  background: #eeeeee;
}

body:not(.dark-mode) .modal-note {
  color: #666666;
}

.modal-panel h2 {
  font-size: 34px;
}

.modal-country-title {
  font-size: 18px;
}

.modal-hero-title button {
  min-height: 44px;
  border-radius: 9px;
  padding: 0 18px;
  font-size: 16px;
}

.modal-crumbs,
.modal-photo-meta {
  font-size: 13px;
}

.modal-tabs button {
  padding: 0 16px;
  font-size: 14px;
}

.modal-kicker {
  font-size: 11px;
}

.modal-scoreline {
  font-size: 15px;
}

.modal-scoreline .modal-score,
.modal-metrics dd {
  min-height: 38px;
  font-size: 15px;
}

.modal-metrics div {
  min-height: 58px;
}

.modal-metrics dt {
  font-size: 15px;
}

.city-modal {
  align-items: start;
  overflow-x: hidden;
  overflow-y: auto;
}

.modal-panel {
  max-height: none;
}

.modal-body,
.modal-body.tab-scores,
.modal-body.tab-detail,
.modal-score-list {
  overflow: visible;
}

.modal-body.tab-scores .modal-score-list {
  border-right: 0 !important;
}

.modal-body.tab-scores .modal-scoreline {
  border: 0 !important;
  box-shadow: none;
}

.modal-body.tab-scores .modal-metrics div {
  border: 0 !important;
  box-shadow: none;
}

@media (max-width: 700px) {
  .app-shell {
    width: 100%;
    gap: 14px;
    padding: 16px 15px 92px;
  }

  .content-panel {
    order: 1;
  }

  .member-controls {
    position: relative;
    display: grid;
    grid-template-columns: 52px auto auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 0;
    margin-bottom: 14px;
  }

  html[lang="en"] .member-controls {
    grid-template-columns: 44px 82px 96px minmax(96px, 1fr);
    gap: 8px;
  }

  .profile-setup-prompt {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: -2px 0 14px;
    padding: 16px;
  }

  .profile-setup-prompt h2 {
    font-size: 24px;
  }

  .profile-setup-prompt p {
    font-size: 14px;
  }

  .profile-setup-prompt button {
    width: 100%;
    min-height: 46px;
  }

  .profile-stack {
    position: static;
    grid-column: 1;
    display: grid;
    grid-template-columns: 44px;
    align-items: center;
    min-width: 0;
  }

  .guest-join-button {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 44px;
  }

  .member-avatar {
    display: grid;
    width: 44px;
    font-size: 26px;
  }

  .profile-name,
  .profile-target {
    display: none !important;
  }

  .filter-toggle {
    grid-column: 2;
    min-width: 82px;
    min-height: 48px;
    border-radius: 12px;
    padding: 0 17px;
    font-size: 16px;
  }

  html[lang="en"] .filter-toggle {
    padding: 0 12px;
  }

  .member-controls > .compare-button {
    grid-column: 3;
    min-height: 48px;
    border-radius: 12px;
    padding: 0 14px;
    color: #d6d6d6;
    background: #171717;
    font-size: 16px;
  }

  html[lang="en"] .member-controls > .compare-button {
    padding: 0 10px;
  }

  .member-search {
    grid-column: 4;
    width: auto;
  }

  html[lang="en"] .member-search {
    min-width: 96px;
  }

  .member-search input {
    min-height: 48px;
    border-radius: 999px;
    padding: 0 16px;
    font-size: 16px;
  }

  html[lang="en"] .member-search input {
    padding: 0 12px;
  }

  .quick-filters {
    display: none;
  }

  .member-controls .toolbar-controls {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 0;
    overflow: visible;
    padding: 0;
  }

  .member-controls .toolbar-controls label {
    display: none;
  }

  .member-controls .visa-key {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    margin: 0;
    gap: 2px;
    overflow: visible;
    border-radius: 10px;
    padding: 3px;
  }

  .member-controls .visa-key-item {
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 32px;
    gap: 2px;
    padding: 0 2px;
  }

  html[lang="zh"] .member-controls .visa-key-item[data-filter="visa:all"],
  html[lang="zh"] .member-controls .visa-key-item[data-filter="visa:remote"] {
    flex-grow: 1.25;
  }

  .member-controls .visa-key b {
    font-size: 13px;
  }

  .member-controls .visa-key small {
    min-width: 0;
    overflow: hidden;
    font-size: clamp(7px, 2.2vw, 10px);
    text-overflow: ellipsis;
  }

  .results-area {
    margin-top: 0;
  }

  .card-grid,
  .pathway-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }

  .city-card,
  .news-tile,
  .member-tile {
    aspect-ratio: 1;
    min-height: 0;
    border-radius: 12px;
  }

  .rank-number {
    left: 12px;
    top: 12px;
    font-size: 24px;
  }

  .rank-number::after {
    width: 24px;
    height: 2px;
    margin-top: 5px;
  }

  .route-stat {
    right: 10px;
    top: 10px;
    max-width: 62%;
    border-radius: 11px;
    padding: 6px 8px;
  }

  .route-stat strong {
    font-size: 15px;
  }

  .card-title {
    left: 10px;
    right: 10px;
    top: 49%;
  }

  .city-card h2 {
    font-size: clamp(25px, 15cqw, 34px);
  }

  .country {
    font-size: clamp(15px, 8cqw, 20px);
  }

  .card-footer {
    left: 11px;
    right: 11px;
    bottom: 12px;
    gap: 6px;
  }

  .temperature {
    font-size: clamp(14px, 8cqw, 18px);
  }

  .main-score {
    font-size: clamp(18px, 10cqw, 24px);
  }

  .news-tile header {
    min-height: 42px;
    padding: 9px 10px;
  }

  .news-story {
    gap: 5px;
    padding: 8px 10px;
  }

  .news-story strong {
    font-size: clamp(12px, 6cqw, 15px);
    -webkit-line-clamp: 2;
  }

  .member-tile .member-bubble header {
    min-height: 38px;
  }

  .member-tile .community-avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 40px));
    grid-auto-rows: 40px;
    justify-content: start;
    max-height: 88px;
    gap: 8px 10px;
    padding: 0 10px;
    overflow: hidden;
  }

  .member-tile .community-avatar {
    width: 40px;
    max-width: 40px;
  }

  .profile-avatar-flag,
  .profile-avatar-visa {
    bottom: -3px;
    width: 18px;
    border-width: 1px;
    font-size: 11px;
  }

  .profile-avatar-flag {
    left: -3px;
  }

  .profile-avatar-visa {
    right: -3px;
  }

  .community-avatar .profile-avatar-flag,
  .community-avatar .profile-avatar-visa {
    bottom: -3px;
    width: 17px;
    border-width: 1px;
    font-size: 10px;
  }

  .community-avatar .profile-avatar-flag {
    left: -3px;
  }

  .community-avatar .profile-avatar-visa {
    right: -3px;
  }

  .member-tile .member-bubble p {
    display: none;
  }

  .city-card:hover .score-grid,
  .city-card:focus-visible .score-grid,
  .city-card.is-touch-preview .score-grid {
    left: 12px;
    right: 12px;
    top: 47px;
    bottom: 43px;
    align-content: space-between;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 3px;
    overflow: hidden;
  }

  .city-card:hover .score-grid div,
  .city-card:focus-visible .score-grid div,
  .city-card.is-touch-preview .score-grid div {
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    column-gap: 7px;
    min-height: 0;
  }

  .city-card:hover .score-grid div:nth-child(n + 4),
  .city-card:focus-visible .score-grid div:nth-child(n + 4),
  .city-card.is-touch-preview .score-grid div:nth-child(n + 4) {
    display: none;
  }

  .city-card:hover .score-grid dt,
  .city-card:focus-visible .score-grid dt,
  .city-card.is-touch-preview .score-grid dt {
    font-size: clamp(9px, 3.8cqw, 11px);
    line-height: 1;
  }

  .city-card:hover .score-grid dd,
  .city-card:focus-visible .score-grid dd,
  .city-card.is-touch-preview .score-grid dd {
    align-self: center;
    height: 100%;
    min-height: 17px;
    max-height: 21px;
  }

  .city-card:hover .card-open-button,
  .city-card:focus-visible .card-open-button,
  .city-card.is-touch-preview .card-open-button {
    display: block;
    pointer-events: auto;
    left: 14px;
    right: 14px;
    bottom: 8px;
    min-height: 32px;
    font-size: clamp(14px, 5.8cqw, 18px);
  }

  .city-card .favorite-button,
  .city-card:hover .favorite-button,
  .city-card:focus-within .favorite-button,
  .city-card.is-compare-selected .favorite-button {
    display: block;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .city-card.is-touch-preview .favorite-button {
    display: block;
    left: 10px;
    top: 10px;
    width: 42px;
    height: 42px;
    opacity: 1 !important;
    font-size: 36px;
    pointer-events: auto !important;
  }

  .city-modal {
    align-items: start;
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    grid-template-rows: 300px 56px auto;
  }

  .modal-photo {
    min-height: 300px;
    border-radius: 0;
  }

  .modal-close {
    right: 18px;
    top: 18px;
    width: 58px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.46);
    font-size: 52px;
  }

  .modal-hero-title {
    top: 50%;
  }

  .modal-panel h2 {
    font-size: 42px;
  }

  .modal-country-title {
    font-size: 22px;
  }

  .modal-hero-title button {
    min-height: 54px;
    border-radius: 12px;
    padding: 0 22px;
    font-size: 18px;
  }

  .modal-tabs {
    min-height: 56px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .modal-tabs::-webkit-scrollbar {
    display: none;
  }

  .modal-tabs button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 8px;
    font-size: 16px;
  }

  .modal-body.tab-scores {
    display: block;
    overflow: visible;
    border-radius: 0;
  }

  .modal-score-list {
    width: 100%;
    overflow: visible;
    border-right: 0;
  }

  .modal-kicker {
    padding: 26px 22px 14px;
  }

  .modal-scoreline,
  .modal-metrics div {
    grid-template-columns: minmax(135px, 0.45fr) minmax(0, 1fr);
    column-gap: 14px;
    min-height: 72px;
    padding: 0 22px;
  }

  .modal-scoreline {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .modal-scoreline strong,
  .modal-metrics dt {
    min-width: 0;
    font-size: 17px;
  }

  .modal-scoreline .modal-score,
  .modal-metrics dd {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 42px;
    padding: 0 8px;
    font-size: 16px;
    white-space: normal;
  }

  .modal-tags {
    padding: 14px 22px;
  }

  .modal-note {
    padding: 0 22px 24px;
  }

  .modal-body.tab-detail .modal-tab-panel {
    padding: 28px 18px 40px;
  }

  .people-tab {
    gap: 42px;
  }

  .people-avatar-cloud {
    grid-template-columns: repeat(auto-fit, 52px);
    gap: 18px 20px;
  }

  .people-avatar-cloud .community-avatar {
    width: 52px;
  }
}

@container (max-width: 229px) {
  .member-tile .community-avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 40px));
  }
}

@container (min-width: 230px) and (max-width: 299px) {
  .member-tile .community-avatar-grid {
    grid-template-columns: repeat(4, minmax(0, 44px));
  }
}

@container (min-width: 300px) and (max-width: 379px) {
  .member-tile .community-avatar-grid {
    grid-template-columns: repeat(5, minmax(0, 48px));
  }
}

@container (min-width: 380px) {
  .member-tile .community-avatar-grid {
    grid-template-columns: repeat(5, minmax(0, 56px));
  }
}

@media (hover: none), (pointer: coarse) {
  .city-card:not(.is-touch-preview):hover .photo-layer,
  .city-card:not(.is-touch-preview):focus-visible .photo-layer {
    transform: scale(1.02);
  }

  .city-card:not(.is-touch-preview):hover .card-title,
  .city-card:not(.is-touch-preview):focus-visible .card-title,
  .city-card:not(.is-touch-preview):hover .card-footer,
  .city-card:not(.is-touch-preview):focus-visible .card-footer,
  .city-card:not(.is-touch-preview):hover .route-stat,
  .city-card:not(.is-touch-preview):focus-visible .route-stat,
  .city-card:not(.is-touch-preview):hover .rank-number,
  .city-card:not(.is-touch-preview):focus-visible .rank-number {
    opacity: 1;
    pointer-events: auto;
  }

  .city-card:not(.is-touch-preview):hover .score-grid,
  .city-card:not(.is-touch-preview):focus-visible .score-grid,
  .city-card:not(.is-touch-preview):hover .card-open-button,
  .city-card:not(.is-touch-preview):focus-visible .card-open-button {
    display: none;
    pointer-events: none;
  }

  .city-card:not(.is-touch-preview):hover .card-shade,
  .city-card:not(.is-touch-preview):focus-visible .card-shade {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.16) 38%, rgba(0, 0, 0, 0.74)),
      radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.18), transparent 25%);
  }
}

.modal-kicker {
  display: none;
}

.modal-close {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  text-align: center;
  font-size: 0;
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  width: 58%;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.modal-close::before {
  transform: rotate(45deg);
}

.modal-close::after {
  transform: rotate(-45deg);
}

@media (max-width: 700px) {
  .modal-close::before,
  .modal-close::after {
    width: 48%;
    height: 5px;
  }

  .modal-tabs button {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .modal-body.tab-detail {
    overflow-x: hidden;
  }

  .modal-body.tab-detail .modal-tab-panel,
  .reviews-tab,
  .reviews-intro,
  .review-form,
  .review-list,
  .review-card,
  .review-locked {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .reviews-intro {
    gap: 10px;
  }

  .reviews-intro h3 {
    font-size: 36px;
    line-height: 1.05;
  }

  .reviews-intro p {
    font-size: 20px;
    line-height: 1.28;
  }

  .reviews-intro span {
    width: 100%;
    min-width: 0;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .review-form {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .review-form input,
  .review-form select,
  .review-form textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }

  .review-form button {
    width: 100%;
  }

  .visa-route-grid,
  .visa-route-card,
  .visa-route-card header,
  .visa-route-card p,
  .visa-route-card dl,
  .visa-route-card dl div,
  .visa-route-card dt,
  .visa-route-card dd {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .visa-route-card {
    overflow: hidden;
    padding: 16px;
  }

  .visa-route-card header strong {
    font-size: 28px;
    overflow-wrap: anywhere;
  }

  .visa-route-card p {
    font-size: 18px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .visa-route-card dl div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }

  .visa-route-card dd {
    text-align: left;
    overflow-wrap: anywhere;
  }
}
