
:root{font-family:Nunito,system-ui,sans-serif;color:#fff;background:#131225}*{box-sizing:border-box}body{margin:0;overflow:hidden;touch-action:none}button{font:inherit;cursor:pointer}#game{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none}#ui{position:fixed;inset:0;pointer-events:none}#ui button{pointer-events:auto}.top{position:absolute;top:env(safe-area-inset-top);left:0;right:0;display:flex;align-items:flex-start;justify-content:space-between;padding:12px 14px;gap:10px}.brand{font-weight:900;font-size:13px;letter-spacing:.08em;text-shadow:0 2px 2px #0007}.stats{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.pill{border:2px solid #ffffff44;background:#1c183dcc;box-shadow:0 5px 0 #0004;border-radius:14px;padding:7px 11px;font-size:13px;font-weight:900;white-space:nowrap}.pill strong{color:#ffda59}.round{position:absolute;top:65px;left:50%;transform:translateX(-50%);width:min(360px,68%);text-align:center}.round .name{font-size:12px;font-weight:900;letter-spacing:2px;text-shadow:1px 2px #28203d}.track{height:15px;background:#271b41;border:2px solid #fff9;border-radius:20px;overflow:hidden;box-shadow:0 4px 0 #0003}.fill{height:100%;width:0;background:linear-gradient(90deg,#fb8b5a,#ffde65);transition:width .12s}.bottom{position:absolute;bottom:max(16px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(730px,96vw);display:flex;align-items:end;justify-content:center;gap:8px}.weapon{background:#fff3d7;color:#34224d;border:3px solid #3b2854;box-shadow:0 6px 0 #291d3e,0 7px 16px #0005;border-radius:16px;min-width:0;flex:1;padding:9px 3px 7px;font-size:12px;font-weight:900;position:relative;transition:transform .1s}.weapon .emo{display:block;font-size:28px}.weapon.sel{background:#ffe16b;transform:translateY(-6px);box-shadow:0 11px 0 #7d4b39,0 13px 18px #0005}.weapon.locked{filter:grayscale(1);opacity:.7}.weapon small{display:block;font-size:10px}.weapon .cost{font-size:10px;color:#8a4661}.action{background:#ef5279;color:white;flex:1.15}.corner{position:absolute;bottom:120px;right:14px;display:flex;gap:7px;pointer-events:auto}.iconbtn{width:40px;height:40px;border:2px solid #fff7;border-radius:12px;background:#1c183dcc;color:white;font-size:18px}.toast{position:absolute;top:125px;left:50%;transform:translateX(-50%);background:#261d45e6;border:2px solid #fff7;border-radius:15px;padding:8px 16px;font-weight:900;opacity:0;transition:opacity .2s;text-align:center;max-width:90vw}.toast.show{opacity:1}.overlay{position:absolute;inset:0;background:#130f2b99;display:flex;align-items:center;justify-content:center;padding:18px;pointer-events:auto;backdrop-filter:blur(5px)}.overlay.hidden{display:none}.panel{width:min(500px,95vw);max-height:95dvh;overflow:auto;text-align:center;background:linear-gradient(155deg,#40346b,#231d43);border:4px solid #fff1b9;border-radius:27px;box-shadow:0 12px 0 #130e2e,0 22px 45px #0009;padding:22px}.panel h1{font-size:clamp(32px,6.8vw,52px);line-height:.98;color:#ffe16b;text-shadow:3px 5px 0 #a04a6e;margin:10px 0}.panel h2{font-size:32px;color:#ffe16b;margin:8px 0}.panel p{line-height:1.5;color:#eee4fb;font-size:14px}.sub{background:#ffffff16;border:1px solid #fff3;border-radius:16px;padding:12px;margin:14px 0}.big{background:#ffe16b;color:#35234a;border:0;border-bottom:6px solid #d99555;border-radius:14px;padding:14px 26px;font-weight:900;font-size:19px;margin:8px 5px}.secondary{background:#f6eefb;color:#3e315c;border:0;border-bottom:5px solid #a496bc;border-radius:13px;padding:10px 17px;font-weight:900;margin:5px}.hint{font-size:12px;color:#d8c8ec}.sig{font-size:10px;letter-spacing:1px;opacity:.72;margin-top:12px}.shoprow{display:flex;align-items:center;gap:10px;background:#ffffff19;border-radius:13px;padding:9px;text-align:left;margin:8px 0}.shoprow span{font-size:27px}.shoprow div{flex:1;font-size:12px}.shoprow button{font-size:12px;background:#ffe16b;border:0;border-radius:9px;padding:8px;font-weight:900}.badge{display:inline-block;background:#ee5c84;border-radius:20px;padding:4px 10px;font-size:12px;font-weight:900}.copyright{position:absolute;bottom:2px;left:8px;font-size:9px;color:#ffffff8a}@media(max-width:600px){.top{padding:8px}.brand{font-size:10px;max-width:90px}.pill{font-size:11px;padding:6px}.round{top:63px}.bottom{bottom:max(7px,env(safe-area-inset-bottom));gap:5px}.weapon{font-size:10px;padding:6px 0}.weapon .emo{font-size:23px}.corner{bottom:95px}.panel{padding:18px}.panel p{font-size:13px}}

:root{font-family:ui-rounded,"Trebuchet MS",system-ui,sans-serif}button:focus-visible,a:focus-visible{outline:4px solid #83edff;outline-offset:4px}.home{color:#ffe16b;font-size:11px;display:inline-block;margin-top:7px;pointer-events:auto}.badge{letter-spacing:.12em}.panel{background:linear-gradient(145deg,#4b315d,#211b3e);border-color:#ffe3a6}.panel h1{font-family:ui-rounded,"Trebuchet MS",system-ui;letter-spacing:-.05em}.chapter-list{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:16px 0}.chapter-list span{padding:10px 5px;border:1px solid #fff3;border-radius:12px;background:#ffffff0c;font-size:11px}.chapter-list b{display:block;font-size:24px;margin-bottom:5px}.mission{color:#ffe16b;font-size:12px;margin-top:7px}.top{padding-top:max(10px,env(safe-area-inset-top))}.round{top:max(78px,calc(env(safe-area-inset-top) + 68px))}.pill{background:#261e3de8}.weapon{border-width:2px}.weapon:disabled{opacity:.55;cursor:default}.corner{bottom:max(116px,calc(env(safe-area-inset-bottom) + 103px))}.copyright{display:none}.toast{top:140px;pointer-events:none}.panel a{color:#ffe16b}.hero-face{font-size:64px;margin:10px 0}.hint{line-height:1.6}.sig{margin-top:16px}.big{font-size:17px}.round .name{font-size:11px}.panel p{margin:12px 0}.sound-note{font-size:11px;color:#d8c8ec}button{touch-action:manipulation}.panel{max-height:calc(100dvh - 28px)}
@media(max-width:600px){.brand{max-width:100px}.stats{max-width:235px;gap:4px}.pill{font-size:10px;padding:5px 7px}.round{top:75px;width:80%}.panel{padding:17px}.panel h1{font-size:38px}.chapter-list{gap:4px;margin:12px 0}.chapter-list span{font-size:10px;padding:6px 3px}.chapter-list b{font-size:19px}.hero-face{font-size:48px}.panel p{font-size:12px}.big{padding:12px 18px}.hint{font-size:11px}.weapon .emo{font-size:24px}.corner{bottom:100px}}
@media(max-height:500px){.panel{padding:12px;max-width:650px}.panel h1{font-size:28px;margin:5px}.hero-face,.chapter-list,.sig{display:none}.panel p{margin:6px}.sub{padding:8px;margin:8px}.round{top:16px;width:35%}.top{padding:8px}.stats{max-width:220px}.brand{max-width:120px}.bottom{width:420px;bottom:10px}.weapon .emo{font-size:20px}.weapon{font-size:10px;padding:4px}.corner{bottom:18px;right:14px}.toast{top:75px}.hint{margin:5px}.big{margin:4px;padding:9px 18px}.panel h2{font-size:26px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}.overlay{backdrop-filter:none}}
@media(max-width:600px) and (max-height:650px){.hero-face,.chapter-list,.sig{display:none}.panel h1{font-size:34px;margin:8px 0}.panel p{margin:8px 0}.panel .sub{margin:8px 0;padding:8px}.panel .hint{font-size:10px;line-height:1.5}.panel{padding:14px}.big{font-size:15px;padding:11px 18px}}

/* Imagegen art: props 4x2, rooms 3x2, character 2x1. */
.art-icon{display:inline-block;width:28px;height:28px;vertical-align:middle;flex-shrink:0;background-image:url('assets/props-imagegen-v1.webp');background-repeat:no-repeat;background-size:400% 200%}
.icon-0{background-position:0.000000% 0%}
.icon-1{background-position:33.333333% 0%}
.icon-2{background-position:66.666667% 0%}
.icon-3{background-position:100.000000% 0%}
.icon-4{background-position:0.000000% 100%}
.icon-5{background-position:33.333333% 100%}
.icon-6{background-position:66.666667% 100%}
.icon-7{background-position:100.000000% 100%}
.weapon .art-icon{width:42px;height:42px}.weapon .emo{height:44px}.shop-icon .art-icon{width:54px;height:54px}.shoprow .shop-icon{font-size:0}.pill{display:flex;align-items:center;gap:3px}.pill .art-icon{width:22px;height:22px}.menu-art-head{margin:-22px -22px 10px;overflow:hidden;border-radius:22px 22px 0 0;aspect-ratio:16/9;background:#392848}.menu-art-head img{width:100%;height:100%;display:block;object-fit:cover}.menu-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.panel .menu-tagline{margin:8px 0;font-size:13px}.menu-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:2px}.menu-actions button{margin:5px 3px}.menu-stats{display:flex;align-items:center;justify-content:center;gap:5px;margin:9px 0;padding:7px!important;font-size:13px}.menu-stats .art-icon{width:25px;height:25px}.chapter-list{gap:6px;margin:10px 0}.chapter-list .room-card{padding:0 0 5px;overflow:hidden;font-size:9px;line-height:1.4}.chapter-list .room-preview{height:52px;margin-bottom:5px;border-radius:8px 8px 0 0;background-image:url('assets/rooms-imagegen-v1.webp');background-size:300% 200%;background-repeat:no-repeat}.chapter-list small{color:#ffe16b}.panel .hint{font-size:10px;margin:8px 0}.panel .sig{margin-top:8px}
.room-0{background-position:0% 0%}
.room-1{background-position:50% 0%}
.room-2{background-position:100% 0%}
.room-3{background-position:0% 100%}
.room-4{background-position:50% 100%}
.room-5{background-position:100% 100%}
@media(max-width:600px){.menu-art-head{margin:-17px -17px 8px;border-radius:22px 22px 0 0}.weapon .art-icon{width:32px;height:32px}.weapon .emo{height:34px}.pill .art-icon{width:19px;height:19px}.pill{padding:4px 6px}.chapter-list .room-preview{height:38px}.panel .menu-tagline{font-size:12px}.menu-actions .big{padding:10px 14px}.menu-actions .secondary{padding:9px 12px}}
@media(max-width:600px) and (max-height:650px){.menu-art-head{margin:-14px -14px 8px}.menu-tagline,.chapter-list,.sig{display:none}.menu-actions{gap:0}.menu-stats{margin:5px 0!important}.panel .hint{margin:6px 0;font-size:9px}.menu-actions .big{padding:9px 12px}.menu-actions .secondary{padding:8px 10px}}
@media(max-height:500px){.menu-art-head{display:none}.panel .menu-title{position:static;width:auto;height:auto;clip-path:none;font-size:28px;margin:4px 0}.menu-tagline{display:none}.weapon .art-icon{width:27px;height:27px}.weapon .emo{height:28px}.menu-actions{margin:5px}.menu-stats{max-width:380px;margin:6px auto!important}}

/* Shared Berfin Nida host avatar, matching the other game menus. */
.panel:has(>.host-layout){width:min(780px,95vw)}.host-layout{display:grid;grid-template-columns:180px minmax(0,1fr);gap:22px;align-items:center}.host-content{min-width:0}.host-stage{position:relative;isolation:isolate;margin:0;display:flex;align-items:center;justify-content:center;height:250px}.host-halo{position:absolute;inset:12px 0 10px;border-radius:46% 46% 24px 24px;background:radial-gradient(ellipse at 50% 40%,#a87ddd99,#29204855 75%);border:2px solid #e8c17288;z-index:-1;box-shadow:0 0 30px #c89bda30}.host-avatar{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 7px 12px #130a2b99);mask-image:linear-gradient(#000 82%,transparent 99%);pointer-events:none}.host-stage figcaption{position:absolute;bottom:1px;left:50%;transform:translateX(-50%);white-space:nowrap;border:2px solid #fff0b2;border-radius:12px;background:linear-gradient(#ffeaa5,#dfac4e);padding:5px 14px;color:#51371c;box-shadow:0 3px #7d5237;font-size:12px;font-weight:900}.host-layout .menu-art-head{margin:0 0 10px;border-radius:14px}.host-pause{grid-template-columns:170px minmax(0,1fr)}.host-pause .host-stage{height:220px}.host-pause h2{font-size:26px}.host-pause .big{margin-top:12px}
@media(max-width:600px){.panel:has(>.host-layout){width:min(410px,95vw)}.host-layout,.host-pause{grid-template-columns:1fr;gap:10px}.host-stage,.host-pause .host-stage{width:135px;height:135px;margin:auto}.host-stage figcaption{font-size:10px;padding:3px 11px}.host-layout .menu-art-head{border-radius:12px;margin-bottom:7px}.host-pause h2{font-size:25px}.host-layout .chapter-list{display:none}.host-layout .menu-tagline{display:none}}
@media(max-width:600px) and (max-height:650px){.host-layout{gap:7px}.host-stage,.host-pause .host-stage{height:100px;width:115px}.host-stage figcaption{font-size:9px;padding:2px 9px}.host-menu .hint{font-size:8px;line-height:1.35}.host-layout .menu-art-head{margin-bottom:3px}.host-layout .menu-actions button{margin:4px 2px}.host-layout .menu-stats{padding:4px!important}.host-layout .menu-stats .art-icon{width:20px;height:20px}}
@media(orientation:landscape) and (max-height:500px){.panel:has(>.host-layout){width:min(690px,92vw)}.host-layout,.host-pause{grid-template-columns:140px minmax(0,1fr);gap:18px}.host-stage,.host-pause .host-stage{height:175px;width:140px}.host-layout .menu-art-head{display:none}.host-layout .chapter-list{display:none}.host-stage figcaption{font-size:10px;padding:3px 10px}}

/* Quiet pause screen: retain the host and two clear actions. */
#ui:has(#overlay:not(.hidden) .host-pause)>:is(.top,.round,.toast,.corner,.bottom){visibility:hidden;pointer-events:none}
#overlay:has(.host-pause){background:#191625;backdrop-filter:none}
#panel:has(>.host-pause){width:min(350px,92vw);padding:28px;border:1px solid #ffffff20;border-radius:22px;background:#252033;box-shadow:0 16px 48px #0003}
#panel .host-pause{grid-template-columns:1fr;gap:17px}
#panel .host-pause .host-stage{width:112px;height:125px;margin:0 auto}
.host-pause .host-halo{display:none}
.host-pause .host-avatar{filter:none}
.host-pause .host-stage figcaption{padding:0;border:0;background:none;box-shadow:none;color:#c9bfd7;font-size:11px;bottom:0}
#panel .host-pause h2{font-size:25px;font-weight:800;color:#f7f2ff;margin:0 0 20px}
.pause-buttons{display:grid;gap:10px}
#panel .host-pause button{width:100%;margin:0;padding:13px 18px;border:0;border-radius:12px;box-shadow:none;font-size:15px;min-height:46px}
#panel .host-pause .big{background:#ffe083;color:#34243f}
#panel .host-pause .secondary{background:#ffffff08;color:#d8cde6;border:1px solid #ffffff1a;font-size:13px}
@media(orientation:landscape) and (max-height:500px){#panel:has(>.host-pause){width:min(440px,90vw);padding:22px}#panel .host-pause{grid-template-columns:112px minmax(0,1fr);gap:24px}#panel .host-pause h2{margin-bottom:14px}#panel .host-pause button{min-height:42px;padding:10px 15px}}

/* Minimal start screen, using the same quiet layout as pause. */
#ui:has(#overlay:not(.hidden) .host-menu)>:is(.top,.round,.toast,.corner,.bottom){visibility:hidden;pointer-events:none}
#overlay:has(.host-menu){background:#191625;backdrop-filter:none}
#panel:has(>.host-menu){width:min(370px,92vw);padding:28px;border:1px solid #ffffff20;border-radius:22px;background:#252033;box-shadow:0 16px 48px #0003}
#panel .host-menu{grid-template-columns:1fr;gap:18px}
#panel .host-menu .host-stage{width:112px;height:125px;margin:0 auto}
.host-menu .host-halo{display:none}
.host-menu .host-avatar{filter:none}
.host-menu .host-stage figcaption{padding:0;border:0;background:none;box-shadow:none;color:#c9bfd7;font-size:11px;bottom:0}
#panel .entry-title{font-size:28px;letter-spacing:-.5px;line-height:1.15;margin:0 0 24px;color:#f7f2ff;text-shadow:none}
.entry-buttons{display:grid;gap:10px}
#panel .host-menu .entry-buttons button{width:100%;margin:0;padding:13px 18px;border:0;border-radius:12px;box-shadow:none;font-size:15px;min-height:46px}
#panel .host-menu .big{background:#ffe083;color:#34243f}
#panel .host-menu .secondary{background:#ffffff08;color:#d8cde6;border:1px solid #ffffff1a;font-size:13px}
#panel .entry-shop{display:block;margin:15px auto 14px;padding:5px 12px;background:none;border:0;color:#c7b8d9;font-size:12px;text-decoration:underline;text-underline-offset:3px}
#panel .entry-home{font-size:11px;color:#9c8eae;text-decoration:none;display:inline-block;padding:5px}
@media(orientation:landscape) and (max-height:500px){#panel:has(>.host-menu){width:min(470px,90vw);padding:20px}#panel .host-menu{grid-template-columns:112px minmax(0,1fr);gap:24px}#panel .entry-title{font-size:24px;margin-bottom:17px}#panel .host-menu .entry-buttons button{min-height:42px;padding:10px 15px}#panel .entry-shop{margin:9px auto 4px}}
