:root {
  /* Design note: default UI corners should use the current boxy radius system,
     not pill radii. Use --radius-panel for cards/panels and --radius-control
     for buttons/chips/arrows unless a component has a deliberate exception. */
  --bg: #fbf4f5;
  --panel: rgba(255, 248, 250, 0.9);
  --panel-strong: rgba(255, 251, 252, 0.97);
  --ink: #1c1518;
  --muted: #7a6870;
  --line: rgba(63, 37, 48, 0.08);
  --shadow: 0 28px 80px rgba(103, 61, 77, 0.12);
  --rose: #c1547d;
  --rose-soft: rgba(193, 84, 125, 0.14);
  --rose-strong: #8f3256;
  --sage: #657b5e;
  --sage-soft: rgba(101, 123, 94, 0.14);
  --slate: #667087;
  --slate-soft: rgba(102, 112, 135, 0.12);
  --petal: #f4d9e2;
  --petal-soft: rgba(244, 217, 226, 0.52);
  --radius-panel: 16px;
  --radius-control: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.98), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(244, 217, 226, 0.52), transparent 22%),
    radial-gradient(circle at 70% 72%, rgba(227, 236, 224, 0.62), transparent 26%),
    linear-gradient(145deg, #fff8f9 0%, #f8edf1 38%, #f0f2eb 100%);
}

body.home-route {
  background: #ffffff;
}

body.lightbox-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

#app {
  min-height: 100vh;
}

