.mobile-viewer-tools,.mobile-craft-dock,.slot-settings{display:none}
.mobile-preview-dialog{width:min(460px,94vw);max-height:80svh;overflow:auto;padding:18px;border-radius:18px;box-shadow:0 18px 60px #0008}
.mobile-preview-dialog::backdrop{background:#0004;backdrop-filter:blur(3px)}
.mobile-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.mobile-dialog-heading h2{font-size:16px}.mobile-dialog-heading button{font-size:22px;padding:5px 12px;min-height:44px}
.mobile-value-row,.mobile-sticker-actions{display:flex;gap:8px}.mobile-value-row input{min-width:0}.mobile-change-weapon{width:100%;text-align:left;font-size:12px;color:var(--accent)}
.mobile-preview-dialog input[type=range]{width:100%;min-height:32px;margin:12px 0}.mobile-preview-dialog label{font-size:12px}.mobile-preview-dialog output{float:right;color:var(--accent)}
@media(max-width:700px){
 body:has(.workspace[data-mobile=preview]) .intro,body:has(.workspace[data-mobile=preview]) .site-settings,.development-banner{display:none}
 main{padding:10px 10px 20px}.workspace{gap:10px}.center{min-width:0}.center>.craft-actions{display:none}.mobile-tabs{margin-bottom:10px}
 .viewer-toolbar{gap:6px;margin-bottom:8px}.viewer-toolbar .segmented button{padding:9px 10px;font-size:11px;min-height:40px}.view-mode-controls{gap:4px}
 #viewer{height:calc(100svh - 180px);min-height:420px;max-height:850px;border-radius:16px;position:relative}
 .viewer-toolbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:4px}.viewer-toolbar .view-mode-controls{grid-column:1;grid-row:1}.viewer-toolbar>.segmented{grid-column:3;grid-row:1}.viewer-toolbar .segmented button{padding:9px 7px;font-size:10px}.mobile-viewer-tools{position:static;grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;gap:4px;min-width:0}.mobile-viewer-tools button{background:var(--panel);min-height:40px;min-width:32px}.mobile-viewer-tools #mobileViewSettings,.mobile-viewer-tools #mobileResetView{font-size:19px;padding:6px}.mobile-viewer-tools #mobileResetView{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:50px;line-height:1}.mobile-viewer-tools #mobileResetView span{display:block;font-size:8px;font-weight:600;white-space:nowrap;line-height:1.2}
 .mobile-craft-dock{display:block;position:absolute;left:8px;right:8px;bottom:8px;z-index:8;background:color-mix(in srgb,var(--panel) 94%,transparent);border:1px solid var(--line);border-radius:14px;padding:7px;box-shadow:0 8px 24px #0004;backdrop-filter:blur(12px)}
 #mobileDockSlots .slot-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:0;padding:0;overflow:visible}#mobileDockSlots .slot-cell{min-width:0;position:relative}
 #mobileDockSlots .slot{height:65px;min-height:65px;width:100%;padding:4px;border-radius:9px 9px 0 0;display:flex;align-items:center;justify-content:center;position:relative}#mobileDockSlots .slot{overflow:hidden}#mobileDockSlots .slot img{width:calc(100% - 4px);height:59px;object-fit:contain;max-width:none;max-height:none;transform:scale(1.25);transform-origin:50% 45%}#mobileDockSlots .slot>.slot-price{z-index:1}#mobileDockSlots .slot>span{display:none}#mobileDockSlots .slot>b{font-size:26px;color:var(--muted)}
 #mobileDockSlots .slot-lock{display:none}#mobileDockSlots .locked:after{content:'🔒';font-size:10px;position:absolute;top:3px;right:3px}#mobileDockSlots .slot-settings{display:block;width:100%;min-height:35px;padding:4px;font-size:17px;border-radius:0 0 9px 9px;border-top:0}#mobileDockSlots .slot.active{border-color:var(--accent)}
 .mobile-dock-actions{display:flex;gap:5px;align-items:center;margin-top:7px}.mobile-dock-actions button{min-height:38px;font-size:10px;padding:7px}#mobileWeaponSettings{flex:1;min-width:0;display:flex;align-items:center;gap:5px;text-align:left}#mobileWeaponThumbnail{width:32px;height:23px;object-fit:contain;flex-shrink:0}#mobileWeaponName{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#mobileQuickCrafts .preview-random{width:auto;gap:4px}#mobileQuickCrafts button{font-size:9px;white-space:nowrap;padding:7px 6px}.mobile-dock-actions #mobileBrowseStickers{font-size:19px;width:38px;flex-shrink:0}
 #viewer>.renderer-credit,#viewer>.viewer-status{bottom:166px;font-size:8px;max-width:48%}#viewer>.floating-wear-bar{bottom:205px}#mobileStickerControls .controls{padding:12px;margin-top:12px}#mobileStickerControls .controls .section-title{display:none}#mobileStickerControls .preview-wear-bar{margin-top:12px}#mobileStickerControls .editing-sliders{grid-template-columns:1fr;gap:6px}#mobileStickerControls .editing-heading>span{white-space:normal}#mobileStickerControls .selected-favorite-actions{flex-wrap:wrap}#mobileStickerControls button{min-height:40px}
 #mobileViewControls .pan-tools{margin-top:14px}#mobileViewControls .lighting-settings{padding:12px}#mobileViewControls .lighting-settings-sliders{grid-template-columns:1fr}#mobileViewControls .background-bar select{max-width:100%}#mobileViewControls .zoom-bar{flex-wrap:wrap}#mobileViewControls .zoom-bar input{min-width:90px}
 .center>.preview-note,.center>.renderer-lab-link{display:none}.craft-heading{margin-top:14px}.save-craft-bar{padding:12px}.save-craft-bar p{display:none}
}
@media(max-width:700px) and (orientation:landscape){#viewer{height:calc(100svh - 115px);min-height:270px}.mobile-craft-dock{left:auto;width:min(390px,60vw)}.mobile-viewer-tools{left:10px;right:auto}#viewer>.renderer-credit,#viewer>.viewer-status{bottom:10px;max-width:30%}}

.mobile-weapon-picker{margin-top:12px;padding:12px;background:var(--input);border:1px solid var(--line);border-radius:10px}.mobile-weapon-picker[hidden]{display:none}.mobile-weapon-picker label:first-child{margin-top:0}.mobile-weapon-picker .skin-list{height:180px;overflow:auto;overscroll-behavior:contain;margin-top:8px}.mobile-weapon-picker .skin-card{min-height:48px}.mobile-weapon-picker .skin-card img{width:54px;height:34px;object-fit:contain}.mobile-weapon-picker input[type=search]{font-size:16px}.mobile-weapon-picker select{font-size:16px}

.mobile-sticker-browser-dialog{width:min(560px,96vw);max-height:88svh}.mobile-sticker-browser-dialog .sticker-panel{display:block;border:0;padding:0;background:transparent}.mobile-sticker-browser-dialog .sticker-panel>.section-title{display:none}.mobile-sticker-browser-dialog .sticker-list{height:38svh;min-height:180px;overscroll-behavior:contain}.mobile-sticker-browser-dialog #stickerSearch{font-size:16px}.mobile-sticker-browser-dialog .price-note,.mobile-sticker-browser-dialog .price-sources,.mobile-sticker-browser-dialog .craft-price,.mobile-sticker-browser-dialog .preset-tools{display:none}.mobile-sticker-browser-dialog .category-menus{gap:4px;margin:8px 0}.mobile-sticker-browser-dialog .favorites-tools{margin:8px 0}.mobile-sticker-browser-dialog .category-menus button,.mobile-sticker-browser-dialog .favorites-tools button{min-height:36px;font-size:10px;padding:7px}.mobile-sticker-browser-dialog .sticker-card{min-height:130px}.mobile-sticker-browser-dialog .sticker-card img{width:65px;height:65px}

#viewer>.viewer-status{display:none}#viewer>.renderer-credit{bottom:14px}#viewer>.floating-wear-bar{left:12px;bottom:42px;transform:none;width:124px;padding:5px 7px;border-radius:7px}#viewer>.floating-wear-bar label{font-size:9px;margin:0 0 2px}#viewer>.floating-wear-bar input[type=range]{display:block;width:100%;height:20px;margin:0;padding:0}
@media(max-width:700px) and (orientation:portrait){#viewer>.renderer-credit{bottom:calc(var(--mobile-dock-height,170px) + 18px);left:12px;max-width:none}#viewer>.floating-wear-bar{bottom:calc(var(--mobile-dock-height,170px) + 12px)}}
@media(max-width:700px) and (orientation:landscape){#viewer>.renderer-credit{bottom:14px}#viewer>.floating-wear-bar{bottom:42px}}

.mobile-preview-dialog{overscroll-behavior:contain}.mobile-preview-dialog .mobile-dialog-heading{position:sticky;top:-18px;z-index:10;margin:-18px -18px 14px;padding:18px;background:var(--panel);border-bottom:1px solid var(--line);box-shadow:0 4px 12px #0002}.mobile-preview-dialog .mobile-dialog-heading h2{min-width:0;overflow-wrap:anywhere}.mobile-preview-dialog .mobile-dialog-heading button{flex-shrink:0}

#viewer>.renderer-credit{left:auto;right:12px;font-size:8px;padding:4px 6px}
@media(max-width:700px){#viewer>.renderer-credit{left:auto;right:12px;font-size:7px}}
@media(max-width:700px) and (orientation:landscape){#viewer>.renderer-credit{bottom:calc(var(--mobile-dock-height,170px) + 18px)}}



.viewer[data-background=solidblack],.background-swatch[data-background=solidblack]{background:#202329}
.viewer[data-background=solidnavy],.background-swatch[data-background=solidnavy]{background:#111c30}
.viewer[data-background=solidgreen],.background-swatch[data-background=solidgreen]{background:#173b2b}
.viewer[data-background=solidwhite],.background-swatch[data-background=solidwhite]{background:#ffffff}
.viewer[data-background=solidlightgrey],.background-swatch[data-background=solidlightgrey]{background:#d9dce0}

.viewer[data-background=mapancienta],.background-swatch[data-background=mapancienta]{background:url("../assets/map-scenes/ancient-a.jpg") center/cover}
.viewer[data-background=mapancientb],.background-swatch[data-background=mapancientb]{background:url("../assets/map-scenes/ancient-b.jpg") center/cover}
.viewer[data-background=mapanubisa],.background-swatch[data-background=mapanubisa]{background:url("../assets/map-scenes/anubis-a.jpg") center/cover}
.viewer[data-background=mapanubisb],.background-swatch[data-background=mapanubisb]{background:url("../assets/map-scenes/anubis-b.jpg") center/cover}
.viewer[data-background=mapcachea],.background-swatch[data-background=mapcachea]{background:url("../assets/map-scenes/cache-a.jpg") center/cover}
.viewer[data-background=mapcacheb],.background-swatch[data-background=mapcacheb]{background:url("../assets/map-scenes/cache-b.jpg") center/cover}
.viewer[data-background=mapdust2a],.background-swatch[data-background=mapdust2a]{background:url("../assets/map-scenes/dust2-a.jpg") center/cover}
.viewer[data-background=mapdust2b],.background-swatch[data-background=mapdust2b]{background:url("../assets/map-scenes/dust2-b.jpg") center/cover}
.viewer[data-background=mapinfernoa],.background-swatch[data-background=mapinfernoa]{background:url("../assets/map-scenes/inferno-a.jpg") center/cover}
.viewer[data-background=mapinfernob],.background-swatch[data-background=mapinfernob]{background:url("../assets/map-scenes/inferno-b.jpg") center/cover}
.viewer[data-background=mapmiragea],.background-swatch[data-background=mapmiragea]{background:url("../assets/map-scenes/mirage-a.jpg") center/cover}
.viewer[data-background=mapmirageb],.background-swatch[data-background=mapmirageb]{background:url("../assets/map-scenes/mirage-b.jpg") center/cover}
.viewer[data-background=mapnukea],.background-swatch[data-background=mapnukea]{background:url("../assets/map-scenes/nuke-a.jpg") center/cover}
.viewer[data-background=mapnukeb],.background-swatch[data-background=mapnukeb]{background:url("../assets/map-scenes/nuke-b.jpg") center/cover}

/* Keep the weapon and controls sharp while gently softening map scenery. */
.viewer{isolation:isolate}
.viewer[data-background=dust2]::before,.viewer[data-background=dust2blue]::before,.viewer[data-background=dust2ct]::before,.viewer[data-background=nuke]::before,.viewer[data-background=nukeramp]::before,.viewer[data-background=overpass]::before,.viewer[data-background=overpasstoilets]::before,.viewer[data-background=mapancienta]::before,.viewer[data-background=mapancientb]::before,.viewer[data-background=mapanubisa]::before,.viewer[data-background=mapanubisb]::before,.viewer[data-background=mapcachea]::before,.viewer[data-background=mapcacheb]::before,.viewer[data-background=mapdust2a]::before,.viewer[data-background=mapdust2b]::before,.viewer[data-background=mapinfernoa]::before,.viewer[data-background=mapinfernob]::before,.viewer[data-background=mapmiragea]::before,.viewer[data-background=mapmirageb]::before,.viewer[data-background=mapnukea]::before,.viewer[data-background=mapnukeb]::before{content:"";position:absolute;inset:-10px;background:inherit;filter:blur(3px);z-index:-1;pointer-events:none}

.skin-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}.craft-cost-estimate{font-size:11px;color:var(--accent);font-weight:600;line-height:1.4}.slot-price{display:none}
@media(max-width:700px){.craft-heading>div{min-width:0;flex:1}.craft-cost-estimate{font-size:10px}#mobileDockSlots .slot>.slot-price{display:block;position:absolute;bottom:3px;right:4px;max-width:calc(100% - 8px);font-size:8px;line-height:1.2;font-variant-numeric:tabular-nums;color:var(--accent);background:var(--panel);border-radius:3px;padding:2px 3px;pointer-events:none}#mobileDockSlots .slot>.slot-price.unavailable{color:var(--muted)}}

#mobileViewControls>#lightingSettingsButton{display:none}

@media(max-width:700px){.mobile-viewer-tools{gap:3px}.mobile-viewer-tools button{min-width:28px}.mobile-viewer-tools #mobileResetView{min-width:43px;font-size:17px;padding:5px 3px}.mobile-viewer-tools #mobileViewSettings{padding:5px;font-size:17px}.mobile-viewer-tools #mobileScreenshot{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:18px;padding:5px 3px;gap:2px}.mobile-viewer-tools #mobileScreenshot span{font-size:7px;line-height:1.2}.viewer-toolbar .segmented button{padding-left:5px;padding-right:5px}}

/* Compact the two mobile control rows and keep their button heights equal. */
@media(max-width:700px){
 main{padding-top:4px}
 .mobile-tabs{padding:0;margin-bottom:6px}
 .mobile-tabs button,.viewer-toolbar .segmented button,.mobile-viewer-tools button{height:40px;min-height:40px;max-height:40px;box-sizing:border-box}
 .mobile-tabs button{padding-top:0;padding-bottom:0}
 .viewer-toolbar{margin-bottom:6px;align-items:center}
 .mobile-viewer-tools{align-self:stretch;align-items:center}
 .mobile-viewer-tools #mobileScreenshot{line-height:1;padding-top:3px;padding-bottom:3px}
}

#viewer>.viewer-watermark{position:absolute;top:12px;left:12px;width:min(150px,28%);height:auto;z-index:6;opacity:.9;pointer-events:none;user-select:none}
@media(max-width:700px){#viewer>.viewer-watermark{top:10px;left:10px;width:min(112px,28%)}}

.weapon-price-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;margin-bottom:6px}.craft-heading .weapon-price-row .eyebrow{margin:0}.weapon-price-row .craft-cost-estimate{font-size:18px;line-height:1.25;font-weight:700}

#aboutDialog .about-support{border-top:1px solid var(--line);margin-top:18px;padding-top:18px}#aboutDialog .about-support>a{display:inline-block;padding:10px 13px;border:1px solid var(--accent-line);border-radius:8px;color:var(--accent);text-decoration:none;font-weight:600}#aboutDialog .about-support>a:hover{background:var(--selected)}#aboutDialog .about-support p{margin:16px 0 12px}

@media(max-width:700px){#desktopScreenshot{display:none}}
@media(min-width:701px){
 #slots .slot-cell .slot{height:168px;padding:8px;gap:4px;overflow:hidden}
 #slots .slot-cell .slot img{width:calc(100% - 8px);height:118px;max-width:none;max-height:none;flex-shrink:0;object-fit:contain;transform:scale(1.15);transform-origin:50% 45%}
 #slots .slot span{position:relative;z-index:1;flex-shrink:0}
 #slots .slot-lock{z-index:2}
}
