/* ============================================================
   Interactieve kaart van Rotterdam centrum
   Overheidsstijl — wit, marineblauw, strakke lijnen
   ============================================================ */

:root {
  --white:      #FFFFFF;
  --surface:    #F4F6F9;
  --glass:      rgba(255, 255, 255, 0.82);
  --navy:       #154273;
  --navy-dark:  #0E2C4E;
  --ink:        #14263C;
  --ink-70:     #3C4C61;
  --ink-50:     #5F6E80;
  --ink-30:     #93A0AF;
  --line:       #D7DDE5;
  --line-soft:  #E6EAF0;
  --accent:     #154273;
  --danger:     #A93B2C;

  --font-sans: "Public Sans", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);

  --shadow-card:  0 1px 2px rgba(14, 44, 78, 0.06), 0 10px 28px rgba(14, 44, 78, 0.09);
  --shadow-float: 0 2px 4px rgba(14, 44, 78, 0.08), 0 18px 44px rgba(14, 44, 78, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Rijkslint — smalle marineblauwe lijn bovenaan */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--navy);
  z-index: 95;
  pointer-events: none;
}

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* ---------- Kaart ---------- */
.map {
  position: fixed;
  inset: 0;
  height: 100dvh;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1.2s var(--ease), transform 1.5s var(--ease);
}
.map.is-ready { opacity: 1; transform: scale(1); }
.map.is-drawing .maplibregl-canvas { cursor: crosshair !important; }

.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  padding: 2px 10px;
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--ink-50);
}
.maplibregl-ctrl-attrib a { color: var(--ink-50); text-decoration: none; }

/* ---------- Header met gradient naar de kaart ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  pointer-events: none;
  padding: clamp(1.5rem, 3.5vh, 2.5rem) clamp(1.25rem, 4vw, 4rem) 3.25rem;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  mask-image: linear-gradient(to bottom, black 0%, black 32%, transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 32%, transparent 92%);
}
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--white) 0%,
    rgba(255, 255, 255, 0.92) 36%,
    rgba(255, 255, 255, 0.55) 64%,
    rgba(255, 255, 255, 0) 100%
  );
}
.site-header__inner {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
}
.eyebrow__dot {
  width: 7px; height: 7px;
  background: var(--navy);
}

.site-title {
  margin-top: 1.15rem;
  font-weight: 750;
  font-size: clamp(1.7rem, 3.9vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: var(--ink);
}
.site-title__line { display: block; }
.site-title__line--em { color: var(--navy); }

.site-sub {
  margin-top: 0.95rem;
  max-width: 46ch;
  font-size: clamp(0.83rem, 1.2vw, 0.95rem);
  line-height: 1.6;
  color: var(--ink-50);
}

/* ---------- Reveal animaties ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: reveal 0.9s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Kaart-basis voor panelen ---------- */
.tip__core, .legend__core, .modal__core, .login__core, .editor__core, .admin-bar__core {
  background: var(--white);
  border: 1px solid var(--line);
}

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn:active { transform: scale(0.985); }
.btn--primary {
  background: var(--navy);
  color: var(--white);
  padding: 0.68rem 1.05rem;
}
.btn--primary:hover { background: var(--navy-dark); }
.btn__orb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s var(--ease);
}
.btn__orb svg { width: 0.95rem; height: 0.95rem; }
.btn:hover .btn__orb { transform: translateX(3px); }
.btn--ghost {
  padding: 0.66rem 1.05rem;
  border: 1px solid var(--line);
  color: var(--ink-70);
  background: var(--white);
}
.btn--ghost:hover { border-color: var(--ink-50); background: var(--surface); }

/* ---------- Legenda / story-panel ---------- */
.legend {
  position: fixed;
  top: clamp(7.5rem, 16vh, 10rem);
  right: 1.5rem;
  z-index: 40;
  width: 304px;
  max-height: calc(100dvh - 16rem);
  display: flex;
  flex-direction: column;
}
.legend[hidden] { display: none; }
.legend__shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow: var(--shadow-card);
  transition: transform 0.55s var(--ease), opacity 0.45s var(--ease);
}
.legend.is-collapsed .legend__shell {
  transform: translateX(calc(100% + 2rem));
  opacity: 0;
  pointer-events: none;
}
.legend__core {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-top: 3px solid var(--navy);
}
.legend__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1rem 1.1rem 0.8rem;
  border-bottom: 1px solid var(--line-soft);
}
.legend__kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
}
.legend__count {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-50);
  font-variant-numeric: tabular-nums;
}
.legend__list {
  list-style: none;
  overflow-y: auto;
  min-height: 0;
  padding: 0.4rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-30) transparent;
}
.legend__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.62rem 1.1rem;
  border-left: 3px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.legend__item:hover { background: var(--surface); }
