/* The Mall Archive — shared styles */
:root {
  --teal: #1F4E4A;
  --teal-dark: #143532;
  --coral: #D9643A;
  --coral-dark: #B84E28;
  --cream: #F4EBDD;
  --paper: #FBF7F0;
  --ink: #1D2321;
  --muted: #5E6A66;
  --line: #E3D8C7;
  --surface: #fff;          /* cards, panels, inputs in focus */
  --on-teal: #F4EBDD;       /* text on teal buttons and bars */
  --header-bg: #FDFAF5;
  --header-line: #EADFCD;
  --header-highlight: rgba(255, 255, 255, .9);
  --overlay: rgba(251, 247, 240, .85);
  --map-bg: #e9e4da;
  --ok-bg: #E3F1EE;
  --err-bg: #FBE5DC;
  --err-line: #F0C3B0;
  --warm-bg: #FFF5EF;
  --anchor-bg: #FFF8EE;
  --anchor-line: #E9C38D;
  --anchor-chip: #FBE3C4;
  --disabled-bg: #ECE8E1;
  --skeleton-a: #F1EADF;
  --skeleton-b: #F8F3EB;

  --abandoned: #D9643A;
  --dying: #D9A13A;
  --demolished: #6B6F6E;
  --redeveloped: #3E8A7E;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 53, 50, .06), 0 8px 24px rgba(20, 53, 50, .08);
  --display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--coral); margin: 0 0 .75rem; }

/* ---------- Dark mode (near-black) ---------- */
[data-theme="dark"] {
  color-scheme: dark;
  --teal: #5FAEA2;
  --teal-dark: #0B0D0C;
  --coral: #E5764D;
  --coral-dark: #F08A62;
  --cream: #1E2220;
  --paper: #0C0E0D;
  --surface: #151817;
  --ink: #ECE6DC;
  --muted: #9AA39F;
  --line: #2A2F2D;
  --on-teal: #0C0E0D;
  --header-bg: #161918;
  --header-line: #2C312F;
  --header-highlight: rgba(255, 255, 255, .06);
  --overlay: rgba(12, 14, 13, .85);
  --map-bg: #1A1D1C;
  --ok-bg: #12302C;
  --err-bg: #3A1D14;
  --err-line: #6B3422;
  --warm-bg: #241A14;
  --anchor-bg: #231C12;
  --anchor-line: #5C4522;
  --anchor-chip: #3A2C17;
  --disabled-bg: #1A1D1C;
  --skeleton-a: #161918;
  --skeleton-b: #1F2321;
  --demolished: #8C918F;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .45);
}
[data-theme="dark"] .site-footer { border-top: 1px solid var(--line); }
[data-theme="dark"] .site-header .container { box-shadow: inset 0 1px 0 var(--header-highlight), 0 10px 30px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.4); }
[data-theme="dark"] .hero::before, [data-theme="dark"] .hero::after { opacity: .5; }
[data-theme="dark"] .status.dying { color: #E0B24F; }
[data-theme="dark"] .status.open { color: #7FA8E0; }
[data-theme="dark"] .anchor-tag { color: #E0A85A; }
/* Map tiles: flip the light map to a dark one */
[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
[data-theme="dark"] .leaflet-container { background: var(--map-bg); }
[data-theme="dark"] .leaflet-popup-content-wrapper, [data-theme="dark"] .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
[data-theme="dark"] .leaflet-control-attribution { background: rgba(12, 14, 13, .8) !important; color: var(--muted); }
[data-theme="dark"] .leaflet-bar a { background: var(--surface); color: var(--ink); border-color: var(--line); }

/* Theme switch in the footer */
.theme-toggle { display: inline-flex; align-items: center; gap: .45rem; margin-top: .5rem; border: 1px solid rgba(244, 235, 221, .35); background: transparent;
  color: #F4EBDD; font: 600 .82rem var(--body); padding: .35rem .8rem; border-radius: 999px; cursor: pointer; transition: background .15s, border-color .15s; }
.theme-toggle:hover { background: rgba(244, 235, 221, .1); border-color: rgba(244, 235, 221, .6); }
.theme-toggle.inline { color: var(--ink); border-color: var(--line); margin: 0; }
.theme-toggle.inline:hover { background: var(--cream); border-color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--teal); }
.brand img { height: 42px; width: auto; }
.brand span { font-family: var(--display); font-size: 1.05rem; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem;
  padding: .5rem .85rem; border-radius: 999px;
}
.nav a:hover { background: var(--cream); }
.nav a[aria-current="page"] { color: var(--teal); background: var(--cream); }
.nav a.btn { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 700 .95rem var(--body);
  padding: .8rem 1.35rem; border-radius: 999px; border: 2px solid transparent;
  background: var(--coral); color: #fff; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--coral-dark); transform: translateY(-1px); }
.btn.secondary { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn.secondary:hover { background: var(--teal); color: var(--on-teal); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero { padding: 5rem 0 4rem; position: relative; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--teal); }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 34rem; margin: 0 0 2rem; }
.hero .actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-badge { width: 100%; max-width: 440px; justify-self: center; filter: drop-shadow(0 18px 30px rgba(20,53,50,.18)); }
.hero::before {
  content: ""; position: absolute; inset: auto -10% -60% auto; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(217,100,58,.12), transparent 65%); pointer-events: none;
}

/* ---------- Stats strip ---------- */

/* ---------- Sections ---------- */
section.block { padding: 4.5rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); color: var(--teal); margin: 0; }

/* ---------- Mall cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.card .thumb { aspect-ratio: 16/10; background: var(--cream) center/cover no-repeat; display: grid; place-items: center; }
.card .thumb img.placeholder { width: 64px; opacity: .35; }
.card .body { padding: 1rem 1.1rem 1.2rem; }
.card h3 { font-size: 1.1rem; margin: .35rem 0 .2rem; color: var(--ink); }
.card .where { color: var(--muted); font-size: .9rem; margin: 0; }

.status {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: 999px; background: var(--cream); color: var(--ink);
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.abandoned { color: var(--abandoned); }
.status.dying { color: #A47515; }
.status.demolished { color: var(--demolished); }
.status.redeveloped { color: var(--redeveloped); }
.status.open { color: #3D6FB0; }

.empty { padding: 2.5rem; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* ---------- About ---------- */
.about { background: var(--cream); }
.about .container { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; align-items: start; }
.about h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); color: var(--teal); }
.about p { margin: 0 0 1rem; font-size: 1.05rem; }
.about ul { padding-left: 1.1rem; margin: 0 0 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-dark); color: rgba(244,235,221,.8); padding: 2.5rem 0; font-size: .9rem; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: #F4EBDD; }
.site-footer img { height: 46px; }

/* ---------- Map page ---------- */
body.map-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
#map { width: 100%; height: 100%; background: var(--map-bg); }

.leaflet-popup-content { font-family: var(--body); }


/* ---------- Forms ---------- */
.form-wrap { padding: 3.5rem 0 5rem; }
.form-wrap .intro { max-width: 640px; margin-bottom: 2rem; }
.form-wrap h1 { font-size: clamp(2rem, 4.5vw, 3rem); color: var(--teal); }
.form-wrap .intro p { color: var(--muted); font-size: 1.05rem; }
form.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; display: grid; gap: 1.6rem; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 1rem; }
legend { font-family: var(--display); font-size: 1.15rem; color: var(--teal); margin-bottom: .75rem; padding: 0; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
label { font-weight: 600; font-size: .92rem; display: grid; gap: .35rem; }
label .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input[type="text"], input[type="email"], input[type="number"], input[type="search"], input[type="url"], input[type="month"], select, textarea {
  font: inherit; font-weight: 400; padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,78,74,.15); background: var(--surface); }
