:root {
  --bg: #070b14;
  --panel: #101725;
  --panel2: #151e2e;
  --globe-panel-bg: linear-gradient(110deg, #7ea4eef2, #101725);
  --ink: #eef3fa;
  --muted: #99a8bb;
  --line: #263247;
  --accent: #74e0bd;
  --purple: #8b6bd9;
  --danger: #d67676;
  --space: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

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

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

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.site-nav,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(20px, 6vw, 90px);
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav nav > a:not(.button),
.site-footer a {
  color: var(--muted);
  font-size: .92rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 750;
  letter-spacing: -.04em;
  font-size: 1.25rem;
}

.brand-logo {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #07221e;
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  filter: brightness(1.06);
}

.button-small {
  min-height: 42px;
  padding: 0 16px;
  font-size: .9rem;
}

.button-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.button-danger {
  background: transparent;
  color: #ffaaaa;
  border-color: #744b55;
}

.hero {
  min-height: 590px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 40px clamp(20px, 9vw, 140px) 74px;
}

.hero-copy {
  max-width: 580px;
  z-index: 1;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  font-weight: 750;
}

.hero h1,
.legal h1 {
  font-size: clamp(2.6rem, 5.2vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.06em;
  margin: 18px 0;
}

.lead {
  font-size: 1.18rem;
  line-height: 1.65;
  color: #bfccda;
  max-width: 520px;
  margin: 0 0 28px;
}

.quiet {
  color: var(--muted);
  font-size: .9rem;
}

.hero-copy .quiet {
  margin-top: 15px;
}

.demo-wrap {
  height: min(65vw, 520px);
  min-height: 350px;
  position: relative;
}

.demo-wrap:after {
  content: "";
  position: absolute;
  inset: auto 10% -10px;
  height: 25%;
  background: radial-gradient(ellipse, rgba(46, 152, 144, .2), transparent 70%);
  pointer-events: none;
}

.demo-wrap #demo-globe {
  height: 100%;
  width: 100%;
}

.demo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  color: var(--muted);
  font-size: .8rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 50px clamp(20px, 9vw, 140px);
  border-top: 1px solid #182235;
  border-bottom: 1px solid #182235;
}

.features article {
  padding: 12px 18px;
}

.features article > span {
  color: var(--accent);
  font-size: .78rem;
}

.features h2 {
  font-size: 1.16rem;
  letter-spacing: -.02em;
}

.features p,
.steps {
  color: var(--muted);
  line-height: 1.6;
}

.how {
  text-align: center;
  padding: 80px 20px;
}

.how h2,
.final-cta h2 {
  font-size: 2.2rem;
  letter-spacing: -.04em;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.steps b {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #17273a;
  color: var(--accent);
  margin-right: 8px;
}

.final-cta {
  text-align: center;
  padding: 64px 20px 90px;
  background: radial-gradient(ellipse at center top, #142b35, transparent 65%);
}

.site-footer {
  border-top: 1px solid #182235;
  color: var(--muted);
  font-size: .85rem;
}

.legal {
  max-width: 760px;
  padding: 100px 24px;
  margin: auto;
  line-height: 1.8;
}

.legal h1 {
  font-size: 3.5rem;
}

.toast {
  position: fixed;
  z-index: 20;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 12px 18px;
  border: 1px solid #34445a;
  border-radius: 12px;
  background: #172235;
  box-shadow: 0 12px 35px #0008;
  transition: .2s;
  pointer-events: none;
  max-width: 90vw;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  text-align: center;
  padding: 16px;
  background: #462c35;
}

.globe-shell {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #070b14;
}

.globe-top {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: linear-gradient(#070b14df, transparent);
}

.globe-top p {
  font-size: .88rem;
  color: #bdc8d6;
}

.globe-top form {
  margin: 0;
}

.profile-menu-wrap {
  position: relative;
  min-width: 0;
}

.profile-menu-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(38vw, 320px);
  border: 2px solid #ffd166 !important;
  padding: 0 12px 0 6px;
}

.profile-avatar {
  display: block;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: #263247;
}

.profile-avatar-large {
  width: 48px;
  height: 48px;
}

.profile-display-name {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chevron {
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform .16s ease;
}

.profile-menu-toggle[aria-expanded="true"] .profile-chevron {
  transform: rotate(180deg);
}

.profile-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 10px);
  left: 0;
  width: min(330px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel2);
  box-shadow: 0 18px 48px #0009;
}

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

.profile-menu-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-menu-heading > div { min-width: 0; }
.profile-menu-heading strong { display: block; overflow-wrap: anywhere; }
.profile-menu-heading p { margin: 5px 0 0; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.profile-menu-socials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: -3px 0 14px;
}
.profile-menu-socials[hidden] { display: none; }
.profile-menu-socials a {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 39px;
  gap: 8px;
  padding: 5px 9px;
  border: 1px solid #d2c7ae;
  border-radius: 11px;
  background: #fff9eb;
  color: #202c2b;
  box-shadow: 2px 2px 0 #e5dbc5;
  font-size: .78rem;
  font-weight: 650;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.profile-menu-socials a:hover {
  transform: translate(1px, 1px);
  border-color: var(--social-color, #d45b3e);
  box-shadow: 1px 1px 0 #e5dbc5;
}
.profile-menu-socials a:focus-visible { outline: 2px solid #d45b3e; outline-offset: 2px; }
.profile-social-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  place-items: center;
  border-radius: 8px;
  background: var(--social-tint, #f8ebe5);
  color: var(--social-color, #a33e35);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1;
}
.profile-social-mark { display: block; width: 17px; height: 17px; }
.profile-menu-socials .profile-social-link-youtube { --social-color: #bd352f; --social-tint: #f9e5df; }
.profile-menu-socials .profile-social-link-instagram { --social-color: #9d426c; --social-tint: #f5e5ec; }
.profile-menu-socials .profile-social-link-x { --social-color: #273532; --social-tint: #e7ece5; }
.profile-menu-socials .profile-social-link-tiktok { --social-color: #267b71; --social-tint: #e0efea; }
.profile-menu > .button { width: 100%; }

.globe-top button {
  min-height: 38px;
}

#globe-canvas {
  position: absolute;
  inset: 0 380px 0 0;
}

#globe-loading {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--muted);
}

.globe-panel {
  position: absolute;
  z-index: 3;
  right: 0;
  top: 0;
  bottom: 0;
  width: 380px;
  padding: 92px 24px 24px;
  background: var(--globe-panel-bg);
  border-left: 1px solid #202d40;
  overflow: auto;
}

.globe-panel h1 {
  font-size: 1.4rem;
  margin: 0 0 18px;
}

.globe-panel h2 {
  font-size: 1.25rem;
  margin: 0 0 20px;
}

.pin-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  width: 100%;
  min-height: 60px;
  margin: 7px 0;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--panel2);
  color: var(--ink);
  cursor: pointer;
}

.pin-row span {
  color: var(--muted);
  font-size: .8rem;
}

.globe-panel label {
  display: block;
  margin: 14px 0;
  color: #dce5f0;
  font-size: .86rem;
}

.globe-panel label input:not([type=radio]),
.globe-panel select,
.globe-panel textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a111e;
  color: var(--ink);
}

.globe-panel textarea {
  resize: vertical;
}

.segmented {
  display: flex;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 12px 0;
}

.segmented legend {
  font-size: .86rem;
  margin-bottom: 8px;
}

.segmented label {
  margin: 0;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a111e;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .86rem;
}

.text-button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.stars {
  display: flex;
  gap: 4px;
}

.star {
  height: 44px;
  min-width: 40px;
  border: 0;
  background: none;
  color: #ffd166;
  font-size: 1.7rem;
  cursor: pointer;
}

.globe-panel small {
  color: var(--muted);
  font-size: .73rem;
}

.pin-coords {
  padding: 10px 0;
  color: var(--muted);
  font-size: .8rem;
  border-top: 1px solid var(--line);
}

.editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-actions .button {
  min-height: 44px;
  padding: 0 15px;
}

.legend {
  position: absolute;
  z-index: 2;
  bottom: 22px;
  left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #243248;
  border-radius: 12px;
  background: #0d1421dd;
  color: #bdc8d6;
  font-size: .72rem;
  backdrop-filter: blur(8px);
}

.legend > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.unvisited {
  background: #2b3140;
}

.wishlist {
  background: #8b6bd9;
}

.unrated {
  background: #5b7c99;
}

.rating-legend {
  display: flex;
  align-items: center;
  gap: 3px;
}

.rating-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--swatch);
}

.rating-legend span {
  margin-left: 5px;
}

.country-tooltip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px;
  color: #fff;
}

.country-tooltip span {
  color: #d4dfed;
  font-size: .78rem;
}

@media (max-width: 900px) {
  .hero {
    padding-inline: 6vw;
  }

  .features {
    padding-inline: 4vw;
  }

  .globe-panel {
    width: 340px;
  }

  #globe-canvas {
    right: 340px;
  }
}

@media (max-width: 767px) {
  .site-nav {
    padding: 16px 18px;
  }

  .site-nav nav {
    gap: 14px;
  }

  .site-nav nav > a:not(.button) {
    display: none;
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 48px 22px 54px;
  }

  .hero h1 {
    font-size: 3.1rem;
  }

  .demo-wrap {
    width: 100%;
    height: 360px;
    min-height: 300px;
  }

  .features {
    grid-template-columns: 1fr;
    padding: 25px 18px;
    gap: 6px;
  }

  .features article {
    padding: 12px 8px;
  }

  .how {
    padding: 56px 18px;
  }

  .steps {
    display: grid;
    gap: 4px;
    text-align: left;
  }

  .final-cta {
    padding: 45px 20px 60px;
  }

  .final-cta h2 {
    font-size: 1.8rem;
  }

  .site-footer {
    padding: 20px;
    flex-wrap: wrap;
  }

  .globe-shell {
    min-height: 520px;
  }

  .globe-top {
    height: 60px;
    padding: 0 14px;
  }

  .globe-top p {
    font-size: .72rem;
  }

  .globe-top .brand {
    font-size: 1rem;
  }

  .globe-top button {
    font-size: .78rem;
    min-height: 36px;
    padding: 0 11px;
  }

  #globe-canvas {
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .globe-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 48vh;
    padding: 16px 18px 20px;
    border-left: 0;
    border-top: 1px solid #263247;
    border-radius: 20px 20px 0 0;
    background: #101725f2;
    backdrop-filter: blur(12px);
  }

  .globe-panel h1 {
    font-size: 1.12rem;
    margin: 0 0 8px;
  }

  .globe-panel label {
    margin: 10px 0;
  }

  .legend {
    left: 10px;
    bottom: calc(48vh + 12px);
    padding: 8px;
    font-size: .62rem;
    gap: 5px;
  }

  .legend .rating-legend i {
    width: 9px;
    height: 9px;
  }

  .pin-row {
    min-height: 52px;
  }

  .legal {
    padding: 70px 24px;
  }
}

