/* V154 shared app scale; production behavior and server records remain authoritative. */
:root{--ui-title:26px;--ui-section:20px;--ui-card:15px;--ui-body:13px;--ui-caption:11px;--ui-muted:#888}
button,input,textarea,select{font-family:inherit}button{line-height:1.45}button svg{flex-shrink:0}button:disabled{cursor:default}input,textarea,select{max-width:100%}
.screen>.topbar h1:not(.brand),body[data-page=designer] .chat-header h1{font-family:Arial,"Microsoft YaHei",sans-serif;font-size:var(--ui-title);line-height:1.25;font-weight:650;letter-spacing:-.5px}
.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;height:auto;padding:11px 16px;border-radius:12px;font-size:13px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}.full{width:100%}
.profile-v154.member-profile{display:block;margin:12px 0 24px}.profile-v154 .profile-header{display:flex;align-items:center;gap:16px;margin:8px 0 24px}.profile-v154 .profile-header>div{min-width:0;flex:1}.profile-v154 .member-avatar{width:64px;height:64px;flex:none;background:#f3f3ef;border:0}.profile-v154 .member-avatar svg{width:28px;height:28px}.profile-v154 h2{margin:0 0 6px;font-size:21px;line-height:1.35}.profile-v154 .profile-header p{font-size:12px;color:#888;line-height:1.6;margin:3px 0;overflow-wrap:anywhere}.profile-v154 .profile-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:24px}.profile-actions button{min-width:0;font-weight:500}.profile-credit-card{border:1px solid #e6e6e6;border-radius:18px;padding:20px;margin:0 0 24px}.profile-credit-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.profile-credit-heading h3{margin:0;font-size:15px;font-weight:600;line-height:1.5}.profile-credit-heading svg{width:21px;height:21px;color:#888}.profile-credit-balance{display:flex;align-items:baseline;flex-wrap:wrap;gap:9px;margin:18px 0}.profile-credit-balance strong{font-size:28px;line-height:1.2;font-weight:600}.profile-credit-balance span{font-size:12px;color:#888}.profile-credit-card button{background:#181818;color:white;border:0}.profile-v154 .member-menu{border:0;border-radius:0}.profile-v154 .member-menu button{padding:17px 0;min-height:56px;border-bottom:1px solid #f0f0f0;gap:14px}.profile-v154 .member-menu button span{min-width:0;font-size:14px;line-height:1.5}.profile-v154 .member-menu button>svg{width:21px;height:21px}.profile-v154 .member-menu button>svg:last-child{width:15px;height:15px}
.library-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 18px}.library-section-heading h2{font:600 var(--ui-section)/1.35 Arial,"Microsoft YaHei",sans-serif;margin:0;min-width:0;overflow-wrap:anywhere;flex:1}.library-section-action{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 1 auto;max-width:55%;height:auto;min-height:44px;padding:10px 13px;border-radius:12px;line-height:1.45;font-size:12px;white-space:normal;overflow:visible;overflow-wrap:normal}.library-section-action>span:first-child{flex:none}.library-section-action>span:last-child{min-width:0}.creation-tabs{display:flex;width:100%;box-sizing:border-box;overflow:visible}body[data-page=saved] .creation-tabs button{flex:1 1 0;min-width:0;min-height:48px;height:auto;font-size:11px;padding:12px 3px;line-height:1.5;white-space:normal;overflow-wrap:normal;text-overflow:clip}.library-card-copy strong{font-size:15px;line-height:1.45;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.library-card-copy small{font-size:11px;line-height:1.6}.library-card-menu button{font-size:13px;line-height:1.5;padding:10px 14px}.library-card-menu button[data-act^="project-delete"]{color:#b0473b}.library-card-warning{margin:0}.library-card .design-task-status,.library-card .model-task-status{overflow-wrap:anywhere}.library-card .load-feedback{display:flex;flex-wrap:wrap;align-items:center;min-width:0}.library-card .load-feedback progress{min-width:0;max-width:100%;flex:1 1 80px}
.nav{display:flex;box-sizing:border-box}.nav button{flex:1 1 0;min-width:0;max-width:25%;padding-inline:2px;white-space:normal;line-height:1.35;font-size:11px}.nav button svg{flex:none}.settings-page .profile-links button>span{min-width:0}.settings-page .profile-links b,.settings-page .profile-links small{white-space:normal;overflow-wrap:anywhere}.settings-info{min-width:0;overflow-wrap:anywhere}
.composition-header{height:auto;min-height:60px;gap:10px}.composition-header>a{flex:none;width:32px}.composition-header strong{min-width:0;flex:1}.composition-header button{flex:none;max-width:42%;min-height:44px;white-space:normal;line-height:1.4;text-align:right;padding:8px 0}.composition-heading{gap:10px}.composition-heading h2{min-width:0;font-size:20px}.composition-add{flex:none;min-height:40px}.composition-item small{max-width:calc(100% - 16px);line-height:1.5}.model-info h2{font-size:20px;line-height:1.4}.model-info button{height:auto;white-space:normal;line-height:1.5}.model-header h1{min-width:0;overflow-wrap:anywhere}.model-info label{line-height:1.5}.detail-edit-actions button{min-width:0}.publication-form header{gap:12px}.publication-form header h2{min-width:0;line-height:1.4}.publication-form header button{flex:none}.publication-form .ai-copy-icon{background:#fafafa}.publication-form [data-copy-candidate]{min-width:0;overflow-wrap:anywhere}.publication-form [data-copy-candidate][hidden]{display:none}.publication-form .save-publish-option span{font-size:13px;line-height:1.5}
@media(max-width:600px){.screen{padding-bottom:calc(84px + env(safe-area-inset-bottom))}.topbar{min-height:60px;height:auto;gap:12px}.topbar>strong{min-width:0;line-height:1.4}.topbar>button{flex:none}.profile-v154 .profile-header{gap:14px}.library-section-heading h2{font-size:20px}.creation-grid.model-library-grid{gap:12px}.product-header{grid-template-columns:44px minmax(0,1fr) 44px}.product-header h1{font-size:20px;white-space:normal}.generation-form .quality-cards{min-width:0}.quality-cards button{min-width:0;height:auto;white-space:normal;line-height:1.45}.quality-cards small{white-space:normal;line-height:1.5}.composition-footer button{min-height:46px}.app-search-field{min-width:0}.app-search-form{min-width:0}.app-type-filter{flex-shrink:0}.profile-v154 .profile-actions button{font-size:12px;padding-inline:8px}}
@media(max-width:350px){.library-section-action{font-size:11px;padding-inline:10px}.library-section-heading{gap:8px}.creation-tabs button{font-size:10px!important}.nav button{font-size:10px}.profile-v154 .profile-actions{gap:8px}}
.composition-footer{gap:10px;align-items:stretch}.composition-footer>.primary{flex:1 1 auto;width:auto;max-width:400px;border-radius:12px}.composition-footer>.composition-save{flex:0 0 110px;width:auto;max-width:140px;border:1px solid #d4d4d4;background:#fff;color:#181818;border-radius:12px;margin:0}.composition-generate .composition-notes,#composition-generate .composition-notes{margin:18px 0 20px}#composition-generate .composition-notes textarea{min-height:100px;resize:vertical}#composition-generate>p{font-size:12px;line-height:1.6;color:#888}@media(max-width:600px){.composition-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}.composition-footer>.composition-save{flex-basis:88px}.composition-footer>.primary{max-width:none}}
#furniture-sheet header button,.publication-form header button{display:grid;place-items:center;padding:0;line-height:1;width:34px;height:34px;min-height:34px;flex:0 0 34px;box-sizing:border-box}.composition-quantity button{display:grid;place-items:center;padding:0;line-height:1}.composition-tiers label{min-width:0;overflow-wrap:anywhere}.composition-scopes button{min-width:0;white-space:normal;line-height:1.5}.composition-choice-grid button{height:auto}.composition-choice-grid span{white-space:normal;line-height:1.45;margin-top:8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.profile-v154 .member-menu svg,.profile-v154 .member-avatar svg{flex:none}
body[data-page=designer] .live-chat-heading strong{font-size:26px;line-height:1.25;font-weight:650;letter-spacing:-.5px}body[data-page=designer] .live-chat-heading>div{min-width:0}body[data-page=designer] .chat-connection{flex:none;font-size:11px}.plan-actions{display:flex;flex-wrap:wrap;gap:8px}.plan-actions button{min-width:0;height:auto;white-space:normal;line-height:1.5}.inline-plan>div{min-width:0}.inline-plan h3{overflow-wrap:anywhere}
#filters>div:last-child{display:flex;flex-wrap:wrap;gap:10px}#filters>div:last-child button{flex:1;min-width:0;white-space:normal;font-size:13px;min-height:44px}.creation-grid>p:only-child{grid-column:1/-1;text-align:center;background:#f7f7f7;border-radius:16px;padding:32px 20px;font-size:13px;line-height:1.6;color:#888;margin:0}
@media(max-width:350px){.composition-tiers{gap:7px}.composition-tiers label{padding:12px 5px;font-size:12px;overflow-wrap:normal;word-break:normal}.composition-tiers b{font-size:12px;white-space:nowrap}.composition-tiers small{font-size:10px}}
.publication-form .ai-copy-icon{display:inline-flex;align-items:center;justify-content:center;gap:5px;width:auto;min-width:36px;max-width:calc(100% - 16px);height:34px;padding:5px 9px;margin:0;background:#fff;border:1px solid #eee;border-radius:18px;color:#76608e;font-size:11px;line-height:1.4;white-space:nowrap}.publication-form .ai-copy-icon svg{width:21px;height:21px;flex:none}.publication-form .ai-copy-icon span{min-width:0}.publication-form .description-input textarea{padding-bottom:52px}.publication-form .ai-copy-icon[aria-busy=true]{color:#888}
.publication-form .description-input{display:flex;flex-direction:column;border:1px solid #e5e5e5;border-radius:12px;background:#fafafa;overflow:hidden}.publication-form .description-input textarea{border:0;border-radius:0;background:transparent;min-height:112px;padding:12px;resize:none}.publication-form .description-input .ai-copy-icon{position:static;align-self:flex-end;margin:0 8px 8px;flex:none}.publication-form .description-input:focus-within{border-color:#999}
.atmosphere-options{margin:18px 0 20px}.atmosphere-options h3{font-size:14px;line-height:1.5;margin:0 0 5px;font-weight:600}.atmosphere-options>p{font-size:12px;color:#888;line-height:1.5;margin:0 0 12px}.atmosphere-tags{display:flex;flex-wrap:wrap;gap:8px}.atmosphere-tags button{min-height:34px;padding:7px 12px;border:1px solid transparent;border-radius:20px;background:#f5f5f3;color:#666;font-size:12px;line-height:1.5;white-space:normal}.atmosphere-tags button[aria-pressed=true]{background:#edf0e7;color:#34412b;border-color:#96a385}.atmosphere-tags button:focus-visible{outline:2px solid #718263;outline-offset:2px}#composition-generate .atmosphere-options .composition-notes{margin:12px 0 0}#composition-generate .atmosphere-options textarea{min-height:84px;margin:0}.atmosphere-options [role=alert]{display:block;color:#a44;font-size:12px;line-height:1.5;margin-top:6px}.atmosphere-options [role=alert]:empty{display:none}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:350px){.atmosphere-tags{gap:6px}.atmosphere-tags button{padding:6px 10px;font-size:11px}}
/* Detail and edit are separate routes with an always-visible navigation row. */
body.model-page{height:100dvh;overflow:hidden;background:#fff}body.model-page #model-detail{height:100dvh;max-width:1200px;display:flex;flex-direction:column;overflow:hidden;padding:0 24px;box-sizing:border-box}body.model-page #model-detail>.product-header{position:relative;z-index:20;flex:none;min-height:64px;margin:0;padding-top:env(safe-area-inset-top);background:#fff;border-bottom:1px solid #f0f0f0;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px}body.model-page .model-detail-layout{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;align-content:start;padding:20px 0 calc(24px + env(safe-area-inset-bottom));scrollbar-width:thin}body.model-page .model-error{overflow:auto;min-height:0}body.model-page .model-edit-page{flex:1;min-height:0;align-self:stretch;width:100%;max-width:640px;margin:0 auto;padding:24px 0 calc(20px + env(safe-area-inset-bottom));border:0;border-radius:0;overflow-y:auto;scrollbar-width:thin;overscroll-behavior:contain}body.model-page .model-edit-page form{gap:22px}body.model-page .model-edit-page fieldset{margin:0}body.model-page .model-edit-page form>p{font-size:12px;line-height:1.65;margin:0}body.model-page .model-edit-page .detail-edit-actions{position:sticky;bottom:0;background:#fffffff5;padding:12px 0 max(12px,env(safe-area-inset-bottom));margin-top:4px;z-index:2}body.model-page .model-edit-page button[type=submit]{min-height:46px;font-size:14px;border-radius:12px}body.model-page .model-edit-page [role=alert]:empty{display:none}@media(max-width:600px){body.model-page #model-detail{padding:0 16px}body.model-page #model-detail>.product-header{min-height:60px}body.model-page .model-detail-layout{gap:16px;padding-top:16px}body.model-page .model-edit-page{padding-top:22px}body.model-page .model-edit-page label{font-size:13px}body.model-page .model-edit-page input,body.model-page .model-edit-page select{font-size:16px;min-height:46px}body.model-page #model-detail>.product-header h1{font-size:20px;line-height:1.3}}
body.model-page .model-detail-layout{grid-auto-rows:max-content;grid-template-rows:max-content}body.model-page .model-preview-card{align-self:start;min-height:max-content}
.composition-footer>.composition-save{flex:0 1 40%;max-width:210px;min-width:0;padding:10px 12px;font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:normal}@media(max-width:600px){.composition-footer>.composition-save{flex:0 1 42%;padding-inline:10px;font-size:12px}}