.legend__item.is-active {
  background: var(--surface);
  border-left-color: var(--navy);
}
.legend__num {
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-30);
  width: 1.35rem;
  flex: none;
}
.legend__item.is-active .legend__num { color: var(--navy); }
.legend__swatch {
  width: 11px; height: 11px;
  flex: none;
  background: var(--sw, #154273);
  transition: transform 0.3s var(--ease);
}
.legend__item:hover .legend__swatch { transform: scale(1.2); }
.legend__name {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-70);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.legend__item.is-active .legend__name { color: var(--ink); font-weight: 600; }

.legend__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.7rem;
  border-top: 1px solid var(--line-soft);
}
.legend__navlabel {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-30);
}
.nav-btn {
  width: 2.1rem; height: 2.1rem;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-70);
  background: var(--white);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav-btn:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.nav-btn:active { transform: scale(0.95); }
.nav-btn svg { width: 0.9rem; height: 0.9rem; }

.legend__toggle {
  position: absolute;
  top: -0.55rem;
  right: 0;
  transform: translateY(-100%);
  width: 2.6rem; height: 2.6rem;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  transition: background-color 0.3s var(--ease);
}
.legend__toggle:hover { background: var(--white); }
.legend__toggle svg { width: 1rem; height: 1rem; }

/* ---------- Kaart-controls ---------- */
.map-controls {
  position: fixed;
  right: 1.5rem;
  bottom: 1.75rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}
.ctrl-btn {
  width: 2.65rem; height: 2.65rem;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-70);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.ctrl-btn + .ctrl-btn { border-top: 0; }
.ctrl-btn:hover { background: var(--navy); color: var(--white); }
.ctrl-btn svg { width: 1rem; height: 1rem; }