/* Public sharing and read-only visitor card */
.globe-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.globe-top-actions form {
  margin: 0;
}

.visitor-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  max-width: 38vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 650;
}

.share-indicator {
  margin-left: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #253144;
  color: #bdc8d6;
  font-size: .65rem;
  font-weight: 600;
}

.preview-banner {
  position: absolute;
  z-index: 5;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 30px);
  padding: 10px 16px;
  border: 1px solid #a78039;
  border-radius: 10px;
  background: #3a2d17;
  color: #f5d89a;
  font-size: .83rem;
  text-align: center;
  box-shadow: 0 7px 22px #0005;
}

.readonly-card h2 {
  margin: 6px 0 12px;
}

.readonly-card h3 {
  margin: 22px 0 8px;
  font-size: .92rem;
}

.back-to-pins {
  margin: -4px 0 12px;
  padding: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}

.pin-detail-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pin-detail-rating-row .status-badge,
.pin-detail-rating-row .readonly-rating {
  margin: 0;
}

.visited-badge {
  background: #1a3b38;
  color: #91e0c8;
}

.wishlist-badge {
  background: #342951;
  color: #c4aaf9;
}

.readonly-rating {
  margin: 8px 0;
  color: #ffd166;
  letter-spacing: .08em;
  font-size: 1.25rem;
  line-height: 1;
}

