/* Geometry stays in the SVG grid; materials and piece faces are independent. */
body[data-screen=room] .scene-board>svg[data-collection]{background:none!important;outline:none!important;box-shadow:0 3px 4px #21150755}
body[data-screen=room] .piece[data-collection]{background:radial-gradient(ellipse at 35% 20%,var(--set-face),var(--set-light));border-color:var(--set-edge);box-shadow:0 5px 0 var(--set-side),1px 7px 4px #1e100955;color:#a91f20;text-shadow:0 1px #fff5}
body[data-screen=room] .piece.black[data-collection]{color:#222b29}
body[data-camera=overview] .piece[data-collection]{box-shadow:0 2px 0 var(--set-side),1px 3px 2px #21150966}
body[data-screen=room] .piece[data-collection]{position:relative;isolation:isolate;overflow:visible}
.piece-glyph{position:relative;z-index:1;line-height:1;font:inherit;pointer-events:none}
body[data-screen=room] .piece[data-collection]::after{content:'';position:absolute;inset:7%;border:1px solid #fff5;border-radius:50%;pointer-events:none}
body[data-screen=room] .piece[data-collection=wood]{background:repeating-linear-gradient(7deg,#e3ad65 0 3px,#efc380 4px,#e7b16b 6px);border-color:#b2773d}
body[data-screen=room] .piece[data-collection=ebony]{background:radial-gradient(ellipse at 30% 15%,#fff3cf,#dbc79f 85%);border:2px solid #3a2a21;color:#a91f20;box-shadow:0 5px 0 #15100e,1px 7px 4px #1e100977}
body[data-screen=room] .piece.black[data-collection=ebony]{color:#211916}
body[data-screen=room] .piece[data-collection=bronze]{background:radial-gradient(ellipse at 30% 15%,#e9be73,#b17639 67%,#73512b);border-color:#815d32;color:#8c1012;box-shadow:0 5px 0 #80572e,1px 7px 4px #1e100966}
body[data-screen=room] .piece[data-collection=lacquer]{background:radial-gradient(ellipse at 35% 15%,#fff6da,#ecd7b1 85%);border:2px solid #7f3b39;color:#a91f20;box-shadow:0 5px 0 #300611,1px 7px 4px #1e100966}
body[data-screen=room] .piece.black[data-collection=lacquer]{color:#2b1a18}
body[data-screen=room] .piece[data-collection=jade]{background:radial-gradient(ellipse at 35% 20%,#fffef8,#eee9d9 75%);border-color:#c0b9a5;box-shadow:0 5px 0 #c7c1af,1px 7px 4px #1e100944}
body[data-screen=room] .piece[data-collection=agate]{background:repeating-linear-gradient(155deg,#f8d5c7 0 3px,#d995a5 4px,#f4b7bb 6px,#fff1db 8px,#efbcc0 11px);border-color:#90294b;box-shadow:0 5px 0 #8b2748,1px 7px 4px #1e100966}
body[data-screen=room] .piece[data-collection=dragon]{background:none;border:0;box-shadow:none!important;filter:drop-shadow(1px 3px 1px #38200a99);color:#a90f0c;text-shadow:0 1px #ffe590}
body[data-screen=room] .piece.black[data-collection=dragon]{color:#241a08}
body[data-screen=room] .piece[data-collection=dragon]::before{content:'';position:absolute;left:0;top:-25%;width:100%;height:150%;background:url('assets/collections/dragon-piece-v1.png') center/100% 100% no-repeat;z-index:0;pointer-events:none}
body[data-screen=room] .piece[data-collection=dragon]::after{display:none}
body[data-camera=overview] .piece[data-collection]:not([data-collection=dragon]){box-shadow:0 2px 0 var(--set-side),1px 3px 2px #21150966}
/* Visible cylinder sidewalls replace the thin disc plus flat shadow. The top
   face remains centered on the same intersection, preserving move hitboxes. */
body[data-screen=room] .piece[data-collection]:not([data-collection=dragon]){background:none;border:0;box-shadow:none;filter:drop-shadow(1px 3px 2px #27180c88)}
body[data-screen=room] .piece[data-collection]:not([data-collection=dragon])::before{display:none}
.piece-art{position:absolute;left:0;top:0;width:100%;height:135%;z-index:0;pointer-events:none;overflow:visible}
body[data-screen=room] .piece[data-collection]:not([data-collection=dragon])::after{display:none}
body[data-screen=room][data-camera=overview] .piece[data-collection]:not([data-collection=dragon]){box-shadow:none;filter:drop-shadow(.5px 1.5px .8px #27180c88)}
#equippedBoardName{display:block;color:#ffe2a0;line-height:1.5;margin-top:5px;font-size:17px;font-weight:600}
#equippedPieceNames{display:block;color:#fff1ce;font-size:14px;line-height:1.5;margin-top:4px}
#openCollections{border-color:#e7c575;font-weight:bold}
#collectionDialog{width:min(1000px,95vw);max-height:90vh;overflow:auto}
#collectionDialog h2{font-size:28px}#collectionDialog p{font-size:17px}
.collection-fields{display:flex;gap:18px}.collection-fields label{flex:1;font-size:18px}
.collection-fields select{display:block;width:100%;margin-top:8px;padding:12px;background:#443729;color:#ffedc4;border:1px solid #bd9658;border-radius:8px;font:18px 'Segoe UI',sans-serif}
#collectionCards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.collection-card{padding:10px;display:flex;flex-direction:column;gap:7px;text-align:left}
.collection-card svg{width:100%;height:155px}.collection-card b{font-size:17px}.collection-card small{font-size:13px}
.collection-card[aria-pressed=true]{border:2px solid #ffdb7a;background:#68502d}
#collectionNotice{color:#ffdda2;min-height:24px}#saveCollection{font-size:20px;min-height:48px}
@media(max-width:700px){#collectionCards{grid-template-columns:repeat(2,minmax(0,1fr))}.collection-fields{flex-direction:column;gap:0}}
