:root {
  --bg: #f8f1e3;
  --bg-alt: #fff9f0;
  --surface: rgba(255, 252, 247, 0.86);
  --surface-strong: #fffaf2;
  --surface-dark: #163745;
  --ink: #17323d;
  --ink-soft: #58707a;
  --line: rgba(23, 50, 61, 0.12);
  --accent: #f06f49;
  --accent-deep: #c84c2b;
  --sea: #1f7f87;
  --sea-soft: #d8eef0;
  --gold: #f6bb52;
  --leaf: #547b58;
  --shadow: 0 28px 70px rgba(17, 34, 42, 0.12);
  --shadow-soft: 0 18px 36px rgba(17, 34, 42, 0.08);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shell: min(1180px, calc(100vw - 32px));
  --display: "Fraunces", serif;
  --body: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(circle at top left, rgba(246, 187, 82, 0.18), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(31, 127, 135, 0.16), transparent 22%),
    linear-gradient(180deg, #fffaf1 0%, #f7efdf 42%, #f5efe6 100%);
}

html.gallery-open,
body.gallery-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 50, 61, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 50, 61, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 24%, transparent 82%);
  opacity: 0.55;
}

img {
  display: block;
  max-width: 100%;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  background: rgba(23, 50, 61, 0.08);
  padding: 0.18rem 0.38rem;
  border-radius: 999px;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(255, 249, 240, 0.72);
  border-bottom: 1px solid rgba(23, 50, 61, 0.08);
}

.header-shell {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 118px;
  height: 84px;
  display: grid;
  place-items: center;
  padding: 6px 10px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(23, 50, 61, 0.08);
  box-shadow: var(--shadow-soft);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

.brand small {
  margin-top: 2px;
  color: var(--ink-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.hero {
  padding: 54px 0 36px;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.map-card,
.country-list-card,
.workflow-card,
.archive-cta,
.project-card,
.place-card,
.archive-card,
.post-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 42px;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -72px;
  bottom: -72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 127, 135, 0.14), transparent 70%);
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.eyebrow-compact {
  margin-bottom: 8px;
}

.hero-copy h1,
.section-heading h1,
.section-heading h2,
.hero-note h2,
.archive-cta h3 {
  margin: 0;
  font-family: var(--display);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.9rem, 6vw, 5.3rem);
}

.hero-lead,
.section-heading p,
.support-copy,
.project-card p,
.workflow-card p,
.archive-cta p,
.hero-note p,
.post-card p,
.archive-card p {
  color: var(--ink-soft);
  line-height: 1.7;
}

.hero-lead {
  max-width: 60ch;
  margin: 22px 0 0;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  color: #fffaf4;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 20px 38px rgba(200, 76, 43, 0.24);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(23, 50, 61, 0.08);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 50, 61, 0.08);
}

.stat-value {
  display: block;
  font-family: var(--display);
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.hero-panel {
  padding: 24px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(17, 52, 63, 0.04), rgba(17, 52, 63, 0.02)),
    var(--surface);
}

.hero-note {
  padding: 18px 18px 24px;
}

.hero-note-label,
.project-kicker,
.place-kicker {
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--sea);
}

.hero-note h2 {
  font-size: clamp(1.85rem, 3vw, 2.5rem);
}

.hero-photo-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 14px;
}

.hero-photo-card {
  min-height: 220px;
  overflow: hidden;
  border-radius: 22px;
  position: relative;
  background: linear-gradient(135deg, #f0c58b, #d5ecee);
}

.hero-photo-card:first-child {
  grid-row: span 2;
  min-height: 460px;
}

.hero-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-card span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 28, 35, 0.56);
  color: #fffaf1;
  font-weight: 700;
}

.section {
  padding: 42px 0 32px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h1 {
  font-size: clamp(2.5rem, 4.4vw, 4.1rem);
}

.section-heading h2 {
  font-size: clamp(2.15rem, 4vw, 3.55rem);
}

.section-heading p {
  margin: 18px 0 0;
}

.section-map {
  padding-top: 26px;
}

.map-shell > .section-heading {
  max-width: 980px;
  margin-bottom: 22px;
}

.map-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}

.map-card,
.country-list-card,
.subregion-card {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.map-card {
  padding: 28px 30px 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(246, 187, 82, 0.16), transparent 22%),
    radial-gradient(circle at 88% 20%, rgba(31, 127, 135, 0.15), transparent 22%),
    linear-gradient(135deg, rgba(255, 251, 244, 0.96), rgba(240, 247, 247, 0.94));
}

