body.account-page {
  background: var(--paper);
  min-height: 100dvh;
  letter-spacing: 0;
  word-spacing: normal;
}

body.account-page h1,
body.account-page h2,
body.account-page h3,
body.account-page p,
body.account-page .ac-profile-stats,
body.account-page .ac-card-meta,
body.account-page .ac-card-host {
  letter-spacing: 0;
  word-spacing: normal;
}

body.account-page .lb-kicker {
  letter-spacing: 0.06em;
  word-spacing: 0.16em;
}

.ac-profile {
  padding: 1.6rem var(--space) 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--forest) 12%, var(--cream)) 0%, var(--paper) 70%);
}

.ac-profile-card {
  display: grid;
  gap: 1.1rem;
  align-items: center;
  padding: 1.25rem 1.2rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: color-mix(in srgb, var(--paper) 88%, white);
  box-shadow: 0 18px 40px rgba(19, 37, 30, 0.08);
}

.ac-profile-avatar,
.ac-photo-preview {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 2rem;
  overflow: hidden;
  flex-shrink: 0;
}

.ac-profile-avatar img,
.ac-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ac-profile-copy h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.2rem;
}

.ac-profile-email {
  color: var(--ink-soft);
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.ac-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.ac-profile-stats strong {
  color: var(--forest-deep);
  font-weight: 600;
}

.ac-stat-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.ac-stat-link:focus-visible {
  color: var(--forest-deep);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  outline: none;
}

@media (hover: hover) and (pointer: fine) {
  .ac-stat-link:hover {
    color: var(--forest-deep);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    outline: none;
  }
}

.ac-people-modal {
  width: min(28rem, calc(100vw - 2rem));
  max-height: min(36rem, calc(100vh - 2rem));
}

.ac-people-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.85rem 0 1.1rem;
  max-height: min(22rem, 50vh);
  overflow: auto;
}

.ac-people-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.35rem;
  border-radius: 0.65rem;
}

@media (hover: hover) and (pointer: fine) {
  .ac-people-row:hover {
    background: color-mix(in srgb, var(--forest-deep) 6%, transparent);
  }
}

.ac-people-avatar {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--forest-deep) 14%, #f4efe6);
  color: var(--forest-deep);
  font-size: 0.78rem;
  font-weight: 650;
  overflow: hidden;
}

.ac-people-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ac-people-meta {
  flex: 1 1 auto;
  min-width: 0;
}

.ac-people-meta a {
  color: var(--forest-deep);
  font-weight: 600;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .ac-people-meta a:hover {
    text-decoration: underline;
    text-underline-offset: 0.12em;
  }
}

.ac-people-empty {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.ac-people-actions {
  flex: 0 0 auto;
}

.ac-people-actions .btn-quiet {
  font-size: 0.82rem;
  padding: 0.35rem 0.7rem;
}

.ac-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.profile-page .ac-profile {
  padding-top: 1.35rem;
}

.profile-page .ac-profile-card {
  border-radius: 1.5rem 1.5rem 1.15rem 1.15rem;
}

.ac-view-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid var(--line);
}

.ac-view-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 500;
  padding: 0.7rem 0.85rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.ac-view-tab .ac-notif-badge {
  margin-left: 0;
  flex-shrink: 0;
}

.ac-view-tab.is-on {
  color: var(--forest-deep);
  border-bottom-color: var(--forest);
}

.ac-atlas-section {
  padding-top: 1.4rem;
}

.atlas-shell {
  --atlas-h: min(72vh, 620px);
  display: grid;
  gap: 1.1rem;
}

.atlas-map-col {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
}

.atlas-map {
  position: relative;
  height: var(--atlas-h);
  min-height: 340px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
  background: var(--forest-deep);
  box-shadow: 0 24px 80px rgba(19, 37, 30, 0.28), 0 0 40px color-mix(in srgb, var(--gold) 12%, transparent);
}

.atlas-world {
  background-color: var(--forest-deep);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--gold-pale) 45%, transparent),
    inset 0 0 0 7px color-mix(in srgb, var(--forest-deep) 70%, black);
}

.atlas-world::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid color-mix(in srgb, var(--gold-pale) 22%, transparent);
  pointer-events: none;
}

.atlas-viewport {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: grab;
}

.atlas-map.is-panning .atlas-viewport {
  cursor: grabbing;
}

.atlas-stage {
  position: absolute;
  inset: 0;
  container-type: size;
  transform-origin: 0 0;
  will-change: transform;
}

.atlas-plane {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100cqw, calc(100cqh * 2));
  height: min(100cqh, calc(100cqw / 2));
  transform: translate(-50%, -50%);
}

.atlas-world,
.atlas-pins {
  position: absolute;
  inset: 0;
}

.atlas-pins {
  pointer-events: none;
}

.atlas-world svg,
.atlas-world-img {
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: contain;
}

.atlas-world .jm-ocean {
  fill: var(--forest-deep);
}

.atlas-world .jm-country {
  fill: color-mix(in srgb, var(--forest) 82%, var(--cream));
  stroke: color-mix(in srgb, var(--gold-pale) 42%, transparent);
  stroke-width: 0.35;
  transition: fill 0.2s ease, stroke 0.2s ease;
  cursor: pointer;
}

.atlas-world .jm-country.is-visited {
  fill: color-mix(in srgb, var(--gold) 58%, var(--forest));
}

@media (hover: hover) and (pointer: fine) {
  .atlas-world .jm-country:hover {
    fill: color-mix(in srgb, var(--forest) 55%, var(--gold-pale));
    stroke: color-mix(in srgb, var(--gold) 75%, var(--cream));
  }

  .atlas-world .jm-country.is-visited:hover {
    fill: var(--gold);
  }
}

.atlas-pin {
  pointer-events: auto;
  position: absolute;
  width: 28px;
  height: 44px;
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
  border: 0;
  background: none;
  padding: 0;
  z-index: 2;
  cursor: pointer;
}

.atlas-pin-pulse {
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  border: 2px solid rgba(196, 85, 48, 0.7);
  animation: atlas-pin-ping 2.2s ease-out infinite;
  pointer-events: none;
}

.atlas-pushpin {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
  transition: transform 0.18s ease;
}

.atlas-pushpin-head {
  position: absolute;
  left: 50%;
  top: 1px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #ffb199 0%, #e25a38 38%, #b33a22 72%, #7a2416 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.55),
    inset 0 -2px 4px rgba(80, 16, 8, 0.35);
}

.atlas-pushpin-eye {
  position: absolute;
  left: 50%;
  top: 5px;
  width: 6px;
  height: 5px;
  margin-left: -5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.atlas-pushpin-needle {
  position: absolute;
  left: 50%;
  top: 17px;
  width: 7px;
  height: 26px;
  margin-left: -3.5px;
  background: linear-gradient(90deg, #9a958a 0%, #e8e4d8 45%, #6f6a60 100%);
  clip-path: polygon(32% 0, 68% 0, 50% 100%);
}

.atlas-pin-label {
  position: absolute;
  left: 26px;
  top: 2px;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--forest-deep) 94%, black);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  color: var(--cream);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(19, 37, 30, 0.4);
}

.atlas-pin:focus-visible,
.atlas-pin.is-hover {
  z-index: 40;
}

.atlas-pin:focus-visible .atlas-pushpin,
.atlas-pin.is-hover .atlas-pushpin {
  transform: translateY(-3px) scale(1.08);
}

.atlas-pin:focus-visible .atlas-pin-label,
.atlas-pin.is-hover .atlas-pin-label {
  opacity: 1;
  visibility: visible;
}

@media (hover: hover) and (pointer: fine) {
  .atlas-pin:hover {
    z-index: 40;
  }

  .atlas-pin:hover .atlas-pushpin {
    transform: translateY(-3px) scale(1.08);
  }

  .atlas-pin:hover .atlas-pin-label {
    opacity: 1;
    visibility: visible;
  }
}

.atlas-tools {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.atlas-tools button {
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--btn-radius);
  border: 1px solid color-mix(in srgb, var(--gold) 32%, transparent);
  background: color-mix(in srgb, var(--forest) 88%, black);
  color: var(--cream);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--btn-ease), color var(--btn-ease);
}

@media (hover: hover) and (pointer: fine) {
  .atlas-tools button:hover {
    border-color: color-mix(in srgb, var(--gold-pale) 70%, transparent);
    color: var(--gold-pale);
  }
}

.atlas-hud {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 4;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--gold-pale) 80%, var(--cream));
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(19, 37, 30, 0.7);
}

.atlas-card {
  position: absolute;
  z-index: 6;
  left: 16px;
  right: 16px;
  bottom: 44px;
  max-width: 360px;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--forest-deep) 94%, black);
  border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
  box-shadow: 0 18px 50px rgba(19, 37, 30, 0.45);
  color: var(--cream);
}

.atlas-card[hidden] {
  display: none;
}

.atlas-card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: none;
  color: color-mix(in srgb, var(--cream) 70%, transparent);
  font-size: 1.2rem;
  cursor: pointer;
}

.atlas-card-kicker,
.atlas-card-date {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-pale);
  margin: 0;
}

.atlas-card h3 {
  margin: 6px 0 8px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--cream);
}

.atlas-card-copy {
  color: color-mix(in srgb, var(--cream) 72%, var(--gold-pale));
  font-size: 0.92rem;
  margin: 0 0 0.85rem;
}

.atlas-card-link {
  color: var(--gold-pale);
  text-decoration: none;
  font-size: 0.9rem;
}

@media (hover: hover) and (pointer: fine) {
  .atlas-card-link:hover {
    color: var(--cream);
  }
}

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

/* Globe Atlas (MapLibre GL JS) — reuses .atlas-map/.atlas-tools/.atlas-card/
   .atlas-pin chrome above; this just hosts the WebGL canvas and mutes the
   library's own control skin to match. */
