/* Dragonwilds Map — RuneScape/OSRS-flavoured theme: parchment + wood-brown + gold chrome.
   Cinzel (OFL, loaded in index.html) for headings/chrome; system-ui sans for body + roster.
   IDs/classes the JS relies on (#meta, .lg, .lr, .lr-count, #coords, region/player labels) are
   restyled in place, never renamed. */
:root {
  color-scheme: dark;
  --gold: #caa45a;        /* primary accent (kept from the prior theme) */
  --gold-br: #e7c982;     /* bright gold for headings / live numbers */
  --gold-dim: #7e6531;    /* muted gold for chip + control borders */
  --ink: #e8e2d6;         /* body text */
  --muted: #9a8d74;       /* secondary text */
  --bg: #0f0b07;          /* page backdrop */
  --map-bg: #16110b;
  --line: #3a2c1a;        /* warm brown hairlines */
  --chip: #14100a;        /* count chip / coord readout fill */
  --display: "Cinzel", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 14px/1.4 system-ui, sans-serif; }
#app { display: grid; grid-template-columns: 1fr 260px; height: 100%; }
#map { height: 100%; background: var(--map-bg); }

/* --- sidebar: wood panel, gold trim, faint parchment grain ---------------------------------- */
#side {
  display: flex; flex-direction: column;
  border-left: 2px solid var(--gold);
  padding: 14px; overflow-y: auto; color: var(--ink);
  background:
    linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,0) 130px),
    repeating-linear-gradient(135deg, rgba(255,214,150,.02) 0 2px, rgba(0,0,0,0) 2px 6px),
    linear-gradient(180deg, #241a11, #17110a);
  box-shadow: inset 7px 0 16px -12px rgba(0,0,0,.85), inset 1px 0 0 rgba(202,164,90,.18);
}
#side > * { flex: 0 0 auto; }
/* Append-friendly reading order — the Auth lane appends #userchip (top) + admin panel (bottom);
   give them room by ordering the known sections and leaving 0 / high orders free. */
#userchip   { order: -1; }   /* identity chip pinned above the title (lib/auth.js appends it) */
#layers     { order: 1; }
#roster-sec { order: 2; margin-top: 4px; }
#progress-sec { order: 8; } /* "Server progress" card, grouped with the appended cards (lib/progress.js) */
#claim-sec  { order: 9; }    /* "Character" claim card, above admin (lib/claim.js appends it) */
.adm        { order: 10; }   /* admin panel pinned below the roster (lib/admin.js appends it) */

#side h1 { font-family: var(--display); font-size: 19px; font-weight: 700; margin: 0 0 4px;
  letter-spacing: .06em; color: var(--gold-br);
  text-shadow: 0 1px 0 #000, 0 0 12px rgba(202,164,90,.22); }
#meta { color: var(--muted); font-size: 12px; margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }

/* --- layer toggle groups ------------------------------------------------------------------- */
.lg { margin-bottom: 12px; }
.lg-h { font-family: var(--display); color: var(--gold); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; margin: 0 0 6px; }
.lr { display: flex; align-items: center; gap: 8px; padding: 3px 4px; cursor: pointer;
  border-radius: 5px; }
.lr:hover { background: rgba(202,164,90,.06); }
.lr input { accent-color: var(--gold); flex: none; }
.lr .lr-name { flex: 1; min-width: 0; }
.lr .lr-count { flex: none; margin-left: auto; color: var(--gold-br); font-size: 11px;
  font-variant-numeric: tabular-nums; background: var(--chip); border: 1px solid var(--gold-dim);
  border-radius: 9px; padding: 0 6px; min-width: 20px; text-align: center; }
.lr .lr-count:empty { display: none; }

/* --- per-layer sidebar controls (registry sidebarControls hook; e.g. fog reveal/reset) ------ */
.lr-sub { padding: 6px 2px 4px 24px; display: flex; flex-direction: column; gap: 7px; }
.fog-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.fog-row .fog-lbl { flex: none; }
.fog-range { flex: 1; min-width: 0; accent-color: var(--gold); }
.fog-val { flex: none; min-width: 36px; text-align: right; color: var(--gold-br);
  font-variant-numeric: tabular-nums; }