.readonly-card dl {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.readonly-card dl > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
}

.readonly-card dt {
  color: var(--muted);
  font-size: .78rem;
}

.readonly-card dd {
  margin: 0;
  font-size: .83rem;
}

.readonly-notes {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #d4dfed;
  font-size: .88rem;
  line-height: 1.65;
}

.share-dialog {
  width: min(540px, calc(100vw - 28px));
  max-height: min(88vh, 780px);
  overflow: auto;
  padding: 24px;
  border: 1px solid #34445a;
  border-radius: 18px;
  background: #101725;
  color: var(--ink);
  box-shadow: 0 24px 80px #000a;
}

.upgrade-dialog {
  width: min(900px, calc(100vw - 28px));
  max-height: min(90vh, 860px);
}

.upgrade-dialog .dialog-heading h2 {
  max-width: 600px;
}

.plan-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
  margin-top: 20px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 5px 14px 6px 12px;
  background: var(--panel2);
}

.plan-card-pro {
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 3px 3px 0 #cfc4ad;
}

.plan-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.plan-card-heading h3 {
  margin: 0;
  font-size: 1.2rem;
}

.plan-card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
}

.plan-card-heading p strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.plan-card ul {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: .84rem;
  line-height: 1.5;
}

.plan-card li {
  position: relative;
  padding-left: 20px;
}

