:root {
  color-scheme: light;
  --paper: #f6f4ef;
  --panel: #fffefa;
  --ink: #272925;
  --muted: #7c7d73;
  --line: #e8e5dd;
  --green: #395e48;
  --green-soft: #e7ede6;
  --orange: #db704b;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid #678d70; outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .55; }
.app-shell { max-width: 1800px; margin: 0 auto; min-height: 100vh; padding: 0 28px 30px; }
.topbar { display: grid; grid-template-columns: 210px 1fr auto; height: 78px; align-items: center; gap: 20px; border-bottom: 1px solid #e4e0d7; }
.brand { display: flex; align-items: center; gap: 10px; width: fit-content; color: var(--ink); text-decoration: none; }
.brand-mark { position: relative; display: grid; width: 31px; height: 31px; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; transform: rotate(-7deg); }
.brand-mark i { display: block; border: 1.6px solid #395e48; background: #e5eadf; }
.brand-mark i:nth-child(2) { background: #f0c9ab; border-color: #cf7754; }
.brand-mark i:nth-child(3) { background: #f3e8cc; }
.brand-mark i:nth-child(4) { background: #d3dce0; border-color: #667a81; }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: -.07em; }
.brand-name span { color: var(--orange); }
.project-name { justify-self: start; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line); padding-left: 19px; }
.project-kicker, .step-label { font-size: 10px; letter-spacing: .11em; font-weight: 700; color: #8a8b81; }
.project-name strong { font-size: 13px; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.privacy-badge { color: #66806c; font-size: 11px; display: flex; gap: 7px; align-items: center; }
.privacy-badge span { font-size: 9px; }
.top-button, .button-dark { min-height: 44px; padding: 0 16px; border: 1px solid #d9d7ce; border-radius: 8px; background: #fffefa; color: #314f3c; font-size: 12px; font-weight: 600; cursor: pointer; }
.top-button:hover { background: #edf2eb; border-color: #b9c8b8; }
.workspace { display: grid; grid-template-columns: 254px minmax(360px, 1fr) 254px; align-items: start; gap: 16px; padding-top: 20px; }
.mobile-selection-controls { display: none; }
#selected-controls-home { display: none; }
#frame-controls-home { display: none; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.theme-panel, .inspector-panel { padding: 17px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.step-label { display: block; }
.step-label span { color: #c1bfb7; margin: 0 3px; }
.panel-head h1, .panel-head h2, .canvas-title h2 { margin: 6px 0 0; font: 500 23px/1.15 var(--serif); letter-spacing: -.035em; }
.help-button { width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); font: 600 13px var(--serif); cursor: pointer; }
.panel-copy { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 9px 0 16px; }
.panel-copy.compact-copy { font-size: 11px; margin: 7px 0 13px; }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-card { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 66px; padding: 7px; text-align: left; border: 1px solid #e9e6df; border-radius: 8px; background: #fff; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.theme-card:hover { transform: translateY(-1px); border-color: #b7c7b5; }
.theme-card.selected { border-color: #5f7e65; background: #f0f4ef; box-shadow: 0 0 0 1px #5f7e65 inset; }
.theme-card strong, .theme-card small { display: block; }
.theme-card strong { font-size: 11px; font-weight: 600; }
.theme-card small { margin-top: 3px; color: #8c8d83; font-size: 9px; }
.theme-art { width: 35px; height: 43px; position: relative; flex: 0 0 35px; overflow: hidden; border: 2px solid #b89b70; box-shadow: 0 2px 4px #40372124; }
.swatch-japandi { background: #f1e4ca; }
.swatch-japandi i { position: absolute; width: 19px; height: 19px; background: #d6a94f; border-radius: 50%; top: 6px; left: 7px; }
.swatch-japandi b { position: absolute; bottom: -1px; left: 4px; width: 29px; height: 15px; border-radius: 60% 60% 0 0; background: #71826b; transform: rotate(-9deg); }
.swatch-cats { background: #f1ede4; display: grid; place-items: center; }
.swatch-cats i { position: absolute; left: 5px; top: 12px; width: 22px; height: 19px; background: #303a32; clip-path: polygon(0 40%, 20% 0, 39% 31%, 61% 31%, 80% 0, 100% 40%, 95% 77%, 77% 100%, 23% 100%, 5% 77%); }
.swatch-cats i::before { content: ""; position: absolute; left: 6px; top: 8px; width: 3px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 8px 0 #fff; }
.swatch-cats i::after { content: ""; position: absolute; left: 10px; top: 13px; width: 3px; height: 3px; border-radius: 50%; background: #df8768; }
.swatch-cats b { position: absolute; bottom: 4px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: #d67455; }
.swatch-kids { background: linear-gradient(165deg,#e9f5f1,#f9dd8d); }
.swatch-kids i { position: absolute; width: 29px; height: 15px; top: 15px; left: 1px; border-radius: 18px 18px 0 0; border: 4px solid #e67b53; border-bottom: 0; }
.swatch-kids b { position: absolute; right: 4px; bottom: 4px; color: #6384b1; }
.swatch-botanical { background: #e7e5d8; }
.swatch-botanical i { position: absolute; height: 33px; width: 2px; left: 17px; top: 6px; background: #687b5c; transform: rotate(22deg); }
.swatch-botanical b { position: absolute; width: 12px; height: 7px; left: 7px; top: 16px; background: #70845f; border-radius: 100% 0; transform: rotate(20deg); box-shadow: 8px 11px 0 #9d9b68; }
.swatch-retro { background: #f2d8c8; }
.swatch-retro i { position: absolute; width: 30px; height: 30px; left: 3px; top: 7px; border-radius: 50%; background: repeating-linear-gradient(to bottom,#da7b4e 0 4px,#f0cb83 4px 7px); }
.swatch-retro b { position: absolute; width: 18px; height: 3px; bottom: 5px; left: 7px; background: #42675c; transform: rotate(-20deg); }
.swatch-abstract { background: #eee7d8; }
.swatch-abstract i { position: absolute; left: 3px; top: 5px; width: 15px; height: 30px; background: #d75c48; border-radius: 9px 9px 2px 2px; }
.swatch-abstract b { position: absolute; right: 3px; bottom: 7px; width: 15px; height: 15px; background: #dbb24e; border-radius: 50%; }
.theme-source { display: flex; gap: 8px; margin: 15px 0 13px; padding: 10px 9px; border-radius: 7px; background: #f7f5ef; color: #898a80; }
.theme-source p { margin: 0; font-size: 10px; line-height: 1.5; }
.source-icon { color: #b18b52; font-size: 12px; }
.panel-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); }
.text-action { min-height: 40px; padding: 7px 0; border: 0; background: none; color: #58745f; font-size: 11px; font-weight: 600; cursor: pointer; }
.file-input { position: fixed; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.canvas-panel { min-width: 0; }
.editor-toolbar { display: flex; align-items: flex-end; justify-content: space-between; margin: 1px 2px 11px; }
.canvas-title h2 { font-size: 22px; }
.canvas-actions { display: flex; align-items: center; gap: 7px; }
.scale-label { color: #8b8b82; font-size: 10px; margin-right: 5px; }
.tool-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #fffefa; color: #526857; font-size: 20px; cursor: pointer; }
.view3d-button { font-size: 11px; font-weight: 700; letter-spacing: -.03em; }
.tool-button:hover { background: var(--green-soft); }
.canvas-wrap { position: relative; overflow: hidden; width: 100%; border: 1px solid #ddd9d0; border-radius: 10px; background: #e8e1d6; box-shadow: 0 9px 24px #423c2e0c; line-height: 0; }
#room-canvas { display: block; width: 100%; height: auto; aspect-ratio: 1400 / 933; cursor: grab; touch-action: none; }
#room-canvas:active { cursor: grabbing; }
.canvas-chip { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 6px; background: #fffefaed; color: #686d63; font-size: 9px; line-height: 1; letter-spacing: .08em; font-weight: 700; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #8da17e; box-shadow: 0 0 0 3px #8da17e22; }
.canvas-change-room { position: absolute; top: 10px; right: 10px; min-height: 40px; padding: 0 11px; border: 1px solid #f5f1e9; border-radius: 6px; background: #fffefaed; color: #4e624f; font-size: 10px; font-weight: 600; cursor: pointer; }
.canvas-change-room:hover { background: #fff; }
.canvas-hint { position: absolute; bottom: 11px; right: 12px; padding: 7px 9px; border-radius: 5px; background: #252924a8; color: white; font-size: 10px; line-height: 1.2; opacity: .86; pointer-events: none; }
.art-strip { margin-top: 14px; padding: 14px 15px 11px; background: #fffefa; border: 1px solid var(--line); border-radius: 10px; }
.strip-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.strip-heading strong { display: block; margin-top: 5px; font-size: 12px; font-weight: 600; }
.generate-button { min-height: 38px; padding: 0 13px; border: 0; border-radius: 7px; background: #375d46; color: #fff; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.generate-button:hover { background: #294d38; }
.generate-button span { margin-right: 5px; color: #c4d8a7; }
.art-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.art-card { display: flex; gap: 9px; align-items: center; min-width: 0; padding: 7px; border: 1px solid #e8e5dd; border-radius: 8px; background: #fff; text-align: left; cursor: pointer; }
.art-card:hover, .art-card.selected { border-color: #5f7e65; box-shadow: 0 0 0 1px #5f7e65 inset; }
.art-thumb { width: 38px; height: 48px; flex: 0 0 38px; object-fit: cover; border: 2px solid #bd9a6a; background: #eee8dc; box-shadow: 0 1px 4px #2b251d20; }
.art-card span { min-width: 0; }
.art-card strong, .art-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-card strong { font-size: 10px; font-weight: 600; }
.art-card small { margin-top: 4px; color: #99988e; font-size: 9px; }
.generation-note { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; color: #8a8b81; font-size: 10px; }
.free-pill { flex: 0 0 auto; padding: 5px 7px; border-radius: 20px; background: #f2f4ef; color: #73806d; font-size: 8px; letter-spacing: .06em; font-weight: 700; }
.inspector-head { align-items: center; }
.inspector-head h2 { font-size: 22px; }
.tiny-status { color: #899080; font-size: 9px; }
.control-block { padding: 13px 0 14px; border-top: 1px solid var(--line); }
.control-label { display: block; margin-bottom: 9px; color: #55584f; font-size: 11px; font-weight: 600; }
.layout-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.layout-card { min-width: 0; min-height: 72px; padding: 6px 3px 5px; border: 1px solid #ebe8e1; border-radius: 7px; background: #fff; cursor: pointer; }
.layout-card:hover { border-color: #a6b5a0; }
.layout-card.selected { border-color: #527257; background: #f1f4ef; box-shadow: 0 0 0 1px #527257 inset; }
.layout-preview { display: flex; align-items: center; justify-content: center; gap: 3px; height: 40px; }
.layout-preview i { display: block; width: 15px; height: 22px; border: 2px solid #a17f52; background: #e9dbc3; box-shadow: 0 1px 2px #33291c26; }
.layout-preview i:nth-child(2) { height: 29px; }
.layout-row i:nth-child(2) { height: 22px; }
.layout-stack i:nth-child(2) { margin-top: 12px; }
.layout-stack i:nth-child(3) { margin-top: -12px; }
.layout-card strong { display: block; font-size: 9px; font-weight: 600; }
.range-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: #55584f; font-size: 11px; font-weight: 600; }
.range-label output { color: #879080; font-size: 10px; font-weight: 500; }
input[type="range"] { display: block; width: 100%; height: 26px; margin: 0; accent-color: #527257; cursor: pointer; }
.selected-art-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; margin-bottom: 12px; }
.selected-art-heading .control-label { margin: 0; }
.selected-art-heading strong { max-width: 58%; color: #75806f; font-size: 10px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.rotation-label { margin-top: 7px; }
.item-position-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.nudge-grid { display: grid; grid-template-columns: repeat(3,38px); grid-template-rows: repeat(2,38px); gap: 4px; }
.nudge-button { width: 38px; height: 38px; border: 1px solid #e4e2d9; border-radius: 7px; background: #fff; color: #47644d; font-size: 17px; cursor: pointer; }
.nudge-button:hover { background: #f0f4ef; border-color: #b4c3b2; }
.reset-item-button { min-height: 40px; text-align: right; }
.frame-options { display: flex; gap: 12px; align-items: center; }
.frame-option { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #e7e3da; border-radius: 50%; background: #fff; cursor: pointer; }
.frame-option.selected { border-color: #4e7055; box-shadow: 0 0 0 2px #e0eadf; }
.frame-option i { width: 20px; height: 20px; border-radius: 50%; background: var(--frame); border: 1px solid #00000010; }
.apply-frame-all { min-height: 34px; padding: 5px 0 0; font-size: 10px; }
.room-button { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 39px; padding: 0 10px; border: 1px solid #e5e2d9; border-radius: 7px; background: #fff; color: #596a5a; text-align: left; font-size: 11px; cursor: pointer; }
.room-button span:last-child { margin-left: auto; }
.room-button:hover { border-color: #8fa28e; background: #f5f7f3; }
.remove-room { display: block; min-height: 40px; padding: 8px 1px 0; border: 0; background: transparent; color: #84867c; font-size: 10px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.inspector-footer { padding-top: 14px; border-top: 1px solid var(--line); }
.export-consent { display: flex; align-items: flex-start; gap: 7px; color: #75766e; font-size: 10px; line-height: 1.4; cursor: pointer; }
.export-consent input { width: 15px; height: 15px; margin: 0; accent-color: #527257; flex: 0 0 auto; }
.download-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 46px; margin-top: 12px; padding: 0 13px; border: 0; border-radius: 8px; background: #2f533d; color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.download-button:hover { background: #223f2e; }
.download-button b { font-size: 19px; font-weight: 400; }
.export-note { margin: 7px 0 0; text-align: center; color: #99988f; font-size: 9px; }
.pinterest-link { display: flex; align-items: center; justify-content: center; min-height: 44px; width: fit-content; margin: 4px auto 0; color: #566f59; font-size: 11px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 18px; transform: translate(-50%, 12px); max-width: min(540px,calc(100vw - 28px)); padding: 11px 16px; border: 1px solid #415749; border-radius: 8px; background: #263d30; color: white; box-shadow: 0 8px 28px #12191238; font-size: 12px; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.visible { opacity: 1; transform: translate(-50%,0); }
.privacy-dialog { position: relative; width: min(480px,calc(100vw - 28px)); padding: 31px; border: 1px solid #e2ded5; border-radius: 14px; background: #fffefa; color: var(--ink); box-shadow: 0 20px 70px #241f1830; }
.privacy-dialog::backdrop { background: #20231e70; backdrop-filter: blur(3px); }
.dialog-close { position: absolute; top: 9px; right: 12px; width: 36px; height: 36px; border: 0; background: none; color: #76786f; font-size: 25px; cursor: pointer; }
.privacy-dialog h2 { margin: 13px 0 12px; max-width: 360px; font: 500 25px/1.2 var(--serif); }
.privacy-dialog p { color: #6f7168; font-size: 12px; line-height: 1.7; }
.button-dark { margin-top: 8px; border: 0; background: #355a43; color: white; }
.button-dark:hover { background: #284733; }
.view3d-dialog { position: fixed; inset: 50% auto auto 50%; transform: translate(-50%,-50%); width: min(900px,calc(100vw - 28px)); max-width: 900px; max-height: calc(100dvh - 28px); margin: 0; padding: 25px; overflow: hidden; border: 1px solid #e2ded5; border-radius: 14px; background: #fffefa; color: var(--ink); box-shadow: 0 20px 70px #241f1830; }
.view3d-dialog::backdrop { background: #20231e70; backdrop-filter: blur(3px); }
.view3d-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-right: 35px; }
.view3d-header h2 { margin: 6px 0 0; font: 500 23px/1.15 var(--serif); letter-spacing: -.035em; }
.view3d-note { margin: 10px 0 15px; color: #72746b; font-size: 11px; line-height: 1.55; }
.view3d-stage { display: grid; place-items: center; width: 100%; height: min(48vh,450px); min-height: 235px; overflow: hidden; border: 1px solid #e1ddd3; border-radius: 10px; background: radial-gradient(ellipse at 50% 68%,#fff 0,#eeeae1 70%); perspective: 1100px; }
.view3d-room { position: relative; width: min(84%,680px); aspect-ratio: 1400 / 933; transform-style: preserve-3d; transform: rotateY(var(--view-angle,0deg)); transition: transform .22s ease-out; }
.view3d-wall { position: absolute; z-index: 1; inset: 0; overflow: visible; border: 1px solid #e5ddce; background: linear-gradient(90deg,#eee9df 0,#f5f1e9 14%,#f7f4ed 50%,#f0ece3 100%); box-shadow: 0 16px 26px #39322619; }
.view3d-wall::before { content: ""; position: absolute; inset: 0; opacity: .25; background: repeating-linear-gradient(0deg,transparent 0 43px,#c6bdac14 44px 45px), repeating-linear-gradient(90deg,transparent 0 72px,#c6bdac0d 73px 74px); pointer-events: none; }
.view3d-floor { position: absolute; z-index: 0; left: -4%; right: -4%; top: 100%; height: 19%; transform: rotateX(68deg) translateZ(-38px); transform-origin: 50% 0; border: 1px solid #dfd4c4; background: repeating-linear-gradient(90deg,#cbb99c15 0 88px,#9f8c6a12 89px 91px),linear-gradient(#dfd1bb,#bfae91); box-shadow: 0 17px 24px #53482f15; pointer-events: none; }
.view3d-baseboard { position: absolute; z-index: 2; left: 0; right: 0; bottom: -1%; height: 12px; background: linear-gradient(#e8dfd1,#c5b79f); box-shadow: 0 3px 5px #4b40301c; pointer-events: none; }
.frame3d { position: absolute; z-index: 3; display: block; padding: 1.05%; border: 0; border-radius: 1px; background: var(--frame-color,#bd9a6a); box-shadow: 5px 7px 0 -1px #594a354a, 9px 13px 12px #30271e3b; transform: rotateZ(var(--poster-rotation,0deg)); cursor: pointer; transition: box-shadow .16s ease,filter .16s ease; pointer-events: auto; }
.frame3d:hover { filter: brightness(1.04); box-shadow: 6px 8px 0 -1px #594a355c, 12px 16px 15px #30271e42; }
.frame3d.selected { outline: 3px solid #55785c; outline-offset: 4px; }
.frame3d img { display: block; width: 100%; height: 100%; border: 4px solid #faf8f2; object-fit: cover; }
.view3d-controls { margin-top: 16px; }
.view3d-controls .range-label { margin-bottom: 3px; }
.view3d-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: #77796f; font-size: 10px; }
.view3d-footer .button-dark { flex: 0 0 auto; margin: 0; }
.variant-switcher { position: fixed; z-index: 50; left: 50%; bottom: 15px; transform: translateX(-50%); display: none; align-items: center; gap: 12px; padding: 7px 9px; border: 1px solid #d8d5cc; border-radius: 30px; background: #fffefa; box-shadow: 0 5px 24px #28271f22; }
.variant-switcher.visible { display: flex; }
.variant-arrow { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #62665d; font-size: 19px; cursor: pointer; }
.variant-arrow:hover { background: #edf1ea; }
.variant-switcher > span { min-width: 142px; display: flex; flex-direction: column; gap: 3px; }
.variant-switcher small { color: #93938a; font-size: 8px; letter-spacing: .1em; font-weight: 700; }
.variant-switcher strong { color: #53574e; font-size: 10px; font-weight: 600; }
.variant-dots { display: flex; gap: 7px; align-items: center; }
.variant-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #d6d4cb; cursor: pointer; }
.variant-dots button.active { background: #4d7055; box-shadow: 0 0 0 3px #e6ece3; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }
body.compare-mode { padding-bottom: 66px; }

/* The three flow variants keep the same editor and change the first decision. */
.app-shell.flow-b .flow-banner { border-left-color: #d27a56; }
.app-shell.flow-c .flow-banner { border-left-color: #77906e; }
.flow-banner { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; margin: 15px 0 -4px 270px; padding: 11px 14px; border: 1px solid #e7e3da; border-left: 3px solid #78906f; border-radius: 9px; background: #fffefa; }
.flow-copy { min-width: 0; }
.flow-copy strong { display: block; margin-bottom: 3px; font-size: 12px; }
.flow-copy p { margin: 0; color: #828379; font-size: 10px; line-height: 1.45; }
.flow-actions { display: flex; align-items: center; gap: 7px; }
.flow-action { min-height: 36px; padding: 0 11px; border: 1px solid #e0ddd5; border-radius: 7px; background: #fff; color: #526552; font-size: 10px; font-weight: 600; cursor: pointer; }
.flow-action.primary { border-color: #365d45; background: #365d45; color: #fff; }
.flow-action:hover { filter: brightness(.96); }
.flow-theme-select { min-height: 36px; max-width: 140px; padding: 0 8px; border: 1px solid #dedbd2; border-radius: 7px; background: white; font-size: 10px; }
.flow-banner.hidden { display: none; }

@media (max-width: 1320px) {
  .app-shell { padding-left: 18px; padding-right: 18px; }
  .workspace { grid-template-columns: 230px minmax(320px,1fr) 224px; gap: 11px; }
  .theme-panel, .inspector-panel { padding: 14px; }
  .theme-card { gap: 6px; padding: 6px; }
  .theme-card small { font-size: 8px; }
  .flow-banner { margin-left: 242px; }
}
@media (max-width: 1060px) {
  .workspace { grid-template-columns: 218px minmax(0,1fr); grid-template-areas: "themes canvas" "inspector canvas"; }
  .theme-panel { grid-area: themes; }
  .canvas-panel { grid-area: canvas; }
  .inspector-panel { grid-area: inspector; }
  .flow-banner { margin-left: 0; }
  .inspector-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
  .inspector-head, .compact-copy, .inspector-footer { grid-column: 1 / -1; }
  .control-block:nth-of-type(1), .control-block:nth-of-type(2) { border-top: 1px solid var(--line); }
  .room-control { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .app-shell { padding: 0 12px 24px; }
  .topbar { grid-template-columns: auto 1fr; height: auto; min-height: 64px; gap: 8px 10px; padding: 10px 0; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-name { font-size: 19px; }
  .project-name { padding-left: 11px; }
  .project-kicker { font-size: 8px; }
  .project-name strong { font-size: 11px; }
  .top-actions { grid-column: 1 / -1; justify-self: stretch; justify-content: space-between; margin-top: 0; }
  .privacy-badge { font-size: 9px; }
  .top-button { min-height: 44px; padding: 0 11px; font-size: 10px; }
  .workspace { display: flex; flex-direction: column; gap: 11px; padding-top: 10px; }
  .theme-panel, .inspector-panel, .canvas-panel { width: 100%; }
  .canvas-panel { order: 1; }
  .mobile-selection-controls.visible { order: 2; display: block; width: 100%; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
  .mobile-selection-controls .selected-art-controls { border-top: 0; }
  .theme-panel { order: 3; }
  .inspector-panel { order: 4; display: block; }
  .flow-banner { position: static; display: block; margin: 0 0 11px; padding: 11px; box-shadow: 0 5px 18px #29271e12; }
  .flow-banner.hidden { display: none; }
  .flow-actions { margin-top: 9px; flex-wrap: wrap; }
  .flow-action { min-height: 40px; }
  .flow-theme-select { min-height: 40px; flex: 1; max-width: none; }
  .editor-toolbar { margin-bottom: 8px; }
  .canvas-title h2 { font-size: 20px; }
  .scale-label { display: inline; margin-right: 0; max-width: 46px; color: #797b71; font-size: 8px; line-height: 1.15; }
  .tool-button { width: 44px; height: 44px; }
  #room-canvas { aspect-ratio: 1.22; }
  .canvas-hint { bottom: 8px; right: 8px; font-size: 9px; }
  .canvas-chip { top: 8px; left: 8px; font-size: 8px; }
  .canvas-change-room { top: 6px; right: 6px; min-height: 44px; font-size: 10px; }
  .art-strip { margin-top: 10px; padding: 11px; }
  .strip-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .generate-button { width: 100%; min-height: 42px; }
  .art-list { gap: 6px; }
  .art-card { gap: 6px; padding: 5px; flex-direction: column; align-items: flex-start; }
  .art-thumb { width: 100%; height: 75px; flex-basis: auto; }
  .art-card strong { font-size: 9px; }
  .art-card small { font-size: 9px; }
  .generation-note { align-items: flex-start; font-size: 9px; }
  .free-pill { font-size: 7px; }
  .theme-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .theme-card { flex-direction: column; align-items: flex-start; min-height: 87px; padding: 7px; }
  .theme-art { width: 29px; height: 36px; flex-basis: auto; }
  .theme-card strong { font-size: 10px; }
  .theme-card small { font-size: 9px; }
  .theme-source { margin-bottom: 9px; }
  .panel-head h1, .panel-head h2 { font-size: 21px; }
  .inspector-panel { padding-bottom: 18px; }
  .layout-card { min-height: 82px; }
  .layout-preview { height: 45px; }
  .control-block { padding: 14px 0; }
  .frame-option { width: 44px; height: 44px; }
  .nudge-grid { grid-template-columns: repeat(3,42px); grid-template-rows: repeat(2,42px); }
  .nudge-button { width: 42px; height: 42px; }
  .room-button { min-height: 44px; }
  .download-button { min-height: 48px; }
  .view3d-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 17px 14px; }
  .view3d-header h2 { font-size: 20px; }
  .view3d-stage { height: min(38vh,320px); min-height: 190px; }
  .view3d-room { width: 92%; }
  .view3d-footer { align-items: flex-start; flex-direction: column; }
  .view3d-footer .button-dark { width: 100%; }
  .variant-switcher { bottom: 8px; gap: 7px; padding: 5px 7px; }
  .variant-switcher > span { min-width: 115px; }
}
@media (max-height: 560px) {
  .view3d-dialog { overflow-y: auto; }
  .view3d-note { margin: 6px 0 8px; }
  .view3d-stage { height: min(30vh,200px); min-height: 110px; }
  .view3d-controls { margin-top: 10px; }
  .view3d-footer { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
