/* ==========================================================================
   base.css  —  Bootstrap 5 theme bridge for all RP community server sites.

   Load order in every page:
     1) Bootstrap 5 CSS (CDN)
     2) this file (base.css)        <- overrides Bootstrap using tokens
     3) theme-<server>.css          <- overrides ONLY the tokens below

   Because this file loads AFTER Bootstrap, its rules win. All Bootstrap
   components are re-coloured by mapping our design tokens onto Bootstrap's
   component-level CSS variables (--bs-*). Swapping the theme file therefore
   re-skins every Bootstrap component AND every custom widget with no markup
   changes.
   ========================================================================== */

/* ----- Default theme tokens (overridable by theme-<server>.css) ----------- */
:root {
  --bg-image: url("../images/bg/bg-default.webp");
  --bg-color: #0d0f12;
  --bg-overlay: rgba(10, 11, 14, 0.82);

  --surface: #16191f;
  --surface-2: #1d2129;
  --surface-3: #252b35;
  --border: #2e3644;
  --border-strong: #3b4555;

  --text: #e7e9ee;
  --text-muted: #9aa3b2;
  --text-dim: #6c7686;

  --accent: #d9a441;        /* server brand color */
  --accent-hover: #eab959;
  --accent-contrast: #14161a;

  --success: #4a9e6a;
  --danger: #c0533f;
  --info: #4a7fb0;

  --radius: 6px;
  --radius-sm: 4px;
  --font-sans: "Segoe UI", Tahoma, Geneva, Verdana, system-ui, sans-serif;
  --font-mono: "Consolas", "SFMono-Regular", "Menlo", monospace;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* ----- Map tokens onto Bootstrap's global theme variables ----------------- */
:root,
[data-bs-theme="dark"] {
  --bs-body-bg: transparent;
  --bs-body-color: var(--text);
  --bs-emphasis-color: #ffffff;
  --bs-secondary-color: var(--text-muted);
  --bs-tertiary-color: var(--text-dim);
  --bs-secondary-bg: var(--surface-2);
  --bs-tertiary-bg: var(--surface-3);
  --bs-border-color: var(--border);
  --bs-border-color-translucent: var(--border);
  --bs-heading-color: var(--text);
  --bs-emphasis-color: var(--text);
  --bs-border-radius: var(--radius);
  --bs-border-radius-sm: var(--radius-sm);
  --bs-body-font-family: var(--font-sans);
  --bs-font-monospace: var(--font-mono);
  --bs-body-font-size: 0.9rem;
  --bs-body-line-height: 1.55;
  --bs-link-color: var(--accent);
  --bs-link-hover-color: var(--accent-hover);
}

* { box-sizing: border-box; }

html { background: var(--bg-color); }

body {
  min-height: 100vh;
  color: var(--text);
  background-image: linear-gradient(var(--bg-overlay), var(--bg-overlay)), var(--bg-image);
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Links use the token directly (avoids Bootstrap's rgb-triplet dependency) */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

img { max-width: 100%; }

h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

/* ==========================================================================
   Bootstrap component re-theming (component-level --bs-* variables)
   ========================================================================== */

/* ----- Buttons ------------------------------------------------------------ */
.btn-primary {
  --bs-btn-color: var(--accent-contrast);
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: var(--accent-contrast);
  --bs-btn-hover-bg: var(--accent-hover);
  --bs-btn-hover-border-color: var(--accent-hover);
  --bs-btn-active-color: var(--accent-contrast);
  --bs-btn-active-bg: var(--accent-hover);
  --bs-btn-active-border-color: var(--accent-hover);
  --bs-btn-disabled-color: var(--accent-contrast);
  --bs-btn-disabled-bg: var(--accent);
  --bs-btn-disabled-border-color: var(--accent);
}
.btn-secondary {
  --bs-btn-color: var(--text);
  --bs-btn-bg: var(--surface-3);
  --bs-btn-border-color: var(--border-strong);
  --bs-btn-hover-color: var(--text);
  --bs-btn-hover-bg: var(--surface-2);
  --bs-btn-hover-border-color: var(--border-strong);
  --bs-btn-active-color: var(--text);
  --bs-btn-active-bg: var(--surface-2);
  --bs-btn-active-border-color: var(--border-strong);
}
.btn-danger {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--danger);
  --bs-btn-border-color: var(--danger);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #a8452f;
  --bs-btn-hover-border-color: #a8452f;
  --bs-btn-active-bg: #a8452f;
  --bs-btn-active-border-color: #a8452f;
}
.btn { --bs-btn-font-weight: 600; }

/* ----- Dropdowns ------------------------------------------------------------
   Bootstrap's own .dropdown-menu rule re-declares --bs-dropdown-bg as
   var(--bs-body-bg), which we keep transparent so the page background image
   shows through <body>. That local re-declaration shadows anything set at
   :root, so the opaque surface has to be applied here instead. */
.dropdown-menu {
  --bs-dropdown-bg: var(--surface-2);
  --bs-dropdown-border-color: var(--border);
  --bs-dropdown-link-color: var(--text);
  --bs-dropdown-link-hover-color: var(--text);
  --bs-dropdown-link-hover-bg: var(--surface-3);
  --bs-dropdown-link-active-color: var(--accent-contrast);
  --bs-dropdown-link-active-bg: var(--accent);
  --bs-dropdown-header-color: var(--text-muted);
  box-shadow: var(--shadow);
}

/* ----- Cards (were ".panel") ---------------------------------------------- */
.card {
  --bs-card-bg: var(--surface);
  --bs-card-color: var(--text);
  --bs-card-border-color: var(--border);
  --bs-card-cap-bg: var(--surface-2);
  --bs-card-cap-color: var(--text);
  --bs-card-border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  border-bottom-color: var(--border);
  font-weight: 700;
}

/* ----- Tables ------------------------------------------------------------- */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
  --bs-table-hover-bg: var(--surface-2);
  --bs-table-hover-color: var(--text);
  font-size: 0.86rem;
  margin-bottom: 0;
}
.table > thead th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom-color: var(--border);
}
.table > :not(caption) > * > * { padding: 10px 14px; }

