:root {
  --paper: #f3ecdf;
  --ink: #241c16;
  --muted: #6f6458;
  --line: #ddcfb8;
  --rust: #b84324;
  --pine: #1f4a45;
  --sand: #e7c07a;
  --sea: #c5ddd8;
  --card: #fffaf3;
  --shadow: 0 10px 28px rgba(36, 28, 22, 0.1);
  font-family: "Outfit", "Avenir Next", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.58rem 0.7rem;
  border-radius: 6px;
}
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 520; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.7rem, 5vw, 4.1rem); line-height: 0.96; margin: 0; }
h2 { margin: 0; font-size: 1.85rem; }
h3 { margin: 1.35rem 0 0.35rem; font-size: 1.15rem; }

.mark {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.primary, .text {
  border-radius: 6px;
  padding: 0.55rem 0.85rem;
  border: 1px solid transparent;
  line-height: 1.2;
}
.primary { background: var(--ink); color: var(--paper); }
.primary:hover { background: #3a3028; }
.text { background: transparent; color: var(--pine); padding-left: 0.35rem; padding-right: 0.35rem; }
.text:hover { color: var(--rust); }
.primary:focus-visible, .text:focus-visible, button:focus-visible, select:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}
button:disabled { opacity: 0.55; }
.error { min-height: 1.2em; color: var(--rust); margin: 0.2rem 0; }
.hint, .poster-note, .view-head p, .who { color: var(--muted); }
.file input { display: none; }

.auth {
  height: 100%;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(22rem, 28rem);
}
.poster {
  position: relative;
  overflow: hidden;
  background: #1a120c;
  color: #f6efe4;
}
.poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 42% 58%;
}
.poster-copy {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 2.2rem 2.6rem 2.5rem;
  background: linear-gradient(to top, rgba(16, 9, 5, 0.78) 0%, rgba(16, 9, 5, 0.34) 34%, rgba(16, 9, 5, 0) 62%);
}
.poster .mark { font-size: 1.45rem; }
.poster h1 { max-width: 11ch; font-size: clamp(2.8rem, 4.4vw, 4.2rem); }
.poster-place { margin: 0.35rem 0 0; font-size: 1rem; color: rgba(246, 239, 228, 0.9); }
.poster-note { max-width: 26rem; font-size: 1.02rem; color: rgba(246, 239, 228, 0.78); margin: 0; }
.auth-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
  padding: 2.4rem 2.1rem;
  background: var(--paper);
}
.auth-card .lang-select {
  width: auto;
  align-self: flex-start;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding: 0;
  margin-bottom: 0.4rem;
}
#auth-submit { width: 100%; }
#auth-switch { align-self: center; }
.auth-card label, .profile label, #composer-form label, .profile-card label { display: grid; gap: 0.35rem; font-size: 0.86rem; }
input, textarea, select.lang-select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.58rem 0.7rem;
  border-radius: 6px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--pine); }
#composer-form select {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0.58rem 0.7rem;
}
.auth-card .reg-only { display: none; }
.auth.register .auth-card label.reg-only { display: grid; }
.auth.register .auth-card p.reg-only { display: block; }

.app {
  height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.side {
  border-right: 1px solid var(--line);
  padding: 1.2rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #f7f1e6;
  color: var(--ink);
  min-height: 0;
  overflow: auto;
}
.side .mark { color: var(--ink); padding: 0 0.15rem; }
.side nav { display: grid; gap: 0.25rem; }
.side nav button {
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 6px;
  border-left: 2px solid transparent;
  padding: 0.42rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  color: var(--muted);
}
.badge {
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--rust);
  color: #fffaf3;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
}
.side nav button.active {
  color: var(--ink);
  border-left-color: var(--ink);
  background: transparent;
}
.side nav button:hover { color: var(--ink); background: rgba(36, 28, 22, 0.04); }
.side-foot {
  margin-top: auto;
  display: grid;
  gap: 0.15rem;
}
#new-trip { width: 100%; }
.who { font-size: 0.85rem; margin: 0.15rem 0 0; color: var(--muted); }
.side .lang-select {
  margin-top: 0.15rem;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding: 0.25rem 0.15rem;
}

main { min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.view { display: none; height: 100%; overflow: auto; padding: 1.5rem 1.4rem 2.5rem; }
.view.on { display: block; }
#view-start.on, #view-reisen.on, #view-bilder.on, #view-freunde.on,
#view-profil.on, #view-einstellungen.on, #view-person.on, #view-nachrichten.on {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1.75rem 2rem 3rem;
}
#view-bilder.on { padding: 1.5rem 1.6rem 2.5rem; }
#view-start.on > .home,
#view-start.on > .feed-block { width: min(64rem, 100%); }
#view-bilder.on > * { width: min(64rem, 100%); }
#view-reisen.on > *, #view-freunde.on > *,
#view-profil.on > *, #view-einstellungen.on > *, #view-person.on > * {
  width: min(42rem, 100%);
}
.home-head { padding: 0 0 0.85rem; }
.home-head h2 { font-size: clamp(2rem, 3vw, 2.5rem); }
.home-line { margin: 0.25rem 0 0; }
.places {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
}
.places.one { grid-template-columns: minmax(0, 22rem); }
.places.two { grid-template-columns: repeat(2, minmax(0, 22rem)); }
.place {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.place img, .place video {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  max-width: none;
  object-fit: cover;
  border-radius: 8px;
  background: #efe4d2;
}
.place span {
  position: static;
  padding: 0 0.1rem;
  background: none;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  text-align: left;
  color: var(--ink);
}
.place small {
  display: inline;
  margin-left: 0.4rem;
  font-family: "Outfit", "Avenir Next", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--muted);
  opacity: 1;
}
.feed-block {
  width: 100%;
  margin-top: 1.35rem;
  padding: 1.15rem 0 0;
  border-top: 1px solid var(--line);
}
.feed-block > h3 { margin: 0 0 0.15rem; }
.challenge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.challenge h3 { margin: 0; font-size: 1.05rem; }
.challenge p { margin: 0.2rem 0 0; color: var(--muted); }
.challenge .done { color: var(--pine); }
.feed-block .quiet { border-top: 0; padding-top: 0.15rem; }
#view-nachrichten.on > * { width: min(52rem, 100%); }
#view-karte { padding: 0; overflow: hidden; display: none; flex-direction: column; }
#view-karte.on { display: flex; height: 100vh; }
.map-wrap { position: relative; flex: 1; min-height: 0; }
#map { height: 100%; min-height: calc(100vh - 7rem); background: var(--sea); }
.leaflet-container path,
.leaflet-container path:focus,
.leaflet-interactive:focus { outline: none; }
.leaflet-zoom-anim .leaflet-zoom-animated {
  transition-duration: 0.2s;
}
.hero-shot.can-move { cursor: grab; touch-action: none; }
.hero-shot.can-move:active { cursor: grabbing; }