.map-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.map-status {
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.map-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.map-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.map-control-button {
  min-width: 46px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(23, 50, 61, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.map-control-reset {
  min-width: 74px;
}

.visited-map {
  min-height: 620px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.68), transparent 22%),
    linear-gradient(180deg, rgba(223, 240, 242, 0.72), rgba(223, 240, 242, 0.42));
}

.visited-map svg {
  width: 100%;
  height: auto;
  display: block;
  touch-action: none;
}

.map-detail-shell {
  margin-top: 18px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 50, 61, 0.08);
}

.map-detail-empty h3,
.map-detail-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 2.4vw, 2.25rem);
  line-height: 1;
}

.map-detail-empty p,
.map-detail-card p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.map-detail-card {
  display: grid;
  gap: 18px;
}

.map-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

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

.map-mini-wrap {
  display: grid;
  gap: 16px;
}

.map-mini {
  min-height: 260px;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 20%, rgba(246, 187, 82, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(223, 240, 242, 0.74), rgba(223, 240, 242, 0.44));
  border: 1px solid rgba(23, 50, 61, 0.08);
}

.map-mini svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-mini-caption {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.map-footer {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.map-country-total {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(23, 50, 61, 0.08);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.map-country-note {
  max-width: 32rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: right;
}

.country-list-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.8rem;
}

.country-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.country-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(23, 50, 61, 0.08);
}

a.country-item {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

a.country-item:hover,
a.country-item:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(31, 127, 135, 0.24);
}

.country-item.is-active {
  background: rgba(216, 238, 240, 0.95);
  border-color: rgba(31, 127, 135, 0.28);
}

.country-item-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.country-item-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.country-flag {
  font-size: 1.5rem;
  line-height: 1;
}

.country-item strong,
.project-card strong,
.place-card h3,
.archive-card h3,
.post-card h3,
.workflow-card h3 {
  display: block;
  margin: 0;
  font-size: 1.08rem;
}

.country-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.country-item-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(23, 50, 61, 0.07);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.country-item-arrow {
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.subregion-heading h3,
.country-story-header h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 2.4vw, 2.35rem);
  line-height: 1;
}

.subregion-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.subregion-pill {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(23, 50, 61, 0.08);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.35;
}

.subregion-pill strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.subregion-pill.is-visited {
  background: rgba(216, 238, 240, 0.9);
  border-color: rgba(31, 127, 135, 0.2);
}

.subregion-pill-status {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: rgba(23, 50, 61, 0.16);
}

.subregion-pill.is-visited .subregion-pill-status {
  background: var(--sea);
}

.country-story-groups {
  display: grid;
  gap: 20px;
}

.country-story-group {
  padding: 24px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.country-story-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.country-story-header p {
  margin: 8px 0 0;
  max-width: 62ch;
  color: var(--ink-soft);
  line-height: 1.65;
}

.country-jump {
  color: var(--accent-deep);
  font-weight: 800;
}

.country-story-posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.country-photo-gallery-note {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(31, 127, 135, 0.16);
  background:
    linear-gradient(180deg, rgba(216, 238, 240, 0.62), rgba(255, 255, 255, 0.94));
}

.country-photo-gallery-note strong {
  display: block;
  color: var(--sea);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.country-photo-gallery-note p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.country-trip-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.country-trip-list-compact {
  grid-template-columns: 1fr;
}

.trip-summary-card {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(23, 50, 61, 0.08);
  background:
    linear-gradient(180deg, rgba(216, 238, 240, 0.62), rgba(255, 255, 255, 0.94));
}

.trip-summary-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.trip-summary-header strong {
  color: var(--ink);
  font-size: 1rem;
}

.trip-summary-date {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.4;
}

.trip-summary-meta,
.trip-summary-places {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.55;
}

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

.workflow-card {
  display: block;
  padding: 24px;
  border-radius: 24px;
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.workflow-link-card:hover,
.workflow-link-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(18, 45, 56, 0.14);
  border-color: rgba(31, 127, 135, 0.18);
}

.workflow-step {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sea-soft);
  color: var(--sea);
  font-weight: 800;
}

.workflow-card h3 {
  margin-top: 18px;
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1.05;
}

.place-groups {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

.place-filter-shell {
  padding: 24px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.place-filter-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.place-filter-shell h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 2.4vw, 2.35rem);
  line-height: 1;
}

.place-filter-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.6;
}

