@import url('/src/site/style.css');
html,
body {
  height: 100%;
  overflow: hidden;
}
.pg-app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.pg-header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 24px;
  border-bottom: 1px solid var(--line);
  background: #f6f5ed;
}
.pg-header .brand {
  font-size: 19px;
}
.pg-name {
  font: 10px var(--mono);
  color: #8d9b80;
}
.pg-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}
#save-status {
  font: 8px var(--mono);
  color: #99a58a;
  margin-left: 14px;
}
.quiet-button {
  border: 1px solid #d0dac4;
  background: #f4f6eb;
  color: #728565;
  padding: 9px 11px;
  font-size: 10px;
  border-radius: 4px;
  cursor: pointer;
}
.quiet-button:hover {
  background: #e7eddb;
}
.quiet-button:disabled {
  opacity: 0.4;
  cursor: default;
}
.pg-main {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr) 350px;
  flex: 1;
  min-height: 0;
}
.objects-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #f7f7ef;
}
.objects-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 17px 14px;
}
.objects-heading strong {
  font-size: 12px;
  font-weight: 500;
}
.objects-heading button {
  border: 1px solid #cfd9c2;
  background: #edf2e3;
  width: 27px;
  height: 27px;
  border-radius: 4px;
  color: #728866;
  font-size: 19px;
}
.objects-panel > select {
  margin: 0 16px 14px;
  width: calc(100% - 32px);
  font-size: 10px;
  border: 1px solid #d6dfcb;
  padding: 8px;
  background: #f8f9f0;
  border-radius: 4px;
}
.object-list {
  overflow: auto;
  flex: 1;
  padding: 0 8px;
}
.object-row {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 9px;
  border: 0;
  background: none;
  border-radius: 5px;
  padding: 11px 9px;
  cursor: pointer;
  color: #718668;
  font-size: 11px;
}
.object-row:hover {
  background: #eaf0df;
}
.object-row.active {
  background: #e2ebd6;
  color: #4b7149;
}
.object-row > span:first-child {
  color: #a3b493;
  font-size: 14px;
}
.object-row small {
  display: block;
  color: #a1ac94;
  font: 7px var(--mono);
  margin-top: 4px;
}
.scene-footer {
  padding: 17px;
  border-top: 1px solid var(--line);
}
.scene-footer label {
  font: 8px var(--mono);
  color: #8b9c7d;
  display: grid;
  gap: 8px;
}
.scene-footer select {
  background: #f8f9ef;
  border: 1px solid #cdd8c0;
  padding: 8px;
  font-size: 10px;
  border-radius: 4px;
  color: #758b67;
}
.scene-footer button {
  width: 100%;
  margin-top: 10px;
}
.scene-footer p {
  font: 8px/1.7 var(--mono);
  color: #a0ad92;
  margin: 12px 0 0;
}
.stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #f0eee7;
}
.stage-toolbar {
  padding: 12px 13px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f6f6eb;
  border-bottom: 1px solid #dce3d0;
}
.mode-tabs {
  display: flex;
  border: 1px solid #d1dcc2;
  border-radius: 5px;
  padding: 3px;
  gap: 2px;
}
.mode-tabs button {
  border: 0;
  background: none;
  padding: 6px 11px;
  font-size: 10px;
  border-radius: 3px;
  cursor: pointer;
  color: #8c9e7a;
}
.mode-tabs button[aria-pressed='true'] {
  background: #dde9d0;
  color: #55734a;
}
.stage-spacer {
  flex: 1;
}
.stage-toolbar .quiet-button {
  padding: 8px;
  font-size: 9px;
  white-space: nowrap;
}
.pg-preview {
  flex: 1;
  min-height: 250px;
  min-width: 0;
  position: relative;
}
.stage-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #dbe1d0;
  padding: 12px 14px;
  font: 8px var(--mono);
  color: #95a184;
  background: #f6f6ec;
}
.inspector {
  border-left: 1px solid #d6dfca;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f8f8ef;
}
.inspector-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 8px 13px 0;
  gap: 6px;
}
.inspector-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 11px;
  padding: 13px 15px;
  color: #93a183;
  cursor: pointer;
}
.inspector-tabs button[aria-selected='true'] {
  border-color: #6d8b5d;
  color: #52714b;
}
.tab-panel {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 20px;
}
.tab-panel[hidden] {
  display: none !important;
}
#camera-form { display: grid; gap: 14px; }
#scene-form, #resource-form, #new-area-form { display: grid; gap: 12px; }
.preview-actions { display:flex; gap:8px; padding:6px 12px; flex-wrap:wrap; }
.form-draft-status { font:10px var(--mono); color:#9a683c; margin:0; }
.stage-toolbar { flex-wrap:wrap; }
.stage-toolbar select { max-width:130px; padding:7px; border:1px solid #d0dac4; border-radius:4px; background:#f4f6eb; font-size:10px; }
.inspector-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.inspector-tabs button { min-width:0; }
#camera-form details { display: grid; gap: 10px; }
#camera-form summary { cursor: pointer; margin-bottom: 10px; }
.empty-inspector {
  padding: 35px 8px;
  color: #94a386;
  font-size: 12px;
  line-height: 1.8;
}
.empty-inspector strong {
  display: block;
  color: #6d865e;
  margin-bottom: 10px;
  font-weight: 500;
}
.inspector-title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
}
.entity-id {
  font: 8px var(--mono);
  color: #a5af97;
  margin: 0 0 22px;
}
.field {
  display: grid;
  gap: 7px;
  font: 9px var(--mono);
  color: #859877;
  margin-bottom: 16px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d3ddc7;
  background: #f1f5e7;
  border-radius: 4px;
  padding: 9px;
  font: 11px var(--sans, Arial, sans-serif);
  color: #5a7650;
}
.field input[type='color'] {
  padding: 3px;
  height: 32px;
}
.field textarea {
  resize: vertical;
  line-height: 1.6;
}
.field input[type='checkbox'] {
  width: auto;
}
.fields-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fields-row.two {
  grid-template-columns: 1fr 1fr;
}
.field-section {
  padding: 18px 0 4px;
  border-top: 1px solid #e0e6d5;
}
.field-section h3 {
  font: 8px var(--mono);
  letter-spacing: 1px;
  color: #a0ad8e;
  margin: 0 0 15px;
}
.field-section p {
  font: 8px/1.7 var(--mono);
  color: #a2ad96;
  margin-top: 0;
}
.check-field {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  color: #819473;
  margin: 0 0 16px;
}
.check-field input {
  accent-color: #708e60;
}
.inspector-actions {
  display: flex;
  gap: 8px;
  margin-top: 17px;
  flex-wrap: wrap;
}
.danger {
  color: #a17b5b;
}
.error {
  font: 10px/1.6 var(--mono);
  color: #a56b48;
  background: #fbf2e4;
  border: 1px solid #e9d6b8;
  border-radius: 5px;
  padding: 10px;
  margin: 12px 0;
}
.error[hidden] {
  display: none;
}
.stage > .error {
  margin: 8px 13px;
}
.panel-intro h2 {
  font-size: 24px;
  letter-spacing: -0.7px;
  line-height: 1.2;
  margin: 0 0 12px;
}
.panel-intro p:not(.eyebrow) {
  font-size: 11px;
  line-height: 1.8;
  color: #8a9c7b;
  margin: 0 0 20px;
}
.panel-intro .eyebrow {
  font-size: 7px;
  margin: 0 0 15px;
}
.json-panel {
  display: flex;
  flex-direction: column;
  padding: 18px 15px;
}
.code-editor {
  flex: 1;
  min-height: 250px;
  min-width: 0;
  width: 100%;
  resize: none;
  white-space: pre;
  tab-size: 2;
  border: 1px solid #d3dfc4;
  border-radius: 5px;
  background: #f0f5e6;
  color: #5d7b4d;
  padding: 13px;
  font: 10px/1.75 var(--mono);
  outline-offset: 1px;
}
.panel-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  font: 8px var(--mono);
  color: #97a587;
}
.export-card {
  border: 1px solid #d3ddc6;
  background: #f2f5e8;
  border-radius: 7px;
  padding: 17px;
  margin: 0 0 14px;
}
.export-number {
  font: 8px var(--mono);
  color: #a4b192;
  display: block;
  margin-bottom: 12px;
}
.export-card h3 {
  font-size: 14px;
  letter-spacing: -0.2px;
  margin: 0 0 8px;
}
.export-card p,
.module-details p {
  font-size: 10px;
  line-height: 1.8;
  color: #91a07e;
  margin: 0 0 14px;
}
.export-card .button {
  width: 100%;
  font-size: 10px;
}
.embed-code {
  font: 9px/1.8 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #769365;
  margin: 12px 0;
}
.module-details {
  padding: 17px 0;
  border-bottom: 1px solid #dce4d0;
}
.module-details summary {
  font-size: 12px;
  cursor: pointer;
  color: #68865a;
  margin-bottom: 14px;
}
.download-row {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  font-size: 9px;
  color: #6a8b58;
}
.download-row button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: inherit;
}
.panel-note {
  font: 8px/1.8 var(--mono) !important;
  color: #a0ad8e !important;
}
.snapshot-button {
  margin-top: 18px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#mobile-objects {
  display: none;
}
dialog {
  width: min(500px, calc(100% - 30px));
  border: 1px solid #c9d8bb;
  background: #f7f8ee;
  padding: 24px;
  border-radius: 12px;
  color: #5b7950;
}
dialog::backdrop {
  background: #334c332d;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-heading h2 {
  font-size: 29px;
  letter-spacing: -1px;
}
.dialog-heading button {
  border: 0;
  background: none;
  color: #879c78;
  font-size: 25px;
  cursor: pointer;
}
.object-kit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}
.object-kit button {
  border: 1px solid #d0dec1;
  border-radius: 6px;
  padding: 20px 12px;
  background: #eef4e3;
  text-align: left;
  cursor: pointer;
  color: #6d8b5b;
  font-size: 12px;
}
.object-kit button:hover {
  background: #e1ecd4;
}
.object-kit small {
  display: block;
  font: 8px var(--mono);
  color: #a0b18d;
  margin-top: 8px;
}
@media (max-width: 1150px) {
  .pg-main {
    grid-template-columns: 170px minmax(0, 1fr) 310px;
  }
  .pg-header {
    padding: 14px 17px;
    gap: 9px;
  }
  #save-status {
    display: none;
  }
  .pg-name {
    font-size: 9px;
  }
  .pg-actions {
    gap: 6px;
  }
  .stage-toolbar {
    gap: 4px;
    padding: 10px 8px;
  }
  .stage-toolbar .quiet-button {
    font-size: 8px;
  }
  .mode-tabs button {
    padding: 6px 8px;
  }
  .stage-status {
    font-size: 7px;
  }
  .tab-panel {
    padding: 16px;
  }
}
@media (max-width: 850px) {
  html,
  body {
    height: auto;
    overflow: auto;
  }
  .pg-app {
    height: auto;
    min-height: 100dvh;
  }
  .pg-header {
    flex-wrap: wrap;
    padding: 14px 16px;
    gap: 10px;
  }
  .pg-actions {
    width: 100%;
    margin: 0;
    justify-content: space-between;
  }
  .pg-name {
    margin-left: auto;
  }
  .pg-main {
    display: flex;
    flex-direction: column;
  }
  .objects-panel {
    display: none;
  }
  .stage {
    min-height: 430px;
  }
  .pg-preview {
    height: 350px;
    flex: none;
  }
  .stage-toolbar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
  }
  .stage-spacer {
    display: none;
  }
  .stage-status {
    font-size: 7px;
    padding: 10px;
  }
  .inspector {
    border-left: 0;
    border-top: 1px solid var(--line);
    min-height: 450px;
  }
  .tab-panel {
    overflow: visible;
    padding: 20px;
  }
  .json-panel {
    min-height: 650px;
  }
  .inspector-tabs {
    position: sticky;
    top: 0;
    background: #f8f8ef;
    z-index: 2;
  }
  .code-editor {
    min-height: 450px;
  }
  #mobile-objects {
    display: block;
    max-width: 130px;
    min-width: 0;
    padding: 6px;
    background: #f4f8eb;
    border: 1px solid #cfdec0;
    font-size: 10px;
    border-radius: 4px;
  }
  .stage-toolbar #save-view {
    margin-left: auto;
  }
  .export-card {
    padding: 20px;
  }
  .pg-header .button {
    font-size: 10px;
  }
  .pg-header .quiet-button {
    font-size: 10px;
  }
}
.field-section .vector-label {
  font: 9px var(--mono);
  color: #839873;
  margin: 0 0 8px;
}
.inspector-actions {
  position: sticky;
  bottom: -20px;
  background: #f8f8ef;
  border-top: 1px solid #d9e3cd;
  padding: 13px 0 5px;
  z-index: 1;
}
