.cos-art{display:block;max-width:100%;width:100%;height:100%;object-fit:contain;pointer-events:none}.cos-avatar{display:inline-block;position:relative;vertical-align:middle;isolation:isolate;overflow:hidden;border-radius:12%}.cos-avatar>.cos-art{position:absolute;inset:0}.cos-avatar-face{position:absolute;left:25%;top:23%;width:50%;height:50%;border-radius:50%;overflow:hidden}.cos-avatar-face>*{width:100%!important;height:100%!important}.cos-face-crop{position:relative;display:inline-block;overflow:hidden;border-radius:50%;flex:none}.cos-plate{position:relative;display:inline-block;width:240px;max-width:100%;height:auto!important;background:none!important;overflow:visible;vertical-align:middle}.cos-plate-copy{position:absolute;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.1;font-size:clamp(10px,1.3vw,16px);color:#233747;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cos-personal{position:relative;isolation:isolate;overflow:hidden}.cos-personal:before{content:'';position:absolute;inset:0;z-index:-1;background-image:linear-gradient(90deg,#fffef2ee,#fffef2b8),var(--cos-bg);background-size:cover;background-position:center;pointer-events:none}.cos-member-heading{display:flex;align-items:center;gap:8px;min-width:0}.cos-player{display:flex;align-items:center;gap:10px;padding:12px;min-width:0}.cos-player>div{min-width:0}.cos-player small{display:block}.cos-sample{height:150px!important;background:#faf8ee!important;overflow:hidden}.cos-sample>.cos-art{height:100%;width:100%}.cos-wheel{position:relative;width:100%;height:auto!important;isolation:isolate}.cos-wheel>.cos-wheel-art{position:absolute;inset:0;width:100%;height:100%;z-index:0}.cos-wheel>svg{z-index:1;border-radius:50%;overflow:hidden}.cos-wheel-hub{position:absolute;z-index:2;transform:translate(-50%,-50%);width:18%;aspect-ratio:1;display:grid;place-items:center;border-radius:50%;background:#fff8e1;border:3px double #cba450;color:#234b40;font-weight:700;pointer-events:none}.cos-wheel .mag-wheel-trigger{z-index:3!important;margin:0!important}.cos-cardBack,.cos-parcel{position:relative;isolation:isolate}.cos-item-art{position:absolute;inset:0;z-index:-1}.cos-cardBack{background:transparent!important;border-color:transparent!important}.cos-cardBack>span{visibility:hidden}.cos-cardBack>small{background:#fffbe9;color:#26384a;border-radius:4px;position:relative;z-index:1}.cos-parcel{background:#faf7ec!important}.cos-parcel>.cos-item-art{padding:5%;box-sizing:border-box}.cos-parcel>i{visibility:hidden}.cos-parcel>small,.cos-parcel>strong,.cos-parcel>b{position:relative;background:#fffdf1e8;border-radius:5px;color:#263b42}.cos-table{position:relative;background:transparent!important;border:none!important;border-radius:0!important;isolation:isolate}.cos-table>.cos-item-art{object-fit:fill}.cos-sharing{box-sizing:border-box;max-width:100%;margin:12px 0;border:1px solid #d0dccc;border-radius:12px;padding:10px 16px;background:#fffdf4;color:#29483f}.cos-sharing summary{cursor:pointer;min-height:24px}.cos-sharing button{min-height:44px}.cos-sharing small{display:block}.cos-preview-dialog{width:min(760px,calc(100% - 32px));max-height:90dvh;box-sizing:border-box;border:1px solid #b9cbbb;border-radius:18px;padding:18px;overflow:auto}.cos-preview-dialog::backdrop{background:#142b3966}.cos-preview-art{height:min(65dvh,540px);display:grid;place-items:center}.cos-preview-art .cos-art{max-height:100%;width:100%}.cos-shop-select{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.cos-shop-select select,.cos-shop-select input{min-height:44px;max-width:100%;min-width:0}.cos-scope{font-size:13px;line-height:1.5}.cos-try{margin:8px 0;min-height:44px}@media(max-width:480px){.cos-plate{width:190px}.cos-plate-copy{font-size:11px}.cos-avatar{flex-shrink:0}.cos-sharing{padding:10px}.cos-shop-select>*{flex:1 1 45%}.cos-preview-dialog{padding:12px}}@media(prefers-reduced-motion:reduce){.cos-art,.cos-avatar{animation:none!important}}
.cos-machine{position:relative!important;isolation:isolate;background:none!important;box-shadow:none!important}.cos-machine>.cos-machine-shell{position:relative;width:100%;height:100%;display:block;pointer-events:none}.cos-machine>.machine-label,.cos-machine>.chute,.cos-machine>.machine-base,.cos-machine>.pg-ball-chute,.cos-machine>.pg-ball-base{visibility:hidden!important}.cos-machine-knob{position:absolute;overflow:hidden;border-radius:50%;pointer-events:none}.cos-machine-knob svg{width:100%;height:100%}.cos-machine>#drawn-ball,.cos-machine>.pg-ball-number{position:absolute!important;left:var(--cos-port-x)!important;top:var(--cos-port-y)!important;transform:translate(-50%,-50%);width:10%!important;height:auto!important;aspect-ratio:1;display:grid;place-items:center;font-size:clamp(12px,3vw,22px);animation:cos-ball-drop .8s ease-out}.cos-machine>#drawn-ball[hidden]{display:none!important}.cos-table>.cos-item-art{width:100%;height:100%;object-fit:fill}.cos-table>.felt-line{display:none}.cos-parcel.package{color:transparent!important}.cos-parcel.package>.cos-item-art{z-index:0}.cos-cardBack>.cos-item-art{z-index:0}.cos-cardBack>small{z-index:1}@keyframes cos-ball-drop{0%{transform:translate(-50%,-190%) scale(.55);opacity:0}40%{opacity:1}70%{transform:translate(-50%,-30%) scale(1.1,.9)}85%{transform:translate(-50%,-80%)}100%{transform:translate(-50%,-50%)}}@media(prefers-reduced-motion:reduce){.cos-machine>#drawn-ball,.cos-machine>.pg-ball-number{animation:none}}
.cos-label-skin{background-image:linear-gradient(#fff8,#fff8),var(--cos-label)!important;background-size:100% 100%!important;background-position:center!important}.cos-personal{overflow:visible}#avatar>img{width:100%;height:100%;object-fit:cover;border-radius:50%}.cos-wheel>.cos-wheel-art{inset:auto}.cos-wheel .mag-wheel-trigger{left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important}
.cos-machine{position:relative!important;isolation:isolate;background:none!important;box-shadow:none!important}.cos-machine>.cos-machine-shell{position:absolute}.cos-table{border-radius:inherit!important}.cos-wheel .cos-art{filter:none}
.cos-preview-scene{height:auto;display:flex;flex-direction:column;gap:12px}.cos-preview-scene-inner{position:relative;max-width:100%;width:100%;max-height:540px;display:grid;place-items:center}.cos-preview-scene-inner>.cos-art{max-height:480px}.cos-preview-table .cos-art{width:100%;height:100%}.cos-preview-hand{position:absolute;left:20%;right:20%;top:48%;display:flex;gap:2%;height:20%;justify-content:center}.cos-preview-hand>span{width:12%;height:100%}.cos-preview-title{display:block;padding:10px 22px;border:2px double #c6aa6b;border-radius:12px;background:#fff9e9;margin:12px auto;text-align:center}.cos-preview-profile{position:absolute;bottom:10%;left:10%;padding:12px;border-radius:10px;background:#fffdf1e6}.cos-preview-machine{max-width:340px!important;display:block!important;margin:auto}.cos-preview-machine>.pg-ball-number[hidden]{display:none!important}.cos-preview-machine>.pg-ball-number{border-radius:50%;background:#f4d27d;color:#153b4d;border:2px solid #ad8549}
.cos-personal>.cos-personal-art{position:absolute;inset:0;width:100%;height:100%;z-index:-2;border-radius:inherit;overflow:hidden;object-fit:cover}.cos-personal:before{background:linear-gradient(90deg,#fffef2e6,#fffef2b8);border-radius:inherit}.cos-parcel.pg-ball-package{color:transparent!important}.cos-parcel.pg-ball-package>.cos-item-art{z-index:0}.cos-parcel>span:not(.cos-item-art){position:relative;background:#fffdf1e8;border-radius:4px;color:#263b42}
.cos-avatar.cos-avatar{padding:0!important;margin:0!important;border:0!important;background:transparent!important;display:inline-block!important;box-shadow:none!important;min-width:0!important;min-height:0!important;line-height:normal!important}.cos-avatar .cos-avatar-face{padding:0!important;margin:0!important;border:0!important;background:transparent!important;display:block!important;box-shadow:none!important;position:absolute!important;left:25%!important;top:23%!important;width:50%!important;height:50%!important}.cos-avatar .cos-face-crop{padding:0!important;margin:0!important;border:0!important;background:transparent!important;display:block!important;box-shadow:none!important;position:relative!important;width:100%!important;height:100%!important}.cos-avatar>.cos-art{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;padding:0!important;margin:0!important}.cos-personal.cos-personal:before{background:linear-gradient(90deg,#fffef2e6,#fffef2b8)!important;opacity:1!important;inset:0!important;z-index:-1!important}.cos-personal.cos-personal>.cos-personal-art{inset:0!important;width:100%!important;height:100%!important;padding:0!important;margin:0!important;max-width:none!important;max-height:none!important;z-index:-2!important}.cos-canvas-placeholder{pointer-events:none}

/* Keep artwork inside its own viewport even when legacy page SVG rules apply. */
.cos-art.cos-art{overflow:hidden}
.cos-avatar.cos-avatar{position:relative!important;flex-shrink:0!important;aspect-ratio:1;max-width:none;max-height:none;transform:none!important}
.cos-avatar.cos-avatar>.cos-avatar-face{overflow:hidden!important;border-radius:50%!important}
.cos-avatar-face>img{display:block!important;object-fit:cover!important;border:0!important;outline:none!important;margin:0!important;max-width:none!important}
.cos-avatar.personal-avatar{flex-basis:auto!important}
#hero>#avatar{border:0;box-shadow:none;background:transparent;border-radius:0;display:flex;align-items:center;justify-content:center}
#hero>#avatar>.cos-avatar{width:100%!important;height:100%!important;flex-basis:auto!important}
.cos-basic-sample{color:#29483f}
.cos-basic-frame{display:grid;place-items:center;width:80px;height:80px;border:4px solid;border-radius:50%;background:#fffdf5;font-size:30px;box-sizing:border-box}
.cos-basic-plate{display:inline-flex;align-items:center;justify-content:center;padding:8px 18px;border:1px solid #bfcac3;border-radius:10px;font:600 14px/1.5 system-ui;color:#29483f;max-width:100%;box-sizing:border-box;text-align:center}
.cos-basic-background{display:grid;place-items:center;width:100%;height:100%;min-height:110px;padding:18px;box-sizing:border-box;color:#29483f;font-size:32px}
.cos-preview-art>.cos-basic-plate{height:auto;width:auto}

.cos-equipped-plate-slot{height:88px;display:flex;align-items:center;max-width:100%}.cos-avatar.personal-avatar{border-radius:12%!important}.cos-preview-art:not(.cos-preview-scene){align-content:center}
.cos-item-status{min-height:3em;line-height:1.5}
.cos-plate.cos-plate{padding:0!important;border:0!important;box-shadow:none!important;border-radius:0}

/* The portrait sits behind a true alpha frame; opaque legacy art keeps its existing order. */
.cos-avatar>.cos-avatar-face{z-index:1}.cos-avatar>.cos-art{z-index:0}
.cos-avatar.cos-avatar-cutout{overflow:visible!important;border-radius:0!important}
.cos-avatar-cutout>.cos-art{z-index:2;object-fit:contain}
.cos-avatar.cos-avatar-cutout>.cos-avatar-face{z-index:0;left:11%!important;top:8%!important;width:78%!important;height:78%!important}
.cos-full-theme-button{position:absolute;right:8px;top:8px;z-index:3;font:12px/1.2 system-ui;min-height:32px;padding:6px 9px;border:1px solid #c5d4ce;border-radius:8px;background:#fffdf3ed;color:#29483f;cursor:pointer}
.cos-full-theme-art{width:100%;max-height:68dvh;display:grid;place-items:center;overflow:hidden}
.cos-full-theme-art>.cos-art{width:100%;height:100%;max-height:68dvh;object-fit:contain}
.cos-full-theme-dialog{max-width:600px}.cos-full-theme-dialog h2{font-size:18px}
.personal-profile-head>.cos-full-theme-button{top:auto;bottom:4px;right:4px;width:44px;min-height:44px;padding:4px;font-size:0}
.personal-profile-head>.cos-full-theme-button:after{content:'全图';font:12px/1.2 system-ui}

.cos-avatar-cutout .cos-avatar-face>img,.cos-avatar-cutout .cos-face-crop{border-radius:0!important}
.stage-main>.cos-sharing{position:relative;flex:0 0 auto;grid-column:1/-1;width:100%;box-sizing:border-box;margin:0 0 14px;padding:12px 16px}
.cos-sharing summary{cursor:pointer;min-height:32px;font-weight:700}.cos-sharing .cos-room-shop{display:inline-block;margin:8px 12px;min-height:32px;line-height:32px}.cos-sharing button{min-height:44px}

/* The skin replaces the old wrapper; dimensions and click targets stay unchanged. */
body .cos-parcel.cos-parcel.cos-parcel.cos-parcel{background:transparent!important;border-color:transparent!important;box-shadow:none!important;isolation:isolate}
body .cos-parcel.cos-parcel.cos-parcel.cos-parcel:before,body .cos-parcel.cos-parcel.cos-parcel.cos-parcel:after{display:none!important}
body .cos-parcel.cos-parcel.cos-parcel.cos-parcel>i,body .cos-parcel.cos-parcel.cos-parcel.cos-parcel>b{visibility:hidden!important}
body .cos-parcel.cos-parcel.cos-parcel.cos-parcel>.cos-item-art{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;padding:4px!important;z-index:0;overflow:hidden;transform:none!important}
body .cos-parcel.cos-parcel.cos-parcel.cos-parcel>small{position:absolute!important;top:6px!important;right:6px!important;z-index:2;transform:none!important;background:#fff8df!important;color:#283b43!important}
body .cos-parcel.cos-parcel.cos-parcel.cos-parcel:focus-visible{outline:3px solid #7960cd;outline-offset:2px}

/* Room renders restore scroll explicitly; late skin hydration must not re-anchor it. */
.game-session-shell,.game-session-shell .stage-main{overflow-anchor:none}

/* r8: keep original image proportions; compact content inside the play area. */
.relay-ui .cos-themed-table{width:calc(100% - 120px);max-width:1020px;height:auto!important;aspect-ratio:var(--cos-table-ratio,1.5);margin:110px auto 125px!important}
.relay-ui .cos-themed-table>.felt{inset:0!important;border-radius:12px!important;box-shadow:0 12px 30px #25304a18}
.relay-ui .cos-themed-table>.felt>.cos-item-art{object-fit:contain!important}
.relay-ui .cos-themed-table>.direction-label,.relay-ui .cos-themed-table .table-mark,.relay-ui .cos-themed-table .center-eyebrow{display:none}
.relay-ui .cos-themed-table .table-center{width:46%;left:47%;top:50%;color:var(--cos-table-ink,#243747);background:color-mix(in srgb,var(--cos-table-paper,#fffaf0) 92%,transparent);border-radius:14px;padding:12px;box-sizing:border-box}
.relay-ui .cos-themed-table .table-center h3{font-size:18px;color:inherit;margin:0 0 6px}
.relay-ui .cos-themed-table .source-caption{font-size:12px;line-height:1.5;color:inherit;margin:0 0 10px}
.relay-ui .cos-themed-table .source-cards,.relay-ui .cos-themed-table .source-cards.six{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:280px;min-height:0;margin:auto}
.relay-ui .cos-themed-table .draw-card{width:52px;min-width:52px;flex:0 0 52px;height:78px}
.relay-ui .cos-themed-table .table-state{font-size:11px;color:inherit;margin:8px 0 0}
.relay-ui .cos-themed-table .seat{width:140px}
.relay-ui .seat-avatar:has(.cos-avatar){background:transparent;border:0;box-shadow:none;overflow:visible;width:56px;height:56px;margin:0 auto 4px}
.relay-ui .seat-avatar>.cos-avatar{width:56px!important;height:56px!important}
.relay-ui .seat-name.cos-seat-plate{display:block;width:140px;padding:0!important;box-shadow:none;background:transparent!important;margin:auto}
.relay-ui .cos-seat-plate .cos-plate-copy{font-size:12px}
.cos-replaced-name[hidden]{display:none!important}
.stage-awards .stage-award-portrait:has(.cos-avatar){width:96px!important;height:96px!important;border:0!important;background:transparent!important;overflow:visible!important}
.stage-awards .stage-award-portrait>.cos-avatar{width:96px!important;height:96px!important;flex-basis:96px!important}
.cos-theme-entry{min-height:36px;padding:5px 10px;border:1px solid #d8d0e3;border-radius:9px;background:#fffdf5;color:#5b457b;font-size:12px;cursor:pointer;margin:4px}
.cos-full-theme-dialog{width:min(1060px,calc(100vw - 24px));height:min(900px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:16px;border:1px solid #ded6e8;border-radius:20px;background:#fcfaf5;color:#293445;overflow:hidden}
.cos-full-theme-dialog[open]{display:flex;flex-direction:column;gap:12px}
.cos-full-theme-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}
.cos-full-theme-dialog h2{font-size:17px;margin:0}
.cos-full-theme-dialog header button{min-width:64px;min-height:44px;border:1px solid #d7cee7;border-radius:10px;background:#f0eafa;color:#503b75}
.cos-full-theme-dialog .cos-full-theme-art{flex:1;min-height:0;width:100%;height:auto;aspect-ratio:auto!important;display:grid;place-items:center;overflow:hidden;background:#f1eee6;border-radius:10px}
.cos-full-theme-art>.cos-art{width:100%!important;height:100%!important;object-fit:contain!important;min-height:0}
@media(max-width:720px){.relay-ui .cos-themed-table{width:100%;height:680px!important;aspect-ratio:auto;margin:24px auto 80px!important;background:var(--cos-table-paper);border-radius:18px}.relay-ui .cos-themed-table>.felt{box-shadow:none}.relay-ui .cos-themed-table .table-center{width:56%;left:50%;padding:8px}.relay-ui .cos-themed-table .seat{width:92px}.relay-ui .seat-name.cos-seat-plate{width:92px}.relay-ui .cos-seat-plate .cos-plate-copy{font-size:10px}.relay-ui .cos-themed-table .draw-card{width:44px;min-width:44px;flex-basis:44px;height:68px}.relay-ui .cos-themed-table .source-cards{gap:6px}.relay-ui .cos-themed-table .table-center h3{font-size:15px}.relay-ui .cos-themed-table .source-caption{font-size:11px}.relay-ui .cos-theme-entry{font-size:10px;padding:3px 5px;min-height:32px}.cos-full-theme-dialog{padding:12px}.cos-full-theme-dialog h2{font-size:14px}}

@media(max-width:720px){.relay-ui .cos-themed-table .seat{left:clamp(46px,var(--cos-seat-x,50%),calc(100% - 46px))!important}.relay-ui .cos-themed-table[data-dense="true"]{height:900px!important}}

@media(max-width:720px){
.relay-ui .cos-themed-table,.relay-ui .cos-themed-table[data-dense="true"]{height:auto!important;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 6px;padding:12px 0;background:transparent;margin-bottom:24px!important}
.relay-ui .cos-themed-table .seat{position:relative;left:auto!important;top:auto!important;transform:none;width:100%;order:0;align-self:center}
.relay-ui .cos-themed-table .seat-self{order:3;grid-column:2}
.relay-ui .cos-themed-table>.felt{position:relative!important;inset:auto!important;order:2;grid-column:1/-1;width:100%;height:auto;aspect-ratio:var(--cos-table-ratio);border-radius:8px!important;overflow:hidden}
.relay-ui .cos-themed-table .table-center{width:60%;left:48%;top:50%;padding:6px;background:color-mix(in srgb,var(--cos-table-paper) 90%,transparent)}
.relay-ui .cos-themed-table .table-center h3{font-size:12px;line-height:1.4;margin:0 0 3px}
.relay-ui .cos-themed-table .source-caption,.relay-ui .cos-themed-table .table-state{display:none}
.relay-ui .cos-themed-table .source-cards,.relay-ui .cos-themed-table .source-cards.six{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;max-width:100%;padding:3px 0 7px;scroll-snap-type:x proximity}
.relay-ui .cos-themed-table .draw-card{scroll-snap-align:start;height:64px}
.relay-ui .cos-themed-table .table-next{padding:8px;min-height:44px;margin:3px 0}
}

 .relay-ui .seat-avatar:has(.wd-member-avatar){width:56px!important;height:56px!important;border:0!important;background:transparent!important;overflow:visible!important;box-shadow:none!important;padding:0!important;display:grid!important;place-items:center}
 .relay-ui .seat-avatar>.wd-member-avatar{width:56px!important;height:56px!important;flex:none;margin:0!important;display:block}
 .relay-ui .cos-themed-table,.relay-ui .cos-themed-table[data-dense=true]{display:grid!important;grid-template-columns:150px minmax(0,1fr) 150px!important;grid-template-rows:auto auto auto;gap:16px!important;height:auto!important;aspect-ratio:auto!important;padding:0!important;margin:20px auto!important;max-width:1400px;width:100%!important;background:transparent!important}
 .relay-ui .cos-themed-table>.felt{position:relative!important;inset:auto!important;grid-column:2!important;grid-row:2!important;order:0!important;width:100%!important;height:auto!important;aspect-ratio:var(--cos-table-ratio);align-self:center}
 .cos-seat-rail{display:flex;align-items:center;justify-content:space-evenly;gap:12px;min-width:0}
 .cos-seat-rail-top{grid-column:2;grid-row:1;flex-wrap:wrap}.cos-seat-rail-bottom{grid-column:2;grid-row:3;flex-wrap:wrap}.cos-seat-rail-left{grid-column:1;grid-row:2;flex-direction:column}.cos-seat-rail-right{grid-column:3;grid-row:2;flex-direction:column}
 .relay-ui .cos-themed-table .cos-seat-rail .seat{position:relative!important;left:auto!important;top:auto!important;transform:none!important;width:140px!important;min-width:0;flex:none;padding:6px;box-sizing:border-box;grid-column:auto!important;order:0!important}
 .relay-ui .cos-themed-table>.direction-label{display:none!important}
 @media(max-width:950px){.relay-ui .cos-themed-table,.relay-ui .cos-themed-table[data-dense=true]{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px 6px!important}.cos-seat-rail{display:contents}.relay-ui .cos-themed-table .cos-seat-rail .seat{width:100%!important;order:0!important}.relay-ui .cos-themed-table .cos-seat-rail-bottom .seat{order:3!important;grid-column:2!important}.relay-ui .cos-themed-table>.felt{grid-column:1/-1!important;grid-row:auto!important;order:2!important}.relay-ui .cos-themed-table .cos-seat-plate{width:100%!important;max-width:140px}}

/* r13: readable action on light and dark tabletop art. */
.relay-ui .cos-themed-table .table-next{background:#6043a4;color:#fff;border:1px solid #6043a4;font-weight:600;opacity:1}
.relay-ui .cos-themed-table .table-next:hover:not(:disabled){background:#4d328a}
.relay-ui .cos-themed-table .table-next:disabled{background:#e9e3f2;color:#62546e;border-color:#c9bdd8;opacity:1}

/* r15: the dialog uses the same parcel skin as the rack. Keep layout still while waiting. */
.game-dialog .tear-pack.cos-parcel,.reveal-dialog .tear-pack.cos-parcel{width:min(340px,100%)!important;height:260px!important;min-height:0!important;max-height:40dvh;margin:18px auto!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;position:relative;isolation:isolate;overflow:visible!important;transform:none!important}
.tear-pack.cos-parcel:before,.tear-pack.cos-parcel:after{display:none!important}
.tear-pack.cos-parcel>.cos-item-art{inset:0;padding:0!important;z-index:0;pointer-events:none}
.tear-pack.cos-parcel>:is(b,strong,small,.tear-strip){display:none!important}
.tear-pack.cos-parcel>span:not(.tear-strip){position:absolute;bottom:0;left:50%;transform:translateX(-50%);z-index:1;background:#fff5d3!important;color:#3d3447!important;border-radius:8px;padding:4px 12px!important;font-size:14px!important;line-height:1.5}
.reveal-dialog .tear-pack.tearing,.reveal-dialog .tear-pack.stage-gift-tearing{animation:none!important;transform:none!important}
.tear-pack.cos-parcel.tearing>.cos-item-art,.tear-pack.cos-parcel.stage-gift-tearing>.cos-item-art{animation:club-parcel-open .9s ease-out 1 both}
@keyframes club-parcel-open{0%{filter:brightness(1);opacity:1}35%{filter:brightness(1.18)}100%{filter:brightness(1);opacity:.75}}
@media(prefers-reduced-motion:reduce){.tear-pack.cos-parcel>.cos-item-art{animation:none!important}}

/* r20-skin-boundaries:start */
body .cos-plate>.cos-art{border-radius:0!important;clip-path:none!important;mask-image:none!important;object-fit:contain!important}
html body .mag-room-workspace .portal .shared-rack .sealed-slot.cos-parcel,
html body .stage-head-pack-grid .sealed-slot.cos-parcel{background:transparent!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important}
html body .mag-room-workspace .portal .shared-rack .sealed-slot.cos-parcel::before,
html body .mag-room-workspace .portal .shared-rack .sealed-slot.cos-parcel::after{display:none!important}
html body .sealed-slot.cos-parcel:focus-visible{outline:3px solid #7960cd!important;outline-offset:2px}
/* r20-skin-boundaries:end */

/* Cross-mode player identity: keep artwork and its owner together. */
.members .member.cos-personal,.players .player.cos-personal,.shared-players .player-square.cos-personal{isolation:isolate;overflow:hidden}
:is(.members .member,.players .player,.shared-players .player-square)>.wardrobe-room-plate.cos-plate{display:block;width:min(100%,320px);margin:10px auto!important;flex-shrink:0}
:is(.members .member,.players .player,.shared-players .player-square)>.personal-avatar{flex-shrink:0;aspect-ratio:1;object-fit:cover}

/* Warehouse stage: bounded board, persistent actions, no moving selection. */
.portable-game[data-mode=warehouse] .pg-feedback{height:68px;min-height:68px;padding:12px;border:1px solid transparent;margin:6px 0;font-weight:700;overflow:auto;box-sizing:border-box}
.portable-game[data-mode=warehouse] .pg-turn-identity{max-width:420px;margin:8px auto}
.portable-game[data-mode=warehouse] .pg-packs{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;align-items:start}
.portable-game[data-mode=warehouse] .pg-packs>div{min-height:220px}
.portable-game[data-mode=warehouse] .pg-packs button[aria-label]{height:170px;position:relative;display:flex;flex-direction:column;justify-content:space-between;padding:8px!important;transform:none!important;animation:none!important;transition:box-shadow .12s}
.portable-game[data-mode=warehouse] .pg-packs button[aria-label]>.cos-item-art{inset:28px 10% 55px;width:80%;height:87px;padding:0!important}
.portable-game[data-mode=warehouse] .pg-packs button[aria-label]>b{display:block!important;visibility:visible!important;font-size:14px}
.portable-game[data-mode=warehouse] .pg-packs button[aria-label]>span{visibility:visible!important;display:flex!important;align-items:center;justify-content:center;min-height:42px;font-size:13px;line-height:1.4;background:#fffdf1;color:#243f3b;border-radius:8px;white-space:normal}
.portable-game[data-mode=warehouse] .pg-packs button[data-selected=true]{outline:3px solid #8060c4!important;outline-offset:-3px;box-shadow:0 0 0 4px #8060c433!important;background:#eee5ff!important}
.portable-game[data-mode=warehouse] .pg-packs button[data-selected=true]::after{content:'✓ 已选中';position:absolute;top:8px;right:8px;padding:3px 6px;border-radius:8px;background:#6549b0;color:white;font-size:12px}
.portable-game[data-mode=warehouse] .pg-goods{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.portable-game[data-mode=warehouse] .pg-good{min-width:0;padding:12px}
.portable-game[data-mode=warehouse] .pg-good img{height:140px!important;max-width:100%;object-fit:contain}
.portable-game[data-mode=warehouse] .pg-good .pg-good img{height:90px!important}
.portable-game[data-mode=warehouse] .wd-card-label.cos-plate{width:min(100%,260px);grid-column:1/-1;font-size:14px}
.warehouse-actions{position:sticky;bottom:0;z-index:10;background:#fffcf4;padding:12px;display:flex;gap:12px;justify-content:center;border-top:1px solid #ddd;min-height:64px;box-sizing:border-box}
.warehouse-actions button{min-width:230px;min-height:44px}
body.warehouse-page:has(#room:not([hidden])) .market-hero{display:none}
body.warehouse-page:has(#room:not([hidden])) main{max-width:1600px;margin:auto;padding:12px}
body.warehouse-page #room:not([hidden]):not([data-phase=waiting]){height:calc(100dvh - 100px);display:flex;flex-direction:column;margin:0;padding:16px;box-sizing:border-box;overflow:hidden}
body.warehouse-page #room:not([hidden]):not([data-phase=waiting])>h2{font-size:18px;margin:0 0 8px}
body.warehouse-page #room:not([hidden]):not([data-phase=waiting])>#members{display:none}
body.warehouse-page #room:not([hidden]):not([data-phase=waiting])>.market-room-actions{position:absolute;right:24px;top:12px}
body.warehouse-page #room{position:relative}
body.warehouse-page #game{flex:1;min-height:0;overflow:auto;overflow-anchor:none;scrollbar-gutter:stable}
body.warehouse-page #game .portable-game{margin:0;padding:12px}
body.warehouse-page #game .portable-game>h2{font-size:21px;margin:0}
@media(max-width:600px){.portable-game[data-mode=warehouse] .pg-packs{grid-template-columns:repeat(2,minmax(0,1fr))}.warehouse-actions button{min-width:0;width:100%}body.warehouse-page #room:not([hidden]):not([data-phase=waiting])>.market-room-actions{position:static}body.warehouse-page #room:not([hidden]):not([data-phase=waiting]){height:calc(100dvh - 70px)}}
/* R31: stable identity, visible results and compact game workspaces. */
.wd-game-player{display:grid!important;grid-template-columns:56px minmax(0,1fr)!important;grid-template-rows:auto auto!important;align-items:center!important;gap:4px 12px!important;padding:12px!important;min-width:0;box-sizing:border-box}
.wd-game-player>.wd-member-avatar{grid-column:1;grid-row:1/3;position:relative!important;inset:auto!important;margin:0!important;width:56px!important;height:56px!important;aspect-ratio:1;align-self:center}
.wd-game-player>.wd-card-label{grid-column:2;grid-row:1;position:relative!important;inset:auto!important;transform:none!important;margin:0!important;max-width:100%!important;justify-self:center}
.wd-game-player>.wd-card-label.cos-plate{width:min(100%,360px)!important;min-width:0!important;height:auto!important;padding:0!important;border:0!important;background:transparent!important;overflow:visible!important}
.wd-game-player>.wd-game-copy{grid-column:2;grid-row:2;min-width:0;text-align:center}
.wd-game-player>.wd-game-copy>small{position:static!important;display:block;line-height:1.4;white-space:normal}
.cos-machine>#drawn-ball,.cos-machine>.pg-ball-number{width:clamp(48px,5vw,68px)!important;height:clamp(48px,5vw,68px)!important;min-height:48px!important;bottom:auto!important;right:auto!important;z-index:20!important;animation:none!important;transform:translate(-50%,-50%)!important;opacity:1!important;box-sizing:border-box!important;padding:0!important;display:grid!important;place-items:center!important;border-radius:50%!important;border:3px solid #fff!important;background:radial-gradient(circle at 30% 25%,#fff7cd,#efbc48)!important;color:#453519!important;box-shadow:0 4px 12px #172b4760!important;font-size:clamp(20px,2.5vw,28px)!important;line-height:1!important;overflow:visible!important}
.cos-machine>#drawn-ball[hidden],.cos-machine>.pg-ball-number[hidden]{display:none!important}
.cos-machine canvas{aspect-ratio:1!important;object-fit:contain!important;max-width:none!important;max-height:none!important}
.play-workspace{position:relative;min-width:0;scrollbar-gutter:stable;overscroll-behavior:contain}
.play-workspace-nav{display:flex;gap:6px;align-items:center;position:sticky;top:0;z-index:25;padding:8px;background:var(--cos-table-paper,#fffdf5);border:1px solid #d9ddd2;border-radius:12px;flex-wrap:wrap;margin:0 0 10px}
.play-workspace-nav button{min-height:44px;padding:8px 14px;border:1px solid #cdd6cc;border-radius:9px;background:#f2f4ed;color:#28504a;font:600 14px/1.2 system-ui;cursor:pointer}
.play-workspace-nav button[aria-pressed=true]{background:#285d54;color:white}
.play-workspace-nav button:focus-visible{outline:3px solid #e8b750;outline-offset:2px}
.play-workspace [data-workspace-hidden=true]{display:none!important}
.play-workspace .pg-ball-stage{margin:8px 0;gap:16px;align-items:start;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)}
.play-workspace .pg-ball-machine{width:min(100%,42dvh);max-width:410px;padding-bottom:42px}
.play-workspace .pg-ball-reveal{min-height:0;padding:12px;gap:10px}
.play-workspace .pg-ball-reveal h3{font-size:clamp(16px,1.6vw,23px);line-height:1.4}
.play-workspace .pg-ball-reveal .pg-good img,.play-workspace .pg-ball-reveal .pg-good svg{max-height:24dvh}
.play-workspace .pg-ball-package{width:110px;height:110px;font-size:45px}
.play-workspace .pg-ball-eyebrow{margin:4px}
.play-workspace .pg-auto-actions{margin-top:8px}
.play-workspace .pg-ball-left>button{margin-top:8px}
.play-workspace .pg-packs{gap:10px;grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}
.play-workspace .pg-packs button[aria-label^="选择包裹"]{min-height:140px;max-height:210px}
.play-workspace .pg-goods{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}
.play-workspace .pg-good>img,.play-workspace .pg-good>svg{height:clamp(90px,18dvh,180px);object-fit:contain}
.play-workspace .pg-good{padding:12px;font-size:14px;overflow-wrap:anywhere}
.play-workspace .pg-good>.wd-game-player{grid-template-columns:40px minmax(0,1fr)!important;padding:6px!important;gap:4px!important}
.play-workspace .pg-good>.wd-game-player>.wd-member-avatar{width:40px!important;height:40px!important}
body.play-room-page main{max-width:1500px;padding:8px 16px!important}
body.play-room-page main>.intro,body.play-room-page main>.market-hero{display:none}
body.play-room-page #room{height:calc(100dvh - 110px);overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain;padding-bottom:12px}
body.play-room-page #room>.room-top{margin:0;min-height:48px}
body.play-room-page #room .stage{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:18px;margin:10px 0;align-items:start}
body.play-room-page #room .machine{width:min(100%,43dvh);margin:auto}
body.play-room-page #room .reveal{padding:12px}
body.play-room-page #room .reveal h2{font-size:20px}
body.play-room-page #room .prize{height:clamp(110px,22dvh,230px);margin:8px}
body.play-room-page #room .prize img,body.play-room-page #room .prize svg{max-height:22dvh}
body.play-room-page #room #capacity{margin:4px 0}
body.play-room-page #footer,.play-workspace .controls,.play-workspace .ball-controls{position:sticky;bottom:0;z-index:22;padding:8px;background:#fffdf5;border-top:1px solid #dbe2d7;display:flex;gap:8px;flex-wrap:wrap}
.play-workspace .auction-arena{gap:12px;margin-top:8px}
.play-workspace .auction-warehouse-card{padding:12px}
.play-workspace .tickets,.play-workspace .bags{max-height:55dvh;overflow:auto;scrollbar-gutter:stable}
@media(max-width:650px){.play-workspace .pg-ball-stage,body.play-room-page #room .stage{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:8px}.play-workspace .pg-ball-machine,body.play-room-page #room .machine{width:100%;padding-bottom:20px}.play-workspace .pg-ball-reveal,body.play-room-page #room .reveal{padding:8px}.play-workspace .pg-ball-package{width:80px;height:80px}.play-workspace .pg-ball-reveal h3,body.play-room-page #room .reveal h2{font-size:15px}.play-workspace .pg-ball-reveal>.wd-game-player{grid-template-columns:36px minmax(0,1fr)!important;gap:4px!important;padding:4px!important}.play-workspace .pg-ball-reveal>.wd-game-player>.wd-member-avatar{width:36px!important;height:36px!important}.play-workspace .pg-ball-left>p:last-child{font-size:11px}.play-workspace .pg-auto-actions{flex-wrap:wrap}.play-workspace .pg-auto-actions button{flex-basis:100%;padding:9px}.play-workspace-nav{gap:4px;padding:5px}.play-workspace-nav button{padding:8px 10px;font-size:13px}body.play-room-page main{padding:6px!important}.play-workspace .pg-packs{grid-template-columns:repeat(3,minmax(0,1fr))}.play-workspace .pg-packs button[aria-label^="选择包裹"]{min-height:115px;font-size:12px}.wd-game-player>.wd-card-label.cos-plate{min-width:0!important}.cos-machine>#drawn-ball,.cos-machine>.pg-ball-number{width:48px!important;height:48px!important}}

.play-workspace #products{max-height:60dvh;overflow:auto;scrollbar-gutter:stable}.play-workspace>.actions{position:sticky;bottom:0;z-index:22;background:#fffdf5;padding:8px;display:flex;flex-wrap:wrap;gap:8px}.play-room-page #room>#members{max-height:18dvh;overflow:auto}.play-workspace .shared-players{max-height:50dvh;overflow:auto}


/* R34: compact operation surface, independently scrolling lists, retained skin artwork. */
.play-workspace-nav{flex-wrap:nowrap;overflow-x:auto;flex-shrink:0;scrollbar-width:thin;background:var(--cos-table-paper,#fffdf5)}
.play-workspace-nav button{flex:0 0 auto;white-space:nowrap}
.play-workspace[data-workspace-kind="balls"],.play-workspace[data-workspace-kind="kuji"],.play-workspace[data-workspace-kind="mall"]{height:var(--workspace-height,calc(100dvh - 120px));max-height:var(--workspace-height,calc(100dvh - 120px));overflow:auto;box-sizing:border-box;padding-bottom:12px;scroll-padding-block:64px 90px}
.play-workspace>.actions,.play-workspace .ball-controls,body.play-room-page #footer{box-shadow:0 -4px 16px #172b4712;background:var(--cos-table-paper,#fffdf5);border-radius:12px;min-height:52px;box-sizing:border-box}
.play-workspace .pg-packs{grid-template-columns:repeat(auto-fit,minmax(125px,1fr));max-height:42dvh;overflow:auto;align-content:start;padding:8px;box-sizing:border-box;scrollbar-gutter:stable}
.play-workspace .pg-packs button[aria-label^="选择包裹"]{height:150px;min-height:150px;max-height:150px;position:relative;transition:box-shadow .15s;overflow-wrap:anywhere}
.play-workspace .pg-packs button[aria-pressed="true"]{outline:3px solid var(--cos-accent,#7351bb);outline-offset:-3px;box-shadow:0 0 0 3px #ffd66d;transform:none!important}
.play-workspace .pg-packs button[aria-pressed="true"]:after{content:'已选择';position:absolute;top:4px;right:4px;background:#fff3c4;color:#463619;padding:3px 6px;border-radius:6px;font:700 12px/1.3 system-ui;z-index:4}
.play-workspace .pg-feedback{min-height:1.5em;margin:4px 0;text-align:center}
.play-workspace .pg-turn-identity{max-width:680px;margin:6px auto}
.play-workspace>h2,.play-workspace>.pg-round{margin:6px 0;text-align:center}
.play-workspace .pg-goods{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));max-height:49dvh;overflow:auto;align-items:start;scrollbar-gutter:stable;padding:6px}
.play-workspace .pg-good{min-width:0;margin:0}
.play-workspace .pg-good>img,.play-workspace .pg-good>svg{height:clamp(80px,16dvh,150px);max-width:100%;object-fit:contain}
.play-workspace .pg-contenders{max-height:38dvh;overflow:auto}
.play-workspace .pg-ball-stage{min-height:360px;align-items:center}
.play-workspace .pg-ball-reveal{max-height:57dvh;overflow:auto;box-sizing:border-box}
.play-workspace .pg-ball-reveal .pg-good{margin:auto}
body.warehouse-page.play-room-page #room.warehouse-playing{display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;overflow:hidden;gap:4px}
body.warehouse-page.play-room-page #room.warehouse-playing>h2{font-size:17px;margin:2px 0}
body.warehouse-page.play-room-page #room.warehouse-playing>#members{max-height:60px;margin:0;overflow:auto}
body.warehouse-page.play-room-page #room.warehouse-playing>.market-room-actions{margin:0;display:flex;gap:8px}
body.warehouse-page.play-room-page #room.warehouse-playing>#game{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
body.warehouse-page.play-room-page #room.warehouse-playing>#footer{position:relative;bottom:auto;margin:0;max-height:25dvh;overflow:auto}
.auction-arena{height:calc(100dvh - 190px);min-height:340px;align-items:stretch!important}
.auction-arena>.auction-console,.auction-arena>.auction-warehouse-column{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.auction-arena .auction-warehouse-card{margin-top:0}
.auction-arena .grid-wrap{max-height:43dvh}
.auction-surface-nav{display:none}
.play-workspace .tickets,.play-workspace .bags,.play-workspace #products{max-height:48dvh;overscroll-behavior:contain}
@media(max-width:650px){
 .play-workspace .pg-packs{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;max-height:37dvh;padding:5px}
 .play-workspace .pg-packs button[aria-label^="选择包裹"]{height:120px;min-height:120px;max-height:120px;font-size:12px;padding:5px}
 .play-workspace .pg-goods{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .play-workspace .pg-good{padding:7px;font-size:12px}
 .play-workspace .pg-ball-stage{min-height:270px;gap:6px}
 .play-workspace .pg-ball-reveal{max-height:49dvh}
 .auction-arena{height:auto;min-height:0}
 .auction-surface-nav{display:flex;gap:8px;margin:8px 0}
 .auction-surface-nav button{min-height:44px;flex:1}
 .auction-surface-nav button[aria-pressed=true]{outline:2px solid var(--cos-accent,#7351bb)}
 .auction-arena:not([data-surface="warehouse"])>.auction-warehouse-column,.auction-arena[data-surface="warehouse"]>.auction-console{display:none!important}
 .auction-arena>.auction-console{max-height:57dvh}
 .auction-arena .grid-wrap{max-height:30dvh}
 body.warehouse-page.play-room-page #room.warehouse-playing>#members{max-height:44px}
}
@media(max-height:550px){.play-workspace .pg-ball-stage{min-height:230px}.play-workspace .pg-packs,.play-workspace .pg-goods{max-height:45dvh}.auction-arena{min-height:240px}}

/* R35: keep game surfaces stable during refresh, skin loading and tab changes. */
.play-workspace,.play-workspace .pg-packs,.play-workspace .pg-goods,.auction-arena,.auction-console,.auction-warehouse-column,.grid-wrap,.warehouse-page #game,.balls-page #room{overflow-anchor:none;scroll-behavior:auto;scrollbar-gutter:stable}
.play-workspace .pg-good>img,.play-workspace .pg-good>svg{display:block;width:100%;object-fit:contain}
.play-workspace .pg-feedback{min-height:3em;line-height:1.5;box-sizing:border-box}
.play-workspace .pg-packs{height:42dvh}
.play-workspace .pg-goods{min-height:min(240px,40dvh)}
.auction-arena .auction-seat-status,.auction-arena #reveal-summary{min-height:2.8em}
/* Reserve member/status space instead of resizing the central game on updates. */
body.warehouse-page.play-room-page #room.warehouse-playing>#members{height:60px;flex-shrink:0}
body.warehouse-page.play-room-page #room.warehouse-playing>.market-room-actions{min-height:44px}
.warehouse-playing>#game>.portable-game{min-height:100%;box-sizing:border-box}
.play-workspace .pg-ball-stage{height:clamp(360px,59dvh,620px);overflow:auto;scrollbar-gutter:stable}
.balls-page .play-workspace>.stage{min-height:55dvh}
.play-workspace>.pg-round{min-height:1.5em}
.play-workspace .pg-packs,.play-workspace .pg-goods,.play-workspace .pg-ball-stage{transition:none!important}
@media(max-width:650px){.play-workspace .pg-packs{height:37dvh}}
@media(max-width:650px){body.warehouse-page.play-room-page #room.warehouse-playing>#members{height:44px}.play-workspace .pg-ball-stage{height:clamp(270px,49dvh,440px)}}

/* R36: a viewport stage, with actions outside the changing scene. */
body.balls-page.in-room{overflow:hidden}
body.balls-page.in-room #room.play-workspace{position:fixed;inset:0;z-index:40;height:100dvh!important;max-height:100dvh!important;width:100%;padding:10px 18px!important;margin:0;box-sizing:border-box;background:var(--cos-table-paper,#f7f5ef);overflow:auto}
body.balls-page.in-room #room[data-workspace-view=play]{display:grid;grid-template-rows:64px 54px 32px minmax(0,1fr) 90px;gap:6px;overflow:hidden}
body.balls-page.in-room #room>.room-top{grid-row:1;padding:6px 12px;min-height:0;display:flex;align-items:center;gap:8px;flex-wrap:nowrap;margin:0}
body.balls-page.in-room #room>.room-top>div{flex:1;min-width:0}
body.balls-page.in-room #phase-title{font-size:18px;margin:0;white-space:nowrap}
body.balls-page.in-room #room>.room-top button{min-height:44px;padding:8px 10px;font-size:13px}
body.balls-page.in-room #room>.play-workspace-nav{grid-row:2;position:sticky;margin:0;min-height:48px}
body.balls-page.in-room #capacity{grid-row:3;margin:0;padding:4px 12px;line-height:24px;font-size:13px}
body.balls-page.in-room #room>.stage{grid-row:4;height:100%;min-height:0!important;max-height:none;margin:0;overflow:hidden;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;gap:16px}
body.balls-page.in-room .machine-column{display:grid;place-items:center;min-height:0;min-width:0;overflow:hidden;container-type:size}
body.balls-page.in-room #room .machine{height:auto!important;max-height:100%;width:min(100cqw,70cqh)!important;aspect-ratio:3/4;max-width:100%;margin:0;box-sizing:border-box}
body.balls-page.in-room #room .reveal{min-height:0;overflow:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:12px;text-align:center}
body.balls-page.in-room #room .reveal h2{font-size:clamp(15px,2vw,23px);margin:4px;max-width:100%;overflow-wrap:anywhere}
body.balls-page.in-room #room .prize{flex:1;min-height:70px;max-height:26dvh;height:auto;margin:4px;display:grid;place-items:center;width:100%}
body.balls-page.in-room #room .prize img,body.balls-page.in-room #room .prize svg{max-height:24dvh;max-width:100%;object-fit:contain}
body.balls-page.in-room #room>.ball-controls{grid-row:5;position:sticky;bottom:0;margin:0;min-height:80px;display:flex;align-items:center;justify-content:center;gap:8px;padding:8px}
body.balls-page.in-room .ball-auto-actions{margin:0;flex:1;max-width:640px}
body.balls-page.in-room #action-hint{font-size:12px;max-width:260px;margin:0}
body.balls-page.in-room #ball-pool{display:none}
body.balls-page.in-room #room:not([data-workspace-view=play])>.room-top{position:sticky;top:0;z-index:26}
.ball-directory{width:min(1000px,96vw);height:min(760px,92dvh);box-sizing:border-box;border:1px solid #cbd9c9;border-radius:18px;background:var(--cos-table-paper,#fffdf8);color:#28473d;padding:16px;overflow:auto}
.ball-directory::backdrop{background:#17382e88}
.workspace-screen{position:fixed!important;inset:0!important;z-index:40;display:grid!important;grid-template-rows:48px 54px minmax(0,1fr) auto;gap:6px;padding:10px!important;margin:0!important;height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;box-sizing:border-box;background:var(--cos-table-paper,#fffdf5)}
.workspace-screen>.workspace-title{grid-row:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 12px}
.workspace-screen>.play-workspace-nav{grid-row:2;margin:0;min-height:48px}
.workspace-screen>.workspace-scene{grid-row:3;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.workspace-screen>.actions{grid-row:4;max-height:25dvh;overflow:auto;position:static}
.workspace-screen>.steps{display:none}
.workspace-screen .tickets{max-height:none;grid-template-columns:repeat(auto-fit,minmax(90px,1fr))}
.workspace-screen #products{max-height:none}
.play-workspace [data-layout-page-hidden=true]{display:none!important}
.workspace-pages{display:flex;align-items:center;justify-content:center;gap:12px;min-height:48px;margin:4px 0}
.workspace-pages[hidden]{display:none!important}.workspace-pages button{min-height:44px}
.workspace-screen .product img,.workspace-screen .product svg{height:100px;max-width:100%;object-fit:contain}.workspace-screen .product h3{font-size:15px;margin:4px}.workspace-screen .product p{margin:4px;font-size:13px}
body.warehouse-page.play-room-page #room.warehouse-playing{position:fixed;inset:0;z-index:40;height:100dvh!important;width:100%;padding:10px!important;box-sizing:border-box;background:var(--cos-table-paper,#fffdf5)}
.auction-in-room #auction-app{height:100dvh;position:fixed;inset:0;z-index:40;background:var(--cos-table-paper,#fffdf5);overflow:hidden;display:flex;flex-direction:column;padding:8px;box-sizing:border-box}
.auction-in-room .auction-status-bar{flex:0 0 auto;margin:0;padding:8px}
.auction-in-room .auction-wallet-drawer{flex:0 0 auto;max-height:20dvh;overflow:auto;margin:0}
.auction-in-room .auction-arena{flex:1;min-height:0!important;height:auto!important;overflow:hidden;margin:4px 0;display:grid}
.auction-in-room .auction-seats{min-height:0;overflow:auto}
.auction-in-room .auction-mobile-action{flex:0 0 auto;position:static}
.auction-in-room .auction-surface-nav{flex:0 0 auto}
@media(max-width:650px){.auction-in-room .auction-arena{display:block}.auction-in-room .auction-arena>.auction-console,.auction-in-room .auction-arena>.auction-warehouse-column,.auction-in-room .auction-arena>.auction-seats{height:100%;max-height:none}.auction-in-room .auction-arena:not([data-surface=members])>.auction-seats,.auction-in-room .auction-arena[data-surface=members]>.auction-console,.auction-in-room .auction-arena[data-surface=members]>.auction-warehouse-column{display:none!important}.workspace-screen{padding:6px!important}}
.ball-directory>button{float:right;min-height:44px}.ball-directory h2{font-size:20px;margin:0 0 12px}.ball-directory form{display:flex;gap:8px;clear:both}.ball-directory input{min-width:0;flex:1}.ball-directory-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.ball-directory-grid article{border:1px solid #d6dfca;border-radius:12px;padding:10px;overflow-wrap:anywhere}.ball-directory-grid h3{font-size:15px;margin:2px}.ball-directory-grid img,.ball-directory-grid svg{height:120px;width:100%;object-fit:contain}.ball-directory-pager{display:flex;justify-content:center;gap:16px;position:sticky;bottom:0;background:var(--cos-table-paper,#fffdf8);padding:8px}.ball-directory button{min-height:44px}
@media(max-width:650px){body.balls-page.in-room #room.play-workspace{padding:6px!important}body.balls-page.in-room #room[data-workspace-view=play]{grid-template-rows:62px 52px 28px minmax(0,1fr) 100px;gap:4px}body.balls-page.in-room #room>.stage{gap:6px}body.balls-page.in-room #phase-title{font-size:14px}body.balls-page.in-room #room>.room-top{padding:4px;gap:4px}body.balls-page.in-room #room>.room-top button{font-size:12px;padding:6px}body.balls-page.in-room #room>.ball-controls{flex-wrap:wrap;gap:4px}body.balls-page.in-room #action-hint{max-width:100%;flex-basis:100%;text-align:center}body.balls-page.in-room #room .reveal{padding:5px}.ball-directory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ball-directory{padding:12px}}
/* R36: the equipped tabletop becomes the full playfield, with a clear center. */
body.hidden-relay-active .relay-ui:has(.table-arena){height:100%;min-height:0;background:transparent}
body.hidden-relay-active .relay-ui:has(.table-arena) .game-content{height:100%;min-height:0;display:flex;flex-direction:column;padding:0!important;gap:4px}
body.hidden-relay-active .relay-ui .round-heading{flex:0 0 auto;margin:0;padding:4px 12px}
body.hidden-relay-active .relay-ui .table-arena.cos-themed-table,body.hidden-relay-active .relay-ui .table-arena.cos-themed-table[data-dense=true]{flex:1;min-height:0!important;height:auto!important;width:100%!important;max-width:none!important;margin:0!important;position:relative;overflow:hidden;border-radius:12px;display:grid!important;grid-template-columns:120px minmax(0,1fr) 120px!important;grid-template-rows:90px minmax(0,1fr) 90px!important;gap:0!important;isolation:isolate;container-type:size}
body.hidden-relay-active .relay-ui .cos-themed-table>.felt{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-height:none!important;grid-area:auto!important;aspect-ratio:auto!important;z-index:0;border-radius:0!important;overflow:hidden!important;background:var(--cos-table-paper,#f2f5fa)!important;box-shadow:none!important}
body.hidden-relay-active .relay-ui .cos-themed-table>.felt>.cos-item-art{position:absolute;inset:0;width:100%;height:100%;object-fit:contain!important;pointer-events:none}
body.hidden-relay-active .relay-ui .cos-themed-table .table-center{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:calc(100% - 280px)!important;max-width:720px!important;min-width:0!important;max-height:calc(100% - 200px)!important;padding:8px!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;backdrop-filter:none!important;overflow:auto;color:var(--cos-table-ink,#253451);text-align:center}
body.hidden-relay-active .relay-ui .cos-themed-table .table-center:before,body.hidden-relay-active .relay-ui .cos-themed-table .table-center:after{display:none!important}
body.hidden-relay-active .relay-ui .cos-themed-table .source-cards,body.hidden-relay-active .relay-ui .cos-themed-table .source-cards.six,body.hidden-relay-active .relay-ui .cos-themed-table .source-cards.expanded{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px!important;max-width:460px!important;justify-content:center!important;overflow:visible!important;margin:12px auto!important;padding:0!important}
body.hidden-relay-active .relay-ui .cos-themed-table .draw-card{width:100%!important;min-width:0!important;height:clamp(64px,17cqh,125px)!important;flex:none!important;transform:none!important;justify-self:center;background:transparent!important;border:0!important;box-shadow:none!important}
body.hidden-relay-active .relay-ui .cos-themed-table .cos-seat-rail{display:flex!important;position:relative;z-index:2;min-height:0;overflow:auto;gap:4px;flex-wrap:nowrap!important;padding:4px}
body.hidden-relay-active .relay-ui .cos-themed-table .cos-seat-rail-top{grid-area:1/2!important}.hidden-relay-active .relay-ui .cos-themed-table .cos-seat-rail-bottom{grid-area:3/2!important}
body.hidden-relay-active .relay-ui .cos-themed-table .cos-seat-rail-left{grid-area:2/1!important;flex-direction:column}.hidden-relay-active .relay-ui .cos-themed-table .cos-seat-rail-right{grid-area:2/3!important;flex-direction:column}
body.hidden-relay-active .relay-ui .cos-themed-table .cos-seat-rail .seat{width:110px!important;max-width:100%;display:flex!important;flex-direction:column;align-items:center;gap:2px;padding:2px!important;flex-shrink:0}
body.hidden-relay-active .relay-ui .cos-themed-table .seat-avatar,body.hidden-relay-active .relay-ui .cos-themed-table .seat-avatar>*{width:44px!important;height:44px!important;aspect-ratio:1;margin:0!important;flex:none}
body.hidden-relay-active .relay-ui .cos-themed-table .seat-name{font-size:12px;max-width:110px;margin:0;padding:2px;color:var(--cos-table-ink);background:var(--cos-table-paper);border-radius:6px}
body.hidden-relay-active .relay-ui .cos-themed-table .seat-meta{font-size:11px;margin:0;line-height:1.2;background:var(--cos-table-paper);color:var(--cos-table-ink);border-radius:4px}
body.hidden-relay-active .relay-ui .cos-themed-table .mini-cards,body.hidden-relay-active .relay-ui .cos-themed-table .cos-theme-entry{display:none!important}
body.hidden-relay-active .relay-table-extras{flex:0 0 auto;margin:0;max-height:30dvh;overflow:auto;width:100%;box-sizing:border-box}
@media(max-width:650px){body.hidden-relay-active .relay-ui .table-arena.cos-themed-table,body.hidden-relay-active .relay-ui .table-arena.cos-themed-table[data-dense=true]{grid-template-columns:54px minmax(0,1fr) 54px!important;grid-template-rows:76px minmax(0,1fr) 76px!important}body.hidden-relay-active .relay-ui .cos-themed-table .table-center{width:calc(100% - 116px)!important;max-height:calc(100% - 164px)!important;padding:0!important}body.hidden-relay-active .relay-ui .cos-themed-table .source-cards{gap:5px!important;margin:8px auto!important}body.hidden-relay-active .relay-ui .cos-themed-table .table-center h3{font-size:12px}body.hidden-relay-active .relay-ui .cos-themed-table .seat-avatar,body.hidden-relay-active .relay-ui .cos-themed-table .seat-avatar>*{width:36px!important;height:36px!important}body.hidden-relay-active .relay-ui .cos-themed-table .cos-seat-rail .seat{width:80px!important}body.hidden-relay-active .relay-ui .cos-themed-table .seat-name{font-size:11px;max-width:80px}body.hidden-relay-active .relay-ui .cos-themed-table .cos-seat-rail-left .seat-name,body.hidden-relay-active .relay-ui .cos-themed-table .cos-seat-rail-right .seat-name{max-width:48px}body.hidden-relay-active .relay-ui .cos-themed-table .draw-card{height:clamp(42px,8cqh,56px)!important}}

body.hidden-relay-active .cos-themed-table .table-center h3,body.hidden-relay-active .cos-themed-table .source-caption,body.hidden-relay-active .cos-themed-table .table-state{text-shadow:0 1px 2px var(--cos-table-paper),0 0 4px var(--cos-table-paper);margin:4px 0}
