@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --stage: #fafafa;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --accent: #0a0a0a;
  --accent-hover: #262626;
  --soft: #f4f4f4;
  --error: #994d3c;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif;
  --mono: "Geist Mono", "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 14px/1.7 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 9px 14px; border: 0; border-radius: 0; background: transparent; cursor: pointer; transition: background .2s, color .2s, transform .2s cubic-bezier(.16,1,.3,1); }
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .4; cursor: not-allowed; }
button:hover:not(:disabled) { background: var(--soft); }
button:focus-visible, a:focus-visible, label[tabindex]:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #0a0a0a40; outline-offset: 1px; border-color: var(--accent); }
a { text-decoration: none; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.4; font-weight: 570; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }
p { color: var(--muted); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.ui-icon { display: block; width: 19px; height: 19px; flex-shrink: 0; }
.primary { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.outline { border: 1px solid #dcdcdc; }
.icon-button { width: 42px; flex-shrink: 0; padding: 10px; }
.text-button { padding-inline: 10px; }
.link-button { min-height: 28px; padding: 0; border-bottom: 1px solid #b8b8b8; border-radius: 0; }
.eyebrow { display: block; font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.small-note { font-size: 11px; line-height: 1.8; color: var(--muted); }
.app-header { display: flex; align-items: center; gap: 30px; justify-content: space-between; height: 74px; padding: 0 30px; border-bottom: 1px solid var(--line); background: var(--paper); }
.brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
.brand-mark { width: 35px; height: 35px; }
.brand strong { font-size: 25px; font-weight: 600; letter-spacing: -.07em; }
.brand-sub { border-left: 1px solid #dcdcdc; padding-left: 14px; font-size: 12px; letter-spacing: .04em; line-height: 1.4; }
.brand-sub small { display: block; font-size: 8px; letter-spacing: .27em; margin-top: 4px; }
.header-project { border-left: 1px solid var(--line); padding-left: 28px; min-width: 0; margin-right: auto; }
.header-project .eyebrow { font-size: 8px; margin-bottom: 3px; }
.header-project strong { font-size: 12px; font-weight: 500; display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 40ch; }
.header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header-actions button { font-size: 12px; }
.connection { font-size: 10px; color: var(--muted); }
.studio { height: calc(100dvh - 74px); display: flex; flex-direction: column; }
.mobile-tabs { display: none; }
.workbench { display: grid; grid-template-columns: minmax(380px, .86fr) minmax(0, 1.2fr); flex: 1; min-height: 0; }
/* Conversation is the primary entry, including every photo and follow-up. */
.chat-panel { display: flex; flex-direction: column; min-height: 0; padding: 32px 32px 15px; background: var(--surface); border-right: 1px solid var(--line); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading .eyebrow { margin-bottom: 12px; font-size: 9px; }
.panel-heading h1 { font-size: clamp(20px, 1.8vw, 28px); font-weight: 550; }
.panel-heading p { font-size: 12px; margin-top: 10px; }
.panel-heading > button { color: var(--accent); opacity: .7; }
.messages { flex: 1; min-height: 0; overflow: auto; padding: 32px 5px 0 0; margin-top: 6px; scrollbar-width: thin; }
.message { margin-bottom: 25px; animation: enter .3s cubic-bezier(.16,1,.3,1) both; }
.message-name { display: block; font-size: 10px; color: var(--accent); margin-bottom: 9px; font-weight: 600; }
.message p { color: var(--ink); font-size: 14px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.assistant p { border-left: 2px solid #161616; padding-left: 15px; }
.message.user p { background: #f4f4f4; padding: 14px 17px; border-radius: 0; }
.message.user .message-name { color: var(--muted); }
.intro-message p { font-size: 20px; line-height: 1.8; font-weight: 450; max-width: 30ch; }
.message-image { display: block; width: auto; max-width: 100%; max-height: 150px; object-fit: contain; object-position: left; margin-bottom: 12px; border-radius: 0; }
.error-message p { color: var(--error); border-left: 2px solid var(--error); padding-left: 12px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; max-height: 93px; overflow: auto; flex-shrink: 0; padding: 5px 0; }
.suggestions button { background: #fafafa; text-align: left; min-height: 32px; padding: 6px 11px; font-size: 11px; line-height: 1.5; }
.source-card { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 0; }
.source-card img { width: 58px; height: 48px; object-fit: cover; border-radius: 0; }
.source-card > div { flex: 1; min-width: 0; }
.source-card b { display: block; font-size: 11px; max-width: 30ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.source-card span { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.source-card .icon-button { width: 30px; min-height: 36px; padding: 5px; }
.drop-hint { display: flex; align-items: center; gap: 7px; padding: 10px 0; color: var(--muted); font-size: 10px; flex-shrink: 0; }
.drop-hint > .ui-icon { width: 14px; height: 14px; }
.drop-hint .link-button { font-size: 10px; margin-left: auto; }
.drop-hint.dragging { background: var(--soft); outline: 1px dashed var(--accent); }
.chat-panel form { padding: 15px; border: 1px solid #b8b8b8; border-radius: 0; flex-shrink: 0; background: var(--surface); }
.chat-panel form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px #0a0a0a0a; }
.chat-panel textarea { width: 100%; min-height: 61px; max-height: 150px; padding: 0; border: 0; background: transparent; font-size: 14px; resize: none; line-height: 1.8; }
.chat-panel textarea:focus { outline: none; }
.composer-bottom { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.image-entry { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; cursor: pointer; font-size: 11px; padding-inline: 5px; border-radius: 0; color: var(--accent); }
.image-entry:hover { background: var(--soft); }
.image-entry .ui-icon { width: 18px; height: 18px; }
.keyboard-hint { font-size: 9px; color: var(--muted); margin-left: auto; }
#send { height: 42px; width: 48px; min-height: 42px; padding: 9px; }
#status { margin-top: 10px; font-size: 10px; line-height: 1.65; min-height: 16px; }
.privacy-note { font-size: 9px; line-height: 1.5; color: var(--muted); margin-top: 4px; }
.error { color: var(--error) !important; }
/* A single model page contains both the geometry and the editable parameter dock. */
.task-area { min-width: 0; min-height: 0; }
.canvas-panel { display: flex; flex-direction: column; height: 100%; background: var(--stage); }
.canvas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 25px 12px; flex-shrink: 0; }
.canvas-toolbar .eyebrow { font-size: 8px; margin-bottom: 5px; }
.canvas-toolbar h2 { font-size: 13px; font-weight: 500; max-width: 30ch; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.canvas-tools { display: flex; align-items: center; gap: 10px; }
.view-controls { display: flex; border: 1px solid #dcdcdc; border-radius: 0; overflow: hidden; }
.view-controls button { border-radius: 0; padding: 5px 11px; font-size: 10px; min-height: 32px; }
.view-controls button.active { color: var(--accent); background: #ededed; }
.view-controls .icon-button { width: 32px; }
.view-controls .ui-icon { width: 14px; height: 14px; }
.canvas-tools > .icon-button { width: 34px; min-height: 34px; padding: 7px; color: var(--accent); }
.stage { flex: 1; position: relative; min-height: 160px; }
#viewer { position: absolute; inset: 0; }
#viewer canvas { width: 100%; height: 100%; display: block; touch-action: none; }
#empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 24px 35px; text-align: center; }
.empty-sketch { color: #8a8a8a; width: min(60%, 350px); height: min(48%, 180px); margin-bottom: 16px; }
#empty h2 { font-size: 23px; font-weight: 500; }
#empty p { font-size: 12px; line-height: 1.85; margin-top: 12px; max-width: 48ch; }
.empty-actions { display: flex; gap: 12px; margin-top: 16px; }
.empty-actions button { font-size: 11px; }
body[data-model=ready] #empty, body[data-model=dirty] #empty { display: none; }
body[data-model=empty] #viewer { visibility: hidden; }
.stage-corner { position: absolute; left: 25px; bottom: 12px; display: flex; gap: 14px; font: 8px var(--mono); color: var(--muted); pointer-events: none; }
.stage-help { position: absolute; right: 25px; bottom: 12px; font-size: 9px; color: var(--muted); pointer-events: none; }
.preview-state { display: flex; align-items: center; gap: 8px; position: absolute; top: 6px; left: 25px; padding: 7px 10px; background: #ffffffeb; border: 1px solid #b8b8b8; border-radius: 0; color: var(--accent); font-size: 10px; }
.preview-state .ui-icon { width: 13px; height: 13px; }
.canvas-bottom { display: flex; align-items: center; gap: 19px; padding: 10px 25px; border-block: 1px solid var(--line); flex-shrink: 0; min-height: 49px; }
.size-summary { display: flex; align-items: center; gap: 12px; }
.size-label { font-size: 9px; color: var(--muted); }
#dimensions { font: 12px var(--mono); letter-spacing: -.03em; }
.occupancy-control { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.occupancy-control input { accent-color: var(--accent); width: 13px; height: 13px; }
#geometry-state { display: none; }
#canvas-print { min-height: 28px; padding: 2px 0; margin-left: auto; font-size: 10px; white-space: nowrap; }
#canvas-print .ui-icon { width: 14px; height: 14px; }
/* Controls are real CAD parameters. Sliders and numeric fields share one value. */
.inspector-panel { display: flex; flex-direction: column; min-height: 0; flex-shrink: 0; height: clamp(280px, 36dvh, 340px); background: var(--paper); }
.dock-heading { display: flex; align-items: center; gap: 14px; padding: 15px 25px 5px; flex-shrink: 0; }
.dock-heading h2 { font-size: 16px; }
.badge { font-size: 10px; color: var(--accent); }
.dock-heading > button { margin-left: auto; min-height: 28px; font-size: 9px; padding: 2px 4px; gap: 5px; }
.dock-heading > button .ui-icon { width: 12px; height: 12px; }
.parameter-tabs { display: flex; gap: 23px; padding-inline: 25px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.parameter-tabs > button { min-height: 37px; padding: 6px 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); font-size: 11px; }
.parameter-tabs > button[aria-selected=true] { color: var(--accent); border-color: var(--accent); }
#object-count { font: 9px var(--mono); color: var(--muted); }
.inspector-scroll { flex: 1; min-height: 0; overflow: auto; padding: 17px 25px 15px; scrollbar-width: thin; }
.inspector-scroll > section { display: none; }
body[data-parameter-tab=structure] #parameters-section, body[data-parameter-tab=objects] #objects-section, body[data-parameter-tab=notes] #design-notes { display: block; }
.parameter-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 20px; }
.parameter-field { min-width: 0; position: relative; }
.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 3px; margin-bottom: 7px; }
.field-heading label { font-size: 10px; color: var(--muted); cursor: pointer; }
.field-reset { width: 25px; height: 25px; min-height: 25px; padding: 5px; opacity: .65; }
.field-reset .ui-icon { width: 12px; height: 12px; }
.parameter-value { display: flex; align-items: center; position: relative; }
.parameter-value > span { position: absolute; right: 11px; top: 8px; font-size: 9px; color: var(--muted); pointer-events: none; }
.parameter-value input, .parameter-value select { width: 100%; border: 1px solid #dcdcdc; background: transparent; border-radius: 0; min-height: 38px; font: 15px var(--mono); padding: 8px 28px 8px 10px; }
.parameter-value select { font: 11px var(--sans); padding-right: 4px; }
.parameter-value input::-webkit-inner-spin-button { appearance: none; }
.parameter-field input[type=range] { width: 100%; height: 24px; margin: 7px 0 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
.parameter-field small { display: block; font: 8px/1.2 var(--mono); color: var(--muted); }
.field-error { display: block; font-size: 10px; color: var(--error); line-height: 1.5; margin-top: 5px; }
[aria-invalid=true] { border-color: var(--error) !important; background: #994d3c08 !important; }
.inspector-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); padding: 12px 25px; flex-shrink: 0; background: var(--paper); }
.inspector-action > p { font-size: 10px; line-height: 1.65; max-width: 47ch; }
.inspector-action > button { min-width: 150px; font-size: 12px; }
.inspector-empty p { font-size: 11px; margin-bottom: 20px; }
.empty-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.empty-fields span { color: var(--muted); font-size: 10px; }
.empty-fields i { display: block; border: 1px solid var(--line); border-radius: 0; height: 34px; margin-top: 9px; background: #f4f4f4; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.section-heading > span { color: var(--accent); font-size: 9px; }
.object-card { padding: 15px 0; border-bottom: 1px solid var(--line); }
.object-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.object-number { font: 11px var(--mono); color: var(--accent); min-width: 15px; }
.object-name { flex: 1; min-width: 0; background: transparent; border: 0; border-bottom: 1px solid transparent; font-size: 12px; font-weight: 500; padding: 5px 0; }
.object-name:focus { border-bottom-color: var(--accent); outline: none; }
.remove-object { padding: 4px; width: 28px; min-height: 28px; color: var(--muted); }
.remove-object .ui-icon { width: 13px; height: 13px; }
.object-form { display: grid; grid-template-columns: 1.3fr .65fr 1fr 1fr; gap: 13px; }
.object-form label, .select-label { display: flex; flex-direction: column; gap: 7px; font-size: 10px; color: var(--muted); }
.object-form input, .object-form select, .select-label select { width: 100%; background: transparent; border: 1px solid #dcdcdc; border-radius: 0; min-height: 38px; padding: 8px 10px; font: 14px var(--mono); color: var(--ink); }
.object-form select, .select-label select { font: 11px var(--sans); padding-right: 4px; }
.object-form input[readonly] { opacity: .55; background: #f4f4f4; }
#add-object { min-height: 35px; font-size: 10px; padding: 8px 0; }
#add-object .ui-icon { width: 14px; height: 14px; }
#design-notes > p { font-size: 12px; }
.metrics { padding: 12px 0; font-size: 10px; color: var(--muted); display: flex; flex-direction: column; gap: 7px; }
.metrics b { color: var(--ink); font: 13px var(--mono); }
details { font-size: 11px; border-top: 1px solid var(--line); padding: 12px 0; }
summary { min-height: 25px; cursor: pointer; color: var(--muted); }
details li { color: var(--muted); margin-top: 8px; line-height: 1.8; }
body[data-dock=closed] .inspector-panel { display: none; }
.stage-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; background: #fafafaf0; z-index: 2; }
.stage-overlay h2 { font-size: 19px; }
.stage-overlay p { margin-top: 10px; font-size: 11px; }
.model-skeleton { display: flex; gap: 10px; height: 85px; align-items: flex-end; transform: skewY(-12deg); margin-bottom: 30px; }
.model-skeleton span { display: block; width: 36px; height: 55px; background: #dedede; border: 1px solid #b8b8b8; animation: breathe 1.6s ease-in-out infinite; }
.model-skeleton span:nth-child(2) { height: 75px; animation-delay: .2s; }
.model-skeleton span:nth-child(3) { height: 63px; animation-delay: .4s; }
.thinking { padding: 12px 0 20px; font-size: 11px; color: var(--accent); }
.skeleton-line { height: 7px; background: #e6e6e6; border-radius: 0; margin-top: 12px; animation: breathe 1.6s ease-in-out infinite; }
.skeleton-line:nth-child(3) { width: 83%; animation-delay: .1s; }
.skeleton-line:nth-child(4) { width: 62%; animation-delay: .2s; }
body[data-activity=chat] .suggestions, body[data-activity=chat] .drop-hint { display: none; }
body[data-activity=build] #empty, body[data-activity=build] .preview-state { visibility: hidden; }
/* Native dialog preserves focus and the model context during export. */
dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 30px; border: 1px solid #dcdcdc; border-radius: 0; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px #0a0a0a20; }
dialog::backdrop { background: #0a0a0a65; backdrop-filter: blur(3px); }
.print-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.print-heading h1 { font-size: 25px; margin-top: 10px; }
.print-heading .eyebrow { font-size: 9px; }
.print-heading .icon-button { margin: -7px -10px 0 0; }
.print-intro { font-size: 12px; margin: 18px 0 24px; line-height: 1.9; }
.printing-settings { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 22px; padding: 20px 0; border-block: 1px solid var(--line); }
.printing-settings .small-note { font-size: 10px; }
.checks { padding-top: 10px; }
.check { padding: 12px 0; border-bottom: 1px solid var(--line); }
.check b { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 550; }
.check b .ui-icon { width: 15px; height: 15px; color: var(--accent); }
.check p { font-size: 10px; margin-top: 5px; padding-left: 23px; }
.pending { display: flex; align-items: center; gap: 10px; padding: 19px 0; }
.pending .ui-icon { width: 16px; height: 16px; color: var(--accent); }
.pending p { font-size: 10px; }
.export-bar { border-top: 1px solid var(--line); padding: 20px 0; }
.export-bar h2 { font-size: 17px; }
.export-bar p { margin-top: 8px; font-size: 10px; }
.downloads { display: flex; gap: 12px; margin-top: 20px; }
.downloads button { font-size: 11px; }
.downloads .ui-icon { width: 16px; height: 16px; }
.technical pre { font: 10px/1.8 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; max-height: 250px; padding: 14px; background: var(--paper); }
.print-limit { font-size: 9px; margin-top: 12px; }
@keyframes enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 0%, 100% { opacity: .4; } 50% { opacity: .95; } }
@media (min-width: 1700px) {
  .chat-panel { padding-inline: 45px; }
  .workbench { grid-template-columns: minmax(420px,.8fr) minmax(0,1.2fr); }
  .panel-heading h1 { font-size: 30px; }
  .message p { font-size: 15px; }
}
@media (max-width: 1200px) {
  .app-header { padding-inline: 23px; gap: 22px; }
  .connection { display: none; }
  .header-project { padding-left: 22px; }
  .header-project strong { max-width: 30ch; }
  .workbench { grid-template-columns: minmax(350px,.85fr) minmax(0,1.2fr); }
  .chat-panel { padding: 27px 25px 14px; }
  .panel-heading h1 { font-size: 22px; }
  .parameter-fields { gap: 16px 15px; }
  .canvas-toolbar { padding-inline: 20px; }
  .canvas-toolbar h2 { max-width: 24ch; font-size: 12px; }
  .canvas-bottom { gap: 13px; padding-inline: 20px; }
  .size-summary { gap: 8px; }
  .size-label { display: none; }
  #dimensions { font-size: 11px; }
  .inspector-scroll, .parameter-tabs { padding-inline: 20px; }
  .dock-heading, .inspector-action { padding-inline: 20px; }
  .dock-heading { gap: 10px; }
  .dock-heading h2 { font-size: 15px; }
}
@media (max-width: 1024px) {
  .header-project { display: none; }
  .header-actions { margin-left: auto; gap: 10px; }
  .workbench { grid-template-columns: minmax(330px,.85fr) minmax(0,1.2fr); }
  .chat-panel { padding-inline: 22px; }
  .panel-heading h1 { font-size: 20px; }
  .panel-heading > button { display: none; }
  .panel-heading p { font-size: 11px; }
  .canvas-toolbar h2 { max-width: 24ch; }
  .canvas-toolbar .eyebrow { display: none; }
  .canvas-toolbar { flex-wrap: wrap; gap: 9px; padding-top: 15px; }
  .canvas-tools { margin-left: auto; }
  .parameter-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dock-heading > button { font-size: 8px; }
  .inspector-action > button { min-width: 130px; }
  .inspector-action > p { font-size: 9px; }
  #canvas-print { font-size: 9px; }
  .occupancy-control { font-size: 9px; }
  .canvas-bottom { gap: 12px; }
  #empty h2 { font-size: 20px; }
  #empty p { font-size: 11px; }
}
@media (max-width: 819px) {
  .app-header { height: 64px; padding-inline: 17px; gap: 15px; }
  .brand { gap: 9px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand strong { font-size: 22px; }
  .brand-sub { padding-left: 10px; font-size: 10px; }
  .brand-sub small { font-size: 7px; }
  .header-actions { gap: 7px; }
  .header-actions button { font-size: 10px; min-height: 40px; padding: 8px; }
  .header-actions .ui-icon { width: 14px; height: 14px; }
  .studio { height: calc(100dvh - 64px); }
  .mobile-tabs { display: flex; gap: 27px; padding-inline: 22px; border-bottom: 1px solid var(--line); flex-shrink: 0; background: var(--surface); }
  .mobile-tabs button { border-radius: 0; font-size: 12px; min-height: 44px; padding-inline: 0; border-bottom: 2px solid transparent; color: var(--muted); }
  .mobile-tabs button[aria-selected=true] { border-color: var(--accent); color: var(--accent); }
  .workbench { display: block; position: relative; }
  .chat-panel, .task-area { height: 100%; }
  body[data-mobile=chat] .task-area, body[data-mobile=task] .chat-panel { display: none; }
  .chat-panel { padding: 24px 23px 14px; border-right: 0; }
  .panel-heading h1 { font-size: 25px; }
  .panel-heading .eyebrow { font-size: 9px; }
  .panel-heading p { font-size: 12px; margin-top: 11px; }
  .messages { padding-top: 27px; }
  .message p { font-size: 14px; }
  .intro-message p { font-size: 20px; }
  .suggestions { flex-wrap: nowrap; overflow-x: auto; max-height: 45px; }
  .suggestions button { white-space: nowrap; flex-shrink: 0; }
  .source-card img { height: 42px; width: 48px; }
  .source-card { margin-top: 7px; padding: 8px 10px; }
  .chat-panel textarea { font-size: 16px; min-height: 62px; }
  .composer-bottom { margin-top: 8px; }
  .image-entry { font-size: 12px; }
  .keyboard-hint { font-size: 9px; }
  #status { font-size: 10px; }
  .privacy-note { font-size: 9px; }
  .canvas-toolbar { padding: 14px 20px 8px; flex-wrap: nowrap; gap: 10px; min-height: 57px; }
  .canvas-toolbar h2 { font-size: 11px; max-width: 27ch; }
  .canvas-tools { gap: 5px; }
  .view-controls button { min-height: 34px; padding: 6px 8px; font-size: 10px; }
  .view-controls .icon-button { width: 31px; }
  .canvas-tools > .icon-button { width: 29px; min-height: 34px; padding: 5px; }
  .stage { min-height: 160px; }
  .empty-sketch { width: 55%; height: min(42%,130px); margin-bottom: 8px; }
  #empty { padding: 0 22px 24px; }
  #empty h2 { font-size: 20px; }
  #empty p { font-size: 11px; margin-top: 9px; }
  .empty-actions { margin-top: 9px; gap: 8px; }
  .empty-actions button { min-height: 34px; font-size: 10px; padding: 6px; }
  .stage-corner { left: 20px; bottom: 10px; gap: 10px; font-size: 7px; }
  .stage-help { right: 20px; bottom: 10px; font-size: 8px; }
  .preview-state { top: 0; left: 20px; padding: 5px 8px; font-size: 9px; }
  .canvas-bottom { min-height: 46px; padding: 9px 20px; gap: 13px; flex-wrap: wrap; }
  #dimensions { font-size: 11px; }
  #canvas-print { font-size: 9px; }
  .occupancy-control { font-size: 9px; }
  .inspector-panel { height: 330px; }
  .dock-heading { padding: 12px 20px 4px; gap: 10px; }
  .dock-heading h2 { font-size: 15px; }
  .badge { font-size: 9px; }
  .dock-heading > button { font-size: 9px; }
  .parameter-tabs { padding-inline: 20px; gap: 22px; }
  .parameter-tabs > button { min-height: 36px; font-size: 11px; }
  .inspector-scroll { padding: 13px 20px; }
  .parameter-fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px 20px; }
  .field-heading label { font-size: 11px; }
  .field-reset { min-height: 28px; height: 28px; width: 28px; }
  .parameter-value input, .parameter-value select { min-height: 40px; font-size: 16px; }
  .parameter-value > span { top: 10px; font-size: 9px; }
  .parameter-field input[type=range] { height: 26px; margin-top: 5px; }
  .parameter-field small { font-size: 9px; }
  .inspector-action { padding: 11px 20px; gap: 13px; }
  .inspector-action > p { font-size: 9px; line-height: 1.6; max-width: 25ch; }
  .inspector-action > button { min-height: 44px; font-size: 12px; min-width: 136px; }
  .object-form { grid-template-columns: 1fr 1fr; gap: 14px; }
  .object-name { font-size: 13px; }
  .object-form input, .object-form select { font-size: 16px; min-height: 41px; }
  .object-form label { font-size: 11px; }
  .inspector-empty p { font-size: 11px; }
  .empty-fields { grid-template-columns: 1fr 1fr; gap: 13px 20px; }
  dialog { padding: 23px; }
  .print-heading h1 { font-size: 23px; }
  .printing-settings { grid-template-columns: 1fr; gap: 13px; }
  .select-label select { font-size: 16px; min-height: 44px; }
  .downloads { gap: 8px; flex-wrap: wrap; }
}
@media (max-width: 430px) {
  .app-header { padding-inline: 14px; gap: 10px; }
  .brand { gap: 8px; }
  .brand-sub { font-size: 9px; padding-left: 9px; }
  .brand-sub small { font-size: 6px; }
  .header-actions { gap: 1px; }
  .header-actions button { font-size: 9px; padding-inline: 6px; gap: 5px; }
  .header-actions button .ui-icon { width: 12px; height: 12px; }
  .canvas-toolbar { padding-inline: 16px; flex-wrap: wrap; gap: 8px; }
  .canvas-toolbar h2 { max-width: 22ch; }
  .canvas-bottom { padding-inline: 16px; gap: 10px; }
  .canvas-bottom .occupancy-control { margin-left: auto; }
  #canvas-print { display: none; }
  .dock-heading, .inspector-action { padding-inline: 16px; }
  .parameter-tabs, .inspector-scroll { padding-inline: 16px; }
  .panel-heading h1 { font-size: 23px; }
  .chat-panel { padding-inline: 21px; }
}
@media (min-width: 820px) and (max-height: 780px) {
  .app-header { height: 62px; }
  .studio { height: calc(100dvh - 62px); }
  .chat-panel { padding-top: 23px; }
  .panel-heading .eyebrow { margin-bottom: 8px; }
  .messages { padding-top: 24px; }
  .message { margin-bottom: 20px; }
  .chat-panel textarea { min-height: 45px; }
  .suggestions { max-height: 70px; }
  .privacy-note { font-size: 8px; }
  .inspector-panel { height: 290px; }
  .canvas-toolbar { padding-block: 15px 8px; }
  .dock-heading { padding-top: 10px; }
  .canvas-bottom { padding-block: 7px; min-height: 42px; }
  .inspector-action { padding-block: 9px; }
  .empty-sketch { height: min(44%,150px); margin-bottom: 7px; }
  #empty h2 { font-size: 20px; }
}
@media (max-width: 819px) and (max-height: 700px) {
  html, body { height: auto; min-height: 100%; overflow: auto; }
  .studio { height: auto; }
  .workbench { height: 720px; flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Reference direction: white paper, near-black ink, zero radius and fine rule grids. */
.app-header { height: 72px; border-bottom-color: #dcdcdc; padding-inline: 32px; }
.studio { height: calc(100dvh - 72px); }
.brand { gap: 20px; }
.brand strong { display: flex; align-items: center; gap: 13px; font-size: 27px; font-weight: 650; letter-spacing: -.065em; }
.brand-slash { font: 21px var(--mono); font-weight: 400; color: #6b6b6b; }
.brand-latin { font: 19px var(--mono); font-weight: 550; letter-spacing: -.05em; }
.brand-sub { border-left: 1px solid #b8b8b8; padding-left: 18px; font-size: 12px; letter-spacing: .04em; }
.brand-sub small { font: 7px var(--mono); letter-spacing: .13em; margin-top: 6px; }
.header-project { padding-left: 23px; }
.header-project strong { max-width: 26ch; font-size: 11px; }
.header-actions { gap: 12px; }
.header-actions .connection { display: none; }
.header-actions > button { min-height: 39px; padding-inline: 15px; }
.eyebrow { font-family: var(--mono); letter-spacing: .14em; font-size: 10px; text-transform: uppercase; }
.chat-panel { padding-top: 31px; }
.panel-heading { align-items: flex-start; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.panel-heading .eyebrow { color: var(--ink); margin-bottom: 17px; font-size: 10px; }
.panel-heading h1 { font-size: 32px; font-weight: 570; line-height: 1.36; letter-spacing: -.055em; }
.panel-heading p { margin-top: 15px; font-size: 12px; line-height: 1.8; }
.panel-heading > button { min-height: 32px; width: 32px; padding: 6px; border: 1px solid #dcdcdc; opacity: 1; }
.messages { padding-top: 25px; margin-top: 0; }
.message-name { font-family: var(--mono); font-size: 10px; color: var(--ink); }
.message.assistant .message-name::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--ink); }
.message.assistant p { border-left: 0; padding-left: 0; }
.message.user p { background: #f4f4f4; border-left: 1px solid #dcdcdc; }
.message p { font-size: 14px; line-height: 1.85; }
.intro-message p { font-size: 20px; line-height: 1.85; }
.suggestions { gap: 0; border-top: 1px solid var(--line); padding-block: 0; }
.suggestions button { background: transparent; border-bottom: 1px solid var(--line); font-size: 11px; padding: 9px 0; width: 100%; min-height: 35px; justify-content: space-between; }
.suggestions button::after { content: "↗"; font-family: var(--mono); margin-left: 12px; }
.chat-panel form { border-color: #a8a8a8; padding: 15px; }
.chat-panel form:focus-within { border-color: #161616; box-shadow: none; }
.image-entry { padding-inline: 8px; border: 1px solid #dcdcdc; min-height: 36px; }
#send { min-height: 38px; width: 45px; height: 38px; }
.source-card { border-left: 2px solid #161616; background: #fafafa; padding-block: 9px; }
.source-card span { font-size: 10px; }
.canvas-panel { background: #fafafa; }
.canvas-toolbar { padding: 21px 25px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.canvas-toolbar .eyebrow { color: var(--ink); display: block; font-size: 9px; margin-bottom: 6px; }
.canvas-toolbar h2 { font-size: 11px; font-weight: 450; color: var(--muted); }
.view-controls { gap: 4px; border: 0; }
.view-controls button { border: 1px solid #dcdcdc; min-height: 32px; font-size: 10px; }
.view-controls button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.canvas-tools > .icon-button { border: 1px solid #dcdcdc; min-height: 32px; }
.stage { background: #fafafa; }
.empty-sketch { color: #8a8a8a; }
#empty h2 { font-size: 24px; font-weight: 500; }
#empty p { font-size: 12px; }
.empty-actions .text-button { border: 1px solid #dcdcdc; }
.preview-state { border-color: #b8b8b8; border-left: 3px solid var(--ink); background: #fffffff0; color: var(--ink); }
.stage-corner { letter-spacing: .08em; }
.canvas-bottom { min-height: 48px; background: #fff; border-color: #dcdcdc; }
#dimensions { font-size: 12px; font-weight: 450; }
.inspector-panel { background: #fff; height: clamp(290px, 36dvh, 340px); }
.dock-heading { padding-top: 15px; padding-bottom: 12px; }
.dock-heading h2 { font-size: 18px; font-weight: 550; }
.dock-heading .badge { font-family: var(--mono); font-size: 9px; color: var(--muted); }
.parameter-tabs { align-self: flex-start; gap: 0; margin: 0 25px 13px; padding: 0; border: 1px solid #b8b8b8; max-width: calc(100% - 50px); }
.parameter-tabs > button { border: 0; border-right: 1px solid #b8b8b8; padding: 6px 13px; min-height: 32px; font-size: 11px; }
.parameter-tabs > button:last-child { border-right: 0; }
.parameter-tabs > button[aria-selected=true] { background: var(--ink); color: #fff; border-color: #b8b8b8; }
.parameter-tabs > button[aria-selected=true] #object-count { color: #fff; }
.inspector-scroll { padding-top: 0; }
.parameter-fields { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.parameter-field { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 8px 13px 12px; }
.field-heading { margin-bottom: 7px; }
.field-heading label { font-size: 11px; color: var(--ink); }
.field-reset { opacity: .6; }
.parameter-value input, .parameter-value select { border-color: #c8c8c8; min-height: 37px; background: #fff; }
.parameter-value input { font-size: 16px; }
.parameter-field small { font-size: 8px; color: #6b6b6b; margin-top: 3px; }
.parameter-field input[type=range] { appearance: none; background: transparent; height: 23px; margin-top: 9px; }
.parameter-field input[type=range]::-webkit-slider-runnable-track { height: 2px; background: #b8b8b8; }
.parameter-field input[type=range]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; border-radius: 0; background: #161616; border: 1px solid #161616; margin-top: -4.5px; }
.parameter-field input[type=range]::-moz-range-track { height: 2px; background: #b8b8b8; }
.parameter-field input[type=range]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 0; background: #161616; border: 1px solid #161616; }
.inspector-action { background: #fff; border-top-color: #dcdcdc; padding-block: 12px; }
.inspector-action > button { min-width: 164px; }
.inspector-empty { padding: 2px 0; }
.empty-fields { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.empty-fields > span { padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.empty-fields i { background: #fafafa; }
.object-card-head { margin-bottom: 12px; }
.object-form input, .object-form select { background: #fff; border-color: #c8c8c8; }
.object-form label { color: var(--ink); }
dialog { box-shadow: 0 24px 80px #0a0a0a18; border-color: #b8b8b8; }
.print-heading h1 { font-weight: 550; }
.stage-overlay { background: #fafafaf5; }
@media (min-width: 1700px) {
  .panel-heading h1 { font-size: 36px; }
}
@media (max-width: 1200px) {
  .app-header { padding-inline: 25px; gap: 20px; }
  .brand { gap: 14px; }
  .brand strong { font-size: 24px; gap: 10px; }
  .brand-latin { font-size: 16px; }
  .brand-sub { padding-left: 13px; font-size: 10px; }
  .header-project { display: none; }
  .header-actions { margin-left: auto; }
  .panel-heading h1 { font-size: 29px; }
  .parameter-tabs { margin-inline: 20px; max-width: calc(100% - 40px); }
  .parameter-tabs > button { padding-inline: 11px; }
  .parameter-field { padding-inline: 10px; }
  .parameter-value input { font-size: 15px; }
}
@media (max-width: 1024px) {
  .panel-heading h1 { font-size: 27px; }
  .canvas-toolbar { flex-wrap: nowrap; }
  .canvas-toolbar h2 { max-width: 20ch; }
  .view-controls { gap: 3px; }
  .view-controls button { padding-inline: 9px; }
  .parameter-tabs { margin-bottom: 12px; }
}
@media (max-width: 819px) {
  .app-header { height: 63px; padding-inline: 18px; gap: 10px; }
  .studio { height: calc(100dvh - 63px); }
  .brand { gap: 10px; }
  .brand strong { gap: 8px; font-size: 21px; }
  .brand-latin { font-size: 12px; letter-spacing: -.05em; }
  .brand-slash { font-size: 15px; }
  .brand-sub { display: none; }
  .header-actions { gap: 7px; }
  .header-actions > button { padding: 6px 9px; min-height: 36px; font-size: 10px; }
  .header-actions .ui-icon { width: 12px; height: 12px; }
  .chat-panel { padding-top: 25px; }
  .panel-heading { padding-bottom: 23px; }
  .panel-heading .eyebrow { font-size: 9px; margin-bottom: 14px; }
  .panel-heading h1 { font-size: 30px; line-height: 1.4; }
  .panel-heading p { font-size: 12px; margin-top: 13px; }
  .messages { padding-top: 24px; }
  .message p { font-size: 14px; }
  .intro-message p { font-size: 19px; }
  .suggestions { gap: 0; max-height: 40px; }
  .suggestions button { padding-inline: 8px; border: 1px solid var(--line); width: auto; border-right: 0; }
  .suggestions button:last-child { border-right: 1px solid var(--line); }
  .suggestions button::after { display: none; }
  .canvas-toolbar { min-height: 63px; padding: 12px 20px 10px; }
  .canvas-toolbar .eyebrow { font-size: 8px; }
  .canvas-toolbar h2 { font-size: 10px; max-width: 22ch; }
  .view-controls button { min-height: 32px; font-size: 10px; padding-inline: 8px; }
  .view-controls .icon-button { width: 28px; }
  .canvas-tools { gap: 7px; }
  .canvas-tools > .icon-button { width: 29px; min-height: 32px; }
  .inspector-panel { height: 334px; }
  .dock-heading { padding-top: 12px; padding-bottom: 12px; }
  .dock-heading h2 { font-size: 16px; }
  .parameter-tabs { margin-inline: 20px; max-width: calc(100% - 40px); margin-bottom: 12px; }
  .parameter-tabs > button { min-height: 32px; font-size: 10px; padding: 5px 11px; }
  .inspector-scroll { padding-top: 0; }
  .parameter-field { padding: 9px 12px 12px; }
  .field-heading label { font-size: 11px; }
  .parameter-value input, .parameter-value select { min-height: 40px; font-size: 16px; }
  .parameter-field input[type=range] { height: 24px; }
  .parameter-field input[type=range]::-webkit-slider-thumb { width: 13px; height: 13px; margin-top: -5.5px; }
  .inspector-action { padding-block: 11px; }
  .inspector-action > button { min-width: 136px; }
  .empty-sketch { height: min(39%, 130px); }
  #empty h2 { font-size: 21px; }
  #empty p { font-size: 11px; }
}
@media (max-width: 430px) {
  .app-header { padding-inline: 16px; }
  .brand strong { font-size: 20px; gap: 7px; }
  .brand-latin { font-size: 11px; }
  .header-actions { gap: 5px; }
  .header-actions > button { font-size: 9px; padding-inline: 7px; }
  .header-actions > #new .ui-icon { display: none; }
  .panel-heading h1 { font-size: 29px; }
  .canvas-toolbar { padding-inline: 16px; }
  .canvas-toolbar h2 { max-width: 19ch; }
  .parameter-tabs { margin-inline: 16px; max-width: calc(100% - 32px); }
  .parameter-tabs > button { padding-inline: 10px; }
  .canvas-bottom { min-height: 44px; padding-inline: 16px; }
  #dimensions { font-size: 11px; }
  .dock-heading { gap: 9px; }
  .dock-heading .badge { font-size: 8px; }
  .dock-heading > button { font-size: 8px; }
}
@media (min-width: 820px) and (max-height: 780px) {
  .app-header { height: 62px; }
  .studio { height: calc(100dvh - 62px); }
  .panel-heading { padding-bottom: 17px; }
  .panel-heading .eyebrow { margin-bottom: 12px; font-size: 9px; }
  .panel-heading h1 { font-size: 27px; }
  .panel-heading p { margin-top: 11px; font-size: 11px; }
  .inspector-panel { height: 300px; }
  .canvas-toolbar { padding-block: 15px 10px; }
  .dock-heading { padding-block: 11px 10px; }
  .parameter-tabs { margin-bottom: 10px; }
  .inspector-action { padding-block: 9px; }
  #empty h2 { font-size: 21px; }
}
/* Feature selection stays beside the model; fields remain in one shared editor. */
#feature-controls{display:grid;grid-template-columns:70px minmax(0,1fr);align-items:center;gap:8px 14px;padding:0 0 18px;border-bottom:1px solid var(--line,#ddd);margin-bottom:18px}
#feature-controls[hidden],.parameter-field[hidden]{display:none!important}
#feature-controls label{font-size:12px;color:#666}
#feature-selection{width:100%;min-height:36px;border:1px solid #ddd;background:white;padding:6px 10px;color:#222}
#feature-note{grid-column:1/-1;font-size:11px;line-height:1.7;color:#666;margin:0}
#feature-ask{grid-column:1/-1;justify-self:start;font-size:12px}
#feature-repair{max-width:240px;font-size:11px;white-space:normal}
@media(max-width:900px){#reopen-experiment{display:none}.header-actions #experiment{font-size:11px;padding:8px}}
body[data-parameter-tab=structure][data-feature]:not([data-feature=""]):not([data-feature=body]) #parameters-section{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}
body[data-feature]:not([data-feature=""]):not([data-feature=body]) #feature-controls{border:0;margin:0;padding:0;gap:4px 10px}
body[data-feature]:not([data-feature=""]):not([data-feature=body]) #parameter-fields{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}
#feature-ask{min-height:28px;padding:2px 0;font-size:11px}
@media(max-width:600px){body[data-parameter-tab=structure][data-feature]:not([data-feature=""]):not([data-feature=body]) #parameters-section{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}#feature-controls{grid-template-columns:1fr}#feature-controls label{font-size:10px}#feature-note{font-size:10px}#feature-selection{font-size:11px;padding-inline:6px}#feature-repair{min-width:90px}.inspector-action:has(#feature-repair:not([hidden])){flex-wrap:wrap}}
