/* Shared editorial skin. Existing photographs, actions and project data stay authoritative. */
:root{--bg:#f8f5ef;--ink:#27211c;--muted:#756c63;--line:#ded6cb;--accent:#742e38;--green:#742e38;--sage:#f1ece4;--font:Manrope,Arial,sans-serif}
body{background:var(--bg);font-family:var(--font);color:var(--ink)}
button,input,select,textarea{font-family:var(--font)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #a8636d;outline-offset:3px}
body:not([data-screen=home]) .header{background:var(--bg);border-color:var(--line);padding:0 3%;height:84px}
body:not([data-screen=home]) .brand{font-family:Prata,Georgia,serif;font-weight:400;font-size:35px;letter-spacing:-2.7px}
.header .button.dark{background:#fffdf9;border:1px solid var(--line);color:var(--ink);border-radius:5px;min-height:44px}
.studio-service-menu summary{background:transparent;border-color:var(--line);color:var(--muted)}
.studio-service-menu>div{background:#fffdf9;border-color:var(--line)}
body:not([data-screen=home]) main{max-width:1800px;padding:0 3%}
#studioScreen{padding-top:28px}
.studio-heading{margin:0 0 26px;align-items:center}
.studio-heading h1,.shopping-heading h1{font-family:Prata,Georgia,serif;font-weight:400;font-size:clamp(30px,3vw,48px);letter-spacing:-1.8px;line-height:1.2;color:var(--ink)}
.studio-heading p,.shopping-heading p{font-size:14px;line-height:1.7;color:var(--muted);margin-top:10px}
.project-name{border:1px solid var(--line);border-radius:5px;color:var(--muted);background:transparent;font-size:12px}
.transformation{gap:18px;grid-template-columns:260px minmax(0,1fr) 290px;align-items:start}
.transformation>.panel{border-radius:9px;border:1px solid var(--line);background:#fffdf9}
.transform-controls.panel{padding:19px;max-height:850px;background:#f1ece4;scrollbar-color:#c9bbae transparent}
.transform-controls h2{font-family:Prata,Georgia,serif;font-size:21px;font-weight:400;margin-bottom:18px}
.transform-controls .form-label{font-size:12px;line-height:1.5;margin:18px 0 8px;font-weight:600}
.transform-controls select:not(.native-style-select),.transform-controls input[type=text],.transform-controls input[type=number],#transformKeep{min-height:44px;height:auto;font-size:13px;border-color:#d8cec0;background:#fffdf9;border-radius:5px;padding:10px;min-width:0}
.transform-controls textarea{font-size:13px;line-height:1.7;height:112px;min-height:100px;background:#fffdf9;border-color:#d8cec0;border-radius:5px;padding:12px}
.studio-styles{gap:7px;margin-bottom:14px}.studio-styles button{border-color:var(--line);background:#fffdf9;border-radius:5px;padding:4px 4px 8px;cursor:pointer}
.studio-styles img{height:60px;border-radius:2px}.studio-styles span{font-size:10px;margin-top:8px}
.studio-styles button[aria-pressed=true]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.studio-styles button[aria-pressed=true] span{color:var(--accent)}
.room-photo-strip img{height:72px;border-radius:3px}.room-photo-strip button:not(.remove-room-photo){border-radius:5px;background:#fffdf9}
.add-room-view,.room-photo-collection .text-button{color:var(--accent);font-size:12px;min-height:36px;display:inline-flex;align-items:center}
.room-photo-collection p{font-size:11px;color:var(--muted)}
.remove-room-photo{width:28px;height:28px;right:-7px;top:-8px;line-height:24px;border-color:var(--line)}
.transform-controls .keep-option{font-size:12px;line-height:1.6;margin:16px 0}
.keep-option input,.generation-consent input{flex-shrink:0;width:19px;height:19px;accent-color:var(--accent)}
.studio-advanced{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:6px 0;margin:18px 0}
.studio-advanced summary{font-size:12px;min-height:38px;display:flex;align-items:center;color:var(--muted)}
.button{border-radius:5px;min-height:44px;font-size:12px;border-color:var(--line)}
.button.primary,.button.dark,#chatSend,#approveRoomPlan,#renderPhotoPlan{background:var(--accent);border-color:var(--accent);color:#fffdf9}
.button:disabled{opacity:1;background:#e5dbd2!important;border-color:#e5dbd2!important;color:#81776d!important;cursor:not-allowed}
.transform-controls .consult-start{min-height:44px;background:#fffdf9;border-color:#d8cec0;color:var(--ink);font-size:12px}
.transform-controls #generateRoom{min-height:48px;font-size:13px;margin-top:12px}
.generation-consent{font-size:11px;line-height:1.65;color:var(--muted);gap:9px;margin:15px 0}
.generation-status{font-size:11px;line-height:1.65;color:var(--muted)}
.transform-result.panel{overflow:hidden;border:0;background:transparent}
.transform-result #comparison{background:#eae4da;min-height:460px;height:590px;border-radius:8px}
.transform-result #comparison>img{border-radius:8px}
.compare-modes{background:#fffdf9f2;padding:4px;border:1px solid #ded6cb99;box-shadow:0 3px 18px #3021150a}
.compare-modes button{min-height:40px;padding:9px 16px;font-size:12px;color:var(--muted)}
.compare-modes button.active{color:var(--accent);background:#f0e4e3}
.image-label{background:#41352acb;color:white;border-radius:4px;font-size:11px}
.generation-feedback{background:#f2e7d8;border-color:#dfc9ad;color:#624727;border-radius:7px;margin-bottom:14px;padding:16px 18px}
.generation-feedback strong{font-size:13px}.generation-feedback p{font-size:12px;line-height:1.65}
.result-bottom,.studio-actions{background:transparent;padding:14px 0}
.result-bottom{align-items:start}.result-bottom p{font-size:11px;line-height:1.75;color:var(--muted)}
.result-bottom .button{min-height:42px;font-size:11px;background:#fffdf9}
.studio-actions{gap:9px;border-top:1px solid var(--line);padding-top:16px}
.studio-actions .button{font-size:12px;min-height:44px;padding:10px 14px;color:var(--ink);background:#fffdf9;border-color:var(--line)}
.studio-actions .primary{color:var(--accent);border-color:#b68d91;background:#f6ebea}
.studio-products.panel{padding:20px 16px;max-height:850px;gap:15px}
.studio-products-heading h2{font:400 23px/1.25 Prata,Georgia,serif;letter-spacing:-.6px}
.studio-products-heading>span{padding:4px 7px;border:1px solid var(--line);border-radius:50%;font-size:11px}
.studio-products-note{font-size:11px;color:var(--muted);line-height:1.7}
.studio-product-cards{max-height:560px;gap:12px;scrollbar-color:#c9bbae transparent}
.studio-mini-card{grid-template-columns:38% minmax(0,1fr);border-color:var(--line);border-radius:6px;background:#fffdf9;min-height:148px;gap:12px}
.studio-mini-card.is-highlighted{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.studio-mini-photo{background:#f0ece5;padding:8px}.studio-mini-photo img{height:126px}
.studio-mini-info{padding:12px 9px 12px 0}.studio-mini-info h3{font-size:12px;line-height:1.6;-webkit-line-clamp:3;font-weight:600}
.studio-mini-retailer{font-size:10px;color:var(--muted)}.studio-mini-price{font-size:17px;font-weight:600}
.studio-mini-link{font-size:12px;color:var(--accent);min-height:36px;display:flex;align-items:center}
.studio-products-total{background:#f0e9df;border-radius:5px;padding:16px}.studio-products-total strong{font-size:14px}
.studio-products-total small{font-size:11px;color:var(--muted)}.studio-products-total button{font-size:12px;min-height:40px;color:var(--accent)}
.studio-product-pin.is-highlighted{background:var(--accent);box-shadow:0 0 0 4px #742e3828}
.history-panel{margin:36px 0}.history-panel h2{font:400 28px/1.3 Prata,Georgia,serif}.history-panel>p{color:var(--muted);font-size:12px;line-height:1.7}
.version-card{border-radius:6px;background:#fffdf9;padding:7px}.version-card img{border-radius:3px}.version-card span{font-size:11px;color:var(--muted);padding:5px 0}
.studio-jump-nav{display:none}
/* Shopping uses the same palette, hierarchy and readable, progressively disclosed facts. */
.shopping-heading{margin-bottom:26px}.shopping-heading h1{margin-bottom:10px}
#shoppingScreen .shopping-layout{gap:24px;grid-template-columns:minmax(0,1.3fr) minmax(370px,1fr)}
#shoppingScreen .shopping-photo{height:620px;background:#eae4da;border-radius:8px;overflow:hidden}
.preserved-strip{background:#eee7dd;border-color:var(--line);border-radius:7px;padding:20px;gap:20px}
.preserved-strip strong{font-weight:600}.preserved-strip .text-button{color:var(--accent)}
.room-products-panel{background:#fffdf9;border-color:var(--line);border-radius:8px;padding:23px}
.room-products-panel h2{font:400 29px/1.3 Prata,Georgia,serif}.room-products-panel .eyebrow{color:var(--muted);letter-spacing:2px;font-size:10px}
.room-products-panel>p,.room-products-note{color:var(--muted);font-size:12px;line-height:1.7}
.room-products-tools .text-button{font-size:12px;min-height:40px;color:var(--accent)}
.catalog-connection{border:1px solid var(--line);background:#f2ece3;border-radius:6px;padding:16px}
.catalog-connection input{font-size:14px;min-height:44px;border-color:var(--line);background:#fffdf9}
.catalog-connection p{font-size:12px;line-height:1.7;color:var(--muted)}
#roomProductCards{max-height:680px;scrollbar-color:#c9bbae transparent;padding:3px}
.room-product-card{grid-template-columns:110px minmax(0,1fr);gap:16px;background:#fffdf9;border-color:var(--line);border-radius:7px;padding:14px;margin-bottom:14px;scroll-margin-top:70px}
.room-product-card.selected{border-color:var(--accent);background:#f6efea}
.room-item-crop{height:130px;border-radius:4px;background-color:#f0ece5}
.room-item-content{min-width:0}.room-product-card h3{font-size:15px;font-weight:600;line-height:1.5;margin:7px 0 10px;overflow-wrap:anywhere}
.room-item-label{font-size:10px;letter-spacing:1.6px;color:var(--muted)}
.room-product-card .room-item-price{font-size:14px;font-weight:600;color:var(--ink);line-height:1.5;margin:0 0 8px}
.room-product-card p.room-item-binding{font-size:11px;line-height:1.6;color:var(--muted);margin-bottom:12px}
.room-item-link{background:var(--accent);color:#fffdf9;min-height:42px;font-size:12px;padding:10px 13px;line-height:1.5}
.room-item-details{border-top:1px solid var(--line);margin-top:14px}
.room-item-details summary{font-size:11px;color:var(--accent);padding:12px 0;min-height:44px;cursor:pointer;line-height:1.7}
.room-item-details p{font-size:12px;line-height:1.7;color:var(--muted)}
.room-item-details select{max-width:100%;min-height:44px;border:1px solid var(--line);background:#fffdf9;border-radius:4px;font-size:12px;padding:8px;margin:8px 0 12px}
.room-item-remove{font-size:11px;min-height:44px;color:var(--muted)}
.room-product-zone{border-color:#fffdf9;background:#fffdf9;color:var(--ink);width:36px;height:36px;font-size:12px}.room-product-zone.selected{background:var(--accent);color:white}
dialog{background:#fffdf9;border:1px solid var(--line);border-radius:10px;color:var(--ink);padding:28px}
dialog::backdrop{background:#30251e70;backdrop-filter:blur(5px)}
dialog h2{font-family:Prata,Georgia,serif;font-weight:400;font-size:28px;line-height:1.35;letter-spacing:-.6px}
.dialog-heading{gap:16px;align-items:start}.dialog-heading>button,.dialog-close{min-width:44px;min-height:44px;background:#f0e9df;border-radius:50%;border:0;color:var(--ink)}
.catalog-filter-grid{gap:14px 18px}.catalog-filter-field label{font-size:12px;color:var(--muted)}
.preparation-dialog input,.preparation-dialog select{font-size:14px;min-height:46px;border-color:var(--line);border-radius:5px;background:#fffdf9}
#catalogBrowserStatus,#catalogBrowserItems p{color:var(--muted);font-size:12px;line-height:1.7}
.preparation-products article{border-color:var(--line);background:#fffdf9;border-radius:7px;padding:15px;min-width:0}
.preparation-products a{color:var(--ink);font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.preparation-products img{background:#f5f0e9;border-radius:4px;height:170px}
.preparation-products .button{font-size:12px;min-height:44px}.preparation-products .button:last-child{color:var(--accent);border-color:#b68d91}
.consultation-plan,.chat-message.assistant{background:#f1ece4;border-color:var(--line)}.chat-message.user{background:#f0e2e3}
.suggestion{color:var(--accent);border-color:#d9c5c5;min-height:44px}.suggestion.selected{background:#f0e2e3;border-color:var(--accent);color:var(--accent)}
@media(min-width:1600px){.transformation{grid-template-columns:280px minmax(0,1fr) 330px}.transform-result #comparison{height:680px}}
@media(min-width:801px) and (max-width:1150px){.transformation{grid-template-columns:240px minmax(0,1fr)}.studio-products.panel{grid-column:1/-1;max-height:none}.studio-product-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-height:none}.studio-mini-card{display:flex;flex-direction:column;gap:0}.studio-mini-info{padding:12px}.studio-mini-photo img{height:145px}}
@media(max-width:800px){
 body:not([data-screen=home]) main{padding:0 5%}body:not([data-screen=home]) .header{height:auto;min-height:78px;padding:16px 5%;gap:12px;flex-wrap:wrap}
 body:not([data-screen=home]) .brand{font-size:30px}.header nav{order:3;width:100%;gap:25px;height:auto;padding-top:8px}.header nav button{font-size:12px;min-height:40px}
 .header-right{gap:8px}.header #saveBtn{min-width:0;font-size:11px;min-height:40px;padding:9px 11px}.studio-service-menu summary{font-size:11px;min-height:40px;padding:8px 10px}
 #studioScreen{padding-top:25px}.studio-heading{margin:0 0 20px}.studio-heading h1,.shopping-heading h1{font-size:33px;letter-spacing:-1.2px;line-height:1.25}.studio-heading p,.shopping-heading p{font-size:13px;line-height:1.7;margin-top:12px}
 .studio-jump-nav{position:sticky;top:0;z-index:15;display:flex;gap:5px;background:#f8f5eff5;border:1px solid var(--line);padding:5px;border-radius:7px;margin:0 0 18px;backdrop-filter:blur(8px)}
 .studio-jump-nav a{flex:1;padding:12px 6px;min-height:44px;text-align:center;color:var(--accent);text-decoration:none;font-size:12px;line-height:1.5;border-radius:4px}.studio-jump-nav a:active{background:#eee0df}
 #studioPreferences,#studioResult,#studioSelection,#shoppingPhotoSection,#shoppingProductsSection{scroll-margin-top:76px}
 .transformation{display:flex;flex-direction:column;gap:22px}.transformation>.panel{width:100%}
 .transform-result{order:-1}.transform-controls.panel{max-height:none;display:block;padding:22px}.transform-controls .form-label{margin-top:22px;font-size:13px}
 .transform-controls h2{font-size:25px}.transform-controls select:not(.native-style-select),.transform-controls input[type=text],.transform-controls input[type=number],#transformKeep,.transform-controls textarea{font-size:16px;min-height:48px}
 .transform-controls textarea{height:145px;line-height:1.7}.studio-styles img{height:85px}.studio-styles span{font-size:12px}.transform-controls .keep-option{font-size:13px}
 .room-photo-strip img{height:90px}.generation-consent{font-size:12px}.generation-status{font-size:12px}
 .transform-result #comparison{min-height:0;height:390px;flex:none}.compare-modes{top:14px}.compare-modes button{font-size:12px;min-height:42px;padding:9px 14px}
 .generation-feedback{padding:15px;font-size:12px}.generation-feedback p{font-size:12px}.result-bottom{padding:15px 0}.result-bottom p{font-size:11px}
 .studio-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;justify-content:stretch}.studio-actions .primary{grid-column:1/-1}.studio-actions .button{font-size:12px;padding:11px 9px}
 .studio-products.panel{max-height:none;padding:22px 16px}.studio-products-heading h2{font-size:26px}.studio-product-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:none;gap:12px}
 .studio-mini-card{display:flex;flex-direction:column;gap:0;min-height:0}.studio-mini-photo{min-height:125px;padding:12px}.studio-mini-photo img{height:120px}.studio-mini-info{padding:13px;flex:1}.studio-mini-info h3{font-size:12px;-webkit-line-clamp:3}.studio-mini-link{min-height:40px}.studio-mini-price{font-size:17px}
 .history-panel{margin:30px 0}.history-panel h2{font-size:27px}.history-panel>p{font-size:12px}
 #shoppingScreen .shopping-layout{grid-template-columns:1fr;gap:22px}#shoppingScreen .shopping-photo{height:360px}.shopping-heading{margin-bottom:20px}
 .preserved-strip{padding:18px;display:block}.preserved-strip strong{font-size:15px}.preserved-strip p{font-size:12px}.preserved-strip button{min-height:44px;font-size:12px}
 .room-products-panel{position:static;padding:20px 15px}#roomProductCards{max-height:none;overflow:visible}.room-products-panel h2{font-size:28px}
 .room-product-card{grid-template-columns:85px minmax(0,1fr);gap:13px;padding:12px}.room-item-crop{height:105px}.room-product-card h3{font-size:14px}.room-item-label{font-size:9px}
 .room-item-details{margin-left:-98px;padding-top:4px}.room-item-details summary{font-size:12px}.room-item-details select{font-size:16px;width:100%}.room-product-card .room-item-price{font-size:14px}.room-item-link{font-size:11px;min-height:44px}
 .catalog-connection input{font-size:16px}.catalog-connection p{font-size:12px}.room-products-tools label{font-size:12px}.room-products-tools input{width:19px;height:19px;flex-shrink:0}
 dialog,.preparation-dialog,.room-chat-dialog{padding:20px;width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 28px);border-radius:10px}
 dialog h2{font-size:25px}.preparation-dialog input,.preparation-dialog select{font-size:16px}.catalog-filter-grid{grid-template-columns:1fr 1fr;gap:14px 12px}.catalog-filter-field:has(#productSearch){grid-column:1/-1;grid-row:1}.catalog-filter-field:has(#catalogBrowserCity){grid-column:1/-1}
 #catalogBrowserItems{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.preparation-products article{padding:12px}.preparation-products img{height:130px}.preparation-products a{font-size:13px}.preparation-products p{font-size:11px}#catalogBrowserItems .button{width:100%;margin:6px 0 0;padding:10px 6px}
 #photoProductImage{background:#f1ece4;border-radius:6px}#photoProductLink{display:flex;align-items:center;justify-content:center;width:100%}
}
@media(max-width:370px){.header .studio-service-menu{display:none}.studio-heading h1,.shopping-heading h1{font-size:29px}.studio-product-cards{gap:9px}.studio-mini-info{padding:10px}.studio-mini-price{font-size:15px}.studio-mini-photo img{height:100px}.room-product-card{grid-template-columns:70px minmax(0,1fr)}.room-item-details{margin-left:-83px}#catalogBrowserItems{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

#catalogBrowserItems article{display:flex;flex-direction:column}
#catalogBrowserItems .catalog-card-retailer{font-size:10px;letter-spacing:1px;margin:13px 0 0}
#catalogBrowserItems .catalog-card-price{font-size:19px;font-weight:600;color:var(--ink);margin:13px 0 6px}
#catalogBrowserItems .catalog-card-availability{font-size:11px;margin:0 0 9px;line-height:1.6}
.catalog-card-details{border-top:1px solid var(--line);margin-top:auto}
.catalog-card-details summary{font-size:11px;line-height:1.6;min-height:44px;padding:12px 0;color:var(--accent);cursor:pointer}
.catalog-card-actions{display:flex;flex-direction:column;gap:7px;margin-top:8px}
#catalogBrowserItems .catalog-card-actions .button{width:100%;margin:0;min-height:44px}
#catalogBrowserItems .catalog-card-actions .button:first-child{background:var(--accent);border-color:var(--accent);color:#fffdf9}
@media(max-width:800px){#catalogBrowserItems a{font-size:12px}#catalogBrowserItems .catalog-card-price{font-size:17px}.catalog-card-details summary{font-size:10px}.catalog-card-actions .button{font-size:11px!important}}

.transform-result .label-after{left:auto!important;right:14px;top:16px}
.shopping-selection-summary{display:flex;align-items:center;gap:14px;justify-content:space-between;padding:16px 0}
.shopping-selection-summary #shoppingTotal{font-size:12px;line-height:1.7;margin:0;color:var(--ink)}
.shopping-selection-summary .button{flex-shrink:0;background:var(--accent);color:#fffdf9;font-size:12px}
.shopping-options{border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:0 0 18px}
.shopping-options>summary{font-size:12px;line-height:1.7;min-height:46px;padding:13px 0;color:var(--accent);cursor:pointer}
.shopping-options .catalog-connection{margin-bottom:16px}
@media(max-width:800px){.shopping-selection-summary{gap:10px}.shopping-selection-summary #shoppingTotal{font-size:11px}.shopping-selection-summary .button{padding:10px;font-size:11px}.transform-result .label-after{display:none}}
@media(max-width:800px){.header nav{display:flex!important}.studio-product-pin{width:32px;height:32px}.studio-product-pin::after{content:"";position:absolute;inset:-6px;border-radius:50%}.room-product-zone::after{content:"";position:absolute;inset:-4px;border-radius:50%}}

/* Preserve full price/provenance/component notes inside the scrollable list. */
.studio-mini-card{flex-shrink:0}
.studio-mini-label{margin:2px 0 6px;overflow-wrap:anywhere}

/* A direct product lookup needs the whole column for its specifications. */
#catalogBrowserItems>article:only-child{grid-column:1/-1}
@media(max-width:800px){
 #catalogBrowserItems>article:only-child a{font-size:16px}
 #catalogBrowserItems>article:only-child .catalog-card-details p{font-size:13px;line-height:1.65}
 #catalogBrowserItems>article:only-child .catalog-card-details summary{font-size:13px}
 #catalogBrowserItems>article:only-child img{height:180px}
}
.catalog-source-details{border-bottom:1px solid var(--line);margin:0 0 18px}
.catalog-source-details summary{font-size:12px;min-height:44px;display:flex;align-items:center;gap:8px;cursor:pointer;color:var(--accent)}
.catalog-source-details summary::before{content:'+';font-size:16px}
.catalog-source-details[open] summary::before{content:'−'}
.catalog-source-details p{font-size:12px;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere;margin:0 0 16px}

#studioBudget{width:100%;box-sizing:border-box}#studioBudgetHint{grid-column:1/-1;margin:0 0 12px}#studioBudget:invalid:not(:focus){border-color:#aa3847}

/* A missing retailer image must not turn the product name into a fake photo. */
#catalogBrowserItems .catalog-card-photo{height:170px;display:flex;align-items:center;justify-content:center;background:#f5f0e9;border-radius:4px;overflow:hidden}
#catalogBrowserItems .catalog-card-photo img{width:100%;height:100%;min-width:0;min-height:0;object-fit:contain}
#catalogBrowserItems .catalog-card-photo img[hidden],.catalog-photo-unavailable[hidden]{display:none}
.catalog-photo-unavailable{padding:20px;text-align:center;font-size:12px;line-height:1.5;color:var(--muted)}
@media(max-width:480px){
 #catalogBrowserItems{grid-template-columns:minmax(0,1fr)}
 #catalogBrowserItems .catalog-card-photo{height:180px}
 #catalogBrowserItems a{font-size:14px}
 #catalogBrowserItems .catalog-card-details p{font-size:12px}
}
.project-backup-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:12px 0 20px}
.project-backup-actions p{flex-basis:100%;margin:0;color:var(--muted);font-size:13px}
#projectImportDialog{max-width:min(520px,calc(100vw - 32px));box-sizing:border-box}
#projectImportDialog p{line-height:1.65}
@media(max-width:480px){.project-backup-actions .button{width:100%}}

/* Calm hierarchy and comfortable navigation for the working studio. */
.studio-form-intro{font-size:12px;line-height:1.7;color:var(--muted);margin:-7px 0 20px}
.studio-step-heading{display:flex;align-items:center;gap:9px;font:600 12px/1.5 var(--font);margin:24px 0 16px;padding-top:20px;border-top:1px solid var(--line)}
.studio-step-heading span{font-size:10px;letter-spacing:1px;color:var(--accent);background:#e9dcda;border-radius:50%;width:28px;height:28px;display:grid;place-items:center;flex-shrink:0}
.studio-budget-field{position:relative}.studio-budget-field #studioBudget{width:100%;padding-right:38px;font-size:18px;font-weight:500;font-variant-numeric:tabular-nums;appearance:textfield}
.studio-budget-field #studioBudget::-webkit-inner-spin-button{appearance:none}
.studio-budget-field>span{position:absolute;right:15px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.transform-controls :is(input,textarea,select):focus{border-color:#a8636d;box-shadow:0 0 0 3px #742e3810}
.transform-controls textarea{resize:vertical;max-height:420px}
#studioHistory{scroll-margin-top:24px}
.version-history{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x proximity;padding:4px 3px 14px;scrollbar-color:#c9bbae transparent}
.version-card{position:relative;flex:0 0 165px;scroll-snap-align:start;border:1px solid var(--line);transition:border-color .15s,box-shadow .15s}
.version-card img{width:100%;height:125px;object-fit:cover}
.version-card[aria-pressed=true]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.version-card[aria-pressed=true]::after{content:'Выбран';position:absolute;top:13px;left:13px;background:#fffdf9f2;color:var(--accent);padding:5px 8px;border-radius:3px;font-size:10px;font-weight:600}
.version-card:hover{border-color:#a8636d}.version-card span{display:block;line-height:1.6}
#catalogBrowserDialog{scroll-padding-top:85px}
#catalogBrowserDialog>.dialog-heading{position:sticky;top:-28px;background:#fffdf9;z-index:2;margin:-1px -1px 20px;padding:14px 0;border-bottom:1px solid var(--line)}
#catalogBrowserDialog .catalog-filter-field input:focus,#catalogBrowserDialog .catalog-filter-field select:focus{border-color:#a8636d}
@media(min-width:801px){.transform-controls.panel{max-height:min(1100px,calc(100dvh - 50px));overscroll-behavior:contain}.history-panel{border-top:1px solid var(--line);padding-top:28px}}
@media(max-width:800px){
 .studio-jump-nav{position:sticky;top:0;z-index:12;background:#f8f5eff5;backdrop-filter:blur(12px);box-shadow:0 6px 12px #30211506}
 .studio-jump-nav a{font-size:12px;min-height:48px;display:flex;align-items:center;justify-content:center}
 #studioPreferences,#studioResult,#studioSelection,#studioHistory,#shoppingPhotoSection,#shoppingProductsSection{scroll-margin-top:66px}
 .studio-form-intro{font-size:13px;max-width:31ch}.studio-step-heading{font-size:14px;margin-top:26px;padding-top:22px}
 .transform-controls .form-label{font-size:13px}.transform-controls :is(select:not(.native-style-select),input[type=text],textarea){font-size:16px;line-height:1.6}
 .transform-controls .generation-status,.generation-consent{font-size:12px;line-height:1.7}
 .transform-controls #generateRoom{min-height:54px;font-size:15px}
 .history-panel{padding-top:24px;border-top:1px solid var(--line)}
 .version-history{margin-right:-5vw;padding-right:5vw;gap:12px}.version-card{flex-basis:158px}.version-card span{font-size:12px}
 #catalogBrowserDialog>.dialog-heading{top:-18px;padding:12px 0;gap:10px}
 #catalogBrowserDialog>.dialog-heading h2{font-size:24px}
 #catalogBrowserItems .catalog-card-price{font-size:20px}
 #catalogBrowserItems .catalog-card-actions .button{font-size:13px!important;min-height:48px}
}
@media(prefers-reduced-motion:reduce){.version-card{transition:none}}
@media(max-width:480px){
 #catalogBrowserDialog .catalog-filter-grid{grid-template-columns:1fr;gap:16px}
 #catalogBrowserDialog .catalog-filter-field select{width:100%}
 #catalogRunSearch{width:100%;min-height:50px;font-size:14px}
}

/* Local photo preparation is visible and cancellable before any AI request. */
.photo-import-status:empty{display:none}
.room-photo-collection .photo-import-status{font-size:12px;line-height:1.65;color:var(--accent);margin:10px 0;overflow-wrap:anywhere}
#cancelPhotoImport{min-height:44px;font-size:12px;color:var(--accent)}
#roomPhotoStrip[aria-busy=true]{opacity:.65}

/* One page scroll keeps the complete brief and its action reachable. */
@media(min-width:801px){
 .transform-controls.panel{max-height:none;overflow:visible;overscroll-behavior:auto}
}
@media(max-width:800px){
 /* Before an upload, lead with the user's first task rather than a demo result. */
 #studioScreen[data-example=true] .transform-controls,
 #studioScreen:has(#afterImage[hidden]):not(:has(#generationOverlay:not([hidden]))) .transform-controls{order:-2}
}
/* The account prompt already explains the next action to a guest. */
body[data-authenticated=false] #generationAvailability,
body[data-authenticated=false] #generationStatus{display:none}
.studio-budget-field #studioBudget{border:1px solid #d8cec0;border-radius:5px;background:#fffdf9}
@media(min-width:1280px){.transformation{grid-template-columns:288px minmax(0,1fr) 290px}}
@media(min-width:1151px) and (max-width:1279px){
 .transformation{grid-template-columns:288px minmax(0,1fr)}
 .studio-products.panel{grid-column:1/-1;max-height:none}
 .studio-product-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-height:none}
 .studio-mini-card{display:flex;flex-direction:column;gap:0}
 .studio-mini-info{padding:12px}
}
@media(min-width:1280px) and (min-height:850px){.transform-result.panel{position:sticky;top:16px}}
.generation-overlay-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;max-width:100%}
.generation-overlay-actions .button{margin-top:10px;min-height:44px;max-width:100%}
.new-generation-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
.new-generation-actions .button{min-height:48px;white-space:normal;flex:1 1 200px}
@media(max-width:480px){.generation-overlay-actions{gap:8px}.generation-overlay-actions .button{font-size:12px;padding:9px 12px;margin-top:6px}.new-generation-actions{flex-direction:column}.new-generation-actions .button{flex:auto;width:100%}}
.studio-selection-context{display:none;font-size:12px;line-height:1.65;color:var(--accent);padding:12px;border:1px solid #d9c5c5;border-radius:5px;background:#f6eeea;margin:0}
#studioScreen:has(#generationFeedback[data-state=busy]:not([hidden])) #studioSelection:has(#studioProductsCount:not(:empty)) .studio-selection-context{display:block}
.studio-mini-photo img[hidden],.studio-photo-unavailable[hidden]{display:none}
.studio-photo-unavailable{font-size:11px;line-height:1.6;text-align:center;color:var(--muted);padding:12px;display:block}
.dialog-heading>h2{min-width:0;overflow-wrap:anywhere}
.dialog-heading>.dialog-close{flex-shrink:0}
#photoProductTitle{overflow-wrap:anywhere}
.catalog-pagination{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:18px}
#catalogPaginationStatus{flex-basis:100%;font-size:12px;line-height:1.7;color:var(--accent);margin:0}
#catalogPaginationStatus:empty{display:none}
@media(max-width:480px){.catalog-pagination .button{width:100%;min-height:48px}}

.room-scenario-choices{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.room-scenario-choices button{min-height:44px;background:#f8f6f1;border:1px solid #ded6cb;color:#7f2432;border-radius:6px;padding:8px 12px;font:inherit}#compareRoomVersionsDialog select{display:block;min-height:44px;width:100%;margin:8px 0 16px}#downloadRoomProposal{display:block;margin:16px 0}

#replacementSearchForm select,#replacementSearchForm textarea{box-sizing:border-box;width:100%;min-height:44px;font:inherit;padding:10px;border:1px solid #ded6cb;border-radius:6px;margin:8px 0 18px}#replacementStatus{font-size:14px;line-height:1.7;color:#655d55}.studio-mini-info button.studio-mini-link{min-height:44px;text-align:left;padding:8px 0}

/* Approval must stay readable before the customer starts a paid render. */
#preparationDialog{overflow-wrap:anywhere;overscroll-behavior:contain}
#preparationDialog form,#preparationDialog .preparation-products{min-width:0}
@media(max-width:600px){
 #preparationDialog .dialog-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 #preparationDialog .dialog-actions .button{width:100%;min-height:48px;white-space:normal}
}
