/*
 * Project Map V3 — canvas-first shell.
 * When the route is active the workspace becomes the product surface: the
 * ordinary page chrome disappears, while navigation remains available in the
 * compact left rail and all map controls live in a vertical dock on the right.
 */

html.project-map-active,
html.project-map-active body {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

html.project-map-active .app-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

html.project-map-active .workspace-main {
  position: relative;
  height: 100vh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

html.project-map-active .workspace-topbar {
  display: none;
}

html.project-map-active .project-graph-page {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #071019;
}

html.project-map-active .project-graph-page-head {
  position: absolute;
  z-index: 12;
  top: 18px;
  left: 20px;
  display: block;
  max-width: min(440px, calc(100% - 380px));
  padding: 11px 14px;
  border: 1px solid rgba(67, 88, 113, .64);
  border-radius: 13px;
  background: rgba(9, 18, 29, .86);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .26);
  backdrop-filter: blur(16px);
  pointer-events: none;
}

html.project-map-active .project-graph-page-head .eyebrow {
  margin: 0 0 2px;
  color: #9183f1;
  font-size: 9px;
}

html.project-map-active .project-graph-page-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

html.project-map-active .project-graph-page-head p:not(.eyebrow) {
  margin: 4px 0 0;
  color: #8295aa;
  font-size: 11px;
}

html.project-map-active .project-graph-workspace {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #071019;
  box-shadow: none;
}

html.project-map-active .project-graph-map-view,
html.project-map-active .project-diagram-view {
  width: 100%;
  height: 100%;
  min-height: 0;
}

html.project-map-active .project-graph-map-view {
  display: block;
  position: relative;
}

html.project-map-active .project-graph-body {
  position: absolute;
  inset: 0;
  display: block;
}

html.project-map-active .project-graph-viewport {
  width: 100%;
  height: 100%;
  border: 0;
  background-color: #071019;
  background-image:
    radial-gradient(circle at 44% 42%, rgba(82, 72, 173, .12), transparent 36%),
    radial-gradient(circle, rgba(58, 80, 103, .78) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px;
  touch-action: none;
}

.project-map-state {
  position: absolute;
  z-index: 11;
  top: 86px;
  left: 50%;
  display: grid;
  max-width: min(420px, calc(100% - 680px));
  gap: 3px;
  padding: 10px 14px;
  border: 1px solid #30455d;
  border-radius: 10px;
  background: rgba(10, 21, 32, .92);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .3);
  color: #95a8bc;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.project-map-state.hidden {
  display: none;
}

.project-map-state strong {
  color: #e1e8f1;
  font-size: 11px;
}

.project-map-state span {
  font-size: 8px;
  line-height: 1.4;
}

.project-map-state.offline {
  border-color: rgba(217, 164, 76, .7);
}

.project-map-state.error {
  border-color: rgba(230, 111, 130, .75);
}

.project-map-state.empty {
  opacity: .78;
}

html.project-map-active .project-graph-toolbar {
  position: absolute;
  z-index: 14;
  top: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  width: 292px;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(67, 91, 117, .78);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(17, 30, 44, .97), rgba(9, 19, 29, .97));
  box-shadow: 0 22px 60px rgba(0, 0, 0, .42);
  backdrop-filter: blur(18px);
  scrollbar-width: thin;
}

.project-map-dock-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(64, 86, 110, .62);
}

.project-map-dock-heading > div:last-child {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.project-map-presence {
  display: flex;
  min-height: 22px;
  justify-content: flex-end;
  padding-right: 3px;
}

.project-map-presence i {
  display: grid;
  width: 22px;
  height: 22px;
  margin-right: -4px;
  place-items: center;
  border: 2px solid #0c1824;
  border-radius: 50%;
  background: var(--presence-color, #6f61d9);
  color: #071019;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.project-map-dock-heading small,
.project-map-dock-heading strong {
  display: block;
}

.project-map-dock-heading small {
  color: #758aa1;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.project-map-dock-heading strong {
  margin-top: 3px;
  color: #eef3f9;
  font-size: 13px;
}

.project-map-save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8094aa;
  font-size: 10px;
  white-space: nowrap;
}

.project-map-save-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #45bd89;
  box-shadow: 0 0 0 4px rgba(69, 189, 137, .1);
}

.project-map-save-status[data-state="pending"] i {
  background: #d9a44c;
  box-shadow: 0 0 0 4px rgba(217, 164, 76, .1);
}

.project-map-save-status[data-state="saving"] i {
  background: #8e7cec;
  box-shadow: 0 0 0 4px rgba(142, 124, 236, .12);
  animation: project-map-saving 1s ease-in-out infinite;
}

.project-map-save-status[data-state="error"] i {
  background: #e66f82;
  box-shadow: 0 0 0 4px rgba(230, 111, 130, .1);
}

@keyframes project-map-saving {
  50% { opacity: .35; transform: scale(.72); }
}

.project-map-view-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid #2d4157;
  border-radius: 11px;
  background: #0a1520;
}

