:root{color-scheme:light;--bg:#f5f8fc;--panel:#fff;--soft:#edf3f9;--text:#253342;--muted:#657587;--line:#dce5ee;--blue:#507caa;--orange:#f59e0b;--gold:#925a0a;--hero:linear-gradient(120deg,#eff6ff,#fff)}:root[data-theme=dark]{color-scheme:dark;--bg:#191e25;--panel:#242c35;--soft:#2c3744;--text:#ebf0f6;--muted:#b0bfce;--line:#414e5c;--blue:#a3c8e8;--gold:#f4b957;--hero:linear-gradient(120deg,#273747,#242c35)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif}button,input,select{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}[hidden]{display:none!important}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--blue);outline-offset:3px}#app{max-width:1180px;margin:auto;padding:0 16px calc(82px + env(safe-area-inset-bottom))}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:calc(8px + env(safe-area-inset-top)) 0 9px}.toolbar>div{display:flex;gap:7px}.pill{border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:99px;min-height:40px;padding:8px 12px;font-size:11px;line-height:1.3;display:inline-flex;align-items:center;justify-content:center;gap:5px}.pill[aria-pressed=true]{color:var(--gold);background:var(--soft)}.portal{font-weight:600}.hero{display:flex;align-items:center;justify-content:space-between;height:88px;padding:12px 16px;background:var(--hero);border:1px solid var(--line);border-radius:17px;box-shadow:0 3px 12px #18385804;margin-bottom:14px;overflow:hidden}.hero small{font-size:8px;letter-spacing:1.3px;color:var(--muted)}.hero h1{margin:4px 0;font-size:22px;line-height:1.15}.hero p{font-size:10px;color:var(--muted);margin:0;line-height:1.5}.hero svg{height:65px;width:100px;flex-shrink:0}.search{display:flex;align-items:center;gap:6px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:4px 5px 4px 12px;min-height:46px}.search input{flex:1;min-width:0;width:100%;background:none;border:0;color:var(--text);padding:7px 0;font-size:16px}.search input::placeholder{font-size:11px;color:var(--muted)}.search button{border:0;background:var(--soft);min-height:36px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:20px 0 10px}.section-head h2,.box h2{font-size:15px;margin:0}.section-head h2:before{content:'';display:inline-block;height:12px;width:3px;background:var(--orange);margin-right:7px;border-radius:3px}.section-head>span{font-size:9px;color:var(--muted)}.text-button{min-height:36px;border:0;background:transparent;color:var(--blue);font-size:11px;padding:5px 7px}.chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:thin;padding:2px 0 7px;max-width:100%}.chips button{border:1px solid var(--line);background:var(--panel);color:var(--muted);border-radius:10px;min-height:40px;padding:8px 13px;white-space:nowrap;font-size:11px;flex-shrink:0}.chips button[aria-pressed=true]{background:var(--soft);color:var(--gold);border-color:var(--orange)}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tile{min-width:0;position:relative;background:var(--panel);border:1px solid var(--line);border-radius:13px;overflow:hidden}.tile-open{display:block;border:0;background:none;color:inherit;text-align:left;width:100%;padding:0;cursor:pointer}.cover{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:var(--soft)}.tile-name{display:block;font-size:12px;line-height:18px;padding:7px 10px 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:650}.tile-tag{display:block;font-size:9px;line-height:32px;padding:0 42px 0 10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.favorite{position:absolute;bottom:0;right:0;min-width:40px;min-height:40px;padding:0;border:0;background:transparent;color:var(--muted)}.favorite svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.favorite[aria-pressed=true]{color:var(--gold)}.favorite[aria-pressed=true] svg{fill:#f59e0b22}.badge{position:absolute;top:7px;left:7px;background:#ffffffd9;color:#76511c;border-radius:5px;padding:3px 5px;font-size:7px;pointer-events:none;letter-spacing:.4px}.list-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0 12px;font-size:10px;color:var(--muted)}select{max-width:140px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);padding:8px;font-size:12px;min-height:38px}.empty,.footnote{font-size:11px;color:var(--muted);text-align:center;padding:20px 0;line-height:1.7}.load-more{display:flex;margin:18px auto}.box{border:1px solid var(--line);background:var(--panel);border-radius:15px;padding:15px;margin:12px 0}.profile{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.profile>span{font-size:30px}.profile>div{flex:1}.profile h2{font-size:17px}.profile p{font-size:10px;color:var(--muted);margin:6px 0}.avatar-label{font-size:10px;color:var(--muted)}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.stat{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:13px 8px;text-align:center}.stat strong{display:block;font-size:21px;color:var(--blue)}.stat span{font-size:9px;color:var(--muted)}.settings{display:flex;gap:8px;flex-wrap:wrap}.settings h2,.settings p{width:100%;font-size:12px;line-height:1.7}.settings p{color:var(--muted);font-size:10px;margin:0}.credits{font-size:11px;display:block;text-align:center;color:var(--muted);padding:14px}summary{font-size:13px;cursor:pointer;min-height:36px}.record{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:10px 0;font-size:10px}.record strong{font-size:11px}.record span{color:var(--muted);text-align:right}.achievements{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.achievement{border:1px solid var(--line);border-radius:10px;font-size:10px;padding:12px}.achievement.on{color:var(--gold);border-color:var(--orange)}#notice{font-size:11px;color:var(--gold);line-height:1.5;margin:0}#notice:empty{display:none}#bottomNav{position:fixed;bottom:0;left:0;right:0;z-index:30;display:flex;justify-content:space-around;gap:8px;padding:8px 16px calc(8px + env(safe-area-inset-bottom));background:var(--panel);border-top:1px solid var(--line)}#bottomNav a{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;min-width:74px;min-height:44px;font-size:10px;border-radius:12px;color:var(--muted)}#bottomNav a svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}#bottomNav a[aria-current]{color:var(--gold);background:var(--soft)}.player-header{display:grid;grid-template-columns:86px minmax(0,1fr) 96px;gap:6px;align-items:center;padding:calc(6px + env(safe-area-inset-top)) 0 6px}.player-header h1{font-size:13px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.player-header>div{display:flex;gap:4px;justify-content:flex-end}.player-header .pill{padding:7px 10px;min-height:40px}.player-header>div .pill{min-width:40px;padding:7px 8px}.player-tools{display:flex;justify-content:space-between;align-items:center;font-size:9px;color:var(--muted);min-height:28px}.player-tools .text-button{min-height:28px}#runnerStatus{margin:0;font-size:11px;color:var(--gold)}#runnerStatus:empty{display:none}#frameMount{position:relative;height:max(410px,calc(100dvh - 118px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));background:var(--panel);border:1px solid var(--line);border-radius:12px;overflow:hidden}iframe.game-frame{display:block;border:0;width:100%;height:100%;background:var(--panel)}.player-note{font-size:9px;color:var(--muted);line-height:1.6;margin:8px 0}.playing #app{padding-bottom:env(safe-area-inset-bottom)}.playing #bottomNav,.playing #toolbar{display:none}.playing #app{max-width:1180px}.playing #frameMount{max-width:1060px;margin:auto}#player:fullscreen{background:var(--bg);padding:0 10px;height:100dvh;overflow:auto}#player:fullscreen #frameMount{height:calc(100dvh - 100px)}.tile,.pill,.chips button,#bottomNav a{transition:background-color 160ms ease,border-color 160ms ease,box-shadow 160ms ease,transform 140ms ease}.tile:active{transform:translateY(1px)}@media(hover:hover){.tile:hover{border-color:var(--blue);box-shadow:0 4px 15px #1233440a}}@media(min-width:620px){.grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}#app{padding-left:24px;padding-right:24px}.hero{height:88px}}@media(min-width:900px){.grid{grid-template-columns:repeat(5,minmax(0,1fr))}.hero{height:92px}.hero h1{font-size:25px}.hero p{font-size:12px}#bottomNav{max-width:600px;left:50%;right:auto;width:100%;transform:translateX(-50%);border:1px solid var(--line);border-bottom:0;border-radius:16px 16px 0 0}.tile-name{font-size:13px}}@media(max-width:350px){#app{padding-left:12px;padding-right:12px}.hero{padding:12px;height:82px}.hero h1{font-size:20px}.hero p{font-size:9px}.hero svg{width:70px;height:54px}.tile-name{font-size:11px}.tile-tag{font-size:9px;padding-left:8px}.pill{padding:8px 10px}.player-header{grid-template-columns:76px minmax(0,1fr) 86px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}

#homeRecent{display:flex;overflow-x:auto;gap:9px;padding-bottom:5px;scroll-snap-type:x proximity}#homeRecent .tile{flex:0 0 112px;scroll-snap-align:start}#homeRecent .tile-name{font-size:11px}#homeRecent .tile-tag{font-size:8px;padding-right:34px}#homeRecent .favorite{min-width:34px;min-height:36px}#mineRecentMore,#favoriteMore{margin:12px auto;min-height:36px}

.playing #app{padding-left:4px;padding-right:4px}.playing .player-header,.playing .player-tools{padding-left:5px;padding-right:5px}
/* V3.0.1 compact presentation; the original engines retain their own styles. */
#app{padding-left:12px;padding-right:12px;padding-bottom:calc(64px + env(safe-area-inset-bottom))}
.toolbar{padding:calc(2px + env(safe-area-inset-top)) 0 3px;min-height:45px}
.toolbar .pill{position:relative;min-height:40px;border:0;background:transparent;padding:6px 10px;font-size:10px;isolation:isolate}
.toolbar .pill:before{content:'';position:absolute;inset:4px 0;border:1px solid var(--line);border-radius:99px;background:var(--panel);z-index:-1}
.toolbar>div{gap:4px}.toolbar>div .pill{width:40px;padding:8px}
.toolbar svg,.icon-button svg,.player-header svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.hero{margin-bottom:10px;border-radius:14px}.hero svg{width:82px;height:54px}
.search{min-height:42px;border-radius:11px}.search button{min-height:32px}
.section-head{margin:15px 0 7px}.section-head h2{font-size:14px}
.grid{gap:8px}.tile{border-radius:11px}
.cover{height:auto;aspect-ratio:20/9;object-fit:cover}
.tile-name{font-size:12px;padding:5px 8px 0;line-height:17px}
.tile-tag{line-height:27px;padding-left:8px;padding-right:36px;font-size:9px}
.favorite{min-width:36px;min-height:40px}.badge{top:5px;left:5px;padding:2px 4px}
#homeRecent{gap:7px}#homeRecent .tile{flex-basis:104px}#homeRecent .tile-tag{line-height:26px}
.chips button{min-height:36px;padding:6px 11px}.chips{padding-bottom:5px}
#bottomNav{padding:3px 12px calc(3px + env(safe-area-inset-bottom));gap:4px}
#bottomNav a{min-height:44px;min-width:64px;gap:2px;font-size:9px;border-radius:10px}
#bottomNav a svg{width:17px;height:17px}#bottomNav a[aria-current]{background:transparent;color:var(--gold)}
#bottomNav a[aria-current] svg{background:var(--soft);box-shadow:0 0 0 5px var(--soft);border-radius:4px}
.profile{flex-wrap:nowrap;padding:11px 12px;gap:10px}.avatar-picker{position:relative;width:46px;height:46px;display:flex;align-items:center;justify-content:center;background:var(--soft);border:1px solid var(--line);border-radius:14px;flex-shrink:0}
#profileAvatar{font-size:30px;line-height:1}.avatar-picker select{position:absolute;inset:0;width:100%;height:100%;max-width:none;opacity:0;cursor:pointer}
.avatar-picker:focus-within{outline:2px solid var(--blue);outline-offset:2px}.profile-info{min-width:0}.profile-name{display:flex;align-items:center;gap:3px}.profile h2{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile p{margin:2px 0;font-size:10px}
.icon-button{border:0;background:transparent;color:var(--muted);width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.icon-button svg{width:15px;height:15px}
.stat{padding:8px 6px;border-radius:11px}.stat strong{font-size:19px}.stat span{font-size:9px}
.empty{padding:8px 0;margin:4px 0;font-size:10px}.box{padding:12px;border-radius:12px;margin:10px 0}
.about-entry{display:flex;width:100%;align-items:center;justify-content:space-between;gap:10px;color:var(--text);font-size:12px;text-align:left;min-height:44px;cursor:pointer}.about-entry span{font-size:9px;color:var(--muted)}
#aboutPanel{padding-top:6px}.about-heading{margin:16px 0}.about-heading small{font-size:9px;color:var(--muted);letter-spacing:1px}.about-heading h1{font-size:22px;margin:7px 0}.about-heading p,#aboutPanel p{font-size:12px;line-height:1.8;color:var(--muted);overflow-wrap:anywhere}#aboutPanel .box h2{font-size:14px}.source-link{display:block;font-size:12px;line-height:1.7;padding:10px 0;color:var(--blue);overflow-wrap:anywhere}.signature{text-align:center}.signature h2{letter-spacing:1px}#aboutPanel summary{font-size:12px}
dialog{border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--text);padding:16px;width:min(360px,calc(100% - 32px));max-height:80dvh;overflow:auto}dialog::backdrop{background:#17263866}.help-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.help-head h2{font-size:16px;margin:0}dialog p{font-size:12px;line-height:1.8;color:var(--muted)}
.playing #app{height:var(--app-height,100dvh);padding:0 2px;max-width:1180px;overflow:hidden}
#player,#player:fullscreen{height:100%;display:flex;flex-direction:column;min-height:0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);overflow:hidden;background:var(--bg)}
.player-header{grid-template-columns:86px minmax(0,1fr) 86px;padding:2px 4px;gap:4px;flex-shrink:0}.player-header h1{margin:5px 0;font-size:13px}.player-header .pill{min-height:40px;padding:5px 8px;font-size:10px}.player-header>div .pill{width:40px;min-width:40px;padding:6px}
#fullscreen{font-size:9px}.player-tools{flex-shrink:0;min-height:24px;padding:0 6px!important;justify-content:flex-end;gap:8px}.player-tools .text-button{min-height:28px;padding:3px 6px;font-size:10px}#gameControls{display:none}
#frameMount,.playing #frameMount,#player:fullscreen #frameMount{flex:1 1 0;min-height:0;width:100%;height:auto;margin:0 auto;border:0;border-radius:8px;max-width:1060px}
#player:fullscreen{height:100dvh}#runnerStatus{flex-shrink:0}
@media(min-width:620px){#app{padding-left:20px;padding-right:20px}.grid{gap:10px}}
@media(max-width:350px){.player-header{grid-template-columns:78px minmax(0,1fr) 84px}.tile-name{font-size:11px}.profile h2{font-size:15px}.about-entry span{font-size:8px}}
/* A real status/error message shares viewport space instead of pushing the frame below it. */
.playing #app{display:flex;flex-direction:column}.playing #player{height:auto;flex:1 1 0;min-height:0}.playing #notice{flex:0 0 auto;padding:3px 6px}.playing #notice:empty{padding:0}.playing #player:fullscreen{height:100dvh;flex:none}
/* V3.0.2 consistent first-level rhythm and one-line player Hero. */
.hero{height:84px;padding:10px 14px;margin-bottom:10px;border-radius:14px}.hero h1{font-size:21px;line-height:1.2}.hero p{font-size:10px}.hero img{width:88px;height:56px;flex-shrink:0;object-fit:contain}
.section-head{margin:14px 0 7px}.section-head h2,.box h2{font-size:14px}.section-head h2:before{height:11px;margin-right:6px;width:3px}
.text-button{min-height:36px;padding:4px 6px;font-size:10px}.chips{gap:5px;padding:2px 0 5px}.chips button{min-height:36px;font-size:10px;padding:6px 10px;border-radius:9px}
.settings .pill{min-height:36px;padding:6px 10px;font-size:10px}.box{padding:12px}.grid{gap:8px}.list-tools{margin:7px 0 10px}.footnote{padding:14px 0}
.toolbar>div .pill:before{inset:5px 3px}.toolbar>div svg{width:17px;height:17px}.toolbar .portal:before{inset:5px 0}.toolbar>div{gap:2px}
.player-header{position:relative;display:grid;grid-template-columns:120px minmax(0,1fr) 120px;height:calc(56px + env(safe-area-inset-top));min-height:56px;gap:0;padding:env(safe-area-inset-top) 4px 0!important;border-bottom:1px solid var(--line);background:var(--panel);border-radius:0 0 10px 10px}
#player,#player:fullscreen{padding-top:0}
.player-header h1{font-size:13px;margin:0;line-height:1.3;font-weight:650;text-align:center}
.player-header>div{display:flex;gap:0;justify-content:flex-end}.player-header .pill{position:relative;isolation:isolate;min-height:40px;height:40px;border:0;background:transparent;padding:6px 8px;font-size:10px;box-shadow:none;color:var(--text)}
#gameBack{justify-self:start;white-space:nowrap}#gameBack:before{content:'';position:absolute;inset:5px 0;border:1px solid var(--line);border-radius:99px;background:var(--soft);z-index:-1}
.player-header>div .pill{width:40px;min-width:40px;padding:9px}.player-header svg{width:17px;height:17px}.player-header .pill[aria-pressed=true]{color:var(--gold)}
.player-header>div .pill:hover:before,.player-header>div .pill[aria-pressed=true]:before{content:'';position:absolute;inset:5px;border-radius:10px;background:var(--soft);z-index:-1}
#frameMount,.playing #frameMount,#player:fullscreen #frameMount{margin:6px auto 0;border:1px solid var(--line);background:var(--bg);border-radius:9px;overflow:hidden}
#moreDialog{position:fixed;left:auto;right:max(8px,calc((100vw - 1180px)/2 + 8px));top:calc(52px + env(safe-area-inset-top));margin:0;width:min(240px,calc(100vw - 16px));max-height:calc(var(--app-height,100dvh) - 68px - env(safe-area-inset-top));padding:8px 10px;border-radius:13px;box-shadow:0 12px 40px #10213725}
#moreDialog::backdrop{background:#17263822}#moreDialog h2{font-size:12px;color:var(--muted)}#moreDialog .icon-button{height:36px;width:36px}
.game-quick{display:flex;gap:6px;margin:3px 0 6px}.game-quick .pill{flex:1;min-height:36px;padding:6px 9px;background:var(--soft);border-radius:10px;font-size:11px}.game-quick svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.menu-action{display:flex;align-items:center;width:100%;min-height:42px;text-align:left;border:0;border-top:1px solid var(--line);background:transparent;color:var(--text);padding:9px 4px;font-size:12px;border-radius:0;line-height:1.5}.menu-action:active{background:var(--soft)}
#gameMore[aria-expanded=true]{color:var(--blue)}.menu-action,.game-quick .pill{transition:background-color 160ms ease,color 160ms ease}
@media(max-width:350px){.hero{height:84px;padding:10px 12px}.hero h1{font-size:20px}.hero img{width:73px;height:52px}.hero p{font-size:9px}.player-header{grid-template-columns:120px minmax(0,1fr) 120px}.player-header h1{font-size:12px}}
@media(min-width:900px){.hero{height:84px}.hero h1{font-size:21px}.hero p{font-size:10px}.grid{gap:10px}}
