.ps-host {
  --ps-bg: #060913;
  --ps-panel: rgba(11, 16, 29, 0.94);
  --ps-panel-strong: #0e1424;
  --ps-panel-soft: #11182a;
  --ps-line: rgba(151, 161, 196, 0.14);
  --ps-line-strong: rgba(151, 161, 196, 0.25);
  --ps-text: #f4f5fb;
  --ps-muted: #9099ad;
  --ps-muted-2: #687287;
  --ps-violet: #8067ff;
  --ps-violet-soft: rgba(128, 103, 255, 0.16);
  --ps-violet-bright: #a99aff;
  --ps-blue: #4c86ff;
  --ps-green: #4dd591;
  --ps-amber: #f3ab3d;
  --ps-red: #ff6577;
  --ps-cyan: #42c9e9;
  --ps-radius: 17px;
  min-width: 0;
  color: var(--ps-text);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

.ps-host *,
.ps-host *::before,
.ps-host *::after {
  box-sizing: border-box;
}

.ps-host button,
.ps-host input,
.ps-host select,
.ps-host textarea {
  font: inherit;
}

.ps-host button,
.ps-host label,
.ps-host select,
.ps-host input[type="range"],
.ps-host input[type="checkbox"] {
  -webkit-tap-highlight-color: transparent;
}

.ps-host button:not(:disabled),
.ps-host label,
.ps-host select,
.ps-host input[type="range"],
.ps-host input[type="checkbox"] {
  cursor: pointer;
}

.ps-host button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.ps-host svg.ph-icon {
  display: block;
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  overflow: visible;
  fill: currentColor;
  stroke: none;
}

.ps-icon-fallback {
  display: block;
  width: 1em;
  height: 1em;
}

.ps-host [hidden] {
  display: none !important;
}

.ps-host :focus-visible {
  outline: 2px solid var(--ps-violet-bright);
  outline-offset: 3px;
}

.ps-studio {
  position: relative;
  min-width: 0;
  min-height: min(820px, calc(100vh - 112px));
  overflow: hidden;
  border: 1px solid var(--ps-line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 76% -20%, rgba(114, 79, 240, 0.13), transparent 30rem),
    linear-gradient(145deg, rgba(12, 17, 31, 0.98), rgba(6, 9, 19, 0.98));
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.32);
}

.ps-studio::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(128, 142, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 142, 184, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
}

.ps-header,
.ps-toolbar,
.ps-body {
  position: relative;
  z-index: 1;
}

.ps-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px 15px 22px;
  border-bottom: 1px solid var(--ps-line);
  background: rgba(7, 11, 21, 0.76);
  backdrop-filter: blur(18px);
}

.ps-title-group {
  min-width: 0;
}

.ps-kicker {
  display: block;
  margin: 0 0 5px;
  color: var(--ps-muted-2);
  font-size: 0.64rem;
  font-weight: 760;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ps-title-row {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.ps-title-row h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 740;
  letter-spacing: -0.03em;
}

.ps-plan-state {
  max-width: min(32vw, 360px);
  overflow: hidden;
  color: var(--ps-muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-header-actions,
.ps-toolbar-group,
.ps-inspector-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-button,
.ps-icon-button,
.ps-tool,
.ps-finish-polygon {
  border: 1px solid var(--ps-line);
  color: var(--ps-text);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.ps-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  padding: 0 14px;
  background: rgba(19, 25, 43, 0.74);
  font-size: 0.77rem;
  font-weight: 680;
  white-space: nowrap;
}

.ps-button .ps-control-icon {
  width: 17px;
  height: 17px;
}

.ps-button:hover,
.ps-icon-button:hover,
.ps-tool:hover,
.ps-finish-polygon:hover {
  border-color: rgba(128, 103, 255, 0.52);
  background: rgba(31, 36, 62, 0.96);
}

.ps-button:active,
.ps-icon-button:active,
.ps-tool:active,
.ps-finish-polygon:active {
  transform: translateY(1px);
}

.ps-button-primary {
  border-color: rgba(139, 115, 255, 0.72);
  background: linear-gradient(135deg, #8064f6, #5d3bd8);
  box-shadow:
    0 10px 25px rgba(83, 49, 201, 0.25),
    inset 0 1px rgba(255, 255, 255, 0.16);
}

.ps-button-primary:hover {
  background: linear-gradient(135deg, #927cff, #6a47e5);
  box-shadow: 0 13px 30px rgba(83, 49, 201, 0.34);
}

.ps-button-ghost {
  background: rgba(13, 18, 32, 0.72);
}

.ps-button-danger {
  border-color: rgba(255, 101, 119, 0.35);
  background: rgba(255, 101, 119, 0.1);
  color: #ff9eaa;
}

.ps-upload-button {
  position: relative;
  overflow: hidden;
}

.ps-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ps-toolbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ps-line);
  background: rgba(10, 14, 26, 0.86);
}

.ps-toolbar-group {
  min-width: 0;
}

.ps-tool {
  min-width: 68px;
  min-height: 45px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border-radius: 11px;
  padding: 0 10px;
  background: transparent;
  color: var(--ps-muted);
  font-size: 0.7rem;
  font-weight: 640;
}

.ps-tool-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(139, 115, 255, 0.2);
  border-radius: 8px;
  background: rgba(128, 103, 255, 0.08);
  color: var(--ps-violet-bright);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.ps-tool-icon .ph-icon {
  width: 15px;
  height: 15px;
}

.ps-tool.is-active {
  border-color: rgba(128, 103, 255, 0.45);
  background: var(--ps-violet-soft);
  color: var(--ps-text);
  box-shadow: inset 0 0 20px rgba(128, 103, 255, 0.08);
}

.ps-tool.is-active .ps-tool-icon {
  border-color: rgba(164, 145, 255, 0.52);
  background: rgba(128, 103, 255, 0.18);
  box-shadow: 0 0 18px rgba(93, 59, 214, 0.18);
}

.ps-toolbar-options {
  justify-content: flex-end;
}

.ps-compact-control {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ps-line);
  border-radius: 11px;
  padding: 0 11px;
  color: var(--ps-muted);
  background: rgba(13, 18, 32, 0.7);
  font-size: 0.7rem;
}

.ps-compact-control input,
.ps-switch-row input {
  width: 33px;
  height: 19px;
  appearance: none;
  border: 1px solid var(--ps-line-strong);
  border-radius: 999px;
  background: #20283a;
  transition: 160ms ease;
}

.ps-compact-control input::before,
.ps-switch-row input::before {
  content: "";
  display: block;
  width: 13px;
  height: 13px;
  margin: 2px;
  border-radius: 50%;
  background: #929bb0;
  transition: transform 160ms ease, background 160ms ease;
}

.ps-compact-control input:checked,
.ps-switch-row input:checked {
  border-color: rgba(128, 103, 255, 0.68);
  background: #6547d9;
}

.ps-compact-control input:checked::before,
.ps-switch-row input:checked::before {
  transform: translateX(14px);
  background: white;
}

.ps-confidence-filter {
  width: 150px;
  display: grid;
  gap: 5px;
  color: var(--ps-muted);
  font-size: 0.65rem;
}

.ps-confidence-filter span {
  display: flex;
  justify-content: space-between;
}

.ps-confidence-filter b {
  color: var(--ps-violet-bright);
}

.ps-host input[type="range"] {
  width: 100%;
  height: 3px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ps-violet), rgba(128, 103, 255, 0.2));
  accent-color: var(--ps-violet);
}