/* Higher specificity than maplibre-gl.css's own .maplibregl-map rule
   (which sets position:relative and loads after account.css), so the
   viewport still fills .atlas-map via inset:0. */
.atlas-map .atlas-globe-viewport {
  position: absolute;
  inset: 0;
  /* Matches ATLAS_MAP_PALETTE (land/water) in atlas-globe.js — the void
     behind the globe, not the app's usual forest green. */
  background: #050b12;
  cursor: grab;
}

.atlas-globe-viewport:active {
  cursor: grabbing;
}

.atlas-globe-viewport .maplibregl-canvas {
  outline: none;
}

.atlas-globe-viewport .maplibregl-ctrl-attrib {
  background: color-mix(in srgb, var(--forest-deep) 70%, transparent);
  color: color-mix(in srgb, var(--cream) 70%, transparent);
  font-size: 0.62rem;
  border-radius: 6px 0 0 0;
}

.atlas-globe-viewport .maplibregl-ctrl-attrib a {
  color: var(--gold-pale);
}

.atlas-globe-viewport .maplibregl-marker {
  z-index: 2;
}

@keyframes atlas-pin-ping {
  0% {
    transform: scale(0.7);
    opacity: 0.8;
  }
  80%,
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.atlas-passport {
  --pp-page: #f4ead4;
  --pp-leather: #13251e;
  min-width: 0;
  height: var(--atlas-h);
  min-height: 340px;
}

.pp-book {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 0.7rem 0.55rem 1.15rem;
  border-radius: 5px 14px 14px 8px;
  overflow: hidden;
  color: var(--gold-pale);
  background:
    radial-gradient(ellipse at 18% 8%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 42%),
    repeating-linear-gradient(
      90deg,
      transparent 0 2px,
      rgba(0, 0, 0, 0.05) 2px 3px
    ),
    linear-gradient(180deg, #1a3329 0%, var(--pp-leather) 38%, #0e1c17 100%);
  box-shadow:
    8px 14px 28px rgba(19, 37, 30, 0.28),
    inset 0 1px 0 color-mix(in srgb, var(--gold-pale) 18%, transparent),
    inset -10px 0 18px rgba(0, 0, 0, 0.18);
  border: 1px solid color-mix(in srgb, var(--gold) 22%, #0a1612);
}

.pp-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.78rem;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 18px,
      color-mix(in srgb, var(--gold) 28%, transparent) 18px 19px,
      transparent 19px 34px
    ),
    linear-gradient(90deg, #0a1612, #1a3329 55%, #0e1c17);
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.28);
}

.pp-spine::before,
.pp-spine::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 55%, #0a1612);
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold-pale) 25%, transparent);
}

.pp-spine::before {
  top: 1.1rem;
}

.pp-spine::after {
  bottom: 1.1rem;
}

.pp-cover-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  flex-shrink: 0;
  margin: 0.35rem 0.1rem 0.4rem;
  padding: 0.45rem 0.7rem;
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--gold-pale) 42%, transparent);
  box-shadow:
    inset 0 0 0 3px var(--pp-leather),
    inset 0 0 0 4px color-mix(in srgb, var(--gold) 45%, transparent);
}

.pp-cover-copy {
  display: grid;
  gap: 0.1rem;
}

.pp-cover-nation {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.pp-crest {
  width: 2.7rem;
  height: 2.7rem;
  color: var(--gold-pale);
  filter: drop-shadow(0 2px 0 color-mix(in srgb, var(--gold) 35%, transparent));
  flex-shrink: 0;
}

.pp-cover-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.pp-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  border-radius: 2px 8px 8px 3px;
  background: color-mix(in srgb, var(--pp-page) 70%, #c4b48a);
  box-shadow:
    inset 8px 0 14px rgba(19, 37, 30, 0.08),
    inset 0 0 0 1px color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--ink);
}

.pp-leaves {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  perspective: 1600px;
  perspective-origin: 12% 50%;
  transform-style: preserve-3d;
}

.pp-leaf {
  --pp-leaf-paper:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      color-mix(in srgb, var(--ink) 5.5%, transparent) 28px
    ),
    radial-gradient(circle at 80% 120%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 46%),
    repeating-radial-gradient(circle at 50% -10%, transparent 0 12px, color-mix(in srgb, var(--forest) 4%, transparent) 13px 14px),
    var(--pp-page);
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.75rem 0.55rem 0.85rem;
  background: var(--pp-leaf-paper);
  transform-origin: left center;
  transform: rotateY(0deg);
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  backface-visibility: hidden;
  box-shadow: inset 10px 0 16px rgba(19, 37, 30, 0.06);
  transition: transform 0.72s cubic-bezier(0.45, 0.05, 0.2, 1);
}

.pp-leaf::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(19, 37, 30, 0.16),
    transparent 14%,
    rgba(255, 255, 255, 0.18) 46%,
    rgba(19, 37, 30, 0.22)
  );
  opacity: 0;
  z-index: 4;
  transition: opacity 0.45s ease;
}

.pp-leaf.is-on,
.pp-leaf.is-under,
.pp-leaf.is-flip-fwd,
.pp-leaf.is-flip-back {
  visibility: visible;
}

.pp-leaf.is-on {
  z-index: 2;
  pointer-events: auto;
  transform: rotateY(0deg);
}

.pp-leaf.is-under {
  z-index: 1;
  transform: rotateY(0deg);
}

.pp-leaf.is-flip-fwd {
  z-index: 5;
  pointer-events: none;
  transform: rotateY(-180deg);
  box-shadow:
    12px 0 28px rgba(19, 37, 30, 0.28),
    inset 10px 0 16px rgba(19, 37, 30, 0.06);
}

.pp-leaf.is-flip-back {
  z-index: 5;
  pointer-events: none;
  transform: rotateY(-180deg);
  transition: none;
}

.pp-leaf.is-flip-fwd::before,
.pp-leaf.is-flip-back::before {
  opacity: 1;
}

.pp-leaves.is-turning {
  pointer-events: none;
}

.pp-leaves.is-turning .pp-leaf.is-on,
.pp-leaves.is-turning .pp-leaf.is-flip-fwd,
.pp-leaves.is-turning .pp-leaf.is-flip-back {
  will-change: transform;
}

.pp-visa-head {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  flex-shrink: 0;
  margin: 0 0 0.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid color-mix(in srgb, var(--forest) 18%, var(--line));
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--forest-deep);
}

.pp-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.4rem 0.65rem 0.5rem;
  border-top: 1px solid color-mix(in srgb, var(--forest) 16%, var(--line));
  background: color-mix(in srgb, var(--pp-page) 88%, var(--gold-pale));
}

.pp-pager-status {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest-deep);
}

.pp-pager-btn {
  min-width: var(--tap);
  min-height: var(--tap);
  width: var(--tap);
  height: var(--tap);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--forest) 28%, var(--line));
  background: var(--cream);
  color: var(--forest-deep);
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--btn-ease), border-color var(--btn-ease);
}

@media (hover: hover) and (pointer: fine) {
  .pp-pager-btn:hover:not(:disabled) {
    border-color: var(--forest);
    background: color-mix(in srgb, var(--forest) 10%, var(--cream));
  }
}

.pp-pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.pp-stamps {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Empty passport: one page with a hint (same as the app). */
.pp-page-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--forest-deep) 55%, var(--ink-soft));
  pointer-events: none;
}

.pp-stamp {
  --stamp-ink: var(--brick);
  --stamp-turn: -4deg;
  position: absolute;
  left: var(--stamp-x);
  top: var(--stamp-y);
  width: var(--stamp-w);
  height: var(--stamp-h);
  z-index: var(--stamp-z, 1);
  color: var(--stamp-ink);
  text-decoration: none;
  transform: rotate(var(--stamp-turn));
  opacity: 0.92;
}

.pp-stamp:focus-visible {
  opacity: 1;
  z-index: 8;
}

@media (hover: hover) and (pointer: fine) {
  .pp-stamp:hover {
    opacity: 1;
    z-index: 8;
  }
}

.pp-stamp:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 4px;
}

.pp-stamp--round:focus-visible {
  border-radius: 50%;
}

.pp-stamp--square:focus-visible,
.pp-stamp--rect:focus-visible {
  border-radius: 0.35rem;
}

.pp-stamp-ring {
  position: absolute;
  inset: 0;
  border: 2.5px solid currentColor;
  box-shadow:
    inset 0 0 0 5px var(--pp-page),
    inset 0 0 0 7px currentColor;
  opacity: 0.92;
}

.pp-stamp--round .pp-stamp-ring,
.pp-stamp--round .pp-stamp-ring::after {
  border-radius: 50%;
}

.pp-stamp--square .pp-stamp-ring,
.pp-stamp--rect .pp-stamp-ring {
  border-radius: 0.32rem;
}

.pp-stamp-ring::after {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1.5px dashed currentColor;
  opacity: 0.7;
}

.pp-stamp--square .pp-stamp-ring::after {
  inset: 7px;
  border-radius: 0.18rem;
}

.pp-stamp--rect .pp-stamp-ring::after {
  inset: 6px 8px;
  border-radius: 0.16rem;
}

.pp-stamp-face {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.1rem;
  padding: 0.7rem 0.55rem 0.55rem;
  text-align: center;
}

.pp-stamp--rect .pp-stamp-face {
  padding: 0.45rem 0.65rem 0.4rem;
  gap: 0.06rem;
}

.pp-stamp-brand {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 600;
}

.pp-stamp--rect .pp-stamp-brand {
  font-size: 0.6rem;
  letter-spacing: 0.06em;
}

.pp-lakbi {
  width: 1.7rem;
  height: 1.7rem;
  display: block;
}

.pp-stamp--rect .pp-lakbi {
  width: 1.25rem;
  height: 1.25rem;
}

