:root{color-scheme:dark;--bg:#18090f;--panel:#2b111b;--line:#71503d;--gold:#f3cf8b;--muted:#d0b4b0;--cream:#fff1db}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 75% 0,#4e1828 0,transparent 45%),var(--bg);color:var(--cream);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;line-height:1.55}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button,select{cursor:pointer;min-height:44px;border:1px solid #916b50;border-radius:8px;background:#391925;color:var(--cream);padding:9px 15px}button:hover{background:#5a2437;border-color:var(--gold)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ffd687;outline-offset:3px}a{color:var(--gold)}header{display:flex;align-items:center;gap:24px;border-bottom:1px solid #ffffff18;padding:20px max(24px,calc((100vw - 1380px)/2));background:#1d0b12b8}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--cream);font-weight:750;letter-spacing:2px;font-size:18px}.brand small{display:block;font-size:9px;letter-spacing:2.3px;color:var(--gold);margin-top:3px}.seal{border:1px solid var(--gold);border-radius:8px;padding:0 10px;font-size:30px;color:var(--gold);background:#671e30}.review{margin-left:auto;font-size:10px;letter-spacing:2px;color:var(--muted)}header button{font-size:12px}main{max-width:1380px;margin:auto;padding:0 32px}.intro{display:grid;grid-template-columns:1fr 1.2fr;gap:60px;align-items:center;padding:64px 0 58px}.eyebrow{font-size:11px;letter-spacing:2.5px;font-weight:700;color:var(--gold)}h1{font-family:Georgia,serif;font-weight:400;line-height:1.07;font-size:clamp(40px,4.8vw,72px);margin:20px 0}h1 em{font-weight:400;color:var(--gold)}.lede{max-width:420px;color:#e3c9bf;font-size:16px}.disclaimer{font-size:12px;color:var(--muted);max-width:620px}.hero-art{height:350px;position:relative;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse,#792c3d70,transparent 65%)}.hero-art img{width:100%;max-height:100%;object-fit:contain;transform:rotate(-7deg);filter:drop-shadow(0 28px 20px #0008)}.hero-note{position:absolute;bottom:0;right:0;border-left:2px solid var(--gold);padding-left:14px;font-size:10px;letter-spacing:1px;color:var(--gold)}.hero-note b{display:block;font-size:13px;letter-spacing:0;font-weight:400;color:var(--cream)}.section-title{display:flex;align-items:center;justify-content:space-between}.section-title a{font-size:12px}h2{font-family:Georgia,serif;font-weight:400;font-size:32px;line-height:1.2;margin:8px 0 24px}nav{display:flex;gap:8px;overflow-x:auto;padding:6px 2px 14px;scrollbar-width:thin}nav button{white-space:nowrap;border-color:#71494a;background:#29131d;color:#ddc7be}nav button[aria-pressed=true]{background:var(--gold);border-color:var(--gold);color:#37141e;font-weight:700}nav small{opacity:.75;margin-left:8px}.toolbar{display:flex;gap:20px;align-items:end;margin:18px 0 8px}.toolbar label{font-size:11px;letter-spacing:.5px;color:var(--muted)}.toolbar input,.toolbar select{display:block;margin-top:6px;padding:10px 14px;border-radius:8px;border:1px solid #654047;background:#24111a;color:var(--cream);min-height:44px}.search{flex:1}.search input{width:100%}.toolbar #count{font-size:12px;padding-bottom:12px;color:var(--muted)}#category-note{font-size:12px;color:var(--muted);min-height:20px}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;padding:12px 0 50px}.card{background:linear-gradient(160deg,#341923,#26121a);border:1px solid #664047;border-radius:14px;overflow:hidden;position:relative}.card .visual{display:flex;align-items:center;justify-content:center;aspect-ratio:1.5;background:radial-gradient(ellipse,#4b2431,#160d15);overflow:hidden;padding:14px}.card img{height:100%;width:100%;object-fit:contain;transition:transform .25s}.card:hover img{transform:scale(1.045)}.card-body{padding:16px}.card h3{font-size:16px;margin:5px 0 8px;line-height:1.3}.card p{font-size:12px;color:var(--muted);margin:0;min-height:56px}.card .tier{font-size:9px;text-transform:uppercase;letter-spacing:2px;color:var(--gold)}.card-bottom{display:flex;gap:8px;justify-content:space-between;align-items:center;margin-top:16px}.card-bottom strong{font-size:14px;color:var(--gold)}.card button{font-size:12px;padding:8px 12px}.chat-card{font-family:Georgia,serif;font-size:22px;color:var(--gold);border:1px solid #a47256;border-radius:18px 18px 18px 2px;padding:18px;text-align:center;background:#542136}.pricing{border-top:1px solid var(--line);padding:40px 0 60px}.tiers,.bundles{display:grid;grid-template-columns:repeat(3,1fr);gap:26px}.tiers article{border-left:2px solid var(--gold);padding-left:18px}.tiers h3,.bundles h3{font-size:16px;margin:0 0 8px}.tiers p,.bundles p{font-size:13px;color:var(--muted)}.bundles article{background:#2a111a;border:1px solid #634146;border-radius:12px;padding:22px}.bundles strong{display:block;font-size:22px;color:var(--gold)}.bundles a{font-size:12px}footer{border-top:1px solid #ffffff18;padding:26px 32px;max-width:1440px;margin:auto;display:flex;gap:30px;align-items:center;color:var(--muted);font-size:12px}footer>span{color:var(--gold);letter-spacing:2px;white-space:nowrap}dialog{width:min(1150px,96vw);max-height:94dvh;background:#241018;color:var(--cream);border:1px solid #ae7c56;border-radius:18px;padding:22px;overflow:auto}dialog::backdrop{background:#08050ae8;backdrop-filter:blur(6px)}.dialog-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.dialog-top button{font-size:12px}.detail-layout{display:grid;grid-template-columns:1.35fr 1fr;gap:30px}.stage{aspect-ratio:16/10;border:1px solid #61404a;background:radial-gradient(ellipse,#442232,#100b12);overflow:auto;border-radius:12px;display:flex;align-items:center;justify-content:center;position:relative}.stage img{width:100%;height:100%;object-fit:contain;flex:none}.stage.zoomed{display:block}.stage.zoomed img{width:200%;height:200%;max-width:none}.controls{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.controls button{font-size:12px}.controls button[aria-pressed=true]{background:var(--gold);color:#29111b}.caption{font-size:11px;color:var(--muted)}.product h2{font-size:34px;margin-bottom:10px}.product>p,.product li,.product details{font-size:13px;color:#e0c9be}.product h3{font-size:14px}.product ul{padding-left:20px}.price-block{padding:18px 0;margin-top:15px;border-top:1px solid #6b4549;border-bottom:1px solid #6b4549}.price-block small{font-size:9px;letter-spacing:2px;color:var(--muted)}.price-block strong{display:block;font-size:30px;color:var(--gold)}.price-block span{font-size:11px;color:var(--muted)}#chat-controls{display:flex;gap:7px;flex-wrap:wrap}#chat-controls button{font-size:12px;text-align:left}#chat-output:not(:empty){padding:12px;border-left:2px solid var(--gold);background:#43202c}#asset-download{margin-left:12px;font-size:12px;display:inline-block}#copy-link{font-size:12px}.pager{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #654047;margin-top:22px;padding-top:16px;font-size:12px}.product details{margin-top:20px}.product summary{cursor:pointer;min-height:44px}output{display:block;margin-top:10px}.chat-stage{padding:30px}.chat-stage p{font-family:Georgia,serif;color:var(--gold);font-size:clamp(20px,3vw,34px);text-align:center}.chat-stage small{display:block;font-size:12px;color:var(--muted);text-align:center}button:disabled{opacity:.5;cursor:default}@media(min-width:1500px){.intro{padding-top:80px}}@media(max-width:1000px){.intro{gap:28px;padding:35px 0}.hero-art{height:270px}.grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.card-body{padding:13px}.review{display:none}.detail-layout{gap:20px}.product h2{font-size:28px}}@media(max-width:650px){header{padding:14px 16px;gap:12px;justify-content:space-between}.brand{font-size:13px;letter-spacing:1px}.brand small{font-size:7px}.seal{font-size:23px}.intro{grid-template-columns:1fr;gap:16px}.hero-art{height:220px}main{padding:0 18px}h1{font-size:46px}.lede{font-size:14px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.toolbar{gap:10px;flex-wrap:wrap}.toolbar #count{width:100%;padding:0}.card-bottom{display:block}.card button{width:100%;margin-top:10px}.card h3{font-size:14px}.card p{font-size:11px;min-height:65px}.tiers,.bundles,.detail-layout{grid-template-columns:1fr}.section-title a{max-width:90px;text-align:right}dialog{padding:14px}.stage{max-height:350px}.product h2{font-size:30px}footer{display:block}.hero-note{bottom:-6px}}@media(max-height:500px) and (orientation:landscape){header{padding:10px 24px}.intro{padding:26px 0;grid-template-columns:1fr 1fr}.intro h1{font-size:40px;margin:10px 0}.hero-art{height:230px}.lede{font-size:13px;margin:10px 0}.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.detail-layout{grid-template-columns:1.2fr 1fr}.stage{height:220px;aspect-ratio:auto}.dialog-top{margin-bottom:10px}dialog{max-height:96dvh;padding:14px}.product h2{font-size:26px}.preview-panel{position:sticky;top:0;align-self:start}.card p{min-height:52px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.stage>svg{width:100%;height:100%;flex:none}.stage.zoomed>svg{width:200%;height:200%;max-width:none}#tile-picker-label{font-size:12px;color:var(--muted)}#tile-picker{margin:12px 0 0 8px;max-width:100%}header{padding-left:max(24px,env(safe-area-inset-left));padding-right:max(24px,env(safe-area-inset-right))}
/* App shell: compact catalogue header, optional art motion, and iPhone landscape. */
[hidden]{display:none!important}
.shop-shell{--shop-w:100vw}
.shop-shell header{position:sticky;top:0;z-index:2;gap:14px;padding:9px max(15px,env(safe-area-inset-left),env(safe-area-inset-right));background:#210d16f2}
.shop-home{display:inline-flex;align-items:center;gap:6px;min-height:44px;white-space:nowrap;text-decoration:none;font-size:.84rem}
.shop-home [aria-hidden]{font-size:1.45rem;line-height:1}
.brand{margin-inline:auto;gap:8px}.brand small{font-size:.56rem;white-space:nowrap}
.shop-shell header .review{margin-inline-start:0;white-space:nowrap;color:var(--gold)}
.intro{padding:22px 0 17px;gap:24px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.intro h1{font-size:clamp(33px,5vw,65px);margin:4px 0 8px}.intro :is(.lede,.disclaimer){margin:7px 0}
.hero-art{height:clamp(88px,18vw,214px)}.hero-art img{height:100%;max-width:94%;transform:none}
.shop-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.toolbar{margin-top:4px}.toolbar input{min-width:0;font-size:16px}
#category-note{margin-block:4px}.grid{padding-top:8px}.card-bottom{align-items:center}
nav small{margin-inline-start:7px}.chat-card{margin:0}
#tile-picker-label .mg-landscape-select-control{width:auto;max-width:100%;margin-inline-start:5px}
#detail .dialog-top{position:sticky;top:0;background:#241018;z-index:1}
#detail .preview-panel{min-width:0}.stage:not(.zoomed) img{min-width:0;min-height:0}
#detail [aria-busy=true]{opacity:.8}
@media (max-height:500px) and (orientation:landscape),(orientation:portrait) and (hover:none) and (pointer:coarse) {
 .intro{padding:10px 0 8px}.intro h1{font-size:36px}.hero-art{height:110px}.intro .eyebrow{margin:0}
 .shop-shell main{padding-inline:18px}.grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
 .card-body{padding:9px}.card p{min-height:44px}.card-bottom{margin-top:8px}.card-bottom button{width:auto;margin:0}
 .card-bottom{display:flex;flex-wrap:wrap}.card .visual{padding:7px}.toolbar{flex-wrap:nowrap}
 .toolbar #count{width:auto;white-space:nowrap;padding-bottom:11px}
 #detail .detail-layout{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:15px}
 #detail .stage{height:auto;aspect-ratio:16/10;max-block-size:225px}.preview-panel{position:static}
}
@media (max-width:410px) and (hover:hover){.intro{grid-template-columns:1fr}.hero-art{height:105px}.shop-shell header .brand small{display:none}}
.collection-filter{color:var(--muted);font-size:.76rem;font-weight:700}
.collection-filter label{display:flex;align-items:center;gap:8px}
.collection-filter :is(select,.mg-landscape-select-control){width:auto;max-width:100%}
.collection-filter select{font-size:16px;padding:6px 11px}
.atelier-action-card{font:700 clamp(1rem,2vw,1.5rem)/1.15 Georgia,serif;text-align:center;color:var(--gold);padding:12px;border:1px solid #a47256;border-radius:9px;background:#301720}
.stage:has(.atelier-atlas){display:block}
.atelier-atlas{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));align-items:start;gap:4px;padding:6px;width:100%}
.atelier-atlas button{padding:1px;min-height:0;min-width:0;border-radius:4px;aspect-ratio:180/238;background:#301f2a}
.atelier-atlas img{display:block;max-height:74px}
@media (max-height:500px) and (orientation:landscape),(orientation:portrait) and (hover:none) and (pointer:coarse){
 .collection-filter select,.collection-filter .mg-landscape-select-trigger{min-height:35px;font-size:16px}
}

/* A single shared landscape transform, on the body rather than an independently
   sized rotated scroller. The inner Shop uses the same safe-area-aware box. */
.game-landscape-compact .shop-page .shop-shell{height:100%;width:100%;min-width:0;overflow:auto;overscroll-behavior:contain}
.shop-page .shop-shell header{position:sticky;inset-block-start:0}
.game-landscape-compact .shop-shell header{padding:3px 12px}
.game-landscape-compact .shop-shell .intro{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:10px;padding-block:7px}
.game-landscape-compact .shop-shell .intro h1{font-size:30px;margin:0}
.game-landscape-compact .shop-shell .intro :is(.lede,.disclaimer){font-size:12px;margin-block:4px}
.game-landscape-compact .shop-shell .hero-art{height:72px}
.game-landscape-compact .shop-shell #categories{padding-block:4px 6px;flex-wrap:wrap;gap:4px}
.game-landscape-compact .shop-shell #categories button{min-height:36px;padding:4px 8px;font-size:12px}
.game-landscape-compact .shop-shell .toolbar{gap:7px}
.game-landscape-compact .shop-shell .toolbar :is(label,.search){min-width:0}
.game-landscape-compact .shop-shell .toolbar select{max-width:100%}
.game-landscape-compact #detail{width:min(920px,calc(var(--game-view-w) - 24px));max-width:none;max-height:calc(var(--game-view-h) - 20px)}
.shop-page .card.avatar-frame .visual{background:radial-gradient(ellipse,#472a38,#100b12);padding:5px}

.frame-art-preview{aspect-ratio:1;width:auto;height:100%;max-width:100%;position:relative;flex:none}
.frame-art-preview .frame-sample{position:absolute;top:24%;left:24%;width:52%;height:52%;border-radius:50%;object-fit:cover;background:#3a202c}
.frame-art-preview .frame-overlay{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.stage.zoomed:has(.frame-art-preview){display:grid;place-items:start}
.stage.zoomed .frame-art-preview{height:200%;max-width:none}
.stage.zoomed .frame-art-preview .frame-sample{width:52%;height:52%}
.stage.zoomed .frame-art-preview .frame-overlay{width:100%;height:100%}

.shop-price-guide{font-size:.78rem;line-height:1.45;color:var(--muted);border-left:2px solid #ae8252;padding-left:.65rem}
.table-scale-preview{display:grid;gap:.55rem;max-inline-size:100%;padding:1rem;align-self:center;text-align:center}
.table-scale-strip{display:grid;gap:.36rem;padding:.55rem .7rem;border-radius:.6rem;background:radial-gradient(ellipse at 45% 13%,#38634f,#153930);border:1px solid #92734f;color:#fff8de}
.table-scale-strip b{font-size:.75rem}
.table-scale-faces{display:flex;gap:.2rem;justify-content:center;align-items:center}
.table-scale-faces img{width:clamp(21px,5vw,30px);height:auto;aspect-ratio:88 / 122;object-fit:contain;filter:drop-shadow(0 2px 2px #1118)}
.table-scale-preview p{margin:0;color:var(--muted);font-size:.73rem;line-height:1.3}

.stage .naga-bara-preview-video{display:block;width:100%;max-height:64dvh;object-fit:contain;background:#160d16;border-radius:8px}

/* Studio views are explicit, light-weight presentations of the purchased art.
   Cards keep still thumbnails; there is never a catalog grid full of loops. */
.stage:has(.studio-scene){overflow:hidden;background:radial-gradient(ellipse at 50% 35%,#68404d 0%,#2b1925 57%,#130d13 100%)}
.studio-scene{width:100%;height:100%;display:grid;place-items:center;position:relative;perspective:620px;isolation:isolate}
.studio-object{width:84%;height:80%;display:flex;align-items:center;justify-content:center;z-index:1;animation:shop-studio-turn 4.8s ease-in-out infinite}
.studio-base{width:70%;height:17%;bottom:10%;position:absolute;z-index:0;border-radius:50%;background:radial-gradient(ellipse,#edbb7559,#6f5335a3 42%,transparent 72%);transform:rotateX(44deg)}
.studio-tables .studio-object{width:91%;height:84%;animation-name:shop-studio-table}
.studio-tables .studio-base{width:81%;height:19%;bottom:8%;border:1px solid #f7c98d53;background:linear-gradient(#75523b88,#3b202c33);box-shadow:0 5px 0 #2f1a22,0 14px 15px #0603078c}
.stage .studio-tables .studio-art,.stage .studio-backgrounds .studio-art{object-fit:contain;max-width:100%;max-height:100%}
.studio-avatars .studio-object{width:auto;height:80%;aspect-ratio:1;border:2px solid #ad835c;border-radius:14%;padding:7px;background:linear-gradient(140deg,#cc9a66,#361c28 55%);box-shadow:3px 7px 0 #271922}
.stage .studio-avatars .studio-art{object-fit:cover;border-radius:11%}
.studio-tiles .studio-object{width:95%;height:87%;gap:clamp(3px,2vw,14px);animation:none}
.stage img.studio-tile{width:clamp(31px,13%,83px);height:auto;max-height:95%;object-fit:contain;animation:shop-studio-tile 3.8s ease-in-out infinite;animation-delay:calc(-.20s * var(--studio-i,0))}
.studio-tiles .studio-object:has(.studio-tile:only-child) .studio-tile{width:clamp(65px,25%,145px)}
.studio-stickers .studio-object{width:auto;height:76%;max-width:80%;aspect-ratio:1;animation:shop-studio-sticker 3s ease-in-out infinite}
.studio-chat-bubble{border:1px solid #aa7f54;border-radius:18px 18px 18px 4px;background:#572639;box-shadow:0 6px 0 #261422;max-width:90%;padding:clamp(8px,3vw,26px);animation:shop-studio-bubble .65s cubic-bezier(.22,.8,.33,1) both}
.studio-chat-bubble p{margin:0 0 8px;overflow-wrap:anywhere}
@keyframes shop-studio-turn{0%,100%{transform:translateY(4px) rotateY(-12deg)}50%{transform:translateY(-5px) rotateY(12deg)}}
@keyframes shop-studio-table{0%,100%{transform:translateY(4px) rotateX(6deg) rotateY(-12deg)}50%{transform:translateY(-5px) rotateX(-4deg) rotateY(12deg)}}
@keyframes shop-studio-tile{0%,100%{transform:translateY(3px) rotateY(-17deg)}50%{transform:translateY(-8px) rotateY(17deg)}}
@keyframes shop-studio-sticker{0%,100%{transform:translateY(5px) rotate(-6deg)}40%{transform:translateY(-10px) rotate(4deg)}64%{transform:translateY(-2px) rotate(0)}}
@keyframes shop-studio-bubble{0%{opacity:0;transform:translate(-9px,8px) scale(.94)}100%{opacity:1;transform:translate(0,0) scale(1)}}
@media(prefers-reduced-motion:reduce){.studio-object,.stage img.studio-tile,.studio-chat-bubble{animation:none!important}}

/* Keep the order status visible without taking up space for preview-only shoppers. */
.shop-order-monitor:has(:not([hidden])),#shop-test-panel:not([hidden]){
 margin:12px auto 0;width:min(94%,72rem);padding:10px 14px;border:1px solid var(--line);border-radius:9px;background:var(--panel)
}
.shop-order-monitor:has(:not([hidden])){display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.shop-order-monitor .caption,#shop-test-panel .caption{margin:0}
#shop-order-link{min-height:36px;display:inline-flex;align-items:center;color:var(--gold)}
#shop-test-start{margin-block-start:8px}
#detail #stage[data-cinema-call=true]:not(.zoomed){aspect-ratio:16/9;height:auto;overflow:hidden}
#detail #stage[data-cinema-call=true] img{object-fit:contain}
#taunt-loadout{margin:1rem 0;padding:1rem;border:1px solid #a4865566;border-radius:12px;background:#241925}
#taunt-loadout[hidden]{display:none}
#taunt-loadout h3{margin:0;color:#ffe0a1;font-size:1rem}
#taunt-loadout p{margin:.5rem 0}
#taunt-loadout .taunt-loadout-offer{display:flex;flex-wrap:wrap;gap:.35rem}
#taunt-loadout button{min-height:34px;margin:0;padding:.3em .58em}
#taunt-loadout button[aria-pressed=true]{color:#ffdb91;border-color:#d9a957}
#taunt-loadout ol{margin:.5rem 0;padding:0 0 0 1.25rem}
#taunt-loadout li{padding:.18rem 0}
#taunt-loadout li span{display:inline-block;min-width:38%;margin-inline-end:.3rem}
#taunt-loadout li button{margin-inline-end:.2rem}

.shop-page .shop-shell .shop-brand-section{display:none}

/* Keep the catalog itself in the first screen. */
.shop-page .catalog .toolbar{
 display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,.85fr);
 align-items:start;gap:8px;margin:6px 0 5px
}
.shop-page .toolbar>label{display:grid;grid-template-columns:minmax(0,1fr);gap:3px;min-width:0;margin:0;font-size:.72rem;color:var(--muted)}
.shop-page .toolbar>label :is(input,select,.mg-landscape-select-control,.mg-landscape-select-trigger){
 box-sizing:border-box;width:100%;max-width:100%;min-width:0;margin:0
}
.shop-page .toolbar>label :is(input,select,.mg-landscape-select-trigger){min-height:36px;padding-block:5px}
.shop-page .toolbar .search .mg-native-keyboard-hint{font-size:.68rem;line-height:1.2;margin:0}
.shop-results{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:3px 8px;border-bottom:1px solid #ffffff14}
.shop-results #count{font-weight:700;color:#f3cf8b;padding:.28rem 0;font-size:.79rem}
.shop-page .catalog .grid{padding-top:8px}

@media (max-height:500px) and (orientation:landscape),(orientation:portrait) and (hover:none) and (pointer:coarse) {
 .shop-page .shop-shell header{min-block-size:36px;gap:8px;padding-block:0}
 .shop-page .shop-shell .shop-home{min-block-size:36px}
 .shop-page .shop-shell .brand{font-size:.78rem;gap:5px}
 .shop-page .shop-shell .brand img{inline-size:17px;block-size:20px}
 .shop-page .shop-shell .brand .shop-brand-edition{display:none}
 .shop-page .shop-shell .brand .shop-brand-section{display:inline;border-inline-start:1px solid #997957;padding-inline-start:6px}
 .shop-page .shop-shell main{padding-inline:clamp(9px,2vw,18px)}
 .shop-page .shop-shell .intro{position:absolute;inline-size:1px;block-size:1px;padding:0;clip-path:inset(50%);overflow:hidden}
 .shop-page .shop-shell .intro .hero-art{display:none}
 .shop-page .shop-shell #categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:5px 0 3px;overflow:visible}
 .shop-page .shop-shell #categories button{
  min-height:31px;min-inline-size:0;padding:4px 5px;text-align:center;
  font-size:.72rem;line-height:1.13;white-space:normal;overflow-wrap:anywhere
 }
 .shop-page .shop-shell #categories small{margin-inline-start:4px;font-size:.67rem}
 .shop-page .catalog .toolbar{gap:6px;margin-block:5px 3px}
 .shop-page .catalog .grid{gap:8px;padding-top:6px}
 .shop-page .catalog .card .visual{aspect-ratio:1.85;max-block-size:106px}
 .shop-page .catalog .card-body{padding:6px 8px 8px}
 .shop-page .catalog .card h3{margin-block:2px 4px;font-size:.97rem;line-height:1.14}
 .shop-page .catalog .card-body>:is(p,.tier){display:none}
 .shop-page .catalog .card-bottom{margin-top:5px;gap:4px;flex-wrap:wrap}
 .shop-page .catalog .card-bottom button{padding:4px 7px;min-height:30px}
}
@media (max-width:530px) and (hover:hover) {
 .shop-page .catalog .toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .shop-page .catalog .toolbar>.search{grid-column:1/-1}
}

/* Wide product preview. Keep checkout in the separate details view. */
.shop-page .catalog .card .shop-card-art{
 position:relative;inline-size:100%;min-block-size:0;margin:0;border:0;border-radius:0;
 cursor:zoom-in;text-decoration:none;
}
.shop-card-art:focus-visible{outline-offset:-4px}
.shop-card-expand{
 position:absolute;z-index:1;inset-block-start:7px;inset-inline-end:7px;
 display:grid;place-items:center;inline-size:29px;block-size:27px;
 border:1px solid #ddaf7d99;border-radius:7px;background:#201018e8;color:var(--cream);
 font-size:21px;line-height:1;pointer-events:none;
}
#detail .detail-heading,#detail .detail-top-actions{display:flex;align-items:center;gap:8px;min-inline-size:0}
#detail .detail-top-actions{flex:none}
#detail:not([data-wide=true]) #stage:not(.zoomed) :is(img,.chat-stage){cursor:zoom-in}
#detail[data-wide=true]{
 --shop-board-w:var(--game-view-w,100dvw);
 --shop-board-h:var(--game-view-h,100dvh);
 width:min(1350px,calc(var(--shop-board-w) - 24px - var(--surface-safe-l,0px) - var(--surface-safe-r,0px)));
 max-width:none;max-height:calc(var(--shop-board-h) - 22px);
 padding:clamp(8px,1.1vmin,15px);
 overscroll-behavior:contain;
}
#detail[data-wide=true] .dialog-top{margin-block-end:7px;gap:8px}
#wide-title{
 max-inline-size:min(47vw,35ch);color:var(--cream);font:clamp(1rem,2.6vmin,1.58rem) Georgia,serif;
 min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.game-landscape-rotated #wide-title{max-inline-size:min(calc(var(--game-view-w)*.46),35ch)}
#detail[data-wide=true] .detail-layout{display:block}
#detail[data-wide=true] :is(.product,.pager,#zoom,#wide-preview,#play,#reset,#format,#motion-note,#chat-output,[data-game-preference]){display:none}
#detail[data-wide=true] .preview-panel{position:static}
#detail[data-wide=true] .dialog-top button{min-height:34px;padding:4px 8px}
#detail[data-wide=true] #stage{
 --shop-stage-h:clamp(110px,calc(var(--shop-board-h) - 105px),680px);
 width:100%;height:var(--shop-stage-h);max-height:none;aspect-ratio:auto;
 overflow:auto;
}
#detail[data-wide=true] #stage:is([data-cinema-call=true],[data-cinema-call=false]){aspect-ratio:auto;height:var(--shop-stage-h);overflow:auto}
#detail[data-wide=true] #stage>video{width:100%;height:100%;object-fit:contain}
#detail[data-wide=true] #stage .legend-stage{width:100%;height:100%;max-height:none;aspect-ratio:auto}
#detail[data-wide=true] #stage .legend-plate{object-fit:contain}
#detail[data-wide=true] #stage .legend-stage.is-playing>.legend-plate{animation-name:legend-preview-fit}
@keyframes legend-preview-fit{0%{opacity:.24}22%,78%{opacity:var(--legend-opacity)}100%{opacity:1}}
#detail[data-wide=true] .preview-interaction{display:flex;align-items:flex-start;gap:4px 9px;flex-wrap:wrap}
#detail[data-wide=true] .preview-tools{margin-inline-start:auto}
#detail[data-wide=true] .controls:not(:empty),#detail[data-wide=true] #chat-controls:not(:empty){margin-top:5px;gap:4px}
#detail[data-wide=true] :is(.controls,#chat-controls) button{min-height:30px;padding:3px 8px}
#detail[data-wide=true] #tile-picker-label{margin-block-start:5px}
@media (max-width:560px) and (hover:hover){
 #detail[data-wide=true] #detail-category{display:none}
}
@media (max-height:455px) and (orientation:landscape),(orientation:portrait) and (hover:none) and (pointer:coarse){
 #detail[data-wide=true] #detail-category{display:none}
}

/* A fixed-size product window; keeps the existing cards and scroll axis. */
.catalog-pager{display:flex;justify-content:center;align-items:center;gap:clamp(6px,2vw,18px);flex-wrap:wrap;padding:0 0 18px}
.catalog-pager[hidden]{display:none}
.catalog-pager button{min-block-size:44px}
#catalog-page-status{font-size:.85rem;white-space:nowrap;color:var(--muted);font-variant-numeric:tabular-nums}

/* Keep browsing space for the product grid and its category navigation. */
.shop-page .shop-gallery {
 display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(10px,1.6vw,23px);
 padding-block:clamp(7px,1.4vw,20px) 24px;
 container-type:inline-size
}
 .shop-page-title {
 font:700 clamp(1.08rem,2.2vw,2.1rem)/1 Georgia,serif;color:#ffebc4;margin:0 auto 0 0;
}
.shop-page .shop-shell header .brand {margin:0;font-size:.75rem}
.shop-page .shop-shell header .brand img,.shop-page .shop-shell header .shop-brand-edition {display:none}
.shop-page .shop-shell .shop-home [data-ui] {position:absolute;clip-path:inset(50%)}
.shop-page .shop-shell .shop-home {
 display:grid;place-items:center;aspect-ratio:1;min-block-size:33px;padding:4px 9px;
 border:1px solid #bb8d60;border-radius:50%;background:#472537
}
.shop-gallery .catalog {min-inline-size:0;margin:0}
.shop-page .shop-gallery #categories {
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;
 margin:0;padding:0 0 4px;overflow:visible;border:0
}
.shop-page .shop-gallery #categories button {
 min-inline-size:0;min-block-size:38px;padding:4px;
 border:1px solid #815944;border-radius:7px;background:#38202a;
 line-height:1.15;white-space:normal;overflow-wrap:anywhere
}
.shop-page .shop-gallery #categories button[aria-pressed=true] {
 background:#efc78b;color:#2c1420;border-color:#ffdf9c;font-weight:850
}
.shop-page .shop-gallery #categories small {color:inherit;opacity:.88}
.shop-gallery .catalog .toolbar {margin-block:7px;gap:7px}
.shop-gallery .toolbar>label :is(input,select,.mg-landscape-select-trigger) {
 background:#25131c;border-color:#89634d
}
.shop-gallery .catalog .grid {
 grid-template-columns:repeat(2,minmax(0,1fr));gap:9px
}
.shop-gallery .card {
 min-inline-size:0;border:1px solid #8f624e;border-radius:11px;
 background:linear-gradient(160deg,#462435,#28131e 75%)
}
.shop-gallery .card .shop-card-art {background:radial-gradient(ellipse,#59313e,#211018);padding:5px}
.shop-gallery .card-body {padding:8px}
.shop-gallery .card h3 {font-size:clamp(.84rem,1.6vw,1.1rem);line-height:1.2;overflow-wrap:anywhere}
.shop-gallery .card-body>p {display:none}
.shop-gallery .card-bottom {display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}
.shop-gallery .card-bottom strong {font-size:.83rem;overflow-wrap:anywhere}
.shop-gallery .card-bottom button {
 width:auto;min-block-size:36px;margin:0;padding:4px 8px;color:#351720;
 background:#eac18c;border:1px solid #f6d9a3;font-weight:800
}
.shop-gallery .card[data-preview-only=true] .card-bottom button {
 color:#ffe0aa;background:#412132;border-color:#9b694a
}
.shop-gallery :is(a,button,input,select,summary):focus-visible {
 outline:2px solid #ffdf90;outline-offset:2px
}
.shop-gallery .shop-card-art:focus-visible {outline-offset:-3px}
/* Query the rendered, safe-area-aware width after forced rotation. */
.shop-shell {container:shop-shell / inline-size}
@container shop-shell (min-width: 660px) {
 .shop-page .shop-gallery {grid-template-columns:clamp(119px,16.5%,205px) minmax(0,1fr);gap:clamp(7px,1vw,13px)}
 .shop-page .shop-gallery #categories {
  grid-template-columns:minmax(0,1fr);align-content:start;align-self:start;position:sticky;inset-block-start:var(--shop-rail-top,51px);gap:2px;padding:5px;max-block-size:calc(var(--game-view-h,100dvh) - var(--shop-rail-top,51px) - 8px);overflow:auto;overscroll-behavior:contain;
  border:1px solid #a27a55;border-radius:11px;background:linear-gradient(#492638,#25131f)
 }
 .shop-page .shop-gallery #categories::before {
  content:attr(aria-label);padding:3px 4px;color:#f3c887;font-size:.7rem;font-weight:800;
  text-transform:uppercase;letter-spacing:.11em
 }
 .shop-page .shop-gallery #categories button {
  display:flex;justify-content:space-between;align-items:center;gap:3px;min-block-size:31px;padding:4px 5px;
  text-align:start;overflow-wrap:normal
 }
 .shop-gallery .catalog .grid {grid-template-columns:repeat(3,minmax(0,1fr))}
}
@container shop-shell (min-width: 1040px) {
 .shop-gallery .catalog .grid {grid-template-columns:repeat(4,minmax(0,1fr))}
}
@container shop-shell (max-width: 994px) {
 .shop-page .shop-gallery #categories button {min-block-size:30px;font-size:.74rem;overflow-wrap:normal}
 .shop-page .shop-gallery .catalog .toolbar {margin-block:0 4px;gap:6px}
 .shop-page .shop-gallery .catalog .card .visual {aspect-ratio:2.25;max-block-size:82px}
 .shop-page .shop-gallery .catalog .card-body {padding:5px 7px 7px}
 .shop-page .shop-gallery .catalog .card h3 {margin-block:2px 4px;line-height:1.15}
 .shop-page .shop-gallery .catalog .card-bottom {margin-top:4px}
 .shop-page .shop-gallery .catalog .card-bottom button {min-block-size:32px}
}
@container shop-shell (max-width: 455px) {
 .shop-page .shop-gallery #categories {grid-template-columns:repeat(2,minmax(0,1fr))}
 .shop-page .shop-gallery .catalog .toolbar {grid-template-columns:repeat(2,minmax(0,1fr))}
 .shop-page .shop-gallery .catalog .toolbar>.search {grid-column:1/-1}
}

.shop-diamond-panel:not([hidden]){display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border:1px solid #ab835d;border-radius:12px;background:#3f2335;color:#fbebd2}.shop-diamond-panel form{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.shop-diamond-panel input{min-width:0;width:85px}.shop-diamond-panel p{flex-basis:100%;margin:0}.shop-diamond-panel strong{font-variant-numeric:tabular-nums}
@container shop-shell (max-width: 994px) {
 .shop-diamond-panel:not([hidden]) {gap:4px 9px;margin:5px 9px 0;padding:5px 8px;border-radius:8px}
 .shop-diamond-panel form {margin:0;gap:4px 6px;min-inline-size:0}
 .shop-diamond-panel form button {min-block-size:32px;padding:.3em .6em}
 .shop-diamond-panel p:not(:empty) {overflow-wrap:anywhere}
 .shop-diamond-panel p:empty {display:none}
}

.shop-page .shop-shell{--shop-rail-top:58px}
@media (max-height:500px) and (orientation:landscape),(orientation:portrait) and (hover:none) and (pointer:coarse){
 .shop-page .shop-shell{--shop-rail-top:40px}
 .shop-page .shop-gallery #categories::before{padding-block:2px}
}

@container shop-shell (max-width:659px){
 .shop-page .shop-gallery #categories{position:sticky;inset-block-start:var(--shop-rail-top,58px);z-index:1;display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:max-content;gap:4px;padding:3px 4px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;background:#301923;border-radius:6px}
 .shop-page .shop-gallery #categories button{min-block-size:34px;white-space:nowrap;padding-inline:7px}
}

/* Filters and the result count end above the scrolling cards, even when the
   mobile canvas is rotated. The rail stays alongside, not inside the scroll. */
body.shop-page{overflow:hidden}
.shop-page .shop-shell{display:flex;flex-direction:column;block-size:100dvh;min-block-size:0;overflow:hidden}
.game-landscape-compact body.shop-page .shop-shell{block-size:100%;overflow:hidden}
.shop-page .shop-shell>header{position:relative;flex:none}
.shop-page .shop-shell>section,.shop-page .shop-order-monitor{flex:none}
.shop-page .shop-gallery{
 flex:1;inline-size:100%;min-block-size:0;margin-block:0;align-items:stretch;
 padding-block-end:0;grid-template-rows:auto minmax(0,1fr)
}
.shop-page .shop-gallery .catalog{display:flex;flex-direction:column;min-block-size:0;overflow:hidden}
.shop-page .catalog>.toolbar,.shop-page .catalog>.shop-results{flex:none}
.shop-page .shop-items-scroll{
 min-block-size:0;min-inline-size:0;flex:1;overflow-y:auto;overflow-x:hidden;
 overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b38861 #281622;
 -webkit-overflow-scrolling:touch
}
.shop-items-scroll:focus-visible{outline:2px solid #ffda98;outline-offset:-2px}
.shop-page .shop-items-scroll footer{padding:9px 3px;gap:9px}
.shop-page .shop-items-scroll footer p{margin:0}
.shop-page .shop-gallery #categories{position:static;max-block-size:100%}
@container shop-shell (min-width:660px){
 .shop-page .shop-gallery{grid-template-rows:minmax(0,1fr)}
}
