/* Moje półki w nowym układzie. */
body.hb-shelves main{max-width:none;padding:0}
body.hb-shelves #workspace{position:relative;display:grid;grid-template-columns:auto auto minmax(0,1fr);align-items:center;gap:10px 16px;max-width:none;margin:0;padding:16px var(--hb-gutter) 24px;background:#fff;border:0;box-shadow:none}
body.hb-shelves #workspace>*{grid-column:1/-1;min-width:0}
body.hb-shelves #workspace>.section-top{grid-column:1;display:block;margin:0;padding:0;border:0}
body.hb-shelves #viewTitle{margin:0;font-size:30px;font-weight:700;letter-spacing:-.02em;line-height:1.1}
body.hb-shelves #resultCount,body.hb-shelves #viewEyebrow,body.hb-shelves #viewDescription{display:none}
body.hb-shelves #workspace>#inventoryTabs{grid-column:2;display:inline-flex;gap:0;width:auto;margin:0;padding:3px;border:0;border-radius:12px;background:var(--hb-stage)}
body.hb-shelves #inventoryTabs>button:not(#shelfAdd){display:inline-flex;align-items:center;gap:7px;width:auto;flex:none;min-height:40px;padding:0 15px;border:0;border-radius:9px;background:none;color:var(--muted);font-size:15px;font-weight:500;box-shadow:none}
body.hb-shelves #inventoryTabs>button:not(#shelfAdd) span{background:none;color:var(--hb-soft);font-size:13px;font-weight:500}
body.hb-shelves #inventoryTabs>button:not(#shelfAdd)[aria-pressed=true],body.hb-shelves #inventoryTabs>button:not(#shelfAdd).active{background:#fff;color:var(--ink);font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.12)}
body.hb-shelves #inventoryTabs>#shelfAdd{position:absolute;right:var(--hb-gutter);top:16px;width:auto;flex:none;min-height:46px;padding:0 18px;border:0;border-radius:14px;background:var(--hb-grad)!important;color:#fff!important;font-size:15px;font-weight:600;box-shadow:0 10px 24px -10px rgba(240,38,172,.55)}
body.hb-shelves #workspace>.hb-shelf-stats{grid-column:3;display:flex;flex-wrap:wrap;align-items:baseline;gap:0;margin:0;padding-right:130px;color:var(--muted);font-size:14px}
.hb-shelf-stats span{white-space:nowrap}
.hb-shelf-stats span+span{margin-left:12px;padding-left:12px;border-left:1px solid var(--line)}
.hb-shelf-stats b{color:var(--ink);font-size:17px;font-weight:700;letter-spacing:-.01em}
.hb-shelf-stats[hidden],.hb-find[hidden]{display:none!important}
body.hb-shelves #workspace>.hb-find{grid-column:1/3;grid-row:2;display:flex;align-items:center;gap:10px;margin:0}
.hb-find label{flex:1 1 370px;max-width:370px;margin:0}
.hb-find input{width:100%;min-height:42px;padding:0 14px 0 38px;border:0;border-radius:12px;background:var(--hb-stage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6269' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") 12px center/18px no-repeat;color:var(--ink);font-size:14px}
.hb-find p{flex:1;margin:0;font-size:13.5px;font-weight:500;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hb-find p:empty{display:none}
body.hb-shelves #workspace>#shelfWorkbench{grid-column:3;grid-row:2;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:7px;margin:0;padding:0;background:none;border:0}
body.hb-shelves:not(.hb-shelves-owned) #workspace>#shelfWorkbench{grid-column:1/-1;grid-row:auto;justify-content:flex-start}
body.hb-shelves .shelf-view-switch{display:flex;gap:0;margin:0;padding:3px;border:0;border-radius:12px;background:var(--hb-stage)}
body.hb-shelves .shelf-view-switch button{min-height:36px;padding:0 11px;border:0;border-radius:9px;background:none!important;color:var(--muted)!important;font-size:13.5px;font-weight:500;box-shadow:none}
body.hb-shelves .shelf-view-switch button[aria-pressed=true]{background:#fff!important;color:var(--ink)!important;font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.12)}
body.hb-shelves #shelfWorkbench>button.quiet{min-height:42px;padding:0 13px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-size:13.5px;font-weight:500;text-decoration:none;white-space:nowrap}
body.hb-shelves .shelf-selection{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
body.hb-shelves .shelf-selection[hidden]{display:none}
body.hb-shelves .shelf-selection button{min-height:42px;padding:0 12px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-size:13.5px}
body.hb-shelves .shelf-selection .shelf-delete-action{border-color:#c0392b;color:#b42318}
body.hb-shelves #inventoryPanel,body.hb-shelves #realShelfPanel{margin:0;padding:0;background:none;border:0;box-shadow:none}
body.hb-shelves .inventory-stock-summary{display:none}
body.hb-shelves .shelf-organization[open]{display:block;margin:0 0 12px;padding:14px;border:1px solid var(--line);border-radius:18px}
body.hb-shelves .shelf-organization>summary{display:none}
body.hb-shelves .shelf-organization :is(.inventory-places-overview,.inventory-filterbox){margin:10px 0 0;padding:14px;border:0;border-radius:14px;background:var(--hb-stage)}
body.hb-shelves .shelf-organization .inventory-places-overview h3{font-size:16px;font-weight:700}
body.hb-shelves .shelf-organization select{border:1px solid var(--line);border-radius:10px;background-color:#fff}
body.hb-shelves .shelf-organization input[type=checkbox]{accent-color:var(--ink)}
body.hb-shelves .shelf-organization .inventory-tools .primary{border:0;background:var(--hb-grad);color:#fff}
body.hb-shelves .shelf-organization .inventory-tools .secondary{border:1px solid var(--line);background:#fff;color:var(--ink)}
body.hb-shelves .shelf-check input{accent-color:var(--ink)}

/* Miejsca */
body.hb-shelves .inventory-grid{display:grid;grid-template-columns:minmax(0,1.42fr) minmax(0,1fr);gap:14px;align-items:start;background:none;border:0;padding:0}
body.hb-shelves .inventory-grid.hb-dash-single{grid-template-columns:1fr}
body.hb-shelves .inventory-grid.hb-dash-single>:empty{display:none}
.hb-dash-left{display:grid;gap:14px;min-width:0}
.hb-dash-right{display:flex;flex-wrap:wrap;gap:14px;min-width:0}
body.hb-shelves .inventory-place-group,body.hb-shelves .shelf-empty-place{margin:0;padding:14px 16px 16px;border:0;border-radius:20px;background:var(--hb-stage);min-width:0}
.hb-dash-right>[data-hb-place=ams]{flex:1 1 100%}
.hb-dash-right>[data-hb-place=printer],.hb-dash-right>[data-hb-place=dryer]{flex:1 1 calc(50% - 7px)}
body.hb-shelves .inventory-place-group>h3,body.hb-shelves .shelf-empty-place>h3{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 7px;margin:0 0 10px;padding:0;background:none;border:0;font-size:16px;font-weight:700;letter-spacing:-.01em}
body.hb-shelves .inventory-place-group>h3 small{margin:0;color:var(--muted);font-size:13px;font-weight:400;letter-spacing:0}
body.hb-shelves .shelf-place-edit,body.hb-shelves .shelf-empty-place>h3 button{float:none;width:auto;min-height:0;margin:0 0 0 auto;padding:0;border:0;background:none;color:var(--muted);font-size:13px;font-weight:400;text-decoration:underline;text-underline-offset:3px}
body.hb-shelves .shelf-empty-place>p{margin:0;font-size:13.5px;color:var(--muted)}

/* Regał: wspólne tło, deska pod każdym rzędem */
body.hb-shelves .inventory-place-products,body.hb-shelves .shelf-rails{display:block;gap:0;margin:0;padding:0;background:none;border:0}
body.hb-shelves .shelf-rails>.shelf-layout-row{margin:0!important}
body.hb-shelves .shelf-layout-row{--photo-height:170px;position:relative;margin:0;padding:12px 16px 14px;border:0;border-radius:0;background:var(--shelf-back);box-shadow:inset 0 0 40px rgba(60,35,10,.08);isolation:auto}
body.hb-shelves .shelf-layout-row:first-child{border-radius:14px 14px 0 0}
body.hb-shelves .shelf-layout-row:last-child{border-radius:0 0 14px 14px}
body.hb-shelves .shelf-layout-row:only-child{border-radius:14px}
body.hb-shelves .shelf-row-count{display:none}
body.hb-shelves .shelf-rail{gap:10px;padding:0 0 2px;justify-content:space-around}
body.hb-shelves .shelf-board-button{position:absolute;left:0;right:0;top:auto;bottom:0;height:14px!important;min-height:14px!important;z-index:2;padding:0}
body.hb-shelves .shelf-board-button>span{position:absolute;inset:0;display:block;height:auto;border-radius:0 0 4px 4px;background:var(--shelf-tone);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),inset 0 -2px 3px rgba(0,0,0,.2),0 4px 6px rgba(0,0,0,.15)}
body.hb-shelves .shelf-row-arrows{z-index:3}
body.hb-shelves .shelf-rail>:is(.inventory-card,.visual-offer){overflow:visible;padding:0;transition:opacity .15s}
body.hb-shelves .shelf-spool{position:relative;display:flex;align-items:flex-end;justify-content:center;height:var(--photo-height);border-radius:8px;transition:transform .15s}
body.hb-shelves .shelf-spool:hover{transform:translateY(-3px)}
body.hb-shelves .shelf-spool:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
body.hb-shelves .shelf-spool.hb-drawn>img{display:none}
body.hb-shelves .shelf-spool .hb-spool{display:block;width:100%;height:100%;mix-blend-mode:normal!important;background:none!important;box-shadow:none!important;filter:drop-shadow(0 7px 5px rgba(0,0,0,.25))}
body.hb-shelves .shelf-spool-count{position:absolute;right:6%;bottom:6px;z-index:2;padding:1px 7px;border-radius:999px;background:#fff;color:var(--ink);font-size:11.5px;font-weight:600;box-shadow:0 1px 4px rgba(0,0,0,.2)}
body.hb-shelves .shelf-spool-count[hidden]{display:none}
.hb-spool-left{position:absolute;left:50%;top:50%;z-index:2;padding:1px 8px;border-radius:999px;background:var(--hb-grad);color:#fff;font-size:11.5px;font-weight:600;white-space:nowrap;transform:translate(-50%,-50%)}
body.hb-shelves .inventory-card.hb-hit .shelf-spool{outline:3px solid #f026ac;outline-offset:3px;border-radius:12px}
body.hb-shelves .inventory-card.hb-dim{opacity:.25}

/* AMS: ciemny podajnik z numerowanymi slotami */
body.hb-shelves [data-hb-place=ams] .inventory-place-products{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;padding:12px;border-radius:16px;background:linear-gradient(#26292e,#17191c);box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 14px 28px -14px rgba(0,0,0,.6)}
body.hb-shelves [data-hb-place=ams] :is(.shelf-layout-row,.shelf-rail){display:contents!important}
body.hb-shelves [data-hb-place=ams] :is(.shelf-board-button,.shelf-row-arrows){display:none}
body.hb-shelves [data-hb-place=ams] .inventory-card,body.hb-shelves .hb-bay-empty{position:relative;flex:none;width:auto!important;min-width:0;padding:20px 4px 6px!important;border-radius:10px!important;background:linear-gradient(#0c0d0f,#22262b)!important}
body.hb-shelves [data-hb-place=ams] .inventory-card[data-hb-slot]::before,body.hb-shelves .hb-bay-empty::before{content:attr(data-hb-slot);position:absolute;left:0;right:0;top:4px;z-index:1;color:#9aa0a6;font-size:11px;font-weight:600;text-align:center}
body.hb-shelves .hb-bay-empty{min-height:120px}
body.hb-shelves [data-hb-place=ams] .shelf-spool{--photo-height:110px;height:110px}
body.hb-shelves [data-hb-place=ams] .shelf-spool .hb-spool{filter:none}

/* Drukarka i suszarka */
body.hb-shelves :is([data-hb-place=printer],[data-hb-place=dryer]) .inventory-place-products{display:flex!important;flex-direction:row!important;flex-wrap:wrap;align-items:flex-end;justify-content:center;gap:6px;min-height:170px;padding:14px;border-radius:14px}
body.hb-shelves :is([data-hb-place=printer],[data-hb-place=dryer]) :is(.shelf-layout-row,.shelf-rail){display:contents!important}
body.hb-shelves :is([data-hb-place=printer],[data-hb-place=dryer]) :is(.shelf-board-button,.shelf-row-arrows){display:none}
body.hb-shelves :is([data-hb-place=printer],[data-hb-place=dryer]) .inventory-card{display:block!important;flex:0 1 calc(50% - 3px)!important;width:auto!important;max-width:110px!important;min-width:0;margin:0!important;padding:0!important}
body.hb-shelves :is([data-hb-place=printer],[data-hb-place=dryer]) .shelf-spool{height:130px}
body.hb-shelves [data-hb-place=printer] .inventory-place-products{background:linear-gradient(transparent calc(100% - 12px),#26292e calc(100% - 12px),#26292e calc(100% - 7px),transparent calc(100% - 7px))}
body.hb-shelves [data-hb-place=dryer] .inventory-place-products{border:7px solid #d6d9dd;background:linear-gradient(#fff,#e9ebee)}

/* Chcę mieć: prawdziwe zdjęcia na półce */
body.hb-shelves #realShelfPanel .shelf-spool{flex-direction:column;align-items:center;height:auto;padding-bottom:6px}
body.hb-shelves #realShelfPanel .shelf-spool>img{display:block;width:100%;height:150px!important;object-fit:contain;background:transparent!important;box-shadow:none!important;filter:none!important;mix-blend-mode:multiply!important}
body.hb-shelves #realShelfPanel>:is(details,section):not(.visual-filters){margin:8px 0 0;padding:0 14px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:none}
body.hb-shelves #realShelfPanel>details>summary{min-height:44px;padding:12px 0;font-size:14px;font-weight:600}
.hb-want-caption{display:block;width:100%;text-align:center;font-size:12.5px;line-height:1.2}
.hb-want-caption b{display:block;font-weight:600;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.hb-want-caption span{display:block;margin-top:2px;color:var(--muted)}

/* Szczegóły szpuli: panel z boku, od dołu na telefonie */
.hb-drawer-scrim{position:fixed;inset:0;z-index:34;background:rgba(14,16,18,.42)}
.hb-drawer-scrim[hidden]{display:none}
body.hb-shelves .shelf-inline-body{display:none}
body.hb-shelves .shelf-inline[open]>.shelf-inline-body{position:fixed;left:auto;right:0;top:0;bottom:0;z-index:35;display:block;width:440px;max-width:100vw;margin:0;padding:18px 20px 24px;overflow-y:auto;overscroll-behavior:contain;background:#fff;border:0;border-radius:0;box-shadow:-14px 0 40px rgba(0,0,0,.14);color:var(--ink);text-align:left}
body.hb-shelves .shelf-inline-body button.hb-drawer-close{display:block;width:auto!important;min-height:40px;margin:0 0 10px auto;padding:0 13px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-size:13.5px}
body.hb-shelves .hb-drawer-photo{display:block;width:100%;height:190px;margin:0 0 12px;padding:10px;border-radius:16px;background:none;object-fit:contain}
body.hb-shelves .shelf-inline[open]>.shelf-inline-body{isolation:isolate}
body.hb-shelves .shelf-inline-body :is(.filament-badge){padding:0;background:none!important;color:var(--muted)!important;font-weight:500}
body.hb-shelves .shelf-inline-body h3{margin:3px 0;font-size:20px;font-weight:700;letter-spacing:-.01em}
body.hb-shelves .shelf-inline-body p{margin:4px 0;font-size:14px}
body.hb-shelves .shelf-inline-body button.secondary{width:100%;min-height:42px;margin:6px 0 0;padding:0 13px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-size:14px;font-weight:500}
body.hb-shelves .shelf-inline-body button.primary{width:100%;min-height:44px;margin:6px 0 0;border:0;border-radius:12px;background:var(--hb-grad);color:#fff;font-weight:600}
body.hb-shelves .shelf-inline-body select{width:100%;min-height:42px;border:1px solid var(--line);border-radius:10px;background:#fff}
body.hb-shelves .shelf-inline-body .filament-actionbar{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;width:100%!important;max-width:none!important}
body.hb-shelves .shelf-inline-body .filament-action{display:flex!important;flex-direction:row!important;gap:5px!important;width:100%!important;min-height:42px!important;height:42px!important;padding:0!important;border:1px solid var(--line)!important;border-radius:12px!important;background:#fff!important;color:var(--ink)!important}
body.hb-shelves .shelf-inline-body .filament-action::after{display:none!important}
body.hb-shelves .shelf-inline-body .filament-action span{font-size:13px!important;line-height:1!important;color:inherit!important}
body.hb-shelves .shelf-inline-body .filament-action svg{width:16px!important;height:16px!important}
body.hb-shelves .shelf-inline-body .filament-action[aria-pressed=true]{border-color:transparent!important;background:var(--hb-grad)!important;color:#fff!important}
body.hb-shelves .shelf-inline-body .filament-action.action-shop{border-color:var(--ink)!important;background:var(--ink)!important;color:#fff!important}

/* Widok szczegółowy: karty z opisem na półce */
body[data-shelf-density=detail].hb-shelves .shelf-rail>:is(.inventory-card,.visual-offer){padding:8px!important;border-radius:14px!important;background:#fff!important;box-shadow:0 8px 20px -14px rgba(16,24,40,.4)!important}
body[data-shelf-density=detail].hb-shelves [data-hb-place] .shelf-layout-row{display:block!important}
body[data-shelf-density=detail].hb-shelves [data-hb-place] .inventory-place-products{display:block!important;padding:0;border:0;background:none;min-height:0;box-shadow:none}
body[data-shelf-density=detail].hb-shelves [data-hb-place] .shelf-rail{display:flex!important}
body[data-shelf-density=detail].hb-shelves .hb-bay-empty{display:none}
body[data-shelf-density=detail].hb-shelves .inventory-grid{grid-template-columns:1fr}
body[data-shelf-density=detail].hb-shelves .inventory-card :is(h3){font-size:15px}
body[data-shelf-density=detail].hb-shelves .inventory-card button.secondary{min-height:40px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);font-size:13px}

/* Szuflada działa też na ekranach bez bocznego marginesu */
@media(min-width:701px) and (max-width:1100px){
 body.hb-shelves #workspace{grid-template-columns:auto minmax(0,1fr)}
 body.hb-shelves #workspace>.section-top{grid-column:1}
 body.hb-shelves #workspace>#inventoryTabs{grid-column:2;justify-self:start}
 body.hb-shelves #workspace>.hb-shelf-stats{grid-column:1/-1;grid-row:2;padding-right:0}
 body.hb-shelves #workspace>.hb-find{grid-column:1/-1;grid-row:3}
 body.hb-shelves #workspace>#shelfWorkbench{grid-column:1/-1;grid-row:4;justify-content:flex-start}
 body.hb-shelves .inventory-grid{grid-template-columns:1fr}
}

/* Telefon */
@media(max-width:700px){
 body.hb-shelves #workspace{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:10px 14px 16px}
 body.hb-shelves #workspace>.section-top,body.hb-shelves #workspace>.hb-shelf-stats{display:none}
 body.hb-shelves #workspace>#inventoryTabs{display:grid;grid-template-columns:1fr 1fr;width:100%}
 body.hb-shelves #inventoryTabs>button:not(#shelfAdd){justify-content:center;width:100%;min-width:0;padding:0 6px;font-size:14px}
 body.hb-shelves #inventoryTabs>#shelfAdd{position:fixed;right:14px;top:auto;bottom:calc(76px + env(safe-area-inset-bottom));z-index:30;min-height:50px;border-radius:999px;padding:0 20px}
 body.hb-shelves #workspace>.hb-find{flex-wrap:wrap;gap:4px}
 .hb-find label{flex:1 1 100%;max-width:none}
 .hb-find input{font-size:16px}
 .hb-find p{flex:1 1 100%;white-space:normal}
 body.hb-shelves #workspace>#shelfWorkbench{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -14px;padding:0 14px}
 body.hb-shelves #shelfWorkbench>*{flex:none}
 body.hb-shelves #shelfWorkbench>button.quiet{min-height:40px;font-size:13px}
 body.hb-shelves .inventory-grid{display:block}
 body.hb-shelves .hb-dash-left{margin-bottom:12px}
 .hb-dash-left{gap:12px}.hb-dash-right{gap:12px}
 .hb-dash-right>[data-hb-place=printer],.hb-dash-right>[data-hb-place=dryer]{flex:1 1 calc(50% - 6px)}
 body.hb-shelves .inventory-place-group,body.hb-shelves .shelf-empty-place{padding:12px}
 body.hb-shelves .shelf-layout-row{--photo-height:130px;padding:10px 8px 14px}
 body.hb-shelves [data-hb-place=ams] .inventory-place-products{gap:5px;padding:8px}
 body.hb-shelves [data-hb-place=ams] .shelf-spool{height:78px}
 body.hb-shelves .hb-bay-empty{min-height:100px}
 body.hb-shelves :is([data-hb-place=printer],[data-hb-place=dryer]) .inventory-place-products{min-height:120px;padding:8px}
 body.hb-shelves :is([data-hb-place=printer],[data-hb-place=dryer]) .shelf-spool{height:90px}
 body.hb-shelves #realShelfPanel .shelf-spool>img{height:110px!important}
 body.hb-shelves .shelf-inline[open]>.shelf-inline-body{left:0;right:0;top:auto;bottom:0;width:auto;height:88dvh;padding:14px 16px calc(20px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;box-shadow:none}
 body.hb-drawer-open>header nav{z-index:20}
}

body.hb-shelves .shelf-rail>:is(.inventory-card,.visual-offer),body.hb-shelves .inventory-card:has(.shelf-check input:checked){border:0!important;outline:0!important;box-shadow:none!important}
body[data-shelf-density=basic].hb-shelves .inventory-card:has(.shelf-check input:checked) .shelf-spool{outline:3px solid #f026ac;outline-offset:2px;border-radius:12px}

/* Galeria: jasna ściana, światło nad szpulą i szklana półka.
   Zdjęcia mieszają się ze ścianą, więc między ścianą a zdjęciem nic nie może tworzyć osobnej warstwy (transform, opacity, filter, z-index). */
body.hb-shelves #workspace>.hb-shelf-stats{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:0;padding:0;font-size:13px}
.hb-shelf-stats span,.hb-shelf-stats span+span{margin:0;padding:11px 15px;border:1px solid var(--line);border-radius:18px;background:#fff;white-space:normal}
.hb-shelf-stats b{display:block;font-size:30px;letter-spacing:-.025em;line-height:1.08}
body.hb-shelves #workspace>.hb-find{grid-row:3}
body.hb-shelves #workspace>#shelfWorkbench{grid-row:3}
body.hb-shelves:not(.hb-shelves-owned) #workspace>#shelfWorkbench{grid-row:auto}
body.hb-shelves .inventory-place-group,body.hb-shelves .shelf-empty-place{padding:0;border-radius:0;background:none}
body.hb-shelves .shelf-empty-place{padding:16px;border:1px dashed #c9cdd2;border-radius:20px}
body.hb-shelves .inventory-place-group>h3,body.hb-shelves .shelf-empty-place>h3{margin:0 0 8px;padding:0 4px;font-size:18px}
body.hb-shelves .inventory-contribution{display:none}

body.hb-shelves .shelf-rails{position:relative;isolation:isolate;padding:14px 16px 0;border-radius:24px;background:linear-gradient(180deg,#fff 0,var(--shelf-back) 100%);box-shadow:inset 0 0 0 1px var(--line);overflow:hidden}
body.hb-shelves .shelf-layout-row,body.hb-shelves .shelf-layout-row:first-child,body.hb-shelves .shelf-layout-row:last-child,body.hb-shelves .shelf-layout-row:only-child{--photo-height:158px;padding:0;border-radius:0;background:none;box-shadow:none}
body.hb-shelves .shelf-rails>.shelf-layout-row+.shelf-layout-row{margin-top:8px!important}
body.hb-shelves .shelf-rail{align-items:flex-end;gap:10px;padding:14px 0 24px}
body.hb-shelves .shelf-board-button{left:-16px;right:-16px;bottom:0;z-index:-1;width:auto!important;height:24px!important;min-height:24px!important;margin:0;border:0;background:none}
body.hb-shelves .shelf-board-button>span{border-top:1px solid rgba(14,16,18,.1);border-radius:0;background:linear-gradient(180deg,rgba(255,255,255,.95) 0,var(--shelf-tone) 42%,rgba(255,255,255,0) 100%);box-shadow:none}
body.hb-shelves .shelf-rail>:is(.inventory-card,.visual-offer){transition:none}
body.hb-shelves .shelf-spool,body.hb-shelves .shelf-spool:hover{transform:none;transition:none}
body.hb-shelves .shelf-spool::before{content:"";position:absolute;left:50%;top:-8%;width:128%;height:96%;border-radius:50%;background:radial-gradient(closest-side,rgba(255,255,255,.95),rgba(255,255,255,0));transform:translateX(-50%);pointer-events:none}
body.hb-shelves .shelf-spool>img{position:relative;display:block;width:100%;height:100%;object-fit:contain;object-position:bottom;background:transparent!important;box-shadow:none!important;filter:none!important;mix-blend-mode:multiply!important;transition:transform .24s cubic-bezier(.2,.8,.2,1),opacity .2s}
body.hb-shelves .shelf-spool .hb-spool{position:relative;transition:transform .24s cubic-bezier(.2,.8,.2,1),opacity .2s}
body.hb-shelves .shelf-spool:is(:hover,:focus-visible)>:is(img,.hb-spool){transform:translateY(-10px) scale(1.05)}
.hb-mirror{position:absolute;left:0;right:0;top:100%;height:24px;overflow:hidden;opacity:.22;mix-blend-mode:multiply;pointer-events:none;-webkit-mask-image:linear-gradient(#000,transparent);mask-image:linear-gradient(#000,transparent)}
.hb-mirror img{display:block;width:100%;height:var(--photo-height,158px);object-fit:contain;object-position:bottom;transform:scaleY(-1)}
.hb-spool-left{top:46%;padding:2px 9px;background:var(--ink);font-size:12px}
body.hb-shelves .inventory-card.hb-hit .shelf-spool{outline:0}
body.hb-shelves .inventory-card.hb-hit .shelf-spool>:is(img,.hb-spool){transform:translateY(-8px) scale(1.06)}
body.hb-shelves .inventory-card.hb-dim{opacity:1}
body.hb-shelves .inventory-card.hb-dim .shelf-spool>img,body.hb-shelves .inventory-card.hb-dim .shelf-spool>.hb-spool{opacity:.16;filter:grayscale(1)!important}
body.hb-shelves .inventory-card.hb-dim :is(.hb-spool-left,.shelf-spool-count,.hb-mirror){opacity:.15}

/* AMS, drukarka i suszarka: jasne urządzenia */
body.hb-shelves [data-hb-place=ams] .inventory-place-products{padding:12px;border-radius:22px;background:linear-gradient(180deg,#fff 0,var(--shelf-back) 100%);box-shadow:inset 0 0 0 1px var(--line);overflow:visible}
body.hb-shelves [data-hb-place=ams] .inventory-card,body.hb-shelves .hb-bay-empty{padding:24px 3px 16px!important;border-radius:15px!important;background:rgba(14,16,18,.035)!important}
body.hb-shelves [data-hb-place=ams] .inventory-card[data-hb-slot]::before,body.hb-shelves .hb-bay-empty::before{top:6px;color:var(--muted);font-size:12px}
body.hb-shelves [data-hb-place=ams] .inventory-card::after{content:"";position:absolute;left:50%;bottom:7px;width:18px;height:4px;border-radius:9px;background:#b9bdc2;transform:translateX(-50%)}
body.hb-shelves [data-hb-place=ams] .inventory-card[data-hb-low]::after{background:var(--ink)}
body.hb-shelves [data-hb-place=ams] .shelf-spool{--photo-height:100px;height:100px}
body.hb-shelves :is([data-hb-place=ams],[data-hb-place=printer],[data-hb-place=dryer]) :is(.hb-mirror,.shelf-spool::before){display:none}
body.hb-shelves :is([data-hb-place=printer],[data-hb-place=dryer]) .inventory-place-products{position:relative;height:172px;min-height:0;padding:10px;border-radius:22px;background:linear-gradient(180deg,#fff 0,var(--shelf-back) 100%);box-shadow:inset 0 0 0 1px var(--line);align-items:center;overflow:hidden}
body.hb-shelves [data-hb-place=dryer] .inventory-place-products{border:0;background:#fff;box-shadow:inset 0 0 0 1px var(--line),inset 0 0 0 7px var(--hb-stage)}
.hb-machine{position:absolute;left:8px;bottom:8px;top:8px;height:calc(100% - 16px);width:auto;max-width:72%;object-fit:contain;object-position:left bottom;mix-blend-mode:multiply;pointer-events:none}
body.hb-shelves [data-hb-place=printer] .inventory-place-products:has(.hb-machine){justify-content:flex-end;align-items:flex-end}
body.hb-shelves [data-hb-place=printer] .inventory-place-products:has(.hb-machine) .inventory-card{flex:0 1 82px!important}
body.hb-shelves [data-hb-place=printer] .inventory-place-products:has(.hb-machine) .shelf-spool{height:82px}
body.hb-shelves :is([data-hb-place=printer],[data-hb-place=dryer]) .inventory-card{max-width:96px!important}

/* Chcę mieć: nazwa i cena pod półką */
body.hb-shelves #realShelfPanel .shelf-rails{padding:18px 16px 8px}
body.hb-shelves #realShelfPanel .shelf-layout-row{--photo-height:206px}
body.hb-shelves #realShelfPanel .shelf-board-button{display:none}
body.hb-shelves #realShelfPanel .shelf-rail{align-items:stretch;padding:14px 0 8px}
body.hb-shelves #realShelfPanel .shelf-rail>.visual-offer{display:flex;flex-direction:column}
body.hb-shelves #realShelfPanel .shelf-spool{display:block;height:auto;padding:0}
body.hb-shelves #realShelfPanel .shelf-spool>img{width:100%;height:var(--photo-height)!important}
body.hb-shelves #realShelfPanel .hb-mirror{top:var(--photo-height)}
.hb-want-caption{position:relative;margin-top:0;padding-top:36px;font-size:14.5px;line-height:1.25}
.hb-want-caption::before{content:"";position:absolute;left:-6px;right:-6px;top:0;height:22px;border-top:1px solid rgba(14,16,18,.1);background:linear-gradient(180deg,rgba(255,255,255,.95) 0,var(--shelf-tone) 45%,rgba(255,255,255,0) 100%)}
.hb-want-caption b{-webkit-line-clamp:unset;display:block}
.hb-want-caption span{margin-top:2px;color:var(--ink);font-size:17px;font-weight:700;letter-spacing:-.01em}
.hb-want-actions{display:flex;justify-content:center;gap:5px;margin-top:6px;opacity:0;transition:opacity .15s}
.visual-offer:is(:hover,:focus-within)>.hb-want-actions{opacity:1}
@media(hover:none){.hb-want-actions{opacity:1}}
body.hb-shelves .hb-want-actions button{display:inline-flex;align-items:center;width:auto;min-width:0;min-height:34px;height:auto;margin:0;padding:0 10px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:#fff!important;box-shadow:none!important;color:var(--ink)!important;font-size:12.5px!important;font-weight:500}
body.hb-shelves .hb-want-actions button:hover{border-color:#aeb4ba!important}
body.hb-shelves .hb-want-actions button::before,body.hb-shelves .hb-want-actions button::after{display:none!important;content:none!important}
body.hb-shelves .hb-want-actions button svg{display:none}
body.hb-shelves .hb-want-actions button[aria-pressed=true]{border-color:var(--ink)!important;background:var(--ink)!important;color:#fff!important}
body[data-shelf-density=detail].hb-shelves .hb-want-actions{display:none}

/* Zwijane rzędy pod półkami */
body.hb-shelves :is(.inventory-data,#sourceMonitor){margin:10px 0 0;padding:0;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:none}
body.hb-shelves :is(.inventory-data,#sourceMonitor)>summary{display:flex;align-items:center;justify-content:space-between;min-height:50px;padding:0 16px;border-radius:16px;font-size:14.5px;font-weight:500;list-style:none;cursor:pointer}
body.hb-shelves :is(.inventory-data,#sourceMonitor)>summary::-webkit-details-marker{display:none}
body.hb-shelves :is(.inventory-data,#sourceMonitor)>summary::before{display:none}
body.hb-shelves :is(.inventory-data,#sourceMonitor)>summary::after{content:"⌄";color:var(--muted);font-size:18px;line-height:1;transform:translateY(-3px)}
body.hb-shelves :is(.inventory-data,#sourceMonitor)>summary:hover{background:var(--hb-stage)}
body.hb-shelves :is(.inventory-data,#sourceMonitor)[open]{padding:0 16px 14px}
body.hb-shelves :is(.inventory-data,#sourceMonitor)[open]>summary{margin:0 -16px 8px}
body.hb-shelves .inventory-data :is(button.secondary,button.quiet){min-height:40px;margin:0 6px 6px 0;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);font-size:13.5px;text-decoration:none}

/* Filtry miejsc */
body.hb-shelves .shelf-organization .inventory-filterbox :not(select,input,button,option){border-color:transparent;background:none!important;box-shadow:none}
body.hb-shelves .shelf-organization .inventory-filterbox summary{cursor:pointer}

/* Zaznaczanie */
body.hb-shelves :not(.shelf-selecting)>.shelf-check{display:none!important}
body.hb-shelves .shelf-check{position:absolute;left:6px;top:6px;z-index:3;display:grid;place-items:center;width:28px;height:28px;min-width:0;min-height:0;margin:0;padding:0;border:1.5px solid var(--ink);border-radius:50%;background:#fff;box-shadow:none;font-size:0;cursor:pointer}
body.hb-shelves .shelf-check input{width:100%;height:100%;margin:0;appearance:none;-webkit-appearance:none;border:0;border-radius:50%;background:none;cursor:pointer}
body.hb-shelves .shelf-check:has(input:checked){background:var(--ink)}
body.hb-shelves .shelf-check:has(input:checked)::after{content:"✓";position:absolute;color:#fff;font-size:15px;line-height:1;pointer-events:none}
body[data-shelf-density=basic].hb-shelves .inventory-card:has(.shelf-check input:checked) .shelf-spool{outline:2px solid var(--ink);outline-offset:3px;border-radius:14px}
body.hb-shelves .shelf-selection:not([hidden]){position:fixed;left:50%;bottom:16px;z-index:30;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;width:max-content;max-width:calc(100vw - 24px);margin:0;padding:8px 8px 8px 16px;border:0;border-radius:18px;background:var(--ink);box-shadow:0 20px 40px -16px rgba(0,0,0,.55);color:#fff;font-size:14px;transform:translateX(-50%)}
body.hb-shelves .shelf-selection button,body.hb-shelves .shelf-selection .shelf-delete-action{min-height:38px;padding:0 11px;border:0;border-radius:11px;background:rgba(255,255,255,.14);color:#fff;font-size:13.5px;box-shadow:none}
body.hb-shelves .shelf-selection button:hover:not(:disabled){background:rgba(255,255,255,.24)}
body.hb-shelves .shelf-selection button:disabled{opacity:.5}

/* Wygląd półki: okno z boku */
dialog.shelf-style-dialog{position:fixed;inset:0 0 0 auto;width:400px;max-width:100vw;height:100dvh;max-height:none;margin:0;padding:18px;border:0;border-radius:0;background:#fff;box-shadow:-14px 0 40px rgba(0,0,0,.14);color:var(--ink);overflow-y:auto}
dialog.shelf-style-dialog::backdrop{background:rgba(14,16,18,.42)}
dialog.shelf-style-dialog h2{margin:0 0 2px;font-size:20px;font-weight:700;letter-spacing:-.02em;color:var(--ink)}
dialog.shelf-style-dialog>p{margin:0 0 12px;color:var(--muted);font-size:13.5px}
dialog.shelf-style-dialog .inventory-close{float:right;width:auto;min-height:40px;margin:0;padding:0 13px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-size:13.5px;box-shadow:none}
dialog.shelf-style-dialog form{clear:both;display:grid;gap:12px}
dialog.shelf-style-dialog fieldset{margin:0;padding:0;border:0}
dialog.shelf-style-dialog legend{margin-bottom:6px;padding:0;font-size:13.5px;font-weight:500}
dialog.shelf-style-dialog .shelf-palette{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
dialog.shelf-style-dialog .shelf-palette label{position:relative;display:flex;align-items:center;min-height:52px;margin:0;padding:0 12px 6px;border:0;border-radius:13px;background:var(--back);box-shadow:inset 0 0 0 1px rgba(14,16,18,.08);font-size:13.5px;font-weight:500;overflow:hidden;cursor:pointer}
dialog.shelf-style-dialog .shelf-palette label::after{content:"";position:absolute;left:0;right:0;bottom:0;height:7px;background:var(--swatch)}
dialog.shelf-style-dialog .shelf-palette input{position:absolute;width:1px;height:1px;opacity:0}
dialog.shelf-style-dialog .shelf-palette label:has(input:checked){outline:3px solid var(--ink);outline-offset:2px}
dialog.shelf-style-dialog .shelf-palette label:has(input:focus-visible){outline:3px solid #1f6fe0;outline-offset:2px}
dialog.shelf-style-dialog form>label{display:grid;gap:4px;font-size:13.5px;font-weight:500}
dialog.shelf-style-dialog select{min-height:44px;padding:0 10px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-weight:400}
dialog.shelf-style-dialog form>p{margin:0;color:var(--muted);font-size:13.5px}
dialog.shelf-style-dialog form>p:empty{display:none}
dialog.shelf-style-dialog button.primary{width:100%;min-height:48px;border:0;border-radius:14px;background:var(--hb-grad);box-shadow:0 10px 24px -10px rgba(240,38,172,.55);color:#fff;font-size:15px;font-weight:600}

/* Widok szczegółowy: karty bez ściany */
body[data-shelf-density=detail].hb-shelves .shelf-rails{padding:0;background:none;box-shadow:none;border-radius:0;overflow:visible;isolation:auto}
body[data-shelf-density=detail].hb-shelves .shelf-board-button{display:none}
body[data-shelf-density=detail].hb-shelves .shelf-rail{align-items:stretch;padding:0 0 4px}
body[data-shelf-density=detail].hb-shelves .shelf-rail>:is(.inventory-card,.visual-offer){padding:10px!important;border:1px solid var(--line)!important;border-radius:18px!important;box-shadow:none!important}
body[data-shelf-density=detail].hb-shelves .inventory-card :is(.inventory-photo,.visual-offer-photo){background:var(--hb-stage);border-radius:12px;isolation:isolate}
body[data-shelf-density=detail].hb-shelves .inventory-card :is(select){border:1px solid var(--line);border-radius:10px;background:#fff}
body[data-shelf-density=detail].hb-shelves :is(.inventory-card) .filament-badge{background:var(--hb-stage)!important;color:var(--ink)!important}

@media(min-width:701px) and (max-width:1100px){
 body.hb-shelves #workspace>.hb-shelf-stats{grid-row:2}
 body.hb-shelves #workspace>.hb-find{grid-row:3}
 body.hb-shelves #workspace>#shelfWorkbench{grid-row:4}
}
@media(max-width:700px){
 body.hb-shelves #workspace>.section-top{display:block}
 body.hb-shelves #viewTitle{font-size:25px}
 body.hb-shelves #workspace>#inventoryTabs{padding:0;background:none}
 body.hb-shelves #inventoryTabs>button:not(#shelfAdd){background:var(--hb-stage);border-radius:0}
 body.hb-shelves #inventoryTabs>button:not(#shelfAdd):first-child{border-radius:12px 0 0 12px}
 body.hb-shelves #inventoryTabs>button:not(#shelfAdd):nth-child(2){border-radius:0 12px 12px 0}
 body.hb-shelves #inventoryTabs>button:not(#shelfAdd)[aria-pressed=true],body.hb-shelves #inventoryTabs>button:not(#shelfAdd).active{background:#fff;box-shadow:inset 0 0 0 3px var(--hb-stage)}
 body.hb-shelves #inventoryTabs>#shelfAdd{position:static;grid-column:1/-1;width:100%;margin-top:8px;border-radius:14px}
 body.hb-shelves #workspace>.hb-shelf-stats{display:grid}
 .hb-shelf-stats span,.hb-shelf-stats span+span{padding:9px 10px;font-size:11.5px;line-height:1.15}
 .hb-shelf-stats b{font-size:20px}
 body.hb-shelves .shelf-rails{padding:12px 12px 0}
 body.hb-shelves .shelf-layout-row,body.hb-shelves .shelf-layout-row:first-child,body.hb-shelves .shelf-layout-row:last-child,body.hb-shelves .shelf-layout-row:only-child{--photo-height:104px}
 body.hb-shelves .shelf-rail{gap:4px;padding:10px 0 22px}
 body.hb-shelves .shelf-board-button{left:-12px;right:-12px}
 .hb-mirror{height:22px}
 body.hb-shelves [data-hb-place=ams] .inventory-card,body.hb-shelves .hb-bay-empty{padding:22px 2px 14px!important}
 body.hb-shelves [data-hb-place=ams] .shelf-spool{--photo-height:70px;height:70px}
 body.hb-shelves :is([data-hb-place=printer],[data-hb-place=dryer]) .inventory-place-products{height:150px;min-height:0;padding:8px}
 body.hb-shelves #realShelfPanel .shelf-rails{padding:14px 12px 4px}
 body.hb-shelves #realShelfPanel .shelf-layout-row{--photo-height:138px}
 .hb-want-caption{font-size:13px}.hb-want-caption span{font-size:15px}
 .hb-want-actions{opacity:1}
 body.hb-shelves .hb-want-actions button{padding:0 7px!important;font-size:12px!important}
 body.hb-shelves .shelf-selection:not([hidden]){left:10px;right:10px;bottom:calc(72px + env(safe-area-inset-bottom));width:auto;max-width:none;transform:none;padding:8px 10px}
 dialog.shelf-style-dialog{inset:auto 0 0 0;width:100%;height:88dvh;border-radius:24px 24px 0 0}
}