/* ---------- Tooltip ---------- */
.tip {
  position: fixed;
  left: 0; top: 0;
  z-index: 50;
  width: 324px;
  transform: translate(-50%, calc(-100% - 16px));
  pointer-events: none;
}
.tip--below { transform: translate(-50%, 20px); }
.tip[hidden] { display: none; }
.tip__shell {
  pointer-events: auto;
  box-shadow: var(--shadow-float);
  transform-origin: bottom center;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.tip--below .tip__shell { transform-origin: top center; }
.tip.is-hiding .tip__shell, .tip.is-entering .tip__shell {
  opacity: 0;
  transform: translateY(8px) scale(0.97);
}
.tip--below.is-hiding .tip__shell, .tip--below.is-entering .tip__shell {
  transform: translateY(-8px) scale(0.97);
}
.tip__core { overflow: hidden; position: relative; border-top: 3px solid var(--tip-accent, var(--navy)); }
.tip__media { height: 150px; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.tip__media img { width: 100%; height: 100%; object-fit: cover; }
.tip__body { padding: 1rem 1.1rem 1.1rem; }
.tip__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-50);
}
.tip__dot { width: 9px; height: 9px; background: var(--navy); }
.tip__title {
  margin-top: 0.5rem;
  font-weight: 700;
  font-size: 1.14rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.tip__text {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ink-70);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tip__more { margin-top: 0.9rem; width: 100%; }
.tip__close {
  position: absolute;
  top: 0.55rem; right: 0.55rem;
  width: 1.8rem; height: 1.8rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-70);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.tip__close:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.tip__close svg { width: 0.75rem; height: 0.75rem; }

/* ---------- Grote modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: clamp(0.75rem, 3vw, 2.5rem); }
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 38, 60, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.45s var(--ease);
}
.modal__shell {
  position: relative;
  width: min(1020px, 100%);
  max-height: min(86dvh, 760px);
  display: flex;
  box-shadow: var(--shadow-float);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.modal.is-entering .modal__backdrop, .modal.is-hiding .modal__backdrop { opacity: 0; }
.modal.is-entering .modal__shell, .modal.is-hiding .modal__shell {
  opacity: 0;
  transform: translateY(22px) scale(0.985);
}
.modal__core {
  position: relative;
  overflow: hidden;
  display: flex;
  min-width: 0;
  width: 100%;
  border-top: 4px solid var(--rule-color, var(--navy));
}
.modal__close {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  z-index: 5;
  width: 2.3rem; height: 2.3rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-70);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.modal__close:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.modal__close svg { width: 0.9rem; height: 0.9rem; }

.modal__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  width: 100%;
  min-height: 0;
}
.modal__grid.no-media { grid-template-columns: 1fr; }
.modal__gallery {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.9rem;
  min-height: 0;
  background: var(--surface);
  border-right: 1px solid var(--line-soft);
}
.modal__mainimg {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
}
.modal__mainimg img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.35s var(--ease);
}
.modal__mainimg img.is-swapping { opacity: 0; }
.modal__thumbs { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.modal__thumbs:empty { display: none; }
.modal__thumb {
  width: 3.3rem; height: 3.3rem;
  overflow: hidden;
  border: 1px solid var(--line);
  opacity: 0.6;
  padding: 0;
  transition: opacity 0.3s var(--ease), border-color 0.3s var(--ease);
}
.modal__thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal__thumb:hover { opacity: 1; }
.modal__thumb.is-active { opacity: 1; border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }

.modal__content {
  padding: clamp(1.5rem, 3.5vw, 2.6rem);
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-30) transparent;
}
.modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-50);
}
.modal__title {
  margin-top: 0.75rem;
  font-weight: 750;
  font-size: clamp(1.5rem, 2.7vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.modal__sub {
  margin-top: 0.7rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-70);
}
.modal__sub:empty { display: none; }
.modal__rule {
  margin: 1.3rem 0;
  height: 1px;
  background: var(--line);
  position: relative;
}
.modal__rule::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 3rem; height: 3px;
  background: var(--rule-color, var(--navy));
}
.modal__desc { font-size: 0.9rem; line-height: 1.8; color: var(--ink-70); }
.modal__desc p + p { margin-top: 1em; }

/* ---------- Lege staat ---------- */
.empty-note[hidden] { display: none; }
.empty-note {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.05rem;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  font-size: 0.78rem;
  color: var(--ink-70);
}
.empty-note__pulse, .admin-chip__pulse {
  width: 8px; height: 8px;
  background: var(--navy);
  animation: pulse 2.2s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(21, 66, 115, 0.4); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}

/* ---------- Admin: chip ---------- */
.admin-chip {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.55rem 0.5rem 0.95rem;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}
.admin-chip button {
  padding: 0.32rem 0.7rem;
  background: var(--navy);
  color: var(--white);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.3s var(--ease);
}
.admin-chip button:hover { background: var(--navy-dark); }

/* ---------- Admin: toolbar ---------- */
.admin-bar {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}
.admin-bar__core {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem;
  box-shadow: var(--shadow-float);
}
.admin-bar__sep { width: 1px; height: 1.5rem; background: var(--line); margin: 0 0.3rem; }
.tool {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-70);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.tool svg { width: 1rem; height: 1rem; }
.tool:hover { background: var(--surface); }
.tool.is-active { background: var(--navy); color: var(--white); }
.tool--danger:not(:disabled):hover { background: var(--danger); color: var(--white); }
.tool:disabled { opacity: 0.35; cursor: not-allowed; }
.admin-bar__hint {
  font-size: 0.72rem;
  color: var(--ink-50);
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  padding: 0.32rem 0.85rem;
}

/* ---------- Admin: editor-paneel ---------- */
.editor {
  position: fixed;
  top: 1rem; right: 1rem; bottom: 1rem;
  z-index: 70;
  width: min(400px, calc(100vw - 2rem));
  box-shadow: var(--shadow-float);
  transition: transform 0.55s var(--ease), opacity 0.45s var(--ease);
}
.editor[hidden] { display: none; }
.editor.is-entering, .editor.is-hiding {
  transform: translateX(calc(100% + 2rem));
  opacity: 0;
}
.editor__core {
  height: 100%;
  overflow-y: auto;
  padding: 1.35rem 1.3rem 1.5rem;
  border-top: 3px solid var(--navy);
  scrollbar-width: thin;
  scrollbar-color: var(--ink-30) transparent;
}
.editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line-soft);
}
.editor__kicker {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.editor__close {
  width: 2rem; height: 2rem;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-70);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.editor__close:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.editor__close svg { width: 0.8rem; height: 0.8rem; }

.field { display: block; margin-bottom: 1.05rem; }
.field__label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: 0.4rem;
}
.field__label em { font-style: normal; text-transform: none; letter-spacing: 0.01em; font-weight: 500; }
.field__input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.65rem 0.85rem;
  resize: vertical;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field__input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(21, 66, 115, 0.14);
}

