/* Phone and small tablet layout. Desktop artwork and controls remain intact. */
#mobileMenu,#mobileChat,#mobileShade,#mobileCloseChat{display:none}
@media(max-width:900px){
 dialog#settingsDialog{width:min(350px,calc(100vw - 28px));max-height:min(680px,calc(100dvh - 40px));padding:14px}
 #settingsDialog .dialog-heading h2{font-size:21px}
 #settingsDialog>p{font-size:12px;line-height:1.45;margin:8px 0}
 #settingsDialog .audio-settings{padding:10px 0;margin:10px 0}
 #settingsDialog .audio-settings h3{font-size:19px;margin:0 0 6px}
 #settingsDialog .sound-check{font-size:15px;gap:9px;min-height:38px;margin:2px 0}
 #settingsDialog input[type=checkbox]{width:20px;height:20px;min-height:20px;margin:0;flex-shrink:0}
 #settingsDialog .sound-level{font-size:13px;margin:8px 0 0;gap:8px}
 #settingsDialog input[type=range]{height:32px;min-height:32px;margin:0 0 4px}
 #settingsDialog .audio-settings p{font-size:13px;margin:8px 0}
 #settingsDialog .audio-buttons{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:8px 0}
 #settingsDialog .audio-buttons button{font-size:12px;min-height:40px;padding:7px 5px}
 #settingsDialog #enableGameAudio{grid-column:1/-1;font-size:14px}
 #settingsDialog .audio-settings small{font-size:11px;line-height:1.4}
 #settingsDialog>.wide{font-size:14px;min-height:42px;margin-top:6px;padding:8px}
}
button{touch-action:manipulation}input,select,textarea{max-width:100%}
@media(max-width:900px){
 html{height:100%;overflow-x:hidden}body{min-width:0;overflow-x:hidden;font-size:16px}
 .hud{height:112px!important;inset:0 0 auto;padding:8px max(10px,env(safe-area-inset-right)) 8px max(10px,env(safe-area-inset-left));align-items:flex-start;background:linear-gradient(#211b12f5,#211b12df,transparent);gap:6px}
 .hud .brand{font-size:23px;min-width:0;padding:4px 8px}.brand i{font-size:24px}.brand small{font-size:12px}.brand em{display:none}
 .topbar{display:flex!important;position:absolute;left:10px;right:10px;top:60px;gap:6px;justify-content:flex-end}
 .topbar[hidden]{display:none!important}.topbar .profile-pill{display:flex;min-width:0;flex:1;height:44px;padding:3px 7px;gap:6px;max-width:none}
 .profile-pill .portrait{width:34px;height:34px;min-width:34px}.profile-pill>span:last-child{min-width:0}.profile-pill b{display:block;font-size:13px;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-pill small{font-size:10px}.profile-pill .xp-track{display:none}
 .topbar .currency{display:flex;min-width:65px;height:44px;padding:4px 6px;gap:4px}.topbar .currency b{font-size:16px}.topbar .currency>i{display:none}.topbar .coin{font-size:22px;width:26px;height:26px}.topbar .candy-wallet{min-width:76px}.candy-wallet .candy-icon{width:29px;height:26px}.currency-copy small{display:none!important}
 .topbar .round-icon{position:fixed;top:9px;width:40px;height:40px;font-size:22px}.topbar #settings{right:10px}.topbar #notifications{right:56px}
 #mobileMenu{display:block;position:fixed;right:103px;top:9px;z-index:55;min-height:40px;padding:6px 10px;font-size:14px}
 body[data-screen=auth] #mobileMenu,body[data-screen=profile] #mobileMenu{display:none}
 .main-nav{display:none!important;left:10px;right:10px;top:113px;width:auto;max-height:calc(100dvh - 130px);overflow:auto;z-index:92;padding:12px;background:#282319;border:1px solid #cda753;border-radius:16px;grid-template-columns:1fr 1fr;gap:9px}
 .mobile-menu-open .main-nav:not([hidden]){display:grid!important}.main-nav .nav{min-height:52px;font-size:14px;padding:10px;text-align:left}
 #mobileShade{position:fixed;inset:0;z-index:89;background:#0009;border:0;border-radius:0;width:100%;height:100%}.mobile-menu-open #mobileShade,.mobile-chat-open #mobileShade{display:block}
 .auth.card{position:relative;left:auto;top:auto;transform:none;width:calc(100% - 24px);max-width:460px;margin:125px auto 24px;padding:22px;box-sizing:border-box}.auth p,.auth label{font-size:16px}.auth input{font-size:16px;min-height:46px}.auth button{min-height:48px;font-size:16px}
 body[data-screen=lobby] .street-notice-scene{top:125px;left:50%;width:max(100vw,760px);height:auto;aspect-ratio:1640/960;transform:translateX(-50%)}
 .lobby-layer-speech{min-width:0;font-size:9px;padding:5px}.welcome-note{left:18px;top:126px;max-width:260px}.welcome-note h1{font-size:26px}.welcome-note .eyebrow{font-size:10px}.welcome-note p{font-size:12px}
 .event-card{display:none}.entry-rail{left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));grid-template-columns:1fr;gap:8px;padding:8px;border-radius:18px;background:#211c16ee}.entry-rail button{min-height:57px;height:auto;font-size:18px;padding:9px 12px}.entry-rail button small{font-size:12px}
 body[data-screen=room] .hud{height:105px!important}.room-info{left:10px!important;top:111px!important;max-width:calc(100% - 140px)!important;padding:5px 8px!important;background:#241d14dd;border-radius:10px}.room-info h1{font-size:14px!important;margin:2px 0}.room-info .room-sub,.room-info #hostLabel,.room-info #gameStatus{display:none}.room-info .eyebrow{font-size:10px}.room-info>p{margin:2px 0}
 #mobileChat{display:none;position:fixed;right:10px;top:113px;z-index:56;min-height:44px;font-size:13px;padding:7px 9px}body[data-screen=room] #mobileChat{display:block}
 body[data-screen=room] .community{display:none!important;top:8px;right:8px;left:8px;bottom:auto!important;width:auto;height:calc(var(--visible-height,100dvh) - 16px);max-height:calc(100dvh - 16px);z-index:95;background:#28231c;border:1px solid #b69554;border-radius:16px;padding:10px;box-sizing:border-box}
 body[data-screen=room].mobile-chat-open .community{display:flex!important}#mobileCloseChat{display:block;min-height:44px;flex:none;margin-bottom:8px;font-size:16px}.community-card{flex:1;min-height:0;padding:10px!important}.community .tabs button{min-height:44px;font-size:14px}.chat-form input{font-size:16px;min-height:46px}.chat-form button{min-height:46px}.chat-messages{font-size:15px}
 body[data-screen=room] .room-bottom{left:0;right:0;bottom:0;border-radius:16px 16px 0 0;padding:8px 8px max(8px,env(safe-area-inset-bottom));min-height:0;z-index:60;box-sizing:border-box;background:#28251ff5}
 .clockline{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;padding:0 0 6px}.clockline .clock{min-width:0!important;width:auto;margin:0;padding:5px;gap:5px;display:grid;grid-template-columns:36px minmax(0,1fr);position:relative}.clockline .clock-avatar{width:36px;height:36px;grid-row:1/3}.clockline .clock-copy{max-width:none;gap:1px}.clockline .clock-copy strong{font-size:12px}.clockline .clock-copy span{display:none}.clockline .clock-copy small{font-size:10px}.clockline .clock>b{grid-column:2;font-size:20px!important;line-height:1;margin:0}.clockline #turnHint{grid-row:2;grid-column:1/-1;min-width:0;text-align:center;font-size:17px;font-weight:800;line-height:1.2;padding:2px}
 body[data-screen=room] .room-actions{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:7px;overflow-x:auto;max-width:100%;padding:3px 0 6px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}.room-actions>*{flex-shrink:0}body[data-screen=room] .room-actions button,body[data-screen=room] .camera-tabs button{font-size:14px;min-height:44px;padding:8px 12px;white-space:nowrap}.camera-tabs{position:static!important;transform:none!important;margin:0!important;padding:2px!important}#mySeat{display:none!important}
 .seat-hint{font-size:13px!important;min-height:40px!important;padding:6px 8px!important;max-width:135px}.seat-hint::after{font-size:20px!important}.room-world .compact-name{font-size:26px}
 #toast,#toast.move-notice{max-width:calc(100vw - 32px);box-sizing:border-box;width:max-content;font-size:16px;bottom:190px;z-index:120}
 dialog,dialog#socialDialog,dialog#socialInboxDialog,dialog#leaderboardDialog,dialog#playerProfileDialog,dialog#collectionDialog{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));box-sizing:border-box;padding:16px;overflow:auto;border-radius:16px;margin:auto}
 dialog h2{font-size:23px}dialog input,dialog select{font-size:16px;min-height:44px}dialog button{min-height:44px;font-size:15px}dialog .dialog-heading{gap:8px;flex-wrap:wrap}dialog .dialog-heading h2{flex:1;margin:0}dialog .dialog-heading>button[data-close]{flex:none}.alert-actions{flex-wrap:wrap}.match-alert p{font-size:16px!important}.profile-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.profile-ranks{grid-template-columns:1fr 1fr!important;gap:8px!important}.profile-ranks>div{padding:10px!important}
 #leaderboardDialog{height:auto}.lb-header{flex-wrap:wrap;gap:8px}.lb-header h2{font-size:23px}.lb-header select{max-width:150px}.lb-layout{display:flex;flex-direction:column;overflow:visible}.lb-main{overflow:visible}.lb-layout #leaderboardGroups{display:flex;gap:6px;overflow:auto;max-height:none;flex:none;padding:6px 0}.lb-layout #leaderboardGroups button{min-width:132px;min-height:64px;font-size:13px}.lb-layout #leaderboardGroups img{width:35px;height:35px}.lb-columns,.lb-row{grid-template-columns:30px minmax(0,1fr) 53px;padding:8px 4px;gap:5px}.lb-player{min-width:0}.lb-footer{flex-wrap:wrap;gap:8px}.lb-footer button{font-size:13px}.lb-footer #leaderboardMe{width:100%}
 #collectionDialog{height:calc(100dvh - 24px);display:none}#collectionDialog[open]{display:flex}.inventory-heading{min-height:48px}.inventory-heading h2{font-size:25px!important}.inventory-tabs{margin:0!important;display:flex}.inventory-tabs button{flex:1;font-size:19px!important}.inventory-layout{display:flex;flex-direction:column;overflow:auto;margin:0;flex:1;min-height:0}.inventory-catalog,.inventory-showcase,.inventory-details{height:auto;flex:none;margin:6px 0;padding:12px;min-height:0;max-height:none}.inventory-catalog h3{display:none}#collectionCards{display:grid;grid-template-columns:repeat(7,110px);grid-auto-rows:145px;overflow-x:auto;overflow-y:hidden;max-height:155px;gap:8px}#collectionCards .collection-card{grid-template-rows:60px 40px 18px}#collectionCards .collection-card svg,#collectionCards .inventory-piece{height:60px}#collectionCards .collection-card b{font-size:13px;height:40px}.inventory-showcase{min-height:230px;max-height:340px}.inventory-showcase>svg,.inventory-showcase>div{max-height:260px}.inventory-details{overflow:visible}#inventoryItemName{font-size:22px}#collectionDialog #inventoryStory{font-size:16px;line-height:1.65}.inventory-footer{flex:none;font-size:12px;padding:8px}#collectionDialog #saveCollection{font-size:18px;min-height:48px}.wallet-methods,.wallet-extras{grid-template-columns:1fr}.social-person .social-presence{white-space:normal}.social-row-actions button{min-height:44px}
}
@media(max-width:900px) and (orientation:landscape){
 .hud,body[data-screen=room] .hud{height:58px!important}.topbar{position:static;margin-left:auto;margin-right:145px;max-width:430px}.hud .brand{font-size:20px}.topbar .profile-pill{max-width:150px}.room-info{top:62px!important;max-width:210px!important}.room-info h1{font-size:12px!important}#mobileChat{top:62px;min-height:38px}.main-nav{top:58px}.room-bottom .clockline{position:fixed;left:8px;bottom:67px;width:155px;display:flex;flex-direction:column;align-items:stretch;gap:4px}.clockline #turnHint{font-size:13px}.clockline .clock{grid-template-columns:28px minmax(0,1fr) auto;padding:4px}.clockline .clock-avatar{width:28px;height:28px;grid-row:1}.clockline .clock>b{grid-column:3;grid-row:1;font-size:17px!important}.clockline .clock-copy small{display:none}.room-bottom .room-actions{padding-bottom:0}.room-info #roomId{display:none}.welcome-note{top:72px}.welcome-note h1{font-size:22px}.entry-rail{left:170px;grid-template-columns:repeat(3,minmax(0,1fr));bottom:8px}.entry-rail button{font-size:14px;min-height:48px}.entry-rail button small{display:none}body[data-screen=lobby] .street-notice-scene{top:55px;width:100vw}.auth.card{margin-top:65px}
}

@media(max-width:900px){#toast,#toast.move-notice{top:auto!important;height:auto!important;min-height:0!important;max-height:150px;overflow:auto}.entry-rail button b,.entry-rail button strong{font-size:18px!important}.entry-rail button small{font-size:12px!important}.welcome-note{background:#21180e88;border-radius:12px;padding:10px;max-width:235px}.room-info>div:not(.eyebrow){display:none}}

/* Keep every lobby layer in the same full, uncropped scene on portrait phones. */
@media(max-width:900px) and (orientation:portrait){
 body[data-screen=lobby] .street-notice-scene{left:50%;top:calc(220px + (100dvh - 484px)/2);width:min(100vw,calc((100dvh - 484px)*1.708333));height:auto;aspect-ratio:1640/960;transform:translate(-50%,-50%)}
 body[data-screen=lobby] .welcome-note{top:120px;left:14px;right:14px;max-width:none;padding:8px 10px;background:#21180e99}
 body[data-screen=lobby] .welcome-note h1{font-size:22px;line-height:1.2;margin:5px 0}
 body[data-screen=lobby] .welcome-note h1 br{display:none}
 body[data-screen=lobby] .welcome-note p{margin:4px 0;font-size:12px}
 body[data-screen=lobby] .lobby-layer-speech{font-size:clamp(5px,1.35vw,9px);padding:3px;line-height:1.25}
 body[data-screen=lobby] .lobby-layer-speech::after{bottom:-3px;border-top-width:4px;border-right-width:5px}
}

/* Compact phone panels and scene labels, without changing desktop typography. */
@media(max-width:900px){
 #identity.topbar{display:grid!important;grid-template-columns:minmax(0,1fr) 70px 76px;align-items:center;gap:6px}
 #identity.topbar[hidden]{display:none!important}
 #identity #profileInfo{width:auto;min-width:0;max-width:none;height:40px;padding:3px 6px;overflow:hidden}
 #profileInfo .portrait{width:30px;height:30px;min-width:30px}
 #profileInfo b{font:600 12px/1.3 'Segoe UI',Arial,sans-serif;max-width:100%;letter-spacing:0}
 #profileInfo small{margin-top:2px;min-width:0}#profileInfo small strong{font:600 9px/1.3 'Segoe UI',Arial,sans-serif;max-width:100%}
 body[data-screen=room] #identity .currency,#identity .currency{display:flex!important;min-width:0;width:auto;height:40px;padding:4px 6px}
 #identity .round-icon{display:block}
 .welcome-note,.room-info{font-family:'Segoe UI',Arial,sans-serif;letter-spacing:0}
 body[data-screen=lobby] .welcome-note h1{font:600 20px/1.4 'Segoe UI',Arial,sans-serif!important;letter-spacing:0}
 .welcome-note h1 br::after{content:' '}.welcome-note .eyebrow{font:600 10px/1.5 'Segoe UI',Arial,sans-serif;letter-spacing:.5px}
 body[data-screen=room] .room-info{right:140px!important;width:auto;max-width:none!important;padding:6px 8px!important}
 body[data-screen=room] #roomTitle{font:600 12px/1.35 'Segoe UI',Arial,sans-serif!important;margin:2px 0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 body[data-screen=room] .room-info>*:not(#roomTitle):not(#roomId){display:none!important}
 body[data-screen=room] #roomId{font:600 9px/1.3 'Segoe UI',Arial,sans-serif;letter-spacing:.5px}
 body[data-screen=room] .scene-name.compact-name{width:calc(104px / var(--scene-scale,1));height:calc(32px / var(--scene-scale,1));padding:calc(3px / var(--scene-scale,1)) calc(4px / var(--scene-scale,1));gap:calc(3px / var(--scene-scale,1));border-radius:calc(4px / var(--scene-scale,1));box-shadow:0 2px 4px #0005}
 .compact-name .rank-emblem{width:calc(18px / var(--scene-scale,1));height:calc(23px / var(--scene-scale,1));flex-shrink:0}
 body[data-screen=room] .compact-name .nameplate-rank{font:600 calc(8px / var(--scene-scale,1))/1.25 'Segoe UI',Arial,sans-serif}
 body[data-screen=room] .compact-name .nameplate-name{font:600 calc(11px / var(--scene-scale,1))/1.25 'Segoe UI',Arial,sans-serif}
 body[data-camera=overview] .scene-name.yours::before{top:calc(-24px / var(--scene-scale,1));font-size:calc(12px / var(--scene-scale,1));padding:calc(2px / var(--scene-scale,1)) calc(6px / var(--scene-scale,1));border-width:calc(1px / var(--scene-scale,1))}
 body[data-camera=overview] .scene-name.yours::after{top:calc(-7px / var(--scene-scale,1));border-left-width:calc(5px / var(--scene-scale,1));border-right-width:calc(5px / var(--scene-scale,1));border-top-width:calc(5px / var(--scene-scale,1))}
 body[data-screen=room] .seat-hint{font:600 11px/1.25 'Segoe UI',Arial,sans-serif!important;min-height:30px!important;max-width:100px!important;padding:5px 7px!important;border-radius:8px}
 body[data-screen=room] .seat-hint::after{font-size:16px!important}
 dialog{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
 dialog#candyShopDialog{width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 48px);padding:12px}
 #candyShopDialog .wallet-heading{gap:8px;margin-bottom:10px;align-items:center}
 #candyShopDialog .wallet-heading>img{width:36px;height:32px}
 #candyShopDialog .wallet-heading h2{font:600 18px/1.3 'Segoe UI',Arial,sans-serif}
 #candyShopDialog .wallet-heading p{font:12px/1.4 'Segoe UI',Arial,sans-serif;margin-top:3px}
 #candyShopDialog .wallet-methods{gap:9px}#candyShopDialog .daily-section{padding:10px}
 #candyShopDialog .daily-section h3{font:600 17px/1.4 'Segoe UI',Arial,sans-serif}
 #candyShopDialog .daily-mission{grid-template-columns:20px minmax(0,1fr) 42px;gap:7px;padding:10px 0}
 #candyShopDialog .daily-mission strong{font:600 14px/1.4 'Segoe UI',Arial,sans-serif}
 #candyShopDialog .mission-check{width:19px;height:19px;font-size:16px}
 #candyShopDialog .mission-status{grid-column:3;grid-row:auto;padding:0;font:11px/1.4 'Segoe UI',Arial,sans-serif;text-align:right}
 #candyShopDialog .mission-prize{font:600 12px/1.4 'Segoe UI',Arial,sans-serif;margin-top:3px}
 #candyShopDialog .mission-note{font:11px/1.45 'Segoe UI',Arial,sans-serif;margin-top:8px}
 #candyShopDialog .wallet-method{padding:10px}#candyShopDialog .wallet-method h3{font-size:16px}
 #playerProfileDialog .profile-summary{gap:10px;margin:10px 0}#playerProfileDialog .profile-summary .profile-portrait{width:52px;height:60px}
 #playerProfileDialog .profile-summary h3{font:600 19px/1.4 'Segoe UI',Arial,sans-serif;margin:0 0 4px}
 #playerProfileDialog .profile-season{grid-template-columns:1fr 1fr;gap:7px}
 #playerProfileDialog .profile-rank-card{padding:9px 6px;gap:5px;border-radius:10px}
 #playerProfileDialog .profile-rank-card .rank-emblem{width:42px;height:48px}
 #playerProfileDialog .profile-rank-card b{font-size:12px}#playerProfileDialog .profile-rank-card strong{font-size:19px}#playerProfileDialog .profile-rank-card small{font-size:11px}
 #playerProfileDialog .profile-stats{gap:6px;margin-top:10px}#playerProfileDialog .profile-stats>div{padding:8px;gap:4px}#playerProfileDialog .profile-stats small{font-size:11px}#playerProfileDialog .profile-stats b{font-size:15px}
 #playerProfileDialog h3{font-size:18px}#playerProfileDialog .small{font-size:12px;line-height:1.5}#playerProfileDialog .profile-history{margin-top:14px;padding-top:12px}
}
@media(max-width:900px) and (orientation:landscape){#identity.topbar{width:340px;flex:none;margin-right:145px}body[data-screen=room] .room-info{right:auto!important;width:190px;top:60px!important}}

@media(max-width:900px){
 dialog#findDialog,dialog#playerProfileDialog{width:min(350px,calc(100vw - 28px));max-height:min(650px,calc(100dvh - 72px));padding:12px}
 #findDialog h2,#playerProfileDialog h2{font:600 20px/1.35 'Segoe UI',Arial,sans-serif;margin:0}
 #findDialog #search{min-height:40px;padding:9px;font-size:16px;margin:10px 0}
 #findDialog .room-row{padding:9px 0;gap:7px;align-items:center}#findDialog .room-row b{font:600 12px/1.4 'Segoe UI',Arial,sans-serif}
 #findDialog .room-row small{font:11px/1.4 'Segoe UI',Arial,sans-serif;margin-top:4px}#findDialog .room-row .row{gap:5px}
 #findDialog .room-row button{font:600 11px/1.3 'Segoe UI',Arial,sans-serif;min-height:36px;padding:7px 8px}
 #playerProfileDialog .profile-summary{margin:8px 0;gap:8px}#playerProfileDialog .profile-summary .profile-portrait{width:42px;height:48px}
 #playerProfileDialog .profile-rank-card{gap:4px;padding:7px}#playerProfileDialog .profile-rank-card .rank-emblem{height:38px;width:34px}
 #playerProfileDialog .profile-rank-card small{font-size:10px}#playerProfileDialog .profile-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 #playerProfileDialog .profile-stats>div{padding:7px 5px}#playerProfileDialog .profile-stats small{font-size:10px}
 #playerProfileDialog .profile-history-row,#playerProfileDialog .profile-match{font-size:12px;padding:8px 0}#playerProfileDialog h3{font:600 16px/1.4 'Segoe UI',Arial,sans-serif}
 body[data-screen=room].mobile-chat-open .community{left:14px;right:14px;top:50%;height:min(540px,calc(var(--visible-height,100dvh) - 60px));max-height:calc(var(--visible-height,100dvh) - 60px);transform:translateY(-50%);padding:8px}
 #mobileCloseChat{min-height:36px;font-size:14px;margin-bottom:6px}.community .tabs button{min-height:36px;font-size:12px}.community .chat-messages{font-size:13px}
 .community .chat-form input{min-height:40px;font-size:16px}.community .chat-form button{min-height:40px;font-size:13px}
 body[data-screen=room] .scene-name.compact-name{width:calc(96px / var(--scene-scale,1));height:calc(29px / var(--scene-scale,1))}
 body[data-screen=room] .compact-name .nameplate-name{font-size:calc(10px / var(--scene-scale,1))}body[data-screen=room] .compact-name .nameplate-rank{font-size:calc(7px / var(--scene-scale,1))}
 .nameplate-text{min-width:0}body[data-camera=overview] .scene-name.yours::before{top:calc(-20px / var(--scene-scale,1));font-size:calc(10px / var(--scene-scale,1))}
 dialog#collectionDialog{height:min(680px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);padding:8px;overflow:hidden}
 #collectionDialog .inventory-heading{height:40px;min-height:40px}#collectionDialog .inventory-heading h2{font:600 20px/1.3 'Segoe UI',Arial,sans-serif!important;letter-spacing:1px}
 #collectionDialog #closeInventory{width:34px;height:34px;min-height:34px;right:0;top:0;font-size:20px}
 #collectionDialog .inventory-tabs{min-height:40px;margin-top:4px!important}#collectionDialog .inventory-tabs button{min-height:38px;font:600 16px/1.3 'Segoe UI',Arial,sans-serif!important}
 #collectionDialog .inventory-layout{overflow-y:auto;overflow-x:hidden;gap:4px}
 #collectionDialog .inventory-catalog{padding:5px;margin:5px 0;overflow:visible}
 #collectionDialog #collectionCards{grid-template-columns:repeat(7,88px);grid-auto-rows:110px;max-height:122px;padding:3px 2px 8px;gap:5px;flex:none}
 #collectionDialog #collectionCards .collection-card{min-height:0;grid-template-rows:40px 32px 15px;gap:2px;padding:5px}
 #collectionDialog #collectionCards .collection-card svg,#collectionDialog #collectionCards .inventory-piece{height:40px}
 #collectionDialog #collectionCards .collection-card b{font-size:11px;height:32px}#collectionDialog #collectionCards .inventory-card-state{font-size:10px;line-height:15px}
 #collectionDialog .inventory-showcase{min-height:0;height:140px;max-height:140px;padding:5px;flex-direction:row;gap:10px;margin:0}
 #collectionDialog #inventoryHero{height:125px;width:65%;display:flex;align-items:center;justify-content:center}#collectionDialog #inventoryHero>svg{height:125px;width:auto;max-width:100%}
 #collectionDialog #inventoryCompanion{width:30%;height:110px}#collectionDialog #inventoryCompanion h4{font-size:10px;margin:0 0 4px}
 #collectionDialog .inventory-companion{min-height:0;padding:3px;height:85px;width:100%}#collectionDialog .inventory-companion svg{height:75px;max-width:100%}
 #collectionDialog .inventory-piece-pair{height:120px}#collectionDialog .inventory-piece img{height:100%;object-fit:contain}#collectionDialog .inventory-piece-pair .inventory-piece{height:100%}
 #collectionDialog .inventory-details{height:auto;padding:10px;margin:4px 0;overflow:visible;min-height:0}
 #collectionDialog .inventory-detail-scroll{overflow:visible;flex:none}#collectionDialog #inventoryItemName{font:600 18px/1.3 'Segoe UI',Arial,sans-serif;margin:0 0 5px}
 #collectionDialog #inventoryStory{font:14px/1.6 'Segoe UI',Arial,sans-serif;margin:8px 0}#inventoryRank{font-size:12px}#inventoryFacts{font-size:12px;gap:5px;margin:8px 0}#inventoryOwned{font-size:12px;padding:6px}#collectionNotice{font-size:11px;margin:6px 0}
 #collectionDialog .inventory-footer{display:block;padding:7px 0 0;background:#2b2019;flex-shrink:0;border-top:1px solid #aa844955}
 #collectionDialog .inventory-footer>span,#collectionDialog .inventory-footer>small{display:none}
 #collectionDialog .inventory-footer #saveCollection{display:block;width:100%;margin:0;min-height:44px;font:600 16px/1.4 'Segoe UI',Arial,sans-serif}
 #candyShopDialog .mission-note{font:11px/1.45 'Segoe UI',Arial,sans-serif!important}
}

@media(max-width:900px){
 #roomWorld #seatHints.mobile-scene-seats{position:absolute;inset:0;z-index:2;pointer-events:none}
 body[data-screen=room] #roomWorld .seat-hint{font-size:calc(10px / var(--scene-scale,1))!important;min-height:calc(24px / var(--scene-scale,1))!important;max-width:calc(88px / var(--scene-scale,1))!important;padding:calc(3px / var(--scene-scale,1)) calc(5px / var(--scene-scale,1))!important;border-width:calc(1px / var(--scene-scale,1));border-radius:calc(5px / var(--scene-scale,1));box-shadow:0 2px 4px #0006}
 body[data-screen=room] #roomWorld .seat-hint::after{font-size:calc(17px / var(--scene-scale,1))!important;line-height:1}
 dialog#leaderboardDialog{width:calc(100vw - 24px);height:min(620px,calc(100dvh - 80px));max-height:calc(100dvh - 80px);padding:12px;overflow:hidden}
 #leaderboardDialog[open]{display:flex;flex-direction:column;gap:8px}
 #leaderboardDialog .lb-header{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:7px;align-items:center}
 #leaderboardDialog .lb-header>div{grid-column:1;grid-row:1}#leaderboardDialog .lb-header h2{font:600 20px/1.3 'Segoe UI',Arial,sans-serif;white-space:nowrap}
 #leaderboardDialog .lb-header p{font-size:11px;margin-top:3px}#leaderboardDialog .lb-header>button{grid-column:2;grid-row:1;width:36px;height:36px;min-height:36px;font-size:19px}
 #leaderboardDialog .lb-header select{grid-column:1/-1;grid-row:2;max-width:none;width:100%;min-height:36px;font-size:13px}
 #leaderboardDialog .lb-layout{flex:1;min-height:0;overflow:auto;gap:8px;display:flex;flex-direction:column}
 #leaderboardDialog #leaderboardGroups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:none;flex-direction:row;overflow:visible;gap:5px;padding:0}
 #leaderboardDialog #leaderboardGroups .lb-group{width:auto;min-width:0;min-height:51px;padding:5px;gap:4px;font:600 10px/1.25 'Segoe UI',Arial,sans-serif}
 #leaderboardDialog .lb-group .rank-emblem{width:24px;height:28px;flex-shrink:0}
 #leaderboardDialog .lb-main{flex:none;overflow:visible;min-height:0}#leaderboardDialog .lb-main h3{font:600 17px/1.4 'Segoe UI',Arial,sans-serif;margin:0 0 6px}
 #leaderboardDialog #leaderboardTiers{display:flex;gap:5px}#leaderboardDialog #leaderboardTiers button{min-height:32px;font-size:12px;padding:5px 10px}
 #leaderboardDialog #leaderboardStatus{font-size:11px;margin:5px 0}#leaderboardDialog #leaderboardRows{overflow:visible;max-height:none}
 #leaderboardDialog .lb-row{min-height:52px;font-size:12px}#leaderboardDialog .lb-columns{font-size:11px}#leaderboardDialog .lb-row .rank-emblem{width:20px;height:24px}
 #leaderboardDialog .lb-footer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;padding-top:8px;margin:0;flex:none}
 #leaderboardDialog #leaderboardMe{grid-column:1/-1;font-size:11px;min-width:0}#leaderboardDialog #leaderboardLocate{font-size:12px;min-height:36px;padding:6px 9px}
 #leaderboardDialog .lb-pagination{display:flex;align-items:center;gap:4px}#leaderboardDialog .lb-pagination button{min-height:36px;padding:5px 10px}
}

@media(max-width:900px){
 .clockline .clock-copy span{display:block;font:600 11px/1.2 'Segoe UI',Arial,sans-serif}
 .clock.red .clock-copy span{color:#ffb3a2}.clock.black .clock-copy span{color:#e6dfd0}
 .clockline .clock-copy{gap:2px}.clockline .clock-copy small{font-size:9px}
}

@media(max-width:900px){#authForm .remember-login input{width:20px;height:20px;min-height:20px}#collectionDialog .inventory-companion{display:flex;align-items:center;justify-content:center;overflow:hidden}#collectionDialog .inventory-companion .inventory-piece{width:100%;max-width:70px;height:70px;min-height:0;margin:0}#collectionDialog .inventory-companion .inventory-piece img{width:100%;height:100%;object-fit:contain}#collectionDialog .inventory-companion .inventory-glyph{font-size:28px}dialog#registerDialog{padding:16px;max-height:min(590px,calc(100dvh - 40px))}#registerDialog h2{font-size:21px}}