.plan-card li::before {
  position: absolute;
  left: 0;
  color: var(--accent);
  content: "✓";
  font-weight: 800;
}

.plan-card li span {
  color: var(--muted);
}

.plan-card code {
  color: #8a3f2e;
  font-size: .78rem;
  overflow-wrap: anywhere;
}

.plan-includes {
  margin: 14px 0 -4px;
  color: var(--muted);
  font-size: .82rem;
}

.plan-start-button {
  width: 100%;
  justify-content: center;
  margin-top: 20px;
  min-height: 46px;
}

@media (max-width: 680px) {
  .plan-options { grid-template-columns: 1fr; }
  .plan-card { padding: 17px; }
}

.profile-dialog {
  width: min(600px, calc(100vw - 28px));
  padding: clamp(20px, 4vw, 30px);
  border-color: #34445a;
  border-radius: 22px;
  background: var(--globe-panel-bg);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.profile-dialog .dialog-heading { margin-bottom: 10px; }
.profile-dialog .dialog-heading h2 { font-size: 1.7rem; letter-spacing: -.04em; }

.profile-intro {
  max-width: 440px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
}

.profile-picture-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 17px;
  border: 1px solid #263247;
  border-radius: 16px;
  background: var(--panel2);
}

.profile-preview {
  width: 88px;
  height: 88px;
  flex: none;
  border: 3px solid #263247;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel2);
  box-shadow: 0 0 0 4px #74e0bd12;
}

.profile-picture-controls { min-width: 0; }
.profile-picture-controls > strong { display: block; font-size: .92rem; }
.profile-picture-controls > p { margin: 4px 0 10px; color: var(--muted); font-size: .78rem; }

.profile-picture-picker {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 !important;
  padding: 9px 11px;
  border-radius: 10px;
  cursor: pointer;
}

.profile-picture-picker > span { display: block; color: var(--ink); font-size: .78rem; font-weight: 650; }
.profile-picture-picker > small { display: block; margin-top: 3px; color: var(--muted); font-size: .67rem; }
.profile-picture-picker input[type="file"] {
  display: block;
  width: 100%;
  min-height: 0;
  margin-top: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--panel2);
  font-size: .72rem;
}