/* ----- Forms -------------------------------------------------------------- */
.form-label { font-weight: 600; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.form-text { color: var(--text-dim); }
.form-control,
.form-select {
  background-color: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}
.form-control::placeholder { color: var(--text-dim); }
.form-control:focus,
.form-select:focus {
  background-color: var(--surface-2);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
}
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239aa3b2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}
.form-check-input {
  background-color: var(--surface-3);
  border-color: var(--border-strong);
}
.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

/* ----- Pagination --------------------------------------------------------- */
.pagination {
  --bs-pagination-color: var(--text-muted);
  --bs-pagination-bg: var(--surface-3);
  --bs-pagination-border-color: var(--border-strong);
  --bs-pagination-hover-color: var(--text);
  --bs-pagination-hover-bg: var(--surface-2);
  --bs-pagination-hover-border-color: var(--border-strong);
  --bs-pagination-focus-color: var(--text);
  --bs-pagination-focus-bg: var(--surface-2);
  --bs-pagination-active-color: var(--accent-contrast);
  --bs-pagination-active-bg: var(--accent);
  --bs-pagination-active-border-color: var(--accent);
  --bs-pagination-disabled-color: var(--text-dim);
  --bs-pagination-disabled-bg: var(--surface);
  --bs-pagination-disabled-border-color: var(--border);
}

