/* Shared approved dossier bounds. All content stays inside the actual lobby frame. */
#meta.counter-screen{position:absolute;inset:0;padding:0;background:#1b141b;overflow:hidden;color:#f9e9c8}
#meta:is(.counter-screen,.pc-root){left:0;top:0;transform:none;width:100%;height:100%;aspect-ratio:auto;max-height:none;container-type:normal;box-shadow:none}
.counter-stage::before{content:"";position:absolute;inset:0;background:linear-gradient(#1b141b7a,#1b141b7a),url("../assets/curtain-lobby/room.webp") center/100% 100%;z-index:-1}
.counter-stage{position:absolute;left:var(--lobby-frame-x);top:var(--lobby-frame-y);width:var(--lobby-frame-width);aspect-ratio:var(--lobby-frame-ratio);transform:translate(-50%,-50%);display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;container-type:size}
.counter-window{--paper:#f9e9c8;--ink:#281d20;position:relative;isolation:isolate;width:min(880px,90%);height:min(92%,550px);min-width:0;min-height:0;display:grid;grid-template-rows:clamp(38px,10%,55px) minmax(0,1fr) 36px;background:linear-gradient(106deg,#33282a,#503533 55%,#302425);border:2px solid #b38b62;border-radius:9px 13px 6px 9px;box-shadow:4px 6px #160f1690;overflow:hidden;container-type:inline-size;animation:counter-enter .48s cubic-bezier(.18,.85,.22,1.08);user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.counter-window *{box-sizing:border-box}
.counter-window :where(button){font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;min-width:0}
.counter-window button:focus-visible,.counter-window [tabindex]:focus-visible{outline:3px solid #a5d8c5;outline-offset:-3px}
.counter-window button:disabled{opacity:.55;cursor:default}
.counter-window>.meta-header{position:relative;inset:auto;width:auto;height:auto;min-height:0;display:flex;align-items:center;gap:9px;padding:3px 14px;background:#2b2027;border:0;border-bottom:2px solid #a87d59;box-shadow:none}
.counter-window>.meta-header h2{font-size:clamp(19px,3cqw,28px);margin:0;rotate:-1deg;white-space:nowrap;color:#ffe3ac}
.counter-window>.meta-header .back-button{width:32px;height:32px;min-height:0;padding:0;flex:none;font-size:24px;background:#503a38;border:1px solid #a7846a}
.counter-window>.meta-header .resource-bar{margin-left:auto;display:flex;gap:7px;min-width:0;flex-wrap:nowrap}
.counter-window>.meta-header .resource{font-size:12px;min-width:0;padding:2px 6px;background:#2b2025;border:1px solid #a7846a}
.counter-window>.meta-header .resource img,.counter-window>.meta-header .resource svg{width:20px;height:20px}
.counter-window>.meta-header>.icon-button{display:none}
.counter-body{min-width:0;min-height:0;overflow:hidden;padding:0}
.counter-window .shop15{height:100%;min-height:0;display:flex;flex-direction:column;gap:5px}
.counter-window .shop-anchors15{order:2;padding:3px 12px;gap:5px;flex:none;min-height:37px}
.counter-window .shop-anchors15 button{min-width:64px;min-height:30px;font-size:12px;padding:4px 8px;background:#3c2c2e;border:1px solid #967157;color:#dfc6a4;border-radius:4px}
.counter-window .shop-anchors15 button.selected{background:#e8c38a;color:#3c272b;border-color:#ffe0a9;rotate:-1deg}
.counter-window .shop-rail15{order:1;padding:8px 14px 12px;gap:24px;min-height:0;scrollbar-color:#a37960 #37292b}
.counter-window .shop-rail15>section{gap:6px;min-height:0}
.counter-window .shop-rail15>section>h2{font-size:14px;line-height:22px;color:#f7ce78;margin:0;padding-left:3px}
.counter-window .section-products15{gap:15px;min-height:0;align-items:center}
.counter-window .product15{flex:0 0 clamp(160px,25cqw,235px);width:clamp(160px,25cqw,235px);height:94%;max-height:330px;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:none;grid-template-rows:minmax(0,1fr) auto auto;align-items:stretch;gap:0;position:relative;overflow:hidden;padding:0;border:2px solid #281d20;border-radius:5px 8px 6px 4px;box-shadow:3px 4px #170e13b0;background:var(--paper);color:var(--ink);rotate:-1.1deg;cursor:pointer;touch-action:pan-x}
.counter-window .product15:nth-child(even){rotate:1.1deg}
.counter-window .product-art15{grid-area:auto;min-height:0;height:auto;padding:10px;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 95%,#f6ddb74d,transparent 65%),repeating-linear-gradient(132deg,transparent 0 11px,#fff3c507 11px 13px),#864b4b;overflow:hidden}
.counter-window .product15:nth-child(even) .product-art15{background-color:#697665}
.counter-window .product-art15 :is(img,svg){max-width:90%;width:auto;max-height:95%;height:100%;object-fit:contain;filter:drop-shadow(2px 4px 0 #231b2755);rotate:-7deg}
.counter-window .product15 h3{grid-area:auto;font-size:clamp(14px,2cqw,19px);line-height:1.25;padding:9px 7px 4px;margin:0;background:var(--paper);color:var(--ink);text-align:center}
.counter-window .product15>.product-copy15,.counter-window .product15>.product-actions15{display:none}
.counter-price{display:flex;align-items:center;justify-content:center;gap:5px;background:var(--paper);text-align:center;padding:4px 6px 9px;font-weight:700;font-size:12px;line-height:1.25;color:#804044;min-height:26px}
.counter-price :is(img,svg){width:20px;height:20px;object-fit:contain}
.counter-tools{display:flex;align-items:center;justify-content:center;gap:15px;border-top:1px solid #a7846a55;font-size:11px;color:#d4b99a}
.counter-tools button{width:36px;height:28px;background:#503a38;border:1px solid #a7846a;border-radius:4px;font-size:22px;padding:0}
.counter-layer{position:absolute;inset:0;z-index:5;display:grid;place-items:center;background:#170f18b3;padding:12px;overflow:hidden}
.counter-sheet{position:relative;display:grid;grid-template-columns:minmax(90px,.72fr) minmax(0,1.28fr);width:min(96%,590px);max-height:100%;min-height:0;overflow:auto;background:#f9e9c8;color:#34272a;border:2px solid #493031;border-radius:5px 9px 5px 6px;box-shadow:5px 7px #100b1570;animation:counter-enter .38s cubic-bezier(.18,.85,.22,1.08)}
.counter-feature{position:relative;display:grid;place-items:center;padding:22px;background:#864b4b;min-height:140px}
.counter-feature :is(img,svg){width:100%;max-width:160px;height:auto;max-height:190px;object-fit:contain;rotate:-7deg}
.counter-info{padding:25px 18px 16px;min-width:0}.counter-info h2{margin:0 0 13px;color:#493031;font-size:23px;line-height:1.2;rotate:-1deg}
.counter-copy{font-size:14px;line-height:1.65}.counter-copy>span{display:flex;gap:5px;align-items:center}.counter-copy img,.counter-copy svg{width:24px;height:24px}
.counter-actions{display:flex;flex-wrap:wrap;gap:7px;margin:16px 0 9px}.counter-actions button,.counter-return{padding:9px 12px;font-size:14px;background:#804044;color:#fff0cf;border:1px solid #593337;border-radius:3px;box-shadow:0 3px #b4926a}.counter-actions img,.counter-actions svg{width:21px;height:21px;vertical-align:middle}.counter-actions .box-buttons15{display:flex;gap:5px}.counter-return{background:#e4c89e;color:#493031;box-shadow:none}
.counter-x{position:absolute;right:2px;top:1px;background:transparent;border:0;font-size:24px;width:32px;height:32px;padding:0;color:#493031}
.counter-seal{position:absolute;right:8%;bottom:10%;border:3px double #84333b;padding:4px 8px;color:#71272f;background:#f8e3b3;font-size:25px;rotate:-12deg;animation:counter-stamp .32s ease-out}
.counter-recalled{animation:counter-recall .65s ease-out}
#metaDialog.counter-dialog .meta-dialog{display:flex;flex-direction:column;gap:10px;overflow:hidden;width:min(590px,94%);max-width:590px;max-height:85%;padding:14px;border-image:none;background:#f9e9c8;color:#34272a;border:2px solid #9c745a;border-radius:6px 12px 7px 5px;animation:counter-enter .3s ease-out}
#metaDialog.counter-dialog .sheet-head h2,#metaDialog.counter-dialog p,#metaDialog.counter-dialog strong{color:#34272a}
#metaDialog.counter-dialog .dialog-actions .primary{background:#804044;color:#fff0cf;border-color:#593337}
#metaDialog.counter-dialog .sheet-head,#metaDialog.counter-dialog .dialog-actions{flex:none;margin:0}
#metaDialog.counter-dialog .sheet-head button{color:#493031;background:transparent;box-shadow:none}
#metaDialog.counter-dialog .rewards13{position:relative;grid-template-columns:repeat(auto-fit,minmax(72px,1fr));padding-bottom:45px;min-height:0;overflow:auto}
#metaDialog.counter-dialog .rewards13 article{background:#e9d4b0;border:1px solid #a37d55;color:#493031}
#metaDialog.counter-dialog .rewards13 b{color:#804044}
#metaDialog.counter-dialog .rewards13::after{content:attr(data-stamp);position:absolute;bottom:0;right:10px;color:#804044;border:3px double #804044;padding:2px 8px;rotate:-10deg;font-size:24px;animation:counter-stamp .32s ease-out}
.file-person.is-unowned img,.file-item.is-unowned img{filter:grayscale(1);opacity:.45}
.curtain-loadout .curtain-locked{cursor:default;opacity:1}
.curtain-locked>.curtain-loadout-icon,.curtain-locked>.lobby-panel-art,.curtain-locked>b{filter:grayscale(1) brightness(.38)}
.curtain-chain-lock{position:absolute;inset:5% 3%;width:94%;height:90%;z-index:4;filter:drop-shadow(1px 3px 1px #120d12);pointer-events:none}
@keyframes counter-enter{0%{opacity:0;transform:translateY(-35px) rotate(-1deg)}72%{opacity:1;transform:translateY(3px) rotate(.15deg)}100%{transform:none}}
@keyframes counter-stamp{0%{opacity:0;scale:1.45}60%{opacity:1;scale:.94}100%{scale:1}}
@keyframes counter-recall{40%{outline:3px solid #f1d393;outline-offset:2px}100%{outline:0 solid transparent}}
@media(max-width:768px) and (orientation:landscape){.counter-window{width:94%;height:92%}}
@media(max-width:430px){.counter-stage{width:auto;aspect-ratio:auto;transform:none;inset:max(10px,var(--tw-safe-top)) max(7px,var(--tw-safe-right)) max(10px,var(--tw-safe-bottom)) max(7px,var(--tw-safe-left))}.counter-window{width:min(460px,96%);height:min(92%,800px);grid-template-rows:auto minmax(0,1fr) 40px}.counter-window>.meta-header{min-height:60px;flex-wrap:wrap;padding:9px}.counter-window>.meta-header .resource-bar{width:100%;justify-content:flex-end}.counter-window .section-products15{align-items:center}.counter-window .product15{max-height:370px}.counter-sheet{grid-template-columns:1fr}.counter-feature{min-height:90px;max-height:150px;padding:10px}.counter-feature :is(img,svg){height:100px;width:100px}.counter-info{padding:16px}.counter-window .shop-anchors15{order:2;min-height:44px}.counter-window .shop-anchors15 button{min-height:38px}}
@media(prefers-reduced-motion:reduce){.counter-window,.counter-sheet,.counter-seal,.counter-recalled,#metaDialog.counter-dialog .meta-dialog,#metaDialog.counter-dialog .rewards13::after{animation:none}}

.counter-expiry{position:absolute;left:5px;right:5px;top:6px;padding:4px;background:#261c24e6;color:#fff1d5;text-align:center;font:11px var(--ui-font);border-radius:3px;pointer-events:none}

#app:has(#meta.pc-root) #metaDialog{z-index:175}
