:root { --bcolor: #6d1a33; }

/* ============================================================
   Element selectors (no id/class), alphabetical
   ============================================================ */

/* site-wide default button look -- every button on the site uses this
   one look, no per-context overrides. */
button {
  background: #fff; color: var(--bcolor); border: 1px solid var(--bcolor); border-radius: 4px;
  padding: 4px 12px; font-size: 0.85rem; cursor: pointer;
}
button:hover { background: #f1f5f9; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #d5e8eb; font-family: system-ui, sans-serif;
}

/* ============================================================
   ID selectors, alphabetical
   ============================================================ */

/* auth dialogs -- structure/layout ported from theholts (common/common.css's
   aaModal and aa- prefixed rules); button appearance is not ported/adapted
   from theholts at all anymore -- these buttons just use the site-wide
   base button look like everything else. Not wired to any backend yet.
   Covers all the aaModal-prefixed IDs and the .aa- prefixed classes
   further below. */
#aaAdminPanel, #aaLoginPanel, #aaChgPassPanel, #aaChgEmailPanel, #aaForgotPanel, #aaMessagePanel { display: none; }
#aaModalBody { padding: 12px 12px 4px; }
#aaModalCard { background: #fff; border-radius: 6px; box-shadow: 0 4px 24px rgba(0,0,0,0.35); overflow: hidden; min-width: 320px; max-width: 500px; }
#aaModalFooter { display: flex; justify-content: space-between; align-items: center; padding: 12px 10px; border-top: 1px solid #e2e8f0; gap: 6px; }
#aaModalFooter.aa-login-footer { flex-wrap: wrap; }
#aaModalFooter.aa-create-footer { flex-direction: row !important; justify-content: space-between !important; align-items: center !important; }
#aaModalOverlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 5000; align-items: center; justify-content: center;
}
#aaModalOverlay.open { display: flex; }
#aaModalRow1, #aaModalRow2 { display: flex; gap: 6px; }
#aaModalTitleBar { background: var(--bcolor); color: #fff; padding: 8px 12px; font-weight: bold; font-size: 0.95rem; }
#adminCurrentEmail, #adminCurrentPW { color: #64748b; }
#breadcrumb {
  position: absolute; top: 10px; left: 60px; z-index: 1000;
  max-width: calc(100% - 70px);
  background: rgba(255,255,255,0.92); color: #1e293b; display: flex; align-items: center;
  border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  padding: 6px 12px; gap: 6px; font-size: 0.85rem; overflow-x: auto; white-space: nowrap;
}
#breadcrumb a { color: #2563eb; text-decoration: none; cursor: pointer; }
#breadcrumb a:hover { text-decoration: underline; }
#breadcrumb .sep { color: #94a3b8; }
#contact-content { padding: 0 14px 14px 14px; }
#contactButtons { display: flex; gap: 6px; justify-content: flex-end; }
#contactLabel { display: block; font-size: 0.85rem; color: #334155; margin-bottom: 6px; }
#contactNote { width: 100%; height: 140px; box-sizing: border-box; font: inherit; padding: 6px; border: 1px solid #94a3b8; border-radius: 3px; resize: vertical; margin-bottom: 10px; }
/* IAB "Small Square" (200x200) -- the smallest true IAB standard size,
   fitting a corner-floating box without dominating the map. */
#floating-ad {
  position: absolute; bottom: 24px; left: 24px; z-index: 1000;
  width: 200px; height: 200px; box-sizing: border-box;
  background: rgba(255,255,255,0.92); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  padding: 12px 14px; display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
#floating-ad-content { font-size: 1rem; color: #1e293b; }
#floating-ad-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8;
  margin-bottom: 4px;
}
#hdrAdmin { color: #fff; text-decoration: none; cursor: pointer; }
#hdrAdmin:hover { text-decoration: underline; }
#loading {
  position: absolute; top: 54px; left: 10px; z-index: 1000; background: #1e293bdd;
  color: #f1f5f9; padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; display: none;
}
#map {
  position: absolute; inset: 0; background: #d5e8eb;
  box-sizing: border-box; border: 4px solid var(--bcolor);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5), 0 2px 10px rgba(0,0,0,0.15);
}
#mapPage { position: relative; width: 100%; height: 100%; }
#pageFooter {
  position: fixed; bottom: 0; left: 0; right: 0; height: 40px;
  color: #94a3b8; font-size: 0.8rem; justify-content: space-between;
}
/* --- site shell: header/footer fixed to the page, stuff fills what's left --- */
#pageHeader {
  position: fixed; top: 0; left: 0; right: 0; height: 50px;
  color: #f1f5f9; font-weight: 600; justify-content: space-between;
}
#pageHeaderRight { display: flex; align-items: center; gap: 8px; }
/* post detail -- same pattern as Journey's openFbPanel/panelBack: no
   second panel element at all, just swap #panel-content's own HTML and
   show a Back button to restore what was there. Avoids the whole class of
   z-index/stacking-context problems a second fixed-position panel had. */
#panel-back { display: none; margin-right: 8px; }
#panel-back.visible { display: inline-block; }
#panel-content { flex: 1 1 auto; padding: 0 14px 14px 14px; overflow-y: auto; color: #0f172a; }
#panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
}
#panel-title { font-weight: 700; color: #0f172a; flex: 1; }
#panel-updated { color: #94a3b8; margin-right: 10px; white-space: nowrap; }
/* --- region info panel: same journey-style slide-in mechanic (fixed,
   docked off-screen, CSS transition on .open) -- placeholder shell for
   testing region_editorial content, not a settled final design --- */
