.card-action-menu:has([data-card-chat]){grid-template-columns:repeat(3,minmax(0,1fr))}.chat-panel svg{width:22px;height:22px;vertical-align:middle}.chat-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.chat-cards{display:flex;gap:12px;overflow-x:auto;padding:4px 0 14px}.chat-card{display:flex;gap:12px;align-items:center;min-width:230px;max-width:340px;padding:12px;border:1px solid var(--line,#dbe5de);border-radius:18px;background:#eff6f1}.chat-card img,.chat-no-photo{width:74px;height:74px;object-fit:contain;border-radius:12px;flex:none}.chat-card p{margin:5px 0}.chat-card small{font-size:12px}.chat-compose label,.chat-reply label{display:grid;gap:8px;margin:12px 0}.chat-compose textarea,.chat-reply textarea{resize:vertical}.chat-message{max-width:88%;padding:14px 16px;border-radius:18px;background:#edf3f0;margin:10px 0;overflow-wrap:anywhere}.chat-own{margin-left:auto;background:#dceee5}.chat-message header{display:flex;gap:10px;justify-content:space-between;font-size:12px}.chat-message time,.chat-message small{font-size:11px;color:#61756a}.chat-message p{white-space:pre-wrap;margin:8px 0}.chat-messages{max-height:40vh;min-height:130px;overflow:auto;padding:8px}.chat-list-item{display:flex;width:100%;text-align:left;gap:13px;align-items:center;border:1px solid #dce5df;border-radius:18px;padding:14px;margin:8px 0;background:#f2f7f4;color:inherit;cursor:pointer}.chat-list-item>span:nth-child(2){display:grid;gap:4px;min-width:0;flex:1}.chat-list-item>span:nth-child(2)>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-list-item small{color:#647a6c;font-size:12px}.chat-list-photo img,.chat-list-photo{width:56px;height:56px;object-fit:contain;border-radius:12px}.chat-error{color:#a32929}.chat-push{font-size:12px;color:#61756a;margin-top:22px}.chat-count{display:inline-grid;place-items:center;background:#bd343a;color:white;border-radius:20px;min-width:22px;height:22px;padding:0 5px;font-size:12px}.chat-bell-count{position:absolute;right:-8px;top:-5px;pointer-events:none}#metalRequestsBell{position:relative}#metalRequestsBell.chat-has-unanswered{color:#c3343b!important;background:#ffe6e7!important}#metalRequestsBell.chat-has-unanswered>svg{animation:chat-bell-ring 5s infinite;transform-origin:50% 12%}@keyframes chat-bell-ring{0%,18%,100%{transform:rotate(0)}2%,6%,10%{transform:rotate(17deg)}4%,8%,12%{transform:rotate(-17deg)}14%{transform:rotate(8deg)}16%{transform:rotate(-8deg)}}.chat-send-flight{position:fixed;left:calc(50% - 22px);top:calc(50% - 22px);width:44px;height:44px;border-radius:15px;background:#d5efdf;color:#126153;display:grid;place-items:center;z-index:10000;pointer-events:none}.chat-send-flight svg{width:26px;height:26px}.catalog-drag-stack{position:fixed;left:0;top:0;width:160px;height:190px;z-index:10000;pointer-events:none;filter:drop-shadow(0 15px 22px #163e433b);will-change:transform}.catalog-drag-stack .stack-sheet{position:absolute;inset:0;background:#f5faf7;border:1px solid #b9d3c5;border-radius:20px}.catalog-drag-stack .stack-sheet:nth-child(1){transform:translate(13px,14px) rotate(7deg)}.catalog-drag-stack .stack-sheet:nth-child(2){transform:translate(6px,7px) rotate(3deg)}.catalog-drag-stack .stack-front{position:absolute;inset:0;padding:11px;background:#fafffc;border:1px solid #bad3c6;border-radius:20px;box-sizing:border-box;display:grid;grid-template-rows:130px auto;gap:8px}.stack-front img{width:100%;height:130px;object-fit:contain;border-radius:12px;background:#edf4ef}.stack-front strong{font-size:17px;color:#224839}.stack-front .stack-placeholder{display:grid;place-items:center;border-radius:12px;background:#e5efe7;color:#496b59}.stack-total{position:absolute;right:-12px;top:-12px;padding:7px 12px;border-radius:25px;background:#166e5d;color:white;font-size:16px;font-weight:700;border:3px solid white}.stack-fly{position:fixed;pointer-events:none;z-index:9999;border:2px solid #95bda8;background:#eff7f0;border-radius:22px;box-shadow:0 8px 20px #16432c30}.stack-fly img{width:100%;height:100%;object-fit:contain;border-radius:20px}.stack-drag-image{position:fixed;width:1px;height:1px;opacity:.01;pointer-events:none;left:0;top:0}@media(prefers-reduced-motion:reduce){#metalRequestsBell.chat-has-unanswered>svg{animation:none}}@media(max-width:600px){.chat-toolbar{gap:6px}.chat-toolbar button{font-size:12px;padding:9px}.chat-card{min-width:200px}.chat-message{max-width:94%}.chat-message header{flex-wrap:wrap}.chat-messages{max-height:35vh}.card-action-menu:has([data-card-chat]) button{padding:20px 7px;font-size:13px}}

/* Keep the full selection context and all actions readable. */
#cardSelectionBar{width:max-content;min-width:min(620px,calc(100vw - 32px));max-width:calc(100vw - 32px);padding:12px 16px;gap:12px;flex-wrap:wrap;justify-content:center;overflow:visible}
#cardSelectionBar .card-selection-count{flex:1 0 auto;min-width:112px;font-size:14px;white-space:nowrap}
#cardSelectionBar .card-selection-count small{font-size:12px}
#cardSelectionBar button{flex-shrink:0;white-space:nowrap;padding-inline:20px}
#cardSelectionBar.card-controls-sized button:is([data-selection-chat],[data-selection-share],[data-selection-metal],[data-selection-stone],[data-selection-cancel]){width:auto;min-width:92px!important;height:auto;min-height:46px;padding:10px 18px}
@media(max-width:850px){#cardSelectionBar{width:calc(100vw - 24px);min-width:0;max-width:620px;padding:10px;gap:8px}#cardSelectionBar .card-selection-count{flex:0 0 100%;text-align:center;padding:0;font-size:13px}#cardSelectionBar .card-selection-count small{display:inline;margin-left:8px}#cardSelectionBar.card-controls-sized button:is([data-selection-chat],[data-selection-share],[data-selection-metal],[data-selection-stone],[data-selection-cancel]){flex:1 0 auto;min-width:72px!important;padding:8px 12px;font-size:12px}body.card-selection-active main{padding-bottom:calc(var(--mobile-dock-clearance,12px) + 190px)!important}}

/* Native buttons keep attachment navigation accessible by touch and keyboard. */
button.chat-card{font:inherit;color:inherit;text-align:left;cursor:pointer;flex-shrink:0;touch-action:manipulation;transition:background-color .1s,border-color .1s}
button.chat-card:hover{border-color:var(--accent,#286a51);background:#e1eee6}
button.chat-card:active,.chat-panel button:not(:disabled):active{background-color:#cfe3d8;box-shadow:inset 0 2px 4px #18362626}
button.chat-card:focus-visible{outline:3px solid var(--accent,#286a51);outline-offset:2px}
.chat-card-open{display:block;margin-top:8px;color:var(--accent,#286a51);font-weight:600}
.chat-panel button:disabled{opacity:.65;cursor:wait}
@media(prefers-reduced-motion:reduce){button.chat-card{transition:none}}
