:root {
  --bg: #0c0e11;
  --panel: #161a20;
  --panel-2: #1c222b;
  --ink: #e7e3d6;
  --muted: #9aa3ad;
  --dim: #6d7680;
  --line: #2c343e;
  --orange: #e85d04;
  --orange-2: #ff8a3d;
  --cyan: #3ec6d8;
  --gold: #c4a35a;
  --green: #7dcf8a;
  --danger: #d45c5c;
  --shadow: rgba(0, 0, 0, 0.45);
  --hud-h: 52px;
  --deck-h: 72px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
  overflow: hidden;
}

a { color: var(--cyan); }
a:focus-visible, button:focus-visible, select:focus-visible {
  outline: 2px solid var(--orange-2);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 80;
  background: var(--panel);
  color: var(--ink);
  padding: 8px 12px;
}
.skip:focus { left: 8px; }

#app {
  display: grid;
  /* location-strip / world / control-deck — district-deck hidden (chrome1) */
  grid-template-rows: auto 1fr auto;
  height: 100%;
  height: 100dvh;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l);
}

#location-strip, #district-deck, #control-deck {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(#1a2028, #12161c);
  border-color: var(--line);
  border-style: solid;
  z-index: 5;
}

#location-strip {
  position: relative;
  min-height: calc(var(--hud-h) - 4px);
  padding: 6px 12px;
  border-bottom-width: 1px;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--orange);
  text-decoration: none;
  white-space: nowrap;
  max-width: min(42vw, 280px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand:hover {
  color: var(--orange-2);
}
.brand .mark {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--orange-2);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs b { color: var(--ink); font-weight: 650; }
.crumbs .sep { color: var(--dim); }

.status-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.master-mute-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  cursor: pointer;
}
.master-mute-btn:hover,
.master-mute-btn:focus-visible {
  border-color: var(--orange);
  color: var(--orange-2);
  outline: none;
}
.master-mute-btn.is-muted,
.master-mute-btn.muted {
  color: var(--muted);
  opacity: 0.85;
}
.master-mute-btn .vol-speaker-icon { display: block; pointer-events: none; }
.settings-master-row {
  display: block;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.settings-master-lab {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.settings-master-name {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 52px;
}
#settings-audio input[type="range"] { flex: 1; }
#status-chip {
  display: none; /* .show for everyone — Online roster chip */
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--green);
  letter-spacing: 0.06em;
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}
#status-chip:hover,
#status-chip:focus-visible {
  border-color: rgba(62, 198, 100, 0.35);
  background: rgba(62, 198, 100, 0.08);
  outline: none;
}
#status-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  flex-shrink: 0;
}
#status-chip .online-label {
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
#status-chip .online-counts {
  color: var(--ink, #e8eef4);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}

/* Online census dropdown (under top-right chip) — drill views in-panel */
#online-census {
  position: absolute;
  top: calc(100% + 6px);
  right: 8px;
  z-index: 40;
  min-width: 220px;
  max-width: min(300px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - 80px));
  overflow: auto;
  padding: 10px 12px 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px var(--shadow);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.02em;
}
#online-census[hidden] { display: none !important; }
#online-census.open { display: block; }
#online-census .census-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#online-census .census-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
#online-census .census-row-btn {
  appearance: none;
  width: 100%;
  margin: 0;
  padding: 6px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
#online-census .census-row-btn:hover,
#online-census .census-row-btn:focus-visible {
  background: rgba(127, 180, 255, 0.08);
  outline: none;
}
#online-census .census-label {
  color: var(--muted);
  font-weight: 600;
}
#online-census .census-pair {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 650;
}
#online-census .census-note {
  margin: 8px 0 4px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--dim);
}
#online-census .census-join-sounds {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 4px;
  font-size: 12px;
  color: var(--fg, #e8e4dc);
  cursor: pointer;
  user-select: none;
}
#online-census .census-join-sounds input {
  margin: 0;
  accent-color: #6bcf7f;
}
#online-census .census-drill-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
#online-census .census-back {
  appearance: none;
  margin: 0;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--cyan);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  flex-shrink: 0;
}
#online-census .census-back:hover,
#online-census .census-back:focus-visible {
  color: var(--orange-2);
  outline: none;
}
#online-census .census-drill-title {
  font-weight: 650;
  color: var(--ink);
}
#online-census .census-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#online-census .census-list-row {
  padding: 2px 0;
}
#online-census .census-list-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  line-height: 1.35;
}
#online-census .census-name {
  color: var(--ink);
  font-weight: 600;
}
#online-census .census-ai .census-name {
  color: var(--gold, #c4a35a);
}
#online-census .census-handle,
#online-census .census-where {
  font-size: 11px;
}
#online-census .census-bots-quiet {
  font-size: 10px;
  margin-top: 1px;
  opacity: 0.7;
}
#online-census .census-empty {
  margin: 4px 0;
  font-size: 12px;
}
#online-census .census-guest-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#online-census .census-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
#online-census .online-mod-acts {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
}
#online-census .online-mod-btn {
  appearance: none;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
#online-census .online-mod-btn:hover,
#online-census .online-mod-btn:focus-visible {
  color: var(--orange-2);
  outline: none;
}



/* White Pages (player directory) — whitepages1 */
#online-census .census-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(62, 198, 216, 0.16);
}
#online-census .census-link-btn {
  appearance: none;
  border: 1px solid rgba(62, 198, 216, 0.35);
  background: rgba(62, 198, 216, 0.08);
  color: #9ed8e4;
  border-radius: 6px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
#online-census .census-link-btn:hover,
#online-census .census-link-btn:focus-visible {
  background: rgba(62, 198, 216, 0.18);
  outline: none;
}
#online-census .census-yp-parked {
  font-size: 11px;
}
#online-census .census-resident[data-census-user] {
  cursor: pointer;
}
#online-census .census-resident[data-census-user]:hover,
#online-census .census-resident[data-census-user]:focus-visible {
  background: rgba(62, 198, 216, 0.08);
  outline: none;
}