/* ----- Breadcrumb --------------------------------------------------------- */
.breadcrumb {
  --bs-breadcrumb-divider: "/";
  --bs-breadcrumb-divider-color: var(--text-dim);
  --bs-breadcrumb-item-active-color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Custom widgets (no direct Bootstrap equivalent) — themed via tokens
   ========================================================================== */

/* ----- Top navbar --------------------------------------------------------- */
.site-topbar {
  --bs-navbar-color: var(--text-muted);
  --bs-navbar-hover-color: var(--text);
  --bs-navbar-active-color: var(--accent-contrast);
  --bs-navbar-brand-color: var(--text);
  --bs-navbar-brand-hover-color: var(--text);
  --bs-navbar-toggler-border-color: var(--border-strong);
  background: var(--surface);
  border-bottom: 2px solid var(--accent);
  box-shadow: var(--shadow);
}
.brand-mark {
  width: 34px; height: 34px; flex: none; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
}
.brand-mark-sm {
  width: 22px; height: 22px; flex: none; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
}
.site-topbar .navbar-brand.dropdown .dropdown-toggle::after { margin-left: 0.4rem; }
.site-topbar .navbar-brand { min-width: 0; overflow: hidden; }
.site-topbar .navbar-brand.dropdown { overflow: visible; }
.navbar-brand-text {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; line-height: 1.15;
}
.brand-name {
  font-size: 1.2rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-game {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Keep the toggler on the same line as the brand instead of Bootstrap's default
   wrap-to-next-line when the brand text is too wide for the viewport. */
.site-topbar > .container { flex-wrap: nowrap; }
.site-topbar .nav-link { font-weight: 600; border-radius: var(--radius-sm); padding: 8px 12px; }
.site-topbar .nav-link:hover { background: var(--surface-2); }
.site-topbar .nav-link.active { background: var(--accent); color: var(--accent-contrast); }
.navbar-user { color: var(--text); }
.navbar-user:hover { color: var(--text); }
.avatar-sm { width: 32px; height: 32px; object-fit: cover; border: 1px solid var(--border-strong); }

/* ----- Badges (custom colour set over Bootstrap .badge base) -------------- */
.badge {
  --bs-badge-font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  color: var(--text-muted);
}
.badge-accent { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.badge-success { background: rgba(74,158,106,0.18); color: var(--success); border-color: var(--success); }
.badge-danger { background: rgba(192,83,63,0.18); color: var(--danger); border-color: var(--danger); }
.badge-info { background: rgba(74,127,176,0.18); color: var(--info); border-color: var(--info); }

/* ----- Forum index rows --------------------------------------------------- */
.list-flush > .forum-row:last-child,
.list-flush > .thread-row:last-child { border-bottom: none; }
.forum-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  color: var(--text); text-decoration: none;
}
.forum-row:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.forum-row .icon {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center; overflow: hidden; white-space: nowrap;
  background: var(--surface-3); border-radius: var(--radius-sm);
  color: var(--accent); font-size: 1.3rem; font-weight: 900;
}
.forum-row .icon.unread { background: var(--accent); color: var(--accent-contrast); }
.forum-row .main { flex: 1; min-width: 0; }
.forum-row .main .title { font-size: 1rem; font-weight: 700; display: block; }
.forum-row .main .desc { color: var(--text-dim); font-size: 0.82rem; }
.forum-row .stats { width: 130px; flex: none; text-align: right; color: var(--text-muted); font-size: 0.8rem; }
.forum-row .last {
  width: 220px; flex: none; color: var(--text-muted); font-size: 0.8rem;
  border-left: 1px solid var(--border); padding-left: 16px;
}
.forum-row .last .thread-link { color: var(--text); font-weight: 600; display: block; }

/* ----- Thread list rows --------------------------------------------------- */
.thread-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.thread-row .icon {
  width: 36px; height: 36px; flex: none; border-radius: var(--radius-sm);
  display: grid; place-items: center; background: var(--surface-3);
  color: var(--text-muted); font-size: 1rem;
}
.thread-row .main { flex: 1; min-width: 0; }
.thread-row .main .title { font-weight: 700; }
.thread-row .main .meta { font-size: 0.78rem; color: var(--text-dim); }
.thread-row .col { width: 90px; flex: none; text-align: center; color: var(--text-muted); font-size: 0.8rem; }
.thread-row .last { width: 200px; flex: none; text-align: right; color: var(--text-muted); font-size: 0.78rem; }

/* ----- Posts (thread view) ------------------------------------------------ */
.post {
  display: flex; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.post .author-col {
  width: 190px; flex: none; background: var(--surface-2);
  border-right: 1px solid var(--border); padding: 16px; text-align: center;
}
.post .author-col .avatar {
  width: 96px; height: 96px; margin: 0 auto 10px; border-radius: var(--radius-sm);
  object-fit: cover; border: 1px solid var(--border-strong);
}
.post .author-col .name { font-weight: 800; font-size: 1rem; }
.post .author-col .rank { color: var(--accent); font-size: 0.8rem; font-weight: 600; }
.post .author-col .author-stats {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 0.76rem; color: var(--text-dim); text-align: left;
}
.post .author-col .author-stats div { display: flex; justify-content: space-between; margin-bottom: 3px; }
.post .body-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post .post-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-bottom: 1px solid var(--border); font-size: 0.78rem; color: var(--text-dim);
}
.post .post-content { padding: 16px; flex: 1; }
.post .post-content .quote {
  border-left: 3px solid var(--accent); background: var(--surface-2);
  padding: 10px 14px; margin: 0 0 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted); font-size: 0.88rem;
}
.post .post-content .quote cite { display: block; color: var(--accent); font-style: normal; font-weight: 700; font-size: 0.8rem; margin-bottom: 4px; }
.post .signature { border-top: 1px solid var(--border); padding: 12px 16px; color: var(--text-dim); font-size: 0.8rem; font-style: italic; }
.post .post-foot { border-top: 1px solid var(--border); padding: 10px 16px; display: flex; gap: 8px; justify-content: flex-end; }

/* ----- Editor (reply box) ------------------------------------------------- */
.editor-toolbar {
  display: flex; gap: 4px; flex-wrap: wrap; padding: 8px; background: var(--surface-2);
  border: 1px solid var(--border-strong); border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.editor-toolbar button {
  width: 32px; height: 30px; border: 1px solid transparent; background: transparent;
  color: var(--text-muted); border-radius: var(--radius-sm); cursor: pointer; font-weight: 700;
}
.editor-toolbar button:hover { background: var(--surface-3); color: var(--text); }
.editor-area { border-radius: 0 0 var(--radius-sm) var(--radius-sm); min-height: 180px; }

/* ----- Profile header ----------------------------------------------------- */
.profile-head { display: flex; gap: 20px; align-items: flex-start; padding: 20px; flex-wrap: wrap; }
.profile-head .avatar-lg { width: 140px; height: 140px; flex: none; border-radius: var(--radius); object-fit: cover; border: 2px solid var(--accent); }
.profile-head .info { flex: 1; min-width: 240px; }
.profile-head .info .name { font-size: 1.7rem; font-weight: 800; margin: 0; }
.profile-head .info .bio-desc { font-style: italic; font-size: 0.9rem; margin: 4px 0 8px; }
.profile-head .info .sub { color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.profile-head .info .tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.profile-head .actions { display: flex; flex-direction: column; gap: 8px; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); }
.stat-strip .stat { padding: 14px; text-align: center; border-right: 1px solid var(--border); }
.stat-strip .stat:last-child { border-right: none; }
.stat-strip .stat .num { font-size: 1.4rem; font-weight: 800; color: var(--accent); text-align: center; }
.stat-strip .stat .lbl { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); }

/* ----- Definition list (key/value) --------------------------------------- */
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 0; margin: 0; }
.kv dt { padding: 9px 0; color: var(--text-dim); font-size: 0.85rem; border-bottom: 1px solid var(--border); font-weight: 600; }
.kv dd { padding: 9px 0; margin: 0; border-bottom: 1px solid var(--border); }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: none; }