.profile-picture-picker input[type="file"]::file-selector-button {
  margin-right: 8px;
  padding: 6px 9px;
  border: 1px solid #3b4a5f;
  border-radius: 7px;
  background: var(--panel2)
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.profile-picture-controls #profile-picture-remove {
  min-height: 32px;
  margin-top: 8px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: .74rem;
}

.profile-form-fields { margin-top: 18px; }
.profile-form-fields label { margin: 14px 0 8px; font-weight: 650; }
.profile-dialog .profile-form-fields > label { color: var(--ink); }
.profile-dialog input:not([type="checkbox"]):not([type="file"]) { border-radius: 11px; background: var(--panel2); }
.profile-form-fields textarea {
  display: block;
  width: 100%;
  min-height: 108px;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel2);
  color: var(--ink);
  resize: vertical;
}

.profile-form-fields small { display: block; margin-top: 7px; color: var(--muted); font-size: .74rem; font-weight: 400; }
.profile-cooldown:empty { display: none; }

.profile-social-section {
  margin-top: 16px;
  padding: 13px;
  border: 1px solid #d2c7ae;
  border-radius: 14px;
  background: #fff9eb;
  color: #202c2b;
}

.profile-social-heading h3 { margin: 0; color: #202c2b; font-size: .96rem; }
.profile-social-heading p,
.profile-social-unlock p {
  margin: 3px 0 8px;
  color: #5f6a63;
  font-size: .75rem;
}

.profile-social-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-social-fields label {
  display: block;
  min-width: 0;
  margin: 2px 0 0;
  color: #37443d;
  font-size: .77rem;
  font-weight: 650;
}

.profile-dialog .profile-social-fields input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  margin-top: 3px;
  padding: 6px 8px;
  border: 1px solid #cbbda3;
  border-radius: 8px;
  background: #f6edda;
  color: #202c2b;
  font-size: .74rem;
}

.profile-social-fields:disabled input {
  border-color: #c8bea9;
  background: #eee8dc;
  color: #4a514c;
  cursor: not-allowed;
}

.profile-social-fields:disabled input::placeholder { color: #69716a; opacity: 1; }

.profile-social-unlock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #e2d3b8;
  border-radius: 10px;
  background: #f6edda;
}

.profile-social-unlock p { margin: 0; color: #4f5a53; }
.profile-social-unlock .button {
  width: auto;
  min-height: 33px;
  flex: none;
  padding: 0 12px;
  border-color: #ad432c;
  border-radius: 999px;
  background: #ad432c;
  color: #fff9eb;
  font-size: .74rem;
}

.profile-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #263247;
}

.profile-form-footer .quiet { flex: 1; margin: 0; font-size: .8rem; }
.profile-form-footer .button { min-height: 46px; padding: 0 18px; }
.profile-form-footer .button:disabled { opacity: .5; cursor: not-allowed; }
.profile-form-footer .button span[aria-hidden] { font-size: 1.1rem; }

.share-dialog::backdrop {
  background: #03060bcc;
  backdrop-filter: blur(4px);
}

.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.dialog-heading .eyebrow {
  margin: 0 0 8px;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 1.45rem;
}

.dialog-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #151e2e;
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
}

.share-dialog label {
  display: block;
  margin: 15px 0;
  color: #dce5f0;
  font-size: .85rem;
}

.share-dialog input:not([type=checkbox]) {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a111e;
  color: var(--ink);
}

.share-dialog input:disabled {
  opacity: .55;
}

.share-dialog .share-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1320;
  font-weight: 600;
}

.share-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.share-link-area {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1320;
}

.share-link-area > label {
  margin: 0 0 8px;
}

