*{box-sizing:border-box}body{margin:0;background:#f5f1e9;color:#40372f;font:15px system-ui}button,input,textarea,select{font:inherit}button,a,select{cursor:pointer}button{border:0;border-radius:9px;padding:12px 20px;background:#8e563b;color:white}header{display:flex;align-items:center;justify-content:space-between;padding:22px 4%;border-bottom:1px solid #ddd3c5;background:#faf7f1}header b{letter-spacing:2px}small{display:block;color:#8c7e70;font-size:12px;margin-top:8px}nav{display:flex;gap:24px}a{color:inherit;text-decoration:none}nav a.active{color:#985c3c;border-bottom:2px solid;padding-bottom:10px}main{max-width:1180px;margin:48px auto;padding:0 24px}h1{font-size:36px;font-weight:500;margin:12px 0 24px}h2{font-size:20px;font-weight:500}.panel{background:#fffdf8;border:1px solid #e5dccf;border-radius:16px;padding:28px}.hero{display:grid;grid-template-columns:1fr 300px;gap:24px}textarea{width:100%;height:125px;resize:vertical;border:0;background:transparent;outline:none;padding:12px 0}select,input{padding:12px;border:1px solid #ded2c2;border-radius:8px;background:#fffdf8}footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.card{display:block;padding:24px;background:#fffdf8;border:1px solid #e5dccf;border-radius:12px}.card:hover{border-color:#a46b4a}.muted{color:#8b7c6c;line-height:1.8}.login{max-width:440px;margin:12vh auto}.login input{display:block;width:100%;margin:18px 0}.tag{font-size:12px;color:#976546;background:#eee4d6;padding:6px 10px;border-radius:20px}.roles{margin-top:32px}.roles span{display:inline-block;margin:6px;padding:7px;border:1px solid #ded2c2;border-radius:6px}button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:850px){header{flex-wrap:wrap;gap:24px}nav{gap:12px;flex-wrap:wrap}.hero{grid-template-columns:1fr}.cards{grid-template-columns:repeat(2,1fr)}main{margin:24px auto}h1{font-size:28px}}

.reply{margin-top:20px;line-height:1.8;white-space:pre-wrap}
.reply.pending{color:#8b7c6c}
.reply.error{color:#9a4a32}

.open-local{display:inline-block;margin-top:16px;padding:12px 20px;border-radius:9px;background:#8e563b;color:#fff}

.quote-chat .ask{padding:0;border:0;margin-top:24px}.quote-chat .ask h1{font-size:22px}.quote-chat footer{flex-wrap:wrap}.quote-output{position:sticky;top:24px;min-height:440px;overflow-wrap:anywhere}.quote-drop{border:2px dashed #b89c80;border-radius:12px;padding:24px;margin:16px 0;background:#f8f2e8}.quote-drop input{display:block;width:100%;margin-top:12px}.quote-previews{display:flex;flex-wrap:wrap;gap:10px}.quote-previews img{width:110px;height:110px;object-fit:contain;background:#eee7db;border-radius:8px}.quote-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.quote-fields input{display:block;width:100%;margin-top:6px}@media(max-width:760px){.quote-output{position:static}}

#customer-match{white-space:pre-wrap;line-height:1.8}.quote-drop:focus{outline:2px solid #8e563b;outline-offset:3px}.quote-drop input[type=file]{font-size:12px;border:0;background:transparent;padding:4px;margin-top:26px}.quote-drop:focus-within{border-color:#8e563b}
/* 报价内容与输入栏共用一个容器，仅内容区滚动。 */
.quote-chat{display:flex;flex-direction:column;height:calc(100dvh - 240px);min-height:420px;overflow:hidden;background:#fffdf8;border:1px solid #e5dccf;border-radius:16px}
.quote-chat .quote-content{display:flex;flex-direction:column;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:8px 0}
.quote-chat .quote-content>.panel{flex:none;width:100%;border:0;border-radius:0;background:transparent}
.quote-chat .quote-output{position:static;order:-1;min-height:0}
.quote-chat .composer{position:static;flex:0 0 auto;width:100%;min-width:0;padding:16px 26px;background:#f8f2e8;border:0;border-top:1px solid #e5dccf;border-radius:0;box-shadow:none;margin:0}
.composer textarea{height:90px}.composer footer{display:flex;flex-wrap:nowrap}.composer footer details{margin-right:auto;position:relative}.composer footer summary{list-style:none;font-size:30px;cursor:pointer}.composer footer select{border:0;background:transparent}.composer button[type=submit]{border-radius:50%;font-size:24px}.composer small{font-size:11px}.composer details[open]{background:white}.quote-chat .ask{margin-top:0}
.composer-previews{margin:4px 0 8px;max-height:88px;overflow:auto}.composer-previews img{width:72px;height:72px}

.module-refresh-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.module-refresh-heading button{flex:none}

.library-tree{margin-top:20px}.library-row{padding:7px 0}.library-row details>div{margin-left:22px;border-left:1px solid #e5dccf;padding-left:14px}.library-row summary{cursor:pointer;padding:8px 0}.library-row button{margin:3px 8px 3px 0}.library-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:65vh;overflow:auto}

header .account-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
header .account-tools a{color:#976546}
.account-settings label{display:block;margin:16px 0 8px}
.account-settings input{display:block;width:100%;max-width:360px;margin-top:8px}
.account-settings .ok{color:#3d6b4f}

html:has(main.board-frame-wrap),body:has(main.board-frame-wrap){height:100dvh;overflow:hidden;margin:0}
body:has(main.board-frame-wrap) #app{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}
body:has(main.board-frame-wrap) header{flex:none}
main.board-frame-wrap{flex:1 1 auto;max-width:none;width:100%;margin:0;padding:0;min-height:0;overflow:hidden;display:flex;flex-direction:column}
iframe.board-frame{display:block;width:100%;flex:1 1 auto;height:100%;min-height:0;border:0;background:#f4f1ea}

.hero:has(.chat-shell){grid-template-columns:minmax(0,1fr) 280px;align-items:start}
.hero .chat-shell{min-height:0;height:auto;background:transparent;border:0;overflow:visible;gap:12px}
.hero .chat-thread{flex:none;max-height:220px;padding:0 6px;overflow:auto}
.hero .chat-welcome h1{font-size:26px;font-weight:500;text-align:center;margin:8px 0 6px}
.hero .chat-welcome .muted{text-align:center;font-size:13px;margin:0 0 8px}
.hero .chat-composer{border:1px solid #e5dccf;border-radius:20px;padding:8px 14px 8px;background:#fff;box-shadow:0 8px 24px rgba(64,55,47,.06)}
.hero .chat-composer textarea{height:40px;min-height:40px;max-height:96px}
main:has(> .chat-shell),main:has(> .quote-page){max-width:1100px;margin:24px auto 0;padding:0 20px 24px}
main:has(> .chat-shell) .roles,main:has(> .quote-page) .roles{display:none}
.quote-page{display:flex;flex-direction:column;height:calc(100dvh - 110px);min-height:560px}
.quote-page>a{flex:none;margin-bottom:10px}
.quote-page .chat-shell{flex:1;min-height:0;height:auto}
.chat-shell{display:flex;flex-direction:column;min-height:520px;height:calc(100dvh - 130px);background:#fff;border:1px solid #e5dccf;border-radius:16px;overflow:hidden}
.chat-thread{flex:1;min-height:0;overflow:auto;padding:28px 32px 20px}
.chat-welcome h1{font-size:28px;margin:0 0 8px}
.chat-welcome .muted{margin:0 0 20px}
.chat-messages{display:flex;flex-direction:column;gap:16px}
.chat-msg{line-height:1.75;overflow-wrap:anywhere}
.chat-msg.user{align-self:flex-end;max-width:74%;background:#f3eee6;border-radius:16px 16px 4px 16px;padding:12px 16px;white-space:pre-wrap}
.chat-msg.assistant{align-self:stretch;background:#faf8f4;border:1px solid #ece6dc;border-radius:12px;padding:16px 20px;white-space:pre-wrap}
.chat-msg .chat-label{display:block;font-size:12px;color:#8c7e70;margin:0 0 8px}
.chat-msg.pending{color:#8b7c6c}
.chat-msg.error{color:#9a4a32;border-color:#ead5cc}
.chat-msg .thumbs{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 0}
.chat-msg .thumbs img{width:88px;height:88px;object-fit:contain;background:#eee7db;border-radius:8px}
.chat-msg .file-chip{display:inline-block;margin:6px 6px 0 0;padding:4px 8px;background:#eee4d6;border-radius:8px;font-size:12px}
.chat-files{margin-top:12px}
.chat-files a{margin-right:12px}
.chat-tools{margin:0 0 18px;padding:12px 16px;background:#f8f2e8;border:1px solid #e5dccf;border-radius:12px}
.chat-tools summary{cursor:pointer;font-weight:500}
.chat-tools .quote-fields,.chat-tools label{margin-top:10px}
.chat-composer{flex:none;border-top:1px solid #ece6dc;padding:10px 16px 12px;background:#fff}
.chat-composer textarea{width:100%;min-height:44px;max-height:160px;height:48px;resize:none;padding:8px 4px;border:0;background:transparent}
.chat-composer footer{display:flex;align-items:center;gap:8px;margin-top:4px}
.chat-spacer{flex:1}
.chat-icon{width:36px;height:36px;padding:0;border-radius:50%;background:transparent;color:#5c5148;font-size:20px;line-height:1}
.chat-icon:hover{background:#f3eee6}
.chat-voice{width:36px;height:36px;padding:0;border-radius:50%;background:#161616;color:#fff;display:inline-flex;align-items:center;justify-content:center;flex:none}
.chat-voice svg{width:18px;height:18px;fill:currentColor;display:block}
.chat-voice:hover{background:#000;color:#fff}
.chat-voice.is-listening{background:#c4472c;color:#fff}
.chat-voice.is-listening svg{animation:voice-pulse 1s ease-in-out infinite}
@keyframes voice-pulse{50%{transform:scale(1.12)}}
.chat-voice-hint{margin:4px 4px 0;font-size:12px;color:#8c7e70}
.chat-send{width:36px;height:36px;padding:0;border-radius:50%;background:#8e563b;color:#fff;font-size:18px;line-height:1}
.chat-model{display:flex;align-items:center;gap:6px;font-size:12px;color:#8c7e70;white-space:nowrap}
.chat-model select{border:0;background:transparent;padding:4px 8px;color:#40372f;max-width:min(52vw,16em)}
.composer-previews{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 6px}
.composer-previews img{width:72px;height:72px;object-fit:contain;background:#eee7db;border-radius:8px}
.composer-previews .file-chip{padding:6px 8px;background:#eee4d6;border-radius:8px;font-size:12px}
@media(max-width:850px){
  .hero:has(.chat-shell){grid-template-columns:1fr}
  .hero .chat-shell{height:auto;min-height:0}
  main:has(> .chat-shell) .chat-shell{height:calc(100dvh - 220px);min-height:420px}
}

.library-preview{background:#fff;border:1px solid #e5dccf;border-radius:16px;padding:28px 32px;margin-top:20px;max-height:70vh;overflow:auto}
.library-doc h1{font-size:28px;margin:0 0 16px}
.library-doc h2,.library-doc h3,.library-doc h4{margin:22px 0 8px;font-weight:650}
.library-doc p,.library-doc li{line-height:1.75;color:#3d3935}
.library-doc table{border-collapse:collapse;width:100%;margin:12px 0 18px;font-size:14px}
.library-doc th,.library-doc td{border:1px solid #e5dccf;padding:8px 10px;text-align:left;vertical-align:top}
.library-doc th{background:#f8f2e8}
.library-doc pre{white-space:pre-wrap;background:#f8f2e8;border-radius:8px;padding:12px;overflow:auto}
.library-doc code{font-family:ui-monospace,monospace;font-size:13px}

.library-split{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start;margin-top:16px}
@media (max-width:900px){.library-split{grid-template-columns:1fr}}
.library-pane{min-width:0;background:#fbf8f3;border:1px solid #e5dccf;border-radius:18px;padding:18px 20px 22px}
.library-pane>h2{margin:0 0 6px;font-size:20px}
.library-file-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin-bottom:14px}
.library-download{display:inline-block;padding:6px 14px;border-radius:999px;background:#40372f;color:#fff;text-decoration:none}
.library-pdf{width:100%;height:70vh;border:0;background:#fff;border-radius:12px}
.library-image{display:block;max-width:100%;height:auto;border-radius:12px;background:#fff}

body.library-fs-lock{overflow:hidden}
.library-action-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:16px 0 0;padding:10px 14px;background:#fffdf8;border:1px solid #e5dccf;border-radius:12px;position:sticky;top:0;z-index:5}
.library-action-count{color:#6f6a64;font-size:13px}
.library-action-status{color:#3d3935;font-size:13px;flex:1;min-width:12em;line-height:1.45}
.library-forward{padding:8px 16px;background:#40372f;color:#fff}
.library-forward:disabled{opacity:.45;cursor:not-allowed}
.library-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.library-check{width:16px;height:16px;accent-color:#40372f;flex:none;margin:0}
.library-file-open{background:transparent;color:#40372f;padding:4px 0;text-align:left;border-radius:0}
.library-file-open:disabled{opacity:.5}
.library-row.is-open>.library-file-open{font-weight:650}
.library-inline-preview{margin:4px 0 12px;padding:14px 16px 16px}
.library-fullscreen,.library-close-preview{padding:6px 14px;background:#eee4d6;color:#40372f}
.library-preview.is-fs{position:fixed;inset:0;z-index:80;max-height:none;width:100%;margin:0;border-radius:0;padding:16px 20px 20px;background:#fff;display:flex;flex-direction:column;border:0}
.library-preview.is-fs .library-file-bar{flex:none}
.library-preview.is-fs .library-pdf{flex:1 1 auto;height:auto;min-height:0}
.library-preview.is-fs .library-image{max-width:100%;max-height:calc(100dvh - 90px);margin:0 auto;object-fit:contain}
.library-preview.is-fs .library-doc,.library-preview.is-fs>pre,.library-preview.is-fs>table,.library-preview.is-fs>section{flex:1;min-height:0;overflow:auto}

main.key-board-wrap,main:has(> .key-board){max-width:1180px;margin:24px auto 40px;padding:0 24px}
.key-board-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:18px}
.key-board-head h1{margin:0}
.key-board-head .eyebrow{font-size:11px;letter-spacing:.14em;color:#8c7e70;margin:0 0 2px}
.key-board-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;font-size:12px;color:#6f6a64;max-width:42em}
.key-board-tools button{padding:6px 12px;background:#2a2622}
a.kb-full{color:#976546;text-decoration:underline}
.kb-section{background:#fffdf8;border:1px solid #e5dccf;border-radius:16px;padding:18px 20px 16px;margin:0 0 14px}
.kb-section>h2{font-size:20px;margin:0 0 6px}
.kb-section>.muted{margin:0 0 12px}
.kb-boss-grid{display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:18px}
@media(max-width:900px){.kb-boss-grid{grid-template-columns:1fr}}
.kb-boss-grid h3,.kb-share h3,.kb-kpi-item h3{font-size:12px;color:#7a5c38;margin:0 0 8px;font-weight:650;letter-spacing:.04em}
.kb-list{margin:0;padding-left:18px}
.kb-list li{font-size:14px;margin:0 0 8px;color:#3d3935;line-height:1.55}
.kb-who{font-weight:650;color:#2a2622}
.kb-redline{background:#f6e6dc;border-radius:10px;padding:8px 12px;margin:0 0 12px;line-height:1.55}
.kb-cards,.kb-lines{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media(max-width:850px){.kb-cards,.kb-lines{grid-template-columns:1fr}}
.kb-card,.kb-wish{background:#f8f2e8;border:1px solid #e5dccf;border-radius:12px;padding:12px 14px}
.kb-card h3,.kb-wish strong{margin:0 0 4px;font-size:15px}
.kb-card p,.kb-wish p{margin:0;font-size:13px;line-height:1.55;color:#3d3935}
.kb-who-line{color:#6f6a64 !important;margin-bottom:6px !important}
.kb-card-top{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:6px}
.kb-badge{font-size:10px;border-radius:999px;padding:1px 7px;font-weight:600;background:#eeebe6;color:#5e5a56}
.kb-badge.P0,.kb-badge.红灯,.kb-badge.全力突击,.kb-badge.需招人,.kb-badge.部分停滞{background:#f6e6dc;color:#9a4f2a}
.kb-badge.P1,.kb-badge.黄灯,.kb-badge.待确认,.kb-badge.改口径,.kb-badge.可达成{background:#f6efd9;color:#8a6a1c}
.kb-badge.P2,.kb-badge.进行中,.kb-badge.有正式进度,.kb-badge.今日已取数,.kb-badge.已交齐,.kb-badge.已超额{background:#e7f3ec;color:#2f6b4f}
.kb-kpi{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin:8px 0 12px}
@media(max-width:850px){.kb-kpi{grid-template-columns:1fr}}
.kb-kpi-item{background:#f8f2e8;border-radius:12px;padding:12px 14px}
.kb-kpi-num{font-size:18px;font-weight:650;margin:0 0 4px}
.kb-share{margin-top:8px}
.kb-table{width:100%;border-collapse:collapse;font-size:12px;margin-top:8px}
.kb-table th,.kb-table td{border:1px solid #e5dccf;padding:6px 8px;text-align:left}
.kb-table th{background:#f8f2e8}
.kb-wishes{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px}
.kb-months{margin-top:10px}
#kb-status{display:block;width:100%}

html,body,#app{max-width:100%}
#app,main,.library-pane,.library-preview,.key-board,.panel,.hero,.cards,.library-split{min-width:0}
.table-scroll{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;margin:8px 0 16px}
.library-doc table,.library-preview table,.kb-table{width:max-content;min-width:100%;max-width:none;table-layout:auto}
.library-preview table{overflow-wrap:normal;white-space:normal;margin:0}
.library-doc th,.library-doc td,.library-preview table th,.library-preview table td,.kb-table th,.kb-table td{white-space:pre-wrap;word-break:keep-all;overflow-wrap:normal;min-width:5.5em;max-width:22em}
.library-preview table th,.library-doc th,.kb-table th{white-space:nowrap;max-width:none}
@media(max-width:850px){
  header{padding:12px 4%;padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));gap:12px}
  nav{width:100%;gap:10px 16px}
  main{margin:16px auto;padding:0 14px;padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
  main.key-board-wrap,main:has(> .key-board){margin:16px auto;padding:0 14px;padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
  .panel,.library-pane{padding:14px}
  .library-preview{padding:12px;margin-top:12px}
  .library-inline-preview{padding:10px;margin:4px 0 10px}
  .library-row details>div{margin-left:12px;padding-left:10px}
  .library-doc h1{font-size:22px}
  .quote-fields{grid-template-columns:1fr}
  .library-pdf{height:55vh}
  .library-preview.is-fs{padding:12px;padding-top:max(12px,env(safe-area-inset-top))}
  header #logout{padding:8px 12px}
  .login{margin:8vh 14px;max-width:none}
}
@media(max-width:480px){
  .cards{grid-template-columns:1fr}
  h1{font-size:24px}
  .kb-wishes{grid-template-columns:1fr}
}

header{display:grid;grid-template-columns:1fr auto;grid-template-areas:"brand account" "nav nav";align-items:center;column-gap:16px;row-gap:8px}
header>div:first-child{grid-area:brand;min-width:0}
header nav{grid-area:nav}
header .account-tools{grid-area:account;position:relative;justify-self:end;align-self:start;display:flex;justify-content:flex-end;flex-wrap:nowrap;z-index:30;margin:0}
.account-name{background:#eee4d6;color:#976546;padding:6px 12px;border-radius:20px;font-size:13px;font-weight:600;line-height:1.3;max-width:42vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:148px;background:#fffdf8;border:1px solid #e5dccf;border-radius:12px;box-shadow:0 10px 24px rgba(64,55,47,.12);padding:6px;display:flex;flex-direction:column;gap:2px;z-index:40}
.account-menu[hidden]{display:none}
.account-menu a,.account-menu button{display:block;width:100%;text-align:left;padding:10px 12px;border-radius:8px;background:transparent;color:#40372f;font-size:14px}
.account-menu a:hover,.account-menu button:hover{background:#f8f2e8}
.account-menu #logout{background:transparent;color:#9a4a32;padding:10px 12px}
@media(min-width:851px){
  header{grid-template-columns:auto 1fr auto;grid-template-areas:"brand nav account";align-items:center}
  header nav{justify-content:flex-start}
  header .account-tools{align-self:center}
}

@media(max-width:850px){
  .chat-model{white-space:normal;flex-wrap:wrap}
  .chat-model select{max-width:100%}
}

.product-matches{margin:12px 0 4px;max-height:min(72vh,820px);overflow:auto;-webkit-overflow-scrolling:touch}
.product-matches-note{margin:0 0 8px;font-size:13px}
.product-list{display:flex;flex-direction:column;gap:8px}
.product-pick{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:#fffdf8;color:#40372f;border:1px solid #e5dccf;border-radius:10px;padding:8px 12px}
.product-pick:hover,.product-pick.is-on{border-color:#8e563b;background:#f8f2e8}
.product-pick img{width:64px;height:64px;object-fit:contain;background:#f3eee6;border-radius:8px;flex:none}
.product-pick .product-copy{flex:1;min-width:0}
.product-model{font-weight:650;color:#40372f}
.product-brand,.product-meta{color:#8b7c6c;font-size:13px}
.product-price{margin-left:auto;font-weight:600;color:#8e563b}
.quote-sheet{background:#fff;border:1px solid #e5dccf;border-radius:12px;padding:16px 16px 12px;margin-top:8px}
.quote-sheet-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}
.quote-sheet-head h3{margin:0;font-size:18px;font-weight:650}
.quote-sheet-sub{margin:4px 0 0;color:#8b7c6c;font-size:13px}
.quote-sheet-visuals{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}
.quote-fig{margin:0;background:#faf7f1;border:1px solid #efe6d9;border-radius:10px;overflow:hidden;min-height:180px;display:flex;flex-direction:column}
.quote-fig img{width:100%;height:240px;object-fit:contain;background:#fff;display:block}
.quote-fig figcaption{padding:6px 10px;font-size:12px;color:#8b7c6c}
.quote-sheet-photos{display:flex;gap:8px;overflow-x:auto;padding:0 0 6px}
.quote-sheet-photos img{width:72px;height:72px;object-fit:contain;background:#fff;border:1px solid #efe6d9;border-radius:8px;flex:none;cursor:pointer}
.quote-sheet-photos img.is-on{border-color:#8e563b}
.quote-sheet-pickers{display:flex;flex-wrap:wrap;gap:12px 16px;align-items:flex-end;margin:8px 0 12px}
.quote-sheet-pickers label{margin:0;display:flex;flex-direction:column;gap:4px;font-size:13px;color:#8b7c6c}
.quote-sheet-pickers select,.quote-sheet-pickers input[type=number]{min-width:160px;padding:8px 10px;border:1px solid #e5dccf;border-radius:8px;background:#fff;color:#40372f}
.quote-sheet-pickers input[type=number]{width:72px;min-width:72px}
.quote-face{margin-left:auto;text-align:right}
.quote-face b{display:block;font-size:26px;line-height:1.1;color:#8e563b;font-variant-numeric:tabular-nums}
.quote-face span{font-size:12px;color:#8b7c6c}
.quote-sheet-add{margin:0 0 12px;background:#40372f;color:#fff;border:0;border-radius:8px;padding:8px 14px}
.quote-sheet-add:hover{background:#2b241f}
.quote-sheet-table{width:100%;border-collapse:collapse;font-size:13px}
.quote-sheet-table th,.quote-sheet-table td{padding:8px 8px;border-bottom:1px solid #efe6d9;text-align:left}
.quote-sheet-table th{color:#8b7c6c;font-weight:600;white-space:nowrap}
.quote-sheet-table td.num,.quote-sheet-total{text-align:right;font-variant-numeric:tabular-nums}
.quote-sheet-total{margin:10px 0 0;font-size:16px}
.quote-sheet-total b{color:#8e563b}
.quote-sheet-table button{background:transparent;border:0;color:#8b7c6c;padding:0 4px;cursor:pointer}
@media(max-width:850px){
  .product-matches{max-height:min(70vh,720px)}
  .product-price{margin-left:0}
  .quote-sheet-visuals{grid-template-columns:1fr}
  .quote-fig img{height:200px}
  .quote-face{margin-left:0;text-align:left}
}
.customer-matches{display:flex;flex-direction:column;gap:6px;margin:8px 0}
.customer-match-item{width:100%;text-align:left;background:#fffdf8;color:#40372f;border:1px solid #e5dccf;border-radius:10px;padding:10px 12px;font-size:13px;line-height:1.45}
.customer-match-item.is-on{border-color:#8e563b;background:#f8f2e8}
#customer-info h2{font-size:16px;margin:14px 0 6px}
#customer-confirm{margin:10px 0}

.library-preview:has(.library-pdf-pages){max-height:none;overflow:visible}
.library-pdf-pages{display:flex;flex-direction:column;gap:14px;margin-top:8px}
.library-pdf-page{margin:0}
.library-pdf-frame{width:100%;aspect-ratio:16/9;background:#eee7db;border-radius:12px;overflow:hidden}
.library-pdf-frame img{display:block;width:100%;height:auto;vertical-align:top}
.library-pdf-page figcaption{margin:6px 0 0;text-align:center;font-size:12px;color:#6b6560}
.library-preview.is-fs:has(.library-pdf-pages){overflow:auto}
.library-preview.is-fs .library-pdf-pages{flex:1 1 auto;min-height:0;overflow:auto;padding-bottom:12px}
.library-preview.is-fs .library-pdf-frame img{max-height:none}

.library-tools{display:flex;flex-wrap:wrap;align-items:center;gap:4px;flex:1 1 100%}
.library-tool,.library-download,.library-fullscreen,.library-close-preview,.library-forward{
  padding:4px 9px;border-radius:7px;font-size:12px;line-height:1.3;font-weight:550;margin:0
}
.library-download,.library-forward{padding:4px 10px}
.library-tool-danger{background:#9a5a42}
.library-file-open{font-size:13px;padding:2px 0;line-height:1.35;flex:1 1 auto;min-width:0}
.library-file-bar{gap:6px 8px;margin-bottom:8px}
.library-file-bar strong{font-size:13px;font-weight:600}
.library-file-bar .muted{font-size:12px;margin:0}
.library-action-bar{gap:8px;margin:10px 0 0;padding:8px 10px}
.library-action-count,.library-action-status{font-size:12px}
.library-row{gap:6px;padding:4px 0}
.library-row button{margin:0}
.library-row summary{padding:4px 0;font-size:13px}
.library-row details>div{margin-left:16px;padding-left:12px}
.library-doc h1{font-size:18px;margin:0 0 10px}
.library-doc h2,.library-doc h3,.library-doc h4{font-size:15px;margin:14px 0 6px}
.library-doc p,.library-doc li{font-size:14px;line-height:1.65}
.library-pane>h2{font-size:17px}
.library-pane>p.muted,.library-preview .muted{font-size:12px;line-height:1.5}
@media(max-width:850px){
  .library-pane{padding:10px 12px;border-radius:12px}
  .library-preview{padding:10px;margin-top:8px;border-radius:12px}
  .library-inline-preview{padding:8px 10px;margin:2px 0 8px}
  .library-tool,.library-download,.library-fullscreen,.library-close-preview,.library-forward{padding:3px 8px;font-size:12px;border-radius:6px}
  .library-file-open{font-size:13px}
  .library-doc h1{font-size:16px;margin:0 0 8px}
  .library-doc h2,.library-doc h3,.library-doc h4{font-size:14px;margin:12px 0 4px}
  .library-doc p,.library-doc li{font-size:13px;line-height:1.6}
  .library-pane>h2{font-size:16px}
  .library-check{width:14px;height:14px}
  .library-row details>div{margin-left:10px;padding-left:8px}
}

.library-more-wrap{position:relative;flex:none;margin-left:auto}
.library-more{width:28px;height:28px;padding:0;border-radius:8px;background:transparent;color:#40372f;font-size:20px;line-height:1;font-weight:700}
.library-more:hover,.library-more.is-open{background:#eee4d6}
.library-more:disabled{opacity:.4}
.library-more-menu{position:absolute;top:calc(100% + 4px);right:0;z-index:60;min-width:148px;background:#fffdf8;border:1px solid #e5dccf;border-radius:12px;box-shadow:0 10px 24px rgba(64,55,47,.12);padding:6px;display:flex;flex-direction:column;gap:2px}
.library-more-menu[hidden]{display:none}
.library-more-item{display:block;width:100%;text-align:left;padding:8px 10px;border-radius:8px;background:transparent;color:#40372f;font-size:13px;line-height:1.35;margin:0}
.library-more-item:hover{background:#f8f2e8}
.library-more-item.is-danger{color:#9a4a32}
.library-action-bar{align-items:center}
.library-action-bar .library-more-wrap{margin-left:auto}
.library-action-status{flex:1 1 100%;min-width:0}
.library-file-bar .library-more-wrap,.library-row .library-more-wrap{margin-left:auto}
.library-file-open{flex:1 1 auto;min-width:0}
@media(max-width:850px){
  .library-more{width:26px;height:26px;font-size:18px}
  .library-more-item{padding:7px 9px;font-size:13px}
}

.chat-history-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;flex:none;padding:8px 16px;border-bottom:1px solid #ece6dc;background:#faf7f1}
.chat-history-bar .chat-new{padding:6px 12px;border-radius:999px;background:transparent;color:#5c5148;border:1px solid #ded2c2;font-size:13px}
.chat-history-bar .chat-new:hover{background:#f3eee6}
.chat-history-pick{display:flex;align-items:center;gap:8px;font-size:12px;color:#8c7e70}
.chat-history-pick select{max-width:min(58vw,22em);padding:4px 8px;border:1px solid #ded2c2;background:#fff;color:#40372f}
.hero .chat-history-bar{padding:4px 8px 0;border:0;background:transparent}

.chat-choices{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.chat-choice{width:100%;text-align:left;background:#fffdf8;color:#40372f;border:1px solid #e5dccf;border-radius:10px;padding:8px 12px;font-size:13px;line-height:1.45}
.chat-choice:hover{border-color:#8e563b;background:#f8f2e8}
.quote-page .chat-tools{margin:0 16px;flex:none}
.quote-page .chat-tools[open]{max-height:75%;overflow:auto}