/* ----- UCP side nav ------------------------------------------------------- */
.side-nav { position: sticky; top: 16px; padding: 8px 0; }
.side-nav .group-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); padding: 12px 16px 6px; }
.side-nav a { display: flex; align-items: center; gap: 8px; padding: 9px 16px; color: var(--text-muted); font-weight: 600; font-size: 0.88rem; border-left: 3px solid transparent; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-nav a.active { background: var(--surface-2); color: var(--accent); border-left-color: var(--accent); }

/* ----- Asset media + owner card ------------------------------------------- */
.asset-media { width: 100%; height: auto; aspect-ratio: 16 / 9; min-height: 220px; object-fit: cover; background: var(--surface-3); border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--border); }
.owner-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text); text-decoration: none; }
.owner-card:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.owner-card img { width: 54px; height: 54px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--border-strong); }
.owner-card .name { font-weight: 700; display: block; }
.owner-card .role { font-size: 0.8rem; color: var(--text-dim); }

/* ----- Footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.8rem; padding: 24px 0; text-align: center; margin-top: 24px; }
.site-footer a { color: var(--text-muted); }

/* ----- Log viewer (raw txt file contents) --------------------------------- */
.log-view {
  margin: 0; padding: 16px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.5;
  color: var(--text-muted); white-space: pre-wrap; word-break: break-word;
  max-height: 620px; overflow: auto;
}