.share-url-control {
  display: flex;
  align-items: stretch;
  min-width: 0;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid #d2c7ae;
  border-radius: 10px;
  background: #fff9eb;
  color: #202c2b;
}
.share-url-control:focus-within { outline: 2px solid #d45b3e; outline-offset: 2px; }

.share-url-prefix,
.share-url-trailing-slash {
  display: flex;
  align-items: center;
  flex: none;
  padding: 0 9px;
  color: #58635c;
  font-size: .8rem;
  white-space: nowrap;
}

.share-url-prefix {
  border-right: 1px solid #d2c7ae;
  background: #f6edda;
}

.share-url-trailing-slash { padding-left: 0; }
.share-url-control #share-slug {
  display: block;
  width: auto;
  min-width: 0;
  min-height: 42px;
  flex: 1;
  margin: 0;
  padding: 0 7px;
  border: 0;
  border-radius: 0;
  background: #fff9eb;
  color: #202c2b;
  font-size: .85rem;
  font-weight: 650;
}

.share-url-control #share-slug:disabled {
  opacity: 1;
  background: #eee8dc;
  color: #4a514c;
  cursor: not-allowed;
}

.share-link-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.share-link-actions .button {
  min-height: 36px;
  padding: 0 13px;
  font-size: .78rem;
}

.share-link-actions > .button:not(#copy-share-link) { margin-left: auto; }
.share-link-actions .button:disabled { opacity: .55; cursor: not-allowed; }
.share-slug-status { margin: 8px 0 0; color: #c4cec4; font-size: .76rem; line-height: 1.45; }

.share-link-row {
  display: flex;
  gap: 8px;
}

.share-link-row input {
  min-width: 0;
  flex: 1;
}

.share-link-row .button {
  flex: none;
}

.share-link-area .quiet {
  margin: 9px 0 0;
  font-size: .78rem;
}

.open-share-link {
  display: inline-block;
  margin-top: 11px;
  color: var(--accent);
  font-size: .85rem;
}

.share-dialog form > .button {
  margin-top: 3px;
}

.share-warning {
  margin: 20px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: #e4c994;
  font-size: .8rem;
  line-height: 1.55;
}

.share-dialog button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 767px) {
  .profile-dialog { padding: 20px; }
  .profile-picture-card { align-items: flex-start; gap: 13px; padding: 13px; }
  .profile-preview { width: 68px; height: 68px; }
  .profile-form-footer .button { flex: none; }

  .profile-menu-toggle { gap: 6px; max-width: 42vw; padding-right: 8px; }
  .profile-avatar { width: 30px; height: 30px; }
  .profile-display-name { font-size: .75rem; }
  .profile-chevron { font-size: 1rem; }
  .profile-menu { width: min(300px, calc(100vw - 20px)); }

  .globe-top-actions {
    gap: 6px;
  }

  .visitor-title {
    position: static;
    transform: none;
    margin-left: auto;
    margin-right: 0;
    max-width: 26vw;
    font-size: .72rem;
  }

  .globe-top:has(.visitor-title) {
    justify-content: flex-start;
    gap: 6px;
  }

  .globe-top:has(.visitor-title) > .brand {
    flex: none;
  }

  .globe-top-actions .button {
    font-size: .65rem;
    min-height: 36px;
    padding: 0 7px;
  }

  .globe-top-actions form button {
    font-size: .65rem;
  }

  .preview-banner {
    top: 62px;
    font-size: .72rem;
  }

  .share-dialog {
    padding: 18px;
  }

  .share-link-row {
    flex-wrap: wrap;
  }

  .share-link-row input {
    flex-basis: 100%;
  }

  .readonly-card dl > div {
    grid-template-columns: 80px 1fr;
  }
}

/* Globe controls, photos, and country customisation */
.panel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.panel-tab {
  flex: 1;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.panel-tab.active {
  background: var(--accent);
  color: #06241f;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.photo-grid figure {
  position: relative;
  margin: 0;
  min-width: 0;
}

.photo-grid img {
  display: block;
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 9px;
  cursor: zoom-in;
  background: var(--panel2);
}

.photo-grid input {
  width: 100%;
  min-width: 0;
  margin-top: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel2);
  color: var(--ink);
}

.photo-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #111c;
  color: white;
  font-size: 1.1rem;
}

.photo-upload-button {
  position: relative;
  cursor: pointer;
}

.photo-upload-button.is-disabled {
  opacity: .45;
  filter: grayscale(1);
  cursor: not-allowed;
}

