/* Screen/pane flags (worlds-screen-*, *-pane, .rp-deck-row) replace :has(); `#_` never matches and only keeps the original :has(#id) specificity. */
/* Collection worktables. Opt-in desktop appearance; no game/action selectors. */
@media(min-width:1000px) and (min-height:521px){
body.worlds-ui :is(#screen-deck,#screen-deck-editor,#library-modal){--b-cream:#e8e1d1;--b-mid:#dbd4c3;--b-black:#263644;--muted:#5e655f;--muted2:#656960;--b-border:1px solid #8b8068;}
body.worlds-ui :is(#screen-deck,#screen-deck-editor){background:linear-gradient(#17273960,#17273960),url('/assets/worlds/lobby-sanctuary.png') center/cover no-repeat;}
body.worlds-ui #screen-deck{flex-direction:column;}
body.worlds-ui :is(#screen-deck,#screen-deck-editor) .lobby-header{background:linear-gradient(#152739ed,#152739ed),url('/assets/worlds/stone.png') center/cover;border:0;border-bottom:2px solid #ae9974;color:#f0dfbb;min-height:56px;flex-shrink:0;}
body.worlds-ui :is(#screen-deck,#screen-deck-editor) .lobby-logo{font-family:var(--worlds-title);letter-spacing:3px;border:0;color:#f0dfbb;}
body.worlds-ui :is(#screen-deck,#screen-deck-editor) .lobby-logo:after{display:none;}
body.worlds-ui :is(#screen-deck,#screen-deck-editor) .user-info{border:0;}
body.worlds-ui :is(#screen-deck,#screen-deck-editor) .btn-logout{color:#efe5cd;border:1px solid #b7aa8570;}
body.worlds-ui #screen-deck>div:nth-child(2){width:min(1280px,96%);max-width:1280px!important;flex:1;min-height:0;height:auto!important;margin:18px auto!important;padding:22px!important;border:25px solid transparent;border-image:url('/assets/worlds/lobby-stone-frame.png') 210 fill / 25px / 0 stretch;filter:drop-shadow(0 8px 10px #07132270);}
body.worlds-ui #screen-deck>div:nth-child(2)>div:first-child{flex-wrap:wrap;gap:12px;}
body.worlds-ui #deck-list{gap:18px!important;padding:4px 8px 12px!important;}
body.worlds-ui #deck-list>div.deck-has-cover{background:#f0eadb!important;border-color:#918366!important;box-shadow:0 3px 7px #3d372b30!important;border-radius:4px;}
body.worlds-ui #deck-list img{object-fit:contain!important;}
body.worlds-ui :is(#screen-deck,#screen-deck-editor) button{border-radius:3px;}
body.worlds-ui #screen-deck-editor>div:first-child{width:190px;background:linear-gradient(#e3dbcaee,#e3dbcaee),url('/assets/worlds/stone.png') center/cover;border-right:3px ridge #b7a98a;}
body.worlds-ui #screen-deck-editor>div:first-child .lobby-header{height:auto;flex-direction:column;padding:12px 0;gap:14px;}
body.worlds-ui #screen-deck-editor>div:first-child .user-info{padding:0 12px;margin:0;}
body.worlds-ui #screen-deck-editor>div:nth-child(2){padding:14px;}
body.worlds-ui #screen-deck-editor>div:nth-child(2)>div{border:20px solid transparent;border-image:url('/assets/worlds/lobby-stone-frame.png') 210 fill / 20px / 0 stretch;}
body.worlds-ui #screen-deck-editor div:is(.worlds-card-grid-pane,#_){border-right:1px solid #98886b!important;}
body.worlds-ui #screen-deck-editor div:is(.worlds-deck-list-pane,#_){width:320px!important;background:#e8e1d1!important;}
body.worlds-ui #screen-deck-editor div:is(.worlds-deck-list-pane,#_)>div{border-color:#a5957580!important;}
body.worlds-ui #editor-card-grid{background:#ddd7c8!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;}
body.worlds-ui #screen-deck-editor div:is(.worlds-card-grid-pane,#_)>div:first-child{max-height:42vh;overflow-y:auto;background:#e9e2d2!important;border-bottom:1px solid #a59575!important;}
body.worlds-ui #screen-deck-editor div:is(.worlds-deck-list-pane,#_)>div:nth-child(2){max-height:35vh;overflow-y:auto;flex-shrink:0;}
body.worlds-ui #deck-card-list{min-height:65px;}
body.worlds-ui #screen-deck-editor :is(input,select){border:1px solid #9d8b68!important;border-radius:3px;box-shadow:inset 0 1px 3px #4c422c20;}
body.worlds-ui #screen-deck-editor :is(.filter-chip,.cost-chip){border:1px solid #9f927a;background:#f4eedd;color:#314252;border-radius:3px;}
body.worlds-ui #screen-deck-editor :is(.filter-chip,.cost-chip).on{background:#263e50;color:#f5e2b4;box-shadow:inset 0 0 0 1px #d3ba80;}
body.worlds-ui #library-modal{padding:16px;background:linear-gradient(#12223570,#12223570),url('/assets/worlds/lobby-sanctuary.png') center/cover;}
body.worlds-ui .lib-box{border:22px solid transparent;border-image:url('/assets/worlds/lobby-stone-frame.png') 210 fill / 22px / 0 stretch;background:none;}
body.worlds-ui .lib-gate{background:linear-gradient(#ddd6c3d9,#ddd6c3d9),url('/assets/worlds/stone.png') center/cover;}
body.worlds-ui :is(.lib-header,.lib-gate-head){background:#203546;border-bottom:1px solid #b9a277;}
body.worlds-ui :is(.lib-header,.lib-gate-head)>div{font-family:var(--worlds-title)!important;color:#f1dfb4!important;}
body.worlds-ui :is(.lib-gate-title,.lib-gate-card){font-family:var(--worlds-title);}
body.worlds-ui .lib-gate-body{padding:28px;}
body.worlds-ui .lib-gate-card{border:22px solid transparent;border-image:url('/assets/worlds/lobby-stone-frame.png') 210 fill / 22px / 0 stretch;padding:8px 10px;background:none;font-size:21px;white-space:normal;min-height:100px;box-shadow:none;filter:drop-shadow(0 3px 3px #302b2540);}
body.worlds-ui .lib-gate-card.all{color:#263644;background:none;font-size:24px;}
body.worlds-ui .lib-gate-card:hover{color:#172c3e;background:none;filter:brightness(1.08) drop-shadow(0 0 5px #f3d695);}
body.worlds-ui :is(.lib-gate-search input,.lib-gate-search button,.lib-series-select){border:1px solid #998765;border-radius:3px;}
body.worlds-ui .lib-series-bar{background:#ded6c3;border-bottom:1px solid #a39270;}
body.worlds-ui .lib-filters{background:#e9e2d2;border-bottom:1px solid #a39270;max-height:37vh;overflow-y:auto;}
body.worlds-ui .lib-filter-label{color:#525a58;font-size:11px;}
body.worlds-ui .lib-chip{border:1px solid #8e826c;border-radius:3px;background:#263c4d;color:#f4e7c8;}
body.worlds-ui .lib-chip.on{background:#142a3c;border-color:#d6ae62;color:#ffe3a6;box-shadow:0 0 0 1px #b7914f;}
body.worlds-ui #lib-card-grid{background:#d8d2c4;grid-auto-rows:max-content!important;grid-template-columns:repeat(6,minmax(0,1fr));min-height:80px;}
body.worlds-ui #lib-card-grid .card-item{aspect-ratio:.73;width:100%;height:auto;min-height:0;min-width:0;align-self:start;border-radius:6px;border-color:#293743;}
body.worlds-ui #lib-card-grid .card-item img{position:absolute;top:4px;left:0;width:100%;height:calc(100% - 4px);}
body.worlds-ui .lib-header>div>span{color:#c3cec9!important;}
body.worlds-ui .lib-chip[data-ft="type"]{color:#e9e2cb!important;}
body.worlds-ui .lib-chip[data-ft="type"].on{color:#ffe3a6!important;}
body.worlds-ui :is(#lib-card-grid,#editor-card-grid,#ap-card-grid) img{object-fit:contain!important;}
/* Detail and deck utilities share stone exteriors, calm reading surfaces. */
body.worlds-ui :is(#lib-card-detail,#card-detail-modal,#ap-setup-modal,#deck-view-modal,#deck-view-card-modal,#deck-import-modal,#deck-export-modal,#deck-overview-modal,#deck-pick-modal){--b-cream:#e8e1d1;--b-mid:#dad2bf;--b-black:#263644;--b-border:1px solid #998967;--muted2:#64675d;background:#091b2dc9!important;padding:16px;}
body.worlds-ui :is(#lib-card-detail,#card-detail-modal,#ap-setup-modal,#deck-view-modal,#deck-view-card-modal,#deck-import-modal,#deck-export-modal,#deck-pick-modal)>div:first-child{border:24px solid transparent!important;border-image:url('/assets/worlds/lobby-stone-frame.png') 210 fill / 24px / 0 stretch!important;background:none!important;box-shadow:none!important;max-height:calc(100dvh - 32px);}
body.worlds-ui :is(#deck-import-modal,#deck-export-modal)>div:first-child{padding:20px!important;overflow-y:auto;}
body.worlds-ui :is(#deck-view-modal,#deck-pick-modal,#ap-setup-modal)>div:first-child>div:first-child{background:#24394a!important;border-bottom:1px solid #a28b60!important;font-family:var(--worlds-title)!important;}
body.worlds-ui :is(#deck-view-grid,#deck-view-stats,#deck-view-ap-section,#deck-pick-list,#ap-card-grid){background:#e8e1d1!important;border-color:#ac9c7c!important;min-height:0;}
body.worlds-ui :is(#deck-view-title,#cdm-name,#lcd-name,#dvcm-name){font-family:var(--worlds-title)!important;overflow-wrap:anywhere;}
body.worlds-ui .lcd-box{padding:10px;}
body.worlds-ui .lcd-img-col{width:260px;max-height:calc(100dvh - 102px);}
body.worlds-ui #lcd-img{max-height:calc(100dvh - 102px);object-fit:contain;}
body.worlds-ui .lcd-info-col{background:transparent;padding:10px 18px;min-width:0;}
body.worlds-ui .lcd-info-col>*{flex-shrink:0;}
body.worlds-ui .lcd-div{height:1px;background:#a39576;}
body.worlds-ui :is(#cdm-img,#dvcm-img,#deck-view-grid img,#deck-view-ap-grid img){object-fit:contain!important;border-radius:5px;}
body.worlds-ui #card-detail-modal>div:first-child{max-width:720px!important;padding:18px!important;}
body.worlds-ui :is(#cdm-name,#lcd-name){padding-right:28px;}
body.worlds-ui #cdm-img{width:190px!important;height:260px!important;}
body.worlds-ui #cdm-effect{font-size:13px!important;max-height:210px!important;background:#ede6d5!important;border:0!important;}
body.worlds-ui #deck-view-card-modal>div:first-child{overflow-y:auto;}
body.worlds-ui #dvcm-img{max-height:45vh;flex-shrink:0;}
body.worlds-ui #ap-setup-modal>div:first-child{overflow-y:auto;}
body.worlds-ui #ap-setup-modal>div:first-child>div:first-of-type{background:transparent!important;color:#263644;}
body.worlds-ui :is(#dvcm-effect,#dvcm-trigger){flex-shrink:0;}
body.worlds-ui #deckCoverModal{background:#091b2dc9!important;padding:16px;}
body.worlds-ui #deckCoverModal>.modal{background:none;border:26px solid transparent;border-image:url('/assets/worlds/lobby-stone-frame.png') 210 fill / 26px / 0 stretch;padding:16px;max-height:calc(100dvh - 32px);overflow-y:auto;box-shadow:none;}
body.worlds-ui #deckCoverModal .modal-title{font-family:var(--worlds-title);color:#263644;}
body.worlds-ui #deckCoverModal img{object-fit:contain;}
body.worlds-ui :is(#screen-deck,#screen-deck-editor,#library-modal,#lib-card-detail,#card-detail-modal,#ap-setup-modal,#deck-view-modal,#deck-pick-modal,#deck-import-modal,#deck-export-modal) :is(button,input,select):focus-visible{outline:3px solid #d2a84f;outline-offset:2px;}
@media(max-width:1200px){body.worlds-ui #screen-deck-editor>div:first-child{width:160px;}body.worlds-ui #screen-deck-editor div:is(.worlds-deck-list-pane,#_){width:280px!important;}body.worlds-ui #screen-deck-editor>div:nth-child(2){padding:6px;}}
}