.pp-stamp-face strong {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  max-width: 92%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pp-stamp--rect .pp-stamp-face strong {
  font-size: 0.8rem;
}

.pp-stamp-country {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  max-width: 88%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.9;
}

.pp-stamp-face time {
  font-size: 0.64rem;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.pp-stamp:focus-visible .pp-stamp-ring {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .pp-stamp:hover .pp-stamp-ring {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pp-leaf,
  .pp-leaf::before {
    transition: none;
  }
}

@media (min-width: 56rem) {
  .atlas-shell {
    grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.88fr);
    grid-template-rows: minmax(340px, var(--atlas-h)) auto;
    column-gap: 1.1rem;
    row-gap: 0.7rem;
    align-items: stretch;
  }

  .atlas-map-col {
    display: contents;
  }

  .atlas-map {
    grid-column: 1;
    grid-row: 1;
    height: 100%;
    min-height: 0;
    min-width: 0;
  }

  .atlas-legend {
    grid-column: 1;
    grid-row: 2;
  }

  .atlas-passport {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
    min-height: 0;
    position: sticky;
    top: 1rem;
  }
}

.ac-section {
  padding: 1.8rem var(--space) 2.4rem;
}

.ac-section-paper {
  background: var(--cream);
  border-block: 1px solid var(--line);
}

.ac-section-head {
  margin-bottom: 1.1rem;
}

.ac-section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.ac-section-head p {
  color: var(--ink-soft);
  margin-top: 0.25rem;
}

.ac-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.75rem), 1fr));
  align-items: stretch;
}

.ac-section > .ac-see-more {
  max-width: 22rem;
}

.ac-grid > .lb-dest-card {
  width: 100%;
  flex: none;
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 0;
}

.ac-grid > .lb-dest-card-rich {
  aspect-ratio: auto;
  height: auto;
}

.ac-grid .lb-dest-skel {
  width: 100%;
  flex: none;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
}

.ac-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.05rem 1.05rem 1.1rem;
}

.ac-card-with-cover {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: 100%;
  min-height: 0;
  padding: 0.55rem;
  border-radius: 1.25rem;
  overflow: hidden;
  background: color-mix(in srgb, var(--paper) 92%, white);
  box-shadow: 0 10px 28px rgba(19, 37, 30, 0.07);
}

.ac-card-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
}

.ac-card-faces {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  z-index: 2;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.ac-face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  margin-left: -0.4rem;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--cream) 70%, var(--forest));
  background: color-mix(in srgb, var(--gold-pale) 82%, var(--forest-deep));
  color: var(--forest-deep);
  font-size: 0.68rem;
  font-weight: 700;
  overflow: hidden;
}

.ac-face:first-child {
  margin-left: 0;
}

.ac-face.has-photo {
  padding: 0;
  background: var(--forest-deep);
}

.ac-face.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ac-face.is-more {
  background: color-mix(in srgb, var(--forest-deep) 72%, var(--gold-pale));
  color: var(--cream);
}

.ac-section-paper .ac-card {
  background: color-mix(in srgb, var(--paper) 92%, white);
}

.ac-cover.lb-dest-card {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  box-shadow: none;
}

.ac-cover.lb-dest-card-rich {
  display: flex;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
}

.ac-cover .lb-dest-meta {
  padding: 0.55rem 0.7rem 0.6rem;
}

.ac-cover .lb-dest-copy strong {
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
}

.ac-cover .lb-dest-copy strong em {
  font-style: italic;
  font-weight: 300;
  color: color-mix(in srgb, var(--cream) 78%, var(--gold-pale));
}

.ac-cover-fallback {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  min-height: 0;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--forest);
  color: var(--cream);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.ac-card-cover-wrap > .ac-cover,
.ac-card-cover-wrap > .ac-cover-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  flex: none;
}

.ac-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.15rem 0.35rem 0.4rem;
}

.ac-card-host {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: color-mix(in srgb, var(--gold) 70%, var(--forest-deep));
}

.ac-card-meta {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.ac-card-meta-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  min-height: calc(1.35em * 3);
}

.ac-card-places {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.35em * 2);
  overflow-wrap: break-word;
}

.ac-card-period {
  display: block;
  min-height: 1.35em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-role-tags {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.65rem;
  overflow: hidden;
}

.ac-role-tag {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  max-width: 7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--forest) 28%, var(--line));
  background: color-mix(in srgb, var(--forest) 8%, var(--cream));
  color: var(--forest-deep);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-role-tag-more {
  flex: 0 0 auto;
  max-width: none;
  background: color-mix(in srgb, var(--gold-pale) 35%, var(--cream));
  border-color: color-mix(in srgb, var(--gold) 40%, var(--line));
}

.ac-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.ac-card-actions .btn-solid,
.ac-card-actions .btn-quiet {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  min-width: 5.5rem;
}

.ac-card-actions a.btn-solid,
.ac-card-actions a.btn-quiet {
  text-decoration: none;
}

.ac-empty {
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--cream) 70%, var(--paper));
  border: 1px dashed var(--line);
  padding: 1.1rem 1rem;
}

.ac-empty-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 2.4rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: color-mix(in srgb, var(--cream) 55%, var(--paper));
}

.ac-empty-soft {
  background: color-mix(in srgb, var(--paper) 80%, white);
}

.ac-empty-icon {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--forest) 12%, var(--cream));
  font-size: 1.45rem;
  margin-bottom: 0.35rem;
}

.ac-empty-hero .lakbi-state-face,
.pv-unavailable .lakbi-state-face {
  width: min(8.5rem, 42vw);
  height: auto;
  object-fit: contain;
  margin-bottom: 0.2rem;
}

.ac-empty-hero h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0;
}

.ac-empty-hero p {
  max-width: 28rem;
  color: var(--ink-soft);
  margin: 0 0 0.55rem;
}

.ac-subsection {
  margin-top: 2.4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.ac-subsection .ac-section-head {
  margin-bottom: 1rem;
}

.ac-subsection .ac-section-head h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
}

.ac-copy-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 1.25rem;
}

.ac-copy-head .lb-see-more {
  flex-shrink: 0;
}

.ac-copy-row {
  display: flex;
  align-items: stretch;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0.1rem 0.85rem;
  margin-inline: -0.15rem;
}

.ac-copy-row > .ac-card-with-cover {
  flex: 0 0 min(17.5rem, 78vw);
  scroll-snap-align: start;
  max-width: 17.5rem;
  height: auto;
  align-self: stretch;
}

.ac-copy-row > .ac-empty {
  flex: 1 1 auto;
}

.ac-settings-stack {
  display: grid;
  gap: 0.85rem;
  max-width: 46rem;
}

.ac-panel {
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--paper);
  overflow: hidden;
}

.ac-panel > summary,
.ac-panel-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  cursor: pointer;
  list-style: none;
}

.ac-panel > summary::-webkit-details-marker {
  display: none;
}

.ac-panel > summary strong,
.ac-panel-heading strong {
  display: block;
  font-weight: 600;
}

.ac-panel > summary small,
.ac-panel-heading small {
  display: block;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

.ac-notif-badge {
  margin-left: 0;
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--forest);
  color: var(--cream);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1;
}

.ac-invite-inbox {
  margin: 0 0 1.1rem;
  padding: 0 0 1.1rem;
  border-bottom: 1px solid var(--line);
}

.ac-panel-static .ac-invite-inbox {
  border-bottom: 1px solid var(--line);
}

.ac-invite-inbox-head {
  margin: 0 0 0.75rem;
}

.ac-invite-inbox-head strong {
  display: block;
  font-weight: 600;
}

.ac-invite-inbox-head small {
  display: block;
  margin-top: 0.15rem;
  color: var(--ink-soft);
}

.ac-invite-list {
  display: grid;
  gap: 0.75rem;
}

.ac-activity-list {
  display: grid;
  gap: 0.55rem;
}

.ac-see-more {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--cream) 55%, var(--paper));
  color: inherit;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}

.ac-see-more:disabled {
  opacity: 0.55;
  cursor: default;
}

.ac-see-more[hidden] {
  display: none;
}

.ac-activity-row {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--cream) 55%, var(--paper));
}

.ac-activity-row.is-unread {
  border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
  box-shadow: inset 3px 0 0 var(--gold);
}

.ac-activity-row p {
  margin: 0;
  line-height: 1.45;
  font-size: 0.95rem;
}

.ac-activity-row a {
  color: inherit;
}

.ac-invite-row {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--cream) 55%, var(--paper));
}

.ac-invite-copy p {
  margin: 0;
  line-height: 1.45;
}

.ac-invite-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.ac-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (min-width: 40rem) {
  .ac-invite-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.ac-panel-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--forest) 14%, var(--cream));
  flex-shrink: 0;
}

.ac-panel-body {
  display: grid;
  gap: 1rem;
  padding: 0 1.05rem 1.15rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.ac-panel-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.4;
}

.ac-panel-static .ac-panel-heading {
  cursor: default;
}

.ac-field {
  display: grid;
  gap: 0.35rem;
}

.ac-field > span,
.ac-chip-set legend {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.ac-field input,
.ac-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--cream);
  color: var(--ink);
  font: inherit;
  padding: 0.7rem 0.8rem;
}

.ac-field textarea {
  resize: vertical;
  min-height: 6.5rem;
}

.ac-photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.ac-photo-preview {
  width: 4.5rem;
  height: 4.5rem;
  font-size: 1.5rem;
}

.ac-photo-actions {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
}

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

.ac-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.ac-switch:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.ac-switch strong {
  display: block;
  font-weight: 550;
}

.ac-switch small {
  display: block;
  color: var(--ink-soft);
  margin-top: 0.12rem;
  font-size: 0.84rem;
}

.ac-switch input {
  width: 2.7rem;
  height: 1.55rem;
  appearance: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 18%, var(--cream));
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  border: 0;
}