.place-filter-list {
  margin-top: 18px;
  display: block;
}

.place-filter-button {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid rgba(23, 50, 61, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-soft);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.place-filter-button:hover,
.place-filter-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
}

.place-filter-button.is-active {
  background: rgba(216, 238, 240, 0.96);
  border-color: rgba(31, 127, 135, 0.26);
  color: var(--ink);
}

.place-filter-control {
  width: min(100%, 420px);
  display: grid;
  gap: 10px;
}

.place-filter-label {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.place-filter-select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(23, 50, 61, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.place-filter-select:hover,
.place-filter-select:focus-visible {
  border-color: rgba(31, 127, 135, 0.34);
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 127, 135, 0.12);
}

.place-group {
  display: grid;
  gap: 14px;
}

.place-group-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.place-group-header h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 2.2vw, 2.15rem);
}

.place-group-header p {
  margin: 0;
  color: var(--ink-soft);
}

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

.place-card {
  border-radius: 24px;
  overflow: hidden;
}

.place-cover {
  aspect-ratio: 4 / 3;
  position: relative;
  background:
    radial-gradient(circle at 18% 18%, rgba(246, 187, 82, 0.32), transparent 34%),
    linear-gradient(135deg, #e6f1f3, #f7d7b6);
}

.place-cover-button {
  width: 100%;
  padding: 0;
  border: 0;
  appearance: none;
  cursor: zoom-in;
}

.place-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.place-cover-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(15, 28, 35, 0.58);
  color: #fffaf2;
  font-size: 0.84rem;
  font-weight: 700;
}

.place-copy {
  padding: 20px;
}

.place-card h3 {
  margin-top: 4px;
  font-family: var(--display);
  font-size: 1.8rem;
}

.place-meta {
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill,
.folder-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  background: rgba(23, 50, 61, 0.07);
  color: var(--ink-soft);
}

.folder-pill {
  margin-top: 14px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  line-height: 1.45;
  word-break: break-all;
}