.app-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.app-shell--trip {
  width: 100%;
  padding: 0 0 56px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

body.home-route .topbar {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding: 2px 0 12px;
  border-bottom: 1px solid rgba(27, 20, 25, 0.06);
}

body.home-route .brandmark-logo {
  width: auto;
}

.brandmark--home {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}

.brandmark-mark {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  width: 64px;
  height: 36px;
  overflow: hidden;
  flex-shrink: 0;
}

.brandmark-logo--home {
  width: 92px;
  height: 36px;
  object-fit: cover;
  object-position: top center;
}

.brandmark-wordmark {
  display: grid;
  gap: 2px;
  text-align: left;
}

.brandmark-title {
  color: #5b3144;
  font-size: 1.12rem;
  line-height: 0.95;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.brandmark-title-tall {
  display: inline-block;
  font-size: 1.2em;
  line-height: 0.78;
  transform: translateY(0.03em);
}

.brandmark-tagline-line {
  color: rgba(91, 49, 68, 0.82);
  font-size: 0.58rem;
  line-height: 1.1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.home-nav-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(42, 35, 41, 0.62);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: color 180ms ease, opacity 180ms ease;
}

.home-nav-link:hover,
.home-nav-link.is-active {
  color: var(--ink);
}

.topbar--trip {
  margin-bottom: 34px;
  padding: 28px 34px 24px;
  border-bottom: 1px solid rgba(27, 20, 25, 0.08);
}

.brandmark {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.brandmark-logo {
  display: block;
  width: 168px;
  height: auto;
}

.brandmark--story {
  flex-shrink: 0;
}

.brandmark-logo--story {
  width: 92px;
}

.story-topbar-copy,
.story-topbar-actions {
  display: flex;
  align-items: center;
}

.story-topbar-copy {
  gap: 18px;
  min-width: 0;
}

.story-topbar-actions {
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.nav-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.nav-chip,
.primary-button,
.secondary-button,
.ghost-button,
.back-link,
.lightbox-nav {
  border: 0;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, opacity 180ms ease;
}

.nav-chip {
  border-radius: 18px;
  padding: 11px 18px;
  background: transparent;
  color: var(--muted);
}

.nav-chip:hover,
.nav-chip.is-active {
  background: var(--ink);
  color: white;
}

.primary-button--story {
  border-radius: var(--radius-control);
  padding: 14px 28px;
  background: #262323;
  color: white;
  box-shadow: none;
}

.primary-button--story:hover {
  transform: translateY(-1px);
  background: #191717;
}

.secondary-button--story {
  border-radius: var(--radius-control);
  padding: 13px 18px;
  background: white;
  border: 1px solid rgba(27, 20, 25, 0.08);
  color: var(--ink);
  box-shadow: none;
}

.page-shell {
  display: grid;
  gap: 24px;
}

.page-shell--trip {
  gap: 42px;
}

.story-frame {
  width: min(1600px, calc(100% - 56px));
  margin: 0 auto;
  display: grid;
  gap: 34px;
}

.panel,
.trip-card,
.city-card,
.gallery-card,
.notice {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 12px;
  padding: 18px 22px;
}

.notice p {
  margin: 0;
  color: var(--ink);
}

.notice button {
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.76);
}

.notice--warning {
  background: rgba(255, 244, 236, 0.95);
}

.notice--success {
  background: rgba(242, 249, 241, 0.96);
}

.hero-grid,
.studio-layout,
.overview-layout,
.trip-hero {
  display: grid;
  gap: 24px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
}

.panel,
.trip-card,
.city-card,
.gallery-card {
  border-radius: 16px;
}

.hero-panel,
.home-hero,
.home-sidecard,
.studio-copy,
.upload-panel,
.studio-settings,
.studio-summary,
.processing-panel,
.trip-hero-copy,
.trip-hero-media,
.map-panel,
.city-page-hero,
.empty-panel,
.studio-city-panel {
  padding: 28px;
}

.hero-panel h1,
.home-hero h1,
.studio-copy h1,
.trip-hero-copy h1,
.city-page-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.9rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.home-sidecard h2,
.studio-settings h2,
.studio-summary h2,
.map-panel h2,
.section-heading h2,
.processing-panel h2,
.empty-panel h2,
.empty-panel h3,
.studio-city-panel h3 {
  margin: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.lede,
.home-sidecard p,
.trip-card-copy p,
.city-card-copy p,
.gallery-card-copy p,
.studio-summary p,
.map-panel p,
.empty-panel p,
.field span,
.processing-panel p {
  color: var(--muted);
}

.lede {
  max-width: 56ch;
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions,
.studio-actions,
.studio-inline-actions,
.trip-stats,
.trip-card-meta,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button,
.back-link,
.lightbox-nav {
  border-radius: var(--radius-control);
  padding: 12px 18px;
}

.primary-button {
  background: var(--ink);
  color: white;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border: 1px solid var(--line);
}

.ghost-button,
.back-link,
.lightbox-nav {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.back-link:hover,
.lightbox-nav:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled {
  opacity: 0.44;
  cursor: not-allowed;
  transform: none;
}

.home-sidecard,
.studio-summary,
.map-panel {
  align-content: start;
}

.section-block {
  display: grid;
  gap: 18px;
}

.home-archive {
  gap: 26px;
  padding-top: 10px;
  padding-left: 28px;
}

@media (max-width: 760px) {
  .home-archive {
    padding-left: 0;
  }
}

.home-archive::before {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, rgba(51, 38, 45, 0.08), rgba(51, 38, 45, 0.02));
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.trip-card-grid,
.city-card-grid,
.gallery-grid,
.studio-city-grid {
  display: grid;
  gap: 18px;
}

.trip-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
  justify-content: start;
  column-gap: 24px;
  row-gap: 34px;
}

.city-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.studio-city-grid {
  grid-template-columns: 1fr;
}

.trip-card-button,
.gallery-card-button {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  text-align: left;
}

.trip-card-button:hover,
.gallery-card-button:hover {
  transform: translateY(-2px);
}

.gallery-card {
  scroll-snap-align: start;
}

.gallery-card--carousel {
  min-width: 0;
}

.gallery-card--editorial {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.trip-card-media,
.gallery-card-media,
.city-card-media,
.trip-hero-media,
.city-page-media {
  overflow: hidden;
  border-radius: 13px;
  background: #ddd4cb;
}

.trip-card-media,
.gallery-card-media,
.city-card-media {
  aspect-ratio: 1.18;
}

.trip-card-media img,
.gallery-card-media img,
.city-card-media img,
.trip-hero-media img,
.city-page-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trip-card-copy,
.gallery-card-copy,
.city-card-copy {
  display: grid;
  gap: 8px;
  padding: 20px 22px 22px;
}

.gallery-card--editorial .gallery-card-button {
  display: grid;
  gap: 18px;
}

.gallery-card-heading-row {
  display: grid;
  gap: 8px;
}

.gallery-card-heading-row h3 {
  margin: 0;
  font-size: clamp(1.15rem, 1.9vw, 1.55rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 400;
}

.gallery-card-photo-count {
  color: rgba(43, 36, 40, 0.5);
  font-size: 0.92rem;
}

.gallery-card--editorial .gallery-card-copy {
  gap: 0;
  padding: 0;
}

.gallery-card--editorial .gallery-card-media {
  border-radius: 18px;
  border: 1px solid rgba(41, 34, 38, 0.08);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 44px rgba(162, 150, 158, 0.16);
}

.gallery-card--editorial .gallery-card-media img,
.gallery-card--editorial .trip-card-placeholder {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
  display: block;
}

.trip-card-copy h3,
.gallery-card-copy h3,
.city-card-copy h3 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.trip-card-kicker {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: rgba(43, 36, 40, 0.56);
}

.trip-card-copy p,
.gallery-card-copy p,
.city-card-copy p {
  margin: 0;
  line-height: 1.65;
}

.trip-card-meta,
.trip-stats {
  gap: 8px;
}

.trip-card-meta span,
.trip-stats span,
.soft-chip,
.city-card-note {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 6px 18px rgba(120, 126, 145, 0.08);
  color: var(--muted);
  font-size: 0.84rem;
}

.soft-chip {
  background: var(--rose-soft);
  color: var(--rose);
}

.city-story-stack {
  display: grid;
  gap: 26px;
}

.city-story-section {
  display: grid;
  gap: 18px;
  padding: 0 0 10px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.city-story-section.is-muted {
  opacity: 0.72;
}

.city-story-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(241, 200, 214, 0.7);
}

.city-story-copy {
  display: grid;
  gap: 0;
}

.city-story-title-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

.city-story-copy h3 {
  margin: 0;
  font-size: clamp(2.3rem, 3.5vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 400;
}

.city-story-copy p:last-child {
  margin: 0;
  max-width: 64ch;
  color: rgba(43, 36, 40, 0.58);
  line-height: 1.58;
}

.city-story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.city-story-title-row span,
.city-story-meta span {
  color: rgba(43, 36, 40, 0.5);
  font-size: 0.92rem;
}

.city-carousel-shell {
  position: relative;
}

.city-carousel-shell--single {
  align-items: stretch;
}

.city-carousel-shell--static {
  display: block;
}

.carousel-button {
  border-radius: 8px;
  border: 1px solid rgba(27, 20, 25, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: #2f272c;
  padding: 14px 18px;
  transition: transform 180ms ease, background 180ms ease;
}

.carousel-button-group {
  display: grid;
  grid-auto-flow: column;
  gap: 10px;
}

.carousel-button-group--overlay {
  position: absolute;
  inset: auto 18px 26px 18px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}

.carousel-button-group--overlay .carousel-button {
  pointer-events: auto;
  box-shadow: 0 14px 28px rgba(36, 24, 32, 0.12);
}

.carousel-button.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.carousel-button:hover {
  transform: translateY(-1px);
  background: white;
}

.city-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (28px * 3)) / 4);
  gap: 28px;
  overflow-x: auto;
  padding: 8px 0 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.city-carousel--static {
  grid-auto-flow: row;
  grid-auto-columns: unset;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: visible;
  padding: 8px 0 10px;
}

.city-carousel::-webkit-scrollbar {
  height: 10px;
}

.city-carousel::-webkit-scrollbar-thumb {
  background: rgba(193, 84, 125, 0.2);
  border-radius: 12px;
}

.trip-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 220px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  background:
    radial-gradient(circle at 25% 20%, rgba(193, 84, 125, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(255, 251, 252, 0.96), rgba(242, 239, 233, 0.95));
}

.trip-hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.9fr);
  align-items: stretch;
}

.trip-hero-copy,
.city-page-copy {
  display: grid;
  gap: 18px;
}

.trip-hero-media,
.city-page-media {
  min-height: 340px;
}

.overview-layout {
  grid-template-columns: 1fr;
}

.overview-layout--editorial,
.section-block--editorial {
  gap: 0;
}

.map-panel {
  display: grid;
  gap: 20px;
}

.map-panel-heading {
  display: grid;
  gap: 18px;
}

.map-panel-heading-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.home-map-panel .map-panel-heading-top {
  justify-content: space-between;
  align-items: baseline;
  gap: 32px;
}

.home-map-panel .map-panel-trip-info {
  flex: 1 1 auto;
  min-width: 0;
  margin-right: 18px;
  color: rgba(38, 31, 48, 0.84);
  font-size: 0.98rem;
  line-height: 1.4;
}

.map-panel-copy {
  display: grid;
  gap: 8px;
}

.map-panel-heading h1 {
  margin: 0;
  font-size: clamp(2.2rem, 3.6vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 400;
}

.map-panel-subhead {
  margin: 0;
  color: #e58cab;
  letter-spacing: 0.12em;
  font-size: 0.96rem;
  font-weight: 500;
  text-transform: uppercase;
}

.map-panel-trip-info {
  margin: 0;
  color: rgba(43, 36, 40, 0.66);
  font-size: 1rem;
  line-height: 1.65;
}

.map-panel-heading-top .trip-stats {
  justify-content: flex-end;
  flex-shrink: 0;
}

.trip-stats--inline span {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(54, 43, 70, 0.5);
  font-size: 0.84rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.map-panel--full .trip-map-frame,
.map-panel--full #trip-overview-map,
.map-panel--full #home-country-map {
  min-height: 640px;
}

.home-map-panel {
  padding-top: 0;
  gap: 14px;
}

.trip-map-frame {
  overflow: hidden;
  min-height: 420px;
  position: relative;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(41, 34, 38, 0.08);
  box-shadow:
    0 20px 70px rgba(164, 151, 158, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

#trip-overview-map,
#home-country-map {
  min-height: 420px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.home-map-stats {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(27, 20, 25, 0.06);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.home-map-stats span {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(42, 35, 41, 0.72);
  font-size: 0.8rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#trip-overview-map .leaflet-container,
#home-country-map .leaflet-container {
  background: #edf1f3;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  position: relative;
}

#trip-overview-map .leaflet-tile-pane,
#home-country-map .leaflet-tile-pane {
  filter: none;
}

.map-marker-label {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(25, 22, 26, 0.06);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(157, 147, 154, 0.14);
  color: #4f4d57;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.map-marker-label::before {
  display: none;
}

.map-marker-label .leaflet-tooltip-content {
  margin: 0;
  padding: 7px 11px;
  white-space: nowrap;
  display: grid;
  gap: 2px;
}

.map-marker-label-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: #3e3840;
}

.map-marker-label-subhead {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(78, 77, 87, 0.62);
}

.map-count-marker-shell,
.map-photo-marker-shell {
  background: transparent;
  border: 0;
}

.map-count-marker,
.map-photo-marker {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  box-shadow:
    0 12px 24px rgba(204, 130, 157, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.map-count-marker {
  background: linear-gradient(180deg, color-mix(in srgb, var(--marker-fill) 72%, white), var(--marker-fill));
  color: white;
  font-size: 1.12rem;
  font-weight: 600;
}

.map-photo-marker {
  position: relative;
  background-size: cover;
  background-position: center;
  border: 3px solid rgba(233, 153, 182, 0.95);
}

.map-photo-marker--country {
  width: 52px;
  height: 52px;
}

.map-photo-marker-count {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(238, 143, 177, 0.96);
  border: 2px solid rgba(255, 255, 255, 0.96);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(130, 90, 106, 0.24);
}

.home-archive .trip-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.home-archive .trip-card-button {
  display: grid;
  gap: 16px;
}

.home-archive .trip-card-media {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(64, 48, 84, 0.08);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 44px rgba(96, 83, 120, 0.1);
}

.home-archive .trip-card-media img,
.home-archive .trip-card-placeholder {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
  display: block;
}

.home-archive .trip-card-copy {
  gap: 4px;
  padding: 0;
}

.trip-card-media-meta {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  justify-items: end;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(27, 20, 25, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(95, 85, 104, 0.08);
}

.trip-card-media-meta span {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  color: rgba(54, 43, 70, 0.74);
  font-size: 0.76rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: right;
}

.home-archive .trip-card-copy h3 {
  font-size: clamp(1.2rem, 1.75vw, 1.45rem);
  font-weight: 400;
  line-height: 1.05;
}

.home-archive .trip-card-kicker {
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(54, 43, 70, 0.5);
  margin-top: 2px;
}

.home-archive .trip-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  color: rgba(74, 57, 98, 0.38);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 6px;
}

.home-archive .trip-card-meta span {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.home-country-marker {
  border-color: rgba(92, 69, 129, 0.92);
  box-shadow:
    0 14px 28px rgba(90, 70, 118, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.home-country-marker-count {
  background: rgba(93, 70, 129, 0.96);
  box-shadow: 0 8px 20px rgba(83, 64, 110, 0.28);
}

.home-country-count-marker {
  --marker-fill: #5f4684;
  box-shadow:
    0 12px 24px rgba(96, 73, 132, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.city-card {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.city-card.is-muted {
  opacity: 0.74;
}

.city-card-copy {
  gap: 14px;
}

.city-page-hero {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  align-items: stretch;
}

.city-page-hero--editorial {
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 20px 50px rgba(162, 150, 158, 0.12);
}

.studio-hero {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.85fr);
}

.upload-options {
  display: grid;
  gap: 18px;
}

.upload-panel {
  display: grid;
  align-content: center;
  gap: 12px;
  border-style: dashed;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.upload-panel:hover,
.upload-panel.is-dragging {
  transform: translateY(-2px);
  border-color: rgba(180, 71, 100, 0.34);
  background: var(--panel-strong);
}

.upload-panel--secondary {
  cursor: pointer;
}

.upload-panel input {
  display: none;
}

.upload-kicker {
  color: var(--rose);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
}

.upload-title {
  font-size: 2rem;
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.upload-copy {
  color: var(--muted);
  line-height: 1.65;
}

.studio-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.field-grid,
.studio-field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.9rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  padding: 14px 16px;
  resize: vertical;
}

.processing-panel {
  background: rgba(247, 243, 235, 0.95);
}

.studio-tip {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.studio-city-panel {
  display: grid;
  gap: 18px;
}

.studio-gallery-stack {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(340px, 420px);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}

.studio-gallery-card {
  display: grid;
  gap: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  padding: 18px;
  min-width: 0;
  scroll-snap-align: start;
}

.studio-gallery-card.is-drop-target {
  border-color: rgba(180, 71, 100, 0.42);
  box-shadow: 0 0 0 2px rgba(180, 71, 100, 0.18);
}

.studio-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.gallery-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.studio-photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}

.gallery-photo-option {
  display: grid;
  gap: 6px;
}

.trip-photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}

.trip-photo-option {
  display: grid;
  gap: 8px;
}

.trip-photo-option-actions {
  display: grid;
  gap: 6px;
}

.draft-photo-chip {
  position: relative;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  text-align: left;
}

.draft-photo-chip.is-selected {
  border-color: var(--rose);
  box-shadow: inset 0 0 0 2px rgba(180, 71, 100, 0.18);
}

.draft-photo-chip.is-cover {
  border-color: rgba(180, 71, 100, 0.42);
  box-shadow:
    inset 0 0 0 2px rgba(180, 71, 100, 0.24),
    0 8px 20px rgba(180, 71, 100, 0.08);
}

.draft-photo-chip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.draft-photo-chip span {
  display: block;
  padding: 8px;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.draft-photo-role-badges {
  position: absolute;
  inset: 8px 8px auto 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.draft-photo-role-badges strong {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #8f3d57;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.draft-cover-button {
  width: 100%;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
}

.draft-photo-chip[draggable="true"] {
  cursor: grab;
}

.draft-photo-chip.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.studio-drag-handle.is-dragging {
  opacity: 0.45;
}

.gallery-photo-option.is-drop-target .draft-photo-chip {
  border-color: rgba(180, 71, 100, 0.42);
  box-shadow: 0 0 0 2px rgba(180, 71, 100, 0.22);
}

.draft-photo-help {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

.draft-cover-button.is-active {
  border-color: rgba(180, 71, 100, 0.32);
  color: #9e4964;
  background: rgba(255, 255, 255, 0.92);
}

.studio-photo-menu {
  position: fixed;
  z-index: 30;
  display: grid;
  gap: 6px;
  width: min(220px, calc(100vw - 24px));
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(28, 18, 24, 0.18);
}

.studio-photo-menu .ghost-button {
  justify-content: flex-start;
  width: 100%;
}

.empty-panel,
.home-sidecard,
.studio-summary {
  display: grid;
  gap: 14px;
}

.section-heading--editorial {
  margin-bottom: 18px;
}

.empty-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 11, 10, 0.84);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 28px));
  margin: 20px auto;
  border-radius: 16px;
  background: rgba(19, 16, 15, 0.96);
  color: rgba(255, 255, 255, 0.9);
  padding: 20px;
  display: grid;
  gap: 18px;
}

.lightbox-dialog.is-immersive {
  width: 100vw;
  height: 100vh;
  margin: 0;
  border-radius: 0;
  padding: 16px;
  gap: 12px;
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.lightbox-header-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lightbox-header h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.lightbox-header p:last-child,
.lightbox-footer p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.55;
}

.lightbox-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 60vh;
}

.lightbox-dialog.is-immersive .lightbox-header,
.lightbox-dialog.is-immersive .lightbox-footer {
  display: none;
}

.lightbox-dialog.is-immersive .lightbox-stage {
  min-height: calc(100vh - 32px);
}

.lightbox-photo {
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox-stage img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.lightbox-nav {
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.lightbox-footer {
  display: grid;
  gap: 12px;
}

.lightbox-strip {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
}

.lightbox-thumb {
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  background: transparent;
}

.lightbox-thumb.is-active {
  border-color: rgba(255, 255, 255, 0.78);
}

.lightbox-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: rgba(252, 253, 255, 0.98);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(104, 119, 148, 0.16);
}

.leaflet-popup-content {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.leaflet-control-zoom a {
  width: 34px;
  height: 34px;
  line-height: 34px;
  background: rgba(255, 255, 255, 0.94);
  color: #66748d;
  border-bottom-color: rgba(101, 115, 143, 0.08);
  box-shadow: 0 8px 20px rgba(105, 123, 154, 0.14);
}

.leaflet-control-zoom a:hover {
  background: white;
  color: #55627d;
}

.leaflet-bar {
  border: 0;
  border-radius: 10px;
  overflow: hidden;
}

@media (max-width: 1120px) {
  .hero-grid,
  .studio-layout,
  .overview-layout,
  .trip-hero,
  .studio-hero,
  .city-page-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1380px);
    padding-top: 12px;
  }

  .app-shell--trip {
    width: 100%;
    padding-top: 0;
  }

  .topbar,
  .section-heading,
  .city-story-header,
  .studio-gallery-header,
  .lightbox-header {
    display: block;
  }

  .nav-switch,
  .section-heading > button,
  .city-story-header > .city-story-meta,
  .studio-gallery-header > .studio-inline-actions,
  .lightbox-header > button {
    margin-top: 12px;
  }

  .topbar--trip {
    padding: 22px 20px 18px;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .story-frame {
    width: min(100% - 20px, 1600px);
  }

  .story-topbar-copy,
  .story-topbar-actions,
  .city-story-title-row,
  .gallery-card-heading-row {
    display: block;
  }

  .story-topbar-copy,
  .story-topbar-actions {
    width: 100%;
  }

  .story-topbar-actions {
    justify-content: flex-start;
  }

  .secondary-button--story,
  .city-story-title-row span,
  .gallery-card-heading-row span {
    margin-top: 10px;
    display: inline-block;
  }

  .panel,
  .trip-card,
  .city-card,
  .gallery-card {
    border-radius: 12px;
  }

  .home-hero,
  .home-sidecard,
  .studio-copy,
  .upload-panel,
  .studio-settings,
  .studio-summary,
  .processing-panel,
  .trip-hero-copy,
  .trip-hero-media,
  .map-panel,
  .city-page-hero,
  .empty-panel,
  .studio-city-panel {
    padding: 22px;
  }

  .field-grid,
  .studio-field-grid,
  .lightbox-stage {
    grid-template-columns: 1fr;
  }

  .studio-gallery-stack {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    overflow-x: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .map-panel-heading {
    gap: 14px;
  }

  .map-panel-heading-top {
    display: grid;
    gap: 12px;
  }

  .home-map-panel .map-panel-trip-info {
    margin-right: 0;
  }

  .home-map-panel .map-panel-heading-top .trip-stats {
    justify-content: flex-end;
  }

  .home-nav {
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .map-panel-heading h1 {
    font-size: clamp(2rem, 10vw, 2.9rem);
    line-height: 0.98;
  }

  .map-panel-trip-info {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .map-panel-heading-top .trip-stats {
    justify-content: flex-start;
  }

  .city-carousel {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 8px 0 0;
    scroll-snap-type: none;
  }

  .city-carousel--static {
    grid-template-columns: 1fr;
    padding: 8px 0 0;
  }

  .carousel-button-group--overlay {
    display: none;
  }

  .carousel-button-group--overlay .carousel-button {
    padding: 12px 15px;
  }

  .trip-hero-media,
  .city-page-media,
  .trip-card-media,
  .gallery-card-media,
  .city-card-media {
    min-height: auto;
  }

  .trip-map-frame,
  #trip-overview-map {
    min-height: 0;
    aspect-ratio: 1 / 1;
  }

  .lightbox-dialog {
    width: min(100% - 12px, 1280px);
    margin: 6px auto;
    border-radius: 11px;
    padding: 14px;
  }

  .lightbox-dialog.is-immersive {
    width: 100vw;
    margin: 0;
    border-radius: 0;
    padding: 10px;
  }

  .lightbox-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .lightbox-stage img {
    max-height: 50vh;
  }
}
