/* Bounded mobile dialogs: grid min-content must never widen the scrollport. */
body.royal-theme dialog:not(.brand-intro){box-sizing:border-box;min-width:0;max-width:calc(100vw - 20px);max-height:92dvh;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable}
body.royal-theme dialog#shop{width:min(760px,calc(100vw - 20px));padding:18px 12px;overflow-y:auto;touch-action:pan-y}
#shop *,#inspectDialog *{box-sizing:border-box;min-width:0}
#shop>h2{padding-right:30px}
#shop .shop-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));position:sticky;top:-18px;z-index:5;background:#18344e}
#shop .showroom-feature{width:100%;max-width:100%;grid-template-columns:minmax(0,1fr) minmax(0,1fr);margin:14px 0;contain:inline-size}
#shop .showroom-stage{min-height:180px;height:220px}
#shop #shopFeatureCanvas{width:100%;max-width:100%;height:220px;min-width:0}
#shop .showroom-copy{padding:14px;overflow-wrap:anywhere}
#shop .showroom-copy h3{font-size:25px;margin:8px 0}
#shop .showroom-copy p{font-size:12px;margin:0 0 8px}
#shop .showroom-navigation{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;width:100%;gap:4px;align-items:center;text-align:center}
#shop .showroom-navigation button{padding:4px;min-height:42px;width:42px}
#shop .shop-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
#shop .shop-toolbar select{width:100%;max-width:100%;font-size:12px;min-height:44px}
#shop #shopFilter{grid-column:1/-1}
#shop #shopItems{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;max-width:100%}
#shopItems .shop-item{min-width:0;width:100%;max-width:100%;padding:10px;content-visibility:visible;contain:layout style;overflow:hidden;transform:none}
#shopItems .table-item{grid-column:1/-1}
#shopItems .shop-item .inspect-preview{display:block;width:100%;max-width:100%;padding:0 0 22px;margin:8px 0;perspective:none}
#shopItems .shop-item img.shop-preview.mini-live100{display:block;width:100%;height:auto;aspect-ratio:256/360;object-fit:contain!important;object-position:center;max-width:100%;padding:0;filter:none;transform:none;animation-name:catalog-breathe107;transform-origin:center}
#shopItems .table-item img.shop-preview.mini-live100{aspect-ratio:4/3;object-fit:contain!important}
#shopItems .inspect-preview>span{right:4px;bottom:2px;font-size:8px}
#shopItems .shop-item>b{display:block;font-size:20px;overflow-wrap:anywhere}
#shopItems .shop-item>small{font-size:11px!important}
#shopItems .card-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;margin-top:12px}
#shopItems .card-stats>span{padding:5px 1px;font-size:10px}
#shopItems .shop-item>button:last-child{font-size:12px;min-height:46px;padding:8px 2px;white-space:normal}
#shopItems .mastery-mini{font-size:9px}
#shopItems .item-label{max-width:100%;font-size:8px;white-space:normal}
#shop .close{position:sticky;top:0;float:right;z-index:8;margin:0 0 4px 5px}
#inspectDialog .compare-models{grid-template-columns:repeat(2,minmax(0,1fr))}
#inspectDialog .compare-models img{max-width:100%;object-fit:contain}
@keyframes catalog-breathe107{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@media(max-width:480px){#shop .showroom-feature{grid-template-columns:minmax(0,.9fr) minmax(0,1fr)}#shop .showroom-stage,#shop #shopFeatureCanvas{height:200px}#shop .showroom-copy{padding:10px}#shop .showroom-copy>small{font-size:7px;letter-spacing:.5px}#shop .showroom-copy h3{font-size:22px}#shop .showroom-copy button{font-size:9px;padding:6px}#shopFeatureFinish{display:none}}
#liveRound0,#liveRound1{display:inline-block;transform-origin:center}
.round-up107{animation:round-rise107 .4s ease-out;color:#d9ff93!important}
.round-down107{animation:round-fall107 .4s ease-out;color:#ffd28b!important}
@keyframes round-rise107{30%{transform:scale(1.2);text-shadow:0 0 12px #c9ff8066}}
@keyframes round-fall107{30%{transform:scale(.86)}}
body[data-screen=game] #joy92{box-shadow:inset 0 0 22px #71ddda24,0 4px 12px #0005}
body[data-screen=game] #joy92:focus-visible{outline:2px solid #f5d28a;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.round-up107,.round-down107,#shopItems img.mini-live100{animation:none!important}}

#shop .showroom-stage:after{animation-play-state:paused}
#shop .feature-visible107 .showroom-stage:after{animation-play-state:running}