.project-map-view-switcher button {
  min-height: 34px;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7d91a8;
  font-size: 11px;
  font-weight: 800;
}

.project-map-view-switcher button.active {
  background: #253850;
  color: #f0f4fa;
  box-shadow: inset 0 0 0 1px rgba(115, 139, 169, .25);
}

.project-map-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.project-map-tools button {
  min-height: 36px;
  border: 1px solid #2d4157;
  border-radius: 9px;
  background: #0a1520;
  color: #8296ac;
  font-size: 12px;
}

.project-map-tools button.active {
  border-color: rgba(142, 124, 236, .7);
  background: rgba(111, 97, 217, .2);
  color: #f1efff;
}

.project-map-tools button span {
  margin-left: 4px;
  font-size: 10px;
  font-weight: 800;
}

.project-map-history-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.project-map-history-controls button {
  min-height: 34px;
  border: 1px solid #2d4157;
  border-radius: 9px;
  background: #0a1520;
  color: #a1b2c5;
  font-size: 13px;
}

.project-map-history-controls button span {
  margin-left: 4px;
  font-size: 9px;
  font-weight: 800;
}

.project-map-history-controls button:disabled {
  cursor: not-allowed;
  opacity: .32;
}

.project-map-frames-panel,
.project-map-templates-panel,
.project-map-comments-panel {
  flex: 0 0 auto;
  border: 1px solid #2d4157;
  border-radius: 10px;
  background: #0a1520;
}

.project-map-frames-panel > summary,
.project-map-templates-panel > summary,
.project-map-comments-panel > summary {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  color: #a9b8c9;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.project-map-frames-panel > summary::-webkit-details-marker,
.project-map-templates-panel > summary::-webkit-details-marker,
.project-map-comments-panel > summary::-webkit-details-marker {
  display: none;
}

.project-map-frames-panel > summary::before,
.project-map-templates-panel > summary::before,
.project-map-comments-panel > summary::before {
  color: #796be0;
  content: "›";
  font-size: 15px;
  transition: transform .15s ease;
}

.project-map-frames-panel[open] > summary::before,
.project-map-templates-panel[open] > summary::before,
.project-map-comments-panel[open] > summary::before {
  transform: rotate(90deg);
}

.project-map-frames-panel > summary span,
.project-map-templates-panel > summary span,
.project-map-comments-panel > summary span {
  flex: 1;
}

.project-map-frames-panel > summary b,
.project-map-templates-panel > summary small,
.project-map-comments-panel > summary b {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: rgba(111, 97, 217, .18);
  color: #b9adff;
  font-size: 9px;
}

.project-map-add-frame {
  width: calc(100% - 14px);
  min-height: 32px;
  margin: 0 7px 7px;
  border: 1px dashed #506784;
  border-radius: 8px;
  background: #102033;
  color: #c3d0df;
  font-size: 9px;
}

.project-map-frame-list,
.project-map-template-list {
  display: grid;
  max-height: 150px;
  gap: 5px;
  padding: 0 7px 7px;
  overflow: auto;
  scrollbar-width: thin;
}

.project-map-frame-list > p {
  margin: 2px 3px 5px;
  color: #687e96;
  font-size: 9px;
  line-height: 1.4;
}

.project-map-frame-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px 28px 28px;
  gap: 4px;
}

.project-map-frame-row button,
.project-map-template-list button {
  min-width: 0;
  min-height: 30px;
  padding: 6px 7px;
  border: 1px solid #2d4157;
  border-radius: 7px;
  background: #111f2e;
  color: #b9c7d7;
  font-size: 9px;
}