.fog-reset { align-self: flex-start; font: inherit; font-size: 12px; cursor: pointer;
  color: var(--ink); background: linear-gradient(#2c2114, #1c1408);
  border: 1px solid var(--gold-dim); border-radius: 6px; padding: 4px 10px; }
.fog-reset:hover { border-color: var(--gold); color: var(--gold-br); }

/* --- live roster --------------------------------------------------------------------------- */
.rs-h { font-family: var(--display); color: var(--gold); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; margin: 0 0 6px; }
#roster { display: flex; flex-direction: column; }
.p { display: flex; align-items: center; gap: 9px; padding: 6px 4px; cursor: pointer;
  border-bottom: 1px solid rgba(58,44,26,.5); border-radius: 4px; }
.p:hover { background: rgba(202,164,90,.07); }
.p .dot { width: 10px; height: 10px; border-radius: 50%; flex: none;
  box-shadow: 0 0 0 1px #000, 0 0 4px rgba(0,0,0,.6); }
.p .p-main { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.p .p-n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p .p-s { color: var(--muted); font-size: 12px; }
.p .p-loc { color: #cdb890; font-variant-numeric: tabular-nums; }
.p.off { opacity: .5; }
.p.dungeon .p-s { color: #c9a86a; }    /* online but off the overworld map — 'in dungeon' (#48) */
.p.unlocated .p-loc { opacity: .6; }   /* selectable, but not pannable — no saved position yet */
.p.sel { background: rgba(202,164,90,.10); box-shadow: inset 3px 0 0 var(--gold); }
.p.sel:hover { background: rgba(202,164,90,.14); }
.p-empty { color: var(--muted); font-size: 12px; padding: 6px 4px; }

/* --- cursor world-coord readout ------------------------------------------------------------ */
#coords { position: fixed; left: 8px; bottom: 8px; z-index: 700; font-size: 11px;
  color: #e2d4b2; background: linear-gradient(rgba(34,25,16,.94), rgba(24,18,11,.94));
  border: 1px solid var(--gold-dim); border-radius: 6px; padding: 3px 8px;
  font-variant-numeric: tabular-nums; pointer-events: none; min-height: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.5); }
#coords:empty { display: none; }

/* --- coordinate border ruler (ticket #14; layers/gridruler.js) ------------------------------
   Always-on chrome framing #map: four gutter strips + container-positioned A..U / 1..21 labels.
   The overlay is a positioned sibling of Leaflet's map-pane, so z-index ≥1 lifts it above every
   pane (incl. fog z690); Leaflet controls (z1000) stay above it. pointer-events:none = never
   blocks map drag. Thickness/position of the strips is set inline by the layer (the GUTTER const). */
.gridruler { position: absolute; inset: 0; z-index: 600; pointer-events: none; }
.gr-strip { position: absolute; }
.gr-top, .gr-bottom { left: 0; right: 0;
  background: linear-gradient(180deg, rgba(36,26,16,.86), rgba(20,15,9,.74)); }
.gr-left, .gr-right { top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(36,26,16,.86), rgba(20,15,9,.74)); }
.gr-top    { top: 0;    border-bottom: 1px solid var(--gold-dim); }
.gr-bottom { bottom: 0; border-top: 1px solid var(--gold-dim); }
.gr-left   { left: 0;   border-right: 1px solid var(--gold-dim); }
.gr-right  { right: 0;  border-left: 1px solid var(--gold-dim); }
.gr-lbl { position: absolute; transform: translate(-50%, -50%); pointer-events: none;
  font-family: var(--display); font-size: 11px; font-weight: 600; line-height: 1;
  letter-spacing: .04em; color: var(--gold-br); white-space: nowrap;
  font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #000, 0 0 3px #000; }

/* --- map overlays (divIcon labels + tooltips) ---------------------------------------------- */
.region-label { white-space: nowrap; }
.region-label span { color: #f3e7c8; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 1px 2px #000; transform: translate(-50%, -50%);
  display: inline-block; }
.leaflet-tooltip { background: #1a1208; border: 1px solid var(--gold-dim); color: var(--ink); }
.player-label { white-space: nowrap; }
.player-label span { color: #bfe3ff; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 1px 2px #000;
  transform: translate(10px, -8px); display: inline-block; }

/* Player facing arrow (#2): replaces the old dot. Leaflet positions the icon root; the inner <i>
   carries the per-player rotation (set inline in players.js) so it survives every reposition. The
   override of leaflet-marker-icon's box keeps just the glyph; colour is per player (fill:currentColor). */
.player-arrow-icon { background: none; border: 0; }
.player-arrow { display: block; width: 22px; height: 22px; transform-origin: 50% 50%;
  transition: opacity .2s ease; will-change: transform;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.7)); }
.player-arrow svg { display: block; }

/* Leaflet zoom control tinted to match the gold chrome. */
.leaflet-bar a { background: #1c1409; color: var(--ink); border-bottom-color: var(--line); }
.leaflet-bar a:hover { background: #2a1f12; color: var(--gold-br); }

/* --- shared detail panel (ticket #15; lib/panel.js) — slides in over the map, left of #side.
   Same wood/gold/parchment treatment as the sidebar so it reads of-a-piece. Detail card body is
   styled by lib/detail.js (.dpd-*). #side is 260px wide → park the panel just left of it. -------- */
#panel { position: fixed; top: 12px; right: 272px; width: 300px; max-width: calc(100vw - 24px);
  max-height: calc(100% - 24px); overflow-y: auto; z-index: 1000; color: var(--ink);
  border: 1px solid var(--gold-dim); border-radius: 10px;
  background:
    repeating-linear-gradient(135deg, rgba(255,214,150,.02) 0 2px, rgba(0,0,0,0) 2px 6px),
    linear-gradient(180deg, #241a11, #17110a);
  box-shadow: 0 14px 44px rgba(0,0,0,.6), inset 0 0 0 1px rgba(202,164,90,.1);
  opacity: 0; transform: translateX(8px); pointer-events: none;
  transition: opacity .15s ease, transform .15s ease; }
#panel.show { opacity: 1; transform: none; pointer-events: auto; }
#panel header { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: linear-gradient(180deg, #241a11, #1d150c); }
#panelTitle { font-family: var(--display); font-weight: 700; letter-spacing: .03em; flex: 1;
  min-width: 0; color: var(--gold-br); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 0 #000, 0 0 12px rgba(202,164,90,.22); }
.panel-btns { display: flex; align-items: center; gap: 2px; flex: none; }
.panel-btns button { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1;
  cursor: pointer; padding: 0 4px; }
.panel-btns button:hover { color: var(--gold-br); }
#panelClose { font-size: 20px; }
#panelRestore { display: none; }
#panelBody { padding: 12px 14px; }
/* minimised: slim title bar — body hidden, but the selection (ring + roster row) stays live. */
#panel.minimized { width: auto; max-width: 300px; }
#panel.minimized #panelBody { display: none; }
#panel.minimized header { border-bottom: 0; border-radius: 10px; }
#panel.minimized #panelMin { display: none; }
#panel.minimized #panelRestore { display: inline-block; }
#panel.minimized #panelTitle { cursor: pointer; }
@media (max-width: 720px) { #panel { right: 12px; left: 12px; width: auto; } }

/* --- login gate overlay (ticket #9; lib/auth.js builds the forms) --------------------------- */
#gate { position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(58,42,22,.55), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, #140f09, #0a0705); }
#gate.show { display: flex; }
#gate form { width: 320px; max-width: calc(100vw - 32px); text-align: center; padding: 28px;
  background:
    repeating-linear-gradient(135deg, rgba(255,214,150,.02) 0 2px, rgba(0,0,0,0) 2px 6px),
    linear-gradient(180deg, #241a11, #17110a);
  border: 1px solid var(--gold-dim); border-radius: 12px;
  box-shadow: 0 14px 44px rgba(0,0,0,.6), inset 0 0 0 1px rgba(202,164,90,.1); }
#gate h2 { font-family: var(--display); margin: 0 0 6px; letter-spacing: .06em; color: var(--gold-br);
  text-shadow: 0 1px 0 #000, 0 0 12px rgba(202,164,90,.25); }
#gate p { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
#gate input { width: 100%; padding: 10px; margin-bottom: 10px; font: inherit; color: var(--ink);
  background: #0c0b0a; border: 1px solid var(--line); border-radius: 7px; }
#gate input:focus { outline: none; border-color: var(--gold); }
#gate input.code { letter-spacing: .4em; text-align: center; font-size: 18px; }
#gate button[type=submit] { width: 100%; padding: 10px; font: inherit; font-weight: 700;
  cursor: pointer; color: #1a1408; border: 0; border-radius: 7px;
  background: linear-gradient(180deg, var(--gold-br), var(--gold)); }
#gate button[type=submit]:hover { filter: brightness(1.05); }
#gate button[type=submit]:disabled { opacity: .6; cursor: default; }
#gate .err { color: #e0715b; font-size: 12px; min-height: 16px; margin-top: 8px; }
#gate .sub { color: var(--gold-br); }
#gate .linkbtn { width: auto; background: none; border: 0; font: inherit; font-weight: 400;
  color: var(--muted); text-decoration: underline; cursor: pointer; padding: 8px 0 0; margin: 0; }
#gate .linkbtn:hover { color: var(--gold-br); }

/* --- user chip (ticket #9; lib/auth.js) — pinned to the top of #side via order --------------- */
#userchip { display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
#userchip .uc-name { flex: 1; min-width: 0; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#userchip .uc-role { flex: none; font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 4px; color: var(--gold-br);
  background: rgba(202,164,90,.12); border: 1px solid var(--gold-dim); }
#userchip .uc-logout { flex: none; font: inherit; font-size: 12px; cursor: pointer; color: var(--muted);
  background: linear-gradient(#2c2114, #1c1408); border: 1px solid var(--gold-dim); border-radius: 6px;
  padding: 4px 9px; }
#userchip .uc-logout:hover { color: var(--gold-br); border-color: var(--gold); }

/* --- admin panel (ticket #9; lib/admin.js) — appended to #side, pinned below the roster ------ */
.adm { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.adm-h { width: 100%; display: flex; align-items: center; justify-content: space-between;
  font-family: var(--display); font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gold); background: none; border: 0; cursor: pointer; padding: 4px 0; }
.adm-h:hover { color: var(--gold-br); }
.adm-caret { color: var(--gold); }
.adm-body { margin-top: 8px; }
.adm-sub { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  margin: 12px 0 4px; }
.adm-invite { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 8px;
  background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.adm-invite .adm-sub { margin-top: 0; }
.adm input, .adm select { width: 100%; padding: 6px 7px; font: inherit; color: var(--ink);
  background: #0c0b0a; border: 1px solid var(--line); border-radius: 6px; }
.adm input:focus, .adm select:focus { outline: none; border-color: var(--gold); }
.adm-btn { width: 100%; padding: 7px; font: inherit; font-weight: 700; cursor: pointer; color: #1a1408;
  border: 0; border-radius: 6px; background: linear-gradient(180deg, var(--gold-br), var(--gold)); }
.adm-btn:hover { filter: brightness(1.05); }
.adm-err { color: #e0715b; font-size: 12px; }
.adm-err:not(:empty) { margin-top: 2px; }
.adm-u { padding: 8px 0; border-bottom: 1px solid rgba(58,44,26,.5); }
.adm-u-id { font-size: 12px; font-weight: 600; margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-u-ctl { display: flex; gap: 6px; }
.adm-u-ctl select { flex: 1; font-size: 12px; }

/* --- character claim (ticket #18; lib/claim.js) — "Character" card appended to #side ---------
   Same collapsible header + wood/gold treatment as the admin panel, so it reads of-a-piece. */
.cl { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.cl-h { width: 100%; display: flex; align-items: center; justify-content: space-between;
  font-family: var(--display); font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gold); background: none; border: 0; cursor: pointer; padding: 4px 0; }
.cl-h:hover { color: var(--gold-br); }
.cl-caret { color: var(--gold); }
.cl-body { margin-top: 8px; }
.cl-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 8px;
  background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.cl-btn { width: 100%; padding: 7px; font: inherit; font-weight: 700; cursor: pointer; color: #1a1408;
  border: 0; border-radius: 6px; background: linear-gradient(180deg, var(--gold-br), var(--gold)); }
.cl-btn:hover { filter: brightness(1.05); }
.cl-link { align-self: flex-start; background: none; border: 0; color: var(--gold); font: inherit;
  font-size: 12px; cursor: pointer; padding: 0; text-decoration: underline; }
.cl-link:hover { color: var(--gold-br); }
.cl-msg { color: var(--muted); font-size: 12px; }
.cl-err { color: #e0715b; font-size: 12px; }
.cl-err:empty { display: none; }
.cl-sub { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.cl-list { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.cl-pick { display: flex; align-items: center; width: 100%; padding: 7px 8px; font: inherit;
  text-align: left; color: var(--ink); background: #0c0b0a; border: 1px solid var(--line);
  border-radius: 6px; cursor: pointer; }
.cl-pick:hover { border-color: var(--gold); }
.cl-pick-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-playing { color: #8fb96f; font-size: 13px; display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; }
.cl-playing b { color: var(--ink); }
.cl-badge-box { display: inline-flex; }
.cl-badge { padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; }
.cl-online  { background: rgba(95,160,210,.18); color: #bfe3ff; border: 1px solid #2f5a7a; }
.cl-offline { background: rgba(120,120,120,.14); color: var(--muted); border: 1px solid var(--line); }
.cl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* "My colour" picker (#22; lib/claim.js setupColor): a native swatch + an "Auto" reset, shared via
   /api/player_colors so the player's marker reads the same colour for everyone. */
.cl-color { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.cl-color-l { flex: 1; }
.cl-color-i { flex: none; width: 32px; height: 24px; padding: 0; cursor: pointer;
  background: #0c0b0a; border: 1px solid var(--line); border-radius: 5px; }
.cl-color-auto { flex: none; font: inherit; font-size: 11px; cursor: pointer; padding: 3px 9px;
  color: var(--gold); background: rgba(0,0,0,.22); border: 1px solid var(--line); border-radius: 5px; }
.cl-color-auto:hover { border-color: var(--gold); color: var(--gold-br); }
.cl-claiming { color: var(--muted); font-size: 12px; }
.cl-claiming b { color: var(--ink); }
.cl-step { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; }
.cl-step b { color: var(--gold-br); }
.cl-spin { flex: none; width: 12px; height: 12px; border: 2px solid var(--line);
  border-top-color: var(--gold); border-radius: 50%; animation: cl-spin .8s linear infinite; }
@keyframes cl-spin { to { transform: rotate(360deg); } }
.cl-cancel { align-self: flex-start; font: inherit; font-size: 12px; cursor: pointer; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; }
.cl-cancel:hover { border-color: #e0715b; color: #e0715b; }

/* --- server progress (ticket #31; lib/progress.js) — "Server progress" card appended to #side ---
   Same collapsible header + wood/gold treatment as the admin/claim cards, so it reads of-a-piece. */
.wp { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.wp-h { width: 100%; display: flex; align-items: center; justify-content: space-between;
  font-family: var(--display); font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gold); background: none; border: 0; cursor: pointer; padding: 4px 0; }
.wp-h:hover { color: var(--gold-br); }
.wp-caret { color: var(--gold); }
.wp-body { margin-top: 8px; }
.wp-card { display: flex; flex-direction: column; gap: 12px; padding: 10px; border-radius: 8px;
  background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.wp-block { display: flex; flex-direction: column; gap: 5px; }
.wp-sub { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .06em; }
.wp-tally { margin-left: auto; color: var(--gold-br); font-size: 11px; font-variant-numeric: tabular-nums;
  background: var(--chip); border: 1px solid var(--gold-dim); border-radius: 9px; padding: 0 7px; }
.wp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
/* bosses checklist: ✓ (gold) when defeated, ○ (muted) when not. */
.wp-bosses .wp-boss { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.wp-boss .wp-mark { flex: none; width: 14px; text-align: center; color: var(--muted); }
.wp-boss.done { color: var(--ink); }
.wp-boss.done .wp-mark { color: var(--gold-br); }
/* hook + event tags: small parchment chips. */
.wp-tag { font-size: 12px; color: var(--ink); padding: 3px 8px; border-radius: 6px;
  background: rgba(202,164,90,.08); border: 1px solid var(--line); align-self: flex-start; }
.wp-empty { color: var(--muted); font-size: 12px; }
/* concentrated anima-vent banner — only present while a vent is live. */
.wp-vent { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #bfeef4;
  padding: 7px 9px; border-radius: 7px; background: rgba(73,199,214,.10); border: 1px solid #2f6b76; }
.wp-vent-d { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #49c7d6;
  box-shadow: 0 0 0 0 rgba(73,199,214,.6); animation: wp-pulse 1.8s ease-out infinite; }
.wp-vent-t { flex: 1; min-width: 0; }
.wp-locate { flex: none; font: inherit; font-size: 11px; cursor: pointer; padding: 3px 9px;
  color: #bfeef4; background: rgba(0,0,0,.22); border: 1px solid #2f6b76; border-radius: 5px; }
.wp-locate:hover { border-color: #49c7d6; color: #e6fbff; }
@keyframes wp-pulse { 0% { box-shadow: 0 0 0 0 rgba(73,199,214,.55); } 70% { box-shadow: 0 0 0 7px rgba(73,199,214,0); } 100% { box-shadow: 0 0 0 0 rgba(73,199,214,0); } }
/* on-map label for the anima-vent marker (layers/animavent.js permanent tooltip). */
.wp-vent-lbl { color: #bfeef4; font: 700 12px/1 system-ui, sans-serif; text-shadow: 0 1px 3px #000, 0 0 4px #000;
  background: none; border: 0; box-shadow: none; padding: 0; white-space: nowrap; }
.wp-vent-lbl::before { display: none; }

/* --- smart follow-cam chip (ticket #20; lib/follow.js) — floats top-centre over the map --------
   "Following <name> ✕" while tracking the claimed character; "Follow <name>" when paused (✕'d);
   "Waiting for <name>…" when claimed-but-offline/unlocated. Hidden entirely when nothing is claimed.
   z above the ruler/fog (≤690) but below the login gate (9999) and the mobile nav (1300). */
.follow-chip { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1100;
  display: flex; align-items: center; gap: 4px; max-width: calc(100vw - 24px);
  padding: 4px 6px 4px 12px; border-radius: 999px; color: var(--ink);
  font: 13px/1.2 system-ui, sans-serif; user-select: none;
  background: linear-gradient(180deg, #241a11, #17110a);
  border: 1px solid var(--gold-dim); box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.follow-chip[hidden] { display: none; }
.follow-chip b { color: var(--gold-br); font-weight: 700; }
.fc-main { display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 1px 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-main:disabled { cursor: default; }
.fc-main::before { content: "◎"; flex: none; color: var(--gold); font-size: 13px; line-height: 1; }
.fc-following .fc-main::before { color: var(--gold-br); }
.fc-manual   { opacity: .92; }
.fc-manual   .fc-main::before { content: "⏸"; }   /* paused while the user pans; resumes after idle */
.fc-paused   { opacity: .92; }
.fc-paused   .fc-main::before { content: "▷"; }   /* ▷ = click to resume following */
.fc-waiting  { opacity: .85; }
.fc-waiting  .fc-main { color: var(--muted); }
.fc-waiting  .fc-main::before { content: "◌"; color: var(--muted); }
.fc-x { flex: none; cursor: pointer; background: none; border: 0; color: var(--muted);
  font: inherit; line-height: 1; padding: 2px 7px; border-radius: 999px; }
.fc-x:hover { color: #e0715b; background: rgba(224,113,91,.12); }
.fc-x[hidden] { display: none; }

/* --- mobile: #side becomes an off-canvas right drawer toggled by #navToggle ----------------- */
#navToggle { display: none; position: fixed; top: 10px; right: 10px; z-index: 1300;
  width: 42px; height: 42px; align-items: center; justify-content: center;
  background: linear-gradient(#241a10, #170f08); color: var(--gold-br);
  border: 1px solid var(--gold-dim); border-radius: 8px; font-size: 20px; line-height: 1;
  cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.5); }
#navToggle:hover { border-color: var(--gold); }
@media (max-width: 720px) {
  #app { grid-template-columns: 1fr; }
  #side { position: fixed; top: 0; right: 0; bottom: 0; width: 280px; max-width: 85vw;
    z-index: 1200; padding-top: 58px; transform: translateX(100%); transition: transform .22s ease;
    box-shadow: -10px 0 30px rgba(0,0,0,.55); }
  #side.open { transform: none; }
  #navToggle { display: flex; }
}