#win-whitepages .whitepages-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: calc(100% - 36px);
  overflow: hidden;
}
#win-whitepages .whitepages-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
}
#win-whitepages .whitepages-q {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 1px solid var(--line, #2a3340);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
}
#win-whitepages .whitepages-sort {
  appearance: none;
  border: 1px solid var(--line, #2a3340);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
  max-width: 110px;
}
#win-whitepages .whitepages-note {
  margin: 0;
  font-size: 11px;
}
#win-whitepages .whitepages-list {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
}
#win-whitepages .whitepages-row {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}
#win-whitepages .whitepages-row:hover,
#win-whitepages .whitepages-row:focus-visible {
  border-color: rgba(62, 198, 216, 0.4);
  background: rgba(62, 198, 216, 0.1);
  outline: none;
}
#win-whitepages .whitepages-name {
  font-weight: 600;
}
#win-whitepages .whitepages-handle {
  font-size: 12px;
}
#win-whitepages .whitepages-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}
#win-whitepages .whitepages-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
#win-whitepages .whitepages-badge.online {
  background: rgba(70, 190, 110, 0.2);
  color: #8fe0a8;
  border: 1px solid rgba(70, 190, 110, 0.45);
}
#win-whitepages .whitepages-badge.offline {
  background: rgba(120, 130, 140, 0.15);
  color: #9aa3ad;
  border: 1px solid rgba(120, 130, 140, 0.35);
}
#win-whitepages .whitepages-empty {
  margin: 12px 4px;
}
#win-whitepages .whitepages-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid rgba(62, 198, 216, 0.14);
}
#win-whitepages .whitepages-page:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Top room tabs redundant with walking / Directory / Map — hide globally (chrome1).
   Site admin moved into Account window for role===site_admin. */
#district-deck {
  display: none !important;
  min-height: 0;
  height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  pointer-events: none;
}
#district-deck a, #district-deck button, .hud-btn, .win-btn, .icon-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  box-sizing: border-box;
}
/* Bubbles toggle lives in Settings — hide legacy deck button (deckbar1) */
#control-deck #btn-bubbles {
  display: none !important;
}
#district-deck a[aria-current="page"], .hud-btn.active {
  border-color: var(--orange);
  color: var(--orange-2);
  box-shadow: inset 0 0 0 1px var(--orange);
}
#district-deck a.planned, .node.planned {
  color: var(--gold);
  border-color: #6a5428;
}

#world {
  position: relative;
  min-height: 0;
  background: #07080a;
  /* Design mode: admin.css makes this a column flex so #edit-bar docks above #stage (designbar2). */
}
#stage {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
html.design-panning, html.design-panning * { cursor: grabbing !important; }

#prompt {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: rgba(12, 14, 17, 0.86);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s linear;
}
#prompt.show { opacity: 1; }

#toast {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 26, 32, 0.96);
  border: 1px solid var(--gold);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  z-index: 40; /* above #edit-bar (12) / #inv-panel (13) so Saved is visible */
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  transition: opacity 0.15s ease;
}
#toast.show { opacity: 1; }
#toast.toast-ok {
  border-color: #7dcf8a;
  color: #d8f5de;
  background: rgba(18, 36, 24, 0.96);
  box-shadow: 0 8px 28px rgba(0,0,0,0.45), 0 0 0 1px rgba(125, 207, 138, 0.25);
}
#toast.toast-warn {
  border-color: #e85d04;
  color: #ffe0c2;
  background: rgba(40, 22, 12, 0.96);
}

