/* Spidergrid interaction/layout pass */
.library-panel,.board-panel{background:rgba(12,12,15,.96)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}
.library-panel:before,.board-panel:before{display:none!important}
.source-mode,.source-tabs,.search-field input,.icon-button,.secondary-button,.primary-button,.apple-button,.size-control{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.source-mode{background:rgba(255,255,255,.055)!important}
.export-surface{background:#09090c!important;box-shadow:none!important;border-color:rgba(255,255,255,.09)!important}
.export-surface:before{display:none!important}
.board{gap:2px!important}
.slot{border-radius:0!important;border:0!important;background:rgba(255,255,255,.055)!important;transition:transform .16s cubic-bezier(.2,.8,.2,1),opacity .16s ease,outline-color .16s ease,filter .16s ease!important}
.slot img{border-radius:0!important}
.slot.filled{box-shadow:none!important;cursor:grab;user-select:none;-webkit-user-select:none}
.slot.is-selected{outline:2px solid rgba(255,255,255,.96)!important;outline-offset:-2px;z-index:4;transform:scale(.955)}
.slot.pointer-dragging{opacity:.32;transform:scale(.94);filter:saturate(.75)}
.slot.pointer-drop-target{outline:2px solid rgba(255,255,255,.96)!important;outline-offset:-2px;transform:scale(.96);z-index:5}
.slot.drop-pop{animation:sgDropPop .24s cubic-bezier(.2,.9,.2,1)}
@keyframes sgDropPop{0%{transform:scale(.91)}55%{transform:scale(1.025)}100%{transform:scale(1)}}
.drag-ghost{position:fixed;z-index:120;pointer-events:none;overflow:hidden;border-radius:10px;box-shadow:0 18px 45px rgba(0,0,0,.42);transform:scale(1.02);opacity:.96;will-change:left,top,transform}
.drag-ghost img{width:100%;height:100%;object-fit:cover;display:block}
.swap-ghost{z-index:119;border-radius:0}
.search-dragging{opacity:.55!important}
.selection-menu{position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 18px);transform:translateX(-50%);z-index:100;display:flex;align-items:center;gap:6px;min-height:48px;padding:6px 7px 6px 14px;border:1px solid rgba(255,255,255,.16);border-radius:999px;background:rgba(18,18,22,.68);box-shadow:0 18px 50px rgba(0,0,0,.36);backdrop-filter:blur(26px) saturate(145%);-webkit-backdrop-filter:blur(26px) saturate(145%)}
.selection-menu.hidden{display:none!important}.selection-label{font-size:.76rem;font-weight:670;white-space:nowrap;color:#fff}.selection-menu button{min-height:36px;padding:0 12px;border:0;border-radius:999px;background:rgba(255,255,255,.11);color:#fff;font-weight:670}.selection-menu .delete-action{background:rgba(255,255,255,.92);color:#121216}
.finish-actions{display:flex;gap:7px;justify-content:flex-end;align-items:center;margin:10px 2px 2px}.finish-actions.hidden{display:none!important}.finish-actions button{min-height:42px;padding:0 16px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.09);color:#fff;font-weight:700}.finish-actions .done-action{background:#fff;color:#111116}
.apple-connect{position:relative!important;width:48px!important;min-width:48px!important;padding:0!important;display:grid!important;place-items:center!important;background:rgba(255,255,255,.09)!important;color:#fff!important;border-color:rgba(255,255,255,.13)!important}
.apple-connect .apple-glyph{margin:0!important;font-size:21px;line-height:1}.connect-state-icon{position:absolute;right:5px;bottom:5px;width:15px;height:15px;display:grid;place-items:center;border-radius:50%;background:#09090c;border:1px solid rgba(255,255,255,.2);color:#fff;font-size:10px;font-weight:800;line-height:1}.apple-connect[data-linked="true"] .connect-state-icon{font-size:11px}
.hint{margin-top:8px!important}
/* keep search width stable across source-state reflows */
.library-panel{min-width:0!important}
#searchControls.search-wrap:not(.hidden),.search-field,.search-field input{display:block!important;width:100%!important;min-width:0!important;max-width:none!important;box-sizing:border-box!important}
#appleTabs,.source-mode{width:100%!important;min-width:0!important;box-sizing:border-box!important}
[data-theme="light"] .library-panel,[data-theme="light"] .board-panel{background:rgba(245,245,246,.97)!important;border-color:rgba(20,20,24,.09)!important}[data-theme="light"] .export-surface{background:#111114!important}[data-theme="light"] .selection-menu{background:rgba(247,247,248,.74);border-color:rgba(20,20,24,.13)}[data-theme="light"] .selection-label,[data-theme="light"] .selection-menu button{color:#111114}[data-theme="light"] .selection-menu button{background:rgba(0,0,0,.07)}[data-theme="light"] .selection-menu .delete-action{background:#111114;color:#fff}
@media(max-width:960px){.workspace{display:flex!important;flex-direction:column!important;gap:12px!important;align-items:stretch!important;width:100%!important}.board-panel{order:1!important;display:flex!important;flex-direction:column!important;width:100%!important;max-width:none!important;align-self:stretch!important}.library-panel{order:2!important;position:relative!important;top:auto!important;width:100%!important;max-width:none!important;align-self:stretch!important}.export-surface{order:1!important}.board-toolbar{order:2!important;margin:10px 0 0!important}.finish-actions{order:3!important}.hint{order:4!important}#searchControls,.search-field,.search-field input,.results,.empty-state{width:100%!important;max-width:none!important}}
@media(max-width:640px){.shell{width:100%!important;padding:0 10px!important}.topbar{top:6px!important;margin-top:6px!important;min-height:56px!important;padding:0 8px 0 14px!important;border-radius:20px!important}.app-main{padding-top:8px!important;width:100%!important}.workspace{gap:10px!important}.board-panel{padding:0!important;border:0!important;border-radius:0!important;background:transparent!important}.export-surface{padding:10px!important;border-radius:14px!important}.board{gap:2px!important}.slot{border-radius:0!important}.board-toolbar{padding:4px 2px!important;gap:9px!important}.toolbar-actions{width:100%!important;justify-content:flex-start!important}.library-panel{top:auto!important;padding:10px!important;border-radius:18px!important;background:rgba(12,12,15,.98)!important}.source-mode{border-radius:12px!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.mode-tab{border-radius:9px!important}.results{max-height:48vh!important}.simple-footer{display:none!important}.album-art-wrap{border-radius:8px!important}.album-card{-webkit-touch-callout:none!important;touch-action:pan-y!important}.slot{touch-action:none!important}body.grid-complete .library-panel,body.grid-complete .board-toolbar,body.grid-complete .hint{display:none!important}body.grid-complete .export-surface{border-radius:14px!important}body.grid-complete .finish-actions{justify-content:center!important;margin:12px 0 2px!important}}
