* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f5f4ef;
  color: #294439;
  font-family:
    system-ui,
    -apple-system,
    "PingFang SC",
    sans-serif;
  font-size: 14px;
}
header {
  height: 88px;
  border-bottom: 1px solid #dedfd6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  background: #fbfaf7;
}
.brand {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: 4px;
}
.brand span {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 2px;
  color: #859080;
  margin-left: 16px;
}
.top-note {
  color: #8c9788;
  font-size: 11px;
  letter-spacing: 3px;
}
.mode {
  color: #587462;
  border: 1px solid #cdd8c9;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 12px;
}
main {
  display: flex;
  min-height: calc(100vh - 88px);
}
aside {
  width: 292px;
  flex-shrink: 0;
  padding: 32px 28px;
  border-right: 1px solid #dedfd6;
  background: #faf9f5;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #8f9b89;
  margin: 0 0 12px;
}
h1 {
  font-size: 32px;
  line-height: 1.4;
  font-weight: 550;
  letter-spacing: 1px;
  margin: 18px 0;
}
p.muted {
  font-size: 12px;
  color: #8a9384;
  line-height: 1.9;
}
h2 {
  font-size: 15px;
  font-weight: 550;
  margin: 30px 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
h2 span {
  color: #8a9b81;
}
.catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
button,
.import {
  cursor: pointer;
  border: 1px solid #dce1d6;
  border-radius: 8px;
  background: #fff;
  color: #365642;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 12px;
  transition: background 0.15s;
}
button:hover,
.import:hover {
  background: #e7eee3;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
.catalog button {
  text-align: left;
  height: 57px;
}
.catalog button small {
  display: block;
  font-size: 9px;
  color: #96a28b;
  margin-top: 4px;
}
.aside-foot {
  color: #929d8b;
  font-size: 10px;
  line-height: 1.9;
  margin-top: 34px;
}
.workspace {
  flex: 1;
  padding: 32px 36px 20px;
  min-width: 0;
}
.workspace-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.workspace-top h2 {
  font-size: 23px;
  justify-content: flex-start;
  gap: 12px;
  margin: 0;
}
.tag {
  font-size: 10px;
  border: 1px solid #d4dfcf;
  padding: 4px 7px;
  border-radius: 5px;
}
.actions,
.row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.primary {
  background: #2d7055;
  color: white;
  border-color: #2d7055;
  padding: 11px 22px;
}
.primary:hover {
  background: #235c45;
}
.canvas-wrap {
  position: relative;
  border: 1px solid #d8dfd1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 40px #4a664608;
  height: calc(100vh - 275px);
  min-height: 350px;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.zoom {
  position: absolute;
  right: 16px;
  bottom: 18px;
  display: flex;
  gap: 5px;
  background: #fff;
  padding: 5px;
  border: 1px solid #e2e7dd;
  border-radius: 10px;
}
.zoom button {
  border: 0;
  background: none;
}
.empty {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 32%;
  text-align: center;
  color: #86967d;
}
.empty span {
  font-size: 52px;
  font-weight: 100;
}
.empty h3 {
  font-size: 18px;
  font-weight: 400;
}
.empty p {
  font-size: 12px;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  font-size: 11px;
  color: #8b9b80;
}
.dims {
  display: flex;
  gap: 8px;
  align-items: center;
}
label {
  font-size: 10px;
  color: #85917c;
}
input[type="number"] {
  width: 90px;
  padding: 9px;
  border: 1px solid #dce1d6;
  border-radius: 6px;
  display: block;
  margin: 8px 0;
  color: #34573f;
  background: white;
}
#resize {
  width: 100%;
  margin: 6px 0 8px;
}
#properties .row button {
  flex: 1;
}
.danger {
  color: #a36653;
}
#error {
  color: #a04f3e;
  font-size: 12px;
  min-height: 18px;
  margin: 0;
}
@media (max-width: 800px) {
  header {
    padding: 0 20px;
    height: 70px;
  }
  .top-note {
    display: none;
  }
  aside {
    width: 215px;
    padding: 24px 18px;
  }
  .workspace {
    padding: 24px 16px;
  }
  h1 {
    font-size: 26px;
  }
  .actions {
    gap: 4px;
  }
  .actions button {
    padding: 8px;
  }
  .workspace-top {
    align-items: flex-start;
    gap: 12px;
  }
  .workspace-top h2 {
    font-size: 18px;
  }
  .canvas-wrap {
    height: 520px;
  }
}
@media (max-width: 600px) {
  main {
    display: flex;
    flex-direction: column;
  }
  aside {
    width: auto;
    border-right: 0;
    padding-bottom: 0;
  }
  aside h1,
  .muted,
  .aside-foot {
    display: none;
  }
  .catalog {
    display: flex;
    flex-wrap: wrap;
  }
  .catalog button {
    height: auto;
  }
  h2 {
    margin: 12px 0;
  }
  header .brand span {
    display: none;
  }
  .workspace-top {
    flex-wrap: wrap;
  }
  .canvas-wrap {
    height: 430px;
  }
  footer {
    flex-wrap: wrap;
    gap: 12px;
  }
}