.ps-host input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  appearance: none;
  border: 3px solid #d2caff;
  border-radius: 50%;
  background: #6f50e7;
  box-shadow: 0 0 0 4px rgba(128, 103, 255, 0.14);
}

.ps-body {
  min-height: 655px;
  display: grid;
  grid-template-columns: 230px minmax(420px, 1fr) 270px;
}

.ps-left-panel,
.ps-inspector {
  min-width: 0;
  background: rgba(9, 13, 24, 0.88);
}

.ps-left-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--ps-line);
}

.ps-inspector {
  border-left: 1px solid var(--ps-line);
  overflow: auto;
}

.ps-panel-heading {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 12px 16px;
  border-bottom: 1px solid var(--ps-line);
}

.ps-panel-heading > div {
  min-width: 0;
}

.ps-panel-heading strong {
  display: block;
  font-size: 1rem;
}

.ps-icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  padding: 0;
  background: rgba(18, 24, 41, 0.8);
  color: var(--ps-violet-bright);
  font-size: 1rem;
}

.ps-icon-button .ph-icon {
  width: 17px;
  height: 17px;
}

.ps-region-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 139, 172, 0.3) transparent;
}

.ps-region-item {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 7px 8px;
  background: transparent;
  color: var(--ps-text);
  text-align: left;
}

.ps-region-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.ps-region-item.is-selected {
  border-color: rgba(128, 103, 255, 0.38);
  background: rgba(128, 103, 255, 0.12);
}

.ps-region-item.is-hidden {
  opacity: 0.58;
}

.ps-region-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ps-violet);
  box-shadow: 0 0 12px currentColor;
}

.ps-region-dot.is-corridor {
  background: var(--ps-blue);
}

.ps-region-dot.is-stair {
  background: var(--ps-amber);
}

.ps-region-dot.is-utility {
  background: var(--ps-cyan);
}

.ps-region-dot.is-ignore {
  background: #697287;
}

.ps-region-item-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ps-region-item-body strong,
.ps-region-item-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-region-item-body strong {
  font-size: 0.73rem;
  font-weight: 660;
}

.ps-region-item-body small {
  color: var(--ps-muted-2);
  font-size: 0.6rem;
}

.ps-inventory-flag {
  width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ps-line);
  border-radius: 7px;
  color: var(--ps-muted-2);
  font-size: 0.6rem;
  font-weight: 750;
}

.ps-inventory-flag.is-on {
  border-color: rgba(77, 213, 145, 0.28);
  background: rgba(77, 213, 145, 0.1);
  color: var(--ps-green);
}

.ps-list-empty {
  min-height: 145px;
  display: grid;
  place-content: center;
  gap: 7px;
  padding: 20px;
  color: var(--ps-muted);
  text-align: center;
}

.ps-list-empty span {
  color: var(--ps-text);
  font-size: 0.75rem;
  font-weight: 650;
}

.ps-list-empty small {
  max-width: 160px;
  color: var(--ps-muted-2);
  font-size: 0.64rem;
  line-height: 1.5;
}

.ps-trash {
  max-height: 150px;
  overflow: auto;
  border-top: 1px solid var(--ps-line);
}

.ps-trash:empty {
  display: none;
}

.ps-trash-title {
  padding: 10px 13px 6px;
  color: var(--ps-muted-2);
  font-size: 0.62rem;
  font-weight: 730;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ps-trash-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px 8px;
  color: var(--ps-muted);
  font-size: 0.66rem;
}

.ps-trash-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-trash-item button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ps-violet-bright);
  font-size: 0.61rem;
}

.ps-workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 38px;
  background:
    radial-gradient(circle at 50% 44%, rgba(77, 64, 140, 0.12), transparent 31rem),
    #080c16;
}

.ps-dropzone {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 22px;
  transition: box-shadow 160ms ease, background 160ms ease;
}

.ps-dropzone.is-dragging {
  background: rgba(128, 103, 255, 0.08);
  box-shadow: inset 0 0 0 2px rgba(128, 103, 255, 0.55);
}

.ps-empty-state {
  width: min(430px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px dashed rgba(151, 161, 196, 0.25);
  border-radius: 18px;
  padding: 42px 28px;
  background: rgba(14, 20, 35, 0.7);
  text-align: center;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.2);
}

.ps-empty-icon {
  width: 62px;
  height: 62px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 5px;
  border: 1px solid rgba(128, 103, 255, 0.32);
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.15), transparent 38%),
    rgba(128, 103, 255, 0.14);
  color: var(--ps-violet-bright);
  font-size: 1.8rem;
  box-shadow: 0 16px 40px rgba(77, 46, 182, 0.2);
}

.ps-empty-icon .ps-empty-state-icon {
  width: 31px;
  height: 31px;
}

.ps-empty-state h3,
.ps-inspector-empty h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.ps-empty-state p,
.ps-inspector-empty p {
  max-width: 330px;
  margin: 0 0 10px;
  color: var(--ps-muted);
  font-size: 0.73rem;
  line-height: 1.6;
}

.ps-canvas-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
}

.ps-canvas-stack {
  position: relative;
  width: min(100%, 1100px);
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(151, 161, 196, 0.22);
  border-radius: 10px;
  background: #080d19;
  box-shadow:
    0 25px 75px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(128, 103, 255, 0.05);
}

.ps-plan-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.ps-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  touch-action: none;
  user-select: none;
}

.ps-overlay[data-mode="rectangle"],
.ps-overlay[data-mode="polygon"] {
  cursor: crosshair;
}

.ps-overlay[data-mode="location"] {
  cursor: cell;
}

.ps-region-shape {
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  stroke: var(--ps-violet-bright);
  stroke-width: 1.5;
  fill: rgba(128, 103, 255, 0.16);
  transition:
    fill 140ms ease,
    stroke 140ms ease,
    opacity 140ms ease;
}

.ps-region-shape:hover {
  fill: rgba(128, 103, 255, 0.26);
  stroke: #c8c0ff;
}

.ps-region-shape.is-selected {
  fill: rgba(128, 103, 255, 0.35);
  stroke: #e0dcff;
  stroke-width: 2.4;
  filter: drop-shadow(0 0 7px rgba(128, 103, 255, 0.72));
}

.ps-region-shape.is-corridor {
  fill: rgba(76, 134, 255, 0.13);
  stroke: #74a2ff;
}

.ps-region-shape.is-corridor.is-selected {
  fill: rgba(76, 134, 255, 0.3);
}

.ps-region-shape.is-stair {
  fill: rgba(243, 171, 61, 0.14);
  stroke: #ffc568;
}

.ps-region-shape.is-utility {
  fill: rgba(66, 201, 233, 0.13);
  stroke: #68ddf8;
}

.ps-region-shape.is-ignore {
  fill: rgba(105, 114, 135, 0.11);
  stroke: #828ca2;
  stroke-dasharray: 6 5;
}

