/* Collection Studio — measured from the three approved boards. */
body.landing,body.play-library{background:var(--shell);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif}
body.landing .mast,body.play-library .mast{max-width:1440px;min-height:58px;margin:0 auto;padding:10px 42px;border-bottom:1px solid var(--line);background:transparent}
body.landing .brand,body.play-library .brand{font-size:16px;letter-spacing:.2px;font-weight:650;gap:9px}
body.landing .mark,body.play-library .mark{height:30px;width:29px;border-radius:4px;background:var(--red);font:600 17px/1 ui-monospace,monospace;box-shadow:none}
body.landing .mark:after,body.play-library .mark:after{display:none}
body.landing .brand small,body.play-library .brand small{font-size:7px;letter-spacing:2px;line-height:1.5;font-weight:500}
body.landing nav,body.play-library .mast nav{gap:30px}body.landing nav a,body.play-library .mast nav>a{font-size:12px;text-decoration:none;color:var(--ink)}
body.landing nav a:hover,body.play-library nav a:hover{color:var(--red)}
body.landing main{max-width:1440px;margin:0 auto}.mobile-menu{display:none}
.collection-hero{position:relative;aspect-ratio:1170/330;min-height:330px;max-height:440px;overflow:hidden;border-bottom:1px solid var(--line)}
.hero-scene{position:absolute;inset:0;width:100%;height:100%;display:block}.mobile-scene{display:none}
.collection-hero:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,var(--shell) 0%,var(--shell) 28%,#efe9e1ef 31%,#efe9e100 39%);pointer-events:none}
.hero-copy{position:relative;z-index:1;width:40%;height:100%;display:flex;flex-direction:column;justify-content:center;padding:24px 0 24px 42px}
.collection-hero h1{font-size:clamp(30px,3.15vw,44px);line-height:1.23;font-weight:750;letter-spacing:-1px;margin:0;white-space:nowrap}
.collection-hero h1:after{content:'';display:block;width:44px;height:4px;border-radius:2px;background:var(--red);margin:16px 0 0}
.collection-hero .intro{font-size:clamp(13px,1.12vw,16px);line-height:1.7;margin:16px 0 20px}.hero-actions{display:flex;align-items:center;gap:27px}
.hero-actions .primary{font-size:13px;border-radius:5px;padding:9px 20px;min-height:44px;white-space:nowrap}.hero-actions svg{width:20px;height:21px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.guide-link{font-size:12px;color:var(--blue);white-space:nowrap}.hero-copy .fine{font-size:10px;color:var(--muted);margin:8px 0 0}
.feature-strip{display:grid;grid-template-columns:repeat(4,1fr);padding:19px 42px;border-bottom:1px solid var(--line)}.feature-strip>div{display:flex;align-items:center;gap:14px;padding:0 28px;border-right:1px solid var(--line)}.feature-strip>div:first-child{padding-left:10px}.feature-strip>div:last-child{border:0;padding-right:0}.feature-strip p{margin:0}.feature-strip b{display:block;font-size:13px;line-height:1.5;font-weight:650}.feature-strip small{font-size:10px;color:var(--muted);line-height:1.5}.feature-icon{flex:none;width:30px;height:32px;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;fill:none}
.cover-intro{display:grid;grid-template-columns:1fr 1.52fr;align-items:center;gap:28px;padding:20px 42px 0;border-bottom:1px solid var(--line)}.cover-copy{align-self:center;padding-bottom:20px}.cover-intro h2{font-size:24px;font-weight:700;margin:0 0 12px}.cover-copy p{font-size:13px;line-height:1.8;color:var(--muted);margin:0 0 28px}.cover-copy .fine{font-size:10px;margin:0}.cover-display{position:relative;min-width:0;padding-top:8px}.shelf-link{position:absolute;top:-9px;right:0;font-size:10px;color:var(--blue);text-decoration:none}
.cover-shelf{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;gap:12px;border-bottom:7px solid #c5ad88;padding:0 12px 4px;box-shadow:0 5px 9px -4px #68553d50}.cover-shelf a{display:block;min-width:0;text-decoration:none;color:var(--ink)}.cover-shelf img{display:block;width:100%;height:164px;object-fit:contain;border-radius:3px;border:1px solid #6f5d4322;box-shadow:2px 2px 4px #30251b35;background:var(--paper)}.cover-shelf span{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:4px 0}.cover-unavailable{min-height:164px;align-content:center;text-align:center;background:var(--paper);border:1px solid var(--line)}
.ways-section{padding:18px 42px 20px;border-bottom:1px solid var(--line)}.ways-section h2{font-size:23px;font-weight:700;margin:0 0 15px}.ways{display:grid;grid-template-columns:repeat(3,1fr)}.ways article{display:flex;align-items:center;gap:18px;padding:0 22px;border-right:1px solid var(--line)}.ways article:first-child{padding-left:0}.ways article:last-child{border:0;padding-right:0}.way-art{width:46%;height:91px;flex:none;mix-blend-mode:darken}.ways h3{font-size:16px;font-weight:700;margin:0 0 8px;white-space:nowrap}.ways p{font-size:12px;line-height:1.8;color:var(--muted);margin:0}
.download-band{display:flex;align-items:center;gap:28px;position:relative;min-height:106px;padding:14px 42px 12px 270px;border-bottom:1px solid var(--line)}.download-art{position:absolute;left:0;bottom:0;width:250px;height:100px;mix-blend-mode:darken;pointer-events:none}.download-heading{flex:1}.download-heading h2{font-size:20px;font-weight:700;margin:0 0 3px;white-space:nowrap}.download-heading p{font-size:11px;color:var(--muted);margin:0;white-space:nowrap}
body.landing .release{position:relative;background:none;border:0;padding:0;flex:none;min-width:160px;border-radius:0}.release #apk{font-size:13px;min-height:40px;padding:8px 25px;white-space:nowrap}.release .fine{font-size:10px;color:var(--muted);margin:5px 0 0}#release-status{font-size:9px!important;line-height:1.3;min-height:0;margin:2px 0 0!important;color:var(--muted);max-width:210px}.release #retry{font-size:10px;padding:3px 0;min-height:30px}.download-browser,#source{flex:none;font-size:11px;color:var(--blue);white-space:nowrap}
body.landing footer{max-width:1440px;min-height:58px;padding:10px 42px;align-items:center;border:0;gap:20px}body.landing footer .brand{font-size:12px}body.landing footer .mark{width:24px;height:27px;font-size:14px}body.landing footer .brand small{font-size:6px}body.landing footer nav{margin-left:auto;display:flex;gap:24px}body.landing footer nav a{font-size:10px;color:var(--muted)}body.landing footer>small{font-size:6px;letter-spacing:1px;color:var(--muted);padding-left:20px;border-left:1px solid var(--line)}.mobile-download{display:none}
.collection-document main{min-height:65vh}.collection-document .section{padding:30px 42px}.collection-document .catalog-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.collection-document .catalog-item{background:var(--paper)}.collection-document .faq{max-width:850px;margin:auto}
/* Browser collection: title/search share the top row, filters stay on one compact rail. */
body.play-library .mast{max-width:none;justify-content:flex-start;min-height:64px;padding:10px 28px;gap:60px}body.play-library .mast nav{flex:1;align-self:stretch;align-items:center;gap:40px}body.play-library .mast nav>a[aria-current]{position:relative;color:var(--red);font-weight:650}body.play-library .mast nav>a[aria-current]:after{content:'';position:absolute;bottom:-13px;left:-8px;right:-8px;height:3px;background:var(--red);border-radius:2px}.library-top-actions{margin-left:auto}.library-top-actions button{font-size:11px;padding:6px 12px;min-height:34px;background:transparent}.ui-icon{width:19px;height:19px;flex:none;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
.library-shell{max-width:1560px;margin:auto;display:grid;grid-template-columns:204px minmax(0,1fr);min-height:calc(100vh - 64px)}.library-sidebar{padding:20px 12px;background:#ded8ce66;border-right:1px solid var(--line)}.library-sidebar>button{display:flex;align-items:center;width:100%;gap:13px;min-height:42px;margin:0 0 5px;padding:7px 14px;border:0;border-radius:5px;background:transparent;color:var(--ink);justify-content:flex-start;font-size:13px;font-weight:500}.library-sidebar>button.active{background:var(--red);color:var(--paper)}.library-sidebar>button[data-platform].active{background:#cfc6b866;color:var(--ink)}.library-sidebar small{font-size:10px;color:inherit}.sidebar-divider{border-top:1px solid var(--line);margin:22px 5px 16px}.library-sidebar>p{font-size:12px;margin:0 14px 12px}.sidebar-help{display:block;margin:30px 14px;font-size:11px;color:var(--muted);text-decoration:none}
body.play-library .web-library{position:relative;width:100%;max-width:none;margin:0;align-self:start;padding:20px 24px 12px}.library-heading{position:relative;display:flex;align-items:center;gap:28px;height:44px;margin:0 0 12px!important;padding-right:350px}.library-heading h1{font-size:28px!important;line-height:1.2;margin:0;white-space:nowrap;font-weight:750;letter-spacing:0}.library-heading .catalog-search{min-width:150px;flex:1}.catalog-search{position:relative;gap:0}.catalog-search>.ui-icon{position:absolute;left:12px;top:12px;width:17px;height:17px;color:var(--muted);pointer-events:none}body.play-library .catalog-search input{background:#f8f5ef70;border-radius:6px;width:100%;min-height:40px;padding:7px 14px 7px 38px;font-size:12px}.catalog-search #clear{position:absolute;right:5px;top:5px;min-height:30px;font-size:10px;padding:2px 8px;border:0;background:var(--paper)}

body.play-library .catalog-tools{display:flex;align-items:center;gap:9px;padding-right:350px;margin-bottom:18px;flex-wrap:wrap;min-height:32px}body.play-library .catalog-tools>#platform{width:103px;min-width:103px;flex:none;min-height:32px;font-size:11px;padding:4px 9px;background:var(--red);color:var(--paper);border-color:var(--red);border-radius:6px}.quick-filters{display:flex;gap:8px;flex:none}.quick-filters button{background:#f8f5ef60;min-height:30px;font-size:11px;padding:4px 12px;border-radius:5px;font-weight:500}.quick-filters button[aria-pressed=true]{background:var(--red);color:var(--paper);border-color:var(--red)}.advanced-filter{position:relative;border:0;margin-left:auto}.advanced-filter>summary{font-size:10px;color:var(--blue);padding:4px 0;min-height:30px;align-content:center;list-style:none}.advanced-filter>div{position:absolute;top:35px;right:0;z-index:8;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:350px;padding:12px;border:1px solid var(--line);background:var(--paper);border-radius:7px;box-shadow:0 8px 24px #25252824}.advanced-filter select{width:100%;font-size:11px;min-width:0!important;min-height:36px;background:var(--paper)}
body.play-library .library-state{display:flex;align-items:center;justify-content:space-between;min-height:0;margin:0 0 10px;gap:8px}.library-state p{font-size:10px;line-height:1.4;margin:0;color:var(--muted)}.library-state button{font-size:10px;padding:0;min-height:24px;background:none;border:0}.notice:empty{display:none!important}body.play-library #notice{font-size:11px;min-height:0;margin:0 0 10px}#active-filters{margin:0 0 8px;font-size:10px}#active-filters button{border:0;background:none;font-size:10px;padding:0 6px;min-height:26px}
body.play-library .web-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px 19px}body.play-library .web-game{position:relative;min-width:0;border:0;background:none;border-radius:0;overflow:visible}.web-game .cover{position:relative!important;aspect-ratio:1.16!important;height:auto!important;display:block!important;overflow:hidden;border-radius:4px;background:var(--paper);box-shadow:0 2px 5px #25252818}.web-game img{display:block;width:100%;height:100%;object-fit:contain}.cover-placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:14px;text-align:center;font-size:15px!important;font-weight:600;letter-spacing:0!important;color:var(--red)!important;background:var(--paper)}.cover-placeholder:after{content:'RETRO POCKET';position:absolute;bottom:12px;left:0;right:0;font-size:7px;letter-spacing:2px;color:var(--muted);font-weight:400}
body.play-library .web-game .copy{padding:6px 1px 0;min-height:43px}.web-game h2{font-size:15px!important;font-weight:650;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.web-game p{font-size:12px!important;line-height:1.5;margin:2px 0 0!important;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.web-game .card-open{position:absolute;inset:0;z-index:2;border:0;background:transparent!important;padding:0;border-radius:4px}.card-open>svg{position:absolute;right:9px;bottom:60px;width:31px;height:31px;border-radius:50%;padding:9px;background:var(--paper);color:var(--red);opacity:0;box-shadow:0 2px 8px #0003;fill:currentColor}.web-game:hover .card-open>svg,.card-open:focus-visible>svg{opacity:1}.web-game:focus-within .cover,.web-game:hover .cover{box-shadow:0 3px 12px #25252830}.card-open.unavailable{inset:auto 0 0!important;font-size:10px!important;min-height:24px!important;padding:0!important;justify-content:flex-start;color:var(--muted)!important}.web-game:has(.unavailable) .copy{min-height:63px}.cover-status{position:absolute;right:5px;top:5px;z-index:3;padding:0 5px;border:1px solid #ffffff90;border-radius:3px;background:#f8f5efdb;color:var(--ink);font-size:10px;line-height:17px;pointer-events:none}body.play-library #more{display:flex;margin:8px 0 0 auto;font-size:11px;min-height:30px;padding:2px 0;border:0;background:none}.library-foot{font-size:10px!important;margin:20px 0 0!important;color:var(--muted)}.web-help{margin-top:14px;border-color:var(--line)}.web-help summary{font-size:11px;padding:8px 0}.web-help p{font-size:11px;color:var(--muted)}body.play-library>footer{display:none;max-width:none;padding:12px 28px;font-size:10px;min-height:52px;margin:0;border-top:1px solid var(--line)}body.play-library>footer p{font-size:10px;margin:0}
/* Gameplay material stays inside the original, independently saved touch rectangles. */
body.play-library #player{background:#202124}body.play-library .player-bar{background:#202124;color:var(--paper);padding:5px 18px;min-height:38px}.player-bar button{background:transparent;color:var(--paper);border-color:#ffffff45;min-height:28px;font-size:10px;padding:3px 8px}.player-bar h2{font-size:12px}.player-bar #leave{border:0;padding-left:0}.player-bar #touch-toggle{border:0}#touch-toggle[aria-pressed=true]{color:var(--paper)}body.play-library .player-hint{display:block;background:#202124;color:#cec9c1;text-align:left;padding:4px 18px;font-size:10px}.touch-hidden #controls{display:none!important}#player.touch-hidden .screen{width:100%;height:100%}body.play-library .touch-controls{background:var(--shell)}body.play-library .round-stick .direction-thumb,body.play-library .analog span{background:radial-gradient(ellipse at 30% 15%,#ffffff30,transparent 65%),linear-gradient(150deg,#53545c,var(--controller-base));box-shadow:inset 0 2px 1px #ffffff40,inset 0 -3px 3px #0005,0 5px 0 #15151a,0 8px 8px #0008}.actions button.turbo{--cap:var(--controller-teal)}
body.play-library .system button{background:transparent!important;border:0;box-shadow:none;color:var(--ink);padding-top:24px;padding-bottom:0;font-size:9px;line-height:12px;text-shadow:0 1px #ffffff90}.system button:after{display:none!important}body.play-library .system button:before{content:'';position:absolute;width:34px;height:13px;inset:6px auto auto 50%;transform:translateX(-50%);border-radius:9px;border:2px solid #6d6d6a;background:linear-gradient(#45464a,#252528);box-shadow:0 2px 1px #0005,inset 0 1px #ffffff55}.system button.pressed:before{top:8px;background:#252528;box-shadow:inset 0 2px 2px #0006}.stage.overlay .system button{color:var(--paper)!important;text-shadow:0 1px 2px #000!important}
body.play-library #menu{width:min(410px,calc(100vw - 24px));border-radius:9px;background:var(--paper);border:1px solid #c9c2b7;max-height:calc(100dvh - 20px)}#menu::backdrop{background:#101216a6;backdrop-filter:blur(2px)}body.play-library .pause-header{gap:10px;padding:12px 16px;border-color:var(--line);background:var(--paper)}.menu-cover{width:35px;height:40px;object-fit:contain;border-radius:3px}.pause-heading{flex:1}.pause-indicator{font-size:9px;margin-bottom:3px;letter-spacing:0}#menu-title{font-size:15px!important;max-width:190px}.pause-header #resume{min-height:34px;padding:6px 12px;font-size:11px;border-radius:4px}.pause-body{padding:0 16px 8px;display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.pause-section{padding:9px 0;border:0}.pause-section h3{font-size:10px;margin:0 0 5px;color:var(--ink);font-weight:500}.pause-section .menu-actions{display:grid;grid-template-columns:1fr;gap:4px}.menu-actions button{justify-content:flex-start;min-height:30px;padding:4px 8px;border:1px solid var(--line);border-radius:3px;font-size:11px;font-weight:400;background:transparent}.menu-actions button .ui-icon{width:14px;height:14px}.menu-actions button:after{content:'›';color:var(--muted);margin-left:auto;font-size:16px}.pause-body>#menu-status,.pause-body>.save-tools,.pause-body>#layout-settings,.pause-body>.save-note{grid-column:1/-1}#menu .save-tools{margin:0;border-top:1px solid var(--line)}#menu .save-tools>summary,#menu #layout-settings>summary{padding:7px 0;min-height:32px;font-size:11px;list-style:none;position:relative}#menu .save-tools>summary:after,#menu #layout-settings>summary:after{content:'⌄';position:absolute;right:4px}#menu #layout-settings{border-top:1px solid var(--line);border-bottom:0}.save-note{display:none}#menu .save-tools .save-note{display:block}.pause-footer{padding:8px 16px;background:transparent;border-color:var(--line)}.pause-footer>span{font-size:9px}.pause-footer button{font-size:10px;min-height:28px;border:0;color:var(--blue);padding:2px 0}
@media(max-width:1250px){.feature-strip>div{padding:0 18px}.cover-intro h2{font-size:22px}.cover-copy p br{display:none}.cover-copy p{margin-bottom:20px}.cover-shelf img{height:144px}.ways article{padding:0 17px;gap:13px}.ways h3{font-size:15px}.ways p{font-size:10px}.download-band{padding-left:235px;gap:22px}.download-art{width:220px}.download-heading h2{font-size:19px}.download-heading p{font-size:10px}.library-heading{padding-right:0}body.play-library .catalog-tools{padding-right:0}.library-shell{grid-template-columns:182px minmax(0,1fr)}body.play-library .web-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:950px){body.landing .mast{padding:10px 26px}.hero-copy{padding-left:26px;width:45%}.collection-hero h1{font-size:30px}.hero-actions{gap:18px}.hero-actions .primary{font-size:12px;padding:8px 14px}.collection-hero .intro{font-size:13px}.cover-intro,.ways-section{padding-left:26px;padding-right:26px}.cover-intro{grid-template-columns:1fr 1.35fr;gap:20px}.cover-intro h2{font-size:19px}.cover-copy p{font-size:11px}.cover-shelf{gap:8px;padding-left:0;padding-right:0}.cover-shelf img{height:128px}.ways article{display:block}.way-art{width:125px;height:70px}.download-band{padding:16px 26px;gap:20px}.download-art{display:none}.download-heading h2{font-size:18px}.download-heading p{white-space:normal;max-width:170px}.download-browser,#source{font-size:10px}body.landing footer{padding:10px 26px}.library-shell{grid-template-columns:160px minmax(0,1fr)}body.play-library .mast{gap:35px}body.play-library .mast nav{gap:24px}body.play-library .web-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:17px 14px}.quick-filters{gap:5px}.quick-filters button{padding:3px 9px}.library-sidebar>button{padding-left:10px;gap:9px}}
@media(max-width:650px){body.landing .mast,body.play-library .mast{padding:11px 20px;min-height:59px}.brand small{letter-spacing:1.6px!important}body.landing .mast>nav{display:none}.mobile-menu{display:block;position:relative;border:0;margin-left:auto}.mobile-menu>summary{width:27px;height:30px;padding:6px 3px;display:flex;flex-direction:column;justify-content:space-between;list-style:none}.mobile-menu>summary span{height:2px;background:var(--ink);width:21px}.mobile-menu nav{position:absolute;right:0;top:36px;z-index:10;display:flex;flex-direction:column;min-width:140px;gap:0!important;padding:7px 15px;background:var(--paper);border:1px solid var(--line);border-radius:6px;box-shadow:0 6px 20px #25252822}.mobile-menu nav a{padding:9px 0;font-size:12px!important}
.collection-hero{aspect-ratio:auto;min-height:0;max-height:none;display:flex;flex-direction:column;padding:23px 0 14px}.desktop-scene,.collection-hero:after{display:none}.hero-copy{display:contents}.collection-hero h1{padding:0 23px;font-size:28px;line-height:1.25;order:0;white-space:normal}.collection-hero h1:after{height:3px;width:35px;margin-top:13px}.collection-hero .intro{order:1;font-size:13px;line-height:1.65;margin:12px 23px 8px}.mobile-scene{display:block;position:static;width:100%;height:auto;aspect-ratio:285/155;order:2}.hero-actions{order:3;display:flex;flex-direction:column;gap:0;margin:8px 23px 0}.hero-actions .primary{width:100%;min-height:44px;font-size:13px}.hero-actions .guide-link{order:2;margin-top:27px;font-size:11px}.hero-copy .fine{order:4;position:absolute;left:0;right:0;bottom:44px;text-align:center;font-size:9px;margin:0}.feature-strip{padding:17px 18px 18px;gap:9px}.feature-strip>div{display:flex;flex-direction:column;padding:0!important;gap:8px;text-align:center;border:0}.feature-strip .feature-icon{width:25px;height:27px}.feature-strip b{font-size:9px;white-space:nowrap;font-weight:500}.feature-strip small{display:none}
.cover-intro{display:block;padding:23px 20px 18px}.cover-copy{padding:0}.cover-intro h2{font-size:18px;margin:0 0 10px}.cover-copy p{font-size:11px;line-height:1.7;margin-bottom:14px}.cover-copy .fine{display:none}.cover-display{padding-top:0}.shelf-link{top:-84px;right:0;font-size:9px}.cover-copy h2{padding-right:74px;font-size:17px}.cover-shelf{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;border-bottom:0;box-shadow:none;padding:0}.cover-shelf>a:nth-child(n+3){display:none}.cover-shelf img{height:auto;aspect-ratio:3/3.4;object-fit:contain}.cover-shelf span{font-size:12px;font-weight:600;margin-top:6px}.ways-section{padding:20px}.ways-section h2{font-size:19px}.ways{display:block}.ways article{display:flex;align-items:center;border:0;border-bottom:1px solid var(--line);padding:13px 0!important;gap:18px}.ways article:last-child{border:0}.way-art{width:125px;height:77px}.ways h3{font-size:15px}.ways p{font-size:11px}
.download-band{display:flex;flex-wrap:wrap;padding:22px 20px;gap:15px 20px}.download-heading{flex-basis:100%}.download-heading h2{font-size:19px}.download-heading p{max-width:none}.release{min-width:150px!important}body.landing footer{padding:15px 20px 96px;flex-wrap:wrap;gap:13px}body.landing footer .brand{width:100%}body.landing footer nav{margin:0;gap:20px}body.landing footer>small{display:none}.mobile-download{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:20;align-items:center;justify-content:space-between;padding:10px 20px max(10px,env(safe-area-inset-bottom));gap:15px;background:var(--paper);border-top:1px solid var(--line);box-shadow:0 -3px 12px #2525280b}.mobile-download strong{display:block;font-size:10px;font-weight:500}.mobile-download small{display:block;font-size:9px;color:var(--muted)}.mobile-download .primary{min-height:40px;font-size:12px;padding:7px 20px}.collection-document .section{padding:24px 20px}.collection-document .catalog-grid{grid-template-columns:1fr}
body.play-library .mast{gap:0;justify-content:space-between}.play-library .brand{font-size:14px!important}body.play-library .mast nav{gap:16px;flex:none}.play-library .mast nav>a{display:none}.library-top-actions button{font-size:10px;min-height:34px;padding:4px 8px}.library-shell{display:flex;flex-direction:column}.library-sidebar{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:4px;padding:7px 14px;border-right:0;border-bottom:1px solid var(--line)}.library-sidebar>button{width:auto;min-width:max-content;min-height:34px;padding:4px 9px;font-size:11px;margin:0;gap:6px}.library-sidebar .ui-icon{width:16px;height:16px}.library-sidebar>p,.sidebar-divider,.sidebar-help{display:none}.library-sidebar>button[data-platform]{border:1px solid var(--line)}body.play-library .web-library{padding:18px 16px}.library-heading{height:auto;display:flex;flex-direction:column;align-items:stretch;gap:12px;margin:0 0 10px!important}.library-heading h1{font-size:23px!important}.library-heading .catalog-search{flex:none}.catalog-search input{border-radius:20px!important}.catalog-tools{gap:8px!important;margin-bottom:9px!important}.catalog-tools>#platform{min-width:96px!important;width:96px!important}.quick-filters{gap:6px;flex-wrap:wrap;max-width:calc(100% - 104px)}.quick-filters button{min-height:30px;padding:3px 9px;font-size:10px}.advanced-filter{margin-left:0}.advanced-filter>div{left:0;right:auto;width:min(340px,calc(100vw - 32px))}body.play-library .web-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 14px}.web-game .cover{aspect-ratio:4/3!important}.web-game h2{font-size:15px!important}.web-game p{font-size:11px!important}.web-game .copy{min-height:38px!important}.cover-status{font-size:8px;line-height:15px}.library-foot{font-size:9px!important}body.play-library>footer{padding:12px 16px}.pause-body{grid-template-columns:1fr 1fr!important;column-gap:10px}body.play-library #menu{width:calc(100vw - 24px)}.pause-header{padding:10px 12px!important}.pause-header #resume{font-size:10px;min-height:34px}.menu-cover{width:30px;height:35px}.menu-actions button{font-size:10px!important;padding:4px 6px}.pause-body{padding-left:12px;padding-right:12px}.pause-footer{padding:8px 12px}#menu-title{font-size:14px!important}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media(forced-colors:active){.primary,.cover-status,.library-sidebar>button.active{border:1px solid ButtonText}.control-group button{color:ButtonText!important}.hero-scene{opacity:.3}.cover-placeholder{color:CanvasText!important}}

/* Handheld shell owns gameplay layout; artwork always remains uncropped. */
.cover-shelf img,.web-game img,.menu-cover{object-fit:contain;background:var(--paper)}
.shell-brand,.shell-platform{display:none;pointer-events:none}
#player .stage.handheld{flex-direction:row;background:linear-gradient(180deg,var(--paper),var(--shell));box-shadow:inset 0 3px 1px #fff9,inset 0 -4px 2px #0001}
#player .stage.handheld .screen{margin:8px var(--rail);height:calc(100% - 16px);border-radius:9px;box-shadow:0 0 0 7px var(--controller-base),0 0 0 8px #ffffff45;overflow:hidden}
#player .stage.handheld #controls{position:absolute;inset:0;width:100%;height:100%;background:transparent;pointer-events:none}
#player .stage.handheld .control-group{pointer-events:auto;opacity:1}
#player .stage.handheld .shell-brand,#player .stage.handheld .shell-platform{display:flex;position:absolute;top:38px;width:var(--rail);align-items:center;flex-direction:column;gap:3px;color:var(--muted)}
.shell-brand{left:0}.shell-platform{right:0}.shell-brand b{font:bold italic 26px system-ui;color:var(--red)}.shell-brand small,.shell-platform small{font:6px system-ui;letter-spacing:.7px}.shell-platform b{font:600 11px system-ui}
#player:has(.handheld) #hud-menu{right:calc(var(--rail,140px) + 8px);background:#202124cc;color:var(--paper)}
#player .actions{display:block}
#player .actions button{position:absolute;margin:0}
#player .actions button:nth-child(1){width:38px;height:38px;left:12px;top:3px;--cap:var(--controller-teal)}
#player .actions button:nth-child(2){width:38px;height:38px;right:12px;top:0;--cap:var(--controller-teal)}
#player .actions button:nth-child(3){width:58px;height:58px;left:0;bottom:0}
#player .actions button:nth-child(4){width:58px;height:58px;right:0;bottom:14px}
#player .actions button.turbo{font-size:13px;gap:0}#player .actions button.turbo small{font-size:7px;letter-spacing:0}
#player .stage.handheld .shoulders{width:calc(100% - 44px);left:22px!important;transform:none!important}
#player[data-platform=psp] .stage.handheld .shoulders button{min-width:48px;height:28px;font-size:10px}

/* Complete artwork, softly extended into the mat; no hard blank sidebars. */
.web-game .cover,.shelf-art{position:relative;isolation:isolate;overflow:hidden;background:var(--paper)}
.web-game .cover{aspect-ratio:10/9!important}
.web-game .cover:before,.shelf-art:before{content:'';position:absolute;inset:-18px;background-image:var(--cover-art);background-size:cover;background-position:center;filter:blur(14px);opacity:.48;z-index:-1;pointer-events:none}
.web-game .cover img,.shelf-art img{display:block;position:relative;object-fit:contain;background:transparent}
.shelf-art{height:164px}.shelf-art img{height:100%;width:100%}
#player .stage.handheld{border:2px solid var(--controller-base);border-radius:18px}
#player .stage.handheld .shell-brand,#player .stage.handheld .shell-platform{top:28px}
#player .stage.handheld .shell-brand b{font-size:23px}
#player .dpad.round-stick,#player .analog{border:4px solid #b6b0a5;box-shadow:0 0 0 1px #595951,inset 0 0 0 5px #17171a,inset 0 0 0 7px #ffffff16,0 2px 2px #0003}
#player .round-stick .direction-thumb{width:90px;height:90px;left:23px;top:23px;border:2px solid #101014;box-shadow:inset 0 2px 2px #ffffff20,inset 0 -2px 3px #0006,0 2px 2px #0008}
#player .round-stick button{opacity:.25;font-size:10px}
#player .actions button:nth-child(1),#player .actions button:nth-child(2){top:0}
#player .actions button:nth-child(3){bottom:0}
#player .actions button:nth-child(4){bottom:24px}
@media(max-width:650px){.shelf-art{height:auto;aspect-ratio:10/9}.cover-shelf .shelf-art img{height:100%;aspect-ratio:auto}}

/* Revised controller finish: one fine seat, satin caps and a shallow concave thumb pad. */
#player .control-group button{font-family:system-ui,sans-serif;font-weight:400;text-shadow:none}
#player .control-group button:before{inset:-2px;background:linear-gradient(#aaa69e,#e5e0d7);box-shadow:0 1px 2px #0003,inset 0 0 0 1px #313033;border:0}
#player .control-group button:after{inset:0 0 2px;background:linear-gradient(160deg,#ffffff12,transparent 45%,#0002),var(--cap);border:1px solid #ffffff38;box-shadow:inset 0 -1px 1px #0003,0 1px 0 #2a2326}
#player .control-group button.pressed:after{inset:1px 0 1px;box-shadow:inset 0 1px 2px #0005;background:linear-gradient(#0001,#0002),var(--cap)}
#player .actions button{font-size:22px}
#player .actions button.turbo{font-size:16px;line-height:1}
#player .actions button.turbo small{display:none}
#player .dpad.round-stick,#player .analog{border:2px solid #b5b0a6;background:#242326;box-shadow:0 1px 2px #0003,inset 0 0 0 1px #66635f}
#player .round-stick .direction-thumb{width:102px;height:102px;left:19px;top:19px;border:1px solid #151517;background:radial-gradient(ellipse at 50% 40%,#353639 0%,#3e3f42 66%,#28282b 100%);box-shadow:inset 0 1px 1px #ffffff25,0 1px 2px #0008}
#player .analog span{width:76%;height:76%;border:1px solid #151517;background:radial-gradient(ellipse at 50% 40%,#353639,#3e3f42 66%,#28282b);box-shadow:inset 0 1px 1px #ffffff25,0 1px 2px #0008}
#player .round-stick button{opacity:0}
body.play-library #player .system button{font-size:8px;letter-spacing:.3px;text-shadow:none}
#player .system button:before{width:30px;height:10px;border:1px solid #97938c;background:linear-gradient(#444447,#28282b);box-shadow:0 1px 1px #0002,inset 0 1px 0 #ffffff22}
/* Dialog actions are buttons: icon, named action and an explicit boundary. */
body.play-library #menu{width:min(452px,calc(100vw - 24px));border-radius:12px;border-color:var(--line)}
#menu .pause-header{padding:12px 16px}
#menu .pause-header #resume{min-height:38px;border:1px solid var(--red);border-radius:6px}
#menu .pause-section h3{font-size:11px;margin-bottom:7px}
#menu .menu-actions{gap:7px}
#menu .menu-actions button{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:39px;padding:7px 10px;font-size:12px;border:1px solid var(--line);border-radius:6px;background:#f1ede6;color:var(--ink)}
#menu .menu-actions .ui-icon{width:18px;height:18px;color:var(--ink);stroke-width:1.7}
#menu .menu-actions button:hover,#menu .menu-actions button:focus-visible{border-color:var(--red);background:#f0e5e5}
#menu .menu-actions button:after{font-size:17px;color:var(--muted)}
#menu #layout-settings>summary,#menu .save-tools>summary{padding:10px 0;min-height:40px;display:flex;align-items:center;gap:8px}
#menu .pause-footer #exit-game,#menu #reset-layout,#overwrite button,#pack-close{border:1px solid var(--line);border-radius:6px;background:var(--paper);min-height:36px;padding:7px 11px;font-size:11px;display:inline-flex;align-items:center;gap:7px}
#overwrite #overwrite-accept{background:var(--red);border-color:var(--red);color:var(--paper)}
#menu #layout-settings select{border:1px solid var(--line);border-radius:6px;background:var(--paper);min-height:40px}
#menu .check-label{padding:9px 10px;border:1px solid var(--line);border-radius:6px;min-height:42px;background:var(--paper)}
#menu .check-label:has(input:checked){border-color:var(--red);background:#f0e5e5}
@media(max-height:420px){#menu .pause-header{padding:9px 14px}#menu .pause-section{padding:8px 0}#menu .menu-actions button{min-height:36px;font-size:11px;padding:6px 8px}}

#menu .menu-actions button:after{display:none}#menu .menu-actions .menu-chevron{width:12px;height:12px;margin-left:auto;color:var(--muted)}
#menu .pause-header #resume{display:flex;align-items:center;gap:7px}#menu .pause-header #resume .ui-icon{width:14px;height:14px}
#menu #resume>span{display:none}#menu #layout-settings summary:after,#menu .save-tools summary:after{content:'⌄'}
#menu .pause-footer .ui-icon,#overwrite .ui-icon,#pack-close .ui-icon{width:16px;height:16px}
#player .system button:before{inset:6px auto auto 50%;transform:translateX(-50%)}

/* Persistent escape in immersive play: opaque surface, readable label, safe hit area. */
#player #hud-menu{display:flex;align-items:center;justify-content:center;gap:6px;min-width:76px;min-height:44px;padding:7px 10px;border:1px solid #55545a;border-radius:8px;background:#252528;color:#f8f5ef;opacity:1;font:500 11px system-ui,sans-serif;z-index:50;box-shadow:0 2px 6px #0002}
#player #hud-menu .ui-icon{width:14px;height:14px;stroke-width:1.8}#player #hud-menu[hidden]{display:none}
/* The shell is one object: curved ivory rails, polished perimeter and inset graphite glass. */
#player .stage.handheld{background:linear-gradient(90deg,#b9b5ac 0%,#f5f2ea 2%,#e9e4da calc(var(--rail) - 10px),#aaa69e var(--rail),#252528 var(--rail),#252528 calc(100% - var(--rail)),#aaa69e calc(100% - var(--rail)),#eeebe3 calc(100% - var(--rail) + 12px),#eeebe3 97%,#d5d0c7 100%);border:2px solid #363936;border-radius:21px;box-shadow:inset 0 1px 0 #ffffffc0,inset 1px 0 1px #e3e0d5,inset -1px 0 1px #a6a59b,inset 0 -2px 2px #0002}
#player .stage.handheld .screen{box-shadow:0 0 0 6px #272b29,0 0 0 7px #8a8981,inset 0 0 3px #000a;border-radius:7px}
#player .stage.handheld .shell-brand,#player .stage.handheld .shell-platform{text-shadow:0 1px #fff4}

/* Physical surfaces are production assets, kept separate from labels and touch geometry. */
.hardware-ready #player .stage.handheld{background:var(--shell);border:0;border-radius:0;box-shadow:none}
.hardware-shell{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}
.hardware-shell[hidden]{display:none}
.hardware-ready #player .stage.handheld .screen{position:relative;z-index:1;box-shadow:none;border-radius:3px}
.hardware-ready #player .stage.handheld #controls{z-index:2}
.hardware-ready #player .stage.handheld .shell-brand,.hardware-ready #player .stage.handheld .shell-platform{z-index:3}
.hardware-ready #player .actions button.hardware-control:before,.hardware-ready #player .actions button.hardware-control:after{display:none!important}
.hardware-ready #player .actions button.hardware-control{isolation:isolate;background:transparent!important;box-shadow:none;border:0!important;font-size:22px;padding-bottom:5px}
.hardware-key,.hardware-face{position:absolute;inset:0;z-index:-1;pointer-events:none}
.hardware-face{clip-path:circle(37.5% at 50% 44.5%)}
.pressed>.hardware-face{transform:translateY(2px);filter:brightness(.86)}
.hardware-ready #player .actions button.turbo{font-size:15px}
.hardware-ready #player .dpad.round-stick,.hardware-ready #player .analog{position:absolute;border:0;background:transparent;box-shadow:none;overflow:visible}
.hardware-mount{display:none;position:absolute;inset:0;pointer-events:none;z-index:0}
.hardware-ready #player .round-stick .hardware-mount,.hardware-ready #player .analog .hardware-mount{display:block}
.hardware-ready #player .round-stick .direction-thumb,.hardware-ready #player .analog>span{position:absolute;width:74%;height:74%;left:13%;top:13%;border:0;background-color:transparent;box-shadow:none;z-index:1}
.hardware-ready #player .round-stick button{position:relative;z-index:2}

/* A recessed utility key in the hardware rail, clear of the game image. */
#player #hud-menu{min-width:76px;min-height:44px;border-radius:22px;border:1px solid #a49d91;background:#f7f3e9;color:#343532;box-shadow:0 2px 3px #171b1b38,inset 0 1px #fff;top:8px;right:max(10px,env(safe-area-inset-right));gap:6px;letter-spacing:.04em}
#player:has(.handheld) #hud-menu{right:calc((var(--rail) - 76px)/2);background:#f7f3e9;color:#343532}
#player #hud-menu:hover,#player #hud-menu:focus-visible{background:#fffaf1;border-color:var(--red)}
#player .shell-platform{top:62px}

#player .stage.handheld .shell-brand,#player .stage.handheld .shell-platform{width:80px;padding:4px 3px;border-radius:7px;background:#f3eee3ed;box-shadow:inset 0 1px #fff9}
#player .stage.handheld .shell-brand{left:calc((var(--rail) - 80px)/2);top:22px}
#player .stage.handheld .shell-platform{right:calc((var(--rail) - 80px)/2);top:62px}

#player .stage.handheld .system button:after{content:'';display:block!important;position:absolute;inset:23px 0 0;border:0;border-radius:4px;background:#f3eee3ef;box-shadow:none;z-index:-1}

/* Compact physical utility key; consistent in the browser and Android. */
#player #hud-menu,#player:has(.handheld) #hud-menu{border:1px solid #858179;border-radius:6px;background:var(--controller-base);color:var(--paper);box-shadow:0 2px 2px #15171966,inset 0 1px #ffffff26,inset 0 -2px #0005;letter-spacing:.02em}
#player #hud-menu:hover,#player #hud-menu:focus-visible{background:#353638;border-color:#b3ada2}
#player #hud-menu:active{box-shadow:inset 0 2px 3px #0008;transform:translateY(1px)}
.keyboard-only,.keyboard-shortcut,#keyboard-guide{display:none}
.keyboard-controls .keyboard-only,.keyboard-controls #keyboard-guide{display:block}
.keyboard-controls #player .actions .keyboard-shortcut{display:block;position:absolute;bottom:-8px;left:50%;transform:translateX(-50%);z-index:3;padding:1px 5px;border:1px solid #b8b1a4;border-radius:3px;background:#f8f5ef;color:#343532;white-space:nowrap;font:500 9px/14px ui-monospace,monospace;box-shadow:0 1px #0002;pointer-events:none}
.keyboard-controls #player .actions .keyboard-held>.hardware-face{transform:translateY(2px);filter:brightness(.86)}
#keyboard-help{margin-top:12px;border-top:1px solid var(--line);padding-top:8px}
#keyboard-help summary{cursor:pointer;min-height:32px;font-size:12px;display:flex;align-items:center}
#keyboard-bindings{display:grid;gap:6px;padding:8px 0;font-size:12px}
#keyboard-bindings>div{display:flex;align-items:center;justify-content:space-between;gap:12px}
#keyboard-bindings kbd{font:11px ui-monospace,monospace;background:var(--shell);border:1px solid var(--line);border-bottom-width:2px;border-radius:3px;padding:3px 6px}
#player #start-keyboard{font-size:12px;color:#d3d0c9;margin:4px 0 14px}

#room-lobby{width:min(520px,calc(100vw - 24px));padding:18px;max-height:calc(100dvh - 24px)}
#room-lobby h2{font-size:17px;margin:0}#room-lobby h3{font-size:13px;margin:14px 0 8px}.room-note,#room-results{font-size:11px;line-height:1.7;color:var(--muted)}
#room-status{font-size:12px;min-height:30px;padding:8px 10px;background:var(--shell);border-radius:5px}
.room-search,.room-join,#room-share{display:flex;gap:8px;align-items:center}.room-search input,.room-join input{flex:1;min-width:0;font-size:13px}
#room-share[hidden]{display:none}#room-share-code{font:700 23px ui-monospace,monospace;letter-spacing:3px;user-select:text}
#room-games{display:grid;gap:4px;max-height:170px;overflow:auto;margin-bottom:10px}#room-games button{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:40px;text-align:left;font-size:12px;padding:6px 10px}#room-games small{font-size:10px;color:var(--muted)}#room-games button[aria-pressed=true]{border-color:var(--red);background:#873c4b0d}
#room-status-live{position:absolute;z-index:5;left:50%;transform:translateX(-50%);top:6px;padding:3px 8px;border-radius:4px;background:#171b1cce;color:#fff;font-size:10px;pointer-events:none}
#remote-paused{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:6;padding:8px 16px;border-radius:6px;background:#171b1ce8;color:#fff;font-size:13px;pointer-events:none}
#remote-paused[hidden],#room-status-live[hidden]{display:none}
/* Complete controller themes: surface atlas, engraved rails and readable hardware labels. */
#player{--skin-panel-text:#716d68;--skin-badge:#f3eee3;--skin-main-text:#fff;--skin-aux-text:#fff;--skin-system-face:#252528;--skin-system-text:#252528;--skin-accent:#873c4b}
.hardware-ready #player .actions button,.hardware-ready #player .actions button span{color:var(--skin-main-text)!important}
.hardware-ready #player .actions button[data-skin-auxiliary=true],.hardware-ready #player .actions button[data-skin-auxiliary=true] span{color:var(--skin-aux-text)!important}
#player .stage.handheld .shell-brand,#player .stage.handheld .shell-platform{color:var(--skin-panel-text);background:var(--skin-badge);text-shadow:none;box-shadow:inset 0 1px #ffffff25}
#player .shell-brand b{color:var(--skin-accent)}
body.play-library #player .system button{color:var(--skin-system-text);text-shadow:none}
#player .system button:before{background:linear-gradient(#ffffff20,#0003),var(--skin-system-face);border-color:var(--skin-accent)}
#player .stage.handheld .system button:after{background:var(--skin-badge)}
#player #hud-menu,#player:has(.handheld) #hud-menu{background:var(--skin-system-face);border-color:var(--skin-accent);color:#fff}
#player .dpad:not(.direction-stick) button,#player .shoulders button{background:var(--skin-system-face);border-color:var(--skin-accent);color:#fff}

#player[data-controller-theme^="skin-"] .shell-brand,#player[data-controller-theme^="skin-"] .shell-platform{display:none!important}
#skin-library{margin:12px 0;padding:10px 0;border-top:1px solid var(--line)}.skin-library-toolbar{display:flex;align-items:center;gap:10px;justify-content:space-between}.skin-library-toolbar p{font-size:11px;min-height:32px;margin:8px 0}#skin-refresh{font-size:11px;white-space:nowrap}#online-skins{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#online-skins article{border:1px solid var(--line);border-radius:7px;padding:8px;min-width:0}#online-skins strong{display:block;font-size:11px;margin:7px 0;font-weight:500}#online-skins button{font-size:11px;width:100%;min-height:36px}#online-skins .online-skin-art{display:flex;height:110px;gap:4px;border-radius:5px;overflow:hidden;background:#172027}#online-skins img{width:50%;height:100%;object-fit:cover}

/* Compact tool cap: 32px visible, 44px touch target. Always reachable. */
#player #hud-menu,#player:has(.handheld) #hud-menu{width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:10px;background:transparent;box-shadow:none;color:#f8f5ef;isolation:isolate}
#player:has(.handheld) #hud-menu{right:calc((var(--rail) - 44px)/2)}
#player #hud-menu::before{content:"";position:absolute;inset:6px;z-index:-1;border:1px solid var(--skin-accent,#858179);border-radius:10px;background:var(--skin-system-face,var(--controller-base));opacity:.88;box-shadow:0 1px 2px #0002}
#player #hud-menu .ui-icon{width:18px;height:18px;flex:none}
#player #hud-menu:hover::before,#player #hud-menu:focus-visible::before{opacity:1}
#player #hud-menu:active::before{transform:translateY(1px)}
#player #hud-menu:focus-visible{outline:2px solid #f8f5ef;outline-offset:1px}

#player #hud-menu:hover,#player #hud-menu:focus-visible,#player #hud-menu:active{background:transparent;border:0;box-shadow:none;transform:none}

/* Skin collection: first-level menu destination, editorial cards using the shared shell tokens. */
.skin-store-entry{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;text-align:left;border:1px solid var(--line);border-radius:10px;background:var(--paper);margin:0 0 14px}.skin-store-entry>span:nth-child(2){flex:1}.skin-store-entry b{display:block;font-size:13px;font-weight:600}.skin-store-entry small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.skin-entry-mark{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--line);border-radius:9px;color:var(--red);font-size:20px}#skin-store{width:min(880px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--paper);color:var(--ink);overflow:auto}#skin-store::backdrop{background:#15181bb3;backdrop-filter:blur(5px)}.skin-store-head{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--line);padding-bottom:14px;gap:16px}.skin-store-head h2{font-size:20px;margin:3px 0;font-weight:650}.skin-store-head p{font-size:12px;color:var(--muted);margin:0}.skin-store-head .skin-eyebrow{font-size:10px;color:var(--red);letter-spacing:.12em}.skin-store-head button{width:36px;height:36px;font-size:22px;padding:0;border-radius:8px}.skin-store-footer{margin:16px 0 0;padding-top:12px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}#skin-store #skin-library{margin:0;border:0;padding:0}#skin-store #skin-library>summary{display:none}#skin-store #online-skins{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}#skin-store #online-skins article{padding:0;overflow:hidden;border-radius:10px;background:var(--shell);border:1px solid var(--line)}#skin-store #online-skins article[data-selected=true]{border-color:var(--red)}#skin-store #online-skins .online-skin-art{height:150px;gap:0;border-radius:0}#skin-store #online-skins .skin-card-info{display:flex;align-items:center;gap:8px;padding:11px}#skin-store #online-skins .skin-card-info>div{min-width:0;flex:1}#skin-store #online-skins strong{font-size:12px;font-weight:600;line-height:1.5;margin:0 0 5px}#skin-store #online-skins small{display:block;font-size:10px;color:var(--muted);line-height:1.5}#skin-store #online-skins button{width:auto;min-width:48px;min-height:34px;font-size:11px;white-space:nowrap;padding:5px 10px}#skin-store #online-skins button:disabled{opacity:.6}#skin-store .check-label{font-size:11px;margin:4px 0 14px}#skin-store .skin-empty{grid-column:1/-1;color:var(--muted);padding:20px;text-align:center}@media(max-width:700px){#skin-store #online-skins{grid-template-columns:repeat(2,minmax(0,1fr))}#skin-store{padding:14px}.skin-store-head h2{font-size:18px}#skin-store #online-skins .online-skin-art{height:132px}}@media(max-width:390px){#skin-store #online-skins{grid-template-columns:1fr}#skin-store #online-skins .online-skin-art{height:156px}}@media(max-height:480px) and (min-width:600px){#skin-store #online-skins .online-skin-art{height:100px}.skin-store-head{padding-bottom:10px}#skin-store{padding:14px}.skin-store-head>div>p:last-child{display:none}}

/* Character collection: a quiet tool shell around one clear portrait stage. */
/* Character collection: quiet gallery with a dedicated action stage. */
#character-skins{width:min(880px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--line);border-radius:14px;background:var(--paper);color:var(--ink);overflow:hidden}#character-skins::backdrop{background:#15181bb3;backdrop-filter:blur(5px)}.character-store-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 22px;border-bottom:1px solid var(--line)}.character-store-heading .skin-eyebrow{font-size:10px;color:var(--muted);margin:0 0 4px}.character-store-heading h2{font-size:18px;font-weight:650;line-height:1.3;margin:0}.character-store-heading>div:last-child{display:flex;gap:4px}.character-store-heading button{width:40px;height:40px;min-height:40px;padding:0;border:0;background:transparent;color:var(--muted);font-size:22px}.character-store-body{display:grid;grid-template-columns:260px minmax(0,1fr);height:min(400px,calc(100dvh - 195px));min-height:180px}.character-showcase{padding:18px 22px;background:var(--shell);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;overflow:auto}.character-stage{position:relative;flex:1;min-height:70px;max-height:235px;background:radial-gradient(ellipse at 50% 85%,#d8cfc360,transparent 65%)}.character-stage:after{content:'';position:absolute;bottom:0;left:18%;right:18%;border-bottom:1px solid var(--line)}.character-stage canvas{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}#character-preview-empty{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;color:var(--muted);pointer-events:none}#character-preview-empty span{font:22px ui-monospace,monospace;color:var(--red)}.character-showcase h3{font-size:14px;line-height:1.5;margin:14px 0 6px}.character-showcase p{font-size:11px;color:var(--muted);line-height:1.7;margin:0 0 8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.character-showcase small{font-size:10px;color:var(--muted)}#character-pose-controls{display:flex;gap:4px;margin-top:14px}#character-pose-controls button{flex:1;min-width:0;min-height:34px;font-size:10px;padding:4px;background:transparent;border-color:var(--line);color:var(--muted)}#character-pose-controls button[aria-pressed=true]{background:var(--paper);border-color:var(--red);color:var(--red)}.character-collection{display:flex;flex-direction:column;min-width:0;min-height:0;padding:18px 20px}.character-search{display:flex;align-items:center;position:relative}.character-search input{width:100%;min-width:0;min-height:38px;font-size:12px;padding-right:36px;background:var(--paper)}.character-search .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.character-search button{position:absolute;right:1px;top:1px;width:36px;height:36px;min-height:36px;padding:0;border:0;background:transparent}.character-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0 12px}.character-toolbar>div{display:flex;gap:4px}.character-toolbar button{font-size:11px;padding:5px 10px;min-height:32px;border:0;background:transparent;color:var(--muted)}.character-toolbar button[aria-pressed=true]{background:var(--shell);color:var(--red)}.character-toolbar small{font-size:10px;color:var(--muted)}#character-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:10px;overflow:auto;min-height:0;padding:4px;scrollbar-gutter:stable;flex:1}.character-card{position:relative;display:flex;align-items:center;gap:10px;padding:12px 10px!important;min-height:88px;min-width:0;width:100%;text-align:left;background:var(--paper);border:1px solid var(--line);border-radius:9px}.character-card:hover{background:var(--shell)}.character-card[aria-pressed=true]{border-color:var(--red);background:#873c4b06}.character-card img{flex:none;width:60px;height:60px;object-fit:contain}.character-card>span:first-of-type{flex:1;min-width:0}.character-card b{display:block;font-size:12px;line-height:1.55;font-weight:600;overflow-wrap:anywhere}.character-card small{display:block;font-size:10px;color:var(--muted);font-weight:400;line-height:1.5;margin-top:5px}.character-select-mark{position:absolute;right:7px;top:4px;font-size:11px;color:var(--red)}.character-empty{grid-column:1/-1;padding:24px 12px;color:var(--muted);font-size:12px;line-height:1.7}.character-store-footer{padding:14px 22px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;background:var(--paper)}.character-store-footer>div:first-child{flex:1;min-width:0}.character-store-footer small{font-size:10px;color:var(--muted)}#character-result{font-size:11px;line-height:1.6;margin:4px 0 0;color:var(--muted)}#character-result.is-error{color:var(--danger)}#character-progress{width:100%;height:3px;margin-top:6px;accent-color:var(--red)}.character-commit{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.character-commit button{font-size:11px;min-height:40px;padding:7px 14px}.character-commit button.primary{background:var(--red);color:var(--paper);border-color:var(--red)}#character-original{border-color:transparent;background:transparent;color:var(--muted)}.character-commit button:disabled{opacity:.5}
@media(max-width:650px) and (min-height:501px){#character-skins{width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}.character-store-heading{padding:13px 16px}.character-store-heading .skin-eyebrow{display:none}.character-store-body{display:flex;flex-direction:column;height:min(555px,calc(100dvh - 205px));min-height:250px}.character-showcase{display:grid;grid-template-columns:116px minmax(0,1fr);gap:0 16px;padding:14px 16px;border-right:0;border-bottom:1px solid var(--line);flex:none;overflow:visible}.character-stage{grid-row:1/5;height:130px;min-height:0}.character-showcase h3{margin:2px 0 5px}.character-showcase p{-webkit-line-clamp:2;font-size:10px;line-height:1.6;margin-bottom:5px}.character-showcase small{font-size:9px}#character-pose-controls{margin-top:7px;gap:3px}#character-pose-controls button{font-size:9px;min-height:30px}.character-collection{flex:1;padding:12px 16px}.character-toolbar{margin:5px 0 8px}#character-cards{grid-template-columns:1fr;gap:7px}.character-card{min-height:70px;padding:8px 12px!important}.character-card img{width:50px;height:50px}.character-store-footer{padding:10px 16px;gap:8px;flex-direction:column;align-items:stretch}.character-store-footer>div:first-child{display:flex;align-items:center;gap:10px;flex-wrap:wrap}#character-current{font-size:9px}#character-result{font-size:10px;margin:0}.character-commit{flex-wrap:nowrap;gap:5px}.character-commit button{padding:6px 10px;min-height:38px}.character-commit .primary{margin-left:auto}}
@media(max-height:500px){.character-store-heading{padding:7px 16px}.character-store-heading .skin-eyebrow{display:none}.character-store-heading h2{font-size:16px}.character-store-body{height:calc(100dvh - 142px);min-height:115px;grid-template-columns:215px minmax(0,1fr)}.character-showcase{padding:9px 16px}.character-stage{min-height:52px;max-height:125px}.character-showcase h3{font-size:12px;margin:7px 0 4px}.character-showcase p{display:none}.character-showcase small{font-size:9px}#character-pose-controls{margin-top:9px}#character-pose-controls button{min-height:29px}.character-collection{padding:10px 14px}.character-search input{min-height:34px}.character-toolbar{margin:5px 0 7px}.character-toolbar button{min-height:28px}.character-card{min-height:65px;padding:7px 9px!important;gap:7px}.character-card img{width:44px;height:44px}.character-card b{font-size:11px}.character-card small{font-size:9px;margin-top:3px}.character-store-footer{padding:9px 16px;gap:10px}#character-current{display:none}.character-commit button{min-height:36px;padding:5px 10px}}
@media(forced-colors:active){.character-card[aria-pressed=true]{outline:2px solid Highlight}}

/* Collection shelf: one scroll owner, compact caps and persistent first-level favorites. */
body.play-library .library-heading{height:auto;min-height:48px;padding-right:0;gap:18px;margin-bottom:14px!important}
.recent-shelf{margin:0 0 18px;min-width:0}.recent-heading{display:flex;align-items:center;justify-content:space-between;min-height:40px;gap:12px}.recent-heading h2{font-size:15px;font-weight:650;margin:0}.recent-arrows{display:flex;gap:4px}.recent-arrows button{width:40px;min-height:40px;padding:9px;border:0;background:transparent}.recent-arrows button:hover:not(:disabled){background:var(--paper)}.recent-arrows button:disabled{opacity:.35;cursor:default}
.recent-track{display:flex;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;padding:3px 1px 9px;min-width:0;scroll-padding:1px}.recent-track .recent-item{display:flex;align-items:center;gap:12px;flex:0 0 260px;text-align:left;min-width:0;min-height:84px;padding:10px 12px;border:1px solid var(--line);border-radius:6px;background:var(--paper);scroll-snap-align:start;color:var(--ink)}.recent-item:hover:not(:disabled){border-color:var(--red)}.recent-item img{flex:none;width:48px;height:60px;object-fit:contain}.recent-copy{flex:1;min-width:0}.recent-copy strong{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recent-copy small{display:block;font-size:11px;color:var(--muted);margin-top:5px}.recent-play-icon{width:16px;height:16px;color:var(--red)}
body.play-library .web-game .card-favorite{position:absolute;z-index:4;right:5px;top:5px;width:44px;min-height:44px;display:grid;place-items:center;padding:11px;border:0;border-radius:6px;background:transparent;color:var(--muted)}.card-favorite:before{content:'';position:absolute;inset:6px;background:var(--paper);border:1px solid var(--line);border-radius:5px}.card-favorite .ui-icon{position:relative;width:18px;height:18px}.card-favorite[aria-pressed="true"]{color:var(--red)!important}.card-favorite[aria-pressed="true"] .ui-icon{fill:currentColor}.card-favorite:hover:before{border-color:var(--red)}.card-favorite:disabled{opacity:.5}
@media(max-width:650px){.recent-track{gap:10px}.recent-track .recent-item{flex-basis:242px;min-height:78px;padding:8px 10px}.recent-item img{width:42px;height:54px}.recent-heading h2{font-size:14px}.recent-arrows button{width:44px;min-height:44px}.recent-shelf{margin-bottom:14px}body.play-library .library-sidebar>button{min-height:44px}body.play-library .library-top-actions button{min-height:44px}}

body.play-library .catalog-tools{padding-right:0}

/* Dialog chrome shares compact controls; each dialog retains its focus/scroll owner. */
body.play-library dialog{border-color:var(--line);border-radius:12px;background:var(--paper);color:var(--ink);box-shadow:none}
body.play-library dialog::backdrop{background:#25252880}
body.play-library dialog>h2,body.play-library dialog>header h2{font-size:17px;line-height:1.35}
body.play-library #menu .menu-actions button{min-height:40px;font-size:12px!important;padding:6px 10px;border-radius:5px;gap:7px}
body.play-library #menu .menu-actions button:after{content:none}
body.play-library #menu .menu-actions .menu-chevron{width:10px;height:12px;margin-left:auto}
body.play-library .pause-header #resume{min-height:40px;font-size:12px;padding:6px 12px}
body.play-library #overwrite button,body.play-library #pack-close,body.play-library #room-create,body.play-library #room-join,body.play-library #room-resume,body.play-library #skin-store-close{min-height:40px;font-size:12px;border-radius:5px;gap:6px}
body.play-library dialog button>.ui-icon{width:16px;height:16px;flex:none}
@media(pointer:coarse){body.play-library #menu .menu-actions button,body.play-library .pause-header #resume,body.play-library #overwrite button,body.play-library #pack-close,body.play-library #room-create,body.play-library #room-join,body.play-library #room-resume,body.play-library #skin-store-close{min-height:44px}}

body.play-library .pause-heading{min-width:0}body.play-library #menu-title{max-width:100%}body.play-library dialog h2{overflow-wrap:anywhere}

/* Functional labels stay legible while caps remain compact. Hardware geometry is unchanged. */
body.play-library :is(.library-top-actions button,.library-sidebar small,.quick-filters button,.advanced-filter summary,#clear,#library-status,#refresh,.library-foot,.bar button,.keyboard-help,.pause-indicator,.pause-footer,.pause-footer button,.pause-section h3,.system button,.actions .turbo-label,.character-poses button,.character-stage-meta,.skin-tabs button){font-size:11px!important}
body.play-library .cover-status{font-size:11px;line-height:18px}
body.play-library .brand small{font-size:9px!important}
body.play-library>footer{font-size:11px!important}
body.play-library #leave{color:var(--paper);border-color:var(--line);background:transparent}

#menu .skin-store-entry{display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 10px;margin:0;width:100%;grid-column:1 / -1;text-align:left}#menu .skin-store-entry>span:nth-child(2){flex:1;min-width:0}#menu .skin-store-entry b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}#menu .skin-store-entry small{font-size:11px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#menu .skin-entry-mark{flex:0 0 24px;width:24px;height:24px;font-size:16px;border-radius:5px}

.character-player-tabs{display:flex;gap:8px;padding:0 0 12px}.character-player-tabs[hidden]{display:none}.character-player-tabs button{min-height:40px;padding:6px 16px;border:1px solid var(--line,#d8cfc3);border-radius:7px;background:transparent;cursor:pointer}.character-player-tabs button[aria-pressed=true]{background:var(--red,#873c4b);color:white}.character-player-tabs button:focus-visible{outline:2px solid var(--red,#873c4b);outline-offset:2px}.character-player-tabs button:disabled{opacity:.5;cursor:default}

.character-store-heading .character-player-tabs{margin:0;padding:0;gap:6px;flex-shrink:0}.character-store-heading .character-player-tabs button{width:auto;min-width:56px;padding:4px 10px;font-size:11px;border:1px solid var(--line);border-radius:6px}.character-store-heading .character-player-tabs button[aria-pressed=true]{color:var(--paper);background:var(--red)}@media(max-width:420px){.character-store-heading{gap:6px}.character-store-heading .character-player-tabs{gap:4px}.character-store-heading .character-player-tabs button{min-width:48px;padding:4px 6px}}

/* Smaller visual keycaps retain the existing input rectangles. */
.hardware-ready #player .actions button.hardware-control{font-size:18px}
.hardware-ready #player .actions .hardware-key,.hardware-ready #player .actions .hardware-face{inset:8%}
.hardware-ready #player .actions button.turbo{font-size:12px}