.project-map-frame-row button:first-child {
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-map-template-list button {
  display: block;
  text-align: left;
}

.project-map-template-list strong,
.project-map-template-list small {
  display: block;
}

.project-map-template-list small {
  margin-top: 2px;
  color: #7389a1;
  font-size: 8px;
  line-height: 1.3;
}

.project-map-comment-filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 0 7px 7px;
}

.project-map-comment-filters button {
  min-height: 28px;
  border: 1px solid #2d4157;
  border-radius: 7px;
  background: #111f2e;
  color: #768ba3;
  font-size: 8px;
}

.project-map-comment-filters button.active {
  border-color: #7868db;
  color: #d8d1ff;
}

.project-map-comment-form {
  display: grid;
  gap: 6px;
  margin: 0 7px 7px;
  padding: 8px;
  border: 1px solid #2d4157;
  border-radius: 8px;
  background: #0d1a27;
}

.project-map-comment-form.hidden {
  display: none;
}

.project-map-comment-form > small {
  overflow: hidden;
  color: #8398af;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-map-comment-form textarea,
.project-map-comment-form select {
  width: 100%;
  border: 1px solid #344a63;
  border-radius: 7px;
  background: #08131e;
  color: #dfe8f3;
  font-size: 9px;
}

.project-map-comment-form textarea {
  min-height: 62px;
  padding: 7px;
  resize: vertical;
}

.project-map-comment-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 5px;
}

.project-map-comment-form > div button,
.project-map-comment-form > button {
  min-height: 30px;
  border-radius: 7px;
  font-size: 9px;
}

.project-map-comment-form label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: #71869e;
  font-size: 8px;
}

.project-map-comment-list {
  display: grid;
  max-height: 240px;
  gap: 6px;
  padding: 0 7px 7px;
  overflow: auto;
  scrollbar-width: thin;
}

.project-map-comments-empty {
  margin: 3px;
  color: #687e96;
  font-size: 9px;
}

.project-map-comment {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid #2d4157;
  border-radius: 8px;
  background: #111f2e;
  transition: border-color .2s, box-shadow .2s;
}

.project-map-comment.resolved {
  opacity: .55;
}

.project-map-comment.focused {
  border-color: #8e7cec;
  box-shadow: 0 0 0 3px rgba(142, 124, 236, .15);
}

.project-map-comment header,
.project-map-comment footer {
  display: flex;
  align-items: center;
  gap: 5px;
}

.project-map-comment header {
  justify-content: space-between;
}

.project-map-comment header strong,
.project-map-comment header small {
  display: block;
}

.project-map-comment header strong {
  color: #d9e2ed;
  font-size: 9px;
}

.project-map-comment header small,
.project-map-comment > small {
  color: #6f849c;
  font-size: 7px;
}

.project-map-comment header > span {
  padding: 3px 5px;
  border-radius: 5px;
  background: rgba(111, 97, 217, .15);
  color: #a99bf4;
  font-size: 7px;
}

