.plugin-account-context{padding:12px 16px;border-left:3px solid var(--accent,#63a9f4);background:var(--surface-soft,rgba(100,150,240,.08));border-radius:10px;overflow-wrap:anywhere}
.simple-pool-scroll{max-height:48vh;overflow:auto;border:1px solid var(--border);border-radius:10px}
.simple-pool-grid{width:100%;border-collapse:collapse;table-layout:fixed;min-width:440px}
.simple-pool-grid th{position:sticky;top:0;z-index:1;background:var(--surface);text-align:left;padding:12px 8px}
.simple-pool-grid th:first-child{width:40px}.simple-pool-grid th:nth-child(3){width:112px}.simple-pool-grid th:last-child{width:64px}
.simple-pool-grid td{padding:8px;border-top:1px solid var(--border);vertical-align:top}
.simple-pool-grid textarea{display:block;min-height:44px;line-height:1.5;font-family:Consolas,monospace;resize:vertical}
.simple-pool-grid input{width:100%;min-height:44px}.simple-line-number{font-variant-numeric:tabular-nums;color:var(--muted)}
.simple-pool-grid tbody tr:first-child{background:color-mix(in srgb,var(--accent) 8%,transparent)}
.simple-delivery-controls .action-row{margin:12px 0}.simple-delivery-controls .notice{margin:0}
#simple-units pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:400px}
.delivery-panel{margin:18px 0}.delivery-panel summary{cursor:pointer;padding:12px 0}.delivery-entry{padding:16px 0;border-bottom:1px solid var(--border,#304355);overflow-wrap:anywhere}.delivery-entry .action-row{margin:12px 0}
@media(max-width:640px){.delivery-entry .action-row button{flex:1 1 130px}}
.bulk-editor{display:grid;gap:12px}.bulk-editor textarea{width:100%;min-height:180px;resize:vertical;font-family:ui-monospace,Consolas,monospace;font-size:13px}.bulk-preview{padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);overflow:hidden}.bulk-preview p{font-weight:600}.bulk-preview small{color:var(--muted);line-height:1.5}.bulk-preview-lines{max-height:170px;overflow:auto;margin:10px 0 0;padding-left:28px}.bulk-preview-lines li{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.6 ui-monospace,Consolas,monospace;padding:3px 6px}.bulk-preview-lines .duplicate{background:#e8a53422;border-radius:5px}.quick-list{display:grid;gap:10px}.quick-row{display:flex;flex-wrap:wrap;gap:6px;padding:10px;border-bottom:1px solid var(--border)}.quick-row>.text-button{flex:1 1 160px;text-align:left;justify-content:flex-start;white-space:normal}.wallpaper-preview{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:24px;min-height:190px;border-radius:16px;background:var(--surface-soft);overflow:hidden}.wallpaper-preview .bubble{background:#fff;color:#18212b;border-radius:16px;padding:12px 16px;max-width:85%;box-shadow:0 1px 2px #0002}.wallpaper-preview .bubble.own{align-self:flex-end;background:#e3ffc9}
@media(max-width:640px){.bulk-preview-lines{max-height:120px}.quick-row .button{min-height:44px}}
#simple-dialog{width:min(1080px,calc(100vw - 32px));max-width:1080px}
.simple-contents{display:grid;gap:12px;min-width:0}.simple-contents-heading{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.simple-contents-heading h3{flex:1;margin:0}.simple-contents>.field-hint{margin:0}
#simple-units{max-height:40vh;overflow:auto;overscroll-behavior:contain;padding:2px}.simple-stock-record{margin:0;font:13px/1.6 ui-monospace,Consolas,monospace}
@media(max-width:640px){
 #simple-dialog{width:calc(100vw - 16px)}
 .simple-pool-grid{min-width:0;font-size:11px}
 .simple-pool-grid th:first-child{width:24px}.simple-pool-grid th:nth-child(3){width:76px}.simple-pool-grid th:last-child{width:56px}
 .simple-pool-grid th,.simple-pool-grid td{padding:6px}
 .simple-pool-grid input,.simple-pool-grid textarea{padding:8px 6px}
}
/* Диалог склада: заголовок и кнопка «Сохранить» остаются на месте, прокручивается
   только содержимое. Список товаров бывает в тысячи строк, и без этого кнопка
   уезжала за край экрана — сохранить пул было нечем. */
#store-dialog{overflow:hidden}#store-form{display:flex;flex-direction:column;max-height:calc(90dvh - 2px)}#store-form>.modal-heading,#store-form>.modal-footer{flex-shrink:0}#store-form>.modal-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.chat-thread,.wallpaper-preview{isolation:isolate}
.chat-effects{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}
.chat-thread>:is(header,.message-list,form,.older-messages){position:relative;z-index:1}
.chat-thread>.new-messages{z-index:2}
.wallpaper-preview{position:relative;background:var(--chat-scene,var(--surface-soft))}
.wallpaper-preview .bubble{position:relative;z-index:1;background:var(--message-incoming,var(--surface));color:var(--chat-incoming-text,var(--message-text,var(--ink)))}
.wallpaper-preview .bubble.own{background:var(--message-outgoing,var(--chat-outgoing,#e3ffc9));color:#fff}
.wallpaper-settings{display:grid;gap:14px;padding-top:16px;border-top:1px solid var(--border)}
.wallpaper-settings h3{margin:0;font-size:15px}
.wallpaper-choices{display:flex;flex-wrap:wrap;gap:10px}
.wallpaper-choices [aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft)}
.wallpaper-message-colors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.wallpaper-color-field{display:grid;gap:8px;min-width:0}
.wallpaper-color-field label{min-width:0}.wallpaper-color-field .text-button{justify-self:start;min-height:36px}
.wallpaper-color-field input[type=color]{width:100%;height:44px;cursor:pointer}
#helper-dialog[data-kind=wallpaper]{overflow:hidden}
#helper-dialog[data-kind=wallpaper] #helper-form{display:flex;flex-direction:column;max-height:calc(90dvh - 2px)}
#helper-dialog[data-kind=wallpaper] :is(.modal-heading,.modal-footer){flex-shrink:0}
#helper-dialog[data-kind=wallpaper] .modal-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
#helper-dialog[data-kind=wallpaper] #helper-fields{display:grid;gap:18px}
#helper-dialog[data-kind=wallpaper] .wallpaper-choices{margin:0}
#helper-dialog[data-kind=wallpaper] small{line-height:1.6}
@media(max-width:480px){.wallpaper-message-colors{grid-template-columns:1fr}.wallpaper-preview{padding:16px}.wallpaper-choices .button{flex:1 1 100px}}