/* ----- Server control action buttons -------------------------------------- */
.control-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.control-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 26px 16px; text-align: center; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.control-tile .lbl { font-weight: 700; }
.control-tile .desc { font-size: 0.78rem; color: var(--text-dim); }
@media (max-width: 720px) { .control-grid { grid-template-columns: 1fr; } }

/* ----- Business inventory row actions (edit price / transfer forms) ------- */
.item-actions { display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.item-actions input[type="number"] { width: 72px; }

/* ----- Sortable table headers --------------------------------------------- */
.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.th-sort:hover { color: var(--accent); }
.th-sort::after { content: "\2195"; opacity: 0.3; margin-left: 6px; font-size: 0.8em; }
.th-sort[aria-sort="ascending"]::after { content: "\2191"; opacity: 1; color: var(--accent); }
.th-sort[aria-sort="descending"]::after { content: "\2193"; opacity: 1; color: var(--accent); }
.th-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ----- Directory tiles (server profile catalog links) --------------------- */
.dir-tile { color: inherit; transition: border-color 0.12s ease, transform 0.12s ease; }
.dir-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.dir-tile .dir-title { font-weight: 700; font-size: 1.05rem; }
.dir-tile .dir-count { color: var(--accent); font-size: 0.82rem; font-family: var(--font-mono); margin-bottom: 8px; }
.dir-tile .dir-desc { color: var(--text-dim); font-size: 0.85rem; }

/* ----- Utilities ---------------------------------------------------------- */
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.mono { font-family: var(--font-mono); }
.num { text-align: right; font-family: var(--font-mono); }

/* ----- Turf colour swatch (turf/clan profile pages) ------------------------ */
.turf-swatch { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong); }

/* ----- Server map ----------------------------------------------------------- */
/* .map-viewport is the fixed-size clipping window; .map-frame is the pannable/zoomable
   layer inside it (translated + scaled by map.js). Markers counter-scale against
   --map-zoom (set by map.js) so they stay a constant, legible size at any zoom level. */
.map-viewport { position: relative; width: 100%; aspect-ratio: 1725 / 732; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface-3); cursor: grab; touch-action: none; }
.map-viewport.is-panning { cursor: grabbing; }
.map-frame { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 0 0; }
.map-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.map-marker { position: absolute; transform: translate(-50%, -50%) scale(calc(1 / var(--map-zoom, 1))); transform-origin: center; width: 26px; height: 26px; z-index: 2; }
.map-marker img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8)); pointer-events: none; }
.map-marker:hover { transform: translate(-50%, -50%) scale(calc(1.25 / var(--map-zoom, 1))); }

.map-turf { position: absolute; z-index: 1; border: 1px solid rgba(255, 255, 255, 0.35); display: flex; align-items: center; justify-content: center; text-align: center; }
.map-turf-label { display: flex; flex-direction: column; gap: 2px; font-size: 0.72rem; font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); }
.map-turf-label a { color: #fff; text-decoration: none; }
.map-turf-label a:hover { text-decoration: underline; }

/* Profile pages' (turf, business) location preview, shown as the card's top media (in place
   of a photo): same viewport/frame mechanics as the full map, but non-interactive — the
   crop/zoom is pre-computed server-side — and flush with the card edges like .asset-media. */
.map-viewport.card-img-top { border: 0; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--border); cursor: default; }

/* ----- Responsive tweaks for custom widgets ------------------------------- */
@media (max-width: 860px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip .stat:nth-child(2) { border-right: none; }
  .side-nav { position: static; }
  .forum-row .stats { display: none; }
  .forum-row .last { width: 150px; }
}
@media (max-width: 620px) {
  .post { flex-direction: column; }
  .post .author-col { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; border-right: none; border-bottom: 1px solid var(--border); }
  .post .author-col .avatar { width: 56px; height: 56px; margin: 0; }
  .post .author-col .author-stats { display: none; }
  .thread-row .col, .thread-row .last { display: none; }
  .forum-row .last { display: none; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { padding-bottom: 0; border-bottom: none; }
  .kv dd { padding-top: 2px; }
}