#control-deck {
  min-height: var(--deck-h);
  padding: 8px 10px;
  border-top-width: 1px;
  justify-content: space-between;
}
.deck-cluster { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.zoom-read { color: var(--muted); font-size: 12px; min-width: 48px; text-align: center; }
.music-cluster { gap: 6px; }
.music-vol, .sfx-vol { display: flex; align-items: center; gap: 4px; }
.vol-mute-btn {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}
.vol-mute-btn:hover { border-color: var(--orange, #e85d04); color: var(--orange-2, #ff8a3d); }
.vol-mute-btn .vol-speaker-icon { display: block; pointer-events: none; }
.vol-mute-btn.is-muted,
.vol-mute-btn.muted {
  color: var(--muted, #8a9a8e);
  opacity: 0.72;
}
.vol-mute-btn.is-muted::after,
.vol-mute-btn.muted::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 50%;
  height: 2px;
  background: currentColor;
  transform: rotate(-35deg);
  border-radius: 1px;
  pointer-events: none;
}
.music-vol input[type="range"],
.sfx-vol input[type="range"] {
  width: 88px;
  accent-color: var(--accent, #e85d04);
  cursor: pointer;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#windows { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.window {
  pointer-events: auto;
  position: absolute;
  min-width: 260px;
  min-height: 120px;
  max-width: min(720px, 96vw);
  background: var(--panel);
  border: 1px solid #3a4654;
  box-shadow: 0 16px 40px var(--shadow);
  display: flex;
  flex-direction: column;
  color: var(--ink);
}
.window.hidden { display: none; }
.window.collapsed .win-body { display: none; }
.window.dock-left { left: 8px !important; top: 8px !important; bottom: 8px; height: auto !important; }
.window.dock-right { right: 8px !important; left: auto !important; top: 8px !important; bottom: 8px; height: auto !important; }
.window.dock-full { inset: 8px !important; width: auto !important; height: auto !important; }

.win-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #12161c;
  border-bottom: 1px solid var(--line);
  cursor: grab;
  user-select: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}
.win-title .ops { display: flex; gap: 4px; }
.win-btn { min-width: 36px; min-height: 36px; padding: 0 8px; font-size: 14px; }
.win-body {
  padding: 12px;
  overflow: auto;
  flex: 1;
  font-size: 14px;
  line-height: 1.45;
}
.win-body h2 { margin: 0 0 8px; font-size: 16px; }
.win-body .id { color: var(--gold); font-size: 12px; letter-spacing: 0.08em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

#map-graph {
  width: 100%;
  min-height: 280px;
  background: #0e1217;
  border: 1px solid var(--line);
}
.node-btn {
  fill: #1c222b;
  stroke: #5b6a7a;
  cursor: pointer;
}
.node-btn.active { stroke: var(--orange); fill: #2a2018; }
.node-btn.planned { stroke: var(--gold); }
.node-btn.here { stroke: var(--cyan); fill: #163036; }
.node-label { fill: var(--ink); font-size: 11px; pointer-events: none; }

.pack-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pack-list button {
  width: 100%;
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 12px;
  min-height: 44px;
  cursor: pointer;
  border-radius: 4px;
}
.pack-list button:hover { border-color: var(--cyan); }

/* Elevator keypad — floor numbers only (phone-style circles) */
.elevator-stops,
.elevator-stops.elev-keypad {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  gap: 14px 16px;
  justify-content: center;
  justify-items: center;
  align-items: center;
  margin: 10px auto 6px;
  padding: 8px 4px 12px;
  max-width: 220px;
}
.elevator-stops.elev-keypad[data-count="1"] { grid-template-columns: 56px; }
.elevator-stops.elev-keypad[data-count="2"] { grid-template-columns: repeat(2, 56px); }
.elevator-stops.elev-keypad[data-count="3"] { grid-template-columns: repeat(3, 56px); }
.elevator-stops.elev-keypad[data-count="4"] { grid-template-columns: repeat(2, 56px); }
/* 5 floors: 1–4 in a 2×2, 5 centered under the pad */
.elevator-stops.elev-keypad[data-count="5"] {
  grid-template-columns: repeat(2, 56px);
}
.elevator-stops.elev-keypad[data-count="5"] button:nth-child(5) {
  grid-column: 1 / -1;
  justify-self: center;
}
#win-elevator .win-body > p.muted { display: none !important; }
.elevator-stops button,
.elevator-stops button.elev-key {
  width: 56px;
  height: 56px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 18px/1 "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
  box-shadow: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.elevator-stops button.open { border-color: rgba(62, 198, 216, 0.55); color: #cfe; }
.elevator-stops button.open:hover,
.elevator-stops button.open:focus-visible {
  border-color: var(--cyan);
  outline: none;
}
/* Current floor: filled circle, no glow ring */
.elevator-stops button.open.current,
.elevator-stops button.open.current.active {
  background: #3ec6d8;
  color: #0a1218;
  border-color: #3ec6d8;
  box-shadow: none;
  font-weight: 700;
}
.elevator-stops button.ooo,
.elevator-stops button.out-of-order {
  border-color: rgba(180, 90, 90, 0.65);
  color: rgba(220, 170, 170, 0.85);
  background: repeating-linear-gradient(
    -45deg,
    var(--panel-2),
    var(--panel-2) 4px,
    rgba(120, 40, 40, 0.22) 4px,
    rgba(120, 40, 40, 0.22) 8px
  );
  text-decoration: line-through;
  cursor: not-allowed;
  position: relative;
  opacity: 0.82;
}
.elevator-stops button.ooo::after,
.elevator-stops button.out-of-order::after {
  content: "\2715";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 22px/1 "Segoe UI", system-ui, sans-serif;
  color: rgba(255, 120, 120, 0.85);
  pointer-events: none;
  text-decoration: none;
}
.elevator-stops button.closed {
  color: var(--dim);
  cursor: not-allowed;
  border-style: dashed;
  opacity: 0.72;
}
/* Selected destination: glow ring (primary cue; wins over current fill) */
.elevator-stops button.selected,
.elevator-stops button.to,
.elevator-stops button.open.selected,
.elevator-stops button.open.to {
  box-shadow: 0 0 0 3px rgba(62, 198, 216, 0.95), 0 0 16px rgba(62, 198, 216, 0.5);
}
@media (pointer: coarse) {
  .elevator-stops,
  .elevator-stops.elev-keypad {
    grid-template-columns: repeat(3, 64px);
    gap: 16px 18px;
    max-width: 260px;
  }
  .elevator-stops.elev-keypad[data-count="1"] { grid-template-columns: 64px; }
  .elevator-stops.elev-keypad[data-count="2"],
  .elevator-stops.elev-keypad[data-count="4"],
  .elevator-stops.elev-keypad[data-count="5"] { grid-template-columns: repeat(2, 64px); }
  .elevator-stops button,
  .elevator-stops button.elev-key {
    width: 64px;
    height: 64px;
    min-width: 56px;
    min-height: 56px;
    font-size: 20px;
  }
}
.elevator-stops button.on-path:not(.current):not(.active) {
  border-color: rgba(62, 198, 216, 0.7);
  color: #dff;
  background: rgba(62, 198, 216, 0.12);
}
/* Travel: car position lights in sequence (same fade journey as old strip) */
.elevator-stops.traveling button.active {
  background: #3ec6d8;
  color: #0a1218;
  border-color: #9ff;
}
.elevator-stops.traveling button.current:not(.active):not(.selected) {
  background: rgba(62, 198, 216, 0.22);
  color: #cfe;
  box-shadow: none;
}
/* Legacy label/hint list style removed from keypad */
.elevator-stops button .elev-stop-label,
.elevator-stops button .elev-stop-hint { display: none; }

#directory {
  position: absolute;
  inset: auto 12px 90px 12px;
  max-height: 50%;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px 16px;
  z-index: 9;
}
#directory.hidden { display: none; }
#directory ul { margin: 8px 0 0; padding-left: 18px; }
#directory .dir-you-are-here {
  margin: 6px 0 10px;
  font-size: 13px;
  color: var(--ink);
}
#directory .dir-major-label { margin: 0 0 4px; font-size: 11px; }
#directory ul.dir-major {
  list-style: none;
  margin: 0;
  padding: 0;
}
#directory ul.dir-major li {
  margin: 0;
  border-top: 1px solid var(--line);
}
#directory ul.dir-major li:first-child { border-top: none; }
#directory ul.dir-major a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 4px;
  color: var(--cyan);
  text-decoration: none;
}
#directory ul.dir-major a:hover { color: var(--ink); }
#directory ul.dir-major li.you-are-here {
  background: rgba(80, 200, 220, 0.08);
}
#directory ul.dir-major li.you-are-here a {
  color: var(--ink);
  font-weight: 600;
}
#directory .dir-here-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
  white-space: nowrap;
}

#noscript {
  padding: 24px;
  max-width: 720px;
}

@media (max-width: 720px) {
  #location-strip { flex-wrap: wrap; }
  .window { width: calc(100% - 16px) !important; left: 8px !important; }
  #control-deck { min-height: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

#status-chip.show { display: flex; }

/* Mobile virtual joystick — functional chrome only; shown via .show from JS */
#virtual-joy {
  display: none;
  position: absolute;
  left: max(12px, var(--safe-l));
  bottom: 16px;
  width: 116px;
  height: 116px;
  z-index: 4;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}
#virtual-joy.show { display: block; }
#virtual-joy .virtual-joy-base {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(232, 93, 4, 0.55);
  background: rgba(12, 14, 17, 0.48);
  box-shadow: inset 0 0 0 1px rgba(62, 198, 216, 0.12);
}
#virtual-joy .virtual-joy-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(232, 93, 4, 0.62);
  border: 1px solid rgba(255, 138, 61, 0.85);
  pointer-events: none;
}
@media (pointer: fine) {
  #virtual-joy:not(.force-touch) { display: none !important; }
}