.swatches { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.swatch {
  width: 1.9rem; height: 1.9rem;
  border: 1px solid rgba(20, 38, 60, 0.15);
  padding: 0;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.swatch:hover { transform: scale(1.1); }
.swatch.is-active {
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--navy);
}

.thumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.thumbs:empty { margin-bottom: 0; }
.thumbs__item {
  position: relative;
  width: 4rem; height: 4rem;
  overflow: hidden;
  border: 1px solid var(--line);
}
.thumbs__item img { width: 100%; height: 100%; object-fit: cover; }
.thumbs__remove {
  position: absolute;
  top: 2px; right: 2px;
  width: 1.25rem; height: 1.25rem;
  background: rgba(20, 38, 60, 0.8);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  line-height: 1;
  transition: background-color 0.3s var(--ease);
}
.thumbs__remove:hover { background: var(--danger); }

.upload {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border: 1.5px dashed var(--line);
  font-size: 0.78rem;
  color: var(--ink-50);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.upload:hover, .upload.is-drag { border-color: var(--navy); background: var(--surface); color: var(--ink-70); }
.upload svg { width: 1.1rem; height: 1.1rem; flex: none; }
.upload.is-busy { opacity: 0.5; pointer-events: none; }

.editor__actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.35rem;
}
.editor__status {
  margin-top: 0.8rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--navy);
  min-height: 1.2em;
}
.editor__status.is-error { color: var(--danger); }

/* ---------- Login ---------- */
.login { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1.5rem; }
.login__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 38, 60, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.login__shell { position: relative; width: min(400px, 100%); box-shadow: var(--shadow-float); }
.login__core { padding: 2.1rem 2rem 1.9rem; border-top: 4px solid var(--navy); }
.login__title {
  margin-top: 1rem;
  font-weight: 750;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.login__sub { margin: 0.55rem 0 1.3rem; font-size: 0.84rem; line-height: 1.6; color: var(--ink-70); }
.login__btn { width: 100%; margin-top: 0.8rem; }
.login__error {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--danger);
  min-height: 1.2em;
}
.login.is-hiding { opacity: 0; transition: opacity 0.45s var(--ease); }

/* ---------- Mobiel ---------- */
@media (max-width: 767px) {
  .site-header { padding: 1.2rem 1.15rem 3.5rem; }
  .site-sub { display: none; }

  .legend {
    top: auto;
    bottom: 8.4rem;
    right: 1rem;
    width: min(304px, calc(100vw - 2rem));
    max-height: 44dvh;
  }
  .legend__toggle {
    position: fixed;
    top: auto;
    bottom: 4.6rem;
    right: 1rem;
    transform: none;
  }

  .map-controls { bottom: 1.25rem; right: 1rem; flex-direction: row; }
  .ctrl-btn + .ctrl-btn { border-top: 1px solid var(--line); border-left: 0; }

  .tip {
    left: 50% !important;
    top: auto !important;
    bottom: 1rem;
    transform: translateX(-50%) !important;
    width: min(340px, calc(100vw - 1.5rem));
  }

  .modal { padding: 0.6rem; }
  .modal__shell { max-height: 94dvh; }
  .modal__grid { grid-template-columns: 1fr; overflow-y: auto; }
  .modal__gallery { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .modal__mainimg { aspect-ratio: 16 / 10; flex: none; }
  .modal__content { overflow-y: visible; }
  .modal__core { overflow-y: auto; }

  .tool span { display: none; }
  .tool { padding: 0.6rem; }
  .admin-bar__hint { display: none; }
  .admin-chip { top: auto; bottom: 5.5rem; right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