.ac-switch input::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: white;
  transition: transform 0.16s ease;
  box-shadow: 0 1px 4px rgba(19, 37, 30, 0.22);
}

.ac-switch input:checked {
  background: var(--forest);
}

.ac-switch input:checked::after {
  transform: translateX(1.15rem);
}

.ac-switch input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ac-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ac-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.42rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.ac-chip.is-on {
  background: color-mix(in srgb, var(--forest) 14%, var(--cream));
  border-color: color-mix(in srgb, var(--forest) 40%, var(--line));
  color: var(--forest-deep);
  font-weight: 500;
}

.ac-chip-set {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.ac-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.ac-toast {
  color: var(--forest-deep);
  font-size: 0.88rem;
  font-weight: 500;
}

.ac-actions-body {
  gap: 1.15rem;
}

.ac-legal-block {
  display: grid;
  gap: 0.35rem;
}

.ac-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin: 0;
  font-size: 0.92rem;
}

.ac-legal-links a {
  color: var(--forest-deep);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--forest) 35%, transparent);
  text-underline-offset: 0.18em;
}

@media (hover: hover) and (pointer: fine) {
  .ac-legal-links a:hover {
    color: var(--brick);
    text-decoration-color: color-mix(in srgb, var(--brick) 55%, transparent);
  }
}

.ac-legal-links span {
  color: var(--ink-soft);
}

.ac-actions-divider {
  height: 1px;
  background: color-mix(in srgb, var(--line) 85%, transparent);
  margin: 0.1rem 0;
}

.ac-actions-buttons {
  display: grid;
  gap: 0.75rem;
  justify-items: stretch;
}

.ac-btn-wide {
  width: 100%;
  justify-content: center;
}

.ac-delete-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--brick) 82%, var(--ink));
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  padding: 0.35rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brick) 35%, transparent);
  text-underline-offset: 0.18em;
}

@media (hover: hover) and (pointer: fine) {
  .ac-delete-link:hover {
    color: var(--brick);
    text-decoration-color: var(--brick);
  }
}

@media (min-width: 40rem) {
  .ac-profile-card {
    grid-template-columns: auto 1fr auto;
  }

  .ac-profile-actions {
    justify-content: end;
  }
}

/* mobile layout pass */
@media (max-width: 39.99rem) {
  .ac-view-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .ac-view-tab {
    flex: 0 0 auto;
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .ac-profile-card {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 0.85rem;
  }

  .ac-profile-actions {
    width: 100%;
  }

  .ac-profile-actions .btn-solid,
  .ac-profile-actions .btn-quiet,
  .pv-profile-actions .pv-action {
    flex: 1 1 auto;
  }

  .ac-profile-stats {
    gap: 0.45rem 0.85rem;
    font-size: 0.88rem;
  }

  .ac-copy-head {
    flex-direction: column;
    align-items: stretch;
  }

  .ac-copy-head .lb-see-more {
    align-self: flex-start;
  }

  .ac-copy-row > .ac-card-with-cover {
    flex-basis: min(16.5rem, 82vw);
    max-width: min(16.5rem, 82vw);
  }

  .ac-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  }

  .atlas-shell {
    --atlas-h: min(52vh, 420px);
  }

  .atlas-map,
  .atlas-passport {
    min-height: 16rem;
  }

  .ac-settings-stack,
  .ac-panel-body {
    max-width: none;
  }

  .ac-chip-set .ac-chips {
    gap: 0.35rem;
  }
}

.ac-depart-soon {
  padding: 1.15rem var(--space) 0;
}

.ac-depart-soon-scroller,
.depart-soon-scroller {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.15rem;
}

.ac-depart-soon-card {
  flex: 0 0 min(100%, 22.5rem);
  scroll-snap-align: start;
  padding: 0.9rem 1rem 0.95rem;
  border: 1px solid var(--gold);
  border-radius: 1.05rem;
  background: var(--forest-deep);
  color: var(--cream);
  box-shadow: 0 14px 28px rgba(19, 37, 30, 0.16);
}

.ac-depart-soon-card.is-now {
  border-color: var(--gold);
}

.ac-depart-soon-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 1.55rem;
}

.ac-depart-soon-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--gold-pale);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.ac-depart-soon-kicker svg {
  flex-shrink: 0;
}

.ac-depart-soon-badge {
  flex-shrink: 0;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--forest-deep);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

.ac-depart-soon-badge.is-live {
  flex: 0 0 13rem;
  width: 13rem;
  max-width: 62%;
  overflow: hidden;
  white-space: nowrap;
}

.ac-depart-soon-badge.is-marquee,
[data-marquee].is-marquee {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}