/* Mobile jump — opposite corner from joystick */
#btn-mobile-jump {
  display: none;
  position: absolute;
  right: max(14px, var(--safe-r));
  bottom: 28px;
  z-index: 4;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(62, 198, 216, 0.65);
  background: rgba(12, 14, 17, 0.55);
  color: #e7e3d6;
  font: 600 12px Segoe UI, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
  box-shadow: inset 0 0 0 1px rgba(232, 93, 4, 0.18);
}
#btn-mobile-jump.show { display: block; }
#btn-mobile-jump:active { background: rgba(232, 93, 4, 0.45); }
@media (pointer: fine) {
  #btn-mobile-jump:not(.show) { display: none !important; }
}


/* Mobile control-deck drawer — slide/flick; shown via .deck-drawer from JS.
   Overlay (fixed) so expand/collapse does NOT resize #world / canvas. */
:root { --deck-handle-h: 28px; }
/* Drop the footer grid track while drawer overlays — playfield keeps full height. */
#app:has(> #control-deck.deck-drawer) {
  grid-template-rows: auto 1fr 0px;
}
#control-deck .deck-handle {
  display: none;
  flex: 0 0 auto;
  flex-basis: 100%;
  width: 100%;
  height: var(--deck-handle-h);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  align-items: center;
  justify-content: center;
  min-height: var(--deck-handle-h);
  min-width: 0;
  letter-spacing: 0;
  text-transform: none;
}
#control-deck .deck-handle:active { cursor: grabbing; }
#control-deck .deck-handle-bar {
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: rgba(154, 163, 173, 0.75);
  pointer-events: none;
}
#control-deck.deck-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 12;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px 8px;
  padding: 0 8px max(8px, env(safe-area-inset-bottom, 0px));
  min-height: 0;
  overflow: hidden;
  transition: max-height 0.18s ease-out;
  /* Overlay the map; do not participate in #app height. */
  box-sizing: border-box;
}
#control-deck.deck-drawer .deck-handle { display: flex; }
#control-deck.deck-drawer #btn-directory {
  display: none !important;
}

#control-deck.deck-drawer .deck-cluster {
  gap: 6px;
}
#control-deck.deck-drawer .hud-btn,
#control-deck.deck-drawer .icon-btn {
  min-height: 40px;
  min-width: 40px;
  padding: 6px 9px;
  font-size: 11px;
}
#control-deck.deck-drawer .vol-mute-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
}
#control-deck.deck-drawer .music-vol input[type="range"],
#control-deck.deck-drawer .sfx-vol input[type="range"] { width: 72px; }
#control-deck.deck-drawer.collapsed {
  max-height: calc(var(--deck-handle-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  min-height: var(--deck-handle-h);
}
#control-deck.deck-drawer.collapsed .deck-cluster {
  visibility: hidden;
  pointer-events: none;
}
#control-deck.deck-drawer.dragging {
  transition: none;
}
body.deck-collapsed #directory {
  inset: auto 12px 40px 12px;
}
@media (max-width: 720px) {
  #control-deck.deck-drawer:not(.collapsed) {
    min-height: 0;
  }
}