.photo-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photos-section {
  margin-bottom: 18px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.photos-section.drag-over {
  border-color: var(--accent);
  background: #287b6930;
}

.photo-lightbox {
  position: relative;
  width: min(96vw, 1200px);
  max-width: 96vw;
  height: min(92dvh, 900px);
  max-height: 92dvh;
  padding: 18px 22px 14px;
  border: 1px solid #ffffff24;
  border-radius: 22px;
  background: #10151df5;
  color: #f6f5f1;
  box-shadow: 0 28px 100px #000b;
  overflow: hidden;
}

.photo-lightbox[open] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto auto;
}

.photo-lightbox-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
  touch-action: pan-y;
}

.photo-lightbox-stage img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 10px;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  animation: photo-lightbox-enter 240ms cubic-bezier(.2, .7, .25, 1) both;
}

@keyframes photo-lightbox-enter {
  from {
    opacity: 0;
    transform: scale(.985) translateY(5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-lightbox-stage img {
    animation: none;
  }
}

.lightbox-close,
.lightbox-arrow {
  display: grid;
  place-items: center;
  border: 1px solid #ffffff2e;
  background: #111821bd;
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background .18s ease, transform .18s ease;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  background: #2b3745e8;
}

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-arrow {
  position: absolute;
  z-index: 1;
  top: 50%;
  width: 52px;
  height: 64px;
  border-radius: 18px;
  font-size: 3rem;
  line-height: 1;
  transform: translateY(-50%);
}

.lightbox-arrow:hover {
  transform: translateY(-50%) scale(1.05);
}

.lightbox-previous {
  left: 14px;
}

.lightbox-next {
  right: 14px;
}

.photo-lightbox-caption {
  min-height: 1.4em;
  margin: 10px 48px 2px;
  color: #e5e7eb;
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.photo-lightbox-position {
  display: block;
  color: #aeb8c5;
  font-size: .78rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.photo-lightbox-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  margin-top: 5px;
}

.photo-lightbox-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #778292;
  cursor: pointer;
  transition: width .2s ease, background .2s ease, transform .2s ease;
}

.photo-lightbox-dot:hover {
  transform: scale(1.2);
}

.photo-lightbox-dot[aria-current="true"] {
  width: 23px;
  background: #f4f1e9;
}

.pin-cover {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
}

@media (max-width: 767px) {
  .photo-lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
  }

  .photo-lightbox-stage {
    min-height: 0;
  }

  .lightbox-arrow {
    display: none;
  }

  .lightbox-close {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
  }

  .photo-lightbox-caption {
    margin-top: 12px;
  }

  .globe-top-actions {
    gap: 4px;
  }

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

  .photo-grid img {
    height: 70px;
  }

  .legend {
    max-width: 45vw;
  }

  .globe-panel {
    max-height: 56vh;
  }

  .globe-top-actions form {
    display: none;
  }
}

@media (max-width: 420px) {
  .profile-dialog { padding: 18px; }
  .profile-social-unlock { align-items: flex-start; flex-direction: column; gap: 6px; }
  .profile-picture-card { flex-direction: column; align-items: center; text-align: center; }
  .profile-picture-controls { width: 100%; }
  .profile-picture-picker { width: 100%; text-align: left; }
  .profile-form-footer { align-items: stretch; flex-direction: column; }
  .profile-form-footer .button { width: 100%; }

  .globe-top {
    padding: 0 10px;
  }

  .globe-top .brand {
    font-size: .9rem;
  }

  .profile-menu-toggle { max-width: 43vw; }
  .profile-display-name { max-width: 25vw; }

  .globe-top-actions {
    gap: 3px;
  }

  .globe-top-actions .button {
    padding: 0 6px;
  }

  .globe-top-actions #pin-panel-toggle span,
  .globe-top-actions #share-open .share-indicator {
    display: none;
  }

  .globe-top-actions #pin-panel-toggle,
  .globe-top-actions #share-open {
    min-width: 34px;
  }

  .visitor-title {
    max-width: 23vw;
  }
}