textarea { min-height: 140px; resize: vertical; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.checkbox input { margin-top: .3rem; accent-color: var(--teal); width: 18px; height: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

#pickMap { height: 300px; border-radius: 10px; border: 1.5px solid var(--line); }

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center;
  background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--teal); background: var(--cream); }
.dropzone strong { color: var(--teal); }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.preview { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--cream); }
.preview img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.preview .size { font-size: .72rem; padding: .35rem .5rem; color: var(--muted); background: var(--surface); }
.preview .size b { color: var(--redeveloped); }
.preview button {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 14px; line-height: 1;
}
.notice { padding: 1rem 1.2rem; border-radius: 10px; font-weight: 600; }
.notice.ok { background: var(--ok-bg); color: var(--teal); }
.notice.err { background: var(--err-bg); color: var(--coral-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { padding: 3rem 0; }
  .hero .container, .about .container { grid-template-columns: 1fr; gap: 2rem; }
  .hero-badge { max-width: 300px; order: -1; }
  .brand span { display: none; }
  .nav a { padding: .45rem .6rem; font-size: .88rem; }
  form.panel { padding: 1.25rem; }
}
@media (max-width: 480px) {
  .nav a:not(.btn) { display: none; }
  .nav a.nav-map { display: inline-flex; }
}

/* Fixes */
.nav a.btn[aria-current="page"] { background: var(--coral); color: #fff; }
.form-wrap .intro .eyebrow { color: var(--coral); font-size: .78rem; }

/* Centred badge header */
.site-header .container { display: grid; grid-template-columns: 1fr auto 1fr; height: 76px; }
.site-header .brand img { height: 64px; width: auto; transition: transform .2s; }
.site-header .brand:hover img { transform: rotate(-3deg) scale(1.04); }
.nav-left { justify-self: start; }
.nav-right { justify-self: end; }
@media (max-width: 860px) {
  .site-header .container { height: 68px; }
  .site-header .brand img { height: 50px; }
}
@media (max-width: 480px) {
  .site-header .nav-left a:not(.nav-map) { display: none; }
  .site-header .nav-right .btn { padding: .55rem .85rem; font-size: .82rem; }
}

/* Archive page */
.archive-filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: .75rem; margin-bottom: .75rem; }
.form-wrap .count { color: var(--muted); font-size: .9rem; margin: 0 0 1.25rem; }
.card .blurb { color: var(--muted); font-size: .88rem; margin: .5rem 0 0; line-height: 1.5; }
@media (max-width: 860px) { .archive-filters { grid-template-columns: 1fr 1fr; } .archive-filters input { grid-column: 1 / -1; } }
@media (max-width: 480px) {
  .site-header .nav-left a.nav-archive { display: inline-flex; }
  .site-header .nav-left a { padding: .45rem .5rem; font-size: .84rem; }
}

/* Admin */
.admin-tabs { display: flex; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.admin-tabs button { font: 700 .9rem var(--body); padding: .55rem 1rem; border-radius: 999px; border: 2px solid var(--teal); background: transparent; color: var(--teal); cursor: pointer; }
.admin-tabs button.active { background: var(--teal); color: var(--on-teal); }
.admin-tabs .badge { display: inline-block; min-width: 1.4em; padding: 0 .35em; margin-left: .35rem; border-radius: 999px; background: var(--coral); color: #fff; font-size: .78rem; }
.admin-layout { display: grid; grid-template-columns: 320px 1fr; gap: 1.5rem; align-items: start; }
.admin-list { list-style: none; margin: 0; padding: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-height: 75vh; overflow-y: auto; }
.admin-list button { width: 100%; text-align: left; background: none; border: 0; padding: .75rem; border-radius: 10px; font: inherit; cursor: pointer; display: grid; gap: .1rem; }
.admin-list button:hover, .admin-list button.active { background: var(--cream); }
.admin-list small { color: var(--muted); }
.admin-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.admin-photos figure { margin: 0; position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.admin-photos img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.admin-photos button { position: absolute; top: 6px; right: 6px; border: 0; border-radius: 999px; background: rgba(0,0,0,.65); color: #fff; font: 600 .75rem var(--body); padding: .25rem .55rem; cursor: pointer; }
.admin-photos figure.removed img { opacity: .25; }
.admin-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.btn.danger { background: transparent; color: var(--coral-dark); border-color: var(--coral-dark); }
.btn.danger:hover { background: var(--coral-dark); color: #fff; }
.admin-meta { font-size: .85rem; color: var(--muted); margin: 0; }
.admin-user { font-size: .85rem; color: var(--muted); }
@media (max-width: 860px) { .admin-layout { grid-template-columns: 1fr; } .admin-list { max-height: 320px; } }
.nav a.btn.secondary { color: var(--teal); }
.nav a.btn.secondary:hover { color: var(--on-teal); }

/* Error state + contact */
.site-error { grid-column: 1 / -1; background: var(--err-bg); border: 1px solid var(--err-line); color: var(--ink); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.site-error strong { color: var(--coral-dark); font-size: 1.05rem; }
.site-error p { margin: .35rem 0 0; font-size: .95rem; }
.site-error a { color: var(--coral-dark); font-weight: 700; }
.map-error { position: absolute; inset: 0; z-index: 500; display: grid; place-items: center; padding: 1.5rem; background: var(--overlay); }
.map-error .site-error { max-width: 440px; }
#map { position: relative; }
.problem-banner { background: var(--coral-dark); color: #fff; text-align: center; padding: .6rem 1rem; font-size: .9rem; font-weight: 600; }
.problem-banner a { color: #fff; }
body.map-page .problem-banner { flex: none; }

/* ---------- Floating Liquid Glass header ---------- */
.site-header {
  position: sticky; top: 14px; z-index: 1000;
  background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 0 1rem; margin-top: 14px;
  pointer-events: none; /* only the bar itself is clickable */
}
.site-header .container {
  pointer-events: auto;
  position: relative;
  width: min(1120px, 100%);
  height: 64px;
  padding: 0 .6rem 0 1rem;
  border-radius: 22px;
  /* Solid, so the page never shows through */
  background: var(--header-bg);
  border: 1px solid var(--header-line);
  box-shadow:
    inset 0 1px 0 var(--header-highlight),
    0 10px 30px rgba(20,53,50,.12),
    0 2px 6px rgba(20,53,50,.06);
}
/* soft light sheen across the top of the glass */
.site-header .container::before {
  content: ""; position: absolute; inset: 1px 1px 50% 1px; border-radius: 21px 21px 40% 40% / 21px 21px 14px 14px;
  background: linear-gradient(180deg, var(--header-highlight), transparent);
  opacity: .5;
  pointer-events: none;
}
.site-header .nav { position: relative; z-index: 1; }
.site-header .nav a:hover { background: var(--cream); }
.site-header .nav a[aria-current="page"]:not(.btn) { background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); }

/* Logo floats in front of the bar, hanging below it */
.site-header .brand { position: relative; z-index: 2; align-self: start; margin-top: -10px; }
.site-header .brand img {
  height: 96px;
  filter: drop-shadow(0 10px 14px rgba(20,53,50,.28)) drop-shadow(0 2px 3px rgba(20,53,50,.18));
  transition: transform .25s ease, filter .25s ease;
}
.site-header .brand:hover img { transform: translateY(-2px) rotate(-3deg) scale(1.03); filter: drop-shadow(0 16px 20px rgba(20,53,50,.3)) drop-shadow(0 3px 4px rgba(20,53,50,.18)); }


/* Give the first section room for the hanging logo */
main > :first-child, .problem-banner { margin-top: 18px; }
.problem-banner { border-radius: 14px; width: min(1120px, 100% - 2rem); margin-inline: auto; }

/* Map page: header sits above the map */
body.map-page .site-header { flex: none; margin-bottom: 14px; }
body.map-page .map-layout { margin: 0 1rem 1rem; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }

@media (max-width: 860px) {
  .site-header .container { height: 58px; border-radius: 19px; }
  .site-header .brand img { height: 80px; }
}
@media (max-width: 480px) {
  .site-header { padding: 0 .6rem; top: 10px; margin-top: 10px; }
  .site-header .container { padding: 0 .4rem 0 .5rem; }
  .site-header .brand img { height: 72px; }
}
@media (prefers-reduced-motion: reduce) { .site-header .brand img { transition: none; } }
.site-header .container { align-items: center; }
.site-header .nav { align-self: center; }
.site-header .btn { white-space: nowrap; }
@media (max-width: 480px) {
  .site-header .nav-right .btn { padding: .5rem .75rem; font-size: .8rem; }
  .site-header .nav-left a { padding: .4rem .45rem; font-size: .82rem; }
}
/* keep the grid row at bar height so the logo can hang out without pushing the nav down */
.site-header .container { grid-template-rows: 100%; }
.site-header .brand { align-self: stretch; height: 100%; margin-top: 0; display: flex; align-items: flex-start; overflow: visible; }
.site-header .brand img { margin-top: -10px; flex: none; }
/* Map page: bar and map share the same full width */
body.map-page .site-header .container { width: 100%; }
body.map-page .problem-banner { width: auto; margin: 0 1rem 12px; }
/* Logo centred vertically on the bar (it overhangs equally above and below) */
.site-header { top: 30px; margin-top: 30px; }
.site-header .brand { align-items: center; }
.site-header .brand img { margin-top: 0; }
@media (max-width: 860px) { .site-header { top: 24px; margin-top: 24px; } }
@media (max-width: 480px) { .site-header { top: 20px; margin-top: 20px; } }
/* Clear the logo's overhang below the bar (+18px breathing room) */
main > :first-child, .problem-banner { margin-top: 34px; }
body.map-page .problem-banner { margin-top: 20px; }
body.map-page .site-header { margin-bottom: 30px; }
body.map-page .problem-banner + .map-layout { margin-top: 0; }
@media (max-width: 860px) { main > :first-child, .problem-banner { margin-top: 30px; } }
@media (max-width: 480px) { main > :first-child, .problem-banner { margin-top: 26px; } }
body.map-page .problem-banner { margin-top: 4px; }

/* =========================================================
   Accounts, mall pages, About page, admin queues
   ========================================================= */

/* Header account slot */
.site-header .nav-right { gap: .5rem; }
.account { display: inline-flex; align-items: center; min-height: 36px; }
.account:empty { display: none; }
.account .user-button { display: inline-flex; }
.site-header .nav a.nav-signin { font-weight: 700; color: var(--teal); }

/* Footer with About button */
.site-footer .container { align-items: center; }
.site-footer .footer-text { flex: 1; min-width: 240px; }
.site-footer .footer-text p { margin: .2rem 0; }
.site-footer .footer-about { background: #F4EBDD; color: #143532; }
.site-footer .footer-about:hover { background: #fff; color: #143532; }
.actions-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* Shared bits */
.muted { color: var(--muted); }
.loading { color: var(--muted); padding: 2rem 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--teal); text-decoration: underline; cursor: pointer; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 3000; box-shadow: var(--shadow); }

/* Mall page */
.mall-page { padding: 0 0 5rem; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--teal); font-weight: 600; }
.crumbs span { margin: 0 .35rem; }
.mall-head h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); color: var(--teal); margin: .5rem 0 .25rem; }
.mall-head .where { color: var(--muted); font-size: 1.1rem; margin: 0 0 2rem; }
.mall-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; align-items: start; }
.mall-main section { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.mall-main section:first-child { border-top: 0; padding-top: 0; }
.mall-main h2 { font-size: 1.45rem; color: var(--teal); display: flex; align-items: center; gap: .5rem; }
.mall-main h3 { font-family: var(--body); font-weight: 700; font-size: 1.05rem; margin: 0 0 .35rem; }
.history-text p, .addition p { margin: 0 0 1rem; font-size: 1.04rem; max-width: 68ch; }
.addition { margin-top: 1.25rem; padding-left: 1rem; border-left: 3px solid var(--line); }
.credit { font-size: .82rem; color: var(--muted); margin: .25rem 0 0; }
.count-pill { font-family: var(--body); font-size: .78rem; font-weight: 700; background: var(--cream); color: var(--teal); padding: .1rem .55rem; border-radius: 999px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .9rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--cream); }
.gallery figcaption { font-size: .8rem; color: var(--muted); margin-top: .3rem; }

.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.video { margin: 0; }
.video-thumb, .video iframe { position: relative; display: block; width: 100%; aspect-ratio: 16/9; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .15s; }
.video-thumb:hover img { opacity: 1; }
.video-thumb .play { position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%; background: rgba(217,100,58,.95); color: #fff; display: grid; place-items: center; font-size: 1.3rem; padding-left: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.video figcaption { margin-top: .45rem; font-weight: 600; }
.video figcaption a { color: var(--ink); }

.sources { padding-left: 1.3rem; margin: 0; }
.sources li { margin-bottom: .5rem; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.chips li { background: var(--cream); border: 1px solid var(--line); padding: .3rem .75rem; border-radius: 999px; font-size: .88rem; font-weight: 600; }

.infobox { position: sticky; top: 120px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.infobox-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.infobox table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.infobox th, .infobox td { text-align: left; padding: .6rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.infobox th { color: var(--muted); font-weight: 600; width: 38%; }
.mini-map { height: 190px; background: var(--map-bg); }
.map-link { display: block; padding: .6rem 1rem; font-size: .88rem; font-weight: 600; }
.infobox-actions { display: grid; gap: .5rem; padding: 0 1rem 1rem; }

/* Dialogs */
dialog.sheet { border: 0; border-radius: 20px; padding: 0; width: min(560px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); box-shadow: 0 30px 80px rgba(20,53,50,.3); color: var(--ink); background: var(--paper); }
dialog.sheet::backdrop { background: rgba(20,53,50,.35); backdrop-filter: blur(4px); }
dialog.sheet form { display: grid; gap: 1rem; padding: 1.5rem; }
dialog.sheet header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
dialog.sheet h2 { font-size: 1.35rem; color: var(--teal); margin: 0; }
dialog.sheet p { margin: 0; }
dialog.sheet .close { border: 0; background: var(--cream); width: 36px; height: 36px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; flex: none; }
dialog.sheet footer { display: flex; justify-content: flex-end; gap: .5rem; }
.type-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.type-pills input { position: absolute; opacity: 0; pointer-events: none; }
.type-pills span { display: inline-block; padding: .45rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; font-size: .88rem; cursor: pointer; background: var(--surface); }
.type-pills input:checked + span { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.type-pills input:focus-visible + span { box-shadow: 0 0 0 3px rgba(31,78,74,.25); }
.type-fields { display: grid; gap: .9rem; }
.type-fields[hidden] { display: none; }
.reasons { display: grid; gap: .5rem; }
.photo-preview { display: flex; align-items: center; gap: .75rem; font-size: .85rem; color: var(--muted); }
.photo-preview img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; }
.photo-preview b { color: var(--redeveloped); }

/* Auth pages */
.auth-page .intro { margin-inline: auto; text-align: center; }
.clerk-mount { display: flex; justify-content: center; min-height: 320px; }
.clerk-mount.wide { display: block; }
.clerk-mount.wide > * { margin-inline: auto; }
.gate { text-align: center; padding: 2.5rem 2rem; }
.gate h2 { color: var(--teal); }
.gate .actions-row { justify-content: center; margin-top: 1rem; }
.signed-in-as { margin: 0; padding: .75rem 1rem; background: var(--cream); border-radius: 10px; font-size: .92rem; }

/* About page (prose) */
.prose-wrap { max-width: 760px; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 3rem); color: var(--teal); }
.prose h2 { font-size: 1.5rem; color: var(--teal); margin-top: 2rem; }
.prose h3 { font-family: var(--body); font-weight: 700; font-size: 1.15rem; margin-top: 1.5rem; }
.prose p, .prose li { font-size: 1.06rem; }
.prose ul { padding-left: 1.2rem; }

/* Admin panels and queues */
.admin-panel[hidden] { display: none !important; }
.admin-subtabs { display: flex; gap: .4rem; margin-bottom: 1rem; }
.admin-subtabs button { font: 600 .85rem var(--body); padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.admin-subtabs button.active { background: var(--cream); border-color: var(--teal); color: var(--teal); }
.queue { display: grid; gap: 1rem; }
.queue-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; display: grid; gap: .75rem; box-shadow: var(--shadow); }
.queue-item header { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; }
.queue-item h3 { margin: 0; font-family: var(--body); font-size: 1.05rem; font-weight: 700; }
.queue-body { margin: 0; white-space: normal; }
.queue-photo, .queue-item .yt img { max-width: 260px; border-radius: 10px; border: 1px solid var(--line); }
.type-tag { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px; background: var(--cream); color: var(--teal); }
.type-tag.correction, .type-tag.report { background: var(--err-bg); color: var(--coral-dark); }
.about-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.about-editor textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.about-preview { position: sticky; top: 120px; max-height: 75vh; overflow-y: auto; padding: 1.5rem 2rem; }
.about-preview h1 { font-size: 1.8rem; }
code { background: var(--cream); padding: .05rem .35rem; border-radius: 5px; font-size: .9em; }

@media (max-width: 900px) {
  .mall-layout { grid-template-columns: 1fr; }
  .infobox { position: static; order: -1; }
  .about-editor { grid-template-columns: 1fr; }
  .about-preview { position: static; max-height: none; }
}
@media (max-width: 480px) {
  .site-header .nav-left a.nav-about { display: none; }
}

[hidden] { display: none !important; }
/* Clerk forms fill the page width */
.clerk-mount, .clerk-mount.wide { display: block; width: 100%; }
.clerk-mount > * { width: 100%; }
.year-input { font-variant-numeric: tabular-nums; }
/* Clerk forms fill the page width */
.clerk-mount, .clerk-mount.wide { display: block; width: 100%; }
.clerk-mount > * { width: 100%; }
.year-input { font-variant-numeric: tabular-nums; }

/* Centred home hero */
.hero.hero-centered { padding: 4.5rem 0 4rem; text-align: center; }
.hero.hero-centered .container { display: block; max-width: 900px; }
.hero.hero-centered h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); text-wrap: balance; margin-bottom: 1.25rem; }
.hero.hero-centered .lead { margin: 0 auto 2rem; max-width: 44rem; text-wrap: pretty; }
.hero.hero-centered .actions { justify-content: center; }
.hero.hero-centered::before { inset: auto auto -70% 50%; transform: translateX(-50%); }
@media (max-width: 860px) { .hero.hero-centered { padding: 2.75rem 0 3rem; } }
.account-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }

/* Buttons in the top bar keep their colours when hovered or pressed */
.site-header .nav a.btn:hover, .site-header .nav a.btn:active, .site-header .nav a.btn:focus-visible { background: var(--coral-dark); color: #fff; }
.site-header .nav a.btn[aria-current="page"] { background: var(--coral); color: #fff; }
.site-header .nav a.btn[aria-current="page"]:hover { background: var(--coral-dark); }
.site-header .nav a.btn.secondary:hover { background: var(--teal); color: var(--on-teal); }

/* Featured this week */
.featured { padding-top: 0; }
.featured .card { border-color: var(--coral); }
/* Compact About block on the home page */
.about.about-compact .container { display: block; max-width: 760px; text-align: center; }
.about.about-compact p { font-size: 1.12rem; margin: 0 0 1rem; }
.about.about-compact p:last-child { margin-bottom: 0; }
/* Footer second line */
.site-footer .footer-secondary { font-size: .85rem; opacity: .85; }
/* Admin feature toggle */
.feature-toggle { background: var(--warm-bg); border: 1px solid var(--err-line); padding: .75rem 1rem; border-radius: 10px; }
.photo-credits { font-size: .85rem; color: var(--muted); margin: .75rem 0 0; }

/* ---------- Retailers / stores ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.form-wrap.archive-page { padding-top: 1.25rem; }
legend .optional { font-family: var(--body); font-size: .85rem; color: var(--muted); font-weight: 400; }
.fieldset-hint { margin: -.5rem 0 0; color: var(--muted); font-size: .85rem; }
label.compact { grid-template-columns: auto 1fr; align-items: center; column-gap: .75rem; }
label.compact .hint { grid-column: 2; grid-row: 1; }
label.compact input { grid-column: 1 / -1; padding: .5rem .75rem; font-size: .9rem; }
.muted.small, p.small { font-size: .85rem; }

.rlogo { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 7px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.rlogo.mono { display: inline-flex; align-items: center; justify-content: center; color: #fff; border: 0; font: 700 .68rem/1 var(--body); letter-spacing: .02em; }
.rlogo.big { width: 56px; height: 56px; border-radius: 12px; font-size: 1.05rem; padding: 4px; }
.rlogo.mono.big { padding: 0; }

.store-picker { display: grid; gap: .75rem; }
.store-search { position: relative; }
.store-results {
  position: absolute; z-index: 1000; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: .3rem; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 340px; overflow-y: auto;
}
.store-results li { display: flex; align-items: center; gap: .6rem; padding: .45rem .55rem; border-radius: 8px; cursor: pointer; font-size: .92rem; }
.store-results li.active, .store-results li[data-id]:hover { background: var(--cream); }
.store-results li .country { margin-left: auto; color: var(--muted); font-size: .78rem; }
.store-results li.none { cursor: default; color: var(--muted); font-size: .85rem; }
.store-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.store-chips:empty { display: none; }
.store-chips li { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .3rem .25rem .3rem; background: var(--cream); border-radius: 999px; font-size: .88rem; font-weight: 600; }
.store-chips li .rlogo { width: 24px; height: 24px; border-radius: 50%; }
.store-chips button { border: 0; background: transparent; font-size: 1.1rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 .35rem; }
.store-chips button:hover { color: var(--coral); }

.store-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5rem; margin: 0 0 .75rem; padding: 0; list-style: none; }
.store-list li { display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; font-weight: 600; min-width: 0; }
.store-list li span { overflow: hidden; text-overflow: ellipsis; }
.store-review li .checkbox { align-items: center; flex: 1; }
.store-review li .checkbox input { margin-top: 0; }

.btn.small { padding: .35rem .75rem; font-size: .8rem; }
.retailer-admin { display: grid; grid-template-columns: 1fr 280px; gap: 1.25rem; align-items: start; }
.retailer-toolbar, .retailer-add { display: grid; grid-template-columns: 2fr 1fr; gap: .6rem; margin-bottom: .6rem; }
.retailer-add { grid-template-columns: 2fr 1fr auto; }
.retailer-rows { display: grid; gap: .5rem; }
.retailer-row { display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; }
.retailer-logo { display: flex; justify-content: center; }
.retailer-fields { display: grid; grid-template-columns: 1.6fr 1.2fr auto; gap: .5rem; align-items: center; }
.retailer-fields input[type="text"] { padding: .5rem .65rem; }
.retailer-fields .colour input { width: 40px; height: 38px; padding: 2px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.retailer-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: flex-end; max-width: 300px; }
.retailer-actions .admin-meta { width: 100%; text-align: right; margin: 0; }
.retailer-other { position: sticky; top: 100px; padding: 1.1rem; }
.retailer-other h3 { font-family: var(--body); font-weight: 700; font-size: 1rem; margin: 0 0 .3rem; }
.retailer-other ul { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .5rem; max-height: 60vh; overflow-y: auto; }
.retailer-other li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .9rem; }
@media (max-width: 980px) {
  .retailer-admin { grid-template-columns: 1fr; }
  .retailer-other { position: static; }
  .retailer-row { grid-template-columns: 56px 1fr; }
  .retailer-actions { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  .retailer-actions .admin-meta { width: auto; text-align: left; }
  .retailer-fields { grid-template-columns: 1fr auto; }
  .retailer-fields [name=name] { grid-column: 1 / -1; }
}

/* Year closed when the mall is still open */
label.is-disabled { color: var(--muted); }
input:disabled { background: var(--disabled-bg); color: var(--muted); border-color: var(--line); cursor: not-allowed; opacity: .7; }

/* Anchor stores */
.store-chips li { padding-right: .2rem; }
.anchor-toggle { font: 600 .72rem var(--body) !important; color: var(--muted) !important; border: 1px solid var(--line) !important; background: var(--surface) !important; border-radius: 999px; padding: .15rem .5rem !important; }
.anchor-toggle:hover { border-color: var(--teal) !important; color: var(--teal) !important; }
.store-chips li.is-anchor { background: var(--anchor-chip); }
.store-chips li.is-anchor .anchor-toggle { background: var(--teal) !important; border-color: var(--teal) !important; color: #fff !important; }
.store-anchor-hint { margin: -.25rem 0 0; }
.store-other { display: grid; gap: .35rem; }
.store-other[hidden] { display: none; }
.store-other-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.store-group { font-family: var(--body); font-weight: 700; font-size: .95rem; color: var(--muted); margin: .25rem 0 .5rem; text-transform: uppercase; letter-spacing: .04em; }
.store-list.anchors li { border-color: var(--anchor-line); background: var(--anchor-bg); padding: .6rem .7rem; font-size: .95rem; }
.store-list.anchors .rlogo { width: 36px; height: 36px; font-size: .8rem; }
.store-review li { flex-wrap: wrap; }
.store-review .anchor-check { width: auto; margin-left: auto; font-size: .8rem; }
.anchor-tag { margin-left: auto; font-size: .75rem; font-weight: 700; color: #A0661B; }
.store-picker .hint, .fieldset-hint, .type-fields > .hint { font-size: .82rem; color: var(--muted); font-weight: 400; }

/* Photo captions */
.preview input.caption, .admin-photos input.caption { width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: .45rem .55rem; font-size: .8rem; background: var(--surface); }
.preview input.caption:focus, .admin-photos input.caption:focus { outline: 2px solid var(--teal); outline-offset: -2px; }
.gallery figcaption .cap { color: var(--ink); font-weight: 600; }

/* ---------- Smoothness ---------- */
/* Pages cross-fade into each other (Chrome, Edge and Safari; other browsers just load normally) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
.site-header { view-transition-name: site-header; }

@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Cards rise in one after another, lift on hover, and their photos fade in */
.card { animation: fade-up .4s ease both; animation-delay: calc(var(--i, 0) * 35ms); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(20, 53, 50, .06), 0 16px 32px rgba(20, 53, 50, .12); }
.card:active { transform: translateY(-1px); }
.card .thumb { position: relative; overflow: hidden; }
.card .thumb img.fade { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease, transform .4s ease; }
.card:hover .thumb img.fade { transform: scale(1.04); }
img.fade { opacity: 0; transition: opacity .35s ease; }
img.fade.loaded { opacity: 1; }

/* Loading placeholders */
.card.skeleton { min-height: 250px; pointer-events: none; box-shadow: none;
  background: linear-gradient(90deg, var(--skeleton-a) 25%, var(--skeleton-b) 50%, var(--skeleton-a) 75%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }

/* Buttons and focus */
.btn:active { transform: scale(.97); }
a:focus-visible, button:focus-visible, .btn:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(31, 78, 74, .45); outline-offset: 2px; border-radius: 6px; }
input, select, textarea { transition: border-color .15s, box-shadow .15s; }

/* Gallery photos fade in too */
.gallery img, .infobox-photo { transition: opacity .35s ease; }

/* Admin messages float at the bottom of the screen */
#message:empty { display: none; }
.toast-msg { position: fixed; left: 50%; bottom: 5.5rem; transform: translateX(-50%); z-index: 3000; margin: 0 !important;
  width: max-content; max-width: min(560px, calc(100% - 2rem)); padding: .8rem 2.6rem .8rem 1.1rem; box-shadow: var(--shadow); animation: fade-up .25s ease both; }
.toast-close { position: absolute; top: 50%; right: .6rem; transform: translateY(-50%); border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: inherit; opacity: .6; }

/* Admin: photos (cover + captions), videos and sources */
.admin-photos { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.admin-photos figure.is-cover { outline: 3px solid var(--coral); outline-offset: -3px; }
.admin-photos .cover-tag { position: absolute; top: 6px; left: 6px; background: var(--coral); color: #fff; font: 700 .72rem var(--body); padding: .2rem .5rem; border-radius: 999px; }
.admin-photos .photo-cover { top: auto; bottom: 44px; right: 6px; }
.admin-extras { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.admin-extras li { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.extra-form { display: grid; grid-template-columns: auto 2fr 1.5fr 1.5fr auto; gap: .5rem; }
@media (max-width: 860px) { .extra-form { grid-template-columns: 1fr 1fr; } .extra-form [name=extra_url] { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  img.fade { opacity: 1; }
  @view-transition { navigation: none; }
}
.admin-photos .added-tag { position: absolute; top: 6px; left: 6px; background: rgba(31, 78, 74, .85); color: #fff; font: 700 .68rem var(--body); padding: .2rem .5rem; border-radius: 999px; }
.admin-photos .is-cover .added-tag { top: 32px; }

/* ---------- Map page: the whole screen is the map ---------- */
body.map-page .map-layout { position: relative; display: block; flex: 1; min-height: 0; }
body.map-page #map { position: absolute; inset: 0; }
.map-controls {
  position: absolute; z-index: 600; top: 14px; left: 14px; right: 14px; max-width: 520px;
  display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center;
  padding: .55rem; background: var(--header-bg); border: 1px solid var(--header-line); border-radius: 16px; box-shadow: var(--shadow);
}
.map-controls input, .map-controls select { padding: .55rem .8rem; font-size: .92rem; background: var(--paper); }
.map-controls .count { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); padding: 0 .3rem; margin-top: -.15rem; }
.map-corner { position: absolute; z-index: 500; left: 14px; bottom: 14px; display: flex; align-items: center; gap: .6rem; font-size: .8rem;
  background: var(--header-bg); border: 1px solid var(--header-line); border-radius: 999px; padding: .25rem .8rem .25rem .3rem; box-shadow: var(--shadow); }
.map-corner a { color: var(--muted); }
.map-corner .theme-toggle { border: 0; padding: .3rem .6rem; }
.leaflet-bottom.leaflet-right .leaflet-control-zoom { margin: 0 14px 40px 0; border: 1px solid var(--header-line); box-shadow: var(--shadow); border-radius: 12px; overflow: hidden; }

/* Pins */
.pin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .15s ease; }
.leaflet-marker-icon:hover .pin { transform: scale(1.2); }
.leaflet-marker-icon.selected .pin { transform: scale(1.45); box-shadow: 0 0 0 4px rgba(217, 100, 58, .35), 0 3px 10px rgba(0,0,0,.4); }
.leaflet-marker-icon.selected { z-index: 10000 !important; }

/* Details panel that slides up from the bottom */
.map-sheet {
  position: absolute; z-index: 700; left: 50%; bottom: 14px; width: min(640px, calc(100% - 28px));
  transform: translate(-50%, calc(100% + 30px)); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  display: grid; grid-template-columns: 200px 1fr; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.25), var(--shadow);
}
.map-sheet.open { transform: translate(-50%, 0); }
.map-sheet.no-photo { grid-template-columns: 1fr; }
.map-sheet .sheet-photo { display: block; background: var(--cream); }
.map-sheet .sheet-photo img { width: 100%; height: 100%; object-fit: cover; min-height: 180px; }
.map-sheet .sheet-body { padding: 1.1rem 3.2rem 1.2rem 1.2rem; display: grid; gap: .35rem; align-content: start; }
.map-sheet h2 { font-size: 1.35rem; color: var(--teal); margin: .2rem 0 0; }
.map-sheet .where { color: var(--muted); font-size: .9rem; margin: 0; }
.map-sheet .sheet-text { font-size: .9rem; margin: .2rem 0 .4rem; line-height: 1.5; }
.map-sheet .btn { justify-self: start; padding: .55rem 1rem; font-size: .88rem; }
.sheet-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--cream); color: var(--ink); font-size: 1.35rem; line-height: 1; display: grid; place-items: center; transition: background .15s; }
.sheet-close:hover { background: var(--line); }
@media (max-width: 640px) {
  .map-sheet { grid-template-columns: 1fr; bottom: 10px; width: calc(100% - 20px); max-height: 70%; overflow-y: auto; }
  .map-sheet .sheet-photo img { min-height: 0; height: 150px; }
  .map-sheet .sheet-body { padding: 1rem 1.1rem 1.1rem; }
  .sheet-close { background: rgba(0,0,0,.55); color: #fff; }
  .map-sheet.no-photo .sheet-close { background: var(--cream); color: var(--ink); }
  .map-controls { top: 10px; left: 10px; right: 10px; }
  .map-corner { display: none; }
  .leaflet-bottom.leaflet-right .leaflet-control-zoom { margin-bottom: 14px; }
}
.admin-photos input.caption.source { font-size: .75rem; color: var(--muted); }
.photo-upload { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: .5rem; align-items: center; }
.photo-upload #uploadStatus { grid-column: 1 / -1; }
@media (max-width: 760px) { .photo-upload { grid-template-columns: 1fr; } }
.site-footer .footer-mission { max-width: 560px; font-style: italic; opacity: .85; margin: .45rem 0 .6rem !important; }
.map-sheet .status { justify-self: start; }
.admin-extras .extra-text { flex: 1; min-width: 0; display: grid; }
.admin-extras .extra-text a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-extras .extra-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-extras .link-btn.danger { color: var(--coral-dark); }
.admin-extras li.editing { align-items: start; }
.extra-edit { flex: 1; display: grid; gap: .45rem; }
.extra-edit input { padding: .5rem .7rem; font-size: .9rem; }
.extra-edit-actions { display: flex; gap: .4rem; }

/* ---------- Support page ---------- */
.support-page .container { max-width: 1040px; }
.support-hero { text-align: center; max-width: 640px; margin: 0 auto 2.2rem; }
.support-hero h1 { color: var(--teal); font-size: clamp(1.9rem, 4vw, 2.6rem); margin: .3rem 0 .8rem; line-height: 1.15; }
.support-intro p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin: 0 0 .8rem; }
.support-intro p:last-child { margin-bottom: 0; }
.support-hero h1, .support-intro { transition: opacity .25s ease; }
.support-hero.intro-loading h1, .support-hero.intro-loading .support-intro { opacity: 0; }
.support-tiers { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 1rem; align-items: stretch; }
.tier {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem;
  padding: 1.6rem 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tier:hover { transform: translateY(-4px); border-color: var(--teal); box-shadow: 0 2px 4px rgba(20,53,50,.06), 0 16px 32px rgba(20,53,50,.12); }
.tier.popular { border: 2px solid var(--coral); padding: calc(1.6rem - 1px) calc(1.1rem - 1px) calc(1.2rem - 1px); }
.tier.skeleton { min-height: 270px; box-shadow: none; background: linear-gradient(90deg, var(--skeleton-a) 25%, var(--skeleton-b) 50%, var(--skeleton-a) 75%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
.tier-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--coral); color: #fff; font: 700 .72rem var(--body); letter-spacing: .06em; text-transform: uppercase; padding: .35rem .8rem; border-radius: 999px; }
.tier-icon { width: 44px; height: 44px; padding: 10px; box-sizing: content-box; border-radius: 50%; background: var(--cream);
  fill: none; stroke: var(--teal); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .3rem; }
.tier.popular .tier-icon { stroke: var(--coral); }
.tier-name { font-weight: 700; font-size: 1rem; }
.tier-amount { font-family: var(--display); font-size: 2.3rem; line-height: 1.1; color: var(--teal); }
.tier.popular .tier-amount { color: var(--coral); }
.tier-text { color: var(--muted); font-size: .88rem; line-height: 1.45; flex: 1; }
.tier .btn { margin-top: .7rem; width: 100%; justify-content: center; }
.tier-custom {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; padding: 1.1rem 1.3rem;
  background: var(--cream); border: 1px dashed var(--line); border-radius: 16px; color: inherit; text-decoration: none; transition: border-color .2s;
}
.tier-custom:hover { border-color: var(--teal); }
.tier-custom .btn { flex: 0 0 auto; }
.support-secure { display: flex; align-items: center; justify-content: center; gap: .55rem; margin: 1.6rem auto 0; white-space: nowrap;
  color: var(--muted); font-size: .88rem; text-align: left; }
.support-secure svg { flex: 0 0 auto; color: var(--teal); }
.support-off { text-align: center; max-width: 560px; margin: 0 auto; }
@media (max-width: 860px) { .support-tiers { grid-template-columns: repeat(2, 1fr); row-gap: 1.4rem; } }
@media (max-width: 480px) { .tier-custom { flex-direction: column; align-items: stretch; text-align: center; } }

/* Admin: support settings */
.support-admin { display: grid; gap: .9rem; max-width: 720px; }
.support-admin h3 { margin: .4rem 0 0; font-family: var(--body); font-size: 1rem; font-weight: 700; }
.support-admin > p.hint { margin: -.5rem 0 0; font-size: .85rem; color: var(--muted); }
.support-links { display: grid; gap: .7rem; }
.switch-row { display: grid !important; grid-template-columns: auto auto 1fr; align-items: start; gap: .75rem; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 46px; height: 26px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; margin-top: 2px; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--teal); }
.switch-row input:checked + .switch::after { transform: translateX(20px); }
.switch-row input:focus-visible + .switch { outline: 3px solid rgba(31, 78, 74, .45); outline-offset: 2px; }
.tier-edit { border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem 1rem; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.tier-edit legend { font: 700 .8rem var(--body); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 .4rem; }
.tier-edit:not([data-tier]) { grid-template-columns: 1fr; }
.tier-edit-preview .tier-icon { width: 34px; height: 34px; margin: 0; }
.tier-edit-fields { display: grid; grid-template-columns: 1.6fr .8fr 1.2fr; gap: .6rem; }
.tier-edit-fields .wide { grid-column: 1 / -1; }
.tier-edit input, .tier-edit select { padding: .5rem .7rem; font-size: .92rem; }
@media (max-width: 640px) { .tier-edit { grid-template-columns: 1fr; } .tier-edit-fields { grid-template-columns: 1fr 1fr; } .tier-edit-fields label:first-child { grid-column: 1 / -1; } }

/* ---------- Home: slim stats bar ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); text-align: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: .8rem .5rem; margin: 0 auto .5rem; box-shadow: 0 1px 2px rgba(20,53,50,.04);
}
.stats > div { display: flex; align-items: baseline; justify-content: center; gap: .5rem; padding: .15rem .5rem; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats strong { font-family: var(--display); font-size: 1.45rem; font-weight: 400; color: var(--teal); line-height: 1.2; }
.stats span { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: .4rem; }
  .stats > div:nth-child(3) { border-left: 0; }
  .stats > div { flex-direction: column; align-items: center; gap: 0; }
}

/* Featured this week: three wider cards with a short history */
.featured-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.featured-cards .card .thumb { aspect-ratio: 16 / 9; }

/* Floorplans */
.gallery.floorplans img { object-fit: contain; background: #fff; }
.admin-floorplans figure { display: grid; }
.admin-floorplans img { object-fit: contain; background: #fff; }
.plan-credit { display: grid; grid-template-columns: 1fr auto; gap: .3rem; align-items: center; padding: .3rem; border-top: 1px solid var(--line); }
.plan-credit input.caption { border-top: 0 !important; }
.plan-upload { grid-template-columns: 1fr auto; }
.admin-img-failed { min-height: 60px; background: var(--cream); }
.featured-auto { font-size: .82rem; line-height: 1.25; align-items: center !important; }
.featured-auto .hint { font-size: .72rem; }
.feature-toggle.auto-on { opacity: .5; }
.feature-toggle.auto-on::after { content: "Auto-pick is on"; font-size: .75rem; color: var(--muted); margin-left: .5rem; }
@media (max-width: 640px) { .support-secure { white-space: normal; max-width: 420px; } }
.admin-floorplans .plan-credit button { position: static !important; inset: auto !important; margin: 0; }
/* Home: Recently archived and Featured this week sit closer together */
section.block.recent-block { padding-bottom: 1.5rem; }
section.block.recent-block + section.block.featured { padding-top: 1.5rem; }

/* Documents */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.doc-list a { display: flex; align-items: center; gap: .9rem; padding: .6rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.doc-list a:hover { border-color: var(--teal); transform: translateY(-1px); }
.doc-thumb { width: 56px; height: 72px; flex: 0 0 auto; border-radius: 6px; object-fit: cover; background: var(--cream); border: 1px solid var(--line); }
.doc-thumb.pdf { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--coral); text-decoration: none; }
.doc-thumb.pdf svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.doc-thumb.pdf b { font: 800 .65rem var(--body); letter-spacing: .06em; }
.doc-text { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.doc-text small { color: var(--muted); }
.doc-open { color: var(--teal); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.admin-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.admin-docs li { display: flex; align-items: center; gap: .7rem; padding: .5rem .7rem; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.admin-docs .doc-thumb { width: 44px; height: 56px; }
.doc-fields { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.doc-fields input { padding: .45rem .6rem; font-size: .88rem; }
.doc-upload { grid-template-columns: 1fr 1fr auto; }
@media (max-width: 700px) { .doc-fields { grid-template-columns: 1fr; } .doc-upload { grid-template-columns: 1fr; } }

/* Footer buttons: Support, then Discord underneath */
.footer-buttons { display: flex; flex-direction: column; align-items: stretch; gap: .55rem; }
.footer-buttons:not(:has(a:not([hidden]))) { display: none; }
.site-footer .footer-discord { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: #5865F2; color: #fff; }
.site-footer .footer-discord[hidden] { display: none; }
.site-footer .footer-discord:hover { background: #4752C4; color: #fff; }
.footer-discord svg { width: 1.2em; height: 1.2em; flex: 0 0 auto; }
.discord-admin .test-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

.support-message { display: grid; gap: .7rem; margin-bottom: 1.4rem; }
.support-message textarea { min-height: 8rem; }

/* Status dates */
.status-since { margin-left: .5rem; font-size: .82rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.status-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; font-size: .88rem; }
.status-timeline span { color: var(--muted); }
.month-input { min-width: 9.5rem; }
.status-history { margin: -.2rem 0 1rem; padding: .6rem .8rem; background: var(--paper); border: 1px dashed var(--line); border-radius: 10px; font-size: .88rem; }
.status-history ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.status-history li { margin: .15rem 0; }
.status-history li.new { color: var(--muted); font-style: italic; }

/* Discord achievements */
.achievements { list-style: none; margin: .6rem 0 .8rem; padding: 0; display: grid; gap: .7rem; }
.achievement { padding: .8rem .9rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: .5rem; }
.ach-top { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; }
.ach-top label { flex: 0 1 10rem; }
.ach-top input[type="number"] { max-width: 9rem; }
.ach-state { font-size: .8rem; font-weight: 700; color: var(--muted); padding: .3rem .6rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); margin-bottom: .35rem; }
.ach-state.posted { color: var(--teal); }
.ach-state.done { color: var(--muted); font-weight: 600; }
.ach-actions { margin-left: auto; display: flex; gap: .8rem; margin-bottom: .45rem; }
.achievement textarea { min-height: 4.5rem; font-size: .9rem; }
#addAchievement { width: auto; justify-self: start; display: inline-flex; margin-bottom: 1rem; }