/* Attribute meters row — mood + HP stack; stamina later (not this pass) */
.attr-meters {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  min-height: 60px;
}
.attr-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  flex-shrink: 0;
  min-width: 132px;
  max-width: 188px;
}
/* Health — segmented HP under mood; ❤️ full left ↔ 🖤 empty right */
.health-meter {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 2px 8px 4px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  user-select: none;
  flex-shrink: 0;
  position: relative;
}
.health-meter-lab {
  display: block;
  color: var(--dim);
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-align: center;
  line-height: 1;
}
.health-meter-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.health-meter-face {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1;
  opacity: 0.92;
}
.health-meter-track {
  display: flex;
  align-items: stretch;
  gap: 2px;
  flex: 1;
  height: 8px;
  min-width: 56px;
  padding: 0;
}
.health-meter-seg {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  background: rgba(36, 28, 32, 0.85);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.health-meter-seg.is-filled {
  background: linear-gradient(180deg, #e07070, #b83838);
  box-shadow: 0 0 5px rgba(224, 96, 96, 0.45);
}
.health-meter[data-band="hurt"] .health-meter-seg.is-filled {
  background: linear-gradient(180deg, #e09860, #c06030);
}
.health-meter[data-band="critical"] .health-meter-seg.is-filled {
  background: linear-gradient(180deg, #f0c060, #d07828);
  box-shadow: 0 0 6px rgba(232, 160, 64, 0.5);
}
.health-meter[data-band="down"] .health-meter-track {
  outline: 1px solid rgba(212, 92, 92, 0.55);
  outline-offset: 1px;
}
.health-meter-val {
  font-size: 10px;
}
#control-deck.deck-drawer .attr-stack {
  max-width: 148px;
}
@media (max-width: 720px) {
  .attr-stack { min-width: 96px; max-width: 128px; }
  .health-meter { padding: 2px 6px 3px; }
  .health-meter-face { font-size: 10px; }
  .health-meter-track { height: 7px; gap: 1px; }
}

/* Mood / quality-of-living — bipolar bar: neutral = center; + green right / − red left */
.mood-meter {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  min-width: 132px;
  max-width: 188px;
  padding: 4px 8px 5px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  user-select: none;
  flex-shrink: 0;
  position: relative;
}
.mood-meter-lab {
  display: block;
  color: var(--dim);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-align: center;
  line-height: 1;
}
.mood-meter-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mood-meter-face {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
  opacity: 0.92;
  filter: grayscale(0.15);
}
.mood-meter-face--sad { transform: translateY(0.5px); }
.mood-meter-face--happy { transform: translateY(0.5px); }
.mood-meter-track {
  position: relative;
  flex: 1;
  height: 6px;
  min-width: 56px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(90, 40, 48, 0.45) 0%,
    rgba(44, 52, 62, 0.9) 45%,
    rgba(44, 52, 62, 0.9) 55%,
    rgba(40, 70, 52, 0.45) 100%);
  overflow: visible;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
}
.mood-meter-center {
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 2px;
  margin-left: -1px;
  background: rgba(230, 236, 244, 0.72);
  border-radius: 1px;
  z-index: 2;
  box-shadow: 0 0 4px rgba(255,255,255,0.25);
  pointer-events: none;
}
.mood-meter-fill {
  position: absolute;
  top: 0;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.6s ease, background 0.8s ease, box-shadow 0.8s ease;
  pointer-events: none;
}
.mood-meter-fill.is-pos {
  left: 50%;
  right: auto;
  background: linear-gradient(90deg, #3d8a55, #7dcf8a);
  box-shadow: 0 0 7px rgba(125, 207, 138, 0.55);
}
.mood-meter-fill.is-neg {
  right: 50%;
  left: auto;
  background: linear-gradient(270deg, #8a4048, #d45c5c);
  box-shadow: 0 0 7px rgba(212, 92, 92, 0.5);
}
.mood-meter-fill.is-mid {
  left: 50%;
  width: 0 !important;
  background: transparent;
  box-shadow: none;
}
.mood-meter-dir {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  text-shadow: 0 0 6px currentColor;
  white-space: nowrap;
}
.mood-meter-dir--pos { color: #8de0a0; }
.mood-meter-dir--neg { color: #f08a8a; }
.mood-meter-dir--burst {
  animation: mood-dir-burst 1.5s ease-out forwards;
}
@keyframes mood-dir-burst {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.7); filter: brightness(1.4); }
  18%  { opacity: 1; transform: translate(-50%, -50%) scale(1.15); filter: brightness(1.6); }
  55%  { opacity: 0.95; transform: translate(-50%, -50%) scale(1); filter: brightness(1.25); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.05); filter: brightness(1); }
}
@media (prefers-reduced-motion: reduce) {
  .mood-meter-dir--burst {
    animation: mood-dir-burst-rm 0.9s ease-out forwards;
  }
  @keyframes mood-dir-burst-rm {
    0%   { opacity: 0.85; }
    100% { opacity: 0; }
  }
}
.mood-meter-val {
  min-width: 52px;
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  text-transform: lowercase;
}
.mood-meter[data-band="ecstatic"] .mood-meter-fill.is-pos {
  background: linear-gradient(90deg, #a89048, #e8d48a);
  box-shadow: 0 0 8px rgba(232, 212, 138, 0.55);
}
.mood-meter[data-band="ecstatic"] .mood-meter-val { color: var(--gold); }
.mood-meter[data-band="happy"] .mood-meter-val { color: var(--green); }
.mood-meter[data-band="neutral"] .mood-meter-val { color: var(--muted); }
.mood-meter[data-band="uneasy"] .mood-meter-val { color: var(--orange-2); }
.mood-meter[data-band="sad"] .mood-meter-fill.is-neg {
  background: linear-gradient(270deg, #6a3038, #e06060);
  box-shadow: 0 0 8px rgba(224, 96, 96, 0.55);
}
.mood-meter[data-band="sad"] .mood-meter-val { color: var(--danger); }

.mood-meter {
  cursor: pointer;
}
.mood-meter:hover,
.mood-meter:focus-visible {
  border-color: rgba(126, 200, 216, 0.35);
  background: rgba(255,255,255,0.03);
  outline: none;
}

/* Mini full-body self — private inner consciousness (deck-only; never mirrored) */
.mood-self {
  position: relative;
  appearance: none;
  display: flex !important;
  align-items: flex-end;
  justify-content: center;
  width: 52px;
  height: 60px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(126, 200, 216, 0.22);
  border-radius: 8px;
  background: rgba(12, 16, 22, 0.65);
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  z-index: 2;
}
.mood-self:hover,
.mood-self:focus-visible {
  border-color: rgba(126, 200, 216, 0.4);
  background: rgba(20, 28, 36, 0.7);
  outline: none;
}
.mood-self-canvas {
  width: 52px;
  height: 60px;
  display: block;
  pointer-events: none;
  image-rendering: pixelated;
}
.mood-self-thought {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%) translateY(4px);
  max-width: 140px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(248, 246, 240, 0.95);
  color: #1a1e24;
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.mood-self-thought::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: rgba(248, 246, 240, 0.95);
}
.mood-self-thought.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.mood-self[data-band="sad"] { box-shadow: inset 0 0 0 1px rgba(212, 92, 92, 0.25); }
.mood-self[data-band="uneasy"] { box-shadow: inset 0 0 0 1px rgba(232, 150, 80, 0.22); }
.mood-self[data-band="happy"] { box-shadow: inset 0 0 0 1px rgba(125, 207, 138, 0.25); }
.mood-self[data-band="ecstatic"] { box-shadow: inset 0 0 0 1px rgba(232, 212, 138, 0.3); }

@media (prefers-reduced-motion: reduce) {
  .mood-self-thought { transition: opacity 0.2s ease; }
}

.design-living-qol {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  border-left: 1px solid var(--line);
}
#control-deck.deck-drawer .attr-meters {
  order: 5;
}
#control-deck.deck-drawer .mood-meter {
  max-width: 148px;
}
@media (max-width: 720px) {
  .mood-meter-lab { display: block; }
  .mood-meter { min-width: 96px; max-width: 128px; }
  .mood-meter-val { min-width: 44px; font-size: 10px; }
  .mood-self { width: 46px; height: 54px; }
  .mood-self-canvas { width: 46px; height: 54px; }
  .mood-self-thought { max-width: 110px; font-size: 9px; }
  .design-living-qol { font-size: 11px; padding: 4px 8px; }
}

/* Emote picker (control deck) */
#control-deck { position: relative; }
#emote-picker-wrap {
  position: absolute;
  left: 10px;
  bottom: calc(100% + 6px);
  z-index: 40;
  pointer-events: none;
}
#emote-picker {
  display: none;
  pointer-events: auto;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  max-width: min(320px, calc(100vw - 24px));
  background: var(--panel, rgba(18, 20, 24, 0.96));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 0 0 1px rgba(232, 93, 4, 0.12);
}
#emote-picker.open { display: flex; }
#emote-picker .emote-pick {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  min-height: 40px;
  min-width: 64px;
  padding: 6px 10px;
  border-radius: 6px;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
#emote-picker .emote-pick:hover,
#emote-picker .emote-pick:focus-visible {
  border-color: var(--orange);
  color: var(--orange-2);
  outline: none;
}
#control-deck.deck-drawer #emote-picker-wrap {
  left: 8px;
  bottom: calc(100% + 4px);
}

/* Bed Rest / Sleep choice (bedrest1) */
.bed-choice {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  z-index: 36;
  min-width: 220px;
  background: rgba(12, 14, 17, 0.94);
  border: 1px solid var(--line, #3a4650);
  border-radius: 10px;
  padding: 12px 14px 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
  pointer-events: auto;
}
.bed-choice.hidden { display: none; }
.bed-choice-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink, #e8e4d8);
  text-align: center;
}
.bed-choice-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.bed-choice-hint {
  margin: 8px 0 0;
  font-size: 11px;
  text-align: center;
}

/* Prop harvest / dismantle choice — same shell as bed-choice */
.prop-choice,
.bed-choice.prop-choice {
  /* shared with .bed-choice */
}
.prop-choice .bed-choice-title,
.prop-choice .prop-choice-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink, #e8e4d8);
  text-align: center;
}
.pack-tools-label {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #8a96a3);
}
.pack-tools-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pack-tools-list button {
  text-align: left;
  width: 100%;
}
.pack-collectibles-label {
  margin: 10px 0 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #8a96a3);
}