a.folder-pill {
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

a.folder-pill:hover,
a.folder-pill:focus-visible {
  transform: translateY(-1px);
  background: rgba(31, 127, 135, 0.12);
  color: var(--ink);
}

.place-summary {
  margin: 12px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.place-photo-strip {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.place-photo-thumb {
  display: block;
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  padding: 0;
  border: 0;
  appearance: none;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(23, 50, 61, 0.08);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.place-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.place-photo-more {
  position: absolute;
  inset: auto 10px 10px auto;
  min-width: 42px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 28, 35, 0.72);
  color: #fffaf1;
  font-size: 0.82rem;
  font-weight: 800;
}

.place-gallery-button {
  margin-top: 16px;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid rgba(31, 127, 135, 0.2);
  border-radius: 16px;
  appearance: none;
  background: rgba(216, 238, 240, 0.72);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.place-gallery-button:hover,
.place-gallery-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  background: rgba(216, 238, 240, 0.96);
}

.place-gallery-note {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.place-action-row {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.gallery-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  overflow-y: auto;
  padding: 24px 16px 40px;
  background: rgba(12, 22, 28, 0.82);
  backdrop-filter: blur(18px);
}

.gallery-dialog {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 250, 242, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 30px 80px rgba(5, 14, 18, 0.32);
}

.gallery-header,
.gallery-browser-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.gallery-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1;
}

.gallery-counter,
.gallery-browser-header p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.gallery-close,
.gallery-nav {
  border: 1px solid rgba(23, 50, 61, 0.12);
  appearance: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.gallery-close:hover,
.gallery-close:focus-visible,
.gallery-nav:hover:not(:disabled),
.gallery-nav:focus-visible:not(:disabled) {
  transform: translateY(-1px);
}

.gallery-close {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
}

.gallery-stage-shell {
  margin-top: 20px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.gallery-nav {
  min-width: 92px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
}

.gallery-nav:disabled {
  opacity: 0.42;
  cursor: default;
  box-shadow: none;
}

.gallery-stage {
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(246, 187, 82, 0.22), transparent 32%),
    linear-gradient(135deg, rgba(230, 241, 243, 0.9), rgba(247, 215, 182, 0.84));
}

.gallery-stage-image {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  background: rgba(12, 22, 28, 0.08);
}

.gallery-caption {
  padding: 14px 18px 16px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.55;
}

.gallery-browser {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.gallery-browser-header strong {
  font-size: 1rem;
}

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

.gallery-thumb {
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  appearance: none;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(23, 50, 61, 0.08);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.gallery-thumb.is-active {
  border-color: var(--accent);
}

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

.place-story-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(23, 50, 61, 0.1);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.place-story-link:hover,
.place-story-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  background: rgba(255, 255, 255, 1);
}

.post-grid,
.archive-grid,
.project-grid {
  display: grid;
  gap: 16px;
}

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

.post-card {
  border-radius: 24px;
  overflow: hidden;
}

.post-card-media {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 22% 18%, rgba(246, 187, 82, 0.3), transparent 30%),
    linear-gradient(135deg, #daeff1, #f5d4bc);
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-copy {
  padding: 20px;
}

.post-date {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--sea);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-card h3,
.archive-card h3 {
  font-family: var(--display);
  font-size: 1.65rem;
  line-height: 1.04;
}

.post-links,
.archive-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.text-link {
  color: var(--accent-deep);
  font-weight: 800;
}

.archive-cta {
  margin-top: 20px;
  padding: 24px 26px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.archive-card {
  padding: 24px;
  border-radius: 26px;
}

.archive-card-header {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.archive-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(246, 187, 82, 0.3), transparent 30%),
    linear-gradient(135deg, #e6f1f3, #f6d9be);
}

.archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.archive-card p {
  margin: 14px 0 0;
}

.archive-card details {
  margin-top: 18px;
  border-radius: 18px;
  background: rgba(23, 50, 61, 0.05);
  border: 1px solid rgba(23, 50, 61, 0.08);
  overflow: hidden;
}

.archive-card summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 800;
}

.archive-card summary::-webkit-details-marker {
  display: none;
}

.archive-card details[open] summary {
  border-bottom: 1px solid rgba(23, 50, 61, 0.08);
}

.archive-body {
  padding: 18px;
  color: var(--ink-soft);
  line-height: 1.78;
  white-space: normal;
}

.archive-body p {
  margin: 0;
}

.archive-body p + p {
  margin-top: 14px;
}

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

.project-card {
  min-height: 240px;
  padding: 24px;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card strong {
  margin-top: 10px;
  font-family: var(--display);
  font-size: 2rem;
  line-height: 0.98;
}

.site-footer {
  padding: 32px 0 54px;
}

.footer-shell {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(23, 50, 61, 0.94), rgba(31, 127, 135, 0.88));
  color: #fff8ef;
  box-shadow: var(--shadow);
}

.footer-shell p {
  margin: 8px 0 0;
  color: rgba(255, 248, 239, 0.78);
}

.archive-page .archive-main {
  padding-top: 18px;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 450ms ease, transform 450ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button {
    transition: none;
  }
}

@media (max-width: 1080px) {
  .hero-shell,
  .subregion-layout,
  .workflow-grid,
  .country-story-posts,
  .country-trip-list,
  .place-grid,
  .post-grid,
  .project-grid,
  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-photo-card:first-child {
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  .header-shell,
  .archive-cta,
  .footer-shell,
  .place-group-header,
  .place-filter-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    gap: 14px;
    justify-content: flex-start;
  }

  .brand-mark {
    width: 92px;
    height: 68px;
    padding: 5px 8px;
    border-radius: 20px;
  }

  .hero-copy,
  .hero-panel,
  .map-card,
  .country-list-card,
  .workflow-card,
  .archive-card,
  .project-card {
    padding-left: 20px;
    padding-right: 20px;
  }

  .stat-grid,
  .hero-photo-grid,
  .subregion-layout,
  .workflow-grid,
  .country-story-posts,
  .country-trip-list,
  .place-grid,
  .post-grid,
  .project-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

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

  .country-story-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .archive-thumb {
    max-width: 148px;
  }

  .place-photo-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-card {
    padding-left: 20px;
    padding-right: 20px;
  }

  .map-toolbar,
  .map-detail-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .visited-map {
    min-height: 400px;
  }

  .hero-copy h1,
  .section-heading h1,
  .section-heading h2 {
    text-wrap: balance;
  }

  .gallery-viewer {
    padding: 12px 10px 24px;
  }

  .gallery-dialog {
    width: calc(100vw - 20px);
    padding: 16px;
  }

  .gallery-header,
  .gallery-browser-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-stage-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-stage {
    grid-column: 1 / -1;
    order: -1;
  }

  .gallery-nav {
    width: 100%;
    min-width: 0;
  }

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