.ps-region-shape.is-hidden {
  fill-opacity: 0.08;
  stroke-dasharray: 5 5;
  opacity: 0.42;
}

.ps-region-label {
  pointer-events: none;
  fill: rgba(244, 245, 251, 0.92);
  font-family: Inter, "Segoe UI", sans-serif;
  font-weight: 720;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(5, 8, 16, 0.82);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.ps-vertex,
.ps-draft-vertex {
  vector-effect: non-scaling-stroke;
  cursor: grab;
  fill: #f4f1ff;
  stroke: #6948e5;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 4px rgba(128, 103, 255, 0.8));
}

.ps-vertex:active {
  cursor: grabbing;
}

.ps-draft-shape,
.ps-draft-line {
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  fill: rgba(128, 103, 255, 0.18);
  stroke: #b5a8ff;
  stroke-width: 2;
  stroke-dasharray: 7 5;
}

.ps-draft-line {
  fill: none;
}

.ps-location-marker circle:first-child {
  vector-effect: non-scaling-stroke;
  fill: rgba(255, 101, 119, 0.14);
  stroke: #ff7586;
  stroke-width: 2;
  animation: ps-location-pulse 1.8s ease-out infinite;
}

.ps-location-marker circle:last-child {
  fill: #fff;
  stroke: #ff6577;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.ps-location-marker.is-focused circle:first-child {
  animation: ps-location-focus 0.56s ease-out 3;
}

@keyframes ps-location-focus {
  0% {
    opacity: 1;
    stroke-width: 3.5;
  }
  100% {
    opacity: 0.2;
    stroke-width: 1.5;
  }
}

@keyframes ps-location-pulse {
  0% {
    opacity: 1;
  }
  70%,
  100% {
    opacity: 0.35;
  }
}

.ps-canvas-hint {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  max-width: calc(100% - 20px);
  overflow: hidden;
  border: 1px solid var(--ps-line);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(8, 12, 22, 0.88);
  color: var(--ps-muted);
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.ps-finish-polygon {
  position: absolute;
  right: 12px;
  bottom: 0;
  min-height: 32px;
  border-radius: 9px;
  padding: 0 11px;
  background: rgba(94, 66, 211, 0.92);
  font-size: 0.65rem;
  font-weight: 680;
}

.ps-statusbar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  border-top: 1px solid var(--ps-line);
  padding: 0 14px;
  color: var(--ps-muted-2);
  background: rgba(8, 12, 22, 0.92);
  font-size: 0.6rem;
}

.ps-statusbar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-statusbar span:nth-child(2) {
  color: var(--ps-muted);
  text-align: center;
}

.ps-statusbar span:last-child {
  text-align: right;
}

.ps-statusbar b {
  color: var(--ps-muted);
}

.ps-studio.is-dirty .ps-statusbar span:nth-child(2) {
  color: var(--ps-amber);
}

.ps-inspector-empty {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
}

.ps-inspector-empty > .ps-inspector-icon {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ps-line);
  border-radius: 16px;
  color: var(--ps-violet-bright);
  background: rgba(128, 103, 255, 0.08);
  font-size: 1.4rem;
}

.ps-inspector-icon .ps-inspector-state-icon {
  width: 25px;
  height: 25px;
}

.ps-inspector-form {
  display: grid;
  gap: 15px;
  padding: 18px 16px 20px;
}

.ps-inspector-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--ps-line);
}

.ps-inspector-title h3 {
  max-width: 175px;
  margin: 0;
  overflow: hidden;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-source-badge {
  border: 1px solid rgba(151, 161, 196, 0.2);
  border-radius: 7px;
  padding: 4px 7px;
  color: var(--ps-muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.58rem;
}

.ps-source-badge.is-auto {
  border-color: rgba(128, 103, 255, 0.3);
  color: var(--ps-violet-bright);
  background: rgba(128, 103, 255, 0.1);
}

.ps-field {
  display: grid;
  gap: 7px;
  color: var(--ps-muted);
  font-size: 0.67rem;
}

.ps-field > span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ps-field > span b {
  color: var(--ps-violet-bright);
}

.ps-field input:not([type="range"]),
.ps-field select,
.ps-field textarea {
  width: 100%;
  border: 1px solid var(--ps-line);
  border-radius: 10px;
  padding: 9px 10px;
  outline: none;
  color: var(--ps-text);
  background: rgba(17, 23, 40, 0.9);
  font-size: 0.72rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.ps-field input:not([type="range"]) {
  height: 39px;
}

.ps-field select {
  height: 39px;
}

.ps-field textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.5;
}

.ps-field input:focus,
.ps-field select:focus,
.ps-field textarea:focus {
  border-color: rgba(128, 103, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(128, 103, 255, 0.1);
}

.ps-field option {
  color: var(--ps-text);
  background: #111728;
}

.ps-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--ps-line);
  border-radius: 12px;
  padding: 11px;
  background: rgba(17, 23, 40, 0.56);
}

.ps-switch-row > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ps-switch-row b {
  font-size: 0.68rem;
}

.ps-switch-row small {
  color: var(--ps-muted-2);
  font-size: 0.58rem;
  line-height: 1.4;
}

.ps-switch-row input {
  flex: 0 0 auto;
}

.ps-range-field {
  padding: 4px 1px 1px;
}

.ps-geometry-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ps-geometry-meta span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--ps-line);
  border-radius: 10px;
  padding: 9px;
  color: var(--ps-muted-2);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.58rem;
}

.ps-geometry-meta b {
  color: var(--ps-text);
  font-size: 0.75rem;
}

.ps-inspector-actions {
  padding-top: 3px;
}

.ps-inspector-actions .ps-button {
  flex: 1;
}

.ps-busy {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 13px;
  background: rgba(6, 9, 19, 0.72);
  backdrop-filter: blur(8px);
}

.ps-busy span {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(128, 103, 255, 0.18);
  border-top-color: var(--ps-violet-bright);
  border-radius: 50%;
  animation: ps-spin 0.8s linear infinite;
}

.ps-busy p {
  margin: 0;
  color: var(--ps-muted);
  font-size: 0.72rem;
}

@keyframes ps-spin {
  to {
    transform: rotate(360deg);
  }
}

.ps-toast-stack {
  position: fixed;
  z-index: 2000;
  right: 22px;
  bottom: 22px;
  width: min(350px, calc(100vw - 32px));
  display: grid;
  gap: 9px;
  pointer-events: none;
}

.ps-toast {
  --toast-swipe-x: 0px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translate3d(var(--toast-swipe-x), 8px, 0);
  opacity: 0;
  border: 1px solid var(--ps-line-strong);
  border-left: 3px solid var(--ps-violet);
  border-radius: 11px;
  padding: 8px 8px 8px 13px;
  color: var(--ps-text);
  background: rgba(13, 18, 32, 0.96);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.38);
  font-size: 0.7rem;
  line-height: 1.45;
  backdrop-filter: blur(14px);
  touch-action: pan-y;
  user-select: none;
  pointer-events: none;
  will-change: transform, opacity;
  transition: transform 200ms ease, opacity 200ms ease;
}

.ps-toast.is-visible {
  transform: translate3d(var(--toast-swipe-x), 0, 0);
  opacity: 1;
  pointer-events: auto;
}

