/* MyScape — AXIUM Central: multiplayer mind-map canvas
   Dark "instrument" surface that floats under the site's frosted header. */

.map-body { background: #05070b; overflow: hidden; height: 100vh; }
.map-body .site-footer { display: none; }
.map-body .site-header { position: fixed; top: 0; left: 0; right: 0; }

.map-stage {
  position: fixed; inset: 0;
  background:
    radial-gradient(1100px 780px at 50% 46%, rgba(30,58,88,.45), rgba(5,7,11,0) 68%),
    radial-gradient(760px 520px at 82% 12%, rgba(157,140,255,.10), rgba(5,7,11,0) 70%),
    #05070b;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
#map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
#map-canvas.dragging { cursor: grabbing; }
#map-canvas.linking { cursor: crosshair; }

/* ---------- shared HUD chrome ---------- */
.hud {
  position: absolute; z-index: 5;
  background: rgba(11,16,23,.78);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 18px 44px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.05);
  color: #e7eef7;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.hud kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px; letter-spacing: .04em;
  border: 1px solid rgba(255,255,255,.18); border-bottom-color: rgba(255,255,255,.28);
  border-radius: 5px; padding: 1px 5px; color: #b9c6d6; background: rgba(255,255,255,.04);
}

/* ---------- workspace plate ---------- */
.hud-workspace { top: 96px; left: 22px; width: 268px; padding: 16px 18px 14px; }
.ws-eyebrow {
  display: flex; align-items: center; gap: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px; letter-spacing: .22em; color: #7f93aa;
}
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: #56e08b; box-shadow: 0 0 10px #56e08b; }
.dot-live.off { background: #ff7a7a; box-shadow: 0 0 10px #ff7a7a; }
.ws-title { margin: 7px 0 6px; font-size: 21px; font-weight: 700; letter-spacing: -.2px; color: #f4f8fd; }
.ws-meta { display: flex; gap: 7px; align-items: center; font-family: ui-monospace, monospace; font-size: 10.5px; color: #8fa3b8; }
.ws-meta .sep { color: #33465c; }
.ws-open { margin-left: auto; color: #7fd3ff; text-decoration: none; font-size: 10.5px; letter-spacing: .04em; border-bottom: 1px dotted rgba(127,211,255,.45); }
.ws-open:hover { color: #eafaff; border-bottom-color: #eafaff; }
.ws-progress { margin-top: 12px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.ws-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg,#4fd1ff,#6ee7b7); box-shadow: 0 0 12px rgba(79,209,255,.6); transition: width .35s ease; }
.ws-progress-label { display: flex; justify-content: space-between; margin-top: 6px; font-family: ui-monospace, monospace; font-size: 10px; color: #7f93aa; }

/* ---------- left rail ---------- */
.hud-rail { top: 236px; left: 22px; width: 268px; padding: 12px 12px 10px; max-height: calc(100vh - 400px); display: flex; flex-direction: column; overflow: hidden; }
.rail-search { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: #8299b0; }
.rail-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: #e7eef7; font-size: 12.5px; font-family: inherit; }
.rail-search input::placeholder { color: #647a90; }
.search-results { position: absolute; top: 40px; left: 0; right: 0; background: #0f1620; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 4px; z-index: 9; box-shadow: 0 18px 40px rgba(0,0,0,.6); max-height: 240px; overflow-y: auto; }
.search-hit { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; font-size: 12px; color: #cfdcec; cursor: pointer; }
.search-hit:hover, .search-hit.active { background: rgba(79,209,255,.14); }
.search-hit .k { font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: .12em; color: #7f93aa; }
.rail-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 4px 8px; font-family: ui-monospace, monospace; font-size: 9.5px; letter-spacing: .2em; color: #667d94; }
.rail-add { background: none; border: 1px solid rgba(255,255,255,.12); color: #9fb4c9; border-radius: 7px; width: 20px; height: 20px; line-height: 1; cursor: pointer; font-size: 13px; }
.rail-add:hover { color: #4fd1ff; border-color: rgba(79,209,255,.5); }
.rail-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; }
.dept-row { display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: 8px; cursor: pointer; border: none; background: none; text-align: left; font-family: inherit; color: #cfdcec; }
.dept-row:hover { background: rgba(255,255,255,.05); }
.dept-row.dim { opacity: .42; }
.dept-swatch { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; }
.dept-name { flex: 1; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dept-count { font-family: ui-monospace, monospace; font-size: 10px; color: #778da3; }
.dept-row .eye { width: 14px; height: 14px; color: #55697e; }
.dept-row.dim .eye { color: #2c3b4c; }
.rail-sep { height: 1px; background: rgba(255,255,255,.07); margin: 10px 2px; }
.rail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex: 0 0 auto; }
.rail-search, .rail-head, .rail-sep { flex: 0 0 auto; }
.rail-btn { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); color: #b9c9da; border-radius: 8px; padding: 6px 4px; font-size: 11.5px; font-family: inherit; cursor: pointer; }
.rail-btn:hover { background: rgba(79,209,255,.12); color: #e9f6ff; border-color: rgba(79,209,255,.35); }
.rail-btn.active { background: rgba(79,209,255,.18); color: #eafaff; border-color: rgba(79,209,255,.55); }
.rail-btn.ro { opacity: .5; }
.rail-btn.ro:hover { background: rgba(255,255,255,.05); color: #b9c9da; border-color: rgba(255,255,255,.09); }

/* ---------- inspector ---------- */
.hud-inspector { top: 96px; right: 22px; width: 300px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 9px; max-height: calc(100vh - 320px); overflow-y: auto; z-index: 7; }
.hud-inspector:not(.hidden) ~ .hud-people { display: none; }
.ins-head { display: flex; align-items: center; justify-content: space-between; }
.ins-kind { font-family: ui-monospace, monospace; font-size: 9.5px; letter-spacing: .2em; color: #4fd1ff; }
.ins-close { background: none; border: none; color: #778da3; cursor: pointer; font-size: 13px; padding: 2px 4px; }
.ins-close:hover { color: #fff; }
.ins-title { width: 100%; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); border-radius: 9px; color: #f4f8fd; font-size: 15px; font-weight: 600; padding: 8px 10px; font-family: inherit; outline: none; }
.ins-title:focus, .ins-input:focus { border-color: rgba(79,209,255,.55); box-shadow: 0 0 0 3px rgba(79,209,255,.12); }
.ins-row { display: flex; gap: 5px; flex-wrap: wrap; }
.pill { flex: 1; min-width: 58px; padding: 5px 6px; border-radius: 7px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: #a8bacb; font-size: 11px; font-family: inherit; cursor: pointer; }
.pill:hover { color: #fff; }
.pill[data-status="doing"].on { background: rgba(79,209,255,.2); border-color: rgba(79,209,255,.6); color: #dff4ff; }
.pill[data-status="done"].on { background: rgba(86,224,139,.18); border-color: rgba(86,224,139,.55); color: #ddffe9; }
.pill[data-status="blocked"].on { background: rgba(255,122,122,.18); border-color: rgba(255,122,122,.55); color: #ffe1e1; }
.pill[data-status="todo"].on { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.ins-label { display: flex; flex-direction: column; gap: 4px; font-family: ui-monospace, monospace; font-size: 9.5px; letter-spacing: .14em; color: #667d94; text-transform: uppercase; }
.ins-input { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); border-radius: 8px; color: #dbe7f3; font-size: 12.5px; padding: 7px 9px; font-family: inherit; outline: none; text-transform: none; letter-spacing: 0; }
.ins-input option { background: #0f1620; color: #dbe7f3; }
.ins-note { min-height: 64px; resize: vertical; line-height: 1.5; }
.ins-stats { display: flex; gap: 12px; flex-wrap: wrap; font-family: ui-monospace, monospace; font-size: 10px; color: #778da3; padding: 2px 1px; }
.ins-stats b { color: #b9c9da; font-weight: 600; }
.ins-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ins-btn { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #c3d3e3; border-radius: 8px; padding: 7px 6px; font-size: 11.5px; font-family: inherit; cursor: pointer; }
.ins-btn:hover:not(:disabled) { border-color: rgba(79,209,255,.45); color: #eafaff; }
.ins-btn:disabled { opacity: .35; cursor: default; }
.ins-btn.danger { color: #ff9d9d; border-color: rgba(255,122,122,.3); grid-column: 1 / -1; }
.ins-btn.danger:hover { background: rgba(255,122,122,.14); border-color: rgba(255,122,122,.7); color: #ffd3d3; }

/* ---------- presence ---------- */
.hud-people { top: 96px; right: 22px; width: 300px; padding: 10px 12px; transform: translateY(0); }
.hud-people.shift-down { transform: translateY(0); }
.people-head { display: flex; align-items: center; justify-content: space-between; font-family: ui-monospace, monospace; font-size: 9.5px; letter-spacing: .2em; color: #667d94; }
.people-count { color: #56e08b; letter-spacing: 0; font-size: 11px; }
.people-list { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.person { display: flex; align-items: center; gap: 7px; padding: 3px 2px; border-radius: 7px; cursor: pointer; border: none; background: none; color: #cfdcec; font-family: inherit; text-align: left; width: 100%; }
.person:hover { background: rgba(255,255,255,.05); }
.person svg { border-radius: 50%; flex: 0 0 auto; }
.person-name { flex: 1; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-tag { font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: .1em; color: #667d94; }
.person.following { background: rgba(79,209,255,.12); }
.person.following .person-tag { color: #4fd1ff; }

/* ---------- activity ---------- */
.hud-activity { left: 22px; bottom: 24px; width: 268px; padding: 10px 12px; }
.act-head { font-family: ui-monospace, monospace; font-size: 9.5px; letter-spacing: .2em; color: #667d94; margin-bottom: 4px; }
.act-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: #93a7bb; max-height: 96px; overflow: hidden; }
.act-list li { display: flex; gap: 6px; align-items: baseline; animation: actin .3s ease both; }
.act-list b { color: #cfdcec; font-weight: 600; }
.act-list .t { margin-left: auto; font-family: ui-monospace, monospace; font-size: 9px; color: #4d637a; }
@keyframes actin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- zoom ladder ---------- */
.hud-zoom { right: 22px; bottom: 24px; width: 300px; padding: 10px 12px 12px; }
.zoom-bands { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
.zband { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); color: #7f93aa; font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: .16em; padding: 5px 2px; border-radius: 6px; cursor: pointer; }
.zband:hover { color: #dff4ff; }
.zband.on { background: rgba(79,209,255,.16); border-color: rgba(79,209,255,.5); color: #e9f9ff; }
.zoom-track { position: relative; height: 18px; margin: 10px 2px 4px; }
.zoom-ticks { position: absolute; inset: 0; border-radius: 3px; background:
  repeating-linear-gradient(90deg, rgba(255,255,255,.16) 0 1px, rgba(255,255,255,0) 1px 11px),
  linear-gradient(90deg, rgba(79,209,255,.35), rgba(110,231,183,.35)); opacity: .55; }
.zoom-thumb { position: absolute; top: -3px; left: 0; width: 6px; height: 24px; border-radius: 3px; background: #eafaff; box-shadow: 0 0 12px rgba(79,209,255,.9); transform: translateX(-3px); }
.zoom-readout { display: flex; justify-content: space-between; font-family: ui-monospace, monospace; font-size: 10.5px; color: #9fb4c9; }
.zoom-band-name { color: #4fd1ff; letter-spacing: .16em; }
.zoom-controls { display: flex; gap: 5px; margin-top: 8px; }
.zoom-controls button { flex: 1; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #c3d3e3; border-radius: 7px; padding: 5px 0; font-size: 13px; cursor: pointer; }
.zoom-controls button:hover { border-color: rgba(79,209,255,.45); color: #eafaff; }
.minimap { width: 100%; height: 96px; margin-top: 9px; border-radius: 8px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.07); cursor: pointer; display: block; }

/* ---------- hint bar ---------- */
.hint-bar {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 4; display: flex; gap: 14px; align-items: center;
  font-size: 11px; color: #667d94; white-space: nowrap;
  background: rgba(8,12,17,.6); border: 1px solid rgba(255,255,255,.06);
  padding: 7px 14px; border-radius: 999px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
@media (max-width: 1500px) { .hint-bar { display: none; } }

/* ---------- keys sheet ---------- */
.keys-sheet { position: absolute; z-index: 12; left: 50%; top: 50%; transform: translate(-50%,-50%); background: #0b1017; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 18px 22px; color: #cfdcec; box-shadow: 0 30px 80px rgba(0,0,0,.7); min-width: 320px; }
.keys-sheet h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .18em; font-family: ui-monospace, monospace; color: #4fd1ff; }
.keys-grid { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 12px; align-items: center; }
.keys-grid kbd { justify-self: start; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .hud-people { display: none; }
  .hud-inspector { top: auto; bottom: 150px; max-height: 46vh; }
}
@media (max-width: 900px) {
  .hud-rail, .hud-activity { display: none; }
  .hud-workspace { width: 210px; top: 86px; left: 12px; padding: 12px 14px; }
  .hud-zoom { width: calc(100vw - 24px); right: 12px; bottom: 12px; }
}

/* ---------- responsive: phones ---------- */
@media (max-width: 720px) {
  /* the workspace canvas is a desktop tool; on a phone the HUD panels stack
     instead of overlapping the map */
  .hud-workspace { width: calc(100vw - 24px); top: 74px; left: 12px; padding: 10px 12px; }
  .hud-people, .hud-rail, .hud-activity { display: none; }
  .hud-inspector {
    left: 12px; right: 12px; bottom: 96px; width: auto;
    max-height: 38vh; overflow-y: auto;
  }
  .hud-zoom { left: 12px; right: 12px; width: auto; bottom: 12px; }
  .hud-zoom button { min-width: 40px; min-height: 40px; }
  .keys-sheet { min-width: 0; width: calc(100vw - 32px); padding: 14px 16px; }
}