/* Apt owner home menu (in-room) — rename anytime; sell stub metals-only */
.apt-owner-fab {
  position: fixed;
  right: 14px;
  bottom: 72px;
  z-index: 40;
  min-width: 64px;
}
.apt-owner-panel {
  position: fixed;
  right: 14px;
  bottom: 118px;
  z-index: 41;
  width: min(320px, calc(100vw - 28px));
  padding: 12px 14px;
  background: rgba(12, 14, 17, 0.96);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  color: #e8e6e1;
  font-size: 13px;
}
.apt-owner-panel.hidden { display: none; }
.apt-owner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.apt-owner-close { min-width: 32px; padding: 2px 8px; }
.apt-owner-id { margin: 0 0 8px; line-height: 1.35; }
.apt-owner-label { display: block; margin: 8px 0; }
.apt-owner-label input,
.apt-owner-label select {
  display: block;
  width: 100%;
  margin-top: 4px;
  box-sizing: border-box;
}
.apt-owner-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.apt-owner-hr { border: 0; border-top: 1px solid rgba(255,255,255,0.12); margin: 12px 0; }
.apt-owner-sell { width: 100%; opacity: 0.85; }
.apt-owner-sell-hint { margin: 8px 0 0; font-size: 11px; line-height: 1.35; }