.ps-toast.is-swiping { transition: none; }
.ps-toast.is-dismissing-right { transform: translate3d(calc(100% + 40px), 0, 0); opacity: 0; pointer-events: none; }
.ps-toast .toast-message { min-width: 0; flex: 1 1 auto; }
.ps-toast .toast-close {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--ps-text);
  background: rgba(255, 255, 255, .06);
  font: 400 1.2rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.ps-toast .toast-close:hover { background: rgba(255, 255, 255, .11); }
.ps-toast .toast-close:focus-visible { outline: 2px solid var(--ps-violet); outline-offset: 2px; }

.ps-toast.is-success {
  border-left-color: var(--ps-green);
}

.ps-toast.is-warning {
  border-left-color: var(--ps-amber);
}

.ps-toast.is-error {
  border-left-color: var(--ps-red);
}

@media (min-width: 721px) {
  .ps-studio {
    height: min(820px, calc(100dvh - 112px));
    min-height: 560px;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .ps-body,
  .ps-left-panel {
    min-height: 0;
    overflow: hidden;
  }

  .ps-panel-heading,
  .ps-trash {
    flex: 0 0 auto;
  }

  .ps-region-list {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 1240px) {
  .ps-body {
    grid-template-columns: 210px minmax(380px, 1fr) 248px;
  }

  .ps-tool {
    min-width: 44px;
    grid-template-columns: 1fr;
  }

  .ps-tool-label {
    display: none;
  }

  .ps-confidence-filter {
    width: 120px;
  }
}

@media (max-width: 1000px) {
  .ps-header {
    align-items: flex-start;
  }

  .ps-header-actions .ps-button span,
  .ps-header-actions .ps-upload-button span {
    display: none;
  }

  .ps-toolbar {
    align-items: flex-start;
    overflow-x: auto;
  }

  .ps-toolbar-options {
    flex: 0 0 auto;
  }

  .ps-body {
    grid-template-columns: 190px minmax(380px, 1fr);
  }

  .ps-inspector {
    position: absolute;
    z-index: 8;
    right: 0;
    top: 0;
    bottom: 0;
    width: 270px;
    border-left: 1px solid var(--ps-line-strong);
    background: rgba(9, 13, 24, 0.97);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.34);
    transform: translateX(calc(100% - 4px));
    transition: transform 180ms ease;
  }

  .ps-inspector:has(.ps-inspector-form:not([hidden])) {
    transform: none;
  }
}

@media (max-width: 720px) {
  .ps-studio {
    min-height: 760px;
    border-radius: 16px;
  }

  .ps-header {
    min-height: 0;
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .ps-title-row {
    align-items: center;
  }

  .ps-plan-state {
    max-width: 52vw;
  }

  .ps-header-actions {
    width: 100%;
    overflow-x: auto;
  }

  .ps-header-actions .ps-button,
  .ps-header-actions .ps-upload-button {
    flex: 1 0 auto;
  }

  .ps-header-actions .ps-button span,
  .ps-header-actions .ps-upload-button span {
    display: inline;
  }

  .ps-toolbar {
    display: grid;
    gap: 8px;
    padding: 8px;
  }

  .ps-toolbar-group {
    width: 100%;
  }

  .ps-toolbar-options {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .ps-tool {
    flex: 1;
  }

  .ps-tool-label {
    display: none;
  }

  .ps-toolbar-options .ps-confidence-filter {
    display: none;
  }

  .ps-body {
    min-height: 600px;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(420px, 1fr) 180px;
  }

  .ps-workspace {
    grid-row: 1;
    grid-template-rows: minmax(0, 1fr) 34px;
  }

  .ps-left-panel {
    grid-row: 2;
    border-top: 1px solid var(--ps-line);
    border-right: 0;
  }

  .ps-panel-heading {
    min-height: 48px;
    padding: 7px 12px;
  }

  .ps-panel-heading .ps-kicker {
    display: none;
  }

  .ps-region-list {
    display: flex;
    overflow: auto;
    padding: 7px;
  }

  .ps-region-item {
    min-width: 170px;
    width: 170px;
  }

  .ps-trash {
    display: none;
  }

  .ps-inspector {
    position: fixed;
    z-index: 1000;
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 10px;
    width: auto;
    max-height: min(76vh, 620px);
    border: 1px solid var(--ps-line-strong);
    border-radius: 16px;
    box-shadow: 0 -20px 70px rgba(0, 0, 0, 0.55);
    transform: translateY(calc(100% + 20px));
  }

  .ps-inspector:has(.ps-inspector-form:not([hidden])) {
    transform: none;
  }

  .ps-inspector-empty {
    display: none;
  }

  .ps-dropzone {
    padding: 10px;
  }

  .ps-empty-state {
    padding: 28px 18px;
  }

  .ps-canvas-stack {
    max-width: 100%;
  }

  .ps-statusbar {
    grid-template-columns: 1fr auto;
  }

  .ps-statusbar span:nth-child(2) {
    display: none;
  }
}

@media (max-width: 460px) {
  .ps-header-actions .ps-button,
  .ps-header-actions .ps-upload-button {
    min-width: 42px;
    padding: 0 10px;
  }

  .ps-header-actions .ps-button span,
  .ps-header-actions .ps-upload-button span {
    display: none;
  }

  .ps-toolbar-options .ps-button span,
  .ps-toolbar-options .ps-compact-control span {
    display: none;
  }

  .ps-toolbar-options .ps-button {
    min-width: 42px;
    padding: 0 10px;
  }

  .ps-compact-control {
    width: 42px;
    justify-content: center;
    padding: 0;
  }

  .ps-body {
    grid-template-rows: minmax(390px, 1fr) 175px;
  }

  .ps-statusbar span:first-child {
    display: none;
  }

  .ps-statusbar {
    grid-template-columns: 1fr;
  }

  .ps-statusbar span:last-child {
    text-align: center;
  }
}

/* The main building screen gives the plan the full canvas. Other Plan Studio
   consumers keep the standard three-column editor. */
.ps-host.ps-canvas-first,
.ps-host.ps-canvas-first .ps-studio {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.ps-host.ps-canvas-first .ps-studio {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-radius: 17px;
  background:
    radial-gradient(circle at 72% -18%, rgba(94, 67, 216, .16), transparent 34rem),
    linear-gradient(145deg, rgba(9, 14, 27, .99), rgba(5, 9, 18, .99));
}

.ps-host.ps-canvas-first .ps-header {
  min-height: 62px;
  padding: 10px 12px 9px 15px;
}

.ps-host.ps-canvas-first .ps-title-row h2 { font-size: .96rem; }
.ps-host.ps-canvas-first .ps-plan-state { font-size: .62rem; }
.ps-host.ps-canvas-first .ps-header-actions .ps-button { min-height: 36px; }
.ps-host.ps-canvas-first .ps-toolbar { min-height: 52px; padding: 7px 9px; }

.ps-host.ps-canvas-first .ps-body {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.ps-host.ps-canvas-first .ps-left-panel { display: none; }

.ps-host.ps-canvas-first .ps-workspace {
  min-height: 0;
  grid-column: 1;
  grid-row: 1;
  background:
    radial-gradient(circle at 50% 44%, rgba(84, 61, 187, .13), transparent 42rem),
    linear-gradient(180deg, rgba(6, 10, 20, .96), rgba(5, 9, 18, .99));
}

.ps-host.ps-canvas-first .ps-dropzone { padding: clamp(8px, 1.2vw, 18px); }

.ps-host.ps-canvas-first .ps-canvas-stack {
  width: 100%;
  max-width: 100%;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .34), 0 0 0 1px rgba(128, 103, 255, .05);
}

.ps-host.ps-canvas-first .ps-inspector {
  position: absolute;
  z-index: 45;
  top: 12px;
  right: 12px;
  bottom: 50px;
  width: min(400px, calc(100% - 24px));
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(151, 161, 196, .22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 85% 0, rgba(128, 103, 255, .17), transparent 18rem),
    rgba(8, 13, 25, .97);
  box-shadow: -18px 26px 70px rgba(0, 0, 0, .5), 0 0 0 1px rgba(128, 103, 255, .05);
  backdrop-filter: blur(20px);
  animation: ps-room-card-in 180ms cubic-bezier(.2, .75, .25, 1);
}

@keyframes ps-room-card-in {
  from { opacity: 0; transform: translateX(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.ps-host.ps-canvas-first .ps-inspector-form {
  height: 100%;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  padding: 15px;
  overscroll-behavior: contain;
}

.ps-inspector-title-copy { min-width: 0; }
.ps-inspector-title-copy p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--ps-muted-2);
  font-size: .56rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-inspector-title-actions { display: flex; align-items: center; gap: 7px; }
.ps-room-card-close { display: none; }
.ps-host.ps-canvas-first .ps-room-card-close { display: inline-grid; }

.ps-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ps-room-card-technical {
  border: 1px solid var(--ps-line);
  border-radius: 12px;
  background: rgba(17, 23, 40, .42);
}
.ps-room-card-technical summary {
  padding: 10px 11px;
  color: var(--ps-muted);
  font-size: .63rem;
  cursor: pointer;
}
.ps-room-card-technical[open] summary { border-bottom: 1px solid var(--ps-line); }
.ps-room-card-technical > .ps-field,
.ps-room-card-technical > .ps-geometry-meta { margin: 11px; }

.ps-host.ps-canvas-first .ps-inspector-actions {
  position: sticky;
  bottom: -15px;
  z-index: 2;
  margin: 0 -15px -15px;
  padding: 11px 15px 15px;
  border-top: 1px solid var(--ps-line);
  background: rgba(8, 13, 25, .98);
}
.ps-host.ps-canvas-first .ps-inspector-actions .ps-button-primary { flex: 1.35; }

@media (max-width: 720px) {
  .ps-host.ps-canvas-first .ps-studio { min-height: 620px; }
  .ps-host.ps-canvas-first .ps-header { align-items: flex-start; }
  .ps-host.ps-canvas-first .ps-body { min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .ps-host.ps-canvas-first .ps-workspace { grid-row: 1; }
  .ps-host.ps-canvas-first .ps-inspector {
    position: fixed;
    z-index: 1100;
    top: auto;
    right: 8px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    max-height: min(72dvh, 680px);
    border-radius: 17px;
    animation-name: ps-room-card-up;
  }
  @keyframes ps-room-card-up {
    from { opacity: 0; transform: translateY(18px) scale(.99); }
    to { opacity: 1; transform: none; }
  }
}

@media (max-width: 460px) {
  .ps-host.ps-canvas-first .ps-title-group { display: none; }
  .ps-host.ps-canvas-first .ps-header { min-height: 54px; justify-content: flex-end; padding: 7px; }
  .ps-host.ps-canvas-first .ps-field-grid { grid-template-columns: 1fr; }
}

.ps-dock-toggle,
.ps-viewport-controls,
.ps-room-card-expand,
.ps-options-upload {
  display: none;
}

/* Immersive canvas-first workspace: the plan is the base layer and every
   control is temporary, contextual chrome above it. */
.ps-host.ps-canvas-first .ps-studio {
  isolation: isolate;
  grid-template-rows: minmax(0, 1fr);
  border: 0;
  border-radius: 16px;
  background: #050812;
  box-shadow: none;
}

.ps-host.ps-canvas-first .ps-studio::before {
  z-index: 0;
  opacity: 1;
  background:
    radial-gradient(ellipse at 58% 34%, rgba(128, 103, 255, .17), transparent 34%),
    radial-gradient(ellipse at 76% 18%, rgba(76, 134, 255, .13), transparent 28%),
    radial-gradient(ellipse at 26% 88%, rgba(236, 72, 153, .055), transparent 31%),
    linear-gradient(145deg, #070b17 0%, #040711 56%, #02040a 100%);
  mask-image: none;
}

.ps-host.ps-canvas-first .ps-studio::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(139, 153, 203, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 153, 203, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 0 42%, transparent 78%);
}

.ps-host.ps-canvas-first .ps-header,
.ps-host.ps-canvas-first .ps-toolbar,
.ps-host.ps-canvas-first .ps-body {
  grid-column: 1;
  grid-row: 1;
}

.ps-host.ps-canvas-first .ps-body {
  z-index: 1;
  min-height: 0;
  overflow: hidden;
}

.ps-host.ps-canvas-first .ps-workspace {
  position: relative;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  background: transparent;
}

.ps-host.ps-canvas-first .ps-workspace::before {
  content: "";
  position: absolute;
  inset: 10% 12%;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(113, 85, 244, .08);
  filter: blur(90px);
}

.ps-host.ps-canvas-first .ps-header {
  position: absolute;
  z-index: 35;
  top: 16px;
  right: 16px;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.ps-host.ps-canvas-first .ps-title-group {
  display: none;
}

.ps-host.ps-canvas-first .ps-header-actions {
  gap: 4px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(7, 11, 22, .76);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px) saturate(130%);
}

.ps-host.ps-canvas-first .ps-header-actions .ps-button {
  min-width: 40px;
  min-height: 40px;
  padding: 0 11px;
  border-color: transparent;
  background: transparent;
}

.ps-host.ps-canvas-first .ps-header-actions .ps-button:not(.ps-button-primary) > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ps-host.ps-canvas-first .ps-header-actions .ps-button-primary {
  min-width: 108px;
  border-color: transparent;
  background: #8067ff;
  box-shadow: none;
}

.ps-host.ps-canvas-first .ps-toolbar {
  position: absolute;
  z-index: 34;
  top: 50%;
  left: 16px;
  width: max-content;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 6px;
  border: 0;
  border-radius: 14px;
  background: rgba(7, 11, 22, .76);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px) saturate(130%);
  overflow: visible;
  transform: translateY(-50%);
}

.ps-host.ps-canvas-first .ps-toolbar > .ps-toolbar-group:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.ps-host.ps-canvas-first .ps-tool,
.ps-host.ps-canvas-first .ps-dock-toggle {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
}

.ps-host.ps-canvas-first .ps-tool {
  position: relative;
  grid-template-columns: 28px;
  padding: 0 8px;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.ps-host.ps-canvas-first .ps-tool-icon {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
}

.ps-host.ps-canvas-first .ps-tool-label {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: calc(100% + 8px);
  width: max-content;
  max-width: 160px;
  display: block;
  overflow: hidden;
  padding: 7px 10px;
  border: 1px solid rgba(151, 161, 196, .13);
  border-radius: 9px;
  background: rgba(8, 13, 25, .9);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .3);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transform: translate3d(-6px, -50%, 0) scale(.98);
  transition:
    opacity 140ms ease,
    transform 180ms cubic-bezier(.22, 1, .36, 1);
}

.ps-host.ps-canvas-first .ps-tool.is-active {
  width: 44px;
  background: rgba(128, 103, 255, .18);
  box-shadow: none;
}

.ps-host.ps-canvas-first .ps-tool.is-active .ps-tool-label {
  opacity: 1;
  transform: translate3d(0, -50%, 0) scale(1);
}

.ps-host.ps-canvas-first .ps-studio.is-toolbar-options-open .ps-tool-label {
  opacity: 0;
  transform: translate3d(-6px, -50%, 0) scale(.98);
}

.ps-host.ps-canvas-first .ps-dock-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0;
  border: 0;
  color: var(--ps-muted);
}

.ps-host.ps-canvas-first .ps-dock-toggle > span {
  display: none;
}

.ps-host.ps-canvas-first .ps-dock-toggle:hover,
.ps-host.ps-canvas-first .ps-dock-toggle[aria-expanded="true"] {
  background: rgba(128, 103, 255, .13);
  color: var(--ps-text);
}

.ps-host.ps-canvas-first .ps-toolbar-options {
  position: absolute;
  top: 0;
  left: calc(100% + 10px);
  width: 278px;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: rgba(8, 13, 25, .9);
  box-shadow: 0 8px 14px rgba(0, 0, 0, .32);
  backdrop-filter: blur(12px) saturate(125%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(-10px, 0, 0) scale(.985);
  transform-origin: left top;
  transition:
    opacity 160ms ease,
    transform 210ms cubic-bezier(.22, 1, .36, 1),
    visibility 0s linear 210ms;
}

.ps-host.ps-canvas-first .ps-studio.is-toolbar-options-open .ps-toolbar-options {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  transition-delay: 0s;
}

.ps-host.ps-canvas-first .ps-toolbar-options .ps-button,
.ps-host.ps-canvas-first .ps-toolbar-options .ps-compact-control {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  justify-content: flex-start;
  padding: 0 12px;
  border-color: transparent;
  background: rgba(24, 31, 51, .72);
}

.ps-host.ps-canvas-first .ps-toolbar-options .ps-compact-control {
  justify-content: space-between;
}

.ps-host.ps-canvas-first .ps-toolbar-options .ps-confidence-filter {
  width: 100%;
  padding: 8px 4px 4px;
  font-size: .75rem;
}

.ps-host.ps-canvas-first .ps-dropzone {
  z-index: 1;
  padding: 0;
}

.ps-host.ps-canvas-first .ps-canvas-shell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
  align-self: stretch;
  overflow: hidden;
  padding: 30px 70px 48px;
  transition: none;
}

.ps-host.ps-canvas-first .ps-studio.has-room-card .ps-canvas-shell {
  padding-right: 430px;
}

.ps-host.ps-canvas-first .ps-canvas-stack {
  max-width: 100%;
  max-height: 100%;
  border: 0;
  border-radius: 10px;
  background: rgba(4, 7, 15, .82);
  box-shadow: 0 8px 12px rgba(0, 0, 0, .34);
  transform-origin: center;
  will-change: transform;
  transition: transform 210ms cubic-bezier(.22, 1, .36, 1);
}

.ps-host.ps-canvas-first.is-panning .ps-canvas-stack {
  transition: none;
}

.ps-host.ps-canvas-first.is-zoomed .ps-overlay[data-mode="select"] {
  cursor: grab;
}

.ps-host.ps-canvas-first.is-panning .ps-overlay[data-mode="select"] {
  cursor: grabbing;
}

.ps-host.ps-canvas-first.has-plan .ps-canvas-stack {
  animation: ps-plan-reveal 320ms cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes ps-plan-reveal {
  from { opacity: .4; filter: blur(7px); }
  to { opacity: 1; filter: none; }
}

.ps-host.ps-canvas-first .ps-region-shape {
  transition:
    fill 150ms ease,
    stroke 150ms ease,
    opacity 150ms ease,
    filter 150ms ease;
}

.ps-host.ps-canvas-first .ps-canvas-hint {
  bottom: 12px;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  background: rgba(6, 10, 20, .66);
  color: rgba(221, 225, 240, .72);
  backdrop-filter: blur(10px);
}

.ps-host.ps-canvas-first .ps-statusbar {
  position: absolute;
  z-index: 20;
  bottom: 16px;
  left: 50%;
  width: auto;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(6, 10, 20, .65);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.ps-host.ps-canvas-first .ps-statusbar span:first-child,
.ps-host.ps-canvas-first .ps-statusbar span:last-child {
  display: none;
}

.ps-host.ps-canvas-first .ps-viewport-controls {
  position: absolute;
  z-index: 24;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px;
  border-radius: 13px;
  background: rgba(7, 11, 22, .76);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .28);
  backdrop-filter: blur(12px) saturate(125%);
  transition: none;
}

.ps-host.ps-canvas-first .ps-studio.has-room-card .ps-viewport-controls {
  right: 416px;
}

.ps-host.ps-canvas-first .ps-viewport-controls button {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 9px;
  padding: 0 9px;
  background: transparent;
  color: var(--ps-muted);
}

.ps-host.ps-canvas-first .ps-viewport-controls button:hover:not(:disabled) {
  background: rgba(128, 103, 255, .13);
  color: var(--ps-text);
}

.ps-host.ps-canvas-first .ps-viewport-controls button:disabled {
  opacity: .35;
}

.ps-host.ps-canvas-first .ps-viewport-controls output {
  min-width: 48px;
  color: var(--ps-text);
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.ps-host.ps-canvas-first .ps-viewport-controls .ps-viewport-fit {
  min-width: 84px;
}

.ps-host.ps-canvas-first .ps-inspector {
  z-index: 45;
  top: 76px;
  right: 16px;
  bottom: 68px;
  width: min(382px, calc(100% - 32px));
  border: 0;
  border-radius: 16px;
  background: rgba(8, 13, 25, .91);
  box-shadow: -18px 24px 64px rgba(0, 0, 0, .46);
  backdrop-filter: blur(12px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(calc(100% + 24px), 0, 0);
  transition:
    opacity 160ms ease,
    transform 220ms cubic-bezier(.22, 1, .36, 1),
    visibility 0s linear 220ms;
  animation: none;
}

.ps-host.ps-canvas-first .ps-inspector.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  transition-delay: 0s;
}

.ps-host.ps-canvas-first .ps-inspector-form {
  gap: 14px;
  padding: 18px;
  scrollbar-gutter: stable;
}

.ps-host.ps-canvas-first .ps-inspector-title {
  padding-bottom: 2px;
}

.ps-host.ps-canvas-first .ps-inspector-title-copy p {
  margin-top: 5px;
  font-size: .68rem;
}

.ps-host.ps-canvas-first .ps-room-card-expand {
  display: none;
}

.ps-room-assets {
  position: relative;
  overflow: clip;
  border: 1px solid rgba(139, 119, 255, .24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 10% 0, rgba(96, 217, 255, .09), transparent 11rem),
    linear-gradient(135deg, rgba(128, 103, 255, .12), rgba(17, 23, 40, .48) 58%, rgba(8, 13, 25, .36));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  backdrop-filter: blur(14px) saturate(125%);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.ps-room-assets[open] {
  border-color: rgba(139, 119, 255, .36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .045),
    0 12px 30px rgba(2, 5, 13, .2);
}

.ps-room-assets-summary {
  min-height: 66px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  color: var(--ps-text);
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.ps-room-assets-summary::-webkit-details-marker {
  display: none;
}

.ps-room-assets-summary:focus-visible {
  outline: 2px solid rgba(139, 119, 255, .7);
  outline-offset: -2px;
}

.ps-room-assets-icon,
.ps-room-asset-icon {
  display: inline-grid;
  place-items: center;
  color: #c5b8ff;
  background: linear-gradient(145deg, rgba(139, 119, 255, .26), rgba(82, 215, 255, .1));
  box-shadow: inset 0 0 0 1px rgba(170, 157, 255, .17);
}

.ps-room-assets-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.ps-room-assets-icon-svg,
.ps-room-asset-icon-svg {
  width: 18px;
  height: 18px;
}

.ps-room-assets-heading {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ps-room-assets-heading b {
  font-size: .8rem;
  line-height: 1.2;
}

.ps-room-assets-heading small {
  overflow: hidden;
  color: var(--ps-muted);
  font-size: .75rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-room-assets-count {
  min-width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(139, 119, 255, .28);
  border-radius: 999px;
  padding: 0 8px;
  color: #d9d1ff;
  background: rgba(128, 103, 255, .12);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}

.ps-room-assets-chevron,
.ps-room-asset-chevron {
  display: inline-grid;
  place-items: center;
  color: var(--ps-muted);
}

.ps-room-assets-chevron-svg,
.ps-room-asset-chevron-svg {
  width: 14px;
  height: 14px;
}

.ps-room-assets-summary .ps-room-assets-chevron {
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), color 180ms ease;
}

.ps-room-assets[open] .ps-room-assets-summary .ps-room-assets-chevron {
  color: #c5b8ff;
  transform: rotate(90deg);
}

.ps-room-assets-body {
  border-top: 1px solid rgba(151, 161, 196, .12);
  background: rgba(5, 9, 18, .24);
}

.ps-room-assets[open] .ps-room-assets-body {
  animation: ps-room-assets-reveal 180ms cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes ps-room-assets-reveal {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}

.ps-room-assets-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 5px;
  list-style: none;
}

.ps-room-asset-item {
  min-width: 0;
}

.ps-room-asset {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 15px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  padding: 8px 9px;
  color: var(--ps-text);
  background: transparent;
  font: inherit;
  text-align: left;
  transition: color 150ms ease, background-color 150ms ease, transform 180ms cubic-bezier(.22, 1, .36, 1);
}

.ps-room-asset:hover {
  background: linear-gradient(90deg, rgba(128, 103, 255, .13), rgba(82, 215, 255, .045));
  transform: translateX(2px);
}

.ps-room-asset:focus-visible {
  outline: 2px solid rgba(139, 119, 255, .68);
  outline-offset: -2px;
  background: rgba(128, 103, 255, .11);
}

.ps-room-asset-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.ps-room-asset-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ps-room-asset-copy strong {
  overflow-wrap: anywhere;
  font-size: .8rem;
  line-height: 1.25;
}

.ps-room-asset-copy small {
  overflow-wrap: anywhere;
  color: var(--ps-muted);
  font-size: .75rem;
  line-height: 1.35;
}

.ps-room-asset-state {
  border: 1px solid rgba(151, 161, 196, .18);
  border-radius: 999px;
  padding: 5px 7px;
  color: var(--ps-muted);
  background: rgba(151, 161, 196, .07);
  font-size: .75rem;
  line-height: 1;
  white-space: nowrap;
}

.ps-room-asset-state.is-ok {
  border-color: rgba(74, 211, 148, .24);
  color: #82e5b2;
  background: rgba(74, 211, 148, .08);
}

.ps-room-asset-state.is-attention {
  border-color: rgba(243, 171, 61, .26);
  color: #f0bd70;
  background: rgba(243, 171, 61, .08);
}

.ps-room-asset-state.is-problem {
  border-color: rgba(255, 95, 114, .28);
  color: #ff9cac;
  background: rgba(255, 95, 114, .08);
}

.ps-room-asset-state.is-inactive {
  color: #aeb6d1;
}

.ps-room-assets-empty {
  padding: 16px 14px;
  color: var(--ps-muted);
  font-size: .65rem;
  line-height: 1.55;
  text-align: center;
}

.ps-host.ps-canvas-first .ps-room-card-technical {
  border-color: transparent;
  background: rgba(20, 27, 46, .56);
}

@media (min-width: 1180px) {
  .ps-host.ps-canvas-first .ps-inspector {
    width: min(430px, calc(100% - 32px));
  }

  .ps-host.ps-canvas-first .ps-studio.has-room-card .ps-canvas-shell {
    padding-right: 478px;
  }

  .ps-host.ps-canvas-first .ps-studio.has-room-card .ps-viewport-controls {
    right: 464px;
  }
}

.ps-host.ps-canvas-first .ps-inspector-actions {
  background: rgba(8, 13, 25, .98);
}

@media (max-width: 820px) {
  .ps-host.ps-canvas-first .ps-studio {
    min-height: 0;
    height: 100%;
    border-radius: 12px;
  }

  .ps-host.ps-canvas-first .ps-header {
    top: 8px;
    right: 8px;
  }

  .ps-host.ps-canvas-first .ps-header-actions .ps-button {
    min-width: 44px;
    min-height: 44px;
  }

  .ps-host.ps-canvas-first .ps-room-card-close,
  .ps-host.ps-canvas-first .ps-room-card-expand {
    width: 44px;
    height: 44px;
  }

  .ps-host.ps-canvas-first .ps-header-actions .ps-upload-button,
  .ps-host.ps-canvas-first .ps-header-actions [data-action="undo"],
  .ps-host.ps-canvas-first .ps-header-actions [data-action="redo"] {
    display: none;
  }

  .ps-host.ps-canvas-first .ps-header-actions .ps-button-primary {
    min-width: 104px;
  }

  .ps-host.ps-canvas-first .ps-options-upload {
    display: flex;
  }

  .ps-host.ps-canvas-first.ps-read-only .ps-options-upload {
    display: none;
  }

  .ps-host.ps-canvas-first .ps-toolbar-options .ps-button span,
  .ps-host.ps-canvas-first .ps-toolbar-options .ps-compact-control span {
    position: static;
    width: auto;
    height: auto;
    max-width: none;
    overflow: visible;
    display: inline;
    opacity: 1;
    clip: auto;
    white-space: normal;
  }

  .ps-host.ps-canvas-first .ps-toolbar-options .ps-confidence-filter {
    width: 100%;
    display: grid;
  }

  .ps-host.ps-canvas-first .ps-toolbar {
    top: auto;
    bottom: 12px;
    left: 50%;
    flex-direction: row;
    align-items: center;
    transform: translateX(-50%);
  }

  .ps-host.ps-canvas-first .ps-toolbar > .ps-toolbar-group:first-child {
    flex-direction: row;
  }

  .ps-host.ps-canvas-first .ps-tool,
  .ps-host.ps-canvas-first .ps-tool.is-active {
    width: 44px;
  }

  .ps-host.ps-canvas-first .ps-tool-label,
  .ps-host.ps-canvas-first .ps-tool.is-active .ps-tool-label {
    position: absolute;
    width: 1px;
    height: 1px;
    max-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    clip: rect(0 0 0 0);
    transform: none;
  }

  .ps-host.ps-canvas-first .ps-toolbar-options {
    top: auto;
    right: 0;
    bottom: calc(100% + 10px);
    left: auto;
    width: min(310px, calc(100vw - 16px));
    transform: translate3d(0, 10px, 0) scale(.985);
    transform-origin: right bottom;
  }

  .ps-host.ps-canvas-first .ps-studio.is-toolbar-options-open .ps-toolbar-options {
    transform: translate3d(0, 0, 0) scale(1);
  }

  .ps-host.ps-canvas-first .ps-canvas-shell {
    place-items: start center;
    padding: 68px 10px 82px;
  }

  .ps-host.ps-canvas-first .ps-studio.has-room-card .ps-canvas-shell {
    padding-right: 10px;
    padding-bottom: min(54dvh, 470px);
  }

  .ps-host.ps-canvas-first .ps-viewport-controls {
    right: 8px;
    bottom: 72px;
  }

  .ps-host.ps-canvas-first .ps-studio.has-room-card .ps-viewport-controls {
    right: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .ps-host.ps-canvas-first .ps-viewport-controls button {
    min-width: 44px;
    height: 44px;
  }

  .ps-host.ps-canvas-first .ps-viewport-controls .ps-viewport-fit {
    min-width: 44px;
  }

  .ps-host.ps-canvas-first .ps-viewport-fit span,
  .ps-host.ps-canvas-first .ps-viewport-focus {
    display: none;
  }

  .ps-host.ps-canvas-first .ps-statusbar {
    bottom: 74px;
  }

  .ps-host.ps-canvas-first .ps-studio.has-room-card .ps-statusbar,
  .ps-host.ps-canvas-first .ps-studio.has-room-card .ps-toolbar {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
    transition:
      opacity 150ms ease,
      transform 200ms cubic-bezier(.22, 1, .36, 1);
  }

  .ps-host.ps-canvas-first .ps-inspector {
    position: fixed;
    top: auto;
    right: 8px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    height: min(52dvh, 520px);
    max-height: min(52dvh, 520px);
    border-radius: 16px 16px 12px 12px;
    transform: translate3d(0, calc(100% + 24px), 0);
  }

  .ps-host.ps-canvas-first .ps-inspector::before {
    content: "";
    position: sticky;
    z-index: 3;
    top: 7px;
    display: block;
    width: 38px;
    height: 4px;
    margin: 7px auto -3px;
    border-radius: 999px;
    background: rgba(191, 198, 221, .38);
  }

  .ps-host.ps-canvas-first .ps-inspector.is-open {
    transform: translate3d(0, 0, 0);
  }

  .ps-host.ps-canvas-first .ps-studio.is-room-card-expanded .ps-inspector {
    height: calc(100dvh - 92px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 92px - env(safe-area-inset-bottom));
  }

  .ps-host.ps-canvas-first .ps-room-card-expand {
    display: inline-grid;
  }

  .ps-host.ps-canvas-first .ps-inspector-form {
    padding: 13px 16px 16px;
  }

  .ps-host.ps-canvas-first .ps-field input,
  .ps-host.ps-canvas-first .ps-field select,
  .ps-host.ps-canvas-first .ps-field textarea {
    font-size: 16px;
  }

  .ps-host.ps-canvas-first .ps-canvas-hint,
  .ps-host.ps-canvas-first .ps-statusbar {
    display: none;
  }
}

@media (max-width: 500px) {
  .ps-host.ps-canvas-first .ps-field-grid {
    grid-template-columns: 1fr;
  }

  .ps-host.ps-canvas-first .ps-header-actions {
    padding: 4px;
  }

  .ps-host.ps-canvas-first .ps-header-actions .ps-button-primary {
    min-width: 94px;
  }

  .ps-host.ps-canvas-first .ps-toolbar {
    max-width: calc(100vw - 16px);
  }

  .ps-host.ps-canvas-first .ps-toolbar,
  .ps-host.ps-canvas-first .ps-toolbar > .ps-toolbar-group:first-child {
    gap: 2px;
  }

  .ps-room-assets-summary {
    grid-template-columns: 38px minmax(0, 1fr) auto 16px;
    gap: 9px;
  }

  .ps-room-asset {
    grid-template-columns: 34px minmax(0, 1fr) 15px;
    align-items: start;
  }

  .ps-room-asset-copy strong {
    font-size: .875rem;
  }

  .ps-room-asset-state {
    grid-column: 2;
    justify-self: start;
  }

  .ps-room-asset > .ps-room-asset-chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 620px) {
  .ps-host.ps-canvas-first .ps-toolbar {
    top: 50%;
    bottom: auto;
    left: 8px;
    flex-direction: column;
    transform: translateY(-50%);
  }

  .ps-host.ps-canvas-first .ps-toolbar > .ps-toolbar-group:first-child {
    flex-direction: column;
  }

  .ps-host.ps-canvas-first .ps-toolbar-options {
    top: 0;
    right: auto;
    bottom: auto;
    left: calc(100% + 8px);
    transform-origin: left top;
  }

  .ps-host.ps-canvas-first .ps-inspector {
    top: 8px;
    right: 8px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: auto;
    width: min(360px, 46vw);
    height: auto;
    max-height: none;
    transform: translate3d(calc(100% + 20px), 0, 0);
  }

  .ps-host.ps-canvas-first .ps-inspector::before,
  .ps-host.ps-canvas-first .ps-room-card-expand {
    display: none;
  }

  .ps-host.ps-canvas-first .ps-inspector.is-open {
    transform: translate3d(0, 0, 0);
  }

  .ps-host.ps-canvas-first .ps-studio.has-room-card .ps-canvas-shell {
    padding-right: min(390px, 48vw);
    padding-bottom: 48px;
  }

  .ps-host.ps-canvas-first .ps-studio.has-room-card .ps-toolbar {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ps-host.ps-canvas-first .ps-toolbar-options,
  .ps-host.ps-canvas-first .ps-inspector,
  .ps-host.ps-canvas-first .ps-canvas-stack,
  .ps-host.ps-canvas-first .ps-canvas-shell,
  .ps-host.ps-canvas-first .ps-viewport-controls,
  .ps-host.ps-canvas-first .ps-tool,
  .ps-host.ps-canvas-first .ps-tool-label {
    animation: none !important;
    transition: none !important;
  }

  .ps-host *,
  .ps-host *::before,
  .ps-host *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