#side-panel {
  position: fixed; top: 50px; bottom: 40px; right: -820px;
  width: 800px; max-width: 90vw; background: #fff;
  box-sizing: border-box; border: 4px solid var(--bcolor);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5), -4px 0 20px rgba(0,0,0,0.2);
  z-index: 3000; transition: right 0.3s ease;
  display: flex; flex-direction: column; overflow: hidden;
}
#side-panel.open { right: 0; }
@media (max-width: 900px) {
  #side-panel {
    top: auto; right: 0; left: 0; bottom: -70vh;
    width: auto; max-width: none; height: 70vh;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    border-radius: 12px 12px 0 0;
    transition: bottom 0.3s ease;
  }
  #side-panel.open { bottom: 0; }
}
#siteHome { cursor: pointer; }
#stuff {
  position: fixed; top: 50px; bottom: 40px; left: 0; right: 0;
  overflow-y: auto;
}

/* ============================================================
   Class selectors, alphabetical
   ============================================================ */

.aa-contact-item { border-bottom: 1px solid #e2e8f0; padding: 8px 0; font-size: 0.85rem; }
.aa-contact-item .aa-contact-meta { color: #64748b; font-size: 0.78rem; margin-bottom: 4px; }
.aa-contact-item .aa-contact-msg { color: #0f172a; }
.aa-contact-list { max-height: 320px; overflow-y: auto; }
.aa-field { display: flex; align-items: center; margin-bottom: 8px; }
.aa-field label { width: 130px; font-size: 0.85rem; color: #334155; flex-shrink: 0; text-align: right; padding-right: 8px; }
.aa-field .aa-input { flex: 1; font-size: 0.85rem; padding: 3px 6px; border: 1px solid #94a3b8; border-radius: 3px; min-width: 0; }
.aa-field-note { display: block !important; }
.aa-field-note span { font-size: 0.78rem; color: #64748b; }
.aa-hidden-submit { position: absolute; top: -1000px; }
.aa-hp { position: absolute; left: -9999px; top: -9999px; }
.aa-login-row { flex: 1 1 100%; justify-content: space-between; }
.aa-msg { font-size: 0.88rem; margin-bottom: 10px; color: #334155; }
.aa-tab { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; border-radius: 4px 4px 0 0; padding: 4px 16px; font-size: 0.85rem; cursor: pointer; }
.aa-tab-active { background: var(--bcolor) !important; color: #fff !important; border-color: var(--bcolor) !important; }
.aa-tabs { display: flex; gap: 6px; margin-bottom: 12px; border-bottom: 2px solid #e2e8f0; padding-bottom: 6px; }
/* fixed IAB standard size (300x250 "medium rectangle") per slot -- every ad
   system (direct-sold, Revive Adserver, AdSense) expects to fill a known,
   fixed box, so swapping providers later means swapping what's rendered
   inside each .ad-slot (see renderAd() in functionsMap.js), never resizing
   the slot itself. Slots are generated inline within #panel-content,
   flowing between editorial entries rather than pinned to a fixed footer. */
.ad-slot {
  width: 300px; height: 250px; margin: 14px auto; background: #f8fafc;
  color: #94a3b8; display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; overflow: hidden; box-sizing: border-box;
}
/* shared background/box treatment for both fixed chrome bars -- only what's
   actually identical between #pageHeader and #pageFooter; color/font-size/
   font-weight differ between them so those stay on the ID rules. */
.chrome-bar {
  background: var(--bcolor); z-index: 2000; box-sizing: border-box;
  display: flex; align-items: center; padding: 0 14px;
}
.editorial-entry {
  margin-bottom: 20px; border: 1px solid var(--bcolor); border-radius: 8px; padding: 12px; background: #f4f1ec;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6), 0 10px 22px rgba(0,0,0,0.32);
}
.editorial-entry h3 { font-size: 0.95rem; color: #64748b; margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.editorial-entry p { margin: 0; line-height: 1.5; }
/* official region_post entries only -- general/community posts (the
   shared .editorial-entry base above) keep their card look untouched. */
.editorial-entry-official {
  margin: 0; border: none; box-shadow: none; background: #fff; padding: 0;
}
.editorial-pic { width: auto; height: auto; border: 1px solid #cbd5e1; border-radius: 6px; display: block; }
.editorial-pic-caption {
  background: #f1f5f9; color: #555;
  font-size: 0.9rem; padding: 4px 6px; border-radius: 0 0 6px 6px; line-height: 1.4;
}
/* display:inline-block on the wrapper (not display:table -- a
   table-caption's box renders outside the table's own border/background,
   which is wrong for this card look) is what makes the caption bar match
   the image's own rendered width exactly, since inline-block shrinks to
   its content instead of stretching full-width like a plain block would.
   Size caps (max-height/max-width) are breakpoint-specific, see
   common_D.css/common_M.css. */
.editorial-pic-wrap {
  display: inline-block; max-width: 100%; box-sizing: border-box;
  border: 1px solid var(--bcolor); border-radius: 8px; padding: 8px; background: #f4f1ec;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6), 0 10px 22px rgba(0,0,0,0.32);
}
.editorial-pics { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; align-items: flex-start; }
.editorial-video { max-width: 100%; margin-top: 8px; display: block; }
.hidden { display: none; }
.leaflet-container { background: #d5e8eb !important; }
.leaflet-interactive:focus { outline: none; }
.post-detail-pic {
  width: auto; height: auto; max-width: min(560px, 100%); max-height: 700px;
  border: 1px solid #cbd5e1; border-radius: 6px 6px 0 0; display: block;
}
.region-pin.leaflet-div-icon {
  background: transparent; border: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
.region-pin-selected { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)) brightness(1.3); }
.region-tooltip.leaflet-tooltip {
  font-size: 0.85rem; font-weight: 600; color: #000;
  background: rgba(255,255,255,0.92); border: 1px solid #cbd5e1; padding: 3px 8px;
}
