*{box-sizing:border-box}html{color-scheme:light}body{margin:0;background:#f4e7df;color:#332a27;font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;--shell:#f8ead6;--highlight:#fff9ed;--trim:#e5758c;--trim-dark:#b83f50;--edge:#e9bba5;--ink:#382925;--accent:#ba3f46;--panel:#ffe6e2;--shade:#bf9077}body[data-theme=kuromi]{background:#25212c;--shell:#ede3e6;--highlight:#fff6f8;--trim:#7a4064;--trim-dark:#352d3c;--edge:#b98ca2;--ink:#302b38;--accent:#a82f67;--panel:#f2e4ec;--shade:#9c7b8b}button,input,select,a{font:inherit;-webkit-tap-highlight-color:transparent}button,a,select{touch-action:manipulation}button,a{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #71483c;outline-offset:3px}[hidden]{display:none!important}.console{position:relative;max-width:1180px;min-height:100dvh;margin:auto;padding:55px 14px 54px;border:7px solid var(--trim);border-radius:42px;background:radial-gradient(ellipse at 15% 12%,#ffffff85,transparent 65%),linear-gradient(100deg,var(--shell),var(--highlight) 45%,var(--shell));box-shadow:inset 0 0 0 2px #ffffffb0,inset 0 0 0 5px var(--edge),0 6px 25px #0004}.console:before,.console:after{content:"✦";position:absolute;top:22px;color:var(--accent);font-size:22px;line-height:1}.console:before{left:18px}.console:after{right:18px}.console-head{position:relative;display:flex;align-items:center;gap:12px;min-height:115px;padding:20px 12px 18px;border:1px solid var(--edge);border-radius:30px;background:linear-gradient(#fff8,var(--shell));box-shadow:inset 0 3px 4px #fff,0 4px 0 var(--shade);margin-bottom:15px}.mascot{position:absolute;z-index:2;width:138px;height:138px;object-fit:contain;top:-98px;left:50%;transform:translateX(-50%);pointer-events:none}.speaker{position:absolute;top:10px;width:38px;height:6px;border-radius:5px;background:repeating-linear-gradient(120deg,transparent 0 5px,var(--shade) 5px 8px)}.speaker.left{left:18px}.speaker.right{right:18px}.cross-key{width:48px;height:48px;flex:0 0 48px;background:linear-gradient(145deg,#db6870,#a42431);clip-path:polygon(32% 0,68% 0,68% 32%,100% 32%,100% 68%,68% 68%,68% 100%,32% 100%,32% 68%,0 68%,0 32%,32% 32%);filter:drop-shadow(0 3px 2px #0009)}[data-theme=kuromi] .cross-key{background:linear-gradient(145deg,#595460,#211d27)}.lcd{position:relative;display:flex;align-items:center;gap:9px;min-width:0;flex:1;min-height:74px;padding:13px 11px;border:6px solid #45424b;border-radius:17px;background:linear-gradient(110deg,#9bb264,#d0e3a5 55%,#a9c378);box-shadow:inset 2px 3px 8px #26361780,0 2px 1px white;color:#293c26}.lcd img{width:40px;height:40px;object-fit:cover;border-radius:9px}.lcd>div{min-width:0;flex:1}.lcd h1{margin:0;font-size:clamp(13px,3.7vw,25px);line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:800}.lcd p{margin:1px 0 0;font-size:12px;line-height:1.3}.battery{position:absolute;right:9px;top:6px;width:19px;height:8px;border:1px solid #405233;background:repeating-linear-gradient(90deg,transparent 0 3px,#405233 3px 5px)}.paw-keys{width:39px;flex:0 0 39px;display:grid;gap:6px;transform:rotate(-22deg)}.paw-keys i{width:31px;height:31px;border:2px solid var(--highlight);border-radius:50%;background:linear-gradient(120deg,#ff97ad,#cc335b);box-shadow:0 2px 1px #802841,inset 0 2px 2px #fffc;color:#ffe9eb;font-size:22px;text-align:center;line-height:23px;font-style:normal}.paw-keys i:last-child{margin-left:9px}.home-buttons{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:12px 0}.home-buttons a{padding:7px 15px;border-radius:12px;border:1px solid var(--edge);background:var(--highlight);font-size:13px;box-shadow:0 2px var(--shade)}.announcement{display:flex;gap:9px;align-items:center;height:32px;padding:0 12px;border:2px solid var(--edge);border-radius:20px;background:linear-gradient(90deg,#6d2838,#8d4652,#5c2e42);color:#fff4e6;box-shadow:inset 0 1px 3px #0005;margin:16px 0 23px}.announcement svg{width:23px;height:23px;flex-shrink:0;fill:currentColor;stroke:currentColor;stroke-width:1.5}.announcement>div{overflow:hidden;min-width:0;flex:1}.announcement span{display:block;width:max-content;white-space:nowrap;padding-left:100%;font-size:12px;animation:marquee 18s linear infinite}@keyframes marquee{to{transform:translateX(-100%)}}.partners{position:relative;margin:0 0 20px;padding:27px 12px 14px;border:3px solid var(--trim);border-radius:24px;background:linear-gradient(120deg,#fff5df,var(--panel));box-shadow:inset 0 0 0 2px #fffb,0 4px 0 var(--shade);outline:1px solid #fff7;outline-offset:2px}.partners h2{position:absolute;left:50%;top:-19px;transform:translateX(-50%);white-space:nowrap;padding:7px 24px;margin:0;border:2px solid var(--trim-dark);border-radius:24px;background:linear-gradient(var(--highlight),var(--panel));font-size:19px;color:var(--ink);box-shadow:inset 0 2px #fff,0 2px 2px #0003}.bow{position:absolute;left:50%;top:-12px;width:27px;height:14px;transform:translateX(-50%);background:var(--accent);clip-path:polygon(0 0,45% 27%,55% 27%,100% 0,100% 100%,55% 73%,45% 73%,0 100%)}.partner-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px 8px}.partner{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0}.partner img,.partner-fallback{display:grid;place-items:center;width:100%;aspect-ratio:1;max-width:78px;object-fit:cover;border-radius:12px;border:1px solid var(--trim-dark);background:var(--shell);box-shadow:0 2px 2px #0002}.partner > span:last-child{font-size:12px;font-weight:700;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-row{display:flex;gap:8px;margin:0 0 15px}.search{display:flex;align-items:center;flex:1;gap:7px;min-width:0;padding:0 11px;border:2px solid var(--edge);border-radius:20px;background:var(--highlight);box-shadow:inset 0 2px 2px #fff,0 2px 0 var(--shade)}.search svg{width:20px;height:20px;stroke:var(--ink);stroke-width:2;fill:none;flex-shrink:0}.search input{border:0;outline:0;background:none;width:100%;height:39px;font-size:14px;color:var(--ink)}.search-row select{max-width:36%;padding:0 9px;border:2px solid var(--edge);border-radius:20px;background:var(--highlight);font-size:13px;font-weight:700;color:var(--ink);box-shadow:0 2px 0 var(--shade)}.games-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px 10px}.game-card{min-width:0;cursor:pointer}.game-thumbnail{position:relative;aspect-ratio:1!important;padding:5px;border:1px solid var(--edge);border-radius:14px;background:linear-gradient(125deg,var(--highlight),var(--shell));box-shadow:inset 0 2px #fff,0 3px 0 var(--shade),0 4px 5px #0002;overflow:hidden}.game-thumbnail:before{content:"";position:absolute;top:0;left:35%;width:30%;height:4px;background:var(--accent);border-radius:0 0 4px 4px;z-index:1}.game-thumbnail img{width:100%;height:100%;object-fit:cover;display:block;border-radius:9px;background:var(--panel)}.game-thumbnail img.error{opacity:.3}.game-title{text-align:center;padding:7px 0 0;font-weight:700;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.play-badge,.ad-badge{position:absolute;z-index:1;font-size:9px;font-weight:700;color:white;background:var(--accent);padding:3px 5px;border-radius:0 0 7px 0;top:5px;left:5px}.play-badge{top:auto;bottom:5px;right:5px;left:auto;border-radius:7px 0 7px 0;background:#4e3434ce}.bottom-pager{display:flex;align-items:center;justify-content:center;gap:20px;margin:24px 0 10px}.bottom-pager button,.status-message button{border:1px solid var(--trim-dark);border-radius:12px;padding:8px 14px;background:var(--highlight);color:var(--ink)}button:disabled{opacity:.4;cursor:default}.lcd-footer{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,1180px);z-index:10;display:flex;justify-content:space-between;gap:10px;padding:5px 15px calc(5px + env(safe-area-inset-bottom));font-size:11px;color:#2b3b26;border:3px solid var(--edge);border-bottom:0;border-radius:14px 14px 0 0;background:linear-gradient(90deg,#a0ba75,#c4d99a,#9bb56f);box-shadow:inset 0 1px 5px #33492666}.status-message,.empty-state{grid-column:1/-1;text-align:center;padding:35px 10px;font-size:14px}.skeleton-img{aspect-ratio:1;background:linear-gradient(100deg,var(--shell),var(--highlight),var(--shell));border-radius:14px;animation:pulse 1s infinite alternate}.skeleton-title{height:16px;margin:8px;background:var(--shell)}@keyframes pulse{to{opacity:.3}}.game-page-overlay{position:fixed;inset:0;z-index:1000;background:#101014}.game-page-frame{border:0;width:100%;height:100%;display:block}.game-overlay-open{overflow:hidden}.game-overlay-close{position:absolute;right:12px;top:calc(12px + env(safe-area-inset-top));z-index:4;width:38px;height:38px;border:1px solid #fff7;border-radius:50%;background:#000a;color:white;font-size:27px}.embedded-game-fullscreen .game-overlay-close{display:none}.game-frame-loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:#111;color:#fff;pointer-events:none}.game-frame-loading.loaded{opacity:0}.game-frame-loading-note{font-size:12px;color:#aaa}.notice-overlay{position:fixed;inset:0;z-index:1100;display:grid;place-items:center;background:#24121bbd;padding:20px}.notice-dialog{position:relative;max-width:430px;width:100%;max-height:85dvh;overflow:auto;background:var(--highlight);border:3px solid var(--trim);border-radius:22px;box-shadow:0 18px 70px #0008}.notice-close{position:sticky;display:block;margin:6px 6px -40px auto;top:6px;width:34px;height:34px;border:0;border-radius:50%;background:#fff9;color:var(--ink);font-size:25px;z-index:2}.notice-dialog img{display:block;width:100%;max-height:42vh;object-fit:contain}.notice-copy{padding:20px}.notice-copy h2{font-size:20px;margin:0 0 10px}.notice-copy p{font-size:14px;white-space:pre-wrap;line-height:1.8;max-height:25vh;overflow:auto}.notice-copy label{display:block;font-size:12px}.notice-action{display:block;text-align:center;margin-top:15px;padding:12px;border-radius:12px;background:var(--accent);color:#fff}.notice-copy a:not([href]){cursor:pointer}@media(min-width:768px){.console{padding:75px 30px 65px;margin:25px auto}.console-head{max-width:740px;margin:0 auto 20px}.mascot{width:175px;height:175px;top:-120px}.lcd{min-height:90px}.lcd h1{font-size:27px}.lcd p{font-size:16px}.partner-grid{grid-template-columns:repeat(10,minmax(0,1fr));gap:16px}.partners{padding:35px 22px 20px}.announcement{height:38px}.announcement span{font-size:15px}.games-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:20px 17px}.game-title{font-size:15px}.search-row{max-width:700px;margin:0 auto 22px}.search input{height:43px}.lcd-footer{font-size:12px}.partner > span:last-child{font-size:13px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important}.announcement span{padding-left:0}}
/* 专属机身素材：屏幕文字始终由 HTML 渲染，不把整页做成图片。 */
body .console{padding-top:0;overflow:hidden}
body .console-head{display:block;aspect-ratio:3;min-height:0;padding:0;border:0;border-radius:0;background:transparent url("../../kitty/assets/header.png?v=YeCAn2wi") center/100% 100% no-repeat;box-shadow:none;margin:0 -10px 10px;width:calc(100% + 20px)}
body[data-theme=kuromi] .console-head{background-image:url("../../kuromi/assets/header.png?v=YeCAn2wi")}
body .console-head .mascot,body .console-head .speaker,body .cross-key,body .paw-keys,body .battery{display:none}
body .console-head .lcd{position:absolute;left:21.5%;top:30%;width:57%;height:56%;min-height:0;padding:3px 5px;border:0;border-radius:0;background:none;box-shadow:none;gap:7px}
body .lcd img{width:30px;height:30px;border-radius:7px}
body .lcd h1{font-size:clamp(14px,3.7vw,23px);line-height:1.3}
body .lcd p{font-size:11px;line-height:1.3}
body .console:before,body .console:after{display:none}
@media(min-width:768px){body .console{padding-top:0}body .console-head{max-width:760px;margin:0 auto 15px;width:100%}body .lcd img{width:46px;height:46px}body .lcd h1{font-size:28px}body .lcd p{font-size:17px}}
/* 透明机壳、缝线及搪瓷标牌，与两套掌机概念保持同一材质。 */
body .console{border-color:var(--trim);box-shadow:inset 0 0 0 2px #fff,inset 0 0 0 5px var(--edge),inset 0 0 0 7px #fff8,0 0 0 2px var(--trim-dark),0 8px 30px #0004}
body .partners{background:repeating-linear-gradient(45deg,transparent 0 16px,#fff3 16px 17px),repeating-linear-gradient(-45deg,transparent 0 16px,#fff3 16px 17px),linear-gradient(110deg,#fff3e9,var(--panel));border-width:5px;box-shadow:inset 0 0 0 2px #fff,inset 0 0 0 4px var(--edge),0 3px 0 var(--trim-dark),0 6px 8px #83525d44}
body .partners:before{content:"";position:absolute;inset:7px;border:1px dashed var(--trim);border-radius:14px;pointer-events:none}
body .partners h2{top:-23px;border:3px double var(--edge);background:linear-gradient(#fff7f0,#f6d3c5 48%,#e3ae9c);box-shadow:inset 0 2px 1px white,0 2px 0 var(--trim-dark),0 3px 5px #0004;text-shadow:0 1px #fff}
body[data-theme=kuromi] .partners h2{background:linear-gradient(#66505e,#302733);color:#fff3ed;text-shadow:0 1px #000}
body .partner-grid{position:relative;z-index:1}
body .game-thumbnail{box-shadow:inset 0 0 0 1px #fff,inset 0 2px 3px #fff,0 3px 0 var(--shade),0 5px 6px #0003}
/* 游戏比例恢复经典版；分类菜单和点按效果使用当前主题色。 */
.games-grid .game-thumbnail{aspect-ratio:var(--cover-ratio,1)!important}
.games-grid .game-thumbnail img{position:absolute;inset:5px;width:calc(100% - 10px);height:calc(100% - 10px)}
.console :where(a,button,select,input,label,[role=button]){-webkit-tap-highlight-color:transparent;accent-color:var(--accent)}
.console .game-card{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border-radius:14px;outline:none}
.console .game-card:active .game-thumbnail{transform:translateY(2px);box-shadow:inset 0 1px 3px #0003}
.console .game-card:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.console :where(button,a,input):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.console ::selection{background:var(--panel);color:var(--ink)}
.category-control{position:relative;flex:0 0 112px;min-width:0}
.category-trigger{display:flex;align-items:center;justify-content:space-between;gap:5px;width:100%;height:100%;min-height:42px;padding:0 12px;border:2px solid var(--edge);border-radius:20px;background:var(--highlight);color:var(--ink);font-size:13px;font-weight:700;box-shadow:0 2px 0 var(--shade)}
.category-trigger span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.category-trigger svg{width:16px;height:16px;stroke:currentColor;stroke-width:2;fill:none;flex-shrink:0}
/* 焦点描边跟随整条圆角搜索栏，去掉输入框自身方形轮廓。 */
.console .search input:focus,.console .search input:focus-visible{outline:none;box-shadow:none}
.console .search:focus-within{border-color:var(--accent);box-shadow:inset 0 1px 2px #fff,0 0 0 3px color-mix(in srgb,var(--accent) 17%,transparent),0 2px 0 var(--shade)}
.console .search{position:relative;isolation:isolate;padding-right:28px;overflow:visible}
.console .search::after{content:"";position:absolute;width:54px;height:40px;right:1px;top:-21px;background:url("../../kitty/assets/search-bow.svg?v=YeCAn2wi") center/contain no-repeat;pointer-events:none;filter:drop-shadow(0 2px 1px #854e4c50)}
body[data-theme=kuromi] .search::after{background-image:url("../../kuromi/assets/search-bow.svg?v=YeCAn2wi")}
.console .search input{-webkit-appearance:none;appearance:none;border-radius:18px;min-width:0;padding:0;font-family:inherit}
.console .search input::-webkit-search-decoration,.console .search input::-webkit-search-cancel-button{-webkit-appearance:none}
/* 标题与挂件独立于内容网格，不遮挡赞助商。 */
body .partners{margin-top:39px;margin-bottom:32px;padding-top:85px;border:5px solid var(--trim);border-radius:26px;background:repeating-linear-gradient(45deg,transparent 0 16px,#fff4 16px 17px),repeating-linear-gradient(-45deg,transparent 0 16px,#fff4 16px 17px),linear-gradient(110deg,#fff4e7,var(--panel));box-shadow:inset 0 0 0 2px #fff,inset 0 0 0 5px var(--edge),0 3px 0 var(--trim-dark),0 7px 9px #83525d44}
body .partners:before{inset:8px;border-color:var(--trim-dark);opacity:.55;border-radius:15px}
.sponsor-heading{position:absolute;z-index:2;left:50%;top:-35px;width:calc(100% + 20px);max-width:420px;aspect-ratio:2176/736;transform:translateX(-50%);pointer-events:none}
.sponsor-rail{position:absolute;inset:0;background:url("../../kitty/assets/sponsor-rail.png?v=YeCAn2wi") center/100% 100% no-repeat}
body .partners .sponsor-heading h2{position:absolute;left:50%;top:53%;transform:translate(-50%,-50%);margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;outline:0;font-size:clamp(20px,5vw,26px);font-weight:800;line-height:1.15;letter-spacing:3px;color:#81382e;text-shadow:0 1px #fff6dc}
body[data-theme=kuromi] .sponsor-rail{background-image:url("../../kuromi/assets/sponsor-rail.png?v=YeCAn2wi")}
body[data-theme=kuromi] .partners .sponsor-heading h2{top:36%;color:#fff0f3;background:none;text-shadow:0 2px 2px #000;letter-spacing:3px}
body[data-theme=kuromi] .partners{background:repeating-linear-gradient(45deg,transparent 0 16px,#fff6 16px 17px),repeating-linear-gradient(-45deg,transparent 0 16px,#fff6 16px 17px),linear-gradient(110deg,#f5eef0,var(--panel));border-color:#725067;box-shadow:inset 0 0 0 2px #fff,inset 0 0 0 5px #d3b6c5,0 3px 0 #342636,0 7px 9px #241b2850}
.sponsor-seal{position:absolute;inset:auto 18px 10px auto;width:75px;height:75px;background:url("../../kitty/assets/mascot.png?v=YeCAn2wi") center/contain no-repeat;opacity:.075;pointer-events:none}
body[data-theme=kuromi] .sponsor-seal{background-image:url("../../kuromi/assets/mascot.png?v=YeCAn2wi")}
.game-launch-error{position:fixed;left:50%;bottom:60px;z-index:100001;display:flex;align-items:center;gap:12px;max-width:90vw;padding:14px 18px;transform:translateX(-50%);border:1px solid var(--trim);border-radius:14px;background:var(--highlight);color:var(--ink);box-shadow:0 5px 25px #0005;font-size:14px}.game-launch-error button{border:0;background:transparent;color:inherit;font-size:24px}
@media(min-width:768px){body .partners{padding-top:95px;margin-top:47px}.sponsor-heading{top:-43px}.console .search::after{width:65px;height:46px;top:-24px}.console .search{padding-right:36px}}
/* 挂件融入背景，图标恢复紧凑排列。 */
body .partners{padding-top:35px;margin-top:34px}.sponsor-heading{top:-55px;z-index:0}
@media(min-width:768px){body .partners{padding-top:42px;margin-top:47px}.sponsor-heading{top:-60px}}
/* 分类弹窗网格，十多个分类在常见手机尺寸可直接看到。 */
.category-overlay{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;padding:16px;background:#261a25b8;backdrop-filter:blur(5px)}
.category-dialog{display:flex;flex-direction:column;width:min(100%,600px);max-height:calc(100dvh - 32px);min-height:0;padding:20px;border:3px solid var(--trim);border-radius:26px;background:var(--highlight);color:var(--ink);box-shadow:inset 0 0 0 2px #fffc,0 20px 70px #0005}
.category-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:18px;flex-shrink:0}
.category-dialog h2{margin:0;font-size:20px;line-height:1.4;font-weight:800}.category-dialog header p{margin:5px 0 0;color:var(--ink);opacity:.65;font-size:12px;line-height:1.5}
.category-dialog header>button{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;padding:0;border:1px solid var(--edge);border-radius:50%;background:var(--panel);color:var(--ink);font-size:25px;line-height:1}
.category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;min-height:0;min-width:0;max-width:100%;overflow:hidden auto;overscroll-behavior:contain;touch-action:pan-y;padding:3px 8px;scrollbar-width:none}
.category-grid::-webkit-scrollbar{display:none}
.category-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:57px;padding:9px 5px;border:1px solid var(--edge);border-radius:14px;background:var(--shell);color:var(--ink);box-shadow:0 2px 0 var(--shade);font-weight:700;font-size:13px;line-height:1.4;text-align:center;overflow-wrap:anywhere;touch-action:pan-y}
.category-grid button span{max-width:100%}.category-grid button small{font-size:10px;letter-spacing:.6px;opacity:.55;font-weight:500;line-height:1.2}
.category-grid button[aria-selected=true]{border:2px solid var(--accent);padding:8px 4px;background:var(--panel);color:var(--accent);box-shadow:inset 0 0 0 1px #fff6,0 2px 0 var(--shade)}
.category-grid button:focus-visible,.category-dialog header>button:focus-visible,.category-more:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.category-grid button:active{transform:translateY(1px);box-shadow:none}.category-more{flex-shrink:0;margin:12px 0 0;min-height:34px;padding:6px;border:0;border-radius:10px;background:var(--panel);color:var(--accent);font-size:12px;font-weight:700}
@media(min-width:600px){.category-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.category-grid button{min-height:67px;font-size:14px}.category-dialog{padding:25px}}
@media(max-width:360px){.category-overlay{padding:12px}.category-dialog{padding:14px;max-height:calc(100dvh - 24px);border-radius:21px}.category-dialog header{margin-bottom:12px}.category-dialog h2{font-size:18px}.category-grid{gap:7px}.category-grid button{min-height:50px;font-size:12px}}
/* 挂件位于App图标前层，允许轻微遮住图标，不拦截点击。 */
.sponsor-heading{z-index:3}body .partners .sponsor-heading h2{font-size:clamp(16px,4vw,20px);letter-spacing:2px}
.partner-cover{position:relative;display:block;width:100%;max-width:78px;aspect-ratio:1;border-radius:12px;isolation:isolate}.partner .partner-cover>img,.partner .partner-cover>.partner-fallback{width:100%;height:100%;max-width:none;display:block;font-size:20px}.partner-cover::after{content:"";position:absolute;inset:0;z-index:1;border-radius:inherit;pointer-events:none;background:linear-gradient(115deg,transparent 32%,#fff0 38%,#fff9 49%,#fff0 61%,transparent 68%);background-size:250% 100%;background-position:170% 0;opacity:0;animation:sponsorShine 5.5s ease-in-out infinite;animation-delay:var(--shine-delay,0s)}
@keyframes sponsorShine{0%,62%{background-position:170% 0;opacity:0}68%{opacity:.8}85%{background-position:-70% 0;opacity:0}100%{background-position:-70% 0;opacity:0}}
@media(prefers-reduced-motion:reduce){.partner-cover::after{animation:none;opacity:0}}

/* 两款掌机共用图标起始位置，挂件在独立覆盖层。 */
body:is([data-theme=kitty], [data-theme=kuromi]) .partners { padding-top: 24px; }
@media (min-width: 768px) {
  body:is([data-theme=kitty], [data-theme=kuromi]) .partners { padding-top: 31px; }
}

.notice-dialog:focus { outline: none; }
.notice-action { width: 100%; border: 0; }
.notice-action:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px currentColor;
}

/* 轻微缩小两套掌机主题的赞助商名称。 */
body:is([data-theme=kitty], [data-theme=kuromi]) .partner > span:last-child { font-size: 11px; }
@media (min-width: 768px) {
  body:is([data-theme=kitty], [data-theme=kuromi]) .partner > span:last-child { font-size: 12px; }
}

/* 卡通主题共用首页结构，各自使用独立的配色和装饰。 */
body[data-theme=dragon] {
  --shell: #fff6e2;
  --highlight: #fffbf1;
  --trim: #eeb565;
  --trim-dark: #9a481d;
  --edge: #efd6af;
  --shade: #e6c99f;
  --ink: #542a18;
  --accent: #a6400d;
  --panel: #ffebcd;
  --hero-art: url("../../dragon/assets/banner.webp?v=YeCAn2wi");
  --hero-fallback: #ffe5ad;
  --footer-fill: #ffe1b3;
}
body[data-theme=lulu] {
  --shell: #f9f1df;
  --highlight: #fffbef;
  --trim: #aeb783;
  --trim-dark: #53663b;
  --edge: #d8d8b4;
  --shade: #d8cfad;
  --ink: #503528;
  --accent: #4f6338;
  --panel: #e9ecd4;
  --hero-art: url("../../lulu/assets/banner.webp?v=YeCAn2wi");
  --hero-fallback: #eee5ca;
  --footer-fill: #e1e7c9;
}
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) {
  background: var(--shell);
  color: var(--ink);
}
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .console {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 12px calc(45px + env(safe-area-inset-bottom, 0px));
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .console-head {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0 0 10px;
  aspect-ratio: 3.1;
  border-radius: 18px;
  isolation: isolate;
  background: var(--hero-fallback) var(--hero-art) center / 100% 100% no-repeat;
}
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .console-head .mascot {
  display: block;
  position: absolute;
  inset: auto 4% 0 auto;
  width: 27%;
  height: 96%;
  object-fit: contain;
  object-position: bottom center;
  transform: none;
  pointer-events: none;
}
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .console-head .lcd {
  left: 8%;
  top: 21%;
  width: 57%;
  height: 60%;
  color: var(--ink);
}
body[data-theme=lulu] .console-head .mascot { left: 4%; right: auto; }
body[data-theme=lulu] .console-head .lcd { left: 36%; top: 13%; width: 56%; }
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .lcd h1 { font-size: clamp(18px, 5vw, 34px); }
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .announcement {
  margin: 0 0 15px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--highlight);
  box-shadow: none;
}
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .partners {
  margin: 0 0 14px;
  padding: 37px 12px 12px;
  border: 1px solid var(--edge);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: 0 2px 5px #432b1412;
}
body[data-theme=lulu] .partners {
  background: repeating-linear-gradient(90deg, #aeb78332 0 11px, transparent 11px 22px) top / 100% 25px no-repeat, var(--highlight);
  border-style: dashed;
}
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .partners::before { content: none; }
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .sponsor-heading {
  inset: 8px auto auto 12px;
  width: auto;
  height: auto;
  aspect-ratio: auto;
  transform: none;
}
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .sponsor-heading h2 {
  position: static;
  transform: none;
  padding: 2px 5px;
  font-size: 15px;
  letter-spacing: 0;
  color: var(--ink);
}
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) :is(.sponsor-rail, .sponsor-seal) { display: none; }
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .search::after { content: none; }
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .search-row { margin-top: 0; }
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .game-thumbnail {
  background: var(--highlight);
  box-shadow: 0 2px 5px #432b141a;
}
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .game-thumbnail::before { content: none; }
body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .lcd-footer {
  border: 1px solid var(--edge);
  background: var(--footer-fill);
  color: var(--ink);
  box-shadow: none;
}
@media (min-width: 768px) {
  body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .console { padding-inline: 24px; }
  body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .console-head { max-width: 780px; margin-inline: auto; }
  body:is([data-theme=dragon], [data-theme=lulu], [data-theme=ruby]) .partners { padding-inline: 22px; }
}

body[data-theme=dragon] .sponsor-heading h2 {
  background: #ffe3a3;
  border-radius: 5px;
  transform: rotate(-2deg);
}

body[data-theme=lulu] .sponsor-orange {
  position: absolute;
  z-index: 3;
  top: 2px;
  right: 17px;
  width: 25px;
  aspect-ratio: 1;
  border: 1px solid #cd6914;
  border-radius: 51% 49% 49% 51%;
  background:
    radial-gradient(circle at 31% 27%, #ffdf94 0, #ffbf52 26%, #f3952a 60%, #e27818 95%);
  box-shadow: inset 0 -2px 1px #cb5e284c, 0 2px 3px #7a4d382b;
  pointer-events: none;
}
.sponsor-orange::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 53%;
  width: 3px;
  height: 8px;
  border-radius: 3px;
  background: #754526;
  transform: rotate(19deg);
}
.sponsor-orange::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 56%;
  width: 15px;
  height: 7px;
  border-radius: 85% 12%;
  background: linear-gradient(155deg, #afc46c 36%, #537043 50%, #728a50 61%);
  transform: rotate(-19deg);
}

body[data-theme=ruby] {
  --shell: #fff0ed;
  --highlight: #fff8f2;
  --trim: #f4a3ac;
  --trim-dark: #a9435a;
  --edge: #eeafbb;
  --shade: #f3c8cf;
  --ink: #612738;
  --accent: #a52f51;
  --panel: #ffe2e1;
  --hero-fallback: #fff4e8;
  --footer-fill: #ffdce3;
}
body[data-theme=ruby] .console-head {
  container-type: inline-size;
  overflow: hidden;
  aspect-ratio: 820 / 310;
  border-radius: 0;
  background: var(--shell) url("../../ruby/assets/banner.webp?v=YeCAn2wi") center / 100% 100% no-repeat;
}
body[data-theme=ruby] .console-head .mascot { display: none; }
body[data-theme=ruby] .console-head .lcd {
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  z-index: 3;
  color: #731f35;
}
body[data-theme=ruby] .lcd > div { display: contents; }
body[data-theme=ruby] .lcd h1,
body[data-theme=ruby] .lcd p {
  position: absolute;
  margin: 0;
  text-align: center;
  white-space: nowrap;
}
body[data-theme=ruby] .lcd h1 {
  top: 27%;
  left: 12%;
  width: 47%;
  font-size: clamp(20px, 7.7cqw, 56px);
  line-height: 1.16;
  font-weight: 900;
}
body[data-theme=ruby] .lcd p {
  top: 55%;
  left: 20%;
  width: 30%;
  font-size: clamp(10px, 3.7cqw, 27px);
  line-height: 1.45;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}
body[data-theme=ruby] .lcd #brandLogo {
  position: absolute;
  top: 22%;
  left: 3%;
  width: 8%;
  height: auto;
  max-height: 22%;
  object-fit: contain;
}
body[data-theme=ruby] .announcement { background: linear-gradient(100deg,#ad2d51,#cb4369); }
body[data-theme=ruby] .partners {
  margin-top: 30px;
  padding-top: 34px;
  border-radius: 19px;
  background:
    repeating-linear-gradient(128deg,#ffd1df 0 11px,#ffe7e9 11px 21px) top / 100% 23px no-repeat,
    linear-gradient(135deg,#fff5ed,#fff8f0);
  box-shadow: inset 0 0 0 2px #fff9, 0 2px 5px #92384a20;
}
body[data-theme=ruby] .partners::after {
  content: "";
  position: absolute;
  inset: 25px 5px 5px;
  border: 1px dashed #efabb7;
  border-radius: 15px;
  pointer-events: none;
}
body[data-theme=ruby] .sponsor-heading {
  inset: -15px auto auto 9px;
  width: clamp(101px, 29%, 138px);
  aspect-ratio: 242 / 91;
  background: url("../../ruby/assets/ticket.webp?v=YeCAn2wi") center / 100% 100% no-repeat;
}
body[data-theme=ruby] .partners .sponsor-heading h2 {
  position: absolute;
  inset: 10% 5% 0 27%;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  color: #fff6f0;
  font-size: clamp(13px, 4.1vw, 19px);
  letter-spacing: 1px;
  text-shadow: 0 1px 2px #69233e;
}
.sponsor-ruby-peek {
  position: absolute;
  z-index: 3;
  right: 7%;
  top: 28px;
  width: clamp(62px, 20%, 95px);
  transform: translateY(-100%);
  pointer-events: none;
}
body[data-theme=ruby] .partner-cover {
  border-radius: 15px;
  box-shadow: 0 2px 4px #af4b6240;
}
@media (min-width: 768px) {
  body[data-theme=ruby] .partners { padding-top: 43px; margin-top: 40px; }
  body[data-theme=ruby] .sponsor-ruby-peek { top: 35px; }
}
body[data-theme=ruby] .game-thumbnail { box-shadow: 0 2px 5px #b04a6226; }
body[data-theme=ruby] .play-badge { background: #6d3445e8; }

/* PG 标识沿用经典版 SVG 尺寸和原始缩放，角色脱离主布局。 */
.theme-loader {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  transition: opacity .35s ease-in;
}
.theme-loader.is-leaving { opacity: 0; }
.theme-loader-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.theme-pg-mark {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(1.2);
}
.theme-pg-mark > pre {
  margin: 60px 0 0 !important;
  font: 20px Roboto, sans-serif;
  color: #ccc;
  text-align: center;
  animation: pg-caption-appear 1.2s ease-in-out both;
}
.theme-loader-text {
  margin: 40px 0 0;
  font: 600 18px/normal system-ui, sans-serif;
  letter-spacing: 4px;
  color: #ffd700;
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pg-text-pulse 2s infinite;
}
@keyframes pg-caption-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes pg-text-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }

.theme-loader-mascot {
  position: absolute;
  display: block;
  object-fit: contain;
  pointer-events: none;
}
.pg-mascot {
  z-index: 1;
  top: var(--paws-line);
  left: var(--letter-center);
  width: var(--peek-width);
  height: auto;
  transform: translate(-50%, -100%);
  animation: peek-over-pg .48s cubic-bezier(.23,.75,.32,1) both;
}
[data-theme=kitty] .pg-mascot {
  --letter-center: 50%;
  --paws-line: 44px;
  --peek-width: 324px;
}
[data-theme=kuromi] .pg-mascot {
  --letter-center: 50%;
  --paws-line: 29px;
  --peek-width: 302px;
}
[data-theme=dragon] .pg-mascot {
  --letter-center: 50%;
  --paws-line: 22px;
  --peek-width: 225px;
  animation-delay: .08s;
}
[data-theme=ruby] .pg-mascot {
  --letter-center: 50%;
  --paws-line: 45px;
  --peek-width: min(105%, 300px);
}
[data-theme=dragon] .theme-pg-mark.has-animation::before,
[data-theme=dragon] .theme-pg-mark.has-animation::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 14px;
  height: 14px;
  background: linear-gradient(145deg, #fffbe3, #ffbe44);
  clip-path: polygon(50% 0, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%);
  pointer-events: none;
  animation: pg-doodle-star 1.4s ease-in-out infinite alternate;
}
[data-theme=dragon] .theme-pg-mark.has-animation::before { top: -31px; left: 6%; }
[data-theme=dragon] .theme-pg-mark.has-animation::after {
  top: -46px;
  right: 7%;
  width: 11px;
  height: 11px;
  animation-delay: .16s;
}
@keyframes pg-doodle-star {
  from { opacity: .35; transform: rotate(-12deg) scale(.78); }
  to { opacity: 1; transform: rotate(10deg) scale(1.15); }
}
.lulu-loader-guide {
  z-index: 1;
  top: 5px;
  right: calc(100% - 13px);
  width: clamp(150px, 40vw, 231px);
  height: auto;
  animation: lulu-guide-arrival .45s ease-out both;
}
@media (max-height: 520px) {
  [data-theme=kitty] .pg-mascot { --peek-width: 280px; --paws-line: 41px; }
}
@keyframes peek-over-pg {
  from { opacity: 0; transform: translate(-50%, calc(-100% + 12px)); }
  to { opacity: 1; transform: translate(-50%, -100%); }
}
@keyframes lulu-guide-arrival {
  from { opacity: 0; transform: translate(-12px, 5px); }
  to { opacity: 1; transform: translate(0); }
}

/* 独立的页头装饰在加载层退场后错峰循环。 */
.theme-ambience {
  position: absolute;
  z-index: 4;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.theme-ambience > i {
  --x: 65%;
  --y: 30%;
  --dx: -14px;
  --delay: 0s;
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: 11px;
  height: 11px;
  opacity: 0;
}
.theme-ambience > i:nth-child(2) { --x: 73%; --y: 17%; --dx: -8px; --delay: .18s; }
.theme-ambience > i:nth-child(3) { --x: 84%; --y: 22%; --dx: 12px; --delay: .09s; }
.theme-ambience > i:nth-child(4) { --x: 88%; --y: 48%; --dx: 18px; --delay: .3s; }
.theme-ambience > i:nth-child(5) { --x: 83%; --y: 67%; --dx: 10px; --delay: .4s; }
.theme-ambience > i:nth-child(6) { --x: 67%; --y: 64%; --dx: -16px; --delay: .24s; }
.theme-ready[data-theme=dragon] .theme-ambience > i {
  width: clamp(17px, 3.5vw, 26px);
  height: clamp(17px, 3.5vw, 26px);
  background: #bf650b;
  clip-path: polygon(50% 0, 61% 35%, 99% 37%, 69% 59%, 80% 96%, 50% 73%, 19% 96%, 29% 59%, 0 37%, 38% 35%);
  animation: theme-star 2.75s var(--delay) ease-out infinite;
}
.theme-ready[data-theme=lulu] .theme-ambience > i {
  left: calc(100% - var(--x));
  width: 16px;
  height: 10px;
  border: 1px solid #748443;
  border-radius: 90% 12%;
  background: linear-gradient(150deg, #d4e8a0 42%, #6f8446 46% 52%, #a5bd68 57%);
  animation: theme-leaf var(--drift-time, 3.2s) var(--drift-delay, -1.1s) ease-in-out infinite alternate;
}
.theme-ready[data-theme=kitty] .theme-ambience > i {
  background: #e87c9e;
  clip-path: polygon(50% 18%, 71% 0, 90% 6%, 100% 26%, 94% 50%, 50% 98%, 6% 50%, 0 26%, 10% 6%, 29% 0);
  animation: theme-star 3.6s var(--delay) ease-out infinite;
}
.theme-ready[data-theme=kuromi] .theme-ambience > i {
  background: #ddb6f3;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: theme-star 3.6s var(--delay) ease-out infinite;
}
@keyframes theme-star {
  0% { opacity: 0; transform: scale(.25); }
  7% { opacity: 1; }
  19% { opacity: .82; }
  31%, 100% { opacity: 0; transform: translate(var(--dx), -17px) rotate(28deg) scale(.65); }
}
[data-theme=lulu] .theme-ambience > i:nth-child(2n) { --drift-time: 3.9s; --drift-delay: -2.1s; }
[data-theme=lulu] .theme-ambience > i:nth-child(3n) { --drift-time: 2.8s; --drift-delay: -.6s; }
@keyframes theme-leaf {
  0% { opacity: .64; transform: translate(-6px, -5px) rotate(-30deg) scale(.88); }
  45% { opacity: .94; transform: translate(14px, 0) rotate(13deg); }
  100% { opacity: .76; transform: translate(28px, 9px) rotate(53deg) scale(.92); }
}
.theme-ready[data-theme=ruby] .theme-ambience > i {
  background: #ea829c;
  clip-path: polygon(50% 18%, 71% 0, 90% 6%, 100% 26%, 94% 50%, 50% 98%, 6% 50%, 0 26%, 10% 6%, 29% 0);
  animation: theme-star 3.6s var(--delay) ease-out infinite;
}
[data-theme=dragon] .theme-ambience > i::after {
  content: "";
  position: absolute;
  inset: 2px;
  clip-path: inherit;
  background: linear-gradient(145deg, #fff9cc 5%, #ffe471 42%, #ffc12c 83%);
}
[data-theme=dragon] .theme-ambience > i:nth-of-type(even) { scale: .76; }
[data-theme=lulu] .sponsor-leaves {
  z-index: 2;
  inset: 0 43px auto 63px;
  height: 28px;
  border-radius: 0;
}
.theme-ready[data-theme=lulu] .sponsor-leaves > i {
  left: var(--x);
  width: 13px;
  height: 8px;
}
[data-theme=lulu] .sponsor-leaves > i:nth-child(1) { --x: 5%; --y: 32%; }
[data-theme=lulu] .sponsor-leaves > i:nth-child(2) { --x: 19%; --y: 21%; }
[data-theme=lulu] .sponsor-leaves > i:nth-child(3) { --x: 34%; --y: 49%; }
[data-theme=lulu] .sponsor-leaves > i:nth-child(4) { --x: 56%; --y: 26%; }
[data-theme=lulu] .sponsor-leaves > i:nth-child(5) { --x: 72%; --y: 43%; }

@media (prefers-reduced-motion: reduce) {
  .theme-ambience { display: none; }
  .theme-loader { transition: none; }
  .theme-loader-mascot, .theme-loader-text { animation: none; }
  .theme-pg-mark > .theme-loader-mascot {
    position: static;
    width: clamp(110px, 28vw, 160px);
    transform: none;
  }
}

/* 奶油色气泡只做薄边，让封面保持完整。 */
body[data-theme=dragon] :is(.partner-cover, .game-thumbnail) {
  border: 1px solid #ebcc98;
  border-radius: 15px;
  background: linear-gradient(#fffaf0, #ffefcc);
  box-shadow: 0 2px 4px #9f641515;
}
body[data-theme=dragon] .partner-cover { padding: 3px; }
body[data-theme=dragon] .partner .partner-cover > :is(img, .partner-fallback) {
  border-radius: 11px;
  border: 0;
}
body[data-theme=dragon] .games-grid .game-thumbnail img {
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 11px;
}
body[data-theme=dragon] .category-grid button {
  border-radius: 16px;
  background: #fff9e9;
  box-shadow: 0 2px 0 #f1deb6;
}
body[data-theme=dragon] .category-grid button[aria-selected=true] {
  background: #ffedbf;
}

/* KT 喵双耳共用一张透明图，保留右耳的原版红蝴蝶结。 */
body[data-theme=kitty] {
  --kitty-ear-art: url("../../kitty/assets/kitty-frame-ears.webp?v=YeCAn2wi");
  --kitty-rim: #fff5f4;
  --kitty-rim-edge: #e7b2bd;
}
body[data-theme=kitty] .sponsor-heading { width: min(86%, 340px); }
body[data-theme=kitty] .partner-grid { z-index: auto; }
body[data-theme=kitty] .partner-cover {
  isolation: auto;
  background: var(--kitty-rim);
  padding: 2px;
  box-shadow: 0 0 0 1px var(--kitty-rim-edge), 0 2px 3px #883e591f;
}
body[data-theme=kitty] .partner .partner-cover > :is(img, .partner-fallback) {
  border-radius: 10px;
  border: 0;
}
body:is([data-theme=kitty], [data-theme=kuromi]) .game-thumbnail {
  overflow: visible;
}
body:is([data-theme=kitty], [data-theme=kuromi]) .game-thumbnail::before { content: none; }
body:is([data-theme=kitty], [data-theme=kuromi]) .game-thumbnail > .play-overlay { border-radius: inherit; }
body:is([data-theme=kitty], [data-theme=kuromi]) .ad-badge {
  left: auto;
  right: 5px;
  border-radius: 0 0 0 7px;
}

body[data-theme=kitty] .kitty-ear-trim {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  --kitty-ear-width: min(90%, 66px);
}
body[data-theme=kitty] .search-row { margin-bottom: clamp(23px, 7.1vw, 33px); }
body[data-theme=kitty] .game-thumbnail {
  background: var(--kitty-rim);
  border-color: var(--kitty-rim-edge);
  --kitty-ear-height: min(clamp(18px, 6vw, 29px), 29%);
  /* PP 横图的耳根比竖图和方图略高。 */
  --kitty-ear-lift: clamp(0px, (var(--cover-ratio, 1) - 1) * 6px, 5px);
}
body[data-theme=kitty] .category-grid {
  padding-top: 12px;
  row-gap: 14px;
}
body[data-theme=kitty] .category-grid button {
  position: relative;
  --kitty-ear-height: 15px;
  --kitty-ear-lift: 5px;
}
body[data-theme=kitty] .kitty-ear-trim::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  width: var(--kitty-ear-width);
  aspect-ratio: 350 / 112;
  background: var(--kitty-ear-art) center / contain no-repeat;
  transform: translate(-50%, -76%);
  filter: drop-shadow(0 1px 0 #a7666a30);
  pointer-events: none;
}

/* 两端沿圆角切线转向，外侧耳根抵在外轮廓上。 */
body[data-theme=kitty] :is(.game-thumbnail, .category-grid button) {
  --kitty-corner-radius: 14px;
  border-radius: var(--kitty-corner-radius);
}
body[data-theme=kitty] :is(.game-thumbnail, .category-grid button)::before,
body[data-theme=kitty] :is(.game-thumbnail, .category-grid button)::after {
  content: "";
  position: absolute;
  top: calc(var(--kitty-corner-radius) - 4px - var(--kitty-ear-lift, 0px));
  z-index: 2;
  height: var(--kitty-ear-height);
  border-radius: 0;
  background-color: transparent;
  background-image: var(--kitty-ear-art);
  background-repeat: no-repeat;
  pointer-events: none;
}
body[data-theme=kitty] :is(.game-thumbnail, .category-grid button)::before {
  left: -1px;
  transform: translateY(-81%) rotate(-19deg);
  transform-origin: 6% 92%;
  width: auto;
  aspect-ratio: 126 / 112;
  background-position: left center;
  background-size: calc(350 / 126 * 100%) 100%;
  mask-image: linear-gradient(to right, #000 87%, transparent);
}
body[data-theme=kitty] :is(.game-thumbnail, .category-grid button)::after {
  right: -1px;
  transform: translateY(-81%) rotate(19deg);
  transform-origin: 94% 92%;
  aspect-ratio: 148 / 112;
  background-position: right center;
  background-size: calc(350 / 148 * 100%) 100%;
  mask-image: linear-gradient(to left, #000 90%, transparent);
}

/* 用搜索栏同款酷洛米蝴蝶结扣住左上角。 */
body[data-theme=kuromi] {
  --kuromi-bow-art: url("../../kuromi/assets/search-bow.svg?v=YeCAn2wi");
}
body[data-theme=kuromi] .partner-grid { z-index: auto; }
body[data-theme=kuromi] .partner-cover {
  isolation: auto;
  --kuromi-bow-width: clamp(22px, 7vw, 33px);
}
body[data-theme=kuromi] .game-thumbnail {
  --kuromi-bow-width: min(clamp(26px, 9vw, 45px), calc(58% / (var(--cover-ratio, 1))));
}
body[data-theme=kuromi] .category-grid {
  padding-top: 10px;
  row-gap: 13px;
}
body[data-theme=kuromi] .category-grid button {
  position: relative;
  --kuromi-bow-width: 20px;
}
body[data-theme=kuromi] .partner-cover::before,
body[data-theme=kuromi] .game-thumbnail::after,
body[data-theme=kuromi] .category-grid button::after {
  content: "";
  position: absolute;
  top: 0;
  left: 1px;
  z-index: 3;
  width: var(--kuromi-bow-width);
  aspect-ratio: 10 / 7;
  background: var(--kuromi-bow-art) center / contain no-repeat;
  transform: translate(-9%, -59%) rotate(-24deg);
  filter: drop-shadow(0 1px 1px #21102280);
  pointer-events: none;
}
body[data-theme=kuromi] .partner-cover::before { z-index: 4; }
body[data-theme=kuromi] .category-grid button::after { left: 5px; }

.mnq28-overlay {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: transparent;
  border: 0;
}
.mnq28-overlay::backdrop { background: #1b172877; }
body.mnq28-open { overflow: hidden; }

.mnq28-overlay *, .mnq28-overlay *::before, .mnq28-overlay *::after { box-sizing: border-box; }
.mnq28-overlay [hidden] { display: none !important; }
.mnq28-overlay {
  color-scheme: light;
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}



.mnq28-overlay {
  --panel: #f6f8fb; --ink: #202c39; --muted: #62748b;
  --border: #cfd9e5; --button: #e9eff7; --accent: #264977;
  background: transparent;
  color: var(--ink);
}
body[data-theme=kitty] .mnq28-overlay {
  --panel: #fff7ed; --ink: #6c2939; --muted: #945265;
  --border: #eab5bd; --button: #fff0e7; --accent: #aa3859;
}
body[data-theme=kuromi] .mnq28-overlay {
  --panel: #f6eff8; --ink: #382543; --muted: #725486;
  --border: #d7bddf; --button: #efe1f3; --accent: #6a3982;
}
body[data-theme=dragon] .mnq28-overlay {
  --panel: #fff7e3; --ink: #573b22; --muted: #826247;
  --border: #edcb8b; --button: #fff0ca; --accent: #91531f;
}
body[data-theme=lulu] .mnq28-overlay {
  --panel: #f3f2e3; --ink: #30432a; --muted: #627454;
  --border: #bfcba3; --button: #e9edd6; --accent: #48613a;
}
.mnq28-overlay button {
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mnq28-overlay button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mnq28-overlay .room-picker {
  display: grid;
  min-height: 100%;
  padding: max(16px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom));
  place-items: center;
}
.mnq28-overlay .room-panel {
  width: min(100%, 350px);
  padding: 20px;
  border: 2px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 14px 45px #210e2345;
}
.mnq28-overlay .room-panel header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mnq28-overlay .room-panel header p { margin: 0 0 3px; color: var(--muted); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.mnq28-overlay .room-panel h1 { margin: 0; font-size: 21px; }
.mnq28-overlay .room-picker-close {
  flex: 0 0 42px;
  height: 42px;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--button);
  font-size: 25px;
}
.mnq28-overlay .room-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.mnq28-overlay .room-grid button {
  min-height: 62px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--button);
  font-weight: 750;
}
.mnq28-overlay .room-grid button:enabled:hover { border-color: var(--accent); }
.mnq28-overlay .room-grid button:disabled { opacity: .6; cursor: wait; }
.mnq28-overlay .room-message { margin: 14px 0 0; font-size: 13px; color: var(--accent); }
.mnq28-overlay .room-player {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--panel);
}
.mnq28-overlay .room-player header {
  display: grid;
  grid-template-columns: minmax(64px, 1fr) minmax(0, 2fr) minmax(64px, 1fr);
  align-items: center;
  gap: 4px;
  min-height: 48px;
  padding: env(safe-area-inset-top) max(6px, env(safe-area-inset-right)) 0 max(6px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--border);
}
.mnq28-overlay .room-player h2 {
  grid-column: 2;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: clamp(13px, 3.5vw, 16px);
}
.mnq28-overlay .room-player button {
  grid-column: 3;
  justify-self: end;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 8px;
  background: var(--button);
  font-size: 12px;
  white-space: nowrap;
}
.mnq28-overlay .room-player iframe { display: block; width: 100%; height: 100%; border: 0; background: #15121c; }
.mnq28-overlay .room-retry {
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--button);
}