.marquee-item {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ac-depart-soon-card h3 {
  margin: 0.55rem 0 0.2rem;
  font-family: var(--serif);
  font-weight: 550;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: #f7f1e6;
}

.ac-depart-soon-meta {
  margin: 0 0 0.8rem;
  color: color-mix(in srgb, #f7f1e6 68%, transparent);
  font-size: 0.82rem;
}

.ac-depart-soon-actions {
  display: flex;
  gap: 0.5rem;
}

.ac-depart-soon-actions a {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.ac-depart-soon-open {
  background: var(--gold);
  color: var(--forest-deep);
  border: 1px solid var(--gold);
}

.ac-depart-soon-open:hover {
  background: var(--gold-pale);
}

.ac-depart-soon-check {
  background: transparent;
  color: #f7f1e6;
  border: 1px solid color-mix(in srgb, #f7f1e6 28%, transparent);
}

.ac-depart-soon-check:hover {
  border-color: color-mix(in srgb, #f7f1e6 52%, transparent);
}

/* Activity: "Your trip recap is ready!" — a highlighted card with a button. */
.ac-activity-row.ac-activity-recap {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem 1rem 1.05rem;
  border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
  background: linear-gradient(135deg, #fff8e6, #fbebc8);
  color: #2a1d12;
}

.ac-recap-ico {
  flex: 0 0 auto;
  font-size: 1.9rem;
  line-height: 1;
}

.ac-recap-copy {
  display: grid;
  gap: 0.4rem;
}

.ac-activity-row .ac-recap-title {
  font-weight: 700;
  font-size: 1.02rem;
}

.ac-activity-row .ac-recap-body {
  font-size: 0.92rem;
}

.ac-activity-row a.ac-recap-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  margin-top: 0.15rem;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--ink, #1a1410);
  color: var(--cream, #fffaf1);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

/* ——— My trips: All · Drafts · Upcoming · Past · Shared (shared/trip-journal.js) ——— */
.ac-journal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  margin: 0 0 1.25rem;
  border-bottom: 1px solid var(--line, rgba(26, 20, 16, 0.12));
}

.ac-journal-tab {
  appearance: none;
  min-height: 2.75rem;
  margin-bottom: -1px;
  padding: 0 0.1rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--ink-soft, #4a3f36);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.ac-journal-tab i {
  margin-left: 0.3rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--forest, #1e3a2f) 9%, transparent);
  font-size: 0.72rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.ac-journal-tab[aria-selected="true"] {
  border-bottom-color: var(--forest, #1e3a2f);
  color: var(--forest, #1e3a2f);
  font-weight: 600;
}

.ac-journal-tab:focus-visible {
  outline: 2px solid var(--gold, #b0893a);
  outline-offset: 3px;
}

/* ——— My trips journal (same design as the app's Trips tab) ——— */
.acj {
  --acj-paper: #f7f5ef;
  --acj-card: #fffdf8;
  --acj-ink: #233c33;
  --acj-muted: #6f756c;
  --acj-line: #e1e3d8;
  --acj-green: #244e3b;
  --acj-live: #2f7d57;
  --acj-display: "Playfair Display", "Fraunces", Georgia, serif;
  --acj-body: "DM Sans", "Outfit", system-ui, sans-serif;
  display: grid;
  gap: 1.4rem;
  color: var(--acj-ink);
  font-family: var(--acj-body);
}

.acj-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acj-muted);
}

.acj-title {
  margin: 0.45rem 0 0.4rem;
  font: 400 clamp(1.8rem, 3.2vw, 2.6rem) / 1.12 var(--acj-display);
  letter-spacing: -0.02em;
  color: var(--acj-ink);
  text-wrap: balance;
}

.acj-lede {
  margin: 0;
  color: var(--acj-muted);
  font-size: 0.9rem;
}

.acj-hero {
  display: grid;
  gap: 1.6rem;
}

.acj-hero:empty {
  display: none;
}

.acj-block {
  display: grid;
  gap: 0.8rem;
}

.acj-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.acj-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font: 400 1.55rem var(--acj-display);
  color: var(--acj-ink);
}

.acj-head small {
  color: var(--acj-muted);
  font-size: 0.78rem;
}

.acj-live-dot,
.acj-pulse {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--acj-live);
  animation: acj-ring 2s ease-out infinite;
}

.acj-pulse {
  width: 0.45rem;
  height: 0.45rem;
  background: #8fe0b3;
}

@keyframes acj-ring {
  0% { box-shadow: 0 0 0 0 rgba(47, 125, 87, 0.45); }
  70% { box-shadow: 0 0 0 0.45rem rgba(47, 125, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 125, 87, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .acj-live-dot,
  .acj-pulse {
    animation: none;
  }
}

/* Cards (Happening now, Your next chapter) */
.acj-live {
  display: grid;
  gap: 1rem;
}

.acj-live.is-multi {
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}

.acj-card {
  overflow: hidden;
  border: 1px solid var(--acj-line);
  border-radius: 0.9rem;
  background: var(--acj-card);
}

.acj-cover,
.acj-row-cover {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--cover-forest, #1e3a2f), var(--cover-deep, #13251e));
}

.acj-cover {
  height: 12rem;
}

.acj-cover.is-tall {
  height: clamp(13rem, 22vw, 16rem);
}

/* The frame sets the size; the photo fills it (never stretches the card). */
.acj-cover img,
.acj-row-cover img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Wide screens: Happening now and Your next chapter side by side, each a
   photo-top card (several live trips take the full row, two per line). */
@media (min-width: 64rem) {
  .acj-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    column-gap: 1.5rem;
  }
  .acj-hero > .acj-block:only-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.75rem);
  }
  .acj-hero > .acj-block.is-live:has(.acj-live.is-multi) {
    grid-column: 1 / -1;
  }
  .acj-live.is-multi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .acj-hero .acj-cover {
    height: clamp(13rem, 22vw, 16rem);
  }
  /* Side by side: one photo height for both shared cards, and equal card heights. */
  .acj-hero:has(> .acj-block + .acj-block) {
    align-items: stretch;
  }
  .acj-hero > .acj-block {
    display: flex;
    flex-direction: column;
  }
  .acj-hero > .acj-block > .tc-card,
  .acj-hero .acj-live:not(.is-multi),
  .acj-hero .acj-live:not(.is-multi) > .tc-card {
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  .acj-hero .tc-card .tc-cover {
    height: clamp(13rem, 22vw, 16rem);
    aspect-ratio: auto;
  }
}

.acj-chip {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.3rem;
  background: var(--acj-card);
  color: var(--acj-green);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.acj-chip.is-live {
  background: var(--acj-green);
  color: #fff;
}

.acj-chip.is-soon {
  background: #f4e6c3;
  color: #6d5325;
}

.acj-place {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  max-width: calc(100% - 1.6rem);
  overflow: hidden;
  padding: 0.3rem 0.55rem;
  border-radius: 0.25rem;
  background: rgba(247, 245, 239, 0.92);
  color: var(--acj-ink);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acj-card-body {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: 1.1rem 1.2rem 1rem;
}

.acj-card-title {
  margin: 0;
  font: 400 1.75rem / 1.15 var(--acj-display);
  letter-spacing: -0.01em;
  color: var(--acj-ink);
}

.acj-card-title a,
.acj-row-title a {
  color: inherit;
  text-decoration: none;
}

.acj-card-title em,
.acj-row-title em {
  font-style: italic;
  color: #8a7a4a;
}

.acj-card.is-next .acj-card-title {
  font-size: 1.95rem;
}

.acj-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.acj-go {
  font-size: 1.35rem;
  line-height: 1;
  color: #87946d;
}

.acj-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.6rem;
  margin: 0;
  color: var(--acj-muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.acj-moment {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d7e5d9;
  border-radius: 0.65rem;
  background: #eef4ee;
  font-size: 0.88rem;
}

.acj-moment small {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--acj-live);
}

.acj-moment-sub {
  color: var(--acj-muted);
  font-size: 0.8rem;
}

.acj-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--acj-line);
}

.acj-crew {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.acj-crew-line {
  color: var(--acj-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.acj .ac-card-faces {
  position: static;
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.acj .ac-face {
  border-color: var(--acj-card);
  background: #e6e2cf;
  color: var(--acj-green);
}

.acj-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.8rem;
}

.acj-link,
.acj-pill,
.acj-quiet {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  border: 0;
  background: none;
  color: var(--acj-green);
  font: 600 0.84rem var(--acj-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.acj-pill {
  padding: 0 0.85rem;
  border: 1px solid var(--acj-line);
  border-radius: 999px;
  background: var(--acj-paper);
}

.acj-quiet {
  color: var(--acj-muted);
  font-weight: 500;
}

.acj-quiet:hover,
.acj-link:hover {
  text-decoration: underline;
}

/* Live strip (other tabs) */
.acj-strip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 2.9rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 0.65rem;
  background: var(--acj-green);
  color: #fff;
  font: 500 0.88rem var(--acj-body);
  text-align: left;
  cursor: pointer;
}

.acj-strip > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acj-strip-go {
  margin-left: auto;
  font-weight: 600;
}

/* Rows */
.acj-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
  gap: 0.9rem;
}

.acj-row {
  display: flex;
  min-height: 8.2rem;
  overflow: hidden;
  border: 1px solid var(--acj-line);
  border-radius: 0.8rem;
  background: var(--acj-card);
}

.acj-row-cover-link {
  display: block;
  flex: 0 0 7.5rem;
}

.acj-row-cover {
  height: 100%;
  min-height: 100%;
}

.acj-row.is-next .acj-row-cover {
  flex: 0 0 7.5rem;
}

.acj-row-info {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 0.28rem;
  min-width: 0;
  padding: 0.9rem 1rem;
}

.acj-where {
  overflow: hidden;
  color: var(--acj-muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acj-row-title {
  margin: 0;
  font: 400 1.32rem / 1.2 var(--acj-display);
  color: var(--acj-ink);
}

.acj-row-when {
  margin: 0;
  color: var(--acj-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.acj-row-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem 0.6rem;
  margin-top: 0.4rem;
}

.acj-row-foot .acj-link,
.acj-row-foot .acj-quiet {
  min-height: 2.25rem;
  font-size: 0.8rem;
}

.acj-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.acj-status {
  padding: 0.22rem 0.5rem;
  border-radius: 0.25rem;
  background: #eaeee4;
  color: #56704f;
  font-size: 0.72rem;
  white-space: nowrap;
}

.acj-status.is-draft { background: #f3ead7; color: #86692f; }
.acj-status.is-soon { background: #e7eef2; color: #3f6072; }
.acj-status.is-live { background: #e0efe5; color: var(--acj-live); font-weight: 600; }
.acj-status.is-shared { background: #efe8f2; color: #6b4f7a; }
.acj-status.is-public { border: 1px solid var(--acj-line); background: transparent; color: var(--acj-muted); }

/* Wider than a phone: trips are cards, photo on top (the compact next-chapter row stays a row). */
@media (min-width: 40rem) {
  .acj-list {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
    gap: 1.25rem;
  }
  .acj-row:not(.is-next) {
    flex-direction: column;
    min-height: 0;
  }
  .acj-row:not(.is-next) .acj-row-cover-link {
    flex: 0 0 9.5rem;
  }
  .acj-row:not(.is-next) .acj-row-info {
    gap: 0.35rem;
    padding: 1.05rem 1.15rem 0.85rem;
  }
  .acj-row:not(.is-next) .acj-row-title {
    font-size: 1.4rem;
  }
  .acj-row:not(.is-next) .acj-row-foot {
    margin-top: 0.75rem;
  }
}

.acj-empty {
  margin: 0;
  padding: 2rem 0.5rem;
  color: var(--acj-muted);
  text-align: center;
}

.acj-foot {
  margin: 0.4rem 0 0;
  color: #8b9086;
  font: italic 400 1rem var(--acj-display);
  text-align: center;
}

.acj :focus-visible {
  outline: 3px solid #b18c47;
  outline-offset: 3px;
}

@media (max-width: 36rem) {
  .ac-journal-tabs {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.4rem;
  }
  .ac-journal-tab {
    font-size: 0.82rem;
    white-space: nowrap;
  }
  .ac-journal-tab i {
    margin-left: 0.15rem;
    padding: 0.02rem 0.32rem;
  }
  .acj-card-title,
  .acj-card.is-next .acj-card-title {
    font-size: 1.55rem;
  }
  .acj-row-cover-link,
  .acj-row.is-next .acj-row-cover {
    flex-basis: 6.2rem;
  }
  .acj-card-foot {
    flex-wrap: wrap;
  }
}

/* My trips list: photo-top cards in a grid (3 across on wide screens), like the journal mock */
.acj-list:has(> .acj-tc.is-list) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.25rem;
  align-items: start;
}
.acj-tc.is-list .tc-cover { aspect-ratio: 16 / 9; }
.acj-tc.is-list .tc-body { gap: 0.35rem; padding: 1rem 1.15rem 1.05rem; }
.acj-tc.is-list .tc-title { font-size: 1.35rem; }
.acj-tc.is-list .tc-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.acj-tc.is-list .tc-foot-left { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* Happening now on top, Your next chapter under it — stacked, full width (not side by side). */
@media (min-width: 64rem) {
  .acj-hero { grid-template-columns: minmax(0, 1fr); row-gap: 1.75rem; }
  .acj-hero > .acj-block:only-child { max-width: none; }
  .acj-hero:has(> .acj-block + .acj-block) { align-items: start; }
  .acj-hero .tc-card .tc-cover { height: clamp(14rem, 24vw, 20rem); }
}

/* Wide screens: each stacked hero card is a split — photo on the left, the story on the right,
   so a full-width banner never leaves a long empty strip of text under a huge photo. */
@media (min-width: 64rem) {
  .acj-hero > .acj-block > .tc-card,
  .acj-hero .acj-live:not(.is-multi) > .tc-card {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 1fr);
    min-height: 19rem;
  }
  .acj-hero > .acj-block > .tc-card .tc-cover,
  .acj-hero .acj-live:not(.is-multi) > .tc-card .tc-cover {
    height: auto;
    min-height: 100%;
    aspect-ratio: auto;
  }
  .acj-hero > .acj-block > .tc-card .tc-body,
  .acj-hero .acj-live:not(.is-multi) > .tc-card .tc-body {
    justify-content: center;
    gap: 0.45rem;
    padding: 1.6rem 1.9rem;
  }
  .acj-hero > .acj-block > .tc-card .tc-title,
  .acj-hero .acj-live:not(.is-multi) > .tc-card .tc-title {
    font-size: clamp(1.75rem, 2.4vw, 2.4rem);
  }
  .acj-hero > .acj-block > .tc-card .tc-story,
  .acj-hero .acj-live:not(.is-multi) > .tc-card .tc-story {
    font-size: 0.95rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .acj-hero > .acj-block > .tc-card .tc-foot,
  .acj-hero .acj-live:not(.is-multi) > .tc-card .tc-foot {
    margin-top: auto;
  }
}
@media (min-width: 100rem) {
  .acj-hero > .acj-block > .tc-card,
  .acj-hero .acj-live:not(.is-multi) > .tc-card {
    grid-template-columns: minmax(0, 1.6fr) minmax(24rem, 1fr);
    min-height: 22rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   Account · Notifications / Atlas / Settings — workbook look (web)
   Everything is scoped to .acx (those three sections only), so My trips,
   profile.html's Atlas and the rest of the site are untouched.
   ═══════════════════════════════════════════════════════════════════ */
.acx {
  --acx-paper: #fbf6ec;
  --acx-card: #fffdf8;
  --acx-ink: #1f3d30;
  --acx-text: #2b3a33;
  --acx-muted: #6f756c;
  --acx-line: #ebe3d2;
  --acx-forest: #1f3d30;
  --acx-forest-2: #2d5a45;
  --acx-gold: #b8892f;
  --acx-gold-pale: #f2cf7e;
  --acx-danger: #b3402a;
  --acx-display: "Playfair Display", "Fraunces", Georgia, serif;
  --acx-body: "DM Sans", "Outfit", system-ui, sans-serif;
  --acx-shadow: 0 1px 2px rgba(31, 61, 48, 0.05), 0 14px 34px rgba(31, 61, 48, 0.08);
  box-sizing: border-box;
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding: 1.6rem 1rem 3rem;
  display: grid;
  gap: 1.4rem;
  color: var(--acx-text);
  font-family: var(--acx-body);
}

.acx *,
.acx *::before,
.acx *::after {
  box-sizing: border-box;
}

@media (min-width: 40rem) {
  .acx {
    padding: 2rem var(--space) 3.5rem;
  }
}

.acx-intro {
  display: grid;
  gap: 0.4rem;
  max-width: 44rem;
}

.acx-kicker,
.acx-group,
.acx-tip-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acx-muted);
}

body.account-page .acx .acx-title {
  margin: 0;
  font: 400 clamp(1.8rem, 3.2vw, 2.6rem) / 1.12 var(--acx-display);
  letter-spacing: -0.02em;
  color: var(--acx-ink);
  text-wrap: balance;
}

.acx-lede {
  margin: 0;
  color: var(--acx-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.acx-card {
  min-width: 0;
  background: var(--acx-card);
  border: 1px solid var(--acx-line);
  border-radius: 20px;
  box-shadow: var(--acx-shadow);
  padding: 1.1rem;
}

@media (min-width: 40rem) {
  .acx-card {
    padding: 1.4rem 1.5rem;
  }
}

.acx-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.acx-card-headcopy strong,
.acx .acx-card-title {
  display: block;
  margin: 0;
  font: 500 1.2rem / 1.2 var(--acx-display);
  color: var(--acx-ink);
}

.acx-card-headcopy small {
  display: block;
  margin-top: 0.2rem;
  color: var(--acx-muted);
  font-size: 0.85rem;
}

/* Rounded-square icon tiles */
.acx-tile {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  background: #e4eee7;
  color: var(--acx-forest-2);
}

.acx-tile svg {
  width: 1.25rem;
  height: 1.25rem;
}

.acx-tile--forest { background: #e4eee7; color: #2d5a45; }
.acx-tile--gold { background: #fbefd2; color: #9a6f1f; }
.acx-tile--rose { background: #fbe5df; color: #b44a2a; }
.acx-tile--sky { background: #e3edf4; color: #3d6f8e; }
.acx-tile--slate { background: #ecebe5; color: #5b5f58; }
.acx-tile--sand { background: #f3ead8; color: #8a6a3a; }
.acx-tile--danger { background: #fbe3dd; color: var(--acx-danger); }

.acx-group {
  margin: 0.4rem 0 0.1rem;
}

/* Buttons inside these sections: forest pills */
.acx .btn-solid,
.acx .btn-quiet {
  min-height: 2.6rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-family: var(--acx-body);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.acx .btn-solid {
  background: var(--acx-forest);
  border-color: var(--acx-forest);
  color: #fffdf8;
}

.acx .btn-quiet {
  background: #fff;
  border-color: var(--acx-line);
  color: var(--acx-ink);
}

@media (hover: hover) and (pointer: fine) {
  .acx .btn-solid:hover {
    background: var(--acx-forest-2);
    border-color: var(--acx-forest-2);
    color: #fffdf8;
  }
  .acx .btn-quiet:hover {
    background: #f4efe3;
    border-color: #ddd3bd;
    color: var(--acx-ink);
  }
}

.acx .btn-solid:focus-visible,
.acx .btn-quiet:focus-visible,
.acx .acx-row:focus-visible,
.acx .acx-place:focus-visible,
.acx .acx-pill:focus-visible {
  outline: 2px solid var(--acx-gold);
  outline-offset: 2px;
}

.acx .ac-toast {
  color: var(--acx-forest-2);
  font-size: 0.85rem;
}

/* ——— Notifications ——— */
.acx-notif-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  min-width: 0;
}

@media (min-width: 62rem) {
  .acx-notif-layout {
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 23rem);
    gap: 1.5rem;
  }
  .acx-prefs-card {
    position: sticky;
    top: 5.5rem;
  }
}

.acx-inbox-card {
  display: grid;
  gap: 0.2rem;
}

.acx .acx-block {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.acx .acx-block .acx-group {
  margin: 1.15rem 0 0.55rem;
}

.acx .ac-invite-inbox.is-empty .acx-group {
  margin-bottom: 0.4rem;
}

.acx .ac-invite-list,
.acx .ac-activity-list {
  display: grid;
  gap: 0.35rem;
}

.acx .ac-activity-list > .acx-group {
  margin: 1.15rem 0 0.35rem;
}

.acx .ac-empty {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px dashed #e3d9c4;
  border-radius: 14px;
  background: #fbf7ee;
  color: var(--acx-muted);
  font-size: 0.9rem;
}

.acx .acx-invite-empty {
  padding: 0.6rem 0.9rem;
  font-size: 0.86rem;
}

/* A notification row */
.acx .acx-note,
.acx .acx-invite {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  color: var(--acx-text);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .acx .acx-note:hover {
    background: #faf5ea;
  }
}

.acx .acx-note.is-unread {
  background: #fdf7e8;
  border-color: #f3e3bd;
  box-shadow: none;
}

.acx .acx-note.ac-activity-recap {
  display: grid;
  color: var(--acx-text);
}

.acx .acx-note--recap {
  background: linear-gradient(135deg, #fff9ea, #fcefd2);
  border-color: #f0dcae;
}

.acx-note-ico {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.acx-note-ico svg {
  width: 1.2rem;
  height: 1.2rem;
}

.acx-ico--follow { background: #e3edf4; color: #3d6f8e; }
.acx-ico--like { background: #fbe5df; color: #c0563b; }
.acx-ico--joined,
.acx-ico--started { background: #e4eee7; color: #2d5a45; }
.acx-ico--declined { background: #ecebe5; color: #6b6f67; }
.acx-ico--tomorrow,
.acx-ico--invite { background: #fbefd2; color: #9a6f1f; }
.acx-ico--recap { background: #1f3d30; color: #f2cf7e; }

.acx-note-copy,
.acx .ac-invite-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.acx .acx-note-title {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--acx-ink);
}

.acx .acx-note-text,
.acx .ac-invite-copy p:not(.acx-note-title) {
  margin: 0;
  color: var(--acx-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.acx .acx-note-text strong,
.acx .ac-invite-copy strong {
  color: var(--acx-text);
  font-weight: 600;
}

.acx .acx-note-text a,
.acx .ac-invite-copy a {
  color: var(--acx-ink);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .acx .acx-note-text a:hover {
    text-decoration: underline;
    text-underline-offset: 0.15em;
  }
}

.acx-note-side {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
  padding-top: 0.15rem;
}

.acx-note-time {
  color: var(--acx-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.acx-note-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--acx-gold);
  box-shadow: 0 0 0 3px #f7e7c0;
}

.acx .acx-pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  margin-top: 0.45rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  background: #e9f1ec;
  color: var(--acx-forest);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.acx .acx-pill--gold {
  background: var(--acx-forest);
  color: var(--acx-gold-pale);
}

@media (hover: hover) and (pointer: fine) {
  .acx .acx-pill:hover { background: #dce9e1; }
  .acx .acx-pill--gold:hover { background: var(--acx-forest-2); }
}

/* Collaborator invite row */
.acx .acx-invite {
  background: #fdf7e8;
  border-color: #f3e3bd;
}

.acx .ac-invite-roles {
  margin-top: 0.35rem;
}

.acx .ac-invite-actions {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.acx .ac-invite-actions .btn-solid,
.acx .ac-invite-actions .btn-quiet {
  min-height: 2.25rem;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
}

@media (min-width: 40rem) {
  .acx .acx-invite {
    align-items: center;
  }
  .acx .ac-invite-actions {
    grid-column: auto;
  }
}

.acx .acx-more {
  width: auto;
  justify-self: center;
  margin: 0.75rem auto 0;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--acx-line);
  border-radius: 999px;
  background: #fff;
  color: var(--acx-ink);
  font-size: 0.84rem;
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .acx .acx-more:hover:not(:disabled) { background: #f4efe3; }
}

/* Empty inbox */
.acx-empty {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 1.6rem 1rem 1.4rem;
  text-align: center;
}

.acx-empty img {
  width: 5.25rem;
  height: auto;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 10px 16px rgba(31, 61, 48, 0.14));
}

.acx .acx-empty-title {
  margin: 0;
  font: 500 1.15rem var(--acx-display);
  color: var(--acx-ink);
}

.acx .acx-empty-text {
  margin: 0;
  max-width: 22rem;
  color: var(--acx-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Preferences card + switches */
.acx-prefs-card {
  display: grid;
  gap: 0.9rem;
}

.acx-switches {
  display: grid;
  border: 1px solid var(--acx-line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.acx .ac-switch {
  gap: 0.9rem;
  padding: 0.8rem 0.95rem;
  border-top: 1px solid var(--acx-line);
  cursor: pointer;
}

.acx .acx-switches .ac-switch:first-child {
  border-top: 0;
  padding-top: 0.8rem;
}

.acx .acx-switch-master {
  background: #f4f8f5;
}

.acx .ac-switch strong {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--acx-ink);
}

.acx .ac-switch small {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--acx-muted);
}

.acx .ac-switch input:checked {
  background: var(--acx-forest-2);
}

.acx .ac-switch input:focus-visible {
  outline: 2px solid var(--acx-gold);
  outline-offset: 2px;
}

.acx .ac-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

/* ——— Atlas ——— */
.acx.ac-atlas-section {
  max-width: 96rem;
}

.acx .atlas-shell {
  --atlas-h: clamp(360px, 62vh, 640px);
  gap: 1.25rem;
}

.acx .atlas-map {
  border-radius: 22px;
  border: 1px solid rgba(242, 207, 126, 0.22);
  background: #050b12;
  box-shadow:
    0 30px 70px rgba(8, 20, 30, 0.35),
    0 0 0 6px rgba(255, 253, 248, 0.6),
    0 0 60px rgba(84, 150, 200, 0.14);
}

.acx .atlas-map .atlas-globe-viewport {
  background:
    radial-gradient(circle at 50% 50%, rgba(92, 170, 220, 0.28) 0%, rgba(40, 90, 140, 0.16) 26%, transparent 48%),
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1px 1px at 78% 12%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 64%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1px 1px at 24% 82%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1px 1px at 58% 90%, rgba(255, 255, 255, 0.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 6% 52%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 40% 8%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 94% 36%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(ellipse at 50% 120%, #10263a 0%, transparent 60%),
    linear-gradient(180deg, #07111c 0%, #0a1826 55%, #050b12 100%);
}

.acx .atlas-tools {
  top: 16px;
  right: 16px;
  gap: 8px;
}

.acx .atlas-tools button {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  color: #fffdf8;
  font-size: 1.1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

@media (hover: hover) and (pointer: fine) {
  .acx .atlas-tools button:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(242, 207, 126, 0.6);
    color: var(--acx-gold-pale);
  }
}

.acx .atlas-hud {
  left: 16px;
  bottom: 16px;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--acx-gold-pale);
  text-shadow: none;
}

.acx .atlas-globe-viewport .maplibregl-ctrl-attrib {
  margin: 10px 0 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: rgba(255, 253, 248, 0.78);
}

.acx .atlas-card {
  border-radius: 18px;
  background: rgba(10, 24, 36, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(242, 207, 126, 0.3);
}

.acx .atlas-passport {
  filter: drop-shadow(0 18px 30px rgba(31, 61, 48, 0.18));
}

/* Trail notes + LakBi tip under the globe */
.acx-atlas-notes {
  display: grid;
  gap: 1.1rem;
  align-items: start;
  min-width: 0;
}

.acx-atlas-notes:empty {
  display: none;
}

@media (min-width: 56rem) {
  .acx-atlas-notes {
    grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 1fr);
    gap: 1.25rem;
  }
}

.acx-trail {
  display: grid;
  gap: 1.1rem;
}

.acx-trail-head {
  display: grid;
  gap: 0.3rem;
}

.acx .acx-trail-quip {
  margin: 0;
  color: var(--acx-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.acx-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.acx-stat {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  padding: 0.8rem 0.3rem 0.7rem;
  border-radius: 16px;
  background: #fbf7ee;
  border: 1px solid #f0e8d6;
  text-align: center;
  min-width: 0;
}

.acx-stat-ico {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin-bottom: 0.15rem;
}

.acx-stat-ico svg {
  width: 1.05rem;
  height: 1.05rem;
}

.acx-stat strong {
  font: 500 clamp(1.45rem, 3vw, 1.9rem) / 1 var(--acx-display);
  font-variant-numeric: lining-nums tabular-nums;
}

.acx-stat > span:last-child {
  color: var(--acx-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.acx-stat--pins .acx-stat-ico { background: #fbe5df; color: #c0563b; }
.acx-stat--pins strong { color: #c0563b; }
.acx-stat--countries .acx-stat-ico { background: #e4eee7; color: #2d5a45; }
.acx-stat--countries strong { color: #2d5a45; }
.acx-stat--cities .acx-stat-ico { background: #fbefd2; color: #9a6f1f; }
.acx-stat--cities strong { color: #b8892f; }
.acx-stat--trips .acx-stat-ico { background: #e3edf4; color: #3d6f8e; }
.acx-stat--trips strong { color: #3d6f8e; }

.acx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.acx .acx-place {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.38rem 0.8rem 0.38rem 0.55rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--acx-line);
  color: var(--acx-ink);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.acx .acx-place span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acx .acx-place svg {
  flex: 0 0 auto;
  width: 0.95rem;
  height: 0.95rem;
  color: #c0563b;
}

@media (hover: hover) and (pointer: fine) {
  .acx .acx-place:hover {
    background: #fbf7ee;
    border-color: #dccfb2;
  }
}

.acx .acx-trail-empty {
  margin: 0;
  padding: 0.8rem 1rem;
  border: 1px dashed #e3d9c4;
  border-radius: 14px;
  color: var(--acx-muted);
  font-size: 0.88rem;
}

.acx-tip {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #1f3d30 0%, #2d5a45 100%);
  color: #f6efe0;
  box-shadow: var(--acx-shadow);
}

.acx-tip-face {
  flex: 0 0 auto;
  width: 4.25rem;
  height: 4.25rem;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.25));
}

.acx .acx-tip-kicker {
  color: var(--acx-gold-pale);
}

.acx .acx-tip-text {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 253, 248, 0.9);
}

/* ——— Settings ——— */
.acx-set-grid {
  display: grid;
  gap: 1.1rem;
  align-items: start;
  min-width: 0;
}

.acx-set-col {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

@media (min-width: 62rem) {
  .acx-set-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 1.5rem;
  }
}

.acx .acx-set-card {
  min-width: 0;
  border: 1px solid var(--acx-line);
  border-radius: 20px;
  background: var(--acx-card);
  box-shadow: var(--acx-shadow);
  overflow: hidden;
}

.acx .acx-row {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.05rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--acx-text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  list-style: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.acx .acx-row::-webkit-details-marker {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .acx .acx-row:hover {
    background: #faf5ea;
  }
}

.acx-row-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.acx .acx-row-copy strong {
  display: block;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--acx-ink);
}

.acx .acx-row-copy small {
  display: block;
  margin: 0;
  color: var(--acx-muted);
  font-size: 0.83rem;
  line-height: 1.4;
}

.acx .acx-row-copy small:empty {
  display: none;
}

.acx-chev {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #9a9f95;
  transition: transform 0.2s ease, background-color 0.15s ease, color 0.15s ease;
}

.acx-chev svg {
  width: 1.1rem;
  height: 1.1rem;
}

.acx details[open] > .acx-row .acx-chev {
  transform: rotate(180deg);
  background: #eef4ef;
  color: var(--acx-forest-2);
}

.acx details[open] > .acx-row {
  border-bottom: 1px solid var(--acx-line);
}

.acx-set-links .acx-row + .acx-row {
  border-top: 1px solid var(--acx-line);
}

.acx .acx-row--danger .acx-row-copy strong {
  color: var(--acx-danger);
}

@media (hover: hover) and (pointer: fine) {
  .acx .acx-row--danger:hover {
    background: #fdf1ee;
  }
}

/* Forms inside settings cards */
.acx .ac-panel-body {
  display: grid;
  gap: 1.05rem;
  padding: 1.1rem 1.05rem 1.25rem;
  border-top: 0;
}

@media (min-width: 40rem) {
  .acx .ac-panel-body {
    padding: 1.2rem 1.35rem 1.4rem;
  }
}

.acx .ac-panel-note {
  color: var(--acx-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.acx .ac-field > span,
.acx .ac-chip-set legend {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--acx-text);
}

.acx .ac-chip-set legend {
  margin-bottom: 0.45rem;
}

.acx .ac-field input,
.acx .ac-field textarea {
  border: 1px solid #e0d8c6;
  border-radius: 12px;
  background: #fff;
  color: var(--acx-text);
  padding: 0.7rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.acx .ac-field input:focus,
.acx .ac-field textarea:focus {
  outline: none;
  border-color: var(--acx-forest-2);
  box-shadow: 0 0 0 3px rgba(45, 90, 69, 0.16);
}

.acx .ac-photo-preview {
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--acx-line);
}

.acx .ac-chip {
  border: 1px solid #e0d8c6;
  background: #fff;
  color: var(--acx-text);
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.acx .ac-chip.is-on {
  background: #e4eee7;
  border-color: #9cbca9;
  color: var(--acx-forest);
  font-weight: 600;
}

.acx .ac-panel-body > .ac-switch {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--acx-line);
  border-radius: 14px;
  background: #fff;
}

.acx .ac-people-list {
  max-height: min(20rem, 50vh);
  margin: 0;
  padding: 0.25rem;
  border: 1px solid var(--acx-line);
  border-radius: 14px;
  background: #fff;
}

.acx .ac-legal-links a {
  color: var(--acx-forest-2);
}

@media (max-width: 24rem) {
  .acx .acx-row {
    gap: 0.7rem;
    padding: 0.85rem;
  }
  .acx-tile {
    width: 2.35rem;
    height: 2.35rem;
  }
  .acx .acx-note,
  .acx .acx-invite {
    gap: 0.65rem;
    padding: 0.75rem 0.7rem;
  }
  .acx-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .acx *,
  .acx *::before,
  .acx *::after {
    transition: none !important;
  }
}

/* Invite context line and invited-but-not-joined faces (UAT). */
.ac-invite-context {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.4;
}
.ac-face.is-pending {
  opacity: 0.55;
  border-style: dashed;
}
/* Invites waiting, shown on My trips (UAT Sheshe #6). */
.ac-trips-invites {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0 0 0.8rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--gold-pale) 60%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold-pale) 22%, var(--paper));
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}
.ac-trips-invites b {
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}

/* My trips grid: every card in a row is the same size — the foot sits at the bottom
   (tc-foot margin-top:auto) and long titles clamp to two lines. */
.acj-list:has(> .acj-tc.is-list) {
  align-items: stretch;
}
.acj-tc.is-list {
  height: 100%;
}
.acj-tc.is-list .tc-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
/* One card size across rows too: footer pills stay on one line (… when long). */
.acj-list:has(> .acj-tc.is-list) {
  grid-auto-rows: 1fr;
}
.acj-tc.is-list .tc-foot-left {
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}
.acj-tc.is-list .tc-foot-left > * {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════════════════════
   Account page (account.html only — profile.html has .profile-page):
   one centred content column for the header and every view (My trips,
   Notifications, Atlas, Settings), so nothing stretches edge to edge on
   wide screens. Full-bleed section bands keep their backgrounds; only
   their content is centred. The header reuses the public profile's
   .pfh card (css/profile-view.css).
   ═══════════════════════════════════════════════════════════════════ */
body.account-page:not(.profile-page) {
  --ac-max: 69rem;
  --ac-gutter: max(clamp(1rem, 3vw, 2.5rem), calc((100% - var(--ac-max)) / 2));
}
body.account-page:not(.profile-page) .ac-head,
body.account-page:not(.profile-page) main > .ac-view > .ac-section:not(.acx) {
  padding-inline: var(--ac-gutter);
}
body.account-page:not(.profile-page) main > .ac-view > .acx,
body.account-page:not(.profile-page) main > .ac-view > .acx.ac-atlas-section {
  max-width: none;
  padding-inline: var(--ac-gutter);
}

/* ——— Header: the profile card, adapted for your own page ——— */
.ac-head {
  padding-top: 1.5rem;
}
.ac-pfh {
  animation: ac-pfh-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes ac-pfh-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ac-pfh {
    animation: none;
  }
}
.ac-pfh .pfh-line {
  overflow-wrap: anywhere;
}
.ac-pfh .pfh-line:empty {
  display: none;
}
@media (max-width: 30rem) {
  .ac-pfh .pfh-actions .pfh-btn {
    flex: 1 1 8rem;
  }
}

/* ——— My trips: hero + grid inside the column ——— */
/* Your next chapter / Happening now: a balanced split (≈56 / 44) with a capped
   height; "Open itinerary" becomes a real button beside the crew. */
@media (min-width: 52rem) {
  body.account-page:not(.profile-page) .acj-hero > .acj-block > .tc-card,
  body.account-page:not(.profile-page) .acj-hero .acj-live:not(.is-multi) > .tc-card {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
    min-height: 18rem;
    max-height: 24rem;
  }
  body.account-page:not(.profile-page) .acj-hero > .acj-block > .tc-card .tc-cover,
  body.account-page:not(.profile-page) .acj-hero .acj-live:not(.is-multi) > .tc-card .tc-cover {
    height: auto;
    min-height: 100%;
    aspect-ratio: auto;
  }
  body.account-page:not(.profile-page) .acj-hero > .acj-block > .tc-card .tc-body,
  body.account-page:not(.profile-page) .acj-hero .acj-live:not(.is-multi) > .tc-card .tc-body {
    justify-content: flex-start;
    gap: 0.5rem;
    min-width: 0;
    padding: 1.5rem 1.6rem 1.4rem;
    overflow: hidden;
  }
  body.account-page:not(.profile-page) .acj-hero > .acj-block > .tc-card .tc-title,
  body.account-page:not(.profile-page) .acj-hero .acj-live:not(.is-multi) > .tc-card .tc-title {
    font-size: clamp(1.55rem, 2.3vw, 2rem);
    line-height: 1.12;
  }
}
body.account-page:not(.profile-page) .acj-hero .tc-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-top: 0.9rem;
}
body.account-page:not(.profile-page) .acj-hero .tc-foot-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
body.account-page:not(.profile-page) .acj-hero .tc-foot-right > .tc-link:last-child {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: #1f3d30;
  color: #fbf6ec;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
body.account-page:not(.profile-page) .acj-hero .tc-foot-right > .tc-link:last-child:focus-visible {
  outline: 2px solid #b8892f;
  outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
  body.account-page:not(.profile-page) .acj-hero .tc-foot-right > .tc-link:last-child:hover {
    background: #2d5a45;
    color: #fbf6ec;
  }
}

/* My trips as a travel story: profile-style sections (.pf-section / .pf-head /
   .pf-grid from css/profile-view.css), 3 cards across in the column, 2 on
   tablets, 1 on phones. Cards in a row share one height. */
.acj-list:has(> .pf-section),
.acj-list:has(> .pf-grid),
.acj-list:has(> .pf-empty) {
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}
.acj-grid {
  align-items: stretch;
  grid-auto-rows: 1fr;
}
.acj-story .pf-head {
  margin-bottom: 1.1rem;
}
.ac-empty-story .pfh-btn {
  margin-top: 0.6rem;
}

/* Filter row: the profile's pill switch. */
body.account-page:not(.profile-page) .ac-journal-tabs {
  flex-wrap: nowrap;
  gap: 0.25rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 1.75rem;
  padding: 0.3rem;
  overflow-x: auto;
  border: 1px solid #e6dcc8;
  border-radius: 999px;
  background: #fffdf8;
  scrollbar-width: none;
}
body.account-page:not(.profile-page) .ac-journal-tabs::-webkit-scrollbar {
  display: none;
}
body.account-page:not(.profile-page) .ac-journal-tab {
  flex: 0 0 auto;
  min-height: 2.35rem;
  margin: 0;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  color: #66706a;
  font: 600 0.88rem/1 "DM Sans", system-ui, sans-serif;
  white-space: nowrap;
}
body.account-page:not(.profile-page) .ac-journal-tab[aria-selected="true"] {
  background: #1f3d30;
  color: #fbf6ec;
}
body.account-page:not(.profile-page) .ac-journal-tab[aria-selected="true"] i {
  background: rgba(251, 246, 236, 0.18);
  color: #fbf6ec;
}

/* My trips list: compact journal rows (shared/profile-journal.css .pj-list), one column
   holder so the rows lay out 1 / 2 across on their own (261001-banner1). */
.acj-list:has(> .pj) {
  grid-template-columns: minmax(0, 1fr);
}

/* Passport expiry in the profile panel (owner 2026-10-03): expired = red, under 6 months = amber. */
.ac-passport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: -0.25rem 0 0.75rem;
  color: #6c776f;
  font-size: 0.85rem;
}
.ac-passport small {
  flex-basis: 100%;
  font-size: 0.78rem;
}
.ac-passport b {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
}
.ac-passport.is-expired b {
  background: #fbe3dd;
  color: #9c2f1c;
}
.ac-passport.is-expired small {
  color: #9c2f1c;
}
.ac-passport.is-soon b {
  background: #fff1d1;
  color: #7a5310;
}
.ac-passport.is-soon small {
  color: #7a5310;
}

/* Travel documents panel (owner 2026-10-03): country picker + second passport. */
.acx .ac-field select {
  width: 100%;
  min-height: 2.9rem;
  border: 1px solid #e0d8c6;
  border-radius: 12px;
  background: #fff;
  color: var(--acx-text);
  font: inherit;
  padding: 0.6rem 0.85rem;
}
.acx-tile--emoji {
  font-size: 1.15rem;
  line-height: 1;
}
.ac-passport2 {
  display: grid;
  gap: 0.25rem;
  margin: 0.5rem 0 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #e0d8c6;
}
.ac-passport2[hidden],
#ac-passport2-add[hidden] {
  display: none;
}
.ac-passport2-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  color: var(--acx-text, #1f2a24);
}
#ac-passport2-add {
  justify-self: start;
  margin-bottom: 0.75rem;
}

/* Trip covers are landscape 16:9 everywhere (crop sheet, World, Explore, Cover tab, web + app).
   Happening now / Your next chapter keep that shape: stacked, the cover is 16:9; in the wide
   split the cover column is at least 16:9 tall and the card grows with it (the photo always
   fills; it is never letterboxed). Last in the file so it wins over the older height rules. */
.acj-hero .tc-card .tc-cover {
  height: auto;
  aspect-ratio: 16 / 9;
}
@media (min-width: 64rem) {
  .acj-hero > .acj-block > .tc-card,
  .acj-hero .acj-live:not(.is-multi) > .tc-card {
    min-height: 0;
  }
  .acj-hero > .acj-block > .tc-card .tc-cover,
  .acj-hero .acj-live:not(.is-multi) > .tc-card .tc-cover {
    height: auto;
    min-height: 100%;
    aspect-ratio: 16 / 9;
  }
}
@media (min-width: 52rem) {
  body.account-page:not(.profile-page) .acj-hero > .acj-block > .tc-card,
  body.account-page:not(.profile-page) .acj-hero .acj-live:not(.is-multi) > .tc-card {
    min-height: 0;
    max-height: none;
  }
  body.account-page:not(.profile-page) .acj-hero > .acj-block > .tc-card .tc-cover,
  body.account-page:not(.profile-page) .acj-hero .acj-live:not(.is-multi) > .tc-card .tc-cover {
    height: auto;
    min-height: 100%;
    aspect-ratio: 16 / 9;
  }
}