/* —— Inventory (Pack window upgrade, inv1) —— */
.pack-inv { display: flex; flex-direction: column; gap: 8px; min-height: 0; height: 100%; }
.pack-tabs {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
  padding: 2px 0 8px;
  border-bottom: 1px solid #2a3340;
  margin: 0 0 2px;
}
.pack-tab {
  appearance: none;
  flex: 1 1 0;
  background: #12161c;
  border: 1px solid #2a3340;
  color: #c8d0da;
  border-radius: 999px;
  padding: 6px 10px;
  min-height: 36px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.pack-tab:hover { border-color: rgba(94, 200, 216, 0.45); }
.pack-tab.active,
.pack-tab[aria-selected="true"] {
  border-color: var(--cyan, #5ec8d8);
  color: var(--ink, #e8eef5);
  background: #161c24;
}
/* Pack bag strip (WoW-like bag selector) — invbags1 */
.pack-bag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
  padding: 4px 0 6px;
}
.pack-bag-strip.hidden { display: none !important; }
.pack-bag-btn {
  appearance: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 44px;
  min-height: 44px;
  padding: 4px 6px;
  background: #12161c;
  border: 1px solid #2a3340;
  border-radius: 10px;
  color: #c8d0da;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  line-height: 1.1;
}
.pack-bag-btn:hover { border-color: rgba(94, 200, 216, 0.45); }
.pack-bag-btn.active,
.pack-bag-btn[aria-pressed="true"] {
  border-color: var(--cyan, #5ec8d8);
  background: #161c24;
  color: var(--ink, #e8eef5);
}
.pack-bag-btn-ico { font-size: 16px; line-height: 1; }
.pack-bag-btn-meta { font-size: 10px; color: var(--muted, #8a96a3); }
.pack-bag-btn-stub {
  opacity: 0.65;
  font-size: 18px;
  font-weight: 600;
}
.pack-slot-empty {
  pointer-events: none;
  opacity: 0.55;
  cursor: default;
  border-style: dashed;
}
.pack-thumb-empty {
  background: #1a2028 !important;
  color: transparent !important;
}
.pack-grid-view { display: flex; flex-direction: column; gap: 6px; overflow: auto; flex: 1 1 auto; min-height: 0; }
.pack-grid-view.hidden,
.pack-detail.hidden { display: none !important; }
.pack-section-label {
  margin: 8px 0 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #8a96a3);
}
.pack-section-label:first-child { margin-top: 0; }
.pack-section-empty { margin: 0 0 8px; font-size: 12px; }
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin: 0 0 6px;
}
.pack-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px 6px;
  min-height: 88px;
  background: var(--panel-2, #1a2028);
  border: 1px solid var(--line, #3a4552);
  border-radius: 6px;
  color: var(--ink, #e8e4d8);
  cursor: pointer;
  text-align: center;
}
.pack-slot:hover,
.pack-slot:focus-visible {
  border-color: var(--cyan, #5ec8d8);
  outline: none;
}
.pack-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #12161c;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pack-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}
.pack-thumb-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 8px;
}
.pack-thumb-lg {
  width: 96px;
  height: 96px;
  margin: 0 auto 12px;
  border-radius: 12px;
}
.pack-thumb-lg .pack-thumb-ph { font-size: 28px; border-radius: 12px; }
.pack-qty {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
  pointer-events: none;
}
.pack-slot-name {
  font-size: 10px;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink, #e8e4d8);
  opacity: 0.9;
}
.pack-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
}
.pack-detail-back {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--line, #3a4552);
  color: var(--cyan, #5ec8d8);
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  min-height: 36px;
}
.pack-detail-back:hover { border-color: var(--cyan, #5ec8d8); }
.pack-detail-card {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--panel-2, #1a2028);
  border: 1px solid var(--line, #3a4552);
  border-radius: 8px;
  color: var(--ink, #e8e4d8);
  padding: 16px 14px 12px;
  cursor: pointer;
}
.pack-detail-card:hover { border-color: var(--cyan, #5ec8d8); }
.pack-detail-name {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}
.pack-detail-id { margin: 0 0 8px; }
.pack-detail-meta { margin: 0 0 10px; font-size: 12px; }
.pack-detail-desc {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}
.pack-detail-hint { margin: 0; font-size: 11px; }

/* Inventory equip — invequip1 */
.pack-slot.is-equipped {
  border-color: #6ec8a0;
  box-shadow: 0 0 0 1px rgba(110, 200, 160, 0.35);
}
.pack-equipped-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #1e3a2e;
  color: #9ee0bf;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  border: 1px solid rgba(158, 224, 191, 0.45);
}
.pack-equip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(30, 40, 48, 0.85);
  border: 1px solid rgba(110, 200, 160, 0.28);
  cursor: pointer;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  color: var(--ink, #e7e3d6);
  font-size: 13px;
}
.pack-equip-row:hover { border-color: rgba(110, 200, 160, 0.55); }
.pack-equip-check {
  width: 16px;
  height: 16px;
  accent-color: #6ec8a0;
  cursor: pointer;
}
.pack-equip-label { flex: 1; font-weight: 600; }
.pack-equip-status {
  font-size: 11px;
  color: #8a93a0;
  letter-spacing: 0.02em;
}
.pack-equip-status.is-on {
  color: #9ee0bf;
  font-weight: 600;
}


/* —— Wallet (Inventory + HUD; moved out of Account) —— */
.inv-wallet {
  flex: 0 0 auto;
  margin: 0 0 4px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #2a3340;
  background: #0c0e11;
  overflow: hidden;
}
.inv-wallet-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.inv-wallet-strip:hover,
.inv-wallet-strip:focus-visible {
  background: rgba(94, 200, 216, 0.06);
  outline: none;
}
.inv-wallet-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  font-size: 13px;
}
.inv-wallet-row-full { margin: 2px 0 4px; padding: 0 10px; }
.inv-wallet-chev {
  color: var(--muted, #8a96a3);
  font-size: 12px;
  flex: 0 0 auto;
}
.inv-coin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #c8d0da;
}
.inv-coin strong {
  font-variant-numeric: tabular-nums;
  color: #e8eef5;
  font-weight: 700;
}
.inv-coin-lab {
  font-size: 11px;
  color: var(--muted, #8a96a3);
  text-transform: lowercase;
}
.inv-coin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  flex: 0 0 auto;
}
.inv-coin.gold .inv-coin-dot { background: #d4a017; box-shadow: 0 0 6px rgba(212,160,23,0.35); }
.inv-coin.silver .inv-coin-dot { background: #a8b4c0; box-shadow: 0 0 6px rgba(168,180,192,0.25); }
.inv-coin.copper .inv-coin-dot { background: #b87333; box-shadow: 0 0 6px rgba(184,115,51,0.3); }
.inv-wallet-panel {
  padding: 0 0 8px;
  border-top: 1px solid #2a3340;
}
.inv-wallet-panel-lab {
  margin: 8px 10px 2px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #8a96a3);
}
.inv-wallet-hint { margin: 2px 10px 6px; font-size: 11px; }
.inv-wallet-stub {
  margin: 0 10px 2px;
  font-size: 12px;
  font-style: italic;
}

/* HUD pocket pill (coins + bag) — replaces separate Inventory + wallet chip */
.hud-pocket,
.hud-wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  min-height: 44px;
  min-width: 44px;
  background: #0c0e11;
  border: 1px solid #2a3340;
  border-radius: 999px;
  color: #c8d0da;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  vertical-align: middle;
}
.hud-pocket:hover,
.hud-pocket:focus-visible,
.hud-pocket.active,
.hud-wallet:hover,
.hud-wallet:focus-visible,
.hud-wallet.active {
  border-color: var(--cyan, #5ec8d8);
  outline: none;
}
.hud-pocket.guest,
.hud-wallet.guest { opacity: 0.72; }
.hud-pocket-row,
.hud-wallet-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.hud-pocket-coins {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hud-pocket-divider {
  width: 1px;
  align-self: stretch;
  min-height: 16px;
  background: #2a3340;
}
.hud-pocket-bag {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #c8d0da;
}
.hud-pocket-bag-icon { display: block; }
.hud-pocket-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #12151a;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}
.hud-pocket .inv-coin,
.hud-wallet .inv-coin { gap: 4px; }
.hud-pocket .inv-coin-dot,
.hud-wallet .inv-coin-dot { width: 8px; height: 8px; }
.hud-pocket .inv-coin-lab,
.hud-wallet .inv-coin-lab { font-size: 10px; }
#control-deck.deck-drawer .hud-pocket,
#control-deck.deck-drawer .hud-wallet {
  padding: 6px 10px;
  min-height: 44px;
}
#control-deck.deck-drawer .hud-pocket-row,
#control-deck.deck-drawer .hud-wallet-row { gap: 6px; }

/* Places tabs inside #win-map */
.places-tabs {
  display: flex;
  gap: 6px;
  padding: 0 0 8px;
  border-bottom: 1px solid #2a3340;
  margin-bottom: 8px;
}
.places-tab {
  appearance: none;
  background: #12161c;
  border: 1px solid #2a3340;
  color: #c8d0da;
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 36px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.places-tab.active,
.places-tab[aria-selected="true"] {
  border-color: var(--cyan, #5ec8d8);
  color: var(--ink, #e8eef5);
}
.places-pane { min-height: 0; }
.places-directory {
  padding: 2px 0 8px;
}
.places-directory .dir-you-are-here { margin: 6px 0 10px; font-size: 13px; }
.places-directory ul.dir-major {
  list-style: none;
  margin: 0;
  padding: 0;
}
.places-directory ul.dir-major li {
  border-top: 1px solid var(--line, #2a3340);
}
.places-directory ul.dir-major li:first-child { border-top: none; }
.places-directory ul.dir-major a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 4px;
  color: var(--cyan, #5ec8d8);
  text-decoration: none;
}
.places-directory ul.dir-major li.you-are-here a {
  color: var(--ink, #e8eef5);
  font-weight: 600;
}

/* Properties menu */
.props-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.props-list li { border-top: 1px solid #2a3340; }
.props-list li:first-child { border-top: none; }
.props-list .props-li {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.props-list .props-row { flex: 1 1 auto; text-align: left; }
.props-list .props-row-home {
  border-color: #3ec6d8;
  background: rgba(62, 198, 216, 0.08);
}
.props-home-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #3ec6d8;
  color: #0b1218;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.props-set-home {
  flex: 0 0 auto;
  min-width: 32px;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1;
}
.props-set-home:disabled { opacity: 0.55; cursor: default; }
.props-hint { font-size: 11px; margin: 0 0 8px; }
.apt-owner-fab { display: none !important; }
.props-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 6px;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  min-height: 44px;
}
.props-row:hover { color: var(--cyan, #5ec8d8); }
.props-name { font-weight: 600; }
.props-code { font-size: 11px; }

/* Settings */
.hud-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
}
.hud-settings-icon { display: block; }
.settings-section { margin: 0 0 14px; }
.settings-lab {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #8a96a3);
}
.settings-account-btn { width: 100%; min-height: 44px; }
.settings-audio {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.settings-audio .music-vol,
.settings-audio .sfx-vol {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.settings-audio input[type="range"] { flex: 1; width: auto; min-width: 0; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
}

/* Legacy deck chrome hidden by HUD pass (JS also hides) */
#control-deck #btn-pack.hidden,
#control-deck #btn-directory.hidden,
#control-deck #btn-account.hidden,
#control-deck .music-cluster.hidden {
  display: none !important;
}


/* Party frame HUD — top-left (away from Online census top-right) · partyframe1 */
#party-frame.party-frame,
.party-frame {
  position: fixed;
  top: calc(var(--hud-h) + var(--safe-t) + 10px);
  left: calc(10px + var(--safe-l));
  z-index: 34;
  min-width: 148px;
  max-width: 200px;
  padding: 8px 8px 6px;
  background: linear-gradient(180deg, rgba(22, 26, 32, 0.94), rgba(14, 17, 22, 0.92));
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px var(--shadow);
  pointer-events: auto;
}
.party-frame.hidden { display: none !important; }
.party-frame-head {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 2px 6px;
}
.party-frame-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.party-frame-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.party-frame-row:hover:not(:disabled),
.party-frame-row:focus-visible:not(:disabled) {
  border-color: var(--cyan);
  background: rgba(62, 198, 216, 0.08);
}
.party-frame-row.self {
  cursor: default;
  border-color: rgba(196, 163, 90, 0.35);
}
.party-frame-row.empty {
  opacity: 0.35;
  cursor: default;
}
.party-frame-av {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #24303a;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 600;
}
.party-frame-row.self .party-frame-av {
  background: #3a3020;
  color: var(--gold);
}
.party-frame-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.party-frame-name {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.party-frame-hp {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: #2a323c;
  overflow: hidden;
}
.party-frame-hp-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #3a9a52, var(--green));
  border-radius: 2px;
}
.party-frame-menu {
  position: fixed;
  z-index: 50;
  min-width: 180px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px var(--shadow);
}
.party-frame-menu-btn {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.party-frame-menu-btn:hover,
.party-frame-menu-btn:focus-visible {
  background: rgba(62, 198, 216, 0.12);
  color: var(--cyan);
}

/* Player Sheet → Mail compose (same window) */
.acct-sheet-mail-form label {
  display: block;
  margin: 8px 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.acct-sheet-mail-form input,
.acct-sheet-mail-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
}


/* First-act Mr. Laser quest HUD checklist (firstact1) */
.fa-quest-hud {
  position: absolute;
  right: 12px;
  bottom: 72px;
  z-index: 40;
  min-width: 148px;
  max-width: 200px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(12, 16, 22, 0.82);
  border: 1px solid rgba(120, 150, 180, 0.28);
  color: #d7e2ec;
  font-size: 11px;
  line-height: 1.35;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.fa-quest-hud.hidden { display: none; }
.fa-quest-hud.done { border-color: rgba(120, 180, 120, 0.45); }
.fa-quest-title {
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9bb0c4;
  margin-bottom: 4px;
}
.fa-quest-line { margin: 2px 0; color: #b8c6d4; }
.fa-quest-line.done { color: #8fce8f; }
.fa-check { display: inline-block; width: 1em; }
.fa-laser-panel .hud-btn { pointer-events: auto; }
@media (max-width: 720px) {
  .fa-quest-hud {
    right: 8px;
    bottom: 96px;
    min-width: 120px;
    font-size: 10px;
  }
}


/* Floor Plan MVP (Places tab) */
.floorplan-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  flex-wrap: wrap;
}
.floorplan-z-lab {
  font-size: 12px;
  color: #c8d0da;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.floorplan-z-lab select {
  background: #12161c;
  color: #e8eef5;
  border: 1px solid #2a3340;
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
  font-size: 12px;
}
.floorplan-hint { font-size: 11px; }
#floorplan-svg {
  width: 100%;
  height: auto;
  min-height: 280px;
  background: #0b0e12;
  border: 1px solid #2a3340;
  border-radius: 8px;
}


/* Locked door prompt (doubledoor2) — shell shared with .bed-choice */
.door-lock .bed-choice-title {
  color: #e8c56a;
}
.door-lock [data-door-act="unlock"]:disabled {
  opacity: 0.45;
  pointer-events: none;
}
/* Default selection: Unlock — clear perimeter / focus ring */
.door-lock [data-door-act].door-lock-focus,
.door-lock [data-door-act]:focus-visible {
  outline: 2px solid #e8c56a;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(232, 197, 106, 0.38), inset 0 0 0 1px rgba(232, 197, 106, 0.55);
  border-color: #e8c56a;
}
.door-lock [data-door-act="unlock"].door-lock-focus {
  /* Unlock is the seamless default while the prompt is open */
  filter: brightness(1.08);
}


/* Plate coord readout — compact under zoom (no deck shove) */
#control-deck .zoom-cluster {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: 0 0 auto;
}
#control-deck .zoom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
#control-deck .coord-status {
  flex: 0 0 auto;
  width: auto;
  max-width: 148px;
  margin: 0;
  padding: 0 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--muted, #8b97a5);
  font-size: 9px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  text-align: right;
}
#control-deck .coord-status-lab {
  display: none;
}
#control-deck .coord-status-val {
  color: #7ec8d4;
  font-variant-numeric: tabular-nums;
}
#control-deck .coord-status-idle .coord-status-val,
#control-deck .coord-status-off .coord-status-val { color: var(--dim, #5a6570); }
#control-deck .coord-status-off { opacity: 0.35; }
.coord-hover-hud { display: none !important; }

/* Graphics quality (Settings) */
.settings-hint { margin: 0 0 8px; font-size: 12px; opacity: 0.72; line-height: 1.35; }
.settings-gfx-presets { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.settings-gfx-presets .hud-btn { flex: 1; min-width: 72px; }
.settings-gfx-presets .hud-btn.active { outline: 1px solid #3ec6d8; }

/* Elevator travel progression — integrated into keypad circles; strip hidden */
.elev-travel-strip {
  display: none !important;
}


/* —— mailhud1 · New mail badge near mini-avatar —— */
.hud-mail-badge {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: 0 0 10px 2px;
  border-radius: 999px;
  border: 1px solid rgba(232, 184, 74, 0.45);
  background: rgba(18, 16, 10, 0.85);
  color: #f0d78a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.hud-mail-badge:hover,
.hud-mail-badge:focus-visible {
  border-color: #e8b84a;
  box-shadow: 0 0 10px rgba(232, 184, 74, 0.35);
  outline: none;
}
.hud-mail-badge-icon { font-size: 14px; line-height: 1; }
.hud-mail-badge-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e85c5c;
  box-shadow: 0 0 6px rgba(232, 92, 92, 0.8);
  display: none;
}
.hud-mail-badge.is-on .hud-mail-badge-dot { display: block; }
.hud-mail-badge[hidden] { display: none !important; }
#control-deck.deck-drawer .hud-mail-badge { margin-bottom: 6px; width: 24px; height: 24px; }