[hidden] {
  display: none !important;
}
.catalog {
  max-height: 380px;
  overflow: auto;
  padding: 2px;
}
.catalog button {
  height: 110px;
  text-align: center;
  padding: 8px 3px;
}
.catalog img {
  display: block;
  width: 80px;
  height: 65px;
  object-fit: contain;
  margin: auto;
}
.catalog button:has(img):hover {
  box-shadow: 0 3px 12px #37533420;
}
#scene {
  position: absolute;
  inset: 0;
}
aside h1 {
  font-size: 25px;
  margin: 12px 0;
}
aside {
  padding-top: 22px;
}
.top-note {
  letter-spacing: 1px;
}
.actions {
  flex-wrap: wrap;
}
.aside-foot a {
  color: #49725d;
}

#search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dce1d6;
  border-radius: 8px;
  padding: 10px;
  background: white;
  margin-bottom: 10px;
}
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}
.categories button {
  padding: 6px 8px;
  font-size: 11px;
}
.categories button.active {
  background: #2d7055;
  color: white;
}
#catalogEmpty,
#wallNotice {
  font-size: 12px;
  color: #7b8871;
}
#markWall {
  margin-top: 10px;
  width: 100%;
}

.export-dialog {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #18342699;
  display: grid;
  place-items: center;
  padding: 24px;
}
.export-dialog section {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  max-width: 880px;
  max-height: 94vh;
  overflow: auto;
}
.export-dialog .row {
  justify-content: space-between;
}
.export-dialog h2 {
  margin: 0;
}
.export-dialog img {
  display: block;
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  margin-top: 14px;
}
.export-dialog a {
  display: inline-block;
  text-decoration: none;
  border-radius: 8px;
}
.export-dialog p {
  font-size: 12px;
  color: #65756a;
}

.workflow {
  padding: 18px 0;
  border-bottom: 1px solid #dce1d6;
}
.workflow .eyebrow {
  margin: 18px 0 10px;
}
.upload {
  display: block;
  text-align: center;
  background: #2d7055;
  color: white;
}
.hint {
  font-size: 11px;
  color: #748574;
  line-height: 1.7;
}
.workflow input:not([type="file"]):not([type="range"]),
#objectName {
  display: block;
  width: 100%;
  border: 1px solid #dce1d6;
  border-radius: 6px;
  padding: 9px;
  margin: 7px 0;
  color: #34573f;
}
.workflow .dims label {
  flex: 1;
  min-width: 0;
}
#imageOpacity {
  display: block;
  width: 100%;
}
#imageName {
  overflow-wrap: anywhere;
  font-size: 12px;
}
#roomList {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
#roomList .active {
  background: #dcebe1;
}
.workflow .row button {
  flex: 1;
}
.workflow ~ .catalog {
  max-height: 280px;
}
#properties {
  padding: 12px;
  background: #edf2e9;
  border-radius: 10px;
  margin-top: 18px;
}
@media (min-width: 601px) {
  main {
    height: calc(100vh - 88px);
    min-height: 0;
  }
  aside {
    overflow-y: auto;
  }
  .workspace {
    overflow-y: auto;
  }
  .canvas-wrap {
    min-height: 350px;
  }
}
@media (min-width: 601px) and (max-width: 800px) {
  main {
    height: calc(100vh - 70px);
  }
}

.workflow > button {
  margin: 4px 0;
  width: 100%;
}
select {
  padding: 9px;
  border: 1px solid #dce1d6;
  border-radius: 6px;
  color: #34573f;
  background: white;
}
dialog {
  border: 0;
  border-radius: 18px;
  padding: 26px;
  max-width: 960px;
  width: 90vw;
  max-height: 90vh;
  color: #294439;
}
dialog::backdrop {
  background: #17332699;
}
dialog .row {
  justify-content: space-between;
}
dialog h2 {
  margin: 0;
}
dialog p {
  font-size: 12px;
  line-height: 1.7;
  color: #758272;
}
#templateGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 18px 0;
}
#templateGrid button {
  text-align: left;
  padding: 14px;
}
#templateGrid img {
  width: 100%;
  height: 145px;
  object-fit: contain;
  display: block;
  margin-bottom: 12px;
}
#templateGrid strong,
#templateGrid span {
  display: block;
  margin-top: 5px;
}
#templateGrid span {
  font-size: 11px;
  color: #83937b;
}
#templateError {
  color: #a04f3e;
}
@media (max-width: 600px) {
  #templateGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

#publicTemplates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
#publicTemplates img {
  width: 100%;
  height: 120px;
  object-fit: contain;
}
#publicTemplates span {
  display: block;
}
#cloudDialog input:not([type="checkbox"]) {
  border: 1px solid #dce1d6;
  border-radius: 6px;
  padding: 9px;
  margin: 8px;
  max-width: 90%;
}
#mySubmissions > div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  padding: 10px;
}
#cloudError {
  color: #a04f3e;
}
#cloudMessage {
  color: #2d7055;
}
#cloudPolicies details {
  max-height: 220px;
  overflow: auto;
  background: #f4f5ef;
  padding: 12px;
  margin: 8px 0;
}
#cloudPolicies p {
  white-space: pre-wrap;
}

.cad-controls{background:#edf3ee;border:1px solid #d5e3d8;border-radius:12px;padding:14px;margin-bottom:18px}.cad-controls h3{margin:16px 0 8px}.cad-controls input[type=checkbox]{width:auto;display:inline-block;margin-right:8px}.cad-controls p{font-size:12px;line-height:1.6}.cad-controls button{margin:4px 0}.cad-controls select{width:100%;padding:8px;border:1px solid #bfcfc3;border-radius:6px}#airPaths p{margin:4px 0;color:#376456}
