@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800;900&display=swap');
:root{
 font-family:'Golos Text',Arial,sans-serif;font-synthesis:none;
 --bg:#171427;--surface:#262139;--panel:#262139;--surface-alt:#332b4a;--text:#faf7ff;--muted:#b7afcc;
 --line:#403651;--primary:#a785ff;--primary-ink:#241544;--primary-hover:#b79cff;--lime:#dcff76;
 --coral:#ff9c87;--hero:#7848ed;--hero-ink:#fff;--hero-muted:#eee4ff;--shadow:0 8px 0 #0c091936;
 --toast-bg:#f2eaff;--toast-text:#36234f;--overlay:#100a24b3;--focus:#d6baff;--field-bg:#201b30;
 color:var(--text);background:var(--bg);color-scheme:dark;
}
:root[data-theme="light"]{
 --bg:#f7f4ff;--surface:#fff;--panel:#fff;--surface-alt:#eee8fa;--text:#28223d;--muted:#756a8c;
 --line:#e5def2;--primary:#7848ed;--primary-ink:#fff;--primary-hover:#6636db;--shadow:0 8px 0 #c4b0eb28;
 --toast-bg:#2b1e45;--toast-text:#fff;--overlay:#32224755;--focus:#7540e8;--field-bg:#f8f5ff;
 color-scheme:light;
}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}html{scroll-behavior:smooth;scroll-padding-top:24px}
button,input,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
button:disabled{opacity:.45;cursor:default;transform:none!important}[hidden]{display:none!important}
.topbar,main,footer{max-width:1180px;margin-inline:auto}
.topbar{min-height:100px;display:flex;align-items:center;gap:40px;padding-block:18px}
.brand{display:flex;align-items:center;font-size:27px;letter-spacing:-1.4px;font-weight:900;direction:ltr;white-space:nowrap}
.brand>span{color:var(--primary)}.brand-icon{width:39px;height:39px;display:grid;place-items:center;border-radius:13px;background:var(--lime);color:#302249;font-size:27px;margin-inline-end:10px;letter-spacing:-4px;padding-inline-end:3px;transform:rotate(-7deg)}
.topbar nav{display:flex;align-items:center;gap:7px}.topbar nav a{padding:12px 18px;border-radius:16px;font-size:15px;font-weight:600;color:var(--muted);display:flex;gap:9px;align-items:center}
.topbar nav a.active{background:var(--surface-alt);color:var(--primary)}nav small{font-size:11px;min-width:20px;border-radius:7px;display:grid;place-items:center;background:var(--surface);padding:3px}
.preferences{display:flex;gap:8px;margin-inline-start:auto}.preferences label{display:flex;min-width:0}
.preference-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0)}
.preferences select{width:auto;max-width:140px;min-height:40px;border:1px solid var(--line);border-radius:13px;background:var(--surface);color:var(--text);font-size:12px;padding:9px 10px}
.connection{display:none}
.hero{display:grid;grid-template-columns:1.05fr 1fr;align-items:center;background:var(--hero);color:var(--hero-ink);border-radius:32px;min-height:312px;overflow:hidden;position:relative;padding:38px 45px;margin-top:12px}
.hero-copy{position:relative;z-index:1}.hero h1{font-size:clamp(45px,5vw,67px);line-height:1.04;letter-spacing:-2.8px;margin:0 0 18px;font-weight:900;max-width:580px}
.hero p{font-size:15px;line-height:1.7;color:var(--hero-muted);margin:0 0 25px;max-width:410px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap}
.button{display:inline-flex;align-items:center;justify-content:center;gap:15px;min-height:48px;border-radius:16px;padding:13px 20px;border:0;background:var(--surface-alt);color:var(--text);font-size:14px;font-weight:700;transition:transform .15s,background .15s;line-height:1.3}
.button:hover{transform:translateY(-2px)}.button.primary{background:var(--primary);color:var(--primary-ink);box-shadow:0 4px 0 #31136e22}
.button.primary:hover{background:var(--primary-hover)}.button.subtle{background:var(--surface);border:1px solid var(--line);color:var(--primary)}
.hero .button.primary{background:var(--lime);color:#2f2142;box-shadow:0 4px 0 #48279b55}
.hero .button.primary:hover{background:#e7ff9e}.hero .button.subtle{background:#6335c9;border:1px solid #b48ef7;color:#fff}
.hero-art{position:relative;height:265px;display:grid;place-items:center;align-self:center}.hero-art>img{width:112%;max-width:550px;max-height:310px;filter:drop-shadow(0 8px 0 #4c299628)}
.hero-spark{position:absolute;color:var(--lime);font-size:32px}.spark-one{top:4px;right:5px;transform:rotate(12deg)}.spark-two{bottom:0;left:10px;font-size:22px;color:#ffb2da}
.section-block{padding-top:38px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}
h2{font-size:28px;letter-spacing:-.9px;font-weight:800;margin:0;line-height:1.25}.section-heading h2{display:flex;align-items:center;gap:11px}
.heading-icon{width:39px;height:39px;border-radius:13px;background:#ffe3a3;color:#35254b;display:grid;place-items:center;flex-shrink:0;font-size:25px;transform:rotate(-7deg)}
.heading-icon.games-icon{background:#d4e9ff;color:#533c99;transform:rotate(7deg)}
.section-heading h2>small{background:var(--surface-alt);color:var(--muted);font-size:13px;padding:5px 10px;border-radius:10px;letter-spacing:0}
.section-heading>.button{min-height:42px;font-size:13px;padding:10px 17px}
.room-empty{border:2px dashed var(--line);border-radius:24px;padding:26px 28px;display:flex;align-items:center;gap:20px;background:var(--surface)}
.empty-icon{display:grid;place-items:center;height:58px;width:58px;border-radius:20px;flex-shrink:0;background:var(--surface-alt);color:var(--primary);font-size:35px;transform:rotate(-8deg)}
.room-empty h3{font-size:18px;margin:0 0 7px;font-weight:700;letter-spacing:-.4px}.room-empty p{font-size:13px;color:var(--muted);line-height:1.6;margin:0}.room-empty>.button{margin-inline-start:auto;flex-shrink:0}
.room-row{display:flex;align-items:center;gap:18px;border:1px solid var(--line);background:var(--surface);border-radius:22px;padding:16px;margin-bottom:12px;box-shadow:var(--shadow)}
.room-game-icon{width:85px;height:62px;flex-shrink:0;overflow:hidden;border-radius:13px;background:var(--surface-alt)}.room-game-icon img{height:100%;width:100%;object-fit:cover}
.room-info{flex:1;min-width:0}.room-info h3{font-size:17px;margin:0 0 5px;font-weight:700;overflow-wrap:anywhere}.room-info p{font-size:12px;color:var(--muted);margin:0;line-height:1.5}
.room-people{font-size:14px;font-weight:700;color:var(--muted);white-space:nowrap}
.search{display:flex;align-items:center;gap:9px;max-width:230px;width:100%;padding:11px 14px;border:1px solid var(--line);border-radius:15px;background:var(--surface)}
.search>span{font-size:24px;line-height:.7;color:var(--primary)}.search input{background:none;border:0;color:var(--text);font-size:13px;outline:0;min-width:0;width:100%}
input::placeholder{color:var(--muted);opacity:1}
.game-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:22px}
.game-card{background:var(--surface);border:1px solid var(--line);border-radius:25px;overflow:hidden;box-shadow:var(--shadow);transition:transform .18s}
.game-card:hover{transform:translateY(-4px)}.game-cover{aspect-ratio:2.12;position:relative;background:#e6d8ff;overflow:hidden;margin:10px 10px 0;border-radius:17px}
.game-cover img{width:100%;height:100%;object-fit:cover;image-rendering:pixelated;transition:transform .2s}.game-card:hover .game-cover img{transform:scale(1.025)}
.cover-badge{position:absolute;top:12px;left:12px;background:#fff;color:#2c2240;border-radius:10px;font-size:13px;line-height:1;padding:8px 10px;box-shadow:0 3px 0 #120a2622;font-weight:700}
.game-body{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:23px 24px}
.game-body h3{font-size:22px;letter-spacing:-.7px;line-height:1.2;margin:0;font-weight:800;overflow-wrap:anywhere}
.game-body .button{font-size:12px;padding:12px 15px;min-height:43px;white-space:nowrap;gap:12px}
.game-color-1 .button.primary{background:var(--coral);color:#3c2335;box-shadow:0 4px 0 #c06d5b22}
.game-color-1 .button.primary:hover{background:#ffb7a3}
.empty-state{padding:30px;border:2px dashed var(--line);border-radius:22px;color:var(--muted);font-size:15px;grid-column:1/-1}
footer{display:flex;align-items:center;gap:24px;padding:27px 0 30px;margin-top:46px;border-top:1px solid var(--line)}
footer .brand{font-size:22px}footer>span{font-size:13px;color:var(--muted)}footer>a:not(.brand){margin-inline-start:auto;font-size:12px;color:var(--muted)}
dialog{width:440px;max-width:calc(100% - 28px);padding:35px;border:1px solid var(--line);border-radius:27px;background:var(--surface);color:var(--text);box-shadow:0 25px 90px #1a0c4033}
dialog::backdrop{background:var(--overlay);backdrop-filter:blur(5px)}dialog h2{font-size:29px;letter-spacing:-1px;margin:2px 0 15px}
dialog p{color:var(--muted);font-size:14px;line-height:1.6}
.dialog-close{position:absolute;top:12px;right:16px;width:34px;height:34px;background:var(--surface-alt);border:0;border-radius:50%;font-size:25px;color:var(--muted);line-height:1}
dialog label{display:flex;flex-direction:column;gap:9px;margin-top:20px;font-size:13px;font-weight:600}
dialog input:not([type=checkbox]){width:100%;background:var(--field-bg);color:var(--text);padding:14px;border:1px solid var(--line);border-radius:13px;font-size:16px}
dialog .button{width:100%;margin-top:24px;min-height:50px;font-size:15px}
dialog .checkbox-label{flex-direction:row;align-items:center;font-weight:500}
input[type=checkbox]{accent-color:var(--primary);width:18px;height:18px}
.room-options{border-top:1px solid var(--line);margin-top:20px;padding-top:15px}
.room-options summary{cursor:pointer;color:var(--muted);font-size:12px}
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 30px);background:var(--toast-bg);color:var(--toast-text);box-shadow:0 10px 40px #16052a22;border-radius:18px;padding:16px 21px;z-index:30;font-size:14px;line-height:1.5}
.room-top{display:flex;align-items:center;gap:20px;justify-content:space-between;padding:16px 0 24px}
.text-button{border:0;background:transparent;color:var(--muted);font-size:14px;font-weight:500;padding:8px 0}
.text-button:hover{color:var(--primary)}.code-label{font-size:11px;color:var(--muted);letter-spacing:1px;font-family:monospace}
.small{min-height:42px;padding:11px 16px;font-size:13px}
.play-layout{display:grid;grid-template-columns:minmax(0,1fr) 275px;gap:26px}
.play-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:15px}.play-title h1{font-size:30px;line-height:1.2;letter-spacing:-1px;font-weight:800;margin:0}
.screen-actions{display:flex;gap:8px}.square-button{width:40px;height:40px;border:1px solid var(--line);border-radius:13px;background:var(--surface);color:var(--text);font-size:22px}
.screen{width:100%;aspect-ratio:4/3;position:relative;overflow:hidden;background:#080710;border:6px solid var(--surface);border-radius:23px;box-shadow:var(--shadow)}
.screen canvas{width:100%;height:100%;object-fit:contain;image-rendering:pixelated;display:block}
.screen:fullscreen{height:100%;width:100%;aspect-ratio:auto;border:0;border-radius:0}
.screen-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px;text-align:center;background:#29203f;color:#fff;z-index:2}
.screen-placeholder>span{width:78px;height:78px;border-radius:25px;background:#6f47c1;color:var(--lime);display:grid;place-items:center;font-size:55px;transform:rotate(-9deg)}
.screen-placeholder h2{font-size:32px;letter-spacing:-1px;margin:22px 0 12px;font-weight:800}
.screen-placeholder p{color:#d0c4e7;font-size:14px;line-height:1.7;max-width:340px;margin:0 0 24px}
.screen-placeholder .button.primary{background:var(--lime);color:#2d1c46;min-height:51px;font-size:16px;padding:14px 30px}
.screen-placeholder.loading>span{animation:wiggle 1.6s ease-in-out infinite}
.pause-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:14px;text-align:center;padding:30px;background:#1b1039cc;color:#fff;backdrop-filter:blur(4px)}
.pause-overlay strong{font-size:27px;letter-spacing:-.6px}.pause-overlay span{font-size:14px;color:#d8ccec;max-width:350px;line-height:1.7}
.under-screen{display:flex;align-items:center;justify-content:space-between;gap:15px;padding-top:17px}
.under-screen>span:first-child{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.under-screen i{width:8px;height:8px;border-radius:50%;background:#a1ce56}
.under-screen .button{background:var(--surface-alt);color:var(--primary);font-size:13px;min-height:41px;padding:10px 19px}
.room-sidebar{padding:22px;background:var(--surface);border:1px solid var(--line);border-radius:24px;align-self:start;margin-top:58px}
.sidebar-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;font-size:17px;font-weight:800;letter-spacing:-.4px}
.sidebar-heading small{font-size:9px;color:var(--muted);letter-spacing:.4px;font-weight:500}
.player{display:flex;align-items:center;gap:12px;margin-bottom:20px}.player-avatar{height:43px;width:43px;border-radius:15px;flex-shrink:0;background:var(--lime);color:#35214a;display:grid;place-items:center;font-size:15px;font-weight:800;transform:rotate(-5deg)}
.player-avatar.guest{background:var(--coral);transform:rotate(6deg)}.player-avatar.empty{background:var(--surface-alt);color:var(--primary);border:2px dashed var(--line);font-size:23px}
.player>div:last-child{min-width:0}.player strong{display:block;font-size:13px;font-weight:600;overflow-wrap:anywhere;line-height:1.5}
.player small{display:block;font-size:11px;color:var(--muted);margin-top:3px}
.device-control{padding-top:18px;border-top:1px solid var(--line);margin-top:4px}
.device-control label{display:block;color:var(--muted);font-size:12px;margin-bottom:10px}
select{font:inherit;background:var(--field-bg);border:1px solid var(--line);color:var(--text);border-radius:13px;padding:12px;max-width:100%}
#controller-select{width:100%;font-size:13px;text-overflow:ellipsis}
.controls-help{margin-top:19px;border-top:1px solid var(--line);padding-top:19px}
.controls-help summary{display:flex;align-items:center;gap:9px;cursor:pointer;font-size:13px;font-weight:600;color:var(--primary);list-style:none}
.controls-help summary::-webkit-details-marker{display:none}.controls-help summary>span:first-child{width:22px;height:22px;background:var(--surface-alt);border-radius:8px;display:grid;place-items:center;font-weight:800}
.help-content{padding-top:10px}.play-tip,.control-hint{color:var(--muted);font-size:11px;line-height:1.8}
.key-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:16px 0;font-size:11px;color:var(--muted)}
.key-row>div{display:flex;gap:3px}kbd{font:10px monospace;min-width:21px;border:1px solid var(--line);border-bottom-width:2px;background:var(--surface-alt);border-radius:6px;padding:5px;text-align:center;color:var(--text)}
#restart-game{width:100%;margin-top:20px;background:var(--surface-alt);color:var(--primary)}#resume-audio{width:100%;margin-top:12px}
.credits{max-width:800px;padding:30px 0 55px}.credits h1{font-size:42px;letter-spacing:-1.5px}.credits h2{margin-top:35px;font-size:25px}
.credits p{color:var(--muted);font-size:14px;line-height:1.9}.credits p a{color:var(--primary);text-decoration:underline}
[dir=rtl] .code-label,[dir=rtl] input[name=code],[dir=rtl] .key-row>div{direction:ltr}
@keyframes wiggle{0%,100%{transform:rotate(-9deg)}50%{transform:rotate(9deg)}}
@media(min-width:1450px){.hero{margin-top:20px;min-height:330px}}
@media(max-width:1300px){.topbar,main,footer{margin-inline:5%}}
@media(max-width:1050px){
 .topbar{gap:20px}.brand{font-size:24px}.topbar nav a{font-size:13px;padding:10px 12px}
 .hero{padding:30px}.hero h1{font-size:54px}.hero-art{height:240px}.hero p{font-size:14px}
 .game-body{flex-wrap:wrap;gap:16px;padding:20px}.game-body h3{font-size:22px}.game-body .button{margin-inline-start:auto}
 .play-layout{grid-template-columns:minmax(0,1fr) 245px;gap:18px}.room-sidebar{padding:18px}.play-title h1{font-size:27px}
}
@media(max-width:720px){
 .topbar{min-height:105px;gap:12px;flex-wrap:wrap;padding-block:16px}
 .brand{font-size:22px;margin-inline-end:auto}.brand-icon{width:33px;height:33px;font-size:24px;border-radius:11px;margin-inline-end:8px}
 .preferences{margin-inline-start:0;gap:6px}.preferences select{font-size:11px;padding:8px 5px;max-width:85px;min-height:36px;border-radius:11px}
 .topbar nav{order:4;flex-basis:100%;gap:7px}.topbar nav a{padding:8px 14px;font-size:13px;border-radius:12px}
 .hero{grid-template-columns:1fr;border-radius:25px;padding:26px;margin-top:6px;min-height:0}
 .hero h1{font-size:44px;line-height:1.03;letter-spacing:-1.9px;margin-bottom:13px;max-width:290px}
 .hero p{font-size:13px;line-height:1.7;max-width:260px;margin-bottom:20px}
 .hero-art{position:absolute;width:180px;height:130px;right:-26px;top:40px;opacity:.23;transform:rotate(15deg);pointer-events:none}
 .hero-art>img{width:210px}.hero-spark{display:none}
 .hero-copy{max-width:100%}.hero-actions{gap:9px}.hero-actions .button{font-size:12px;padding:12px 14px;min-height:45px;border-radius:13px;gap:10px}
 .section-block{padding-top:30px}.section-heading{margin-bottom:16px;gap:12px;flex-wrap:wrap}
 h2{font-size:24px;letter-spacing:-.8px}.section-heading h2{gap:9px}.heading-icon{width:33px;height:33px;font-size:22px;border-radius:11px}
 .section-heading>.button{font-size:11px;padding:9px 12px;min-height:36px;border-radius:12px}
 .room-empty{padding:22px;border-radius:21px;gap:15px;flex-wrap:wrap}
 .empty-icon{height:44px;width:44px;font-size:28px;border-radius:15px}
 .room-empty>div{flex:1;min-width:180px}.room-empty h3{font-size:17px}.room-empty p{font-size:12px}
 .room-empty>.button{margin-inline-start:59px;font-size:12px;min-height:43px;padding:11px 15px;border-radius:13px}
 .search{max-width:none;width:100%;padding:12px 14px;border-radius:13px}.search input{font-size:13px}
 .game-grid{grid-template-columns:1fr;gap:18px}.game-cover{aspect-ratio:1.9;margin:8px 8px 0;border-radius:15px}
 .game-card{border-radius:22px}.game-body{padding:18px;gap:13px;flex-wrap:wrap}.game-body h3{font-size:21px}.game-body .button{font-size:12px;margin-inline-start:0}
 .cover-badge{top:10px;left:10px;font-size:11px;padding:7px 9px}
 .room-row{padding:13px;gap:12px;flex-wrap:wrap}.room-game-icon{height:51px;width:66px}
 .room-info{flex-basis:calc(100% - 85px)}.room-info h3{font-size:15px}.room-info p{font-size:11px}
 .room-people{margin-inline-start:78px;font-size:12px}.room-row>.button{margin-inline-start:auto;font-size:12px;min-height:40px;padding:10px 16px}
 footer{margin-top:32px;gap:13px;flex-wrap:wrap;padding:23px 0}footer .brand{font-size:20px}footer>span{font-size:11px}footer>a:not(.brand){font-size:10px}
 dialog{padding:30px 25px;border-radius:25px}dialog h2{font-size:26px}dialog input:not([type=checkbox]){font-size:16px}
 .play-layout{grid-template-columns:1fr;gap:25px}.room-top{gap:12px;flex-wrap:wrap;padding:12px 0 22px}
 .room-top .button{font-size:12px;padding:10px 15px;border-radius:13px}.room-top .code-label{font-size:10px}
 .room-top .text-button{font-size:13px}.play-title{gap:12px}.play-title h1{font-size:25px}.square-button{width:36px;height:36px;font-size:20px;border-radius:11px}
 .screen{border-width:4px;border-radius:18px}.screen-placeholder{padding:22px}.screen-placeholder>span{width:54px;height:54px;font-size:38px;border-radius:18px}
 .screen-placeholder h2{font-size:25px;margin:17px 0 10px}.screen-placeholder p{font-size:12px;line-height:1.65;margin-bottom:17px}
 .screen-placeholder .button.primary{font-size:14px;min-height:45px;padding:12px 23px;border-radius:13px}
 .under-screen{padding-top:14px}.under-screen>span:first-child{font-size:12px}.under-screen .button{font-size:12px;padding:9px 14px;min-height:37px;border-radius:12px}
 .room-sidebar{margin-top:0;padding:22px;border-radius:22px}.sidebar-heading{margin-bottom:20px}
 .player{display:inline-flex;width:calc(50% - 5px);vertical-align:top;gap:9px;margin-bottom:15px;padding-inline-end:8px}.player strong{font-size:12px}.player small{font-size:10px}.player-avatar{width:36px;height:36px;font-size:13px;border-radius:12px}
 .controls-help{margin-top:17px;padding-top:17px}.key-row{font-size:12px}.play-tip,.control-hint{font-size:12px}.device-control{padding-top:17px}
 .credits{padding:20px 0 40px}.credits h1{font-size:34px}
}
@media(max-width:360px){.hero h1{font-size:39px}.hero{padding:23px}.hero-actions{gap:7px}.hero-actions .button{padding:12px 10px;font-size:11px}.room-empty{padding:18px}.room-empty>div{min-width:155px}.room-empty>.button{margin-inline-start:0}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}


.own-game-banner{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:28px;border:2px dashed var(--accent,#8662ed);border-radius:26px;margin:32px 0}.own-game-banner h2{margin:0 0 8px}.own-game-banner p{margin:0}.custom-actions{display:flex;gap:12px;flex-wrap:wrap}input[type=file]{max-width:100%;font:inherit}#room-rom-label{max-width:100%;font-size:14px}#custom-form small{line-height:1.5;opacity:.75}@media(max-width:600px){.own-game-banner{align-items:stretch;flex-direction:column}}

.room-chat{border-top:1px solid var(--line);margin-top:22px;padding-top:20px;min-width:0}.room-chat summary{font-size:18px;font-weight:800;cursor:pointer;display:flex;align-items:center;gap:10px}.room-chat summary small{background:var(--lime);color:#241544;border-radius:12px;padding:3px 8px;font-size:12px}.room-chat>.text-button{font-size:12px;margin-top:12px}.chat-hint{font-size:12px;color:var(--muted);line-height:1.5;margin:10px 0}#chat-log{list-style:none;padding:0;margin:12px 0;max-height:210px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}#chat-log:empty{display:none}#chat-log li{padding:10px 12px;margin:8px 0;background:var(--surface-alt);border-radius:14px;overflow-wrap:anywhere;text-align:start}#chat-log b{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}#chat-log span{font-size:14px;white-space:pre-wrap;line-height:1.5}.chat-quick{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0}.chat-quick button{padding:7px 10px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font-size:12px}.chat-quick button:hover{background:var(--surface-alt)}#chat-form{display:flex;flex-direction:column;gap:8px}#chat-input{min-width:0;width:100%;padding:12px;border:1px solid var(--line);border-radius:13px;background:var(--field-bg);color:var(--text);font-size:14px}#chat-form .button{align-self:flex-end}

/* NES pixels were displayed in a narrow 256:240 box inside a 4:3 screen. */
.screen canvas{object-fit:fill}.screen:fullscreen{display:grid;place-items:center}.screen:fullscreen canvas{width:min(100vw,calc(100vh * 4 / 3));height:min(100vh,calc(100vw * 3 / 4))}#custom-file-status,#room-rom-status{font-size:14px;line-height:1.6;overflow-wrap:anywhere}#rom-info{font-size:13px;margin:12px 0}#rom-info summary{cursor:pointer;color:var(--primary)}.pause-overlay span{max-width:520px;line-height:1.6;padding:0 20px}

/* A blocked launch must be visually distinct from an advisory warning. */
:root{--error-text:#ffb4bf;--error-bg:#47202c;--error-border:#bb6678;--warning-text:#ffe3a0;--warning-bg:#40331c;--warning-border:#927236}
:root[data-theme="light"]{--error-text:#a91b32;--error-bg:#fff0f2;--error-border:#dfa0aa;--warning-text:#785100;--warning-bg:#fff6dc;--warning-border:#d7b762}
#custom-file-status[data-severity="error"],#room-rom-status[data-severity="error"]{color:var(--error-text);background:var(--error-bg);border:1px solid var(--error-border);border-inline-start:4px solid var(--error-text);border-radius:12px;padding:12px 14px;text-align:start;font-weight:600}
#custom-file-status[data-severity="warning"],#room-rom-status[data-severity="warning"]{color:var(--warning-text);background:var(--warning-bg);border:1px solid var(--warning-border);border-radius:12px;padding:12px 14px;text-align:start}
[data-severity="error"]::before{content:'⛔ ';}[data-severity="warning"]::before{content:'⚠ ';}

.fullscreen-tools{position:absolute;z-index:7;top:max(12px,env(safe-area-inset-top));inset-inline-end:max(12px,env(safe-area-inset-right));display:flex;gap:8px;align-items:center}.fullscreen-tools .button,.fullscreen-tools .square-button{background:#211b32ed;color:#fff;border:1px solid #716184}.fullscreen-tools small{background:var(--lime);color:#241544;border-radius:10px;padding:3px 7px}.fullscreen-chat-notice{position:absolute;z-index:7;bottom:max(18px,env(safe-area-inset-bottom));inset-inline-end:max(18px,env(safe-area-inset-right));display:flex;gap:8px;align-items:flex-start;width:min(360px,calc(100% - 36px));background:#211b32f5;color:#fff;border:1px solid #9d81d0;border-radius:18px;box-shadow:0 8px 30px #0006;padding:12px}.fullscreen-chat-notice>button:first-child{border:0;background:none;color:inherit;min-width:0;flex:1;text-align:start;padding:4px;font:inherit}.fullscreen-chat-notice b{display:block;color:#d7c0ff;font-size:12px;margin-bottom:7px;overflow-wrap:anywhere}.fullscreen-chat-notice span{font-size:15px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.fullscreen-chat-notice .square-button{width:30px;height:30px;flex-shrink:0;background:transparent;color:#fff;border-color:#6e5c85}.fullscreen-chat-drawer{position:absolute;z-index:8;top:max(68px,env(safe-area-inset-top));inset-inline-end:max(12px,env(safe-area-inset-right));width:min(360px,calc(100% - 24px));max-height:calc(100% - 90px);overflow-y:auto;overscroll-behavior:contain;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:20px;box-shadow:0 10px 40px #0008;padding:18px}.fullscreen-chat-drawer .room-chat{padding:0;margin:0;border:0}.fullscreen-chat-drawer .room-chat summary{padding-inline-end:40px;min-height:34px}.fullscreen-chat-drawer>button{position:absolute;top:14px;inset-inline-end:14px;width:32px;height:32px}.fullscreen-chat-drawer #chat-log{max-height:min(210px,28vh)}

/* Room lifecycle decisions stay visible inside native fullscreen. */
.recovery-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}#departure-actions{max-width:560px;padding:0 16px}#departure-actions p{font-size:13px!important;line-height:1.5}.session-alert,.restart-request{position:absolute;z-index:16;inset-inline:12px;top:12px;padding:14px 18px;background:var(--panel);color:var(--text);border:2px solid var(--accent,#9565f6);border-radius:16px;box-shadow:0 8px 24px #0005}.session-alert p,.restart-request p{margin:0 0 10px}.restart-request{top:auto;bottom:12px}.screen-placeholder{overflow:auto}#pause-overlay button{pointer-events:auto}#pause-overlay:has(button:not([hidden])){pointer-events:auto}#solo-port-control{display:grid;gap:8px;margin:16px 0}#solo-port-control[hidden]{display:none}#session-help{margin:14px 0}.room-top{flex-wrap:wrap}

@media(max-width:640px){.screen-placeholder:has(#departure-actions:not([hidden])){justify-content:flex-start;padding:14px}.screen-placeholder:has(#departure-actions:not([hidden]))>span{display:none}.screen-placeholder:has(#departure-actions:not([hidden])) h2{font-size:22px;margin:8px 0}.screen-placeholder:has(#departure-actions:not([hidden])) p{margin-bottom:12px;font-size:12px}.screen-placeholder:has(#departure-actions:not([hidden])) .button{min-height:40px;font-size:13px;padding:10px 14px}.session-alert,.restart-request{font-size:12px;padding:10px}.session-alert .button,.restart-request .button{font-size:12px}}
.arcade-view{position:absolute;inset:0;width:100%;height:100%;border:0;object-fit:contain;background:#000;pointer-events:none}.screen canvas[hidden]{display:none}.arcade-help{font-size:13px;line-height:1.5}#arcade-notice{padding:12px;border-radius:12px;background:var(--panel);color:var(--text)}
.pause-overlay[data-severity="error"]{color:#ff8e9d;border:2px solid #e84060}.pause-overlay[data-severity="error"] strong{color:#ff8e9d}