.project-map-comment p {
  margin: 0;
  color: #afbed0;
  font-size: 9px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.project-map-comment-target-label,
.project-map-comment-mentions {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-map-comment footer button {
  min-height: 25px;
  padding: 4px 6px;
  border: 1px solid #30455d;
  border-radius: 6px;
  background: #142337;
  color: #92a6bc;
  font-size: 7px;
}

.project-map-frames {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
}

.project-map-frame {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid color-mix(in srgb, var(--project-frame-color), transparent 28%);
  border-radius: 18px;
  background: color-mix(in srgb, var(--project-frame-color), transparent 94%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--project-frame-color), transparent 82%);
}

.project-map-frame > strong {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 2px;
  color: color-mix(in srgb, var(--project-frame-color), #fff 38%);
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
  cursor: move;
  pointer-events: auto;
  user-select: none;
}

.project-map-frame > strong small {
  display: inline-block;
  margin-left: 8px;
  color: #72879e;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.project-map-frame-resize {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 15px;
  height: 15px;
  border: 2px solid #071019;
  border-radius: 4px;
  background: var(--project-frame-color);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--project-frame-color), #fff 35%);
  cursor: nwse-resize;
  pointer-events: auto;
}

html.project-map-active .project-graph-edges {
  z-index: 1;
}

html.project-map-active .project-graph-nodes {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

html.project-map-active .project-graph-node {
  pointer-events: auto;
}

.project-map-comment-markers,
.project-map-live-cursors {
  position: absolute;
  z-index: 8;
  inset: 0;
  pointer-events: none;
}

.project-map-comment-marker {
  position: absolute;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 2px solid #071019;
  border-radius: 50% 50% 50% 3px;
  background: #8e7cec;
  color: #fff;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .35);
  cursor: pointer;
  pointer-events: auto;
}

.project-map-comment-marker.client-visible {
  background: #14b8a6;
}

.project-map-live-cursor {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--presence-color);
  transition: transform .12s linear;
}

.project-map-live-cursor > i {
  font-size: 14px;
  font-style: normal;
  transform: rotate(-35deg);
}

.project-map-live-cursor > span {
  padding: 3px 5px;
  border-radius: 5px;
  background: var(--presence-color);
  color: #071019;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.project-map-save-status[data-state="conflict"] i {
  background: #e59a45;
  box-shadow: 0 0 0 4px rgba(229, 154, 69, .12);
}

.project-map-save-status[data-state="recovered"] i {
  background: #59b9e8;
  box-shadow: 0 0 0 4px rgba(89, 185, 232, .12);
}

html.project-map-active .project-graph-viewport[data-map-tool="hand"] {
  cursor: grab;
}

html.project-map-active .project-graph-viewport[data-map-tool="hand"]:active {
  cursor: grabbing;
}

.project-graph-selection-box {
  position: absolute;
  z-index: 6;
  border: 1px solid #8e7cec;
  border-radius: 4px;
  background: rgba(111, 97, 217, .14);
  box-shadow: 0 0 0 1px rgba(142, 124, 236, .12);
  pointer-events: none;
}

html.project-map-active .project-graph-node.multi-selected {
  box-shadow:
    0 0 0 2px rgba(142, 124, 236, .85),
    0 12px 30px rgba(0, 0, 0, .3);
}

.project-graph-multi-selection {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.project-graph-multi-selection header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-graph-multi-selection header strong,
.project-graph-multi-selection header small {
  display: block;
}

.project-graph-multi-selection header small {
  margin-top: 3px;
  color: #8094aa;
}

.project-graph-multi-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.project-graph-multi-actions button {
  min-height: 38px;
}

html.project-map-active .project-graph-toolbar-primary,
html.project-map-active .project-graph-toolbar-secondary {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

html.project-map-active .project-graph-toolbar-primary {
  flex: 0 0 auto;
}

html.project-map-active .project-graph-toolbar-secondary {
  min-height: 0;
  flex: 1 1 auto;
  padding-top: 11px;
  overflow: hidden;
  border-top: 1px solid rgba(64, 86, 110, .62);
}

html.project-map-active .project-graph-search {
  width: 100%;
  max-width: none;
  flex: 0 0 auto;
}

html.project-map-active .project-graph-search input {
  width: 100%;
  min-height: 40px;
  font-size: 12px;
}

html.project-map-active .project-graph-toolbar-actions {
  display: grid;
  width: 100%;
  margin: 0;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

html.project-map-active .project-graph-toolbar-actions button {
  min-width: 0;
  min-height: 38px;
  padding: 7px 8px;
  font-size: 10px;
}

html.project-map-active .project-graph-toolbar-actions [data-graph-action="add"] {
  grid-column: 1 / -1;
}

html.project-map-active .project-graph-toolbar-actions [data-graph-action="refresh"] {
  font-size: 16px;
}

html.project-map-active .project-graph-toolbar-actions [data-graph-action="fullscreen"] {
  display: none;
}

.project-map-object-palette {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
  border: 1px solid #30455d;
  border-radius: 11px;
  background: #09141f;
}

.project-map-object-palette.hidden {
  display: none;
}

.project-map-object-palette button {
  display: grid;
  min-width: 0;
  min-height: 56px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #111f2e;
  color: #dce5f0;
  text-align: left;
}

.project-map-object-palette button:hover {
  border-color: #536b87;
  background: #17283a;
}

.project-map-object-palette button i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: rgba(111, 97, 217, .2);
  color: #b9adff;
  font-style: normal;
}

.project-map-object-palette button strong,
.project-map-object-palette button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-map-object-palette button strong {
  font-size: 10px;
}

.project-map-object-palette button small {
  margin-top: 2px;
  color: #748aa2;
  font-size: 8px;
}

html.project-map-active .project-graph-node.custom {
  min-height: 40px;
  transform-origin: center;
}

html.project-map-active .project-graph-node.custom.grouped::before {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 9px;
  height: 9px;
  border: 2px solid #071019;
  border-radius: 50%;
  background: #8e7cec;
  content: "";
}

html.project-map-active .project-graph-node.custom.locked {
  cursor: not-allowed;
}

html.project-map-active .project-graph-node.custom.locked::after {
  position: absolute;
  top: 7px;
  right: 8px;
  color: #d8d0ff;
  content: "▣";
  font-size: 10px;
  opacity: .8;
}

html.project-map-active .project-graph-node.custom.kind-text {
  grid-template-columns: 1fr;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

html.project-map-active .project-graph-node.custom.kind-text > span:first-child,
html.project-map-active .project-graph-node.custom.kind-text small {
  display: none;
}

html.project-map-active .project-graph-node.custom.kind-text strong {
  color: var(--graph-node-color, #dbe7f5);
  font-size: 22px;
  line-height: 1.15;
}

html.project-map-active .project-graph-node.custom.kind-sticky {
  align-items: start;
  grid-template-columns: 32px minmax(0, 1fr);
  border: 0;
  border-radius: 3px;
  background: color-mix(in srgb, var(--graph-node-color, #f2c94c), #fff 18%);
  color: #1e2530;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .24);
}

html.project-map-active .project-graph-node.custom.kind-sticky > span:first-child {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, .3);
  color: #34321f;
}

html.project-map-active .project-graph-node.custom.kind-sticky strong,
html.project-map-active .project-graph-node.custom.kind-sticky small {
  color: #25291f;
}

html.project-map-active .project-graph-node.custom.kind-rectangle,
html.project-map-active .project-graph-node.custom.kind-ellipse {
  border-width: 2px;
  background: color-mix(in srgb, var(--graph-node-color, #6f61d9), transparent 82%);
}

html.project-map-active .project-graph-node.custom.kind-ellipse {
  border-radius: 999px;
}

html.project-map-active .project-graph-node.custom.kind-image {
  display: block;
  overflow: hidden;
  padding: 0;
  background: #0d1823;
}

html.project-map-active .project-graph-node.custom.kind-image > .project-graph-node-icon {
  display: none;
}

html.project-map-active .project-graph-node.custom.kind-image > .project-graph-node-copy {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 24px 12px 10px;
  background: linear-gradient(transparent, rgba(5, 11, 17, .94));
}

.project-map-node-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.project-map-resize-handle {
  position: absolute;
  z-index: 8;
  right: -7px;
  bottom: -7px;
  width: 14px !important;
  height: 14px !important;
  border: 2px solid #071019;
  border-radius: 4px !important;
  background: #9b89ff !important;
  box-shadow: 0 0 0 1px #c8beff;
  cursor: nwse-resize;
  touch-action: none;
}

.project-map-layer-controls {
  padding: 10px 0;
  border-top: 1px solid #26384e;
}

.project-map-object-controls {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #26384e;
}

.project-map-object-controls > strong,
.project-map-selection-controls > strong {
  color: #7f94ac;
  font-size: 9px;
  text-transform: uppercase;
}

.project-map-object-controls button,
.project-map-group-actions button,
.project-map-align-actions button {
  min-height: 34px;
  border: 1px solid #344a63;
  border-radius: 8px;
  background: #152438;
  color: #bdcada;
  font-size: 10px;
}

.project-map-selection-controls {
  display: grid;
  gap: 9px;
  padding-top: 4px;
}

.project-map-group-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.project-map-group-actions button:last-child {
  grid-column: 1 / -1;
}

.project-map-align-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.project-map-align-actions button {
  font-size: 15px;
}

.project-map-group-actions button:disabled,
.project-map-align-actions button:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.project-map-layer-controls > strong {
  display: block;
  margin-bottom: 8px;
  color: #7f94ac;
  font-size: 9px;
  text-transform: uppercase;
}

.project-map-layer-controls > div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.project-map-layer-controls button {
  min-height: 34px;
  border: 1px solid #344a63;
  border-radius: 8px;
  background: #152438;
  color: #bdcada;
  font-size: 15px;
}

html.project-map-active .project-graph-node.custom.kind-file {
  grid-template-columns: 48px minmax(0, 1fr);
}

html.project-map-active .project-graph-node.custom.kind-file > span:first-child {
  width: 48px;
  height: 48px;
}

html.project-map-active .project-graph-filters {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  gap: 6px;
  overflow: auto;
  scrollbar-width: thin;
}

html.project-map-active .project-graph-filters button {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  border-radius: 9px;
}

html.project-map-active .project-graph-filters button b {
  margin-left: auto;
}

html.project-map-active .project-graph-zoom {
  display: grid;
  width: 100%;
  margin: auto 0 0;
  grid-template-columns: 1fr 36px 68px 36px 42px;
  gap: 5px;
}

html.project-map-active .project-graph-zoom > span {
  align-self: center;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.project-map-active .project-graph-zoom button {
  min-width: 0;
  min-height: 34px;
  padding: 0 5px;
  font-size: 10px;
}

html.project-map-active .project-graph-zoom button:first-of-type,
html.project-map-active .project-graph-zoom button:last-of-type {
  width: auto;
}

html.project-map-active .project-graph-zoom output {
  align-self: center;
  width: auto;
  font-size: 10px;
}

html.project-map-active .project-graph-minimap {
  right: 322px;
  bottom: 18px;
  width: 138px;
  height: 84px;
}

html.project-map-active .project-graph-inspector {
  z-index: 13;
  top: 14px;
  right: 322px;
  bottom: 14px;
  width: 330px;
  border-radius: 16px;
}

html.project-map-active .has-graph-selection .project-graph-minimap {
  right: 666px;
}

html.project-map-active .project-graph-viewport::after {
  right: 322px;
  left: auto;
  bottom: 18px;
}

html.project-map-active .chat-anywhere-launcher,
html.project-map-active .chat-anywhere {
  right: 322px;
}

html.project-map-active .chat-anywhere[data-mode="docked"] {
  right: 306px !important;
}

html.project-map-active .project-diagram-view {
  grid-template-columns: 220px minmax(0, 1fr);
}

html.project-map-active .project-diagram-editor,
html.project-map-active .project-diagram-body {
  min-height: 0;
}

@media (max-width: 980px) {
  .project-map-state {
    top: 74px;
    max-width: min(420px, calc(100% - 40px));
  }
  html.project-map-active .project-graph-page-head {
    max-width: calc(100% - 104px);
  }

  html.project-map-active .project-graph-toolbar {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: 230px;
    display: grid;
    grid-template-columns: minmax(190px, .8fr) minmax(260px, 1.2fr);
    grid-template-rows: auto auto;
    overflow: auto;
  }

  html.project-map-active .project-map-dock-heading,
  html.project-map-active .project-map-view-switcher {
    grid-column: 1;
  }

  html.project-map-active .project-graph-toolbar-primary {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  html.project-map-active .project-graph-toolbar-secondary {
    display: none;
  }

  html.project-map-active .project-graph-minimap,
  html.project-map-active .project-graph-viewport::after {
    display: none;
  }

  html.project-map-active .project-graph-inspector {
    top: 82px;
    right: 10px;
    bottom: 250px;
    width: min(330px, calc(100% - 20px));
  }

  html.project-map-active .chat-anywhere-launcher {
    right: 16px;
    bottom: 252px;
  }

  html.project-map-active .chat-anywhere {
    right: 10px;
    bottom: 250px;
    max-height: calc(100vh - 270px);
  }
}

@media (max-width: 620px) {
  .project-map-state {
    top: 72px;
    max-width: calc(100% - 24px);
  }
  html.project-map-active .project-graph-page-head {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }

  html.project-map-active .project-graph-page-head p:not(.eyebrow) {
    display: none;
  }

  html.project-map-active .project-graph-toolbar {
    max-height: 274px;
    display: flex;
  }

  html.project-map-active .project-graph-toolbar-primary {
    width: 100%;
  }

  html.project-map-active .project-graph-toolbar-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  html.project-map-active .project-graph-toolbar-actions [data-graph-action="add"] {
    grid-column: auto;
  }

  html.project-map-active .project-graph-inspector {
    bottom: 294px;
  }

  html.project-map-active .chat-anywhere-launcher {
    bottom: 294px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-map-save-status[data-state="saving"] i {
    animation: none;
  }
}