.leaflet-top.leaflet-left { top: auto; bottom: 4.4rem; }
.stat-strip {
  position: absolute;
  z-index: 500;
  left: 1rem;
  top: 1rem;
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
  max-width: calc(100% - 18rem);
  background: rgba(255, 250, 243, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.2rem;
}
.stat {
  background: transparent;
  border-radius: 0;
  padding: 0.4rem 0.55rem;
  box-shadow: none;
  min-width: 3.4rem;
}
.stat b { display: block; font-family: "Fraunces", Georgia, serif; font-size: 1.35rem; line-height: 1; }
.stat span { color: var(--muted); font-size: 0.75rem; }
.legend {
  position: absolute;
  z-index: 500;
  left: 1rem;
  bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  max-width: min(36rem, calc(100% - 2rem));
  background: rgba(255, 250, 243, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
}
.swatch { width: 0.7rem; height: 0.7rem; border-radius: 2px; display: inline-block; margin-right: 0.3rem; vertical-align: -1px; }

.country-panel {
  position: absolute;
  z-index: 600;
  top: 1rem;
  right: 1rem;
  width: min(420px, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.hero-shot { width: 100%; height: 230px; object-fit: cover; border-radius: 8px; background: #efe4d2; margin: 0.7rem 0; }
.hero-empty {
  display: grid;
  place-items: center;
  min-height: 140px;
  margin: 0.7rem 0;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.home-note { margin: 0.4rem 0 0; color: var(--pine); }
.home-banner {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0.65rem 1rem;
  background: #efe4d2;
  color: var(--ink);
}
.home-banner .text { padding: 0.4rem 0.8rem; }
.extra-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; margin: 0.4rem 0 0.6rem; }
.extra { display: grid; gap: 0.25rem; }
.extra img, .extra video { height: 84px; width: 100%; object-fit: cover; border-radius: 10px; }
.swatch.home { background: transparent; box-shadow: inset 0 0 0 1.5px var(--pine); }
.banner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem 1rem;
  background: var(--pine);
  color: #f3ecdf;
}
.banner p { margin: 0.15rem 0; }
.banner .text { color: #f3ecdf; border-color: rgba(243, 236, 223, 0.4); }

.view-head { margin-bottom: 1.15rem; }
.view-head p { max-width: 36rem; margin: 0.35rem 0 0; font-size: 0.95rem; }
.stack { display: grid; gap: 0.8rem; }
.card, .friend {
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.card-body, .friend { padding: 0.9rem 1rem; }
.friend { display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; align-items: center; }
.friend > .feed-person { grid-column: 1 / 3; min-width: 0; }
.card h3, .feed-card h3 { margin: 0.45rem 0 0; font-size: 1.35rem; }
.meta { color: var(--muted); font-size: 0.86rem; margin: 0; }
.cover { height: 180px; object-fit: cover; width: 100%; background: #efe4d2; }
.notes { white-space: pre-wrap; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.85rem 0.45rem; }
.shot { margin: 0; }
.shot img, .shot video { height: 240px; width: 100%; object-fit: cover; border-radius: 8px; background: #efe4d2; }
.shot figcaption { font-size: 0.92rem; color: var(--ink); margin-top: 0.4rem; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #efe4d2; flex: none;
}
.avatar.ph { display: grid; place-items: center; font-family: "Fraunces", Georgia, serif; }
#avatar-preview {
  width: 132px; height: 132px; border-radius: 50%; overflow: hidden; background: #efe4d2; flex: none;
}
#avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
#avatar-preview.ph {
  display: grid; place-items: center; font-family: "Fraunces", Georgia, serif; font-size: 3.4rem;
}
.profile-page { max-width: 46rem; display: grid; gap: 1rem; }
.profile-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem 1.15rem;
}
.avatar-col { display: grid; justify-items: center; gap: 0.55rem; }
.profile-kicker {
  margin: 0 0 0.15rem;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.86rem;
  color: var(--muted);
}
.profile-hero h2 { font-size: 2.15rem; line-height: 1; }
.profile-handle { margin: 0.25rem 0 0; color: var(--pine); font-weight: 640; }
.profile-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.profile-stats .stat {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}
.profile-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.05rem 1.1rem 1.15rem;
  display: grid;
  gap: 0.75rem;
}
.profile-card h3 { margin: 0.2rem 0 0; }
#bio-count { margin: -0.3rem 0 0; text-align: right; }
.avatar-row, .row, .dates, .friend-search { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.friend-search input { flex: 1; min-width: 12rem; }
.empty { color: var(--muted); padding: 0.4rem 0; }
.quiet {
  margin: 0.7rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  max-width: 32rem;
}
.stack .quiet + .primary { justify-self: start; margin-top: 0.15rem; }

dialog {
  width: min(520px, calc(100% - 1.5rem));
  border: none;
  border-radius: 8px;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(36, 28, 22, 0.46); }
#composer-form { display: grid; gap: 0.7rem; padding: 1.1rem 1.2rem 1.3rem; }
#composer-form header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.pick { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pick button, .mini {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 6px;
  padding: 0.28rem 0.55rem;
  font-size: 0.82rem;
}
.preview { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.preview img, .preview video { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.actions { display: flex; gap: 0.15rem 0.55rem; flex-wrap: wrap; align-items: center; margin: 0; justify-content: flex-end; }
.country-panel .actions { justify-content: flex-start; margin-top: 0.35rem; }
.actions .primary, .actions .text { padding: 0.38rem 0.65rem; font-size: 0.84rem; }
.actions .text { padding-left: 0.2rem; padding-right: 0.2rem; }
.feed-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem 1rem;
  display: grid;
  gap: 0.4rem;
}
.feed-person {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}
.feed-person:hover strong { color: var(--rust); }
.vis {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.vis legend {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  padding: 0;
  margin-bottom: 0.15rem;
}
.vis-opt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
}
.vis-opt:has(input:checked) {
  border-color: var(--pine);
  background: #f4f8f7;
}
.vis-opt input { margin-top: 0.28rem; }
.vis-opt b { display: block; font-weight: 640; }
.vis-opt small { display: block; color: var(--muted); font-size: 0.86rem; line-height: 1.35; margin-top: 0.15rem; }
.person-face {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  background: #efe4d2;
}
.person-face.ph {
  display: grid;
  place-items: center;
  font-family: "Fraunces", Georgia, serif;
  font-size: 3.4rem;
}
.person-bio { white-space: pre-wrap; margin: 0.45rem 0 0; }
.profile-lock {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.15rem;
}
.feed-photo { width: 100%; height: 280px; object-fit: cover; border-radius: 6px; background: #efe4d2; }
.feed-note { color: var(--ink); white-space: pre-wrap; }
.place-search { margin: 0 0 0.95rem; }
.place-search input { width: 100%; }
.story-actions { display: flex; gap: 0.85rem; align-items: center; }
.story-actions .on { color: var(--rust); }
.feed-tabs { display: flex; gap: 1.2rem; margin: 0.9rem 0 0.2rem; border-bottom: 1px solid var(--line); }
.feed-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-radius: 0;
  padding: 0.2rem 0 0.55rem;
  margin-bottom: -1px;
  color: var(--muted);
}
.feed-tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.inbox {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}
.inbox.is-empty { grid-template-columns: 1fr; }
.thread {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem 1rem;
  display: grid;
  gap: 0.6rem;
  min-height: 22rem;
}
#thread-log { display: flex; flex-direction: column; gap: 0.4rem; max-height: 46vh; overflow: auto; }
.bubble {
  max-width: 82%;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: #f6f0e6;
  white-space: pre-wrap;
}
.bubble.mine { margin-left: auto; background: var(--pine); color: #f3ecdf; }
#thread-form { display: grid; gap: 0.5rem; }
#thread-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.7rem;
  background: transparent;
  resize: vertical;
}
.thread-row { width: 100%; }
.live-form { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }
.live-form input { min-width: 8rem; }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; height: auto; min-height: 100%; }
  .poster { min-height: 48vh; }
  .poster-copy { padding: 1.4rem 1.2rem 1.5rem; }
  .poster h1 { font-size: 2.5rem; }
  .auth-card { padding: 1.4rem 1.2rem 2rem; }
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: 100dvh; }
  .side { border-right: none; border-bottom: 1px solid var(--line); padding: 0.7rem; }
  .side nav { display: flex; overflow: auto; }
  .who { display: none; }
  .profile-hero, .profile-stats { grid-template-columns: 1fr; }
  .places, .places.one, .places.two { grid-template-columns: 1fr; }
  .side-foot { margin-top: 0.6rem; }
  #view-start.on > .home, #view-reisen.on > *, #view-bilder.on > *, #view-freunde.on > *,
  #view-profil.on > *, #view-einstellungen.on > *, #view-person.on > *, #view-nachrichten.on > * {
    width: 100%;
  }
  .inbox { grid-template-columns: 1fr; }
  .stat-strip { max-width: calc(100% - 1.5rem); }
  h1 { font-size: 3rem; }
}

/* --- extras ------------------------------------------------------------ */
.extra-slot { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0; }
.extra-dialog { max-width: 760px; width: min(760px, 94vw); }
.extra-dialog .dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.review-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.review-photos figure { margin: 0; }
.review-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.review-photos figcaption { font-size: 0.8rem; color: var(--muted); }
.text.inline { padding: 0; font: inherit; }
.c-people { border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.8rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.c-people legend { padding: 0 0.3rem; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 0.35rem; }
.comments { border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.5rem; }
.comment { padding: 0.2rem 0; overflow-wrap: anywhere; }
.comment .small { font-size: 0.8rem; color: var(--muted); }
.comment-form { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.comment-form input { flex: 1 1 12rem; }
.comment-form .error { flex-basis: 100%; margin: 0; }
.badges h3 { margin: 0.4rem 0; font-size: 1.05rem; }
.badge-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.badge-chip { border: 1px dashed var(--line); color: var(--muted); border-radius: 999px; padding: 0.2rem 0.65rem; font-size: 0.85rem; }
.badge-chip.on { border: 1px solid var(--pine); background: var(--pine); color: var(--paper); }
#map-tools { align-items: center; gap: 0.6rem 1.2rem; }
.map-tool { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.92rem; }
.map-tool select, .map-tool input { font: inherit; }
.map-tool { white-space: nowrap; }
#map-tools { padding: 0.45rem 0.9rem; }
.note { display: flex; gap: 0.7rem; align-items: center; text-align: left; width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 0.55rem 0.2rem; color: inherit; font: inherit; cursor: pointer; }
.note.unread strong::before { content: "● "; color: var(--rust); }
.note .avatar { width: 2.2rem; height: 2.2rem; flex: none; }
.note-when { display: block; font-size: 0.8rem; }
.country-friends { margin-top: 1rem; }
.country-friends h3 { font-size: 1rem; margin: 0 0 0.4rem; }
.friend-here { display: flex; gap: 0.6rem; align-items: center; width: 100%; text-align: left; background: transparent; border: 0; padding: 0.35rem 0; color: inherit; font: inherit; cursor: pointer; }
.friend-here .avatar { width: 2rem; height: 2rem; flex: none; }

/* dark theme */
html[data-theme="dark"] {
  --paper: #1b1714;
  --ink: #efe6d8;
  --muted: #a99d8f;
  --line: #3d342c;
  --rust: #e0754f;
  --pine: #6fb3a6;
  --sand: #c9a04a;
  --sea: #16282b;
  --card: #25201b;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
html[data-theme="dark"] select,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] #composer-form select { background: #2b251f; color: var(--ink); }
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .side { background: #211c18; }
html[data-theme="dark"] .stat-strip,
html[data-theme="dark"] .legend { background: rgba(37, 32, 27, 0.96); }
html[data-theme="dark"] .home-banner,
html[data-theme="dark"] .hero-shot,
html[data-theme="dark"] .hero-empty,
html[data-theme="dark"] .cover,
html[data-theme="dark"] .shot img,
html[data-theme="dark"] .feed-photo,
html[data-theme="dark"] .avatar { background: #2e2722; }
html[data-theme="dark"] .vis-opt:has(input:checked) { background: #1f2f2c; }
html[data-theme="dark"] .bubble { background: #2e2722; }
html[data-theme="dark"] .bubble.mine { background: #2f5d55; color: var(--ink); }
html[data-theme="dark"] .primary { background: var(--ink); color: var(--paper); }
html[data-theme="dark"] .primary:hover { background: #d8cdbd; }
html[data-theme="dark"] dialog { background: var(--card); color: var(--ink); }
html[data-theme="dark"] .leaflet-tooltip { background: #2b251f; color: var(--ink); border-color: #3d342c; }
html[data-theme="dark"] .leaflet-bar a { background: #2b251f; color: var(--ink); }
.theme-select { margin-top: 0.4rem; }
.side .theme-select, html[data-theme="dark"] .side .theme-select, html[data-theme="dark"] .side .lang-select {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  padding: 0.25rem 0.15rem;
}
.offline-note { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 2000; margin: 0; padding: 0.5rem 0.9rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 0.9rem; box-shadow: var(--shadow); }
.offline-note[hidden] { display: none; }
.c-extras { display: grid; gap: 0.8rem; }
#c-vis-wrap { display: grid; gap: 0.35rem; font-size: 0.86rem; }
#c-vis { border: 1px solid var(--line); border-radius: 6px; padding: 0.58rem 0.7rem; }
.trip-lock { margin: 0.2rem 0 0; font-size: 0.82rem; color: var(--rust); }
.trip-lock::before { content: "🔒 "; }
.album-head { margin: 0.8rem 0 0.5rem; font-size: 1.05rem; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.8rem; }
.album { display: grid; gap: 0.35rem; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.album img, .album video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--line); box-shadow: var(--shadow); }
.album:hover img { filter: brightness(1.05); }
.slideshow { width: min(1000px, 96vw); max-width: 1000px; }
.slide-stage { display: grid; place-items: center; min-height: 50vh; background: #120d0a; border-radius: 8px; overflow: hidden; }
.slide-media { max-width: 100%; max-height: 70vh; object-fit: contain; display: block; }
.slide-bar { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.slide-bar .text { font-size: 1.1rem; }
.slide-caption { text-align: center; color: var(--muted); margin: 0.3rem 0 0; }
.album-open { margin-bottom: 0.4rem; }

/* --- extras 2 ---------------------------------------------------------- */
.plan-bar { margin-bottom: 1rem; }
.plan-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0.9rem 1rem; }
.plan-card.done { opacity: 0.85; }
.plan-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.plan-card h3 { margin: 0; font-size: 1.3rem; }
.plan-status { font-size: 0.85rem; color: var(--rust); white-space: nowrap; }
.plan-card.done .plan-status { color: var(--pine); }
.plan-stops { margin: 0.5rem 0; padding-left: 1.4rem; }
.plan-stops li { margin: 0.15rem 0; }
.plan-notes { white-space: pre-wrap; margin: 0.4rem 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: flex-end; align-items: center; margin-top: 0.5rem; }
.plan-dialog form { display: grid; gap: 0.6rem; }
.plan-dialog label > span { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.2rem; }
.plan-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.plan-stop-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.plan-stop { display: grid; grid-template-columns: 1.6rem minmax(8rem, 1.3fr) minmax(7rem, 1fr) 9.5rem 9.5rem auto; gap: 0.35rem; align-items: center; }
.plan-stop input, .plan-stop select { width: 100%; min-width: 0; }
.plan-num { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--rust); color: #fff; display: grid; place-items: center; font-size: 0.8rem; }
.plan-move { display: inline-flex; gap: 0.1rem; }
.plan-people { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }
@media (max-width: 760px) {
  .plan-stop { grid-template-columns: 1.6rem 1fr 1fr; }
  .plan-move { grid-column: 2 / 4; justify-content: flex-end; }
}
.route-stop { background: var(--rust); color: #fff; border: 2px solid #fff; border-radius: 50%; display: grid !important; place-items: center; font-size: 11px; font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.route-stop.done { background: var(--pine); }
.route-line { pointer-events: none; }
.plan-people input[type="checkbox"], #route-on, .lb-tabs input { width: auto; }
.plan-dialog { padding: 1.2rem 1.4rem; }
.board-block { margin-bottom: 1rem; }
.board-tabs { margin: 0.3rem 0 0.6rem; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.board-row { display: grid; grid-template-columns: 2rem 1fr auto; gap: 0.7rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.8rem; }
.board-row.me { border-color: var(--pine); }
.board-rank { font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; text-align: center; color: var(--muted); }
.board-rank.top1 { color: #b8860b; }
.board-rank.top2 { color: #7d8790; }
.board-rank.top3 { color: #a0522d; }
.board-value { font-weight: 600; white-space: nowrap; }
.board-row .feed-person { min-width: 0; }
.cal-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.cal-head h3 { margin: 0; font-size: 1.5rem; }
.cal-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1rem 1.2rem; }
.cal-month h4 { margin: 0 0 0.3rem; font-size: 0.95rem; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day { aspect-ratio: 1; display: grid; place-items: center; font-size: 0.68rem; color: var(--muted); background: var(--card); border-radius: 3px; }
.cal-day.blank { background: transparent; }
.cal-day.on { color: #fff; font-weight: 600; cursor: default; }
.cal-day.planned { opacity: 0.55; background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.35) 0 3px, transparent 3px 6px) !important; }
.cal-day.today { outline: 2px solid var(--ink); outline-offset: -1px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin: 0 0 0.9rem; font-size: 0.85rem; }
.cal-key { display: inline-flex; align-items: center; gap: 0.3rem; }
.cal-dot { width: 0.8rem; height: 0.8rem; border-radius: 3px; display: inline-block; }
.cal-dot.planned { background: repeating-linear-gradient(45deg, var(--muted) 0 2px, transparent 2px 4px); }
.cal-bars { display: flex; align-items: flex-end; gap: 0.5rem; overflow-x: auto; padding: 0.3rem 0; }
.cal-bar { display: grid; justify-items: center; gap: 0.2rem; background: transparent; border: 0; padding: 0; color: inherit; font: inherit; min-width: 2.6rem; }
.cal-bar-track { height: 120px; width: 1.6rem; display: flex; align-items: flex-end; background: var(--card); border-radius: 4px; }
.cal-bar-fill { width: 100%; background: var(--sand); border-radius: 4px; }
.cal-bar.on .cal-bar-fill { background: var(--rust); }
.cal-bar-n { font-size: 0.8rem; font-weight: 600; }
.cal-bar-y { font-size: 0.8rem; color: var(--muted); }
.bubble .msg-body { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .msg-meta { display: block; font-size: 0.72rem; opacity: 0.7; margin-top: 0.15rem; text-align: right; }
.msg-day { align-self: center; font-size: 0.78rem; color: var(--muted); margin: 0.4rem 0 0.1rem; }
.msg-trip { display: grid; gap: 0.1rem; border-left: 3px solid var(--rust); padding: 0.2rem 0 0.2rem 0.55rem; margin-bottom: 0.25rem; }
.bubble.mine .msg-trip .meta, .bubble.mine .msg-trip .text { color: inherit; opacity: 0.85; }
.msg-trip.hidden { font-style: italic; opacity: 0.75; }
.msg-when { font-size: 0.78rem; color: var(--muted); font-weight: 400; }
.plan-dialog .msg-trip { margin: 0.2rem 0 0.4rem; }
.msg-trip .text.inline { justify-self: start; text-align: left; }
.country-regions { margin-top: 1rem; }
.country-regions h3 { font-size: 1rem; margin: 0 0 0.3rem; }
.country-regions .check input { width: auto; }
.region-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; max-height: 14rem; overflow: auto; }
.region-chip { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.8rem; }
.region-chip.on, .region-chip.auto { background: var(--rust); border-color: var(--rust); color: #fff; }
.region-chip.auto:not(.on) { opacity: 0.8; }
.region-chip:disabled { cursor: default; }
.auth-providers { display: grid; gap: 0.5rem; margin-top: 0.4rem; }
.auth-or { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 0.2rem 0; }
.sso-button { display: block; text-align: center; text-decoration: none; border-radius: 6px; padding: 0.6rem 0.8rem; font-weight: 500; border: 1px solid var(--line); }
.sso-google { background: #fff; color: #1f1f1f; border-color: #747775; }
.sso-apple { background: #000; color: #fff; border-color: #000; }
.sso-card { margin-top: 1.2rem; }
.sso-card h3 { margin-top: 0; }
.sso-row { display: grid; grid-template-columns: 6rem 1fr auto; gap: 0.6rem; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.sso-link { text-decoration: none; }
.sso-password { display: grid; gap: 0.4rem; margin-top: 0.8rem; }
.sso-password label { display: grid; gap: 0.35rem; font-size: 0.86rem; }

/* batch 3: transport, UNESCO, entry links, currencies, collections, medals */
.e3-panel { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem; margin-bottom: 0.9rem; }
.e3-panel h3 { margin: 0 0 0.6rem; font-size: 1.05rem; }
.tr-icon { width: 1em; height: 1em; vertical-align: -0.12em; flex: none; }
.tr-icon.big { width: 1.5rem; height: 1.5rem; }
.tr-chip { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--pine); font-weight: 600; }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; }
.tr-tile { display: grid; gap: 0.2rem; border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.7rem; }
.tr-tile.empty { opacity: 0.6; }
.tr-head { display: flex; align-items: center; gap: 0.4rem; color: var(--pine); }
.tr-flight .tr-head { color: #2a6fa8; }
.tr-train .tr-head { color: #b84324; }
.tr-car .tr-head { color: #6d5a2c; }
.tr-ferry .tr-head { color: #1f7f8a; }
.tr-count { font-size: 1.6rem; line-height: 1; }
.tr-bar { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.tr-bar-fill { display: block; height: 100%; background: currentColor; color: var(--pine); }
.tr-flight .tr-bar-fill { color: #2a6fa8; }
.tr-train .tr-bar-fill { color: #b84324; }
.tr-car .tr-bar-fill { color: #a08a4c; }
.tr-ferry .tr-bar-fill { color: #1f7f8a; }
.c-transport { display: grid; gap: 0.2rem; margin-bottom: 0.6rem; }
.c-transport > span { font-size: 0.85rem; color: var(--muted); }
.unesco-pop strong { display: block; margin-bottom: 0.2rem; }
.unesco-pop p { margin: 0 0 0.4rem; }
.unesco-country { margin-top: 0.8rem; padding: 0.6rem 0.8rem; }
.unesco-country summary { cursor: pointer; font-weight: 600; }
.unesco-list { list-style: none; padding: 0; margin: 0.5rem 0; display: grid; gap: 0.25rem; max-height: 18rem; overflow: auto; }
.unesco-list li.on { color: var(--pine); font-weight: 600; }
.unesco-near { color: var(--rust); font-size: 0.85rem; margin-left: 0.3rem; }
.entry-box { border-top: 1px dashed var(--line); margin-top: 0.6rem; padding-top: 0.6rem; display: grid; gap: 0.5rem; }
.entry-box[hidden] { display: none; }
.entry-disclaimer { margin: 0; padding: 0.5rem 0.7rem; border-left: 3px solid var(--rust); background: rgba(184, 67, 36, 0.07); font-size: 0.88rem; }
.entry-pass { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.entry-country ul { margin: 0.2rem 0 0; padding-left: 1.1rem; }
.entry-country a { color: var(--pine); }
.currency-box summary { cursor: pointer; }
.currency-list { list-style: none; padding: 0; margin: 0.6rem 0; display: grid; gap: 0.35rem; }
.currency-list li { display: grid; grid-template-columns: 3rem 1fr; gap: 0 0.6rem; align-items: baseline; }
.cur-sym { grid-row: span 2; font-size: 1.3rem; font-weight: 700; color: var(--pine); text-align: center; }
.cur-where { font-size: 0.85rem; }
.coll-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0.9rem 1rem; }
.coll-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.coll-card h3 { margin: 0; font-size: 1.25rem; }
.coll-vis { font-size: 0.8rem; border-radius: 999px; padding: 0.1rem 0.55rem; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.coll-vis.vis-link { border-color: var(--pine); color: var(--pine); }
.coll-items { margin: 0.5rem 0; padding-left: 1.3rem; display: grid; gap: 0.25rem; }
.coll-note { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.9rem; }
.coll-url { width: 100%; }
.coll-rows { display: grid; gap: 0.4rem; }
.coll-item-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr auto; gap: 0.35rem; align-items: center; }
@media (max-width: 640px) { .coll-item-row { grid-template-columns: 1fr 1fr; } }
.coll-pin { background: #f2b632; color: #5a3a06; border: 2px solid #fff; border-radius: 50%; display: grid !important; place-items: center; font-size: 12px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 0.7rem; }
.medal { margin: 0; display: grid; justify-items: center; gap: 0.3rem; text-align: center; font-size: 0.8rem; color: var(--muted); border-radius: 10px; padding: 0.4rem 0.2rem; }
.medal:focus-visible { outline: 2px solid var(--pine); }
.medal.on { color: var(--ink); font-weight: 600; }
.medal-svg { width: 64px; height: 64px; transition: transform 0.2s ease; }
.medal.on .medal-svg { filter: drop-shadow(0 3px 5px rgba(36, 28, 22, 0.28)); }
.medal.on:hover .medal-svg, .medal.on:focus-visible .medal-svg { transform: translateY(-2px) rotate(-4deg) scale(1.05); }
.medal.off .medal-svg { opacity: 0.6; }
html[data-theme="dark"] .entry-disclaimer { background: rgba(184, 67, 36, 0.16); }
html[data-theme="dark"] .medal.off .medal-svg { opacity: 0.45; }
.leaflet-pane.unesco-pane { z-index: 450; }
.unesco-pane > svg { pointer-events: none; }
.badges.medals { flex: 1 1 100%; width: 100%; min-width: 0; }
#extra-person-collections > * { flex: 1 1 100%; }

/* --- batch 4: polish, grouped navigation, mobile shell, wonders ---------- */
:root { --radius: 10px; --radius-sm: 7px; --rust-soft: rgba(184, 67, 36, 0.09); --pine-soft: rgba(31, 74, 69, 0.08); --ease: cubic-bezier(0.2, 0.7, 0.2, 1); }
html[data-theme="dark"] { --rust-soft: rgba(224, 117, 79, 0.14); --pine-soft: rgba(111, 179, 166, 0.12); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.primary, .text, .mini, .pick button, .region-chip { transition: background-color 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.1s var(--ease), box-shadow 0.15s var(--ease); }
.primary { border-radius: var(--radius-sm); font-weight: 500; box-shadow: 0 1px 2px rgba(36, 28, 22, 0.18); }
.primary:hover { box-shadow: 0 3px 10px rgba(36, 28, 22, 0.18); }
.primary:active, .mini:active { transform: translateY(1px); }
.text { border-radius: var(--radius-sm); }
.text:hover { background: var(--rust-soft); }
.mini:hover, .pick button:hover { border-color: var(--pine); color: var(--pine); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--pine); }
input:focus-visible, textarea:focus-visible, select:focus-visible { box-shadow: 0 0 0 3px var(--pine-soft); }
a:focus-visible, label:focus-within { outline-color: var(--pine); }

/* consistent cards and spacing */
.card, .friend, .feed-card, .plan-card, .coll-card, .profile-card, .profile-hero, .thread, .e3-panel, .board-row, .profile-stats .stat, .tr-tile { border-radius: var(--radius); }
.feed-card, .plan-card, .coll-card, .card { transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease); }
.feed-card:hover, .plan-card:hover, .coll-card:hover, .card:hover { box-shadow: 0 6px 18px rgba(36, 28, 22, 0.07); }
.feed-card { gap: 0.55rem; padding: 1rem 1.1rem 1.05rem; }
.stack { gap: 0.9rem; }
.view-head { margin-bottom: 1.3rem; }
.view-head h2, .home-head h2 { font-size: clamp(1.9rem, 2.8vw, 2.4rem); line-height: 1.05; }
.view-head p { font-size: 0.98rem; line-height: 1.5; }
.quiet, .feed-block .quiet {
  margin: 0.4rem 0 0;
  padding: 1.1rem 1.2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 243, 0.55);
  color: var(--muted);
  max-width: none;
  line-height: 1.5;
}
html[data-theme="dark"] .quiet { background: rgba(37, 32, 27, 0.6); }
.loading { color: var(--muted); display: flex; align-items: center; gap: 0.6rem; margin: 0.6rem 0; }
.loading::before { content: ""; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--rust); animation: roam-spin 0.8s linear infinite; }
.error-state { color: var(--rust); padding: 0.9rem 1rem; border: 1px solid var(--rust); border-radius: var(--radius); background: var(--rust-soft); }
@keyframes roam-spin { to { transform: rotate(360deg); } }

/* views: one layout for every page except the map */
#view-planen.on, #view-kalender.on, #view-sammlungen.on, #view-wunder.on {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1.75rem 2rem 3rem;
}
#view-planen.on > *, #view-sammlungen.on > * { width: min(46rem, 100%); }
#view-kalender.on > *, #view-wunder.on > * { width: min(64rem, 100%); }
#view-reisen.on > *, #view-freunde.on > *, #view-profil.on > *, #view-einstellungen.on > *, #view-person.on > * { width: min(46rem, 100%); }
#view-nachrichten.on > * { width: min(56rem, 100%); }
.plan-bar, .coll-bar { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }

/* sidebar */
.side { gap: 0.9rem; padding: 1.25rem 0.9rem 1rem; }
.side-panel { display: contents; }
.side .mark { padding: 0 0.5rem; font-size: 1.95rem; }
.side .mark::after { content: ""; display: inline-block; width: 0.32rem; height: 0.32rem; border-radius: 50%; background: var(--rust); margin-left: 0.15rem; vertical-align: 0.05em; }
#new-trip { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.62rem 0.85rem; }
#new-trip .nav-icon { width: 1.05rem; height: 1.05rem; }
.nav-toggle { display: none; }
.side nav { display: grid; gap: 0.95rem; }
.nav-group { display: grid; gap: 0.08rem; }
.nav-heading { margin: 0 0 0.2rem; padding: 0 0.65rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); opacity: 0.85; }
.side nav button { justify-content: flex-start; gap: 0.6rem; padding: 0.45rem 0.65rem; border-left: 0; border-radius: var(--radius-sm); font-size: 0.95rem; transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.side nav button .nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side nav button .badge { margin-left: auto; }
.nav-icon { width: 1.1rem; height: 1.1rem; flex: none; opacity: 0.8; }
.side nav button.active { color: var(--rust); background: var(--rust-soft); font-weight: 500; }
.side nav button.active .nav-icon { opacity: 1; }
.side nav button:hover:not(.active) { background: rgba(36, 28, 22, 0.05); }
html[data-theme="dark"] .side nav button:hover:not(.active) { background: rgba(255, 255, 255, 0.05); }
.side-foot { border-top: 1px solid var(--line); padding-top: 0.7rem; gap: 0.25rem; }
.who { padding: 0 0.3rem; overflow-wrap: anywhere; }
.tabbar { display: none; }

/* map tools as chips */
#map-tools { gap: 0.4rem 0.5rem; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); background: var(--paper); margin: 0; }
.map-tool { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 0.22rem 0.7rem; font-size: 0.86rem; min-height: 2rem; }
.map-tool:has(input:checked) { border-color: var(--pine); background: var(--pine-soft); color: var(--pine); }
.map-tool select { border: 0; background: transparent; padding: 0.1rem 0.2rem; width: auto; }
.stat-strip, .legend { border-radius: var(--radius); box-shadow: 0 4px 14px rgba(36, 28, 22, 0.08); }
.country-panel { border-radius: 12px; }

/* messages */
.thread-row { text-align: left; }
.thread-row.on { border-color: var(--pine); background: var(--pine-soft); }
.thread-back { display: none; }
#thread-empty { color: var(--muted); }

/* toasts and busy bar */
.toasts { position: fixed; z-index: 3000; right: 1rem; bottom: 1rem; display: grid; gap: 0.5rem; width: min(24rem, calc(100% - 2rem)); }
.toast { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.7rem 0.6rem 0.7rem 0.95rem; border-radius: var(--radius); background: var(--ink); color: var(--paper); box-shadow: var(--shadow); border-left: 4px solid var(--rust); animation: toast-in 0.22s var(--ease); transition: opacity 0.35s, transform 0.35s; }
.toast.ok { border-left-color: var(--sand); }
.toast span { flex: 1; line-height: 1.4; }
.toast.out { opacity: 0; transform: translateY(6px); }
.toast-close { background: transparent; border: 0; color: inherit; opacity: 0.7; font-size: 1.1rem; line-height: 1; padding: 0.1rem 0.3rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.busy-bar { position: fixed; z-index: 3000; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; pointer-events: none; }
.busy-bar i { position: absolute; top: 0; bottom: 0; width: 35%; background: var(--rust); border-radius: 3px; animation: busy-slide 1.1s var(--ease) infinite; }
@keyframes busy-slide { from { left: -35%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .busy-bar i, .loading::before, .toast { animation: none; } }

/* wonders */
.wonder-section { display: grid; gap: 0.9rem; margin-bottom: 1.6rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 0.7rem; }
.section-head h3 { margin: 0; font-size: 1.35rem; }
.section-head .hint { margin: 0.2rem 0 0; font-size: 0.9rem; }
.progress-block { display: grid; gap: 0.3rem; justify-items: end; min-width: 9rem; }
.wonder-count { font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; font-weight: 520; }
.progress { display: block; width: 9rem; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--rust); border-radius: 3px; transition: width 0.4s var(--ease); }
.progress.full i { background: var(--pine); }
.wonder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: 0.75rem; }
.wonder-card { display: grid; grid-template-columns: auto 1fr; gap: 0.85rem; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 0.95rem 0.75rem; transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.wonder-card.on { border-color: var(--pine); box-shadow: inset 3px 0 0 var(--pine); }
.wonder-card h4 { margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 520; font-size: 1.12rem; letter-spacing: -0.02em; line-height: 1.15; }
.wonder-body { display: grid; gap: 0.2rem; min-width: 0; }
.wonder-emblem { width: 3rem; height: 3rem; }
.wonder-note { margin: 0.15rem 0 0; font-size: 0.84rem; color: var(--muted); line-height: 1.4; }
.wonder-near { margin: 0.1rem 0 0; font-size: 0.84rem; color: var(--rust); }
.wonder-card .row-actions { justify-content: space-between; margin-top: 0.45rem; }
.wonder-check { font-size: 0.9rem; }
.chip.on { font-size: 0.82rem; color: var(--pine); }
.banner-note { margin: 0 0 0.8rem; padding: 0.6rem 0.9rem; border-radius: var(--radius); background: var(--pine-soft); color: var(--pine); }
.wonder-pin { display: grid !important; place-items: center; border-radius: 50%; border: 2px solid #fff; font-size: 13px; line-height: 1; color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.wonder-pin.new { background: #1f4a45; }
.wonder-pin.ancient { background: #b0661f; }
.wonder-pin.on { box-shadow: 0 0 0 3px rgba(242, 182, 50, 0.85), 0 2px 6px rgba(0, 0, 0, 0.35); }
.pop-kicker { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 0.25rem; }
.pop-kicker.new { color: #1f4a45; }
.pop-kicker.ancient { color: #b0661f; }

/* mobile shell */
@media (max-width: 860px) {
  .app { grid-template-rows: auto minmax(0, 1fr) auto; }
  .side { position: relative; z-index: 1200; flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 0.5rem; padding: 0.55rem 0.75rem; overflow: visible; }
  .side .mark { font-size: 1.55rem; margin-right: auto; padding: 0 0.2rem; }
  #new-trip { width: auto; padding: 0.5rem 0.65rem; }
  #new-trip .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-sm); padding: 0.45rem 0.6rem; }
  .nav-toggle .nav-icon { width: 1.2rem; height: 1.2rem; }
  .nav-toggle-label { font-size: 0.9rem; }
  .side-panel { display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 8.5rem); overflow: auto; background: #f7f1e6; border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(36, 28, 22, 0.16); padding: 0.9rem 0.9rem 1rem; }
  html[data-theme="dark"] .side-panel { background: #211c18; }
  .side.open .side-panel { display: grid; gap: 0.9rem; }
  .side nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 0.6rem; overflow: visible; align-items: start; }
  .nav-group { align-content: start; }
  .side nav button { padding: 0.55rem 0.6rem; }
  .side-foot { margin-top: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
  .side-foot .who { display: block; grid-column: 1 / -1; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); background: #f7f1e6; padding: 0.25rem 0.25rem calc(0.25rem + env(safe-area-inset-bottom)); z-index: 1100; }
  html[data-theme="dark"] .tabbar { background: #211c18; }
  .tabbar button { position: relative; display: grid; justify-items: center; gap: 0.15rem; padding: 0.35rem 0.1rem 0.3rem; border: 0; background: transparent; color: var(--muted); font-size: 0.72rem; border-radius: var(--radius-sm); min-width: 0; }
  .tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar button .nav-icon { width: 1.35rem; height: 1.35rem; }
  .tabbar button.on { color: var(--rust); }
  .tab-dot { position: absolute; top: 0.3rem; right: calc(50% - 0.95rem); width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--rust); }
  .view, #view-start.on, #view-reisen.on, #view-bilder.on, #view-freunde.on, #view-profil.on, #view-einstellungen.on, #view-person.on, #view-nachrichten.on,
  #view-planen.on, #view-kalender.on, #view-sammlungen.on, #view-wunder.on { padding: 1.1rem 1rem 2rem; }
  #view-planen.on > *, #view-sammlungen.on > *, #view-kalender.on > *, #view-wunder.on > * { width: 100%; }
  #view-karte.on { height: 100%; }
  #view-karte.on { padding: 0; }
  #map { min-height: 0; }
  #map-tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0.45rem 0.6rem; }
  #map-tools::-webkit-scrollbar { display: none; }
  .map-tool { flex: none; }
  .view-head h2, .home-head h2 { font-size: 1.75rem; }
  .inbox:not(.has-thread) .thread { display: none; }
  .inbox.has-thread #thread-list { display: none; }
  .thread-back { display: inline-flex; margin: 0 0 0.3rem; padding-left: 0; }
  .thread { min-height: 0; }
  .toasts { bottom: 4.6rem; right: 0.75rem; width: calc(100% - 1.5rem); }
  .wonder-grid { grid-template-columns: 1fr; }
  .progress-block { justify-items: start; }
  .offline-note { bottom: 4.6rem; }
}

/* map-only mode and layer switcher */
.layer-switch { display: grid; justify-items: end; gap: 0.4rem; margin: 0 0.75rem 0.75rem 0; }
.layer-buttons { display: flex; gap: 0.35rem; }
.layer-toggle, .layer-mode { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 0.4rem 0.75rem; font-size: 0.86rem; box-shadow: 0 4px 14px rgba(36, 28, 22, 0.12); }
.layer-toggle:hover, .layer-mode:hover { border-color: var(--pine); color: var(--pine); }
.layer-switch.open .layer-toggle, .layer-mode.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.layer-list { display: grid; gap: 0.15rem; width: 15.5rem; max-height: min(26rem, 60vh); overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.65rem 0.75rem; box-shadow: var(--shadow); }
.layer-title { margin: 0 0 0.25rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.layer-row { padding: 0.25rem 0.1rem; font-size: 0.9rem; cursor: pointer; }
.layer-row:has(input:disabled) { opacity: 0.5; cursor: default; }
.layer-full { justify-self: start; margin-top: 0.3rem; padding-left: 0; }
.layer-hint { margin: 0.25rem 0 0; font-size: 0.75rem; color: var(--muted); line-height: 1.35; }
.labels-pane { z-index: 460; pointer-events: none; }
.regionlines-pane { z-index: 405; pointer-events: none; }
.regionlines-pane svg { pointer-events: none; }
.map-label { pointer-events: none; white-space: nowrap; }
.map-label span { display: inline-block; transform: translate(-50%, -50%); font-size: 11px; line-height: 1.1; color: #3d342c; text-shadow: 0 0 2px #f3ecdf, 0 0 3px #f3ecdf, 0 0 4px #f3ecdf; }
.map-label.city span { transform: translate(5px, -50%); }
.map-label.city span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 4px 1px -9px; border-radius: 50%; background: #3d342c; vertical-align: middle; }
.map-label.capital span { font-weight: 600; }
.map-label.country span { font-family: "Fraunces", Georgia, serif; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #6f6458; }
.map-label.country.big span { font-size: 13.5px; letter-spacing: 0.16em; }
.map-label.country.small span { font-size: 10px; letter-spacing: 0.06em; }
.regvisited-pane svg { pointer-events: none; }
html[data-theme="dark"] .map-label span { color: #e6dccd; text-shadow: 0 0 2px #1b1714, 0 0 3px #1b1714, 0 0 4px #1b1714; }
html[data-theme="dark"] .map-label.city span::before { background: #e6dccd; }
html[data-theme="dark"] .map-label.country span { color: #b5a897; }
.app.map-only { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.app.map-only .side, .app.map-only .tabbar, .app.map-only #map-tools, .app.map-only .stat-strip, .app.map-only .legend,
.app.map-only .country-panel, .app.map-only #view-karte .banner, .app.map-only #view-karte .home-banner { display: none !important; }
.app.map-only #view-karte.on { height: 100%; }
.app.map-only #map { min-height: 0; }
.app.map-only .leaflet-top.leaflet-left { bottom: 1rem; }
@media (max-width: 860px) {
  .layer-switch { margin: 0 0.6rem 0.6rem 0; }
  .layer-toggle span, .layer-mode span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .layer-toggle, .layer-mode { padding: 0.55rem; }
  .app.map-only { height: 100dvh; }
}
@media (max-width: 860px) { .legend { max-width: calc(100% - 7.5rem); } }

/* emergency card */
.em-dialog { width: min(640px, 96vw); max-width: 640px; padding: 1.1rem 1.25rem 1.3rem; }
.em-dialog .dialog-head h2 { font-size: 1.6rem; }
.em-wrap { display: grid; gap: 0.8rem; }
.em-body { display: grid; gap: 1.1rem; }
.em-card { display: grid; gap: 0.7rem; }
.em-country { margin: 0.2rem 0 0; font-size: 1.3rem; }
.em-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.55rem; }
.em-tile { display: grid; gap: 0.35rem; align-content: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.8rem; }
.em-tile.em-general { border-color: var(--rust); background: var(--rust-soft); }
.em-label { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.84rem; font-weight: 600; color: var(--muted); }
.em-general .em-label { color: var(--rust); }
.em-icon { width: 1.05rem; height: 1.05rem; flex: none; }
.em-numbers { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.em-number { display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-sm); padding: 0.3rem 0.65rem; }
.em-number b { font-family: "Fraunces", Georgia, serif; font-size: 1.55rem; font-weight: 560; letter-spacing: 0.02em; line-height: 1.1; }
.em-number:hover { border-color: var(--rust); }
.em-number.unverified { border-style: dashed; }
.em-flag { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rust); }
.em-src { font-size: 0.72rem; color: var(--muted); }
.em-warn { margin: 0; font-size: 0.85rem; padding: 0.5rem 0.7rem; border-left: 3px solid var(--sand); background: rgba(231, 192, 122, 0.15); border-radius: 4px; }
.em-embassy { border-top: 1px dashed var(--line); padding-top: 0.6rem; display: grid; gap: 0.45rem; }
.em-embassy h4 { margin: 0; font-size: 0.95rem; }
.em-links { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.25rem; }
.em-links a, .em-meta a { color: var(--pine); }
.em-pick { display: grid; gap: 0.3rem; font-size: 0.86rem; }
.em-meta { line-height: 1.5; }
.em-open { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--rust); }
.em-row { margin-top: 0.5rem; }
.layer-em { color: var(--rust); }

.regionlines-pane canvas { pointer-events: none; }
.leaflet-bottom.leaflet-right { display: flex; flex-direction: column; align-items: flex-end; }
.leaflet-control-attribution { order: 9; font-size: 10px; background: rgba(255, 250, 243, 0.85) !important; color: var(--muted); }
html[data-theme="dark"] .leaflet-control-attribution { background: rgba(37, 32, 27, 0.85) !important; }
.leaflet-container { touch-action: none; }
.map-label.town span { font-size: 10px; color: #574c41; }
.map-label.town span::before { width: 3px; height: 3px; }

/* batch 6: country facts, converter, countdown, album, document safe, heatmap */
.f6-facts, .f6-fx { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(61, 52, 44, 0.14); }
.f6-facts h4, .f6-fx h4 { margin: 0 0 8px; font-size: 0.95rem; }
.f6-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 0.9rem; }
.f6-list dt { color: #6f6458; }
.f6-list dd { margin: 0; }
.f6-plugs { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; }
.f6-val { white-space: nowrap; }
.f6-val.unverified { color: #8a5a2b; }
.f6-facts .em-flag, .f6-fx .em-flag { margin-left: 6px; }
.f6-fx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.f6-fx-row input { width: 7.5em; }
.f6-fx-row select { width: auto; }
.f6-out { font-weight: 600; font-size: 1.05rem; }
.countdown { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 14px; padding: 12px 16px; border: 1px solid rgba(201, 160, 74, 0.55); border-radius: 14px; background: linear-gradient(120deg, #fbf3e2, #f3e3c0); color: inherit; text-align: left; cursor: pointer; font: inherit; }
.countdown:hover { border-color: #c9a04a; }
.countdown-num { font-family: "Fraunces", Georgia, serif; font-size: 2.2rem; line-height: 1; color: #8f5f14; min-width: 2ch; text-align: center; }
.countdown-text { display: flex; flex-direction: column; gap: 2px; }
.countdown-text span { color: #6f6458; font-size: 0.9rem; }
html[data-theme="dark"] .countdown { background: linear-gradient(120deg, #2c251d, #3a2f20); border-color: #6b5530; }
html[data-theme="dark"] .countdown-num { color: #e6c27a; }
html[data-theme="dark"] .countdown-text span, html[data-theme="dark"] .f6-list dt { color: #b5a897; }
.f6-trip-row { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.f6-dialog { width: min(760px, 96vw); max-width: 760px; padding: 1.1rem 1.25rem 1.3rem; }
.f6-dialog .dialog-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.f6-dialog .dialog-head h2 { font-size: 1.5rem; margin: 0; }
.f6-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 10px 0; }
.f6-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.f6-upload { cursor: pointer; display: inline-flex; align-items: center; padding: 0.55rem 1rem; border-radius: 10px; background: var(--ink); color: #fbf7ef; font-weight: 600; }
.f6-upload:hover { opacity: 0.9; }
.f6-file:focus-visible + .f6-upload, .f6-upload:focus-within { outline: 2px solid #c9a04a; outline-offset: 2px; }
html[data-theme="dark"] .f6-upload { color: #1b1714; }
.f6-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.f6-shot { margin: 0; }
.f6-shot img, .f6-shot video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #e9dfcd; display: block; }
.f6-shot figcaption { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 0.8rem; color: #6f6458; margin-top: 4px; }
.f6-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.f6-doc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 10px 12px; border: 1px solid rgba(61, 52, 44, 0.14); border-radius: 10px; }
.f6-doc-name { font-weight: 600; word-break: break-word; }
.heat-legend { position: absolute; left: 10px; top: 10px; z-index: 500; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; max-width: calc(100% - 20px); padding: 6px 10px; border-radius: 10px; background: rgba(251, 247, 239, 0.92); font-size: 0.75rem; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.heat-step { display: inline-flex; align-items: center; gap: 4px; }
.heat-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
html[data-theme="dark"] .heat-legend { background: rgba(27, 23, 20, 0.9); color: #e6dccd; }
@media (max-width: 640px) {
  .f6-list { grid-template-columns: 1fr; gap: 2px; }
  .f6-list dd { margin-bottom: 6px; }
  .heat-legend { top: 84px; }
}

/* batch 7: region search + visited regions layer */
.regvisited-pane canvas { pointer-events: none; }
.region-search { width: 100%; margin: 6px 0 8px; }
.region-chip[hidden] { display: none; }
.region-none { margin: 4px 0; }
.country-panel.region-pick { display: none; }
.region-pick-btn { margin: 0 0 8px; }
.region-pickbar {
  position: absolute; z-index: 650; top: 0.75rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.35rem 0.75rem;
  width: max-content; max-width: calc(100% - 1.5rem);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.5rem 0.75rem; box-shadow: var(--shadow);
}
/* batch 8: place names stay out of the way while a zoom animation runs (hundreds of moving
   label layers made wheel and pinch zoom stutter); they come back as soon as the map settles */
.leaflet-zoom-anim .labels-pane { visibility: hidden; }
.roam-zooming .regionlines-pane, .roam-zooming .labels-pane { visibility: hidden; }

/* batch 9: bucket list, travel challenges, lazily loaded languages */
html.lang-loading body { visibility: hidden; }
.bucket-pin { background: none; border: 0; }
.bucket-pin span { display: block; width: 22px; height: 22px; background: var(--rust); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45)); }
.bucket-pin.done span { background: var(--pine); }
.bucket-body { display: grid; gap: 1rem; max-width: 760px; }
.bucket-progress { display: grid; gap: 0.5rem; }
.bucket-count { font-weight: 600; }
.bucket-list { list-style: none; margin: 0.4rem 0; padding: 0; display: grid; gap: 0.25rem; }
.bucket-item { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto auto; align-items: center; gap: 0.5rem; padding: 0.35rem 0.2rem; border-bottom: 1px solid var(--line); }
.bucket-item:last-child { border-bottom: 0; }
.bucket-check { width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 0.8rem; color: #fff; }
.bucket-item.done .bucket-check { background: var(--pine); border-color: var(--pine); }
.bucket-item.done .bucket-name { color: var(--pine); }
.bucket-tick input { width: 1.2rem; height: 1.2rem; accent-color: var(--pine); margin: 0; }
.bucket-name { overflow-wrap: anywhere; }
.bucket-state { font-size: 0.82rem; color: var(--muted); }
.bucket-add { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; margin-top: 0.5rem; }
.bucket-add label { display: grid; gap: 0.2rem; flex: 1 1 160px; }
.q-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; width: 100%; }
.q-fill { display: block; height: 100%; background: var(--pine); border-radius: 4px; width: 0; transition: width 0.3s ease; }
.quest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.8rem; }
.quest.medal { align-content: start; }
.quest figcaption { display: grid; gap: 0.2rem; justify-items: center; width: 100%; }
.bucket-place-country { color: var(--muted); font-size: 0.85rem; }
.quest .q-bar { margin-top: 0.15rem; }
.quest-count { font-variant-numeric: tabular-nums; font-size: 0.78rem; }
.quest-hint { font-size: 0.72rem; font-weight: 400; color: var(--muted); }
@media (max-width: 640px) {
  .bucket-item { grid-template-columns: 1.6rem minmax(0, 1fr) auto; }
  .bucket-item .bucket-state { grid-column: 2; grid-row: 2; }
  .quest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* batch 9b: 3D globe, public profile ------------------------------------- */
.globe-canvas { position: absolute; inset: 0; z-index: 450; width: 100%; height: 100%; display: block; background: var(--paper); cursor: grab; touch-action: none; outline: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.globe-canvas:active { cursor: grabbing; }
.globe-canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--pine-soft); }
.globe-on .leaflet-control-zoom, .globe-on .leaflet-control-attribution { display: none; }
.globe-on .leaflet-map-pane { visibility: hidden; }
.globe-on .heat-legend { display: none; }
.globe-zoom { position: absolute; z-index: 460; left: 0.75rem; bottom: 4.4rem; display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.globe-zoom button { width: 2.25rem; height: 2.25rem; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 1.25rem; line-height: 1; padding: 0; cursor: pointer; }
.globe-zoom button + button { border-top: 1px solid var(--line); }
.globe-zoom button:hover { background: var(--paper); }
.globe-zoom button:focus-visible { outline: 2px solid var(--pine); outline-offset: -2px; }
.globe-hint { position: absolute; z-index: 460; left: 50%; top: 4.5rem; transform: translateX(-50%); margin: 0; max-width: calc(100% - 2rem); width: max-content; padding: 0.4rem 0.8rem; border-radius: 14px; background: rgba(36, 30, 24, 0.82); color: #fbf7ef; font-size: 0.82rem; text-align: center; pointer-events: none; }
@media (max-width: 760px) { .globe-zoom { bottom: 4.6rem; left: 0.6rem; } .globe-hint { font-size: 0.78rem; max-width: calc(100% - 1.5rem); } }
.layer-mode.globe-toggle { display: inline-flex; align-items: center; gap: 0.35rem; }
.layer-mode.globe-toggle.on { background: var(--pine); color: var(--paper); border-color: var(--pine); }
.public-card .pub-linkrow { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.public-card .pub-link { flex: 1 1 14rem; min-width: 0; font-family: ui-monospace, "SFMono-Regular", monospace; font-size: 0.85rem; }
.public-card .pub-fields { display: grid; gap: 0.45rem; margin: 0.4rem 0; }
.public-card .pub-row { display: flex; gap: 0.5rem; align-items: flex-start; }
.public-card .pub-main { font-weight: 600; }
.public-card .pub-sub { display: block; color: var(--muted); font-size: 0.85rem; margin: 0.3rem 0 0; }
.public-card .pub-hint { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.public-card .pub-row strong { font-weight: 600; }
.public-card .pub-fields { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.6rem 0.8rem 0.8rem; }
.public-card .pub-fields legend { padding: 0 0.3rem; font-weight: 600; }
.public-card .pub-fields:disabled { opacity: 0.55; }
.public-card .pub-open { text-decoration: none; display: inline-flex; align-items: center; }
.public-card .pub-albums { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; }
.public-card .pub-album { display: inline-flex; gap: 0.35rem; align-items: center; }
html:has(body.public-page), body.public-page { height: auto; min-height: 100%; overflow: auto; }
body.public-page { background: var(--paper); }
.public-root { max-width: 980px; margin: 0 auto; padding: 1.2rem 1rem 3rem; display: grid; gap: 1.1rem; }
.public-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.public-head .lang-select { width: auto; }
.public-name { margin: 0.1rem 0 0; font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1.1; overflow-wrap: anywhere; }
.public-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 0.6rem; padding: 0.9rem; }
.public-stat strong { display: block; font-size: 1.6rem; color: var(--rust); }
.public-stat span { color: var(--muted); font-size: 0.9rem; }
.public-section h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.public-map { height: min(60vh, 460px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--sea); }
.pub-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.4rem; }
.pub-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.public-foot { border-top: 1px solid var(--line); padding-top: 0.8rem; display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; align-items: center; }
@media (max-width: 560px) { .public-stats { grid-template-columns: repeat(2, 1fr); } .pub-photos { grid-template-columns: repeat(3, 1fr); } }

/* batch 10: legal templates, account tools, reports ------------------------ */
html:has(body.legal-page), body.legal-page { height: auto; min-height: 100%; overflow: auto; background: var(--paper); }
.legal-doc { max-width: 760px; margin: 0 auto; padding: 1.2rem 1rem 3rem; line-height: 1.55; }
.legal-doc h1 { font-family: "Fraunces", Georgia, serif; font-size: clamp(1.6rem, 5vw, 2.3rem); margin: 0.6rem 0 1rem; }
.legal-doc h2 { font-size: 1.1rem; margin: 1.4rem 0 0.4rem; }
.legal-nav { font-size: 0.9rem; color: var(--muted); }
.legal-nav a, .legal-doc a { color: var(--pine); }
.legal-template { border: 2px dashed var(--rust); background: var(--rust-soft); border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; margin: 0.8rem 0; }
.legal-stand { color: var(--muted); font-size: 0.85rem; margin-top: 2rem; }
.report-dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); padding: 1rem 1.1rem; width: min(440px, calc(100vw - 2rem)); box-shadow: var(--shadow); }
.report-dialog::backdrop { background: rgba(36, 28, 22, 0.42); }
.report-dialog h3 { margin: 0 0 0.4rem; }
.report-dialog form { display: grid; gap: 0.6rem; }
.report-dialog label { display: grid; gap: 0.25rem; }
.report-dialog label.check { display: flex; gap: 0.5rem; align-items: center; }
.report-dialog textarea, .report-dialog input[type="password"] { width: 100%; }
.report-reasons { border: 0; padding: 0; margin: 0; display: grid; gap: 0.3rem; }
.report-reasons legend { font-weight: 600; margin-bottom: 0.2rem; }
.report-buttons { justify-content: flex-end; gap: 0.5rem; }
.report-btn { color: var(--muted); }
.report-btn:hover { color: var(--rust); }
.bubble .report-btn { margin-left: 0.4rem; padding: 0 0.3rem; font-size: 0.8rem; opacity: 0.6; }
.bubble:hover .report-btn, .bubble .report-btn:focus-visible { opacity: 1; }
.comment .report-btn { margin-left: 0.3rem; }
.thread-tools { display: flex; gap: 0.4rem; justify-content: flex-end; flex-wrap: wrap; }
#auth-forgot { justify-self: center; font-size: 0.92rem; }
.auth.register #auth-forgot, .auth.register .forgot-box { display: none; }
.forgot-box { display: grid; gap: 0.45rem; padding: 0.6rem 0.7rem; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.forgot-box .primary.small { justify-self: start; }
.auth-legal { text-align: center; font-size: 0.82rem; color: var(--muted); margin: 0.2rem 0 0; }
.auth-legal a, .legal-links a { color: var(--muted); }
.legal-links { display: flex; flex-wrap: wrap; gap: 0.2rem 0.4rem; }
.blocked-list { list-style: none; padding: 0; margin: 0.3rem 0 0; display: grid; gap: 0.3rem; }
.blocked-list li { display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; border-bottom: 1px solid var(--line); padding: 0.25rem 0; }
.delete-card { border-color: rgba(184, 67, 36, 0.45); }
.delete-card h3 { color: var(--rust); }
.danger { color: var(--rust); }
.primary.danger { background: var(--rust); color: #fff; border-color: var(--rust); }
.primary.danger:disabled { opacity: 0.45; cursor: not-allowed; }
.delete-form { display: grid; gap: 0.55rem; }
.delete-form label { display: grid; gap: 0.25rem; }
.delete-form label.check { display: flex; gap: 0.5rem; align-items: center; }
.delete-list { margin: 0; padding-left: 1.2rem; }
.admin-list { display: grid; gap: 0.6rem; margin-top: 0.5rem; }
.admin-report { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.55rem 0.7rem; background: var(--paper); }
.admin-report.status-open { border-left: 4px solid var(--rust); }
.admin-report blockquote { margin: 0.3rem 0; padding-left: 0.6rem; border-left: 3px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.admin-head { margin: 0; overflow-wrap: anywhere; }
.admin-media { max-width: 160px; max-height: 160px; border-radius: var(--radius-sm); display: block; margin: 0.3rem 0; }
.admin-actions { gap: 0.3rem; flex-wrap: wrap; }
#admin-filter { width: auto; }
.app.map-only .globe-zoom { bottom: 1rem; }

/* batch 12: map search (cities, regions, countries) */
.map-search { position: relative; z-index: 1200; padding: 0.55rem 0.9rem 0.1rem; background: var(--paper); }
.map-search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.map-search-icon { position: absolute; left: 1.65rem; top: 1.25rem; width: 1.1rem; height: 1.1rem; color: #7a6d60; pointer-events: none; }
.map-search-input { width: min(34rem, 100%); box-sizing: border-box; height: 2.6rem; padding: 0 0.9rem 0 2.6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 1rem; box-shadow: 0 2px 10px rgba(36, 28, 22, 0.06); }
.map-search-input:focus { outline: 2px solid var(--pine); outline-offset: 1px; border-color: transparent; }
.map-search-list, .map-search-card { position: absolute; left: 0.9rem; top: calc(100% + 0.2rem); width: min(34rem, calc(100% - 1.8rem)); box-sizing: border-box; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.map-search-list { max-height: min(60vh, 26rem); overflow-y: auto; padding: 0.3rem 0; }
.map-search-list[hidden], .map-search-card[hidden] { display: none; }
.search-group { margin: 0.45rem 0.9rem 0.15rem; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: #7a6d60; }
.search-option { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.5rem 0.9rem; cursor: pointer; }
.search-option.active, .search-option:hover { background: var(--paper); }
.search-option.active { box-shadow: inset 3px 0 0 var(--pine); }
.search-name { font-weight: 600; }
.search-context { color: #7a6d60; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-note { margin: 0.6rem 0.9rem; color: #7a6d60; }
.map-search-card { padding: 0.75rem 0.9rem; display: grid; gap: 0.55rem; }
.search-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; }
.search-card-head strong { display: block; font-size: 1.05rem; }
.search-close { font-size: 1.3rem; line-height: 1; padding: 0 0.2rem; }
.search-acts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.search-act { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 0.4rem 0.8rem; font: inherit; font-size: 0.9rem; cursor: pointer; }
.search-act.primary { background: var(--pine); border-color: var(--pine); color: #fbf7ef; }
.search-act:disabled { opacity: 0.55; cursor: progress; }
.search-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; font-size: 0.88rem; min-height: 0; }
.search-status:empty { display: none; }
.search-open { justify-self: start; font-size: 0.88rem; }
html[data-theme="dark"] .map-search-icon, html[data-theme="dark"] .search-group, html[data-theme="dark"] .search-context, html[data-theme="dark"] .search-note { color: #b5a897; }
@media (max-width: 760px) {
  .map-search { padding: 0.5rem 0.6rem 0.1rem; }
  .map-search-input { width: 100%; height: 2.75rem; font-size: 16px; }
  .map-search-icon { left: 1.35rem; top: 1.3rem; }
  .map-search-list, .map-search-card { left: 0.6rem; width: calc(100% - 1.2rem); }
  .search-act { padding: 0.55rem 0.9rem; }
}
.app.map-only .map-search { position: absolute; top: 0; left: 0; right: 0; background: transparent; pointer-events: none; }
.app.map-only .map-search > * { pointer-events: auto; }

/* batch 13: badge art */
.badge-art { overflow: visible; }
.medal.on .badge-art { filter: drop-shadow(0 2px 3px rgba(36, 28, 22, 0.32)); }
.medal.off .medal-svg.badge-art { opacity: 1; filter: grayscale(1) contrast(0.92); }
.medal.off .badge-art .badge-motif { opacity: 0.55; }
html[data-theme="dark"] .medal.off .medal-svg.badge-art { opacity: 0.85; filter: grayscale(1) brightness(1.05); }
html[data-theme="dark"] .medal.on .badge-art { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55)); }
.medal { cursor: pointer; }
.badge-shine { opacity: 0; }
.medal.fresh .badge-shine { animation: badge-shine 1.6s ease-in-out 0.3s 2 both; }
.medal.fresh .badge-art { animation: badge-pop 0.6s ease-out both; }
.medal.on:hover .badge-shine, .medal.on:focus-visible .badge-shine { animation: badge-shine 1.1s ease-in-out 1 both; }
@keyframes badge-shine { 0% { opacity: 0; transform: translateX(0) rotate(18deg); } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(110px) rotate(18deg); } }
@keyframes badge-pop { 0% { transform: scale(0.82); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .medal.fresh .badge-shine, .medal.on:hover .badge-shine, .medal.on:focus-visible .badge-shine, .medal.fresh .badge-art { animation: none; }
  .medal.fresh .badge-art { outline: 2px solid var(--gold, #d9a43a); outline-offset: 3px; border-radius: 12px; }
  .medal.on:hover .medal-svg, .medal.on:focus-visible .medal-svg { transform: none; }
}
.badge-dialog { border: 0; border-radius: 18px; padding: 1.4rem 1.4rem 1.2rem; width: min(92vw, 380px); text-align: center; background: var(--paper); color: var(--ink); box-shadow: 0 18px 50px rgba(20, 14, 10, 0.35); }
.badge-dialog::backdrop { background: rgba(20, 14, 10, 0.45); }
.badge-dialog-close { position: absolute; top: 0.5rem; right: 0.6rem; border: 0; background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0.2rem 0.5rem; }
.badge-dialog-art { display: grid; place-items: center; margin: 0.4rem 0 0.6rem; }
.badge-dialog-art .medal-svg { width: 168px; height: 168px; }
.badge-dialog-art .badge-art.locked { filter: grayscale(1); }
.badge-dialog h2 { margin: 0.2rem 0; font-size: 1.3rem; }
.badge-dialog-tier { margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; }
.badge-dialog-tier:empty { display: none; }
.badge-dialog-hint { margin: 0.6rem 0 0.3rem; }
.badge-dialog-state { margin: 0.2rem 0 0.6rem; font-weight: 600; }
.badge-dialog-progress { display: grid; gap: 0.3rem; justify-items: center; }
.badge-dialog-progress .q-bar { width: 100%; }
.badge-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.6rem 1.2rem; padding: 1rem; }
.badge-sheet-row { display: flex; align-items: center; gap: 0.6rem; }
.badge-sheet-row .medal-svg { width: 64px; height: 64px; flex: none; }
.badge-sheet-row .medal-svg[width="32"] { width: 32px; height: 32px; }
.badge-sheet-row .badge-art.locked { filter: grayscale(1) contrast(0.92); }
.badge-sheet-id { width: 7.5rem; font: 600 0.78rem/1.2 system-ui, sans-serif; color: var(--muted); }
.badge-sheet-row.tiers { grid-column: 1 / -1; }
.badge-sheet-host { background: var(--paper); color: var(--ink); position: relative; z-index: 5000; }

/* --- batch 15: error banner, offline banner, onboarding, reveal --------- */
.offline-note { display: none !important; }
.retry-btn { margin-left: 0.4rem; border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 0.25rem 0.6rem; }
.fail-bar, .offline-bar {
  position: fixed; z-index: 2600; left: 50%; transform: translateX(-50%); width: min(40rem, calc(100% - 1.5rem));
  display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 0.75rem 0.65rem 0.95rem; border-radius: 12px;
  box-shadow: var(--shadow); font-size: 0.93rem; line-height: 1.35;
}
.fail-bar { top: 0.75rem; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--rust); }
.fail-bar p, .offline-bar p { margin: 0; flex: 1; }
.fail-icon { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--rust); color: #fff; font-weight: 700; }
.fail-bar[data-kind="offline"] .fail-icon { background: var(--muted); }
.fail-actions { display: flex; gap: 0.35rem; align-items: center; }
.fail-actions .primary { white-space: nowrap; padding: 0.45rem 0.8rem; }
.fail-close { font-size: 1.2rem; padding: 0.2rem 0.45rem; }
.offline-bar { bottom: 1rem; background: var(--ink); color: var(--paper); }
.offline-bar[data-state="pending"], .offline-bar[data-state="syncing"] { background: var(--pine); }
.offline-bar .mini { background: transparent; color: inherit; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 6px; padding: 0.3rem 0.6rem; white-space: nowrap; }
.offline-dot { flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--sand); }
.offline-bar[data-state="syncing"] .offline-dot { animation: ob-pulse 1s ease-in-out infinite; }
@keyframes ob-pulse { 50% { opacity: 0.3; } }
body.offline-bar-on .toasts { bottom: 5.2rem; }

.ob { position: fixed; inset: 0; z-index: 2800; display: grid; place-items: center; padding: 1rem; background: rgba(36, 28, 22, 0.42); animation: ob-fade 0.25s ease-out; }
body.ob-open { overflow: hidden; }
@keyframes ob-fade { from { opacity: 0; } }
.ob-card {
  width: min(36rem, 100%); max-height: min(44rem, calc(100vh - 2rem)); overflow: auto; background: var(--card); color: var(--ink);
  border-radius: 18px; padding: 1.2rem 1.4rem 1rem; box-shadow: 0 24px 60px rgba(36, 28, 22, 0.28); display: flex; flex-direction: column; gap: 0.6rem;
  animation: ob-rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes ob-rise { from { transform: translateY(14px); opacity: 0; } }
.ob-top { display: flex; align-items: center; gap: 0.8rem; }
.ob-step { margin: 0; font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em; }
.ob-dots { display: flex; gap: 0.3rem; flex: 1; }
.ob-dots i { width: 1.6rem; height: 0.28rem; border-radius: 99px; background: var(--line); }
.ob-dots i.on { background: var(--rust); }
.ob-skip { margin-left: auto; color: var(--muted); }
.ob-welcome { margin: 0.2rem 0 0; color: var(--rust); font-weight: 600; font-size: 0.9rem; }
.ob-card h2 { font-size: 1.75rem; margin: 0; }
.ob-card h3 { margin: 0.3rem 0 0; font-size: 1rem; }
.ob-lead { margin: 0; color: var(--muted); }
.ob-search input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.85rem; background: #fff; font-size: 1rem; }
.ob-results { display: grid; gap: 0.15rem; margin-top: 0.3rem; }
.ob-results:empty { display: none; }
.ob-hit { display: flex; align-items: center; gap: 0.55rem; text-align: left; border: 0; background: transparent; padding: 0.5rem 0.6rem; border-radius: 8px; min-height: 44px; }
.ob-hit:hover, .ob-hit:focus-visible { background: var(--paper); }
.ob-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ob-chip { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0.42rem 0.8rem; min-height: 40px; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.ob-chip:active { transform: scale(0.96); }
.ob-chip.on { background: var(--rust); border-color: var(--rust); color: #fff; }
.ob-flag { font-size: 1.15rem; line-height: 1; }
.ob-picked { display: grid; gap: 0.35rem; }
.ob-picked .meta { margin: 0; color: var(--muted); font-size: 0.88rem; }
.ob-tabs { display: flex; gap: 0.3rem; overflow-x: auto; padding-bottom: 0.25rem; }
.ob-tabs button { flex: none; border: 1px solid var(--line); background: transparent; border-radius: 8px; padding: 0.4rem 0.7rem; min-height: 40px; }
.ob-tabs button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ob-region-chips { margin-top: 0.5rem; max-height: 18rem; overflow: auto; }
.ob-region-chips .ob-chip { font-size: 0.9rem; }
.ob-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-top: 0.4rem; position: sticky; bottom: -1rem; background: var(--card); padding: 0.6rem 0 0.2rem; }
.ob-foot .primary { min-width: 8rem; min-height: 44px; }
.ob-reveal {
  position: absolute; z-index: 1200; left: 50%; bottom: 1.5rem; transform: translate(-50%, 16px); opacity: 0; transition: opacity 0.4s, transform 0.4s;
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 0.9rem 1.2rem; text-align: center; min-width: 15rem;
}
.ob-reveal.in { opacity: 1; transform: translate(-50%, 0); }
.ob-reveal h3 { margin: 0 0 0.2rem; }
.ob-reveal p { margin: 0 0 0.6rem; color: var(--muted); }
#view-karte { position: relative; }
path.ob-pop { animation: ob-pop 0.65s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; transform-box: fill-box; transform-origin: center; }
@keyframes ob-pop { from { opacity: 0; transform: scale(0.6); } 60% { opacity: 1; } to { opacity: 1; transform: scale(1); } }
[data-theme="dark"] .ob-chip, [data-theme="dark"] .ob-search input { background: #2a231d; }
[data-theme="dark"] .ob-chip.on { background: var(--rust); }
@media (max-width: 760px) {
  .ob { padding: 0; place-items: stretch; }
  .ob-card { width: 100%; max-height: none; height: 100%; border-radius: 0; padding: 1rem 1rem 0.8rem; }
  .ob-card h2 { font-size: 1.5rem; }
  .ob-foot { margin-top: auto; bottom: -0.8rem; }
  .offline-bar { bottom: 4.6rem; }
  body.offline-bar-on .toasts { bottom: 9.2rem; }
  .ob-reveal { bottom: 5.4rem; }
  .fail-bar { top: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) { .ob, .ob-card, path.ob-pop, .offline-bar .offline-dot { animation: none; } }

/* licences page */
.legal-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line, #e3d6c2); }
.legal-table th { font-weight: 600; }
.legal-pre { white-space: pre-wrap; font-size: 12px; line-height: 1.45; padding: 12px; border: 1px solid var(--line, #e3d6c2); border-radius: 10px; background: rgba(0, 0, 0, 0.02); overflow-x: auto; }
.ip17-credit a { color: inherit; text-decoration: none; }
.ip17-credit a:hover { text-decoration: underline; }
@media (max-width: 640px) { .legal-table tr:first-child { display: none !important; } .legal-table, .legal-table tbody, .legal-table tr, .legal-table td, .legal-table th { display: block; } .legal-table tr { border-bottom: 1px solid var(--line, #e3d6c2); padding: 6px 0; } .legal-table td, .legal-table th { border: 0; padding: 2px 0; } }

/* batch 17b: legal pages follow the system dark mode (they load no script) and get roomy, tappable navigation */
@media (prefers-color-scheme: dark) {
  html:has(body.legal-page) { --paper: #1b1714; --ink: #efe6d8; --muted: #a99d8f; --line: #3d342c; --rust: #e0754f; --pine: #6fb3a6; --card: #25201b; --rust-soft: rgba(224, 117, 79, 0.14); color-scheme: dark; color: var(--ink); }
  body.legal-page .legal-pre { background: rgba(255, 255, 255, 0.03); }
}
body.legal-page { color: var(--ink); }
.legal-nav { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0; margin: 0 0 0.5rem; font-size: 0; }
/* gap as margin: the hidden " · " text nodes are flex items too, a column-gap indented wrapped lines (1.0.57) */
.legal-nav a, .legal-nav strong { margin-right: 1.1rem; }
.legal-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9rem; text-underline-offset: 3px; }
.legal-nav a:first-child { padding-left: 0; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
/* 1.0.57: language row of the licence pages (10 languages) */
.legal-langs { margin: -0.35rem 0 0.75rem; }
.legal-langs a, .legal-langs strong { margin-right: 0.85rem; }
.legal-langs a, .legal-langs a:first-child, .legal-langs strong { min-height: 36px; padding-left: 0; font-family: inherit; font-size: 0.85rem; font-weight: 400; color: var(--pine); text-decoration: underline; }
.legal-langs strong { display: inline-flex; align-items: center; font-weight: 600; color: var(--ink); text-decoration: none; }
.legal-doc h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.25rem; margin: 2rem 0 0.5rem; }
@media (max-width: 640px) { .legal-table td:first-child, .legal-table th:first-child { font-weight: 600; padding-top: 6px; } .legal-table tr { padding: 10px 0; } }
