:root {
  font-family:"Segoe UI",system-ui,sans-serif;
  color:#293a35;
  background:#ecefe9;
  font-size:13px;
  --ink:#233d38;
  --line:#dce1d9;
  --muted:#78837a;
  --accent:#bd794e;
  --paper:#fafbf7;
  --green:#e8eedf
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  height:100vh;
  overflow:hidden;
  display:flex;
  flex-direction:column
}
button,input,select {
  font:inherit
}
button {
  border:1px solid transparent;
  background:transparent;
  color:inherit;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:7px 10px;
  border-radius:5px;
  cursor:pointer;
  white-space:nowrap
}
button:hover {
  background:#e8ece4
}
button:disabled {
  opacity:.3;
  cursor:default
}
button:focus-visible,input:focus-visible,select:focus-visible {
  outline:2px solid #8ca691;
  outline-offset:2px
}
.primary {
  background:var(--ink);
  color:white;
  border-color:var(--ink)
}
.primary:hover {
  background:#3b554c
}
input,select {
  color:inherit;
  border:1px solid var(--line);
  border-radius:5px;
  background:white;
  padding:8px;
  min-width:0
}
input[type=checkbox] {
  accent-color:var(--ink);
  width:13px;
  height:13px;
  margin:0 5px 0 0;
  vertical-align:middle
}
.topbar {
  height:76px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  gap:18px;
  padding:0 22px;
  background:#fcfdf9;
  border-bottom:1px solid var(--line)
}
.brand {
  display:flex;
  align-items:center;
  gap:9px;
  text-decoration:none;
  color:var(--ink)
}
.brand>span {
  font-size:24px;
  font-weight:650;
  line-height:1.1;
  letter-spacing:-1px
}
.brand small {
  display:block;
  font-size:8px;
  font-weight:600;
  letter-spacing:2px;
  margin-top:6px
}
.brand-dot {
  color:var(--accent)
}
.divider {
  height:28px;
  border-left:1px solid var(--line);
  margin:0 4px
}
.project-title {
  font-size:14px;
  font-weight:600;
  max-width:250px;
  overflow:hidden;
  text-overflow:ellipsis
}
.quiet {
  color:var(--muted);
  font-size:11px
}
.top-actions {
  margin-left:auto;
  display:flex;
  gap:8px
}
.icon-button {
  padding:8px
}
.ribbon {
  height:106px;
  flex-shrink:0;
  background:var(--paper);
  border-bottom:1px solid var(--line);
  position:relative;
  padding:0 20px
}
.discipline-tabs {
  display:flex;
  gap:22px;
  height:35px
}
.discipline-tabs button {
  border-radius:0;
  padding:0 1px;
  font-size:12px;
  color:var(--muted)
}
.discipline-tabs button.active {
  color:var(--ink);
  font-weight:650;
  border-bottom:2px solid var(--ink)
}
.ribbon-right {
  position:absolute;
  right:20px;
  top:3px;
  display:flex;
  align-items:center;
  gap:3px
}
.ribbon-right button {
  font-size:11px;
  padding:5px 8px
}
.ribbon-right .divider {
  height:20px
}
.tools {
  height:70px;
  display:flex;
  align-items:center;
  gap:7px;
  overflow-x:auto
}
.tool {
  min-width:62px;
  height:55px;
  flex-direction:column;
  gap:5px;
  font-size:10px;
  padding:6px 10px
}
.tool svg {
  width:22px;
  height:22px
}
.tool.active {
  background:#e3ebdf;
  color:var(--ink);
  border:1px solid #c7d5c2
}
.tool-separator {
  border-left:1px solid var(--line);
  height:36px;
  margin:0 6px
}
.tool-option {
  font-size:11px;
  color:var(--muted);
  margin-left:14px
}
.tool-option input {
  vertical-align:middle
}
.workspace {
  display:flex;
  flex:1;
  min-height:0
}
.library-panel {
  width:232px;
  background:#fcfdf9;
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column;
  flex-shrink:0;
  padding:17px 14px 0;
  overflow:auto
}
.panel-label {
  font-size:9px;
  font-weight:650;
  letter-spacing:1.8px;
  color:#7d897d;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:23px
}
.panel-label button {
  padding:0 2px
}
.section-label {
  margin-top:23px;
  margin-bottom:9px
}
.story-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:7px 0;
  font-size:12px
}
.story-heading button {
  padding:3px
}
.story {
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  text-align:left;
  font-size:12px;
  padding:10px;
  margin-bottom:4px
}
.story.active {
  background:#e8eedf;
  color:#354e3b;
  font-weight:600
}
.story small {
  font-size:10px;
  color:var(--muted);
  font-weight:400
}
.layer {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  padding:6px 2px
}
.layer .layer-dot {
  width:7px;
  height:7px;
  border-radius:2px;
  margin-left:auto
}
.library-panel input[type=search] {
  font-size:10px;
  padding:9px;
  width:100%
}
.category-tabs {
  display:flex;
  flex-wrap:wrap;
  gap:2px;
  margin:10px 0
}
.category-tabs button {
  font-size:9px;
  padding:5px 6px
}
.category-tabs .active {
  background:var(--green)
}
.library-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  padding-bottom:18px
}
.library-card {
  border:1px solid var(--line);
  border-radius:6px;
  min-height:85px;
  flex-direction:column;
  padding:9px 5px;
  font-size:9px;
  white-space:normal;
  line-height:1.4;
  text-align:center;
  background:#fafbf7
}
.library-card:hover,.library-card.active {
  background:#e8eedf;
  border-color:#9eaf98
}
.library-card svg {
  width:51px;
  height:36px;
  color:#647968
}
.library-foot {
  font-size:9px;
  color:#859081;
  line-height:1.8;
  padding:14px 0;
  margin-top:auto;
  border-top:1px solid var(--line)
}
.library-foot>span:last-child {
  display:block;
  padding-left:13px
}
.live-dot {
  display:inline-block;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#82a079;
  vertical-align:middle;
  margin-right:5px
}
.drawing-area {
  display:flex;
  flex-direction:column;
  flex:1;
  min-width:0
}
.viewbar {
  height:45px;
  flex-shrink:0;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#f4f6ef;
  padding:0 14px
}
.view-tabs {
  display:flex;
  gap:3px
}
.view-tabs button {
  font-size:11px;
  padding:6px 10px
}
.view-tabs button.active {
  background:#fff;
  border:1px solid var(--line);
  box-shadow:0 1px 3px #20332c08
}
.view-controls {
  display:flex;
  align-items:center;
  gap:6px
}
.view-controls select {
  font-size:10px;
  background:transparent;
  border:0;
  padding:5px
}
.pane {
  position:relative;
  overflow:hidden;
  min-width:0;
  min-height:0
}
#views {
  flex:1;
  display:flex;
  min-height:0
}
#plan-pane {
  flex:1;
  background:#f5f4ee
}
#model-pane {
  flex:1;
  display:none;
  background:#e3e8e5
}
#views[data-mode='3d'] #plan-pane {
  display:none
}
#views[data-mode='3d'] #model-pane,#views[data-mode='split'] #model-pane {
  display:block
}
#views[data-mode='split'] #plan-pane {
  border-right:1px solid #bfcabf
}
.pane-label {
  position:absolute;
  z-index:2;
  top:18px;
  left:22px;
  right:22px;
  display:flex;
  justify-content:space-between;
  pointer-events:none;
  font-size:9px;
  letter-spacing:1.3px;
  color:#7b8678
}
.pane-label span:first-child {
  color:#3f5549;
  font-weight:600
}
#plan,#viewport {
  width:100%;
  height:100%;
  display:block;
  outline:none;
  touch-action:none
}
#plan {
  user-select:none;
  cursor:crosshair
}
#plan .entity {
  cursor:pointer
}
#plan text {
  font-family:"Segoe UI",system-ui,sans-serif;
  user-select:none
}
#plan .selected {
  stroke:#b46d3e!important
}
#plan .dimension text {
  fill:#627060
}
#plan .dimension.selected text {
  fill:#b46d3e
}
#plan .wall {
  stroke-linecap:square
}
#plan .handle {
  fill:#fff;
  stroke:#b46d3e;
  cursor:move
}
#plan .draft {
  fill:#c98c5420;
  stroke:#b67447;
  stroke-dasharray:.1 .07;
  pointer-events:none
}
.compass {
  position:absolute;
  top:65px;
  right:26px;
  display:flex;
  flex-direction:column;
  align-items:center;
  color:#677565;
  gap:4px;
  font-size:9px;
  pointer-events:none
}
.plan-controls {
  position:absolute;
  bottom:22px;
  left:22px;
  background:#fffffff0;
  border:1px solid var(--line);
  border-radius:5px;
  display:flex
}
.plan-controls button {
  padding:8px
}
.plan-controls button+button {
  border-left:1px solid var(--line);
  border-radius:0
}
#scale-bar {
  position:absolute;
  right:24px;
  bottom:25px;
  border:solid #73806e;
  border-width:0 1px 2px;
  text-align:center;
  font-size:9px;
  line-height:20px;
  color:#73806e;
  pointer-events:none
}
.model-controls {
  position:absolute;
  bottom:48px;
  left:14px;
  right:14px;
  display:flex;
  gap:9px;
  align-items:center;
  justify-content:center;
  background:#f9fcf6ed;
  border:1px solid #d6dfd3;
  border-radius:6px;
  padding:7px;
  font-size:10px
}
.model-controls label {
  white-space:nowrap
}
.model-controls button {
  padding:3px 5px
}
.orbit-hint {
  position:absolute;
  bottom:18px;
  left:0;
  right:0;
  text-align:center;
  font-size:9px;
  color:#698070;
  pointer-events:none
}
#graphics-error {
  position:absolute;
  top:30%;
  left:10%;
  right:10%;
  background:white;
  padding:20px;
  border:1px solid var(--line);
  border-radius:10px
}
.instruction-bar {
  height:34px;
  background:#fafbf7;
  border-top:1px solid var(--line);
  font-size:10px;
  color:#788373;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 14px;
  gap:16px
}
.snap-state {
  display:flex;
  gap:14px;
  white-space:nowrap
}
.inspector-panel {
  width:256px;
  flex-shrink:0;
  background:#fcfdf9;
  border-left:1px solid var(--line);
  padding:17px 18px;
  display:flex;
  flex-direction:column;
  overflow:auto
}
.inspector-panel .panel-label span {
  font-size:8px;
  letter-spacing:1px
}
.inspector-title {
  font-family:Georgia,serif;
  font-size:25px;
  font-weight:400;
  line-height:1.25;
  margin:22px 0 6px;
  overflow-wrap:anywhere
}
.inspector-subtitle {
  color:#849080;
  font-size:10px;
  margin:0 0 23px
}
.metric-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px 9px;
  margin:22px 0
}
.metric strong {
  font-size:18px;
  font-weight:500;
  display:block;
  letter-spacing:-.4px
}
.metric span {
  font-size:9px;
  color:var(--muted);
  display:block;
  margin-top:5px
}
.property-section {
  font-size:9px;
  color:#849080;
  letter-spacing:1.3px;
  margin:23px 0 12px
}
.field {
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0 0 13px;
  font-size:10px;
  color:#74816f
}
.field input,.field select {
  width:100%;
  font-size:12px;
  padding:8px;
  color:#334638
}
.field-pair {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px
}
.inspector-actions {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin:20px 0
}
.inspector-actions button {
  font-size:10px;
  border:1px solid var(--line)
}
.property-note {
  font-size:10px;
  line-height:1.7;
  color:#7d8976;
  background:#f0f4e9;
  padding:12px;
  border-radius:5px
}
.project-note {
  border-top:1px solid var(--line);
  padding-top:20px;
  margin-top:auto;
  color:#9ca48e
}
.project-note>span {
  font-size:8px;
  letter-spacing:1.6px
}
.project-note p {
  font:19px/1.6 Georgia,serif;
  color:#86947e
}
.project-note button {
  font-size:10px;
  padding:0;
  justify-content:space-between;
  width:100%;
  color:#63795c
}
.statusbar {
  height:28px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 18px;
  border-top:1px solid var(--line);
  background:#eff3e9;
  font-size:9px;
  color:#75826c
}
.version {
  margin-left:8px;
  color:#96a38c
}
#loading {
  position:fixed;
  inset:0;
  background:#f6f7f0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  color:var(--ink)
}
#loading[hidden] {
  display:none
}
.loading-logo {
  font-size:50px;
  font-weight:600;
  letter-spacing:-3px
}
#loading p {
  color:var(--muted);
  font-size:12px
}
#toast {
  position:fixed;
  bottom:50px;
  left:50%;
  transform:translateX(-50%);
  background:var(--ink);
  color:#f6f8f0;
  padding:13px 22px;
  box-shadow:0 4px 24px #11251e22;
  border-radius:7px;
  z-index:200;
  max-width:600px;
  font-size:12px
}
dialog {
  width:min(760px,90vw);
  border:1px solid #b6c4af;
  border-radius:12px;
  padding:26px;
  max-height:85vh;
  color:var(--ink);
  background:#fcfdf8;
  box-shadow:0 25px 90px #10291c44
}
dialog::backdrop {
  background:#10241955;
  backdrop-filter:blur(3px)
}
.dialog-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:22px
}
.dialog-heading h2 {
  font:28px Georgia,serif;
  margin:0
}
.dialog-heading button {
  padding:6px
}
#dialog-body p {
  line-height:1.8;
  font-size:12px;
  color:#72806b
}
.dialog-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:22px
}
.starter-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-bottom:25px
}
.starter {
  flex-direction:column;
  padding:20px 8px;
  border:1px solid var(--line);
  gap:12px;
  background:#f1f5e9;
  font-size:12px
}
.starter svg {
  width:62px;
  height:45px
}
.starter small {
  color:var(--muted);
  font-size:10px
}
.schedule-wrap {
  max-height:55vh;
  overflow:auto
}
.schedule-table {
  border-collapse:collapse;
  width:100%;
  font-size:10px
}
.schedule-table th {
  position:sticky;
  top:0;
  background:#eaf0e2;
  text-align:left;
  white-space:nowrap
}
.schedule-table th,.schedule-table td {
  padding:10px 9px;
  border-bottom:1px solid var(--line)
}
.schedule-table td:nth-child(2) {
  min-width:150px
}
.help-keys {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:20px;
  font-size:12px
}
.help-keys kbd {
  font:10px monospace;
  background:#e8eedf;
  padding:3px 6px;
  border-radius:3px;
  margin-right:8px
}
@media(max-width:1200px) {
  .library-panel {
    width:194px;
    padding:14px 10px 0
  }
  .inspector-panel {
    width:224px;
    padding:14px
  }
  .topbar {
    gap:10px;
    padding:0 15px
  }
  #save-status {
    display:none
  }
  .instruction-bar #coordinates {
    display:none
  }
  .ribbon {
    padding:0 12px
  }
  .tool {
    min-width:54px;
    padding:6px
  }
  .model-controls {
    gap:5px;
    flex-wrap:wrap
  }
  #views[data-mode=split] .pane-label span:last-child {
    display:none
  }
}
@media(max-width:900px) {
  .library-panel {
    width:160px
  }
  .inspector-panel {
    width:195px
  }
  .brand small {
    display:none
  }
  .brand>span {
    font-size:20px
  }
  .topbar {
    height:60px
  }
  .project-title {
    max-width:140px
  }
  .top-actions button {
    font-size:0;
    gap:0
  }
  .ribbon-right button {
    font-size:0;
    gap:0
  }
  .instruction-bar .snap-state {
    display:none
  }
  .view-tabs button {
    font-size:0;
    gap:0
  }
  .view-controls select {
    max-width:80px
  }
  .library-card {
    font-size:8px
  }
  .project-note {
    display:none
  }
  .pane-label {
    left:12px;
    right:12px
  }
}
@media print {
  body {
    height:auto;
    overflow:visible
  }
  .topbar,.ribbon,.library-panel,.inspector-panel,.statusbar,.viewbar,.instruction-bar,.pane-label,.plan-controls,.model-controls,.orbit-hint,#toast,.compass,#scale-bar {
    display:none!important
  }
  .workspace,.drawing-area,#views,#plan-pane {
    display:block!important;
    width:100%;
    height:180mm
  }
  #model-pane {
    display:none!important
  }
  #plan {
    width:100%;
    height:180mm
  }
  .handle,.draft {
    display:none
  }
}
#print-sheet { display: none; }
@media print {
  body > * { display: none !important; }
  #print-sheet { display: block !important; width: max-content; background: white; }
  #print-sheet h1 { font: 18pt Georgia, serif; margin: 0 0 3mm; }
  #print-sheet p { font: 9pt 'Segoe UI', sans-serif; margin: 0 0 8mm; }
  #print-sheet svg { display: block; max-width: none; }
}
.pane-label select {
  pointer-events: auto;
  font-size: 10px;
  padding: 5px 8px;
  border: 1px solid #cbd6c8;
  background: #f7faf2e8;
  color: #51674e;
}